1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fdomain_client::fidl::{ControlHandle as _, FDomainFlexibleIntoResult as _, Responder as _};
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9pub use fidl_fuchsia_component_common::*;
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14pub struct ControllerOpenExposedDirRequest {
15 pub exposed_dir: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
16}
17
18impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
19 for ControllerOpenExposedDirRequest
20{
21}
22
23#[derive(Debug, PartialEq)]
24pub struct ControllerStartRequest {
25 pub args: StartChildArgs,
26 pub execution_controller: fdomain_client::fidl::ServerEnd<ExecutionControllerMarker>,
27}
28
29impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for ControllerStartRequest {}
30
31#[derive(Debug, PartialEq)]
32pub struct ControllerGetExposedDictionaryResponse {
33 pub dictionary: fdomain_fuchsia_component_sandbox::DictionaryRef,
34}
35
36impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
37 for ControllerGetExposedDictionaryResponse
38{
39}
40
41#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
42pub struct ControllerGetOutputDictionaryResponse {
43 pub dictionary: fdomain_client::EventPair,
44}
45
46impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
47 for ControllerGetOutputDictionaryResponse
48{
49}
50
51#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
52pub struct ControllerIsStartedResponse {
53 pub is_started: bool,
54}
55
56impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
57 for ControllerIsStartedResponse
58{
59}
60
61#[derive(Debug, PartialEq)]
62pub struct EventStreamGetNextResponse {
63 pub events: Vec<Event>,
64}
65
66impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for EventStreamGetNextResponse {}
67
68#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
69pub struct IntrospectorGetMonikerRequest {
70 pub component_instance: fdomain_client::Event,
71}
72
73impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
74 for IntrospectorGetMonikerRequest
75{
76}
77
78#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
79pub struct NamespaceCreate2Request {
80 pub entries: Vec<NamespaceInputEntry2>,
81}
82
83impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NamespaceCreate2Request {}
84
85#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
86pub struct NamespaceCreateRequest {
87 pub entries: Vec<NamespaceInputEntry>,
88}
89
90impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NamespaceCreateRequest {}
91
92#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
93pub struct NamespaceInputEntry {
94 pub path: String,
95 pub dictionary:
96 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_component_sandbox::DictionaryMarker>,
97}
98
99impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NamespaceInputEntry {}
100
101#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
102pub struct NamespaceInputEntry2 {
103 pub path: String,
105 pub capability: fdomain_client::EventPair,
108}
109
110impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NamespaceInputEntry2 {}
111
112#[derive(Debug, PartialEq)]
113pub struct NamespaceCreate2Response {
114 pub entries: Vec<NamespaceEntry>,
115}
116
117impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NamespaceCreate2Response {}
118
119#[derive(Debug, PartialEq)]
120pub struct NamespaceCreateResponse {
121 pub entries: Vec<NamespaceEntry>,
122}
123
124impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NamespaceCreateResponse {}
125
126#[derive(Debug, PartialEq)]
127pub struct RealmCreateChildRequest {
128 pub collection: fdomain_fuchsia_component_decl::CollectionRef,
129 pub decl: fdomain_fuchsia_component_decl::Child,
130 pub args: CreateChildArgs,
131}
132
133impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for RealmCreateChildRequest {}
134
135#[derive(Debug, PartialEq)]
136pub struct RealmGetChildOutputDictionaryDeprecatedRequest {
137 pub child: fdomain_fuchsia_component_decl::ChildRef,
138}
139
140impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
141 for RealmGetChildOutputDictionaryDeprecatedRequest
142{
143}
144
145#[derive(Debug, PartialEq)]
146pub struct RealmGetChildOutputDictionaryRequest {
147 pub child: fdomain_fuchsia_component_decl::ChildRef,
148}
149
150impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
151 for RealmGetChildOutputDictionaryRequest
152{
153}
154
155#[derive(Debug, PartialEq)]
156pub struct RealmListChildrenRequest {
157 pub collection: fdomain_fuchsia_component_decl::CollectionRef,
158 pub iter: fdomain_client::fidl::ServerEnd<ChildIteratorMarker>,
159}
160
161impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for RealmListChildrenRequest {}
162
163#[derive(Debug, PartialEq)]
164pub struct RealmOpenControllerRequest {
165 pub child: fdomain_fuchsia_component_decl::ChildRef,
166 pub controller: fdomain_client::fidl::ServerEnd<ControllerMarker>,
167}
168
169impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for RealmOpenControllerRequest {}
170
171#[derive(Debug, PartialEq)]
172pub struct RealmOpenExposedDirRequest {
173 pub child: fdomain_fuchsia_component_decl::ChildRef,
174 pub exposed_dir: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
175}
176
177impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for RealmOpenExposedDirRequest {}
178
179#[derive(Debug, PartialEq)]
180pub struct RealmGetChildOutputDictionaryDeprecatedResponse {
181 pub dictionary: fdomain_fuchsia_component_sandbox::DictionaryRef,
182}
183
184impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
185 for RealmGetChildOutputDictionaryDeprecatedResponse
186{
187}
188
189#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
190pub struct RealmGetChildOutputDictionaryResponse {
191 pub dictionary: fdomain_client::EventPair,
192}
193
194impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
195 for RealmGetChildOutputDictionaryResponse
196{
197}
198
199#[derive(Debug, PartialEq)]
200pub struct RealmGetResolvedInfoResponse {
201 pub resolved_info: fdomain_fuchsia_component_resolution::Component,
202}
203
204impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
205 for RealmGetResolvedInfoResponse
206{
207}
208
209#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
210pub struct StorageAdminListStorageInRealmRequest {
211 pub relative_moniker: String,
212 pub iterator: fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
213}
214
215impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
216 for StorageAdminListStorageInRealmRequest
217{
218}
219
220#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
221pub struct StorageAdminOpenComponentStorageByIdRequest {
222 pub id: String,
223 pub object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
224}
225
226impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
227 for StorageAdminOpenComponentStorageByIdRequest
228{
229}
230
231#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
232pub struct StorageAdminOpenStorageRequest {
233 pub relative_moniker: String,
234 pub object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
235}
236
237impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
238 for StorageAdminOpenStorageRequest
239{
240}
241
242#[derive(Debug, Default, PartialEq)]
244pub struct CapabilityRequestedPayload {
245 pub name: Option<String>,
247 pub capability: Option<fdomain_client::Channel>,
250 #[doc(hidden)]
251 pub __source_breaking: fidl::marker::SourceBreaking,
252}
253
254impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for CapabilityRequestedPayload {}
255
256#[derive(Debug, Default, PartialEq)]
257pub struct CreateChildArgs {
258 pub numbered_handles: Option<Vec<fdomain_fuchsia_process::HandleInfo>>,
263 pub dynamic_offers: Option<Vec<fdomain_fuchsia_component_decl::Offer>>,
287 pub controller: Option<fdomain_client::fidl::ServerEnd<ControllerMarker>>,
290 pub dictionary: Option<fdomain_fuchsia_component_sandbox::DictionaryRef>,
295 pub additional_inputs: Option<fdomain_client::EventPair>,
299 #[doc(hidden)]
300 pub __source_breaking: fidl::marker::SourceBreaking,
301}
302
303impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for CreateChildArgs {}
304
305#[derive(Debug, Default, PartialEq)]
307pub struct DebugStartedPayload {
308 pub runtime_dir: Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>>,
313 pub break_on_start: Option<fdomain_client::EventPair>,
318 #[doc(hidden)]
319 pub __source_breaking: fidl::marker::SourceBreaking,
320}
321
322impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DebugStartedPayload {}
323
324#[derive(Debug, Default, PartialEq)]
326pub struct Event {
327 pub header: Option<EventHeader>,
329 pub payload: Option<EventPayload>,
331 #[doc(hidden)]
332 pub __source_breaking: fidl::marker::SourceBreaking,
333}
334
335impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for Event {}
336
337#[derive(Debug, Default, PartialEq)]
341pub struct NamespaceEntry {
342 pub path: Option<String>,
345 pub directory: Option<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>>,
347 #[doc(hidden)]
348 pub __source_breaking: fidl::marker::SourceBreaking,
349}
350
351impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NamespaceEntry {}
352
353#[derive(Debug, Default, PartialEq)]
354pub struct StartChildArgs {
355 pub numbered_handles: Option<Vec<fdomain_fuchsia_process::HandleInfo>>,
363 pub namespace_entries: Option<Vec<NamespaceEntry>>,
370 pub dictionary: Option<fdomain_fuchsia_component_sandbox::DictionaryRef>,
375 pub additional_inputs: Option<fdomain_client::EventPair>,
379 #[doc(hidden)]
380 pub __source_breaking: fidl::marker::SourceBreaking,
381}
382
383impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for StartChildArgs {}
384
385#[derive(Debug)]
387pub enum EventPayload {
388 CapabilityRequested(CapabilityRequestedPayload),
390 Purged(PurgedPayload),
392 Discovered(DiscoveredPayload),
394 Destroyed(DestroyedPayload),
396 Resolved(ResolvedPayload),
398 Started(StartedPayload),
400 Stopped(StoppedPayload),
402 DebugStarted(DebugStartedPayload),
404 Unresolved(UnresolvedPayload),
406 #[doc(hidden)]
407 __SourceBreaking { unknown_ordinal: u64 },
408}
409
410#[macro_export]
412macro_rules! EventPayloadUnknown {
413 () => {
414 _
415 };
416}
417
418impl PartialEq for EventPayload {
420 fn eq(&self, other: &Self) -> bool {
421 match (self, other) {
422 (Self::CapabilityRequested(x), Self::CapabilityRequested(y)) => *x == *y,
423 (Self::Purged(x), Self::Purged(y)) => *x == *y,
424 (Self::Discovered(x), Self::Discovered(y)) => *x == *y,
425 (Self::Destroyed(x), Self::Destroyed(y)) => *x == *y,
426 (Self::Resolved(x), Self::Resolved(y)) => *x == *y,
427 (Self::Started(x), Self::Started(y)) => *x == *y,
428 (Self::Stopped(x), Self::Stopped(y)) => *x == *y,
429 (Self::DebugStarted(x), Self::DebugStarted(y)) => *x == *y,
430 (Self::Unresolved(x), Self::Unresolved(y)) => *x == *y,
431 _ => false,
432 }
433 }
434}
435
436impl EventPayload {
437 #[inline]
438 pub fn ordinal(&self) -> u64 {
439 match *self {
440 Self::CapabilityRequested(_) => 1,
441 Self::Purged(_) => 2,
442 Self::Discovered(_) => 4,
443 Self::Destroyed(_) => 5,
444 Self::Resolved(_) => 6,
445 Self::Started(_) => 7,
446 Self::Stopped(_) => 8,
447 Self::DebugStarted(_) => 9,
448 Self::Unresolved(_) => 10,
449 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
450 }
451 }
452
453 #[inline]
454 pub fn unknown_variant_for_testing() -> Self {
455 Self::__SourceBreaking { unknown_ordinal: 0 }
456 }
457
458 #[inline]
459 pub fn is_unknown(&self) -> bool {
460 match self {
461 Self::__SourceBreaking { .. } => true,
462 _ => false,
463 }
464 }
465}
466
467impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for EventPayload {}
468
469#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
470pub struct BinderMarker;
471
472impl fdomain_client::fidl::ProtocolMarker for BinderMarker {
473 type Proxy = BinderProxy;
474 type RequestStream = BinderRequestStream;
475
476 const DEBUG_NAME: &'static str = "fuchsia.component.Binder";
477}
478impl fdomain_client::fidl::DiscoverableProtocolMarker for BinderMarker {}
479
480pub trait BinderProxyInterface: Send + Sync {}
481
482#[derive(Debug, Clone)]
483pub struct BinderProxy {
484 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
485}
486
487impl fdomain_client::fidl::Proxy for BinderProxy {
488 type Protocol = BinderMarker;
489
490 fn from_channel(inner: fdomain_client::Channel) -> Self {
491 Self::new(inner)
492 }
493
494 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
495 self.client.into_channel().map_err(|client| Self { client })
496 }
497
498 fn as_channel(&self) -> &fdomain_client::Channel {
499 self.client.as_channel()
500 }
501}
502
503impl BinderProxy {
504 pub fn new(channel: fdomain_client::Channel) -> Self {
506 let protocol_name = <BinderMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
507 Self { client: fidl::client::Client::new(channel, protocol_name) }
508 }
509
510 pub fn take_event_stream(&self) -> BinderEventStream {
516 BinderEventStream { event_receiver: self.client.take_event_receiver() }
517 }
518}
519
520impl BinderProxyInterface for BinderProxy {}
521
522pub struct BinderEventStream {
523 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
524}
525
526impl std::marker::Unpin for BinderEventStream {}
527
528impl futures::stream::FusedStream for BinderEventStream {
529 fn is_terminated(&self) -> bool {
530 self.event_receiver.is_terminated()
531 }
532}
533
534impl futures::Stream for BinderEventStream {
535 type Item = Result<BinderEvent, fidl::Error>;
536
537 fn poll_next(
538 mut self: std::pin::Pin<&mut Self>,
539 cx: &mut std::task::Context<'_>,
540 ) -> std::task::Poll<Option<Self::Item>> {
541 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
542 &mut self.event_receiver,
543 cx
544 )?) {
545 Some(buf) => std::task::Poll::Ready(Some(BinderEvent::decode(buf))),
546 None => std::task::Poll::Ready(None),
547 }
548 }
549}
550
551#[derive(Debug)]
552pub enum BinderEvent {}
553
554impl BinderEvent {
555 fn decode(
557 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
558 ) -> Result<BinderEvent, fidl::Error> {
559 let (bytes, _handles) = buf.split_mut();
560 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
561 debug_assert_eq!(tx_header.tx_id, 0);
562 match tx_header.ordinal {
563 _ => Err(fidl::Error::UnknownOrdinal {
564 ordinal: tx_header.ordinal,
565 protocol_name: <BinderMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
566 }),
567 }
568 }
569}
570
571pub struct BinderRequestStream {
573 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
574 is_terminated: bool,
575}
576
577impl std::marker::Unpin for BinderRequestStream {}
578
579impl futures::stream::FusedStream for BinderRequestStream {
580 fn is_terminated(&self) -> bool {
581 self.is_terminated
582 }
583}
584
585impl fdomain_client::fidl::RequestStream for BinderRequestStream {
586 type Protocol = BinderMarker;
587 type ControlHandle = BinderControlHandle;
588
589 fn from_channel(channel: fdomain_client::Channel) -> Self {
590 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
591 }
592
593 fn control_handle(&self) -> Self::ControlHandle {
594 BinderControlHandle { inner: self.inner.clone() }
595 }
596
597 fn into_inner(
598 self,
599 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
600 {
601 (self.inner, self.is_terminated)
602 }
603
604 fn from_inner(
605 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
606 is_terminated: bool,
607 ) -> Self {
608 Self { inner, is_terminated }
609 }
610}
611
612impl futures::Stream for BinderRequestStream {
613 type Item = Result<BinderRequest, fidl::Error>;
614
615 fn poll_next(
616 mut self: std::pin::Pin<&mut Self>,
617 cx: &mut std::task::Context<'_>,
618 ) -> std::task::Poll<Option<Self::Item>> {
619 let this = &mut *self;
620 if this.inner.check_shutdown(cx) {
621 this.is_terminated = true;
622 return std::task::Poll::Ready(None);
623 }
624 if this.is_terminated {
625 panic!("polled BinderRequestStream after completion");
626 }
627 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
628 |bytes, handles| {
629 match this.inner.channel().read_etc(cx, bytes, handles) {
630 std::task::Poll::Ready(Ok(())) => {}
631 std::task::Poll::Pending => return std::task::Poll::Pending,
632 std::task::Poll::Ready(Err(None)) => {
633 this.is_terminated = true;
634 return std::task::Poll::Ready(None);
635 }
636 std::task::Poll::Ready(Err(Some(e))) => {
637 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
638 e.into(),
639 ))));
640 }
641 }
642
643 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
645
646 std::task::Poll::Ready(Some(match header.ordinal {
647 _ => Err(fidl::Error::UnknownOrdinal {
648 ordinal: header.ordinal,
649 protocol_name:
650 <BinderMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
651 }),
652 }))
653 },
654 )
655 }
656}
657
658#[derive(Debug)]
669pub enum BinderRequest {}
670
671impl BinderRequest {
672 pub fn method_name(&self) -> &'static str {
674 match *self {}
675 }
676}
677
678#[derive(Debug, Clone)]
679pub struct BinderControlHandle {
680 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
681}
682
683impl BinderControlHandle {
684 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
685 self.inner.shutdown_with_epitaph(status.into())
686 }
687}
688
689impl fdomain_client::fidl::ControlHandle for BinderControlHandle {
690 fn shutdown(&self) {
691 self.inner.shutdown()
692 }
693
694 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
695 self.inner.shutdown_with_epitaph(status)
696 }
697
698 fn is_closed(&self) -> bool {
699 self.inner.channel().is_closed()
700 }
701 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
702 self.inner.channel().on_closed()
703 }
704}
705
706impl BinderControlHandle {}
707
708#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
709pub struct ChildIteratorMarker;
710
711impl fdomain_client::fidl::ProtocolMarker for ChildIteratorMarker {
712 type Proxy = ChildIteratorProxy;
713 type RequestStream = ChildIteratorRequestStream;
714
715 const DEBUG_NAME: &'static str = "(anonymous) ChildIterator";
716}
717
718pub trait ChildIteratorProxyInterface: Send + Sync {
719 type NextResponseFut: std::future::Future<
720 Output = Result<Vec<fdomain_fuchsia_component_decl::ChildRef>, fidl::Error>,
721 > + Send;
722 fn r#next(&self) -> Self::NextResponseFut;
723}
724
725#[derive(Debug, Clone)]
726pub struct ChildIteratorProxy {
727 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
728}
729
730impl fdomain_client::fidl::Proxy for ChildIteratorProxy {
731 type Protocol = ChildIteratorMarker;
732
733 fn from_channel(inner: fdomain_client::Channel) -> Self {
734 Self::new(inner)
735 }
736
737 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
738 self.client.into_channel().map_err(|client| Self { client })
739 }
740
741 fn as_channel(&self) -> &fdomain_client::Channel {
742 self.client.as_channel()
743 }
744}
745
746impl ChildIteratorProxy {
747 pub fn new(channel: fdomain_client::Channel) -> Self {
749 let protocol_name =
750 <ChildIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
751 Self { client: fidl::client::Client::new(channel, protocol_name) }
752 }
753
754 pub fn take_event_stream(&self) -> ChildIteratorEventStream {
760 ChildIteratorEventStream { event_receiver: self.client.take_event_receiver() }
761 }
762
763 pub fn r#next(
768 &self,
769 ) -> fidl::client::QueryResponseFut<
770 Vec<fdomain_fuchsia_component_decl::ChildRef>,
771 fdomain_client::fidl::FDomainResourceDialect,
772 > {
773 ChildIteratorProxyInterface::r#next(self)
774 }
775}
776
777impl ChildIteratorProxyInterface for ChildIteratorProxy {
778 type NextResponseFut = fidl::client::QueryResponseFut<
779 Vec<fdomain_fuchsia_component_decl::ChildRef>,
780 fdomain_client::fidl::FDomainResourceDialect,
781 >;
782 fn r#next(&self) -> Self::NextResponseFut {
783 fn _decode(
784 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
785 ) -> Result<Vec<fdomain_fuchsia_component_decl::ChildRef>, fidl::Error> {
786 let _response = fidl::client::decode_transaction_body::<
787 ChildIteratorNextResponse,
788 fdomain_client::fidl::FDomainResourceDialect,
789 0x40e4c3882b050d08,
790 >(_buf?)?;
791 Ok(_response.children)
792 }
793 self.client.send_query_and_decode::<
794 fidl::encoding::EmptyPayload,
795 Vec<fdomain_fuchsia_component_decl::ChildRef>,
796 >(
797 (),
798 0x40e4c3882b050d08,
799 fidl::encoding::DynamicFlags::empty(),
800 _decode,
801 )
802 }
803}
804
805pub struct ChildIteratorEventStream {
806 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
807}
808
809impl std::marker::Unpin for ChildIteratorEventStream {}
810
811impl futures::stream::FusedStream for ChildIteratorEventStream {
812 fn is_terminated(&self) -> bool {
813 self.event_receiver.is_terminated()
814 }
815}
816
817impl futures::Stream for ChildIteratorEventStream {
818 type Item = Result<ChildIteratorEvent, fidl::Error>;
819
820 fn poll_next(
821 mut self: std::pin::Pin<&mut Self>,
822 cx: &mut std::task::Context<'_>,
823 ) -> std::task::Poll<Option<Self::Item>> {
824 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
825 &mut self.event_receiver,
826 cx
827 )?) {
828 Some(buf) => std::task::Poll::Ready(Some(ChildIteratorEvent::decode(buf))),
829 None => std::task::Poll::Ready(None),
830 }
831 }
832}
833
834#[derive(Debug)]
835pub enum ChildIteratorEvent {}
836
837impl ChildIteratorEvent {
838 fn decode(
840 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
841 ) -> Result<ChildIteratorEvent, fidl::Error> {
842 let (bytes, _handles) = buf.split_mut();
843 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
844 debug_assert_eq!(tx_header.tx_id, 0);
845 match tx_header.ordinal {
846 _ => Err(fidl::Error::UnknownOrdinal {
847 ordinal: tx_header.ordinal,
848 protocol_name:
849 <ChildIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
850 }),
851 }
852 }
853}
854
855pub struct ChildIteratorRequestStream {
857 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
858 is_terminated: bool,
859}
860
861impl std::marker::Unpin for ChildIteratorRequestStream {}
862
863impl futures::stream::FusedStream for ChildIteratorRequestStream {
864 fn is_terminated(&self) -> bool {
865 self.is_terminated
866 }
867}
868
869impl fdomain_client::fidl::RequestStream for ChildIteratorRequestStream {
870 type Protocol = ChildIteratorMarker;
871 type ControlHandle = ChildIteratorControlHandle;
872
873 fn from_channel(channel: fdomain_client::Channel) -> Self {
874 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
875 }
876
877 fn control_handle(&self) -> Self::ControlHandle {
878 ChildIteratorControlHandle { inner: self.inner.clone() }
879 }
880
881 fn into_inner(
882 self,
883 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
884 {
885 (self.inner, self.is_terminated)
886 }
887
888 fn from_inner(
889 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
890 is_terminated: bool,
891 ) -> Self {
892 Self { inner, is_terminated }
893 }
894}
895
896impl futures::Stream for ChildIteratorRequestStream {
897 type Item = Result<ChildIteratorRequest, fidl::Error>;
898
899 fn poll_next(
900 mut self: std::pin::Pin<&mut Self>,
901 cx: &mut std::task::Context<'_>,
902 ) -> std::task::Poll<Option<Self::Item>> {
903 let this = &mut *self;
904 if this.inner.check_shutdown(cx) {
905 this.is_terminated = true;
906 return std::task::Poll::Ready(None);
907 }
908 if this.is_terminated {
909 panic!("polled ChildIteratorRequestStream after completion");
910 }
911 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
912 |bytes, handles| {
913 match this.inner.channel().read_etc(cx, bytes, handles) {
914 std::task::Poll::Ready(Ok(())) => {}
915 std::task::Poll::Pending => return std::task::Poll::Pending,
916 std::task::Poll::Ready(Err(None)) => {
917 this.is_terminated = true;
918 return std::task::Poll::Ready(None);
919 }
920 std::task::Poll::Ready(Err(Some(e))) => {
921 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
922 e.into(),
923 ))));
924 }
925 }
926
927 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
929
930 std::task::Poll::Ready(Some(match header.ordinal {
931 0x40e4c3882b050d08 => {
932 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
933 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
934 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
935 let control_handle = ChildIteratorControlHandle {
936 inner: this.inner.clone(),
937 };
938 Ok(ChildIteratorRequest::Next {
939 responder: ChildIteratorNextResponder {
940 control_handle: std::mem::ManuallyDrop::new(control_handle),
941 tx_id: header.tx_id,
942 },
943 })
944 }
945 _ => Err(fidl::Error::UnknownOrdinal {
946 ordinal: header.ordinal,
947 protocol_name: <ChildIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
948 }),
949 }))
950 },
951 )
952 }
953}
954
955#[derive(Debug)]
957pub enum ChildIteratorRequest {
958 Next { responder: ChildIteratorNextResponder },
963}
964
965impl ChildIteratorRequest {
966 #[allow(irrefutable_let_patterns)]
967 pub fn into_next(self) -> Option<(ChildIteratorNextResponder)> {
968 if let ChildIteratorRequest::Next { responder } = self { Some((responder)) } else { None }
969 }
970
971 pub fn method_name(&self) -> &'static str {
973 match *self {
974 ChildIteratorRequest::Next { .. } => "next",
975 }
976 }
977}
978
979#[derive(Debug, Clone)]
980pub struct ChildIteratorControlHandle {
981 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
982}
983
984impl ChildIteratorControlHandle {
985 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
986 self.inner.shutdown_with_epitaph(status.into())
987 }
988}
989
990impl fdomain_client::fidl::ControlHandle for ChildIteratorControlHandle {
991 fn shutdown(&self) {
992 self.inner.shutdown()
993 }
994
995 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
996 self.inner.shutdown_with_epitaph(status)
997 }
998
999 fn is_closed(&self) -> bool {
1000 self.inner.channel().is_closed()
1001 }
1002 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
1003 self.inner.channel().on_closed()
1004 }
1005}
1006
1007impl ChildIteratorControlHandle {}
1008
1009#[must_use = "FIDL methods require a response to be sent"]
1010#[derive(Debug)]
1011pub struct ChildIteratorNextResponder {
1012 control_handle: std::mem::ManuallyDrop<ChildIteratorControlHandle>,
1013 tx_id: u32,
1014}
1015
1016impl std::ops::Drop for ChildIteratorNextResponder {
1020 fn drop(&mut self) {
1021 self.control_handle.shutdown();
1022 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1024 }
1025}
1026
1027impl fdomain_client::fidl::Responder for ChildIteratorNextResponder {
1028 type ControlHandle = ChildIteratorControlHandle;
1029
1030 fn control_handle(&self) -> &ChildIteratorControlHandle {
1031 &self.control_handle
1032 }
1033
1034 fn drop_without_shutdown(mut self) {
1035 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1037 std::mem::forget(self);
1039 }
1040}
1041
1042impl ChildIteratorNextResponder {
1043 pub fn send(
1047 self,
1048 mut children: &[fdomain_fuchsia_component_decl::ChildRef],
1049 ) -> Result<(), fidl::Error> {
1050 let _result = self.send_raw(children);
1051 if _result.is_err() {
1052 self.control_handle.shutdown();
1053 }
1054 self.drop_without_shutdown();
1055 _result
1056 }
1057
1058 pub fn send_no_shutdown_on_err(
1060 self,
1061 mut children: &[fdomain_fuchsia_component_decl::ChildRef],
1062 ) -> Result<(), fidl::Error> {
1063 let _result = self.send_raw(children);
1064 self.drop_without_shutdown();
1065 _result
1066 }
1067
1068 fn send_raw(
1069 &self,
1070 mut children: &[fdomain_fuchsia_component_decl::ChildRef],
1071 ) -> Result<(), fidl::Error> {
1072 self.control_handle.inner.send::<ChildIteratorNextResponse>(
1073 (children,),
1074 self.tx_id,
1075 0x40e4c3882b050d08,
1076 fidl::encoding::DynamicFlags::empty(),
1077 )
1078 }
1079}
1080
1081#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1082pub struct ControllerMarker;
1083
1084impl fdomain_client::fidl::ProtocolMarker for ControllerMarker {
1085 type Proxy = ControllerProxy;
1086 type RequestStream = ControllerRequestStream;
1087
1088 const DEBUG_NAME: &'static str = "(anonymous) Controller";
1089}
1090pub type ControllerStartResult = Result<(), Error>;
1091pub type ControllerIsStartedResult = Result<bool, Error>;
1092pub type ControllerOpenExposedDirResult = Result<(), Error>;
1093pub type ControllerGetExposedDictionaryResult =
1094 Result<fdomain_fuchsia_component_sandbox::DictionaryRef, Error>;
1095pub type ControllerGetOutputDictionaryResult = Result<fdomain_client::EventPair, Error>;
1096pub type ControllerDestroyResult = Result<(), Error>;
1097
1098pub trait ControllerProxyInterface: Send + Sync {
1099 type StartResponseFut: std::future::Future<Output = Result<ControllerStartResult, fidl::Error>>
1100 + Send;
1101 fn r#start(
1102 &self,
1103 args: StartChildArgs,
1104 execution_controller: fdomain_client::fidl::ServerEnd<ExecutionControllerMarker>,
1105 ) -> Self::StartResponseFut;
1106 type IsStartedResponseFut: std::future::Future<Output = Result<ControllerIsStartedResult, fidl::Error>>
1107 + Send;
1108 fn r#is_started(&self) -> Self::IsStartedResponseFut;
1109 type OpenExposedDirResponseFut: std::future::Future<Output = Result<ControllerOpenExposedDirResult, fidl::Error>>
1110 + Send;
1111 fn r#open_exposed_dir(
1112 &self,
1113 exposed_dir: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
1114 ) -> Self::OpenExposedDirResponseFut;
1115 type GetExposedDictionaryResponseFut: std::future::Future<Output = Result<ControllerGetExposedDictionaryResult, fidl::Error>>
1116 + Send;
1117 fn r#get_exposed_dictionary(&self) -> Self::GetExposedDictionaryResponseFut;
1118 type GetOutputDictionaryResponseFut: std::future::Future<Output = Result<ControllerGetOutputDictionaryResult, fidl::Error>>
1119 + Send;
1120 fn r#get_output_dictionary(&self) -> Self::GetOutputDictionaryResponseFut;
1121 type DestroyResponseFut: std::future::Future<Output = Result<ControllerDestroyResult, fidl::Error>>
1122 + Send;
1123 fn r#destroy(&self) -> Self::DestroyResponseFut;
1124}
1125
1126#[derive(Debug, Clone)]
1127pub struct ControllerProxy {
1128 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
1129}
1130
1131impl fdomain_client::fidl::Proxy for ControllerProxy {
1132 type Protocol = ControllerMarker;
1133
1134 fn from_channel(inner: fdomain_client::Channel) -> Self {
1135 Self::new(inner)
1136 }
1137
1138 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
1139 self.client.into_channel().map_err(|client| Self { client })
1140 }
1141
1142 fn as_channel(&self) -> &fdomain_client::Channel {
1143 self.client.as_channel()
1144 }
1145}
1146
1147impl ControllerProxy {
1148 pub fn new(channel: fdomain_client::Channel) -> Self {
1150 let protocol_name = <ControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
1151 Self { client: fidl::client::Client::new(channel, protocol_name) }
1152 }
1153
1154 pub fn take_event_stream(&self) -> ControllerEventStream {
1160 ControllerEventStream { event_receiver: self.client.take_event_receiver() }
1161 }
1162
1163 pub fn r#start(
1167 &self,
1168 mut args: StartChildArgs,
1169 mut execution_controller: fdomain_client::fidl::ServerEnd<ExecutionControllerMarker>,
1170 ) -> fidl::client::QueryResponseFut<
1171 ControllerStartResult,
1172 fdomain_client::fidl::FDomainResourceDialect,
1173 > {
1174 ControllerProxyInterface::r#start(self, args, execution_controller)
1175 }
1176
1177 pub fn r#is_started(
1179 &self,
1180 ) -> fidl::client::QueryResponseFut<
1181 ControllerIsStartedResult,
1182 fdomain_client::fidl::FDomainResourceDialect,
1183 > {
1184 ControllerProxyInterface::r#is_started(self)
1185 }
1186
1187 pub fn r#open_exposed_dir(
1201 &self,
1202 mut exposed_dir: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
1203 ) -> fidl::client::QueryResponseFut<
1204 ControllerOpenExposedDirResult,
1205 fdomain_client::fidl::FDomainResourceDialect,
1206 > {
1207 ControllerProxyInterface::r#open_exposed_dir(self, exposed_dir)
1208 }
1209
1210 pub fn r#get_exposed_dictionary(
1212 &self,
1213 ) -> fidl::client::QueryResponseFut<
1214 ControllerGetExposedDictionaryResult,
1215 fdomain_client::fidl::FDomainResourceDialect,
1216 > {
1217 ControllerProxyInterface::r#get_exposed_dictionary(self)
1218 }
1219
1220 pub fn r#get_output_dictionary(
1223 &self,
1224 ) -> fidl::client::QueryResponseFut<
1225 ControllerGetOutputDictionaryResult,
1226 fdomain_client::fidl::FDomainResourceDialect,
1227 > {
1228 ControllerProxyInterface::r#get_output_dictionary(self)
1229 }
1230
1231 pub fn r#destroy(
1242 &self,
1243 ) -> fidl::client::QueryResponseFut<
1244 ControllerDestroyResult,
1245 fdomain_client::fidl::FDomainResourceDialect,
1246 > {
1247 ControllerProxyInterface::r#destroy(self)
1248 }
1249}
1250
1251impl ControllerProxyInterface for ControllerProxy {
1252 type StartResponseFut = fidl::client::QueryResponseFut<
1253 ControllerStartResult,
1254 fdomain_client::fidl::FDomainResourceDialect,
1255 >;
1256 fn r#start(
1257 &self,
1258 mut args: StartChildArgs,
1259 mut execution_controller: fdomain_client::fidl::ServerEnd<ExecutionControllerMarker>,
1260 ) -> Self::StartResponseFut {
1261 fn _decode(
1262 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1263 ) -> Result<ControllerStartResult, fidl::Error> {
1264 let _response = fidl::client::decode_transaction_body::<
1265 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, Error>,
1266 fdomain_client::fidl::FDomainResourceDialect,
1267 0x68878076b8d2eac5,
1268 >(_buf?)?
1269 .into_result_fdomain::<ControllerMarker>("start")?;
1270 Ok(_response.map(|x| x))
1271 }
1272 self.client.send_query_and_decode::<ControllerStartRequest, ControllerStartResult>(
1273 (&mut args, execution_controller),
1274 0x68878076b8d2eac5,
1275 fidl::encoding::DynamicFlags::FLEXIBLE,
1276 _decode,
1277 )
1278 }
1279
1280 type IsStartedResponseFut = fidl::client::QueryResponseFut<
1281 ControllerIsStartedResult,
1282 fdomain_client::fidl::FDomainResourceDialect,
1283 >;
1284 fn r#is_started(&self) -> Self::IsStartedResponseFut {
1285 fn _decode(
1286 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1287 ) -> Result<ControllerIsStartedResult, fidl::Error> {
1288 let _response = fidl::client::decode_transaction_body::<
1289 fidl::encoding::FlexibleResultType<ControllerIsStartedResponse, Error>,
1290 fdomain_client::fidl::FDomainResourceDialect,
1291 0x2155e6e1db2083c3,
1292 >(_buf?)?
1293 .into_result_fdomain::<ControllerMarker>("is_started")?;
1294 Ok(_response.map(|x| x.is_started))
1295 }
1296 self.client
1297 .send_query_and_decode::<fidl::encoding::EmptyPayload, ControllerIsStartedResult>(
1298 (),
1299 0x2155e6e1db2083c3,
1300 fidl::encoding::DynamicFlags::FLEXIBLE,
1301 _decode,
1302 )
1303 }
1304
1305 type OpenExposedDirResponseFut = fidl::client::QueryResponseFut<
1306 ControllerOpenExposedDirResult,
1307 fdomain_client::fidl::FDomainResourceDialect,
1308 >;
1309 fn r#open_exposed_dir(
1310 &self,
1311 mut exposed_dir: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
1312 ) -> Self::OpenExposedDirResponseFut {
1313 fn _decode(
1314 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1315 ) -> Result<ControllerOpenExposedDirResult, fidl::Error> {
1316 let _response = fidl::client::decode_transaction_body::<
1317 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1318 fdomain_client::fidl::FDomainResourceDialect,
1319 0x253cabb9a840ed94,
1320 >(_buf?)?;
1321 Ok(_response.map(|x| x))
1322 }
1323 self.client.send_query_and_decode::<
1324 ControllerOpenExposedDirRequest,
1325 ControllerOpenExposedDirResult,
1326 >(
1327 (exposed_dir,),
1328 0x253cabb9a840ed94,
1329 fidl::encoding::DynamicFlags::empty(),
1330 _decode,
1331 )
1332 }
1333
1334 type GetExposedDictionaryResponseFut = fidl::client::QueryResponseFut<
1335 ControllerGetExposedDictionaryResult,
1336 fdomain_client::fidl::FDomainResourceDialect,
1337 >;
1338 fn r#get_exposed_dictionary(&self) -> Self::GetExposedDictionaryResponseFut {
1339 fn _decode(
1340 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1341 ) -> Result<ControllerGetExposedDictionaryResult, fidl::Error> {
1342 let _response = fidl::client::decode_transaction_body::<
1343 fidl::encoding::FlexibleResultType<ControllerGetExposedDictionaryResponse, Error>,
1344 fdomain_client::fidl::FDomainResourceDialect,
1345 0x7e48373e5eda1f9b,
1346 >(_buf?)?
1347 .into_result_fdomain::<ControllerMarker>("get_exposed_dictionary")?;
1348 Ok(_response.map(|x| x.dictionary))
1349 }
1350 self.client.send_query_and_decode::<
1351 fidl::encoding::EmptyPayload,
1352 ControllerGetExposedDictionaryResult,
1353 >(
1354 (),
1355 0x7e48373e5eda1f9b,
1356 fidl::encoding::DynamicFlags::FLEXIBLE,
1357 _decode,
1358 )
1359 }
1360
1361 type GetOutputDictionaryResponseFut = fidl::client::QueryResponseFut<
1362 ControllerGetOutputDictionaryResult,
1363 fdomain_client::fidl::FDomainResourceDialect,
1364 >;
1365 fn r#get_output_dictionary(&self) -> Self::GetOutputDictionaryResponseFut {
1366 fn _decode(
1367 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1368 ) -> Result<ControllerGetOutputDictionaryResult, fidl::Error> {
1369 let _response = fidl::client::decode_transaction_body::<
1370 fidl::encoding::FlexibleResultType<ControllerGetOutputDictionaryResponse, Error>,
1371 fdomain_client::fidl::FDomainResourceDialect,
1372 0x3a0c4696620ad221,
1373 >(_buf?)?
1374 .into_result_fdomain::<ControllerMarker>("get_output_dictionary")?;
1375 Ok(_response.map(|x| x.dictionary))
1376 }
1377 self.client.send_query_and_decode::<
1378 fidl::encoding::EmptyPayload,
1379 ControllerGetOutputDictionaryResult,
1380 >(
1381 (),
1382 0x3a0c4696620ad221,
1383 fidl::encoding::DynamicFlags::FLEXIBLE,
1384 _decode,
1385 )
1386 }
1387
1388 type DestroyResponseFut = fidl::client::QueryResponseFut<
1389 ControllerDestroyResult,
1390 fdomain_client::fidl::FDomainResourceDialect,
1391 >;
1392 fn r#destroy(&self) -> Self::DestroyResponseFut {
1393 fn _decode(
1394 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1395 ) -> Result<ControllerDestroyResult, fidl::Error> {
1396 let _response = fidl::client::decode_transaction_body::<
1397 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, Error>,
1398 fdomain_client::fidl::FDomainResourceDialect,
1399 0x74529fa68b5c1741,
1400 >(_buf?)?
1401 .into_result_fdomain::<ControllerMarker>("destroy")?;
1402 Ok(_response.map(|x| x))
1403 }
1404 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ControllerDestroyResult>(
1405 (),
1406 0x74529fa68b5c1741,
1407 fidl::encoding::DynamicFlags::FLEXIBLE,
1408 _decode,
1409 )
1410 }
1411}
1412
1413pub struct ControllerEventStream {
1414 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
1415}
1416
1417impl std::marker::Unpin for ControllerEventStream {}
1418
1419impl futures::stream::FusedStream for ControllerEventStream {
1420 fn is_terminated(&self) -> bool {
1421 self.event_receiver.is_terminated()
1422 }
1423}
1424
1425impl futures::Stream for ControllerEventStream {
1426 type Item = Result<ControllerEvent, fidl::Error>;
1427
1428 fn poll_next(
1429 mut self: std::pin::Pin<&mut Self>,
1430 cx: &mut std::task::Context<'_>,
1431 ) -> std::task::Poll<Option<Self::Item>> {
1432 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1433 &mut self.event_receiver,
1434 cx
1435 )?) {
1436 Some(buf) => std::task::Poll::Ready(Some(ControllerEvent::decode(buf))),
1437 None => std::task::Poll::Ready(None),
1438 }
1439 }
1440}
1441
1442#[derive(Debug)]
1443pub enum ControllerEvent {
1444 #[non_exhaustive]
1445 _UnknownEvent {
1446 ordinal: u64,
1448 },
1449}
1450
1451impl ControllerEvent {
1452 fn decode(
1454 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1455 ) -> Result<ControllerEvent, fidl::Error> {
1456 let (bytes, _handles) = buf.split_mut();
1457 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1458 debug_assert_eq!(tx_header.tx_id, 0);
1459 match tx_header.ordinal {
1460 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1461 Ok(ControllerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
1462 }
1463 _ => Err(fidl::Error::UnknownOrdinal {
1464 ordinal: tx_header.ordinal,
1465 protocol_name:
1466 <ControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1467 }),
1468 }
1469 }
1470}
1471
1472pub struct ControllerRequestStream {
1474 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1475 is_terminated: bool,
1476}
1477
1478impl std::marker::Unpin for ControllerRequestStream {}
1479
1480impl futures::stream::FusedStream for ControllerRequestStream {
1481 fn is_terminated(&self) -> bool {
1482 self.is_terminated
1483 }
1484}
1485
1486impl fdomain_client::fidl::RequestStream for ControllerRequestStream {
1487 type Protocol = ControllerMarker;
1488 type ControlHandle = ControllerControlHandle;
1489
1490 fn from_channel(channel: fdomain_client::Channel) -> Self {
1491 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1492 }
1493
1494 fn control_handle(&self) -> Self::ControlHandle {
1495 ControllerControlHandle { inner: self.inner.clone() }
1496 }
1497
1498 fn into_inner(
1499 self,
1500 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
1501 {
1502 (self.inner, self.is_terminated)
1503 }
1504
1505 fn from_inner(
1506 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1507 is_terminated: bool,
1508 ) -> Self {
1509 Self { inner, is_terminated }
1510 }
1511}
1512
1513impl futures::Stream for ControllerRequestStream {
1514 type Item = Result<ControllerRequest, fidl::Error>;
1515
1516 fn poll_next(
1517 mut self: std::pin::Pin<&mut Self>,
1518 cx: &mut std::task::Context<'_>,
1519 ) -> std::task::Poll<Option<Self::Item>> {
1520 let this = &mut *self;
1521 if this.inner.check_shutdown(cx) {
1522 this.is_terminated = true;
1523 return std::task::Poll::Ready(None);
1524 }
1525 if this.is_terminated {
1526 panic!("polled ControllerRequestStream after completion");
1527 }
1528 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
1529 |bytes, handles| {
1530 match this.inner.channel().read_etc(cx, bytes, handles) {
1531 std::task::Poll::Ready(Ok(())) => {}
1532 std::task::Poll::Pending => return std::task::Poll::Pending,
1533 std::task::Poll::Ready(Err(None)) => {
1534 this.is_terminated = true;
1535 return std::task::Poll::Ready(None);
1536 }
1537 std::task::Poll::Ready(Err(Some(e))) => {
1538 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1539 e.into(),
1540 ))));
1541 }
1542 }
1543
1544 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1546
1547 std::task::Poll::Ready(Some(match header.ordinal {
1548 0x68878076b8d2eac5 => {
1549 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1550 let mut req = fidl::new_empty!(
1551 ControllerStartRequest,
1552 fdomain_client::fidl::FDomainResourceDialect
1553 );
1554 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ControllerStartRequest>(&header, _body_bytes, handles, &mut req)?;
1555 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1556 Ok(ControllerRequest::Start {
1557 args: req.args,
1558 execution_controller: req.execution_controller,
1559
1560 responder: ControllerStartResponder {
1561 control_handle: std::mem::ManuallyDrop::new(control_handle),
1562 tx_id: header.tx_id,
1563 },
1564 })
1565 }
1566 0x2155e6e1db2083c3 => {
1567 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1568 let mut req = fidl::new_empty!(
1569 fidl::encoding::EmptyPayload,
1570 fdomain_client::fidl::FDomainResourceDialect
1571 );
1572 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1573 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1574 Ok(ControllerRequest::IsStarted {
1575 responder: ControllerIsStartedResponder {
1576 control_handle: std::mem::ManuallyDrop::new(control_handle),
1577 tx_id: header.tx_id,
1578 },
1579 })
1580 }
1581 0x253cabb9a840ed94 => {
1582 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1583 let mut req = fidl::new_empty!(
1584 ControllerOpenExposedDirRequest,
1585 fdomain_client::fidl::FDomainResourceDialect
1586 );
1587 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ControllerOpenExposedDirRequest>(&header, _body_bytes, handles, &mut req)?;
1588 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1589 Ok(ControllerRequest::OpenExposedDir {
1590 exposed_dir: req.exposed_dir,
1591
1592 responder: ControllerOpenExposedDirResponder {
1593 control_handle: std::mem::ManuallyDrop::new(control_handle),
1594 tx_id: header.tx_id,
1595 },
1596 })
1597 }
1598 0x7e48373e5eda1f9b => {
1599 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1600 let mut req = fidl::new_empty!(
1601 fidl::encoding::EmptyPayload,
1602 fdomain_client::fidl::FDomainResourceDialect
1603 );
1604 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1605 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1606 Ok(ControllerRequest::GetExposedDictionary {
1607 responder: ControllerGetExposedDictionaryResponder {
1608 control_handle: std::mem::ManuallyDrop::new(control_handle),
1609 tx_id: header.tx_id,
1610 },
1611 })
1612 }
1613 0x3a0c4696620ad221 => {
1614 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1615 let mut req = fidl::new_empty!(
1616 fidl::encoding::EmptyPayload,
1617 fdomain_client::fidl::FDomainResourceDialect
1618 );
1619 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1620 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1621 Ok(ControllerRequest::GetOutputDictionary {
1622 responder: ControllerGetOutputDictionaryResponder {
1623 control_handle: std::mem::ManuallyDrop::new(control_handle),
1624 tx_id: header.tx_id,
1625 },
1626 })
1627 }
1628 0x74529fa68b5c1741 => {
1629 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1630 let mut req = fidl::new_empty!(
1631 fidl::encoding::EmptyPayload,
1632 fdomain_client::fidl::FDomainResourceDialect
1633 );
1634 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1635 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1636 Ok(ControllerRequest::Destroy {
1637 responder: ControllerDestroyResponder {
1638 control_handle: std::mem::ManuallyDrop::new(control_handle),
1639 tx_id: header.tx_id,
1640 },
1641 })
1642 }
1643 _ if header.tx_id == 0
1644 && header
1645 .dynamic_flags()
1646 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
1647 {
1648 Ok(ControllerRequest::_UnknownMethod {
1649 ordinal: header.ordinal,
1650 control_handle: ControllerControlHandle { inner: this.inner.clone() },
1651 method_type: fidl::MethodType::OneWay,
1652 })
1653 }
1654 _ if header
1655 .dynamic_flags()
1656 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
1657 {
1658 this.inner.send_framework_err(
1659 fidl::encoding::FrameworkErr::UnknownMethod,
1660 header.tx_id,
1661 header.ordinal,
1662 header.dynamic_flags(),
1663 (bytes, handles),
1664 )?;
1665 Ok(ControllerRequest::_UnknownMethod {
1666 ordinal: header.ordinal,
1667 control_handle: ControllerControlHandle { inner: this.inner.clone() },
1668 method_type: fidl::MethodType::TwoWay,
1669 })
1670 }
1671 _ => Err(fidl::Error::UnknownOrdinal {
1672 ordinal: header.ordinal,
1673 protocol_name:
1674 <ControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
1675 }),
1676 }))
1677 },
1678 )
1679 }
1680}
1681
1682#[derive(Debug)]
1688pub enum ControllerRequest {
1689 Start {
1693 args: StartChildArgs,
1694 execution_controller: fdomain_client::fidl::ServerEnd<ExecutionControllerMarker>,
1695 responder: ControllerStartResponder,
1696 },
1697 IsStarted { responder: ControllerIsStartedResponder },
1699 OpenExposedDir {
1713 exposed_dir: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
1714 responder: ControllerOpenExposedDirResponder,
1715 },
1716 GetExposedDictionary { responder: ControllerGetExposedDictionaryResponder },
1718 GetOutputDictionary { responder: ControllerGetOutputDictionaryResponder },
1721 Destroy { responder: ControllerDestroyResponder },
1732 #[non_exhaustive]
1734 _UnknownMethod {
1735 ordinal: u64,
1737 control_handle: ControllerControlHandle,
1738 method_type: fidl::MethodType,
1739 },
1740}
1741
1742impl ControllerRequest {
1743 #[allow(irrefutable_let_patterns)]
1744 pub fn into_start(
1745 self,
1746 ) -> Option<(
1747 StartChildArgs,
1748 fdomain_client::fidl::ServerEnd<ExecutionControllerMarker>,
1749 ControllerStartResponder,
1750 )> {
1751 if let ControllerRequest::Start { args, execution_controller, responder } = self {
1752 Some((args, execution_controller, responder))
1753 } else {
1754 None
1755 }
1756 }
1757
1758 #[allow(irrefutable_let_patterns)]
1759 pub fn into_is_started(self) -> Option<(ControllerIsStartedResponder)> {
1760 if let ControllerRequest::IsStarted { responder } = self { Some((responder)) } else { None }
1761 }
1762
1763 #[allow(irrefutable_let_patterns)]
1764 pub fn into_open_exposed_dir(
1765 self,
1766 ) -> Option<(
1767 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
1768 ControllerOpenExposedDirResponder,
1769 )> {
1770 if let ControllerRequest::OpenExposedDir { exposed_dir, responder } = self {
1771 Some((exposed_dir, responder))
1772 } else {
1773 None
1774 }
1775 }
1776
1777 #[allow(irrefutable_let_patterns)]
1778 pub fn into_get_exposed_dictionary(self) -> Option<(ControllerGetExposedDictionaryResponder)> {
1779 if let ControllerRequest::GetExposedDictionary { responder } = self {
1780 Some((responder))
1781 } else {
1782 None
1783 }
1784 }
1785
1786 #[allow(irrefutable_let_patterns)]
1787 pub fn into_get_output_dictionary(self) -> Option<(ControllerGetOutputDictionaryResponder)> {
1788 if let ControllerRequest::GetOutputDictionary { responder } = self {
1789 Some((responder))
1790 } else {
1791 None
1792 }
1793 }
1794
1795 #[allow(irrefutable_let_patterns)]
1796 pub fn into_destroy(self) -> Option<(ControllerDestroyResponder)> {
1797 if let ControllerRequest::Destroy { responder } = self { Some((responder)) } else { None }
1798 }
1799
1800 pub fn method_name(&self) -> &'static str {
1802 match *self {
1803 ControllerRequest::Start { .. } => "start",
1804 ControllerRequest::IsStarted { .. } => "is_started",
1805 ControllerRequest::OpenExposedDir { .. } => "open_exposed_dir",
1806 ControllerRequest::GetExposedDictionary { .. } => "get_exposed_dictionary",
1807 ControllerRequest::GetOutputDictionary { .. } => "get_output_dictionary",
1808 ControllerRequest::Destroy { .. } => "destroy",
1809 ControllerRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
1810 "unknown one-way method"
1811 }
1812 ControllerRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
1813 "unknown two-way method"
1814 }
1815 }
1816 }
1817}
1818
1819#[derive(Debug, Clone)]
1820pub struct ControllerControlHandle {
1821 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
1822}
1823
1824impl ControllerControlHandle {
1825 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
1826 self.inner.shutdown_with_epitaph(status.into())
1827 }
1828}
1829
1830impl fdomain_client::fidl::ControlHandle for ControllerControlHandle {
1831 fn shutdown(&self) {
1832 self.inner.shutdown()
1833 }
1834
1835 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
1836 self.inner.shutdown_with_epitaph(status)
1837 }
1838
1839 fn is_closed(&self) -> bool {
1840 self.inner.channel().is_closed()
1841 }
1842 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
1843 self.inner.channel().on_closed()
1844 }
1845}
1846
1847impl ControllerControlHandle {}
1848
1849#[must_use = "FIDL methods require a response to be sent"]
1850#[derive(Debug)]
1851pub struct ControllerStartResponder {
1852 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
1853 tx_id: u32,
1854}
1855
1856impl std::ops::Drop for ControllerStartResponder {
1860 fn drop(&mut self) {
1861 self.control_handle.shutdown();
1862 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1864 }
1865}
1866
1867impl fdomain_client::fidl::Responder for ControllerStartResponder {
1868 type ControlHandle = ControllerControlHandle;
1869
1870 fn control_handle(&self) -> &ControllerControlHandle {
1871 &self.control_handle
1872 }
1873
1874 fn drop_without_shutdown(mut self) {
1875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1877 std::mem::forget(self);
1879 }
1880}
1881
1882impl ControllerStartResponder {
1883 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
1887 let _result = self.send_raw(result);
1888 if _result.is_err() {
1889 self.control_handle.shutdown();
1890 }
1891 self.drop_without_shutdown();
1892 _result
1893 }
1894
1895 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
1897 let _result = self.send_raw(result);
1898 self.drop_without_shutdown();
1899 _result
1900 }
1901
1902 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
1903 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
1904 fidl::encoding::EmptyStruct,
1905 Error,
1906 >>(
1907 fidl::encoding::FlexibleResult::new(result),
1908 self.tx_id,
1909 0x68878076b8d2eac5,
1910 fidl::encoding::DynamicFlags::FLEXIBLE,
1911 )
1912 }
1913}
1914
1915#[must_use = "FIDL methods require a response to be sent"]
1916#[derive(Debug)]
1917pub struct ControllerIsStartedResponder {
1918 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
1919 tx_id: u32,
1920}
1921
1922impl std::ops::Drop for ControllerIsStartedResponder {
1926 fn drop(&mut self) {
1927 self.control_handle.shutdown();
1928 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1930 }
1931}
1932
1933impl fdomain_client::fidl::Responder for ControllerIsStartedResponder {
1934 type ControlHandle = ControllerControlHandle;
1935
1936 fn control_handle(&self) -> &ControllerControlHandle {
1937 &self.control_handle
1938 }
1939
1940 fn drop_without_shutdown(mut self) {
1941 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1943 std::mem::forget(self);
1945 }
1946}
1947
1948impl ControllerIsStartedResponder {
1949 pub fn send(self, mut result: Result<bool, Error>) -> Result<(), fidl::Error> {
1953 let _result = self.send_raw(result);
1954 if _result.is_err() {
1955 self.control_handle.shutdown();
1956 }
1957 self.drop_without_shutdown();
1958 _result
1959 }
1960
1961 pub fn send_no_shutdown_on_err(
1963 self,
1964 mut result: Result<bool, Error>,
1965 ) -> Result<(), fidl::Error> {
1966 let _result = self.send_raw(result);
1967 self.drop_without_shutdown();
1968 _result
1969 }
1970
1971 fn send_raw(&self, mut result: Result<bool, Error>) -> Result<(), fidl::Error> {
1972 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
1973 ControllerIsStartedResponse,
1974 Error,
1975 >>(
1976 fidl::encoding::FlexibleResult::new(result.map(|is_started| (is_started,))),
1977 self.tx_id,
1978 0x2155e6e1db2083c3,
1979 fidl::encoding::DynamicFlags::FLEXIBLE,
1980 )
1981 }
1982}
1983
1984#[must_use = "FIDL methods require a response to be sent"]
1985#[derive(Debug)]
1986pub struct ControllerOpenExposedDirResponder {
1987 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
1988 tx_id: u32,
1989}
1990
1991impl std::ops::Drop for ControllerOpenExposedDirResponder {
1995 fn drop(&mut self) {
1996 self.control_handle.shutdown();
1997 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1999 }
2000}
2001
2002impl fdomain_client::fidl::Responder for ControllerOpenExposedDirResponder {
2003 type ControlHandle = ControllerControlHandle;
2004
2005 fn control_handle(&self) -> &ControllerControlHandle {
2006 &self.control_handle
2007 }
2008
2009 fn drop_without_shutdown(mut self) {
2010 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2012 std::mem::forget(self);
2014 }
2015}
2016
2017impl ControllerOpenExposedDirResponder {
2018 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2022 let _result = self.send_raw(result);
2023 if _result.is_err() {
2024 self.control_handle.shutdown();
2025 }
2026 self.drop_without_shutdown();
2027 _result
2028 }
2029
2030 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2032 let _result = self.send_raw(result);
2033 self.drop_without_shutdown();
2034 _result
2035 }
2036
2037 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2038 self.control_handle
2039 .inner
2040 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2041 result,
2042 self.tx_id,
2043 0x253cabb9a840ed94,
2044 fidl::encoding::DynamicFlags::empty(),
2045 )
2046 }
2047}
2048
2049#[must_use = "FIDL methods require a response to be sent"]
2050#[derive(Debug)]
2051pub struct ControllerGetExposedDictionaryResponder {
2052 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2053 tx_id: u32,
2054}
2055
2056impl std::ops::Drop for ControllerGetExposedDictionaryResponder {
2060 fn drop(&mut self) {
2061 self.control_handle.shutdown();
2062 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2064 }
2065}
2066
2067impl fdomain_client::fidl::Responder for ControllerGetExposedDictionaryResponder {
2068 type ControlHandle = ControllerControlHandle;
2069
2070 fn control_handle(&self) -> &ControllerControlHandle {
2071 &self.control_handle
2072 }
2073
2074 fn drop_without_shutdown(mut self) {
2075 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2077 std::mem::forget(self);
2079 }
2080}
2081
2082impl ControllerGetExposedDictionaryResponder {
2083 pub fn send(
2087 self,
2088 mut result: Result<fdomain_fuchsia_component_sandbox::DictionaryRef, Error>,
2089 ) -> Result<(), fidl::Error> {
2090 let _result = self.send_raw(result);
2091 if _result.is_err() {
2092 self.control_handle.shutdown();
2093 }
2094 self.drop_without_shutdown();
2095 _result
2096 }
2097
2098 pub fn send_no_shutdown_on_err(
2100 self,
2101 mut result: Result<fdomain_fuchsia_component_sandbox::DictionaryRef, Error>,
2102 ) -> Result<(), fidl::Error> {
2103 let _result = self.send_raw(result);
2104 self.drop_without_shutdown();
2105 _result
2106 }
2107
2108 fn send_raw(
2109 &self,
2110 mut result: Result<fdomain_fuchsia_component_sandbox::DictionaryRef, Error>,
2111 ) -> Result<(), fidl::Error> {
2112 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2113 ControllerGetExposedDictionaryResponse,
2114 Error,
2115 >>(
2116 fidl::encoding::FlexibleResult::new(
2117 result.as_mut().map_err(|e| *e).map(|dictionary| (dictionary,)),
2118 ),
2119 self.tx_id,
2120 0x7e48373e5eda1f9b,
2121 fidl::encoding::DynamicFlags::FLEXIBLE,
2122 )
2123 }
2124}
2125
2126#[must_use = "FIDL methods require a response to be sent"]
2127#[derive(Debug)]
2128pub struct ControllerGetOutputDictionaryResponder {
2129 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2130 tx_id: u32,
2131}
2132
2133impl std::ops::Drop for ControllerGetOutputDictionaryResponder {
2137 fn drop(&mut self) {
2138 self.control_handle.shutdown();
2139 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2141 }
2142}
2143
2144impl fdomain_client::fidl::Responder for ControllerGetOutputDictionaryResponder {
2145 type ControlHandle = ControllerControlHandle;
2146
2147 fn control_handle(&self) -> &ControllerControlHandle {
2148 &self.control_handle
2149 }
2150
2151 fn drop_without_shutdown(mut self) {
2152 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2154 std::mem::forget(self);
2156 }
2157}
2158
2159impl ControllerGetOutputDictionaryResponder {
2160 pub fn send(
2164 self,
2165 mut result: Result<fdomain_client::EventPair, Error>,
2166 ) -> Result<(), fidl::Error> {
2167 let _result = self.send_raw(result);
2168 if _result.is_err() {
2169 self.control_handle.shutdown();
2170 }
2171 self.drop_without_shutdown();
2172 _result
2173 }
2174
2175 pub fn send_no_shutdown_on_err(
2177 self,
2178 mut result: Result<fdomain_client::EventPair, Error>,
2179 ) -> Result<(), fidl::Error> {
2180 let _result = self.send_raw(result);
2181 self.drop_without_shutdown();
2182 _result
2183 }
2184
2185 fn send_raw(
2186 &self,
2187 mut result: Result<fdomain_client::EventPair, Error>,
2188 ) -> Result<(), fidl::Error> {
2189 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2190 ControllerGetOutputDictionaryResponse,
2191 Error,
2192 >>(
2193 fidl::encoding::FlexibleResult::new(result.map(|dictionary| (dictionary,))),
2194 self.tx_id,
2195 0x3a0c4696620ad221,
2196 fidl::encoding::DynamicFlags::FLEXIBLE,
2197 )
2198 }
2199}
2200
2201#[must_use = "FIDL methods require a response to be sent"]
2202#[derive(Debug)]
2203pub struct ControllerDestroyResponder {
2204 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2205 tx_id: u32,
2206}
2207
2208impl std::ops::Drop for ControllerDestroyResponder {
2212 fn drop(&mut self) {
2213 self.control_handle.shutdown();
2214 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2216 }
2217}
2218
2219impl fdomain_client::fidl::Responder for ControllerDestroyResponder {
2220 type ControlHandle = ControllerControlHandle;
2221
2222 fn control_handle(&self) -> &ControllerControlHandle {
2223 &self.control_handle
2224 }
2225
2226 fn drop_without_shutdown(mut self) {
2227 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2229 std::mem::forget(self);
2231 }
2232}
2233
2234impl ControllerDestroyResponder {
2235 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2239 let _result = self.send_raw(result);
2240 if _result.is_err() {
2241 self.control_handle.shutdown();
2242 }
2243 self.drop_without_shutdown();
2244 _result
2245 }
2246
2247 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2249 let _result = self.send_raw(result);
2250 self.drop_without_shutdown();
2251 _result
2252 }
2253
2254 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2255 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2256 fidl::encoding::EmptyStruct,
2257 Error,
2258 >>(
2259 fidl::encoding::FlexibleResult::new(result),
2260 self.tx_id,
2261 0x74529fa68b5c1741,
2262 fidl::encoding::DynamicFlags::FLEXIBLE,
2263 )
2264 }
2265}
2266
2267#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2268pub struct EventStreamMarker;
2269
2270impl fdomain_client::fidl::ProtocolMarker for EventStreamMarker {
2271 type Proxy = EventStreamProxy;
2272 type RequestStream = EventStreamRequestStream;
2273
2274 const DEBUG_NAME: &'static str = "fuchsia.component.EventStream";
2275}
2276impl fdomain_client::fidl::DiscoverableProtocolMarker for EventStreamMarker {}
2277
2278pub trait EventStreamProxyInterface: Send + Sync {
2279 type GetNextResponseFut: std::future::Future<Output = Result<Vec<Event>, fidl::Error>> + Send;
2280 fn r#get_next(&self) -> Self::GetNextResponseFut;
2281 type WaitForReadyResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
2282 fn r#wait_for_ready(&self) -> Self::WaitForReadyResponseFut;
2283}
2284
2285#[derive(Debug, Clone)]
2286pub struct EventStreamProxy {
2287 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
2288}
2289
2290impl fdomain_client::fidl::Proxy for EventStreamProxy {
2291 type Protocol = EventStreamMarker;
2292
2293 fn from_channel(inner: fdomain_client::Channel) -> Self {
2294 Self::new(inner)
2295 }
2296
2297 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
2298 self.client.into_channel().map_err(|client| Self { client })
2299 }
2300
2301 fn as_channel(&self) -> &fdomain_client::Channel {
2302 self.client.as_channel()
2303 }
2304}
2305
2306impl EventStreamProxy {
2307 pub fn new(channel: fdomain_client::Channel) -> Self {
2309 let protocol_name = <EventStreamMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
2310 Self { client: fidl::client::Client::new(channel, protocol_name) }
2311 }
2312
2313 pub fn take_event_stream(&self) -> EventStreamEventStream {
2319 EventStreamEventStream { event_receiver: self.client.take_event_receiver() }
2320 }
2321
2322 pub fn r#get_next(
2323 &self,
2324 ) -> fidl::client::QueryResponseFut<Vec<Event>, fdomain_client::fidl::FDomainResourceDialect>
2325 {
2326 EventStreamProxyInterface::r#get_next(self)
2327 }
2328
2329 pub fn r#wait_for_ready(
2333 &self,
2334 ) -> fidl::client::QueryResponseFut<(), fdomain_client::fidl::FDomainResourceDialect> {
2335 EventStreamProxyInterface::r#wait_for_ready(self)
2336 }
2337}
2338
2339impl EventStreamProxyInterface for EventStreamProxy {
2340 type GetNextResponseFut =
2341 fidl::client::QueryResponseFut<Vec<Event>, fdomain_client::fidl::FDomainResourceDialect>;
2342 fn r#get_next(&self) -> Self::GetNextResponseFut {
2343 fn _decode(
2344 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2345 ) -> Result<Vec<Event>, fidl::Error> {
2346 let _response = fidl::client::decode_transaction_body::<
2347 EventStreamGetNextResponse,
2348 fdomain_client::fidl::FDomainResourceDialect,
2349 0x3f24c9495978eb86,
2350 >(_buf?)?;
2351 Ok(_response.events)
2352 }
2353 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<Event>>(
2354 (),
2355 0x3f24c9495978eb86,
2356 fidl::encoding::DynamicFlags::empty(),
2357 _decode,
2358 )
2359 }
2360
2361 type WaitForReadyResponseFut =
2362 fidl::client::QueryResponseFut<(), fdomain_client::fidl::FDomainResourceDialect>;
2363 fn r#wait_for_ready(&self) -> Self::WaitForReadyResponseFut {
2364 fn _decode(
2365 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2366 ) -> Result<(), fidl::Error> {
2367 let _response = fidl::client::decode_transaction_body::<
2368 fidl::encoding::EmptyPayload,
2369 fdomain_client::fidl::FDomainResourceDialect,
2370 0x31331f9578d2e682,
2371 >(_buf?)?;
2372 Ok(_response)
2373 }
2374 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
2375 (),
2376 0x31331f9578d2e682,
2377 fidl::encoding::DynamicFlags::empty(),
2378 _decode,
2379 )
2380 }
2381}
2382
2383pub struct EventStreamEventStream {
2384 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
2385}
2386
2387impl std::marker::Unpin for EventStreamEventStream {}
2388
2389impl futures::stream::FusedStream for EventStreamEventStream {
2390 fn is_terminated(&self) -> bool {
2391 self.event_receiver.is_terminated()
2392 }
2393}
2394
2395impl futures::Stream for EventStreamEventStream {
2396 type Item = Result<EventStreamEvent, fidl::Error>;
2397
2398 fn poll_next(
2399 mut self: std::pin::Pin<&mut Self>,
2400 cx: &mut std::task::Context<'_>,
2401 ) -> std::task::Poll<Option<Self::Item>> {
2402 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2403 &mut self.event_receiver,
2404 cx
2405 )?) {
2406 Some(buf) => std::task::Poll::Ready(Some(EventStreamEvent::decode(buf))),
2407 None => std::task::Poll::Ready(None),
2408 }
2409 }
2410}
2411
2412#[derive(Debug)]
2413pub enum EventStreamEvent {}
2414
2415impl EventStreamEvent {
2416 fn decode(
2418 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2419 ) -> Result<EventStreamEvent, fidl::Error> {
2420 let (bytes, _handles) = buf.split_mut();
2421 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2422 debug_assert_eq!(tx_header.tx_id, 0);
2423 match tx_header.ordinal {
2424 _ => Err(fidl::Error::UnknownOrdinal {
2425 ordinal: tx_header.ordinal,
2426 protocol_name:
2427 <EventStreamMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2428 }),
2429 }
2430 }
2431}
2432
2433pub struct EventStreamRequestStream {
2435 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2436 is_terminated: bool,
2437}
2438
2439impl std::marker::Unpin for EventStreamRequestStream {}
2440
2441impl futures::stream::FusedStream for EventStreamRequestStream {
2442 fn is_terminated(&self) -> bool {
2443 self.is_terminated
2444 }
2445}
2446
2447impl fdomain_client::fidl::RequestStream for EventStreamRequestStream {
2448 type Protocol = EventStreamMarker;
2449 type ControlHandle = EventStreamControlHandle;
2450
2451 fn from_channel(channel: fdomain_client::Channel) -> Self {
2452 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2453 }
2454
2455 fn control_handle(&self) -> Self::ControlHandle {
2456 EventStreamControlHandle { inner: self.inner.clone() }
2457 }
2458
2459 fn into_inner(
2460 self,
2461 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
2462 {
2463 (self.inner, self.is_terminated)
2464 }
2465
2466 fn from_inner(
2467 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2468 is_terminated: bool,
2469 ) -> Self {
2470 Self { inner, is_terminated }
2471 }
2472}
2473
2474impl futures::Stream for EventStreamRequestStream {
2475 type Item = Result<EventStreamRequest, fidl::Error>;
2476
2477 fn poll_next(
2478 mut self: std::pin::Pin<&mut Self>,
2479 cx: &mut std::task::Context<'_>,
2480 ) -> std::task::Poll<Option<Self::Item>> {
2481 let this = &mut *self;
2482 if this.inner.check_shutdown(cx) {
2483 this.is_terminated = true;
2484 return std::task::Poll::Ready(None);
2485 }
2486 if this.is_terminated {
2487 panic!("polled EventStreamRequestStream after completion");
2488 }
2489 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
2490 |bytes, handles| {
2491 match this.inner.channel().read_etc(cx, bytes, handles) {
2492 std::task::Poll::Ready(Ok(())) => {}
2493 std::task::Poll::Pending => return std::task::Poll::Pending,
2494 std::task::Poll::Ready(Err(None)) => {
2495 this.is_terminated = true;
2496 return std::task::Poll::Ready(None);
2497 }
2498 std::task::Poll::Ready(Err(Some(e))) => {
2499 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2500 e.into(),
2501 ))));
2502 }
2503 }
2504
2505 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2507
2508 std::task::Poll::Ready(Some(match header.ordinal {
2509 0x3f24c9495978eb86 => {
2510 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2511 let mut req = fidl::new_empty!(
2512 fidl::encoding::EmptyPayload,
2513 fdomain_client::fidl::FDomainResourceDialect
2514 );
2515 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2516 let control_handle = EventStreamControlHandle { inner: this.inner.clone() };
2517 Ok(EventStreamRequest::GetNext {
2518 responder: EventStreamGetNextResponder {
2519 control_handle: std::mem::ManuallyDrop::new(control_handle),
2520 tx_id: header.tx_id,
2521 },
2522 })
2523 }
2524 0x31331f9578d2e682 => {
2525 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2526 let mut req = fidl::new_empty!(
2527 fidl::encoding::EmptyPayload,
2528 fdomain_client::fidl::FDomainResourceDialect
2529 );
2530 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2531 let control_handle = EventStreamControlHandle { inner: this.inner.clone() };
2532 Ok(EventStreamRequest::WaitForReady {
2533 responder: EventStreamWaitForReadyResponder {
2534 control_handle: std::mem::ManuallyDrop::new(control_handle),
2535 tx_id: header.tx_id,
2536 },
2537 })
2538 }
2539 _ => Err(fidl::Error::UnknownOrdinal {
2540 ordinal: header.ordinal,
2541 protocol_name:
2542 <EventStreamMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2543 }),
2544 }))
2545 },
2546 )
2547 }
2548}
2549
2550#[derive(Debug)]
2553pub enum EventStreamRequest {
2554 GetNext {
2555 responder: EventStreamGetNextResponder,
2556 },
2557 WaitForReady {
2561 responder: EventStreamWaitForReadyResponder,
2562 },
2563}
2564
2565impl EventStreamRequest {
2566 #[allow(irrefutable_let_patterns)]
2567 pub fn into_get_next(self) -> Option<(EventStreamGetNextResponder)> {
2568 if let EventStreamRequest::GetNext { responder } = self { Some((responder)) } else { None }
2569 }
2570
2571 #[allow(irrefutable_let_patterns)]
2572 pub fn into_wait_for_ready(self) -> Option<(EventStreamWaitForReadyResponder)> {
2573 if let EventStreamRequest::WaitForReady { responder } = self {
2574 Some((responder))
2575 } else {
2576 None
2577 }
2578 }
2579
2580 pub fn method_name(&self) -> &'static str {
2582 match *self {
2583 EventStreamRequest::GetNext { .. } => "get_next",
2584 EventStreamRequest::WaitForReady { .. } => "wait_for_ready",
2585 }
2586 }
2587}
2588
2589#[derive(Debug, Clone)]
2590pub struct EventStreamControlHandle {
2591 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2592}
2593
2594impl EventStreamControlHandle {
2595 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
2596 self.inner.shutdown_with_epitaph(status.into())
2597 }
2598}
2599
2600impl fdomain_client::fidl::ControlHandle for EventStreamControlHandle {
2601 fn shutdown(&self) {
2602 self.inner.shutdown()
2603 }
2604
2605 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
2606 self.inner.shutdown_with_epitaph(status)
2607 }
2608
2609 fn is_closed(&self) -> bool {
2610 self.inner.channel().is_closed()
2611 }
2612 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
2613 self.inner.channel().on_closed()
2614 }
2615}
2616
2617impl EventStreamControlHandle {}
2618
2619#[must_use = "FIDL methods require a response to be sent"]
2620#[derive(Debug)]
2621pub struct EventStreamGetNextResponder {
2622 control_handle: std::mem::ManuallyDrop<EventStreamControlHandle>,
2623 tx_id: u32,
2624}
2625
2626impl std::ops::Drop for EventStreamGetNextResponder {
2630 fn drop(&mut self) {
2631 self.control_handle.shutdown();
2632 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2634 }
2635}
2636
2637impl fdomain_client::fidl::Responder for EventStreamGetNextResponder {
2638 type ControlHandle = EventStreamControlHandle;
2639
2640 fn control_handle(&self) -> &EventStreamControlHandle {
2641 &self.control_handle
2642 }
2643
2644 fn drop_without_shutdown(mut self) {
2645 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2647 std::mem::forget(self);
2649 }
2650}
2651
2652impl EventStreamGetNextResponder {
2653 pub fn send(self, mut events: Vec<Event>) -> Result<(), fidl::Error> {
2657 let _result = self.send_raw(events);
2658 if _result.is_err() {
2659 self.control_handle.shutdown();
2660 }
2661 self.drop_without_shutdown();
2662 _result
2663 }
2664
2665 pub fn send_no_shutdown_on_err(self, mut events: Vec<Event>) -> Result<(), fidl::Error> {
2667 let _result = self.send_raw(events);
2668 self.drop_without_shutdown();
2669 _result
2670 }
2671
2672 fn send_raw(&self, mut events: Vec<Event>) -> Result<(), fidl::Error> {
2673 self.control_handle.inner.send::<EventStreamGetNextResponse>(
2674 (events.as_mut(),),
2675 self.tx_id,
2676 0x3f24c9495978eb86,
2677 fidl::encoding::DynamicFlags::empty(),
2678 )
2679 }
2680}
2681
2682#[must_use = "FIDL methods require a response to be sent"]
2683#[derive(Debug)]
2684pub struct EventStreamWaitForReadyResponder {
2685 control_handle: std::mem::ManuallyDrop<EventStreamControlHandle>,
2686 tx_id: u32,
2687}
2688
2689impl std::ops::Drop for EventStreamWaitForReadyResponder {
2693 fn drop(&mut self) {
2694 self.control_handle.shutdown();
2695 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2697 }
2698}
2699
2700impl fdomain_client::fidl::Responder for EventStreamWaitForReadyResponder {
2701 type ControlHandle = EventStreamControlHandle;
2702
2703 fn control_handle(&self) -> &EventStreamControlHandle {
2704 &self.control_handle
2705 }
2706
2707 fn drop_without_shutdown(mut self) {
2708 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2710 std::mem::forget(self);
2712 }
2713}
2714
2715impl EventStreamWaitForReadyResponder {
2716 pub fn send(self) -> Result<(), fidl::Error> {
2720 let _result = self.send_raw();
2721 if _result.is_err() {
2722 self.control_handle.shutdown();
2723 }
2724 self.drop_without_shutdown();
2725 _result
2726 }
2727
2728 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2730 let _result = self.send_raw();
2731 self.drop_without_shutdown();
2732 _result
2733 }
2734
2735 fn send_raw(&self) -> Result<(), fidl::Error> {
2736 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2737 (),
2738 self.tx_id,
2739 0x31331f9578d2e682,
2740 fidl::encoding::DynamicFlags::empty(),
2741 )
2742 }
2743}
2744
2745#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2746pub struct ExecutionControllerMarker;
2747
2748impl fdomain_client::fidl::ProtocolMarker for ExecutionControllerMarker {
2749 type Proxy = ExecutionControllerProxy;
2750 type RequestStream = ExecutionControllerRequestStream;
2751
2752 const DEBUG_NAME: &'static str = "(anonymous) ExecutionController";
2753}
2754
2755pub trait ExecutionControllerProxyInterface: Send + Sync {
2756 fn r#stop(&self) -> Result<(), fidl::Error>;
2757}
2758
2759#[derive(Debug, Clone)]
2760pub struct ExecutionControllerProxy {
2761 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
2762}
2763
2764impl fdomain_client::fidl::Proxy for ExecutionControllerProxy {
2765 type Protocol = ExecutionControllerMarker;
2766
2767 fn from_channel(inner: fdomain_client::Channel) -> Self {
2768 Self::new(inner)
2769 }
2770
2771 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
2772 self.client.into_channel().map_err(|client| Self { client })
2773 }
2774
2775 fn as_channel(&self) -> &fdomain_client::Channel {
2776 self.client.as_channel()
2777 }
2778}
2779
2780impl ExecutionControllerProxy {
2781 pub fn new(channel: fdomain_client::Channel) -> Self {
2783 let protocol_name =
2784 <ExecutionControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
2785 Self { client: fidl::client::Client::new(channel, protocol_name) }
2786 }
2787
2788 pub fn take_event_stream(&self) -> ExecutionControllerEventStream {
2794 ExecutionControllerEventStream { event_receiver: self.client.take_event_receiver() }
2795 }
2796
2797 pub fn r#stop(&self) -> Result<(), fidl::Error> {
2803 ExecutionControllerProxyInterface::r#stop(self)
2804 }
2805}
2806
2807impl ExecutionControllerProxyInterface for ExecutionControllerProxy {
2808 fn r#stop(&self) -> Result<(), fidl::Error> {
2809 self.client.send::<fidl::encoding::EmptyPayload>(
2810 (),
2811 0x56d23cec21036117,
2812 fidl::encoding::DynamicFlags::FLEXIBLE,
2813 )
2814 }
2815}
2816
2817pub struct ExecutionControllerEventStream {
2818 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
2819}
2820
2821impl std::marker::Unpin for ExecutionControllerEventStream {}
2822
2823impl futures::stream::FusedStream for ExecutionControllerEventStream {
2824 fn is_terminated(&self) -> bool {
2825 self.event_receiver.is_terminated()
2826 }
2827}
2828
2829impl futures::Stream for ExecutionControllerEventStream {
2830 type Item = Result<ExecutionControllerEvent, fidl::Error>;
2831
2832 fn poll_next(
2833 mut self: std::pin::Pin<&mut Self>,
2834 cx: &mut std::task::Context<'_>,
2835 ) -> std::task::Poll<Option<Self::Item>> {
2836 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2837 &mut self.event_receiver,
2838 cx
2839 )?) {
2840 Some(buf) => std::task::Poll::Ready(Some(ExecutionControllerEvent::decode(buf))),
2841 None => std::task::Poll::Ready(None),
2842 }
2843 }
2844}
2845
2846#[derive(Debug)]
2847pub enum ExecutionControllerEvent {
2848 OnStop {
2849 stopped_payload: StoppedPayload,
2850 },
2851 #[non_exhaustive]
2852 _UnknownEvent {
2853 ordinal: u64,
2855 },
2856}
2857
2858impl ExecutionControllerEvent {
2859 #[allow(irrefutable_let_patterns)]
2860 pub fn into_on_stop(self) -> Option<StoppedPayload> {
2861 if let ExecutionControllerEvent::OnStop { stopped_payload } = self {
2862 Some((stopped_payload))
2863 } else {
2864 None
2865 }
2866 }
2867
2868 fn decode(
2870 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2871 ) -> Result<ExecutionControllerEvent, fidl::Error> {
2872 let (bytes, _handles) = buf.split_mut();
2873 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2874 debug_assert_eq!(tx_header.tx_id, 0);
2875 match tx_header.ordinal {
2876 0x62d5018e2174f57f => {
2877 let mut out = fidl::new_empty!(
2878 ExecutionControllerOnStopRequest,
2879 fdomain_client::fidl::FDomainResourceDialect
2880 );
2881 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ExecutionControllerOnStopRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2882 Ok((ExecutionControllerEvent::OnStop { stopped_payload: out.stopped_payload }))
2883 }
2884 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2885 Ok(ExecutionControllerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2886 }
2887 _ => Err(fidl::Error::UnknownOrdinal {
2888 ordinal: tx_header.ordinal,
2889 protocol_name:
2890 <ExecutionControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2891 }),
2892 }
2893 }
2894}
2895
2896pub struct ExecutionControllerRequestStream {
2898 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2899 is_terminated: bool,
2900}
2901
2902impl std::marker::Unpin for ExecutionControllerRequestStream {}
2903
2904impl futures::stream::FusedStream for ExecutionControllerRequestStream {
2905 fn is_terminated(&self) -> bool {
2906 self.is_terminated
2907 }
2908}
2909
2910impl fdomain_client::fidl::RequestStream for ExecutionControllerRequestStream {
2911 type Protocol = ExecutionControllerMarker;
2912 type ControlHandle = ExecutionControllerControlHandle;
2913
2914 fn from_channel(channel: fdomain_client::Channel) -> Self {
2915 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2916 }
2917
2918 fn control_handle(&self) -> Self::ControlHandle {
2919 ExecutionControllerControlHandle { inner: self.inner.clone() }
2920 }
2921
2922 fn into_inner(
2923 self,
2924 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
2925 {
2926 (self.inner, self.is_terminated)
2927 }
2928
2929 fn from_inner(
2930 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2931 is_terminated: bool,
2932 ) -> Self {
2933 Self { inner, is_terminated }
2934 }
2935}
2936
2937impl futures::Stream for ExecutionControllerRequestStream {
2938 type Item = Result<ExecutionControllerRequest, fidl::Error>;
2939
2940 fn poll_next(
2941 mut self: std::pin::Pin<&mut Self>,
2942 cx: &mut std::task::Context<'_>,
2943 ) -> std::task::Poll<Option<Self::Item>> {
2944 let this = &mut *self;
2945 if this.inner.check_shutdown(cx) {
2946 this.is_terminated = true;
2947 return std::task::Poll::Ready(None);
2948 }
2949 if this.is_terminated {
2950 panic!("polled ExecutionControllerRequestStream after completion");
2951 }
2952 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
2953 |bytes, handles| {
2954 match this.inner.channel().read_etc(cx, bytes, handles) {
2955 std::task::Poll::Ready(Ok(())) => {}
2956 std::task::Poll::Pending => return std::task::Poll::Pending,
2957 std::task::Poll::Ready(Err(None)) => {
2958 this.is_terminated = true;
2959 return std::task::Poll::Ready(None);
2960 }
2961 std::task::Poll::Ready(Err(Some(e))) => {
2962 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2963 e.into(),
2964 ))));
2965 }
2966 }
2967
2968 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2970
2971 std::task::Poll::Ready(Some(match header.ordinal {
2972 0x56d23cec21036117 => {
2973 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2974 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
2975 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2976 let control_handle = ExecutionControllerControlHandle {
2977 inner: this.inner.clone(),
2978 };
2979 Ok(ExecutionControllerRequest::Stop {
2980 control_handle,
2981 })
2982 }
2983 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2984 Ok(ExecutionControllerRequest::_UnknownMethod {
2985 ordinal: header.ordinal,
2986 control_handle: ExecutionControllerControlHandle { inner: this.inner.clone() },
2987 method_type: fidl::MethodType::OneWay,
2988 })
2989 }
2990 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2991 this.inner.send_framework_err(
2992 fidl::encoding::FrameworkErr::UnknownMethod,
2993 header.tx_id,
2994 header.ordinal,
2995 header.dynamic_flags(),
2996 (bytes, handles),
2997 )?;
2998 Ok(ExecutionControllerRequest::_UnknownMethod {
2999 ordinal: header.ordinal,
3000 control_handle: ExecutionControllerControlHandle { inner: this.inner.clone() },
3001 method_type: fidl::MethodType::TwoWay,
3002 })
3003 }
3004 _ => Err(fidl::Error::UnknownOrdinal {
3005 ordinal: header.ordinal,
3006 protocol_name: <ExecutionControllerMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
3007 }),
3008 }))
3009 },
3010 )
3011 }
3012}
3013
3014#[derive(Debug)]
3015pub enum ExecutionControllerRequest {
3016 Stop { control_handle: ExecutionControllerControlHandle },
3022 #[non_exhaustive]
3024 _UnknownMethod {
3025 ordinal: u64,
3027 control_handle: ExecutionControllerControlHandle,
3028 method_type: fidl::MethodType,
3029 },
3030}
3031
3032impl ExecutionControllerRequest {
3033 #[allow(irrefutable_let_patterns)]
3034 pub fn into_stop(self) -> Option<(ExecutionControllerControlHandle)> {
3035 if let ExecutionControllerRequest::Stop { control_handle } = self {
3036 Some((control_handle))
3037 } else {
3038 None
3039 }
3040 }
3041
3042 pub fn method_name(&self) -> &'static str {
3044 match *self {
3045 ExecutionControllerRequest::Stop { .. } => "stop",
3046 ExecutionControllerRequest::_UnknownMethod {
3047 method_type: fidl::MethodType::OneWay,
3048 ..
3049 } => "unknown one-way method",
3050 ExecutionControllerRequest::_UnknownMethod {
3051 method_type: fidl::MethodType::TwoWay,
3052 ..
3053 } => "unknown two-way method",
3054 }
3055 }
3056}
3057
3058#[derive(Debug, Clone)]
3059pub struct ExecutionControllerControlHandle {
3060 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3061}
3062
3063impl ExecutionControllerControlHandle {
3064 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
3065 self.inner.shutdown_with_epitaph(status.into())
3066 }
3067}
3068
3069impl fdomain_client::fidl::ControlHandle for ExecutionControllerControlHandle {
3070 fn shutdown(&self) {
3071 self.inner.shutdown()
3072 }
3073
3074 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
3075 self.inner.shutdown_with_epitaph(status)
3076 }
3077
3078 fn is_closed(&self) -> bool {
3079 self.inner.channel().is_closed()
3080 }
3081 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3082 self.inner.channel().on_closed()
3083 }
3084}
3085
3086impl ExecutionControllerControlHandle {
3087 pub fn send_on_stop(&self, mut stopped_payload: &StoppedPayload) -> Result<(), fidl::Error> {
3088 self.inner.send::<ExecutionControllerOnStopRequest>(
3089 (stopped_payload,),
3090 0,
3091 0x62d5018e2174f57f,
3092 fidl::encoding::DynamicFlags::FLEXIBLE,
3093 )
3094 }
3095}
3096
3097#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3098pub struct IntrospectorMarker;
3099
3100impl fdomain_client::fidl::ProtocolMarker for IntrospectorMarker {
3101 type Proxy = IntrospectorProxy;
3102 type RequestStream = IntrospectorRequestStream;
3103
3104 const DEBUG_NAME: &'static str = "fuchsia.component.Introspector";
3105}
3106impl fdomain_client::fidl::DiscoverableProtocolMarker for IntrospectorMarker {}
3107pub type IntrospectorGetMonikerResult = Result<String, Error>;
3108
3109pub trait IntrospectorProxyInterface: Send + Sync {
3110 type GetMonikerResponseFut: std::future::Future<Output = Result<IntrospectorGetMonikerResult, fidl::Error>>
3111 + Send;
3112 fn r#get_moniker(
3113 &self,
3114 component_instance: fdomain_client::Event,
3115 ) -> Self::GetMonikerResponseFut;
3116}
3117
3118#[derive(Debug, Clone)]
3119pub struct IntrospectorProxy {
3120 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
3121}
3122
3123impl fdomain_client::fidl::Proxy for IntrospectorProxy {
3124 type Protocol = IntrospectorMarker;
3125
3126 fn from_channel(inner: fdomain_client::Channel) -> Self {
3127 Self::new(inner)
3128 }
3129
3130 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
3131 self.client.into_channel().map_err(|client| Self { client })
3132 }
3133
3134 fn as_channel(&self) -> &fdomain_client::Channel {
3135 self.client.as_channel()
3136 }
3137}
3138
3139impl IntrospectorProxy {
3140 pub fn new(channel: fdomain_client::Channel) -> Self {
3142 let protocol_name =
3143 <IntrospectorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
3144 Self { client: fidl::client::Client::new(channel, protocol_name) }
3145 }
3146
3147 pub fn take_event_stream(&self) -> IntrospectorEventStream {
3153 IntrospectorEventStream { event_receiver: self.client.take_event_receiver() }
3154 }
3155
3156 pub fn r#get_moniker(
3163 &self,
3164 mut component_instance: fdomain_client::Event,
3165 ) -> fidl::client::QueryResponseFut<
3166 IntrospectorGetMonikerResult,
3167 fdomain_client::fidl::FDomainResourceDialect,
3168 > {
3169 IntrospectorProxyInterface::r#get_moniker(self, component_instance)
3170 }
3171}
3172
3173impl IntrospectorProxyInterface for IntrospectorProxy {
3174 type GetMonikerResponseFut = fidl::client::QueryResponseFut<
3175 IntrospectorGetMonikerResult,
3176 fdomain_client::fidl::FDomainResourceDialect,
3177 >;
3178 fn r#get_moniker(
3179 &self,
3180 mut component_instance: fdomain_client::Event,
3181 ) -> Self::GetMonikerResponseFut {
3182 fn _decode(
3183 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3184 ) -> Result<IntrospectorGetMonikerResult, fidl::Error> {
3185 let _response = fidl::client::decode_transaction_body::<
3186 fidl::encoding::FlexibleResultType<IntrospectorGetMonikerResponse, Error>,
3187 fdomain_client::fidl::FDomainResourceDialect,
3188 0x2f980ceb37bf458,
3189 >(_buf?)?
3190 .into_result_fdomain::<IntrospectorMarker>("get_moniker")?;
3191 Ok(_response.map(|x| x.moniker))
3192 }
3193 self.client
3194 .send_query_and_decode::<IntrospectorGetMonikerRequest, IntrospectorGetMonikerResult>(
3195 (component_instance,),
3196 0x2f980ceb37bf458,
3197 fidl::encoding::DynamicFlags::FLEXIBLE,
3198 _decode,
3199 )
3200 }
3201}
3202
3203pub struct IntrospectorEventStream {
3204 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
3205}
3206
3207impl std::marker::Unpin for IntrospectorEventStream {}
3208
3209impl futures::stream::FusedStream for IntrospectorEventStream {
3210 fn is_terminated(&self) -> bool {
3211 self.event_receiver.is_terminated()
3212 }
3213}
3214
3215impl futures::Stream for IntrospectorEventStream {
3216 type Item = Result<IntrospectorEvent, fidl::Error>;
3217
3218 fn poll_next(
3219 mut self: std::pin::Pin<&mut Self>,
3220 cx: &mut std::task::Context<'_>,
3221 ) -> std::task::Poll<Option<Self::Item>> {
3222 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3223 &mut self.event_receiver,
3224 cx
3225 )?) {
3226 Some(buf) => std::task::Poll::Ready(Some(IntrospectorEvent::decode(buf))),
3227 None => std::task::Poll::Ready(None),
3228 }
3229 }
3230}
3231
3232#[derive(Debug)]
3233pub enum IntrospectorEvent {
3234 #[non_exhaustive]
3235 _UnknownEvent {
3236 ordinal: u64,
3238 },
3239}
3240
3241impl IntrospectorEvent {
3242 fn decode(
3244 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3245 ) -> Result<IntrospectorEvent, fidl::Error> {
3246 let (bytes, _handles) = buf.split_mut();
3247 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3248 debug_assert_eq!(tx_header.tx_id, 0);
3249 match tx_header.ordinal {
3250 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3251 Ok(IntrospectorEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3252 }
3253 _ => Err(fidl::Error::UnknownOrdinal {
3254 ordinal: tx_header.ordinal,
3255 protocol_name:
3256 <IntrospectorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
3257 }),
3258 }
3259 }
3260}
3261
3262pub struct IntrospectorRequestStream {
3264 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3265 is_terminated: bool,
3266}
3267
3268impl std::marker::Unpin for IntrospectorRequestStream {}
3269
3270impl futures::stream::FusedStream for IntrospectorRequestStream {
3271 fn is_terminated(&self) -> bool {
3272 self.is_terminated
3273 }
3274}
3275
3276impl fdomain_client::fidl::RequestStream for IntrospectorRequestStream {
3277 type Protocol = IntrospectorMarker;
3278 type ControlHandle = IntrospectorControlHandle;
3279
3280 fn from_channel(channel: fdomain_client::Channel) -> Self {
3281 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3282 }
3283
3284 fn control_handle(&self) -> Self::ControlHandle {
3285 IntrospectorControlHandle { inner: self.inner.clone() }
3286 }
3287
3288 fn into_inner(
3289 self,
3290 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
3291 {
3292 (self.inner, self.is_terminated)
3293 }
3294
3295 fn from_inner(
3296 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3297 is_terminated: bool,
3298 ) -> Self {
3299 Self { inner, is_terminated }
3300 }
3301}
3302
3303impl futures::Stream for IntrospectorRequestStream {
3304 type Item = Result<IntrospectorRequest, fidl::Error>;
3305
3306 fn poll_next(
3307 mut self: std::pin::Pin<&mut Self>,
3308 cx: &mut std::task::Context<'_>,
3309 ) -> std::task::Poll<Option<Self::Item>> {
3310 let this = &mut *self;
3311 if this.inner.check_shutdown(cx) {
3312 this.is_terminated = true;
3313 return std::task::Poll::Ready(None);
3314 }
3315 if this.is_terminated {
3316 panic!("polled IntrospectorRequestStream after completion");
3317 }
3318 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
3319 |bytes, handles| {
3320 match this.inner.channel().read_etc(cx, bytes, handles) {
3321 std::task::Poll::Ready(Ok(())) => {}
3322 std::task::Poll::Pending => return std::task::Poll::Pending,
3323 std::task::Poll::Ready(Err(None)) => {
3324 this.is_terminated = true;
3325 return std::task::Poll::Ready(None);
3326 }
3327 std::task::Poll::Ready(Err(Some(e))) => {
3328 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3329 e.into(),
3330 ))));
3331 }
3332 }
3333
3334 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3336
3337 std::task::Poll::Ready(Some(match header.ordinal {
3338 0x2f980ceb37bf458 => {
3339 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3340 let mut req = fidl::new_empty!(
3341 IntrospectorGetMonikerRequest,
3342 fdomain_client::fidl::FDomainResourceDialect
3343 );
3344 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<IntrospectorGetMonikerRequest>(&header, _body_bytes, handles, &mut req)?;
3345 let control_handle =
3346 IntrospectorControlHandle { inner: this.inner.clone() };
3347 Ok(IntrospectorRequest::GetMoniker {
3348 component_instance: req.component_instance,
3349
3350 responder: IntrospectorGetMonikerResponder {
3351 control_handle: std::mem::ManuallyDrop::new(control_handle),
3352 tx_id: header.tx_id,
3353 },
3354 })
3355 }
3356 _ if header.tx_id == 0
3357 && header
3358 .dynamic_flags()
3359 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3360 {
3361 Ok(IntrospectorRequest::_UnknownMethod {
3362 ordinal: header.ordinal,
3363 control_handle: IntrospectorControlHandle { inner: this.inner.clone() },
3364 method_type: fidl::MethodType::OneWay,
3365 })
3366 }
3367 _ if header
3368 .dynamic_flags()
3369 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3370 {
3371 this.inner.send_framework_err(
3372 fidl::encoding::FrameworkErr::UnknownMethod,
3373 header.tx_id,
3374 header.ordinal,
3375 header.dynamic_flags(),
3376 (bytes, handles),
3377 )?;
3378 Ok(IntrospectorRequest::_UnknownMethod {
3379 ordinal: header.ordinal,
3380 control_handle: IntrospectorControlHandle { inner: this.inner.clone() },
3381 method_type: fidl::MethodType::TwoWay,
3382 })
3383 }
3384 _ => Err(fidl::Error::UnknownOrdinal {
3385 ordinal: header.ordinal,
3386 protocol_name:
3387 <IntrospectorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
3388 }),
3389 }))
3390 },
3391 )
3392 }
3393}
3394
3395#[derive(Debug)]
3404pub enum IntrospectorRequest {
3405 GetMoniker {
3412 component_instance: fdomain_client::Event,
3413 responder: IntrospectorGetMonikerResponder,
3414 },
3415 #[non_exhaustive]
3417 _UnknownMethod {
3418 ordinal: u64,
3420 control_handle: IntrospectorControlHandle,
3421 method_type: fidl::MethodType,
3422 },
3423}
3424
3425impl IntrospectorRequest {
3426 #[allow(irrefutable_let_patterns)]
3427 pub fn into_get_moniker(
3428 self,
3429 ) -> Option<(fdomain_client::Event, IntrospectorGetMonikerResponder)> {
3430 if let IntrospectorRequest::GetMoniker { component_instance, responder } = self {
3431 Some((component_instance, responder))
3432 } else {
3433 None
3434 }
3435 }
3436
3437 pub fn method_name(&self) -> &'static str {
3439 match *self {
3440 IntrospectorRequest::GetMoniker { .. } => "get_moniker",
3441 IntrospectorRequest::_UnknownMethod {
3442 method_type: fidl::MethodType::OneWay, ..
3443 } => "unknown one-way method",
3444 IntrospectorRequest::_UnknownMethod {
3445 method_type: fidl::MethodType::TwoWay, ..
3446 } => "unknown two-way method",
3447 }
3448 }
3449}
3450
3451#[derive(Debug, Clone)]
3452pub struct IntrospectorControlHandle {
3453 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3454}
3455
3456impl IntrospectorControlHandle {
3457 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
3458 self.inner.shutdown_with_epitaph(status.into())
3459 }
3460}
3461
3462impl fdomain_client::fidl::ControlHandle for IntrospectorControlHandle {
3463 fn shutdown(&self) {
3464 self.inner.shutdown()
3465 }
3466
3467 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
3468 self.inner.shutdown_with_epitaph(status)
3469 }
3470
3471 fn is_closed(&self) -> bool {
3472 self.inner.channel().is_closed()
3473 }
3474 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3475 self.inner.channel().on_closed()
3476 }
3477}
3478
3479impl IntrospectorControlHandle {}
3480
3481#[must_use = "FIDL methods require a response to be sent"]
3482#[derive(Debug)]
3483pub struct IntrospectorGetMonikerResponder {
3484 control_handle: std::mem::ManuallyDrop<IntrospectorControlHandle>,
3485 tx_id: u32,
3486}
3487
3488impl std::ops::Drop for IntrospectorGetMonikerResponder {
3492 fn drop(&mut self) {
3493 self.control_handle.shutdown();
3494 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3496 }
3497}
3498
3499impl fdomain_client::fidl::Responder for IntrospectorGetMonikerResponder {
3500 type ControlHandle = IntrospectorControlHandle;
3501
3502 fn control_handle(&self) -> &IntrospectorControlHandle {
3503 &self.control_handle
3504 }
3505
3506 fn drop_without_shutdown(mut self) {
3507 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3509 std::mem::forget(self);
3511 }
3512}
3513
3514impl IntrospectorGetMonikerResponder {
3515 pub fn send(self, mut result: Result<&str, Error>) -> Result<(), fidl::Error> {
3519 let _result = self.send_raw(result);
3520 if _result.is_err() {
3521 self.control_handle.shutdown();
3522 }
3523 self.drop_without_shutdown();
3524 _result
3525 }
3526
3527 pub fn send_no_shutdown_on_err(
3529 self,
3530 mut result: Result<&str, Error>,
3531 ) -> Result<(), fidl::Error> {
3532 let _result = self.send_raw(result);
3533 self.drop_without_shutdown();
3534 _result
3535 }
3536
3537 fn send_raw(&self, mut result: Result<&str, Error>) -> Result<(), fidl::Error> {
3538 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3539 IntrospectorGetMonikerResponse,
3540 Error,
3541 >>(
3542 fidl::encoding::FlexibleResult::new(result.map(|moniker| (moniker,))),
3543 self.tx_id,
3544 0x2f980ceb37bf458,
3545 fidl::encoding::DynamicFlags::FLEXIBLE,
3546 )
3547 }
3548}
3549
3550#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3551pub struct NamespaceMarker;
3552
3553impl fdomain_client::fidl::ProtocolMarker for NamespaceMarker {
3554 type Proxy = NamespaceProxy;
3555 type RequestStream = NamespaceRequestStream;
3556
3557 const DEBUG_NAME: &'static str = "fuchsia.component.Namespace";
3558}
3559impl fdomain_client::fidl::DiscoverableProtocolMarker for NamespaceMarker {}
3560pub type NamespaceCreateResult = Result<Vec<NamespaceEntry>, NamespaceError>;
3561pub type NamespaceCreate2Result = Result<Vec<NamespaceEntry>, NamespaceError>;
3562
3563pub trait NamespaceProxyInterface: Send + Sync {
3564 type CreateResponseFut: std::future::Future<Output = Result<NamespaceCreateResult, fidl::Error>>
3565 + Send;
3566 fn r#create(&self, entries: Vec<NamespaceInputEntry>) -> Self::CreateResponseFut;
3567 type Create2ResponseFut: std::future::Future<Output = Result<NamespaceCreate2Result, fidl::Error>>
3568 + Send;
3569 fn r#create2(&self, entries: Vec<NamespaceInputEntry2>) -> Self::Create2ResponseFut;
3570}
3571
3572#[derive(Debug, Clone)]
3573pub struct NamespaceProxy {
3574 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
3575}
3576
3577impl fdomain_client::fidl::Proxy for NamespaceProxy {
3578 type Protocol = NamespaceMarker;
3579
3580 fn from_channel(inner: fdomain_client::Channel) -> Self {
3581 Self::new(inner)
3582 }
3583
3584 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
3585 self.client.into_channel().map_err(|client| Self { client })
3586 }
3587
3588 fn as_channel(&self) -> &fdomain_client::Channel {
3589 self.client.as_channel()
3590 }
3591}
3592
3593impl NamespaceProxy {
3594 pub fn new(channel: fdomain_client::Channel) -> Self {
3596 let protocol_name = <NamespaceMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
3597 Self { client: fidl::client::Client::new(channel, protocol_name) }
3598 }
3599
3600 pub fn take_event_stream(&self) -> NamespaceEventStream {
3606 NamespaceEventStream { event_receiver: self.client.take_event_receiver() }
3607 }
3608
3609 pub fn r#create(
3610 &self,
3611 mut entries: Vec<NamespaceInputEntry>,
3612 ) -> fidl::client::QueryResponseFut<
3613 NamespaceCreateResult,
3614 fdomain_client::fidl::FDomainResourceDialect,
3615 > {
3616 NamespaceProxyInterface::r#create(self, entries)
3617 }
3618
3619 pub fn r#create2(
3620 &self,
3621 mut entries: Vec<NamespaceInputEntry2>,
3622 ) -> fidl::client::QueryResponseFut<
3623 NamespaceCreate2Result,
3624 fdomain_client::fidl::FDomainResourceDialect,
3625 > {
3626 NamespaceProxyInterface::r#create2(self, entries)
3627 }
3628}
3629
3630impl NamespaceProxyInterface for NamespaceProxy {
3631 type CreateResponseFut = fidl::client::QueryResponseFut<
3632 NamespaceCreateResult,
3633 fdomain_client::fidl::FDomainResourceDialect,
3634 >;
3635 fn r#create(&self, mut entries: Vec<NamespaceInputEntry>) -> Self::CreateResponseFut {
3636 fn _decode(
3637 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3638 ) -> Result<NamespaceCreateResult, fidl::Error> {
3639 let _response = fidl::client::decode_transaction_body::<
3640 fidl::encoding::FlexibleResultType<NamespaceCreateResponse, NamespaceError>,
3641 fdomain_client::fidl::FDomainResourceDialect,
3642 0x4329fe12b2a790f9,
3643 >(_buf?)?
3644 .into_result_fdomain::<NamespaceMarker>("create")?;
3645 Ok(_response.map(|x| x.entries))
3646 }
3647 self.client.send_query_and_decode::<NamespaceCreateRequest, NamespaceCreateResult>(
3648 (entries.as_mut(),),
3649 0x4329fe12b2a790f9,
3650 fidl::encoding::DynamicFlags::FLEXIBLE,
3651 _decode,
3652 )
3653 }
3654
3655 type Create2ResponseFut = fidl::client::QueryResponseFut<
3656 NamespaceCreate2Result,
3657 fdomain_client::fidl::FDomainResourceDialect,
3658 >;
3659 fn r#create2(&self, mut entries: Vec<NamespaceInputEntry2>) -> Self::Create2ResponseFut {
3660 fn _decode(
3661 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3662 ) -> Result<NamespaceCreate2Result, fidl::Error> {
3663 let _response = fidl::client::decode_transaction_body::<
3664 fidl::encoding::FlexibleResultType<NamespaceCreate2Response, NamespaceError>,
3665 fdomain_client::fidl::FDomainResourceDialect,
3666 0x665aa4bb3773b351,
3667 >(_buf?)?
3668 .into_result_fdomain::<NamespaceMarker>("create2")?;
3669 Ok(_response.map(|x| x.entries))
3670 }
3671 self.client.send_query_and_decode::<NamespaceCreate2Request, NamespaceCreate2Result>(
3672 (entries.as_mut(),),
3673 0x665aa4bb3773b351,
3674 fidl::encoding::DynamicFlags::FLEXIBLE,
3675 _decode,
3676 )
3677 }
3678}
3679
3680pub struct NamespaceEventStream {
3681 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
3682}
3683
3684impl std::marker::Unpin for NamespaceEventStream {}
3685
3686impl futures::stream::FusedStream for NamespaceEventStream {
3687 fn is_terminated(&self) -> bool {
3688 self.event_receiver.is_terminated()
3689 }
3690}
3691
3692impl futures::Stream for NamespaceEventStream {
3693 type Item = Result<NamespaceEvent, fidl::Error>;
3694
3695 fn poll_next(
3696 mut self: std::pin::Pin<&mut Self>,
3697 cx: &mut std::task::Context<'_>,
3698 ) -> std::task::Poll<Option<Self::Item>> {
3699 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3700 &mut self.event_receiver,
3701 cx
3702 )?) {
3703 Some(buf) => std::task::Poll::Ready(Some(NamespaceEvent::decode(buf))),
3704 None => std::task::Poll::Ready(None),
3705 }
3706 }
3707}
3708
3709#[derive(Debug)]
3710pub enum NamespaceEvent {
3711 #[non_exhaustive]
3712 _UnknownEvent {
3713 ordinal: u64,
3715 },
3716}
3717
3718impl NamespaceEvent {
3719 fn decode(
3721 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3722 ) -> Result<NamespaceEvent, fidl::Error> {
3723 let (bytes, _handles) = buf.split_mut();
3724 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3725 debug_assert_eq!(tx_header.tx_id, 0);
3726 match tx_header.ordinal {
3727 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3728 Ok(NamespaceEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3729 }
3730 _ => Err(fidl::Error::UnknownOrdinal {
3731 ordinal: tx_header.ordinal,
3732 protocol_name:
3733 <NamespaceMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
3734 }),
3735 }
3736 }
3737}
3738
3739pub struct NamespaceRequestStream {
3741 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3742 is_terminated: bool,
3743}
3744
3745impl std::marker::Unpin for NamespaceRequestStream {}
3746
3747impl futures::stream::FusedStream for NamespaceRequestStream {
3748 fn is_terminated(&self) -> bool {
3749 self.is_terminated
3750 }
3751}
3752
3753impl fdomain_client::fidl::RequestStream for NamespaceRequestStream {
3754 type Protocol = NamespaceMarker;
3755 type ControlHandle = NamespaceControlHandle;
3756
3757 fn from_channel(channel: fdomain_client::Channel) -> Self {
3758 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3759 }
3760
3761 fn control_handle(&self) -> Self::ControlHandle {
3762 NamespaceControlHandle { inner: self.inner.clone() }
3763 }
3764
3765 fn into_inner(
3766 self,
3767 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
3768 {
3769 (self.inner, self.is_terminated)
3770 }
3771
3772 fn from_inner(
3773 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3774 is_terminated: bool,
3775 ) -> Self {
3776 Self { inner, is_terminated }
3777 }
3778}
3779
3780impl futures::Stream for NamespaceRequestStream {
3781 type Item = Result<NamespaceRequest, fidl::Error>;
3782
3783 fn poll_next(
3784 mut self: std::pin::Pin<&mut Self>,
3785 cx: &mut std::task::Context<'_>,
3786 ) -> std::task::Poll<Option<Self::Item>> {
3787 let this = &mut *self;
3788 if this.inner.check_shutdown(cx) {
3789 this.is_terminated = true;
3790 return std::task::Poll::Ready(None);
3791 }
3792 if this.is_terminated {
3793 panic!("polled NamespaceRequestStream after completion");
3794 }
3795 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
3796 |bytes, handles| {
3797 match this.inner.channel().read_etc(cx, bytes, handles) {
3798 std::task::Poll::Ready(Ok(())) => {}
3799 std::task::Poll::Pending => return std::task::Poll::Pending,
3800 std::task::Poll::Ready(Err(None)) => {
3801 this.is_terminated = true;
3802 return std::task::Poll::Ready(None);
3803 }
3804 std::task::Poll::Ready(Err(Some(e))) => {
3805 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3806 e.into(),
3807 ))));
3808 }
3809 }
3810
3811 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3813
3814 std::task::Poll::Ready(Some(match header.ordinal {
3815 0x4329fe12b2a790f9 => {
3816 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3817 let mut req = fidl::new_empty!(
3818 NamespaceCreateRequest,
3819 fdomain_client::fidl::FDomainResourceDialect
3820 );
3821 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NamespaceCreateRequest>(&header, _body_bytes, handles, &mut req)?;
3822 let control_handle = NamespaceControlHandle { inner: this.inner.clone() };
3823 Ok(NamespaceRequest::Create {
3824 entries: req.entries,
3825
3826 responder: NamespaceCreateResponder {
3827 control_handle: std::mem::ManuallyDrop::new(control_handle),
3828 tx_id: header.tx_id,
3829 },
3830 })
3831 }
3832 0x665aa4bb3773b351 => {
3833 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3834 let mut req = fidl::new_empty!(
3835 NamespaceCreate2Request,
3836 fdomain_client::fidl::FDomainResourceDialect
3837 );
3838 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NamespaceCreate2Request>(&header, _body_bytes, handles, &mut req)?;
3839 let control_handle = NamespaceControlHandle { inner: this.inner.clone() };
3840 Ok(NamespaceRequest::Create2 {
3841 entries: req.entries,
3842
3843 responder: NamespaceCreate2Responder {
3844 control_handle: std::mem::ManuallyDrop::new(control_handle),
3845 tx_id: header.tx_id,
3846 },
3847 })
3848 }
3849 _ if header.tx_id == 0
3850 && header
3851 .dynamic_flags()
3852 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3853 {
3854 Ok(NamespaceRequest::_UnknownMethod {
3855 ordinal: header.ordinal,
3856 control_handle: NamespaceControlHandle { inner: this.inner.clone() },
3857 method_type: fidl::MethodType::OneWay,
3858 })
3859 }
3860 _ if header
3861 .dynamic_flags()
3862 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3863 {
3864 this.inner.send_framework_err(
3865 fidl::encoding::FrameworkErr::UnknownMethod,
3866 header.tx_id,
3867 header.ordinal,
3868 header.dynamic_flags(),
3869 (bytes, handles),
3870 )?;
3871 Ok(NamespaceRequest::_UnknownMethod {
3872 ordinal: header.ordinal,
3873 control_handle: NamespaceControlHandle { inner: this.inner.clone() },
3874 method_type: fidl::MethodType::TwoWay,
3875 })
3876 }
3877 _ => Err(fidl::Error::UnknownOrdinal {
3878 ordinal: header.ordinal,
3879 protocol_name:
3880 <NamespaceMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
3881 }),
3882 }))
3883 },
3884 )
3885 }
3886}
3887
3888#[derive(Debug)]
3890pub enum NamespaceRequest {
3891 Create {
3892 entries: Vec<NamespaceInputEntry>,
3893 responder: NamespaceCreateResponder,
3894 },
3895 Create2 {
3896 entries: Vec<NamespaceInputEntry2>,
3897 responder: NamespaceCreate2Responder,
3898 },
3899 #[non_exhaustive]
3901 _UnknownMethod {
3902 ordinal: u64,
3904 control_handle: NamespaceControlHandle,
3905 method_type: fidl::MethodType,
3906 },
3907}
3908
3909impl NamespaceRequest {
3910 #[allow(irrefutable_let_patterns)]
3911 pub fn into_create(self) -> Option<(Vec<NamespaceInputEntry>, NamespaceCreateResponder)> {
3912 if let NamespaceRequest::Create { entries, responder } = self {
3913 Some((entries, responder))
3914 } else {
3915 None
3916 }
3917 }
3918
3919 #[allow(irrefutable_let_patterns)]
3920 pub fn into_create2(self) -> Option<(Vec<NamespaceInputEntry2>, NamespaceCreate2Responder)> {
3921 if let NamespaceRequest::Create2 { entries, responder } = self {
3922 Some((entries, responder))
3923 } else {
3924 None
3925 }
3926 }
3927
3928 pub fn method_name(&self) -> &'static str {
3930 match *self {
3931 NamespaceRequest::Create { .. } => "create",
3932 NamespaceRequest::Create2 { .. } => "create2",
3933 NamespaceRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3934 "unknown one-way method"
3935 }
3936 NamespaceRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3937 "unknown two-way method"
3938 }
3939 }
3940 }
3941}
3942
3943#[derive(Debug, Clone)]
3944pub struct NamespaceControlHandle {
3945 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3946}
3947
3948impl NamespaceControlHandle {
3949 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
3950 self.inner.shutdown_with_epitaph(status.into())
3951 }
3952}
3953
3954impl fdomain_client::fidl::ControlHandle for NamespaceControlHandle {
3955 fn shutdown(&self) {
3956 self.inner.shutdown()
3957 }
3958
3959 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
3960 self.inner.shutdown_with_epitaph(status)
3961 }
3962
3963 fn is_closed(&self) -> bool {
3964 self.inner.channel().is_closed()
3965 }
3966 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3967 self.inner.channel().on_closed()
3968 }
3969}
3970
3971impl NamespaceControlHandle {}
3972
3973#[must_use = "FIDL methods require a response to be sent"]
3974#[derive(Debug)]
3975pub struct NamespaceCreateResponder {
3976 control_handle: std::mem::ManuallyDrop<NamespaceControlHandle>,
3977 tx_id: u32,
3978}
3979
3980impl std::ops::Drop for NamespaceCreateResponder {
3984 fn drop(&mut self) {
3985 self.control_handle.shutdown();
3986 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3988 }
3989}
3990
3991impl fdomain_client::fidl::Responder for NamespaceCreateResponder {
3992 type ControlHandle = NamespaceControlHandle;
3993
3994 fn control_handle(&self) -> &NamespaceControlHandle {
3995 &self.control_handle
3996 }
3997
3998 fn drop_without_shutdown(mut self) {
3999 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4001 std::mem::forget(self);
4003 }
4004}
4005
4006impl NamespaceCreateResponder {
4007 pub fn send(
4011 self,
4012 mut result: Result<Vec<NamespaceEntry>, NamespaceError>,
4013 ) -> Result<(), fidl::Error> {
4014 let _result = self.send_raw(result);
4015 if _result.is_err() {
4016 self.control_handle.shutdown();
4017 }
4018 self.drop_without_shutdown();
4019 _result
4020 }
4021
4022 pub fn send_no_shutdown_on_err(
4024 self,
4025 mut result: Result<Vec<NamespaceEntry>, NamespaceError>,
4026 ) -> Result<(), fidl::Error> {
4027 let _result = self.send_raw(result);
4028 self.drop_without_shutdown();
4029 _result
4030 }
4031
4032 fn send_raw(
4033 &self,
4034 mut result: Result<Vec<NamespaceEntry>, NamespaceError>,
4035 ) -> Result<(), fidl::Error> {
4036 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4037 NamespaceCreateResponse,
4038 NamespaceError,
4039 >>(
4040 fidl::encoding::FlexibleResult::new(
4041 result.as_mut().map_err(|e| *e).map(|entries| (entries.as_mut_slice(),)),
4042 ),
4043 self.tx_id,
4044 0x4329fe12b2a790f9,
4045 fidl::encoding::DynamicFlags::FLEXIBLE,
4046 )
4047 }
4048}
4049
4050#[must_use = "FIDL methods require a response to be sent"]
4051#[derive(Debug)]
4052pub struct NamespaceCreate2Responder {
4053 control_handle: std::mem::ManuallyDrop<NamespaceControlHandle>,
4054 tx_id: u32,
4055}
4056
4057impl std::ops::Drop for NamespaceCreate2Responder {
4061 fn drop(&mut self) {
4062 self.control_handle.shutdown();
4063 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4065 }
4066}
4067
4068impl fdomain_client::fidl::Responder for NamespaceCreate2Responder {
4069 type ControlHandle = NamespaceControlHandle;
4070
4071 fn control_handle(&self) -> &NamespaceControlHandle {
4072 &self.control_handle
4073 }
4074
4075 fn drop_without_shutdown(mut self) {
4076 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4078 std::mem::forget(self);
4080 }
4081}
4082
4083impl NamespaceCreate2Responder {
4084 pub fn send(
4088 self,
4089 mut result: Result<Vec<NamespaceEntry>, NamespaceError>,
4090 ) -> Result<(), fidl::Error> {
4091 let _result = self.send_raw(result);
4092 if _result.is_err() {
4093 self.control_handle.shutdown();
4094 }
4095 self.drop_without_shutdown();
4096 _result
4097 }
4098
4099 pub fn send_no_shutdown_on_err(
4101 self,
4102 mut result: Result<Vec<NamespaceEntry>, NamespaceError>,
4103 ) -> Result<(), fidl::Error> {
4104 let _result = self.send_raw(result);
4105 self.drop_without_shutdown();
4106 _result
4107 }
4108
4109 fn send_raw(
4110 &self,
4111 mut result: Result<Vec<NamespaceEntry>, NamespaceError>,
4112 ) -> Result<(), fidl::Error> {
4113 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4114 NamespaceCreate2Response,
4115 NamespaceError,
4116 >>(
4117 fidl::encoding::FlexibleResult::new(
4118 result.as_mut().map_err(|e| *e).map(|entries| (entries.as_mut_slice(),)),
4119 ),
4120 self.tx_id,
4121 0x665aa4bb3773b351,
4122 fidl::encoding::DynamicFlags::FLEXIBLE,
4123 )
4124 }
4125}
4126
4127#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4128pub struct RealmMarker;
4129
4130impl fdomain_client::fidl::ProtocolMarker for RealmMarker {
4131 type Proxy = RealmProxy;
4132 type RequestStream = RealmRequestStream;
4133
4134 const DEBUG_NAME: &'static str = "fuchsia.component.Realm";
4135}
4136impl fdomain_client::fidl::DiscoverableProtocolMarker for RealmMarker {}
4137pub type RealmOpenControllerResult = Result<(), Error>;
4138pub type RealmOpenExposedDirResult = Result<(), Error>;
4139pub type RealmCreateChildResult = Result<(), Error>;
4140pub type RealmDestroyChildResult = Result<(), Error>;
4141pub type RealmListChildrenResult = Result<(), Error>;
4142pub type RealmGetResolvedInfoResult =
4143 Result<fdomain_fuchsia_component_resolution::Component, Error>;
4144pub type RealmGetChildOutputDictionaryDeprecatedResult =
4145 Result<fdomain_fuchsia_component_sandbox::DictionaryRef, Error>;
4146pub type RealmGetChildOutputDictionaryResult = Result<fdomain_client::EventPair, Error>;
4147
4148pub trait RealmProxyInterface: Send + Sync {
4149 type OpenControllerResponseFut: std::future::Future<Output = Result<RealmOpenControllerResult, fidl::Error>>
4150 + Send;
4151 fn r#open_controller(
4152 &self,
4153 child: &fdomain_fuchsia_component_decl::ChildRef,
4154 controller: fdomain_client::fidl::ServerEnd<ControllerMarker>,
4155 ) -> Self::OpenControllerResponseFut;
4156 type OpenExposedDirResponseFut: std::future::Future<Output = Result<RealmOpenExposedDirResult, fidl::Error>>
4157 + Send;
4158 fn r#open_exposed_dir(
4159 &self,
4160 child: &fdomain_fuchsia_component_decl::ChildRef,
4161 exposed_dir: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
4162 ) -> Self::OpenExposedDirResponseFut;
4163 type CreateChildResponseFut: std::future::Future<Output = Result<RealmCreateChildResult, fidl::Error>>
4164 + Send;
4165 fn r#create_child(
4166 &self,
4167 collection: &fdomain_fuchsia_component_decl::CollectionRef,
4168 decl: &fdomain_fuchsia_component_decl::Child,
4169 args: CreateChildArgs,
4170 ) -> Self::CreateChildResponseFut;
4171 type DestroyChildResponseFut: std::future::Future<Output = Result<RealmDestroyChildResult, fidl::Error>>
4172 + Send;
4173 fn r#destroy_child(
4174 &self,
4175 child: &fdomain_fuchsia_component_decl::ChildRef,
4176 ) -> Self::DestroyChildResponseFut;
4177 type ListChildrenResponseFut: std::future::Future<Output = Result<RealmListChildrenResult, fidl::Error>>
4178 + Send;
4179 fn r#list_children(
4180 &self,
4181 collection: &fdomain_fuchsia_component_decl::CollectionRef,
4182 iter: fdomain_client::fidl::ServerEnd<ChildIteratorMarker>,
4183 ) -> Self::ListChildrenResponseFut;
4184 type GetResolvedInfoResponseFut: std::future::Future<Output = Result<RealmGetResolvedInfoResult, fidl::Error>>
4185 + Send;
4186 fn r#get_resolved_info(&self) -> Self::GetResolvedInfoResponseFut;
4187 type GetChildOutputDictionaryDeprecatedResponseFut: std::future::Future<
4188 Output = Result<RealmGetChildOutputDictionaryDeprecatedResult, fidl::Error>,
4189 > + Send;
4190 fn r#get_child_output_dictionary_deprecated(
4191 &self,
4192 child: &fdomain_fuchsia_component_decl::ChildRef,
4193 ) -> Self::GetChildOutputDictionaryDeprecatedResponseFut;
4194 type GetChildOutputDictionaryResponseFut: std::future::Future<Output = Result<RealmGetChildOutputDictionaryResult, fidl::Error>>
4195 + Send;
4196 fn r#get_child_output_dictionary(
4197 &self,
4198 child: &fdomain_fuchsia_component_decl::ChildRef,
4199 ) -> Self::GetChildOutputDictionaryResponseFut;
4200}
4201
4202#[derive(Debug, Clone)]
4203pub struct RealmProxy {
4204 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
4205}
4206
4207impl fdomain_client::fidl::Proxy for RealmProxy {
4208 type Protocol = RealmMarker;
4209
4210 fn from_channel(inner: fdomain_client::Channel) -> Self {
4211 Self::new(inner)
4212 }
4213
4214 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
4215 self.client.into_channel().map_err(|client| Self { client })
4216 }
4217
4218 fn as_channel(&self) -> &fdomain_client::Channel {
4219 self.client.as_channel()
4220 }
4221}
4222
4223impl RealmProxy {
4224 pub fn new(channel: fdomain_client::Channel) -> Self {
4226 let protocol_name = <RealmMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
4227 Self { client: fidl::client::Client::new(channel, protocol_name) }
4228 }
4229
4230 pub fn take_event_stream(&self) -> RealmEventStream {
4236 RealmEventStream { event_receiver: self.client.take_event_receiver() }
4237 }
4238
4239 pub fn r#open_controller(
4246 &self,
4247 mut child: &fdomain_fuchsia_component_decl::ChildRef,
4248 mut controller: fdomain_client::fidl::ServerEnd<ControllerMarker>,
4249 ) -> fidl::client::QueryResponseFut<
4250 RealmOpenControllerResult,
4251 fdomain_client::fidl::FDomainResourceDialect,
4252 > {
4253 RealmProxyInterface::r#open_controller(self, child, controller)
4254 }
4255
4256 pub fn r#open_exposed_dir(
4271 &self,
4272 mut child: &fdomain_fuchsia_component_decl::ChildRef,
4273 mut exposed_dir: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
4274 ) -> fidl::client::QueryResponseFut<
4275 RealmOpenExposedDirResult,
4276 fdomain_client::fidl::FDomainResourceDialect,
4277 > {
4278 RealmProxyInterface::r#open_exposed_dir(self, child, exposed_dir)
4279 }
4280
4281 pub fn r#create_child(
4302 &self,
4303 mut collection: &fdomain_fuchsia_component_decl::CollectionRef,
4304 mut decl: &fdomain_fuchsia_component_decl::Child,
4305 mut args: CreateChildArgs,
4306 ) -> fidl::client::QueryResponseFut<
4307 RealmCreateChildResult,
4308 fdomain_client::fidl::FDomainResourceDialect,
4309 > {
4310 RealmProxyInterface::r#create_child(self, collection, decl, args)
4311 }
4312
4313 pub fn r#destroy_child(
4325 &self,
4326 mut child: &fdomain_fuchsia_component_decl::ChildRef,
4327 ) -> fidl::client::QueryResponseFut<
4328 RealmDestroyChildResult,
4329 fdomain_client::fidl::FDomainResourceDialect,
4330 > {
4331 RealmProxyInterface::r#destroy_child(self, child)
4332 }
4333
4334 pub fn r#list_children(
4348 &self,
4349 mut collection: &fdomain_fuchsia_component_decl::CollectionRef,
4350 mut iter: fdomain_client::fidl::ServerEnd<ChildIteratorMarker>,
4351 ) -> fidl::client::QueryResponseFut<
4352 RealmListChildrenResult,
4353 fdomain_client::fidl::FDomainResourceDialect,
4354 > {
4355 RealmProxyInterface::r#list_children(self, collection, iter)
4356 }
4357
4358 pub fn r#get_resolved_info(
4361 &self,
4362 ) -> fidl::client::QueryResponseFut<
4363 RealmGetResolvedInfoResult,
4364 fdomain_client::fidl::FDomainResourceDialect,
4365 > {
4366 RealmProxyInterface::r#get_resolved_info(self)
4367 }
4368
4369 pub fn r#get_child_output_dictionary_deprecated(
4370 &self,
4371 mut child: &fdomain_fuchsia_component_decl::ChildRef,
4372 ) -> fidl::client::QueryResponseFut<
4373 RealmGetChildOutputDictionaryDeprecatedResult,
4374 fdomain_client::fidl::FDomainResourceDialect,
4375 > {
4376 RealmProxyInterface::r#get_child_output_dictionary_deprecated(self, child)
4377 }
4378
4379 pub fn r#get_child_output_dictionary(
4382 &self,
4383 mut child: &fdomain_fuchsia_component_decl::ChildRef,
4384 ) -> fidl::client::QueryResponseFut<
4385 RealmGetChildOutputDictionaryResult,
4386 fdomain_client::fidl::FDomainResourceDialect,
4387 > {
4388 RealmProxyInterface::r#get_child_output_dictionary(self, child)
4389 }
4390}
4391
4392impl RealmProxyInterface for RealmProxy {
4393 type OpenControllerResponseFut = fidl::client::QueryResponseFut<
4394 RealmOpenControllerResult,
4395 fdomain_client::fidl::FDomainResourceDialect,
4396 >;
4397 fn r#open_controller(
4398 &self,
4399 mut child: &fdomain_fuchsia_component_decl::ChildRef,
4400 mut controller: fdomain_client::fidl::ServerEnd<ControllerMarker>,
4401 ) -> Self::OpenControllerResponseFut {
4402 fn _decode(
4403 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4404 ) -> Result<RealmOpenControllerResult, fidl::Error> {
4405 let _response = fidl::client::decode_transaction_body::<
4406 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
4407 fdomain_client::fidl::FDomainResourceDialect,
4408 0x7150b7898d1b1180,
4409 >(_buf?)?;
4410 Ok(_response.map(|x| x))
4411 }
4412 self.client.send_query_and_decode::<RealmOpenControllerRequest, RealmOpenControllerResult>(
4413 (child, controller),
4414 0x7150b7898d1b1180,
4415 fidl::encoding::DynamicFlags::empty(),
4416 _decode,
4417 )
4418 }
4419
4420 type OpenExposedDirResponseFut = fidl::client::QueryResponseFut<
4421 RealmOpenExposedDirResult,
4422 fdomain_client::fidl::FDomainResourceDialect,
4423 >;
4424 fn r#open_exposed_dir(
4425 &self,
4426 mut child: &fdomain_fuchsia_component_decl::ChildRef,
4427 mut exposed_dir: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
4428 ) -> Self::OpenExposedDirResponseFut {
4429 fn _decode(
4430 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4431 ) -> Result<RealmOpenExposedDirResult, fidl::Error> {
4432 let _response = fidl::client::decode_transaction_body::<
4433 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
4434 fdomain_client::fidl::FDomainResourceDialect,
4435 0x7f993235ca59f92c,
4436 >(_buf?)?;
4437 Ok(_response.map(|x| x))
4438 }
4439 self.client.send_query_and_decode::<RealmOpenExposedDirRequest, RealmOpenExposedDirResult>(
4440 (child, exposed_dir),
4441 0x7f993235ca59f92c,
4442 fidl::encoding::DynamicFlags::empty(),
4443 _decode,
4444 )
4445 }
4446
4447 type CreateChildResponseFut = fidl::client::QueryResponseFut<
4448 RealmCreateChildResult,
4449 fdomain_client::fidl::FDomainResourceDialect,
4450 >;
4451 fn r#create_child(
4452 &self,
4453 mut collection: &fdomain_fuchsia_component_decl::CollectionRef,
4454 mut decl: &fdomain_fuchsia_component_decl::Child,
4455 mut args: CreateChildArgs,
4456 ) -> Self::CreateChildResponseFut {
4457 fn _decode(
4458 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4459 ) -> Result<RealmCreateChildResult, fidl::Error> {
4460 let _response = fidl::client::decode_transaction_body::<
4461 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
4462 fdomain_client::fidl::FDomainResourceDialect,
4463 0x43e48ce8483d7560,
4464 >(_buf?)?;
4465 Ok(_response.map(|x| x))
4466 }
4467 self.client.send_query_and_decode::<RealmCreateChildRequest, RealmCreateChildResult>(
4468 (collection, decl, &mut args),
4469 0x43e48ce8483d7560,
4470 fidl::encoding::DynamicFlags::empty(),
4471 _decode,
4472 )
4473 }
4474
4475 type DestroyChildResponseFut = fidl::client::QueryResponseFut<
4476 RealmDestroyChildResult,
4477 fdomain_client::fidl::FDomainResourceDialect,
4478 >;
4479 fn r#destroy_child(
4480 &self,
4481 mut child: &fdomain_fuchsia_component_decl::ChildRef,
4482 ) -> Self::DestroyChildResponseFut {
4483 fn _decode(
4484 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4485 ) -> Result<RealmDestroyChildResult, fidl::Error> {
4486 let _response = fidl::client::decode_transaction_body::<
4487 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
4488 fdomain_client::fidl::FDomainResourceDialect,
4489 0x71d8caf8850c9222,
4490 >(_buf?)?;
4491 Ok(_response.map(|x| x))
4492 }
4493 self.client.send_query_and_decode::<RealmDestroyChildRequest, RealmDestroyChildResult>(
4494 (child,),
4495 0x71d8caf8850c9222,
4496 fidl::encoding::DynamicFlags::empty(),
4497 _decode,
4498 )
4499 }
4500
4501 type ListChildrenResponseFut = fidl::client::QueryResponseFut<
4502 RealmListChildrenResult,
4503 fdomain_client::fidl::FDomainResourceDialect,
4504 >;
4505 fn r#list_children(
4506 &self,
4507 mut collection: &fdomain_fuchsia_component_decl::CollectionRef,
4508 mut iter: fdomain_client::fidl::ServerEnd<ChildIteratorMarker>,
4509 ) -> Self::ListChildrenResponseFut {
4510 fn _decode(
4511 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4512 ) -> Result<RealmListChildrenResult, fidl::Error> {
4513 let _response = fidl::client::decode_transaction_body::<
4514 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
4515 fdomain_client::fidl::FDomainResourceDialect,
4516 0x6888a76683efc0a1,
4517 >(_buf?)?;
4518 Ok(_response.map(|x| x))
4519 }
4520 self.client.send_query_and_decode::<RealmListChildrenRequest, RealmListChildrenResult>(
4521 (collection, iter),
4522 0x6888a76683efc0a1,
4523 fidl::encoding::DynamicFlags::empty(),
4524 _decode,
4525 )
4526 }
4527
4528 type GetResolvedInfoResponseFut = fidl::client::QueryResponseFut<
4529 RealmGetResolvedInfoResult,
4530 fdomain_client::fidl::FDomainResourceDialect,
4531 >;
4532 fn r#get_resolved_info(&self) -> Self::GetResolvedInfoResponseFut {
4533 fn _decode(
4534 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4535 ) -> Result<RealmGetResolvedInfoResult, fidl::Error> {
4536 let _response = fidl::client::decode_transaction_body::<
4537 fidl::encoding::ResultType<RealmGetResolvedInfoResponse, Error>,
4538 fdomain_client::fidl::FDomainResourceDialect,
4539 0x734f744cb7d210a2,
4540 >(_buf?)?;
4541 Ok(_response.map(|x| x.resolved_info))
4542 }
4543 self.client
4544 .send_query_and_decode::<fidl::encoding::EmptyPayload, RealmGetResolvedInfoResult>(
4545 (),
4546 0x734f744cb7d210a2,
4547 fidl::encoding::DynamicFlags::empty(),
4548 _decode,
4549 )
4550 }
4551
4552 type GetChildOutputDictionaryDeprecatedResponseFut = fidl::client::QueryResponseFut<
4553 RealmGetChildOutputDictionaryDeprecatedResult,
4554 fdomain_client::fidl::FDomainResourceDialect,
4555 >;
4556 fn r#get_child_output_dictionary_deprecated(
4557 &self,
4558 mut child: &fdomain_fuchsia_component_decl::ChildRef,
4559 ) -> Self::GetChildOutputDictionaryDeprecatedResponseFut {
4560 fn _decode(
4561 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4562 ) -> Result<RealmGetChildOutputDictionaryDeprecatedResult, fidl::Error> {
4563 let _response = fidl::client::decode_transaction_body::<
4564 fidl::encoding::ResultType<RealmGetChildOutputDictionaryDeprecatedResponse, Error>,
4565 fdomain_client::fidl::FDomainResourceDialect,
4566 0x39245b02aba94364,
4567 >(_buf?)?;
4568 Ok(_response.map(|x| x.dictionary))
4569 }
4570 self.client.send_query_and_decode::<
4571 RealmGetChildOutputDictionaryDeprecatedRequest,
4572 RealmGetChildOutputDictionaryDeprecatedResult,
4573 >(
4574 (child,),
4575 0x39245b02aba94364,
4576 fidl::encoding::DynamicFlags::empty(),
4577 _decode,
4578 )
4579 }
4580
4581 type GetChildOutputDictionaryResponseFut = fidl::client::QueryResponseFut<
4582 RealmGetChildOutputDictionaryResult,
4583 fdomain_client::fidl::FDomainResourceDialect,
4584 >;
4585 fn r#get_child_output_dictionary(
4586 &self,
4587 mut child: &fdomain_fuchsia_component_decl::ChildRef,
4588 ) -> Self::GetChildOutputDictionaryResponseFut {
4589 fn _decode(
4590 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4591 ) -> Result<RealmGetChildOutputDictionaryResult, fidl::Error> {
4592 let _response = fidl::client::decode_transaction_body::<
4593 fidl::encoding::ResultType<RealmGetChildOutputDictionaryResponse, Error>,
4594 fdomain_client::fidl::FDomainResourceDialect,
4595 0x4259d08d261d5610,
4596 >(_buf?)?;
4597 Ok(_response.map(|x| x.dictionary))
4598 }
4599 self.client.send_query_and_decode::<
4600 RealmGetChildOutputDictionaryRequest,
4601 RealmGetChildOutputDictionaryResult,
4602 >(
4603 (child,),
4604 0x4259d08d261d5610,
4605 fidl::encoding::DynamicFlags::empty(),
4606 _decode,
4607 )
4608 }
4609}
4610
4611pub struct RealmEventStream {
4612 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
4613}
4614
4615impl std::marker::Unpin for RealmEventStream {}
4616
4617impl futures::stream::FusedStream for RealmEventStream {
4618 fn is_terminated(&self) -> bool {
4619 self.event_receiver.is_terminated()
4620 }
4621}
4622
4623impl futures::Stream for RealmEventStream {
4624 type Item = Result<RealmEvent, fidl::Error>;
4625
4626 fn poll_next(
4627 mut self: std::pin::Pin<&mut Self>,
4628 cx: &mut std::task::Context<'_>,
4629 ) -> std::task::Poll<Option<Self::Item>> {
4630 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4631 &mut self.event_receiver,
4632 cx
4633 )?) {
4634 Some(buf) => std::task::Poll::Ready(Some(RealmEvent::decode(buf))),
4635 None => std::task::Poll::Ready(None),
4636 }
4637 }
4638}
4639
4640#[derive(Debug)]
4641pub enum RealmEvent {}
4642
4643impl RealmEvent {
4644 fn decode(
4646 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4647 ) -> Result<RealmEvent, fidl::Error> {
4648 let (bytes, _handles) = buf.split_mut();
4649 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4650 debug_assert_eq!(tx_header.tx_id, 0);
4651 match tx_header.ordinal {
4652 _ => Err(fidl::Error::UnknownOrdinal {
4653 ordinal: tx_header.ordinal,
4654 protocol_name: <RealmMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4655 }),
4656 }
4657 }
4658}
4659
4660pub struct RealmRequestStream {
4662 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4663 is_terminated: bool,
4664}
4665
4666impl std::marker::Unpin for RealmRequestStream {}
4667
4668impl futures::stream::FusedStream for RealmRequestStream {
4669 fn is_terminated(&self) -> bool {
4670 self.is_terminated
4671 }
4672}
4673
4674impl fdomain_client::fidl::RequestStream for RealmRequestStream {
4675 type Protocol = RealmMarker;
4676 type ControlHandle = RealmControlHandle;
4677
4678 fn from_channel(channel: fdomain_client::Channel) -> Self {
4679 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4680 }
4681
4682 fn control_handle(&self) -> Self::ControlHandle {
4683 RealmControlHandle { inner: self.inner.clone() }
4684 }
4685
4686 fn into_inner(
4687 self,
4688 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
4689 {
4690 (self.inner, self.is_terminated)
4691 }
4692
4693 fn from_inner(
4694 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
4695 is_terminated: bool,
4696 ) -> Self {
4697 Self { inner, is_terminated }
4698 }
4699}
4700
4701impl futures::Stream for RealmRequestStream {
4702 type Item = Result<RealmRequest, fidl::Error>;
4703
4704 fn poll_next(
4705 mut self: std::pin::Pin<&mut Self>,
4706 cx: &mut std::task::Context<'_>,
4707 ) -> std::task::Poll<Option<Self::Item>> {
4708 let this = &mut *self;
4709 if this.inner.check_shutdown(cx) {
4710 this.is_terminated = true;
4711 return std::task::Poll::Ready(None);
4712 }
4713 if this.is_terminated {
4714 panic!("polled RealmRequestStream after completion");
4715 }
4716 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
4717 |bytes, handles| {
4718 match this.inner.channel().read_etc(cx, bytes, handles) {
4719 std::task::Poll::Ready(Ok(())) => {}
4720 std::task::Poll::Pending => return std::task::Poll::Pending,
4721 std::task::Poll::Ready(Err(None)) => {
4722 this.is_terminated = true;
4723 return std::task::Poll::Ready(None);
4724 }
4725 std::task::Poll::Ready(Err(Some(e))) => {
4726 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4727 e.into(),
4728 ))));
4729 }
4730 }
4731
4732 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4734
4735 std::task::Poll::Ready(Some(match header.ordinal {
4736 0x7150b7898d1b1180 => {
4737 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4738 let mut req = fidl::new_empty!(
4739 RealmOpenControllerRequest,
4740 fdomain_client::fidl::FDomainResourceDialect
4741 );
4742 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmOpenControllerRequest>(&header, _body_bytes, handles, &mut req)?;
4743 let control_handle = RealmControlHandle { inner: this.inner.clone() };
4744 Ok(RealmRequest::OpenController {
4745 child: req.child,
4746 controller: req.controller,
4747
4748 responder: RealmOpenControllerResponder {
4749 control_handle: std::mem::ManuallyDrop::new(control_handle),
4750 tx_id: header.tx_id,
4751 },
4752 })
4753 }
4754 0x7f993235ca59f92c => {
4755 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4756 let mut req = fidl::new_empty!(
4757 RealmOpenExposedDirRequest,
4758 fdomain_client::fidl::FDomainResourceDialect
4759 );
4760 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmOpenExposedDirRequest>(&header, _body_bytes, handles, &mut req)?;
4761 let control_handle = RealmControlHandle { inner: this.inner.clone() };
4762 Ok(RealmRequest::OpenExposedDir {
4763 child: req.child,
4764 exposed_dir: req.exposed_dir,
4765
4766 responder: RealmOpenExposedDirResponder {
4767 control_handle: std::mem::ManuallyDrop::new(control_handle),
4768 tx_id: header.tx_id,
4769 },
4770 })
4771 }
4772 0x43e48ce8483d7560 => {
4773 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4774 let mut req = fidl::new_empty!(
4775 RealmCreateChildRequest,
4776 fdomain_client::fidl::FDomainResourceDialect
4777 );
4778 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmCreateChildRequest>(&header, _body_bytes, handles, &mut req)?;
4779 let control_handle = RealmControlHandle { inner: this.inner.clone() };
4780 Ok(RealmRequest::CreateChild {
4781 collection: req.collection,
4782 decl: req.decl,
4783 args: req.args,
4784
4785 responder: RealmCreateChildResponder {
4786 control_handle: std::mem::ManuallyDrop::new(control_handle),
4787 tx_id: header.tx_id,
4788 },
4789 })
4790 }
4791 0x71d8caf8850c9222 => {
4792 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4793 let mut req = fidl::new_empty!(
4794 RealmDestroyChildRequest,
4795 fdomain_client::fidl::FDomainResourceDialect
4796 );
4797 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmDestroyChildRequest>(&header, _body_bytes, handles, &mut req)?;
4798 let control_handle = RealmControlHandle { inner: this.inner.clone() };
4799 Ok(RealmRequest::DestroyChild {
4800 child: req.child,
4801
4802 responder: RealmDestroyChildResponder {
4803 control_handle: std::mem::ManuallyDrop::new(control_handle),
4804 tx_id: header.tx_id,
4805 },
4806 })
4807 }
4808 0x6888a76683efc0a1 => {
4809 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4810 let mut req = fidl::new_empty!(
4811 RealmListChildrenRequest,
4812 fdomain_client::fidl::FDomainResourceDialect
4813 );
4814 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmListChildrenRequest>(&header, _body_bytes, handles, &mut req)?;
4815 let control_handle = RealmControlHandle { inner: this.inner.clone() };
4816 Ok(RealmRequest::ListChildren {
4817 collection: req.collection,
4818 iter: req.iter,
4819
4820 responder: RealmListChildrenResponder {
4821 control_handle: std::mem::ManuallyDrop::new(control_handle),
4822 tx_id: header.tx_id,
4823 },
4824 })
4825 }
4826 0x734f744cb7d210a2 => {
4827 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4828 let mut req = fidl::new_empty!(
4829 fidl::encoding::EmptyPayload,
4830 fdomain_client::fidl::FDomainResourceDialect
4831 );
4832 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4833 let control_handle = RealmControlHandle { inner: this.inner.clone() };
4834 Ok(RealmRequest::GetResolvedInfo {
4835 responder: RealmGetResolvedInfoResponder {
4836 control_handle: std::mem::ManuallyDrop::new(control_handle),
4837 tx_id: header.tx_id,
4838 },
4839 })
4840 }
4841 0x39245b02aba94364 => {
4842 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4843 let mut req = fidl::new_empty!(
4844 RealmGetChildOutputDictionaryDeprecatedRequest,
4845 fdomain_client::fidl::FDomainResourceDialect
4846 );
4847 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmGetChildOutputDictionaryDeprecatedRequest>(&header, _body_bytes, handles, &mut req)?;
4848 let control_handle = RealmControlHandle { inner: this.inner.clone() };
4849 Ok(RealmRequest::GetChildOutputDictionaryDeprecated {
4850 child: req.child,
4851
4852 responder: RealmGetChildOutputDictionaryDeprecatedResponder {
4853 control_handle: std::mem::ManuallyDrop::new(control_handle),
4854 tx_id: header.tx_id,
4855 },
4856 })
4857 }
4858 0x4259d08d261d5610 => {
4859 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4860 let mut req = fidl::new_empty!(
4861 RealmGetChildOutputDictionaryRequest,
4862 fdomain_client::fidl::FDomainResourceDialect
4863 );
4864 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<RealmGetChildOutputDictionaryRequest>(&header, _body_bytes, handles, &mut req)?;
4865 let control_handle = RealmControlHandle { inner: this.inner.clone() };
4866 Ok(RealmRequest::GetChildOutputDictionary {
4867 child: req.child,
4868
4869 responder: RealmGetChildOutputDictionaryResponder {
4870 control_handle: std::mem::ManuallyDrop::new(control_handle),
4871 tx_id: header.tx_id,
4872 },
4873 })
4874 }
4875 _ => Err(fidl::Error::UnknownOrdinal {
4876 ordinal: header.ordinal,
4877 protocol_name:
4878 <RealmMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
4879 }),
4880 }))
4881 },
4882 )
4883 }
4884}
4885
4886#[derive(Debug)]
4896pub enum RealmRequest {
4897 OpenController {
4904 child: fdomain_fuchsia_component_decl::ChildRef,
4905 controller: fdomain_client::fidl::ServerEnd<ControllerMarker>,
4906 responder: RealmOpenControllerResponder,
4907 },
4908 OpenExposedDir {
4923 child: fdomain_fuchsia_component_decl::ChildRef,
4924 exposed_dir: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
4925 responder: RealmOpenExposedDirResponder,
4926 },
4927 CreateChild {
4948 collection: fdomain_fuchsia_component_decl::CollectionRef,
4949 decl: fdomain_fuchsia_component_decl::Child,
4950 args: CreateChildArgs,
4951 responder: RealmCreateChildResponder,
4952 },
4953 DestroyChild {
4965 child: fdomain_fuchsia_component_decl::ChildRef,
4966 responder: RealmDestroyChildResponder,
4967 },
4968 ListChildren {
4982 collection: fdomain_fuchsia_component_decl::CollectionRef,
4983 iter: fdomain_client::fidl::ServerEnd<ChildIteratorMarker>,
4984 responder: RealmListChildrenResponder,
4985 },
4986 GetResolvedInfo { responder: RealmGetResolvedInfoResponder },
4989 GetChildOutputDictionaryDeprecated {
4990 child: fdomain_fuchsia_component_decl::ChildRef,
4991 responder: RealmGetChildOutputDictionaryDeprecatedResponder,
4992 },
4993 GetChildOutputDictionary {
4996 child: fdomain_fuchsia_component_decl::ChildRef,
4997 responder: RealmGetChildOutputDictionaryResponder,
4998 },
4999}
5000
5001impl RealmRequest {
5002 #[allow(irrefutable_let_patterns)]
5003 pub fn into_open_controller(
5004 self,
5005 ) -> Option<(
5006 fdomain_fuchsia_component_decl::ChildRef,
5007 fdomain_client::fidl::ServerEnd<ControllerMarker>,
5008 RealmOpenControllerResponder,
5009 )> {
5010 if let RealmRequest::OpenController { child, controller, responder } = self {
5011 Some((child, controller, responder))
5012 } else {
5013 None
5014 }
5015 }
5016
5017 #[allow(irrefutable_let_patterns)]
5018 pub fn into_open_exposed_dir(
5019 self,
5020 ) -> Option<(
5021 fdomain_fuchsia_component_decl::ChildRef,
5022 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
5023 RealmOpenExposedDirResponder,
5024 )> {
5025 if let RealmRequest::OpenExposedDir { child, exposed_dir, responder } = self {
5026 Some((child, exposed_dir, responder))
5027 } else {
5028 None
5029 }
5030 }
5031
5032 #[allow(irrefutable_let_patterns)]
5033 pub fn into_create_child(
5034 self,
5035 ) -> Option<(
5036 fdomain_fuchsia_component_decl::CollectionRef,
5037 fdomain_fuchsia_component_decl::Child,
5038 CreateChildArgs,
5039 RealmCreateChildResponder,
5040 )> {
5041 if let RealmRequest::CreateChild { collection, decl, args, responder } = self {
5042 Some((collection, decl, args, responder))
5043 } else {
5044 None
5045 }
5046 }
5047
5048 #[allow(irrefutable_let_patterns)]
5049 pub fn into_destroy_child(
5050 self,
5051 ) -> Option<(fdomain_fuchsia_component_decl::ChildRef, RealmDestroyChildResponder)> {
5052 if let RealmRequest::DestroyChild { child, responder } = self {
5053 Some((child, responder))
5054 } else {
5055 None
5056 }
5057 }
5058
5059 #[allow(irrefutable_let_patterns)]
5060 pub fn into_list_children(
5061 self,
5062 ) -> Option<(
5063 fdomain_fuchsia_component_decl::CollectionRef,
5064 fdomain_client::fidl::ServerEnd<ChildIteratorMarker>,
5065 RealmListChildrenResponder,
5066 )> {
5067 if let RealmRequest::ListChildren { collection, iter, responder } = self {
5068 Some((collection, iter, responder))
5069 } else {
5070 None
5071 }
5072 }
5073
5074 #[allow(irrefutable_let_patterns)]
5075 pub fn into_get_resolved_info(self) -> Option<(RealmGetResolvedInfoResponder)> {
5076 if let RealmRequest::GetResolvedInfo { responder } = self {
5077 Some((responder))
5078 } else {
5079 None
5080 }
5081 }
5082
5083 #[allow(irrefutable_let_patterns)]
5084 pub fn into_get_child_output_dictionary_deprecated(
5085 self,
5086 ) -> Option<(
5087 fdomain_fuchsia_component_decl::ChildRef,
5088 RealmGetChildOutputDictionaryDeprecatedResponder,
5089 )> {
5090 if let RealmRequest::GetChildOutputDictionaryDeprecated { child, responder } = self {
5091 Some((child, responder))
5092 } else {
5093 None
5094 }
5095 }
5096
5097 #[allow(irrefutable_let_patterns)]
5098 pub fn into_get_child_output_dictionary(
5099 self,
5100 ) -> Option<(fdomain_fuchsia_component_decl::ChildRef, RealmGetChildOutputDictionaryResponder)>
5101 {
5102 if let RealmRequest::GetChildOutputDictionary { child, responder } = self {
5103 Some((child, responder))
5104 } else {
5105 None
5106 }
5107 }
5108
5109 pub fn method_name(&self) -> &'static str {
5111 match *self {
5112 RealmRequest::OpenController { .. } => "open_controller",
5113 RealmRequest::OpenExposedDir { .. } => "open_exposed_dir",
5114 RealmRequest::CreateChild { .. } => "create_child",
5115 RealmRequest::DestroyChild { .. } => "destroy_child",
5116 RealmRequest::ListChildren { .. } => "list_children",
5117 RealmRequest::GetResolvedInfo { .. } => "get_resolved_info",
5118 RealmRequest::GetChildOutputDictionaryDeprecated { .. } => {
5119 "get_child_output_dictionary_deprecated"
5120 }
5121 RealmRequest::GetChildOutputDictionary { .. } => "get_child_output_dictionary",
5122 }
5123 }
5124}
5125
5126#[derive(Debug, Clone)]
5127pub struct RealmControlHandle {
5128 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5129}
5130
5131impl RealmControlHandle {
5132 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
5133 self.inner.shutdown_with_epitaph(status.into())
5134 }
5135}
5136
5137impl fdomain_client::fidl::ControlHandle for RealmControlHandle {
5138 fn shutdown(&self) {
5139 self.inner.shutdown()
5140 }
5141
5142 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
5143 self.inner.shutdown_with_epitaph(status)
5144 }
5145
5146 fn is_closed(&self) -> bool {
5147 self.inner.channel().is_closed()
5148 }
5149 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5150 self.inner.channel().on_closed()
5151 }
5152}
5153
5154impl RealmControlHandle {}
5155
5156#[must_use = "FIDL methods require a response to be sent"]
5157#[derive(Debug)]
5158pub struct RealmOpenControllerResponder {
5159 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
5160 tx_id: u32,
5161}
5162
5163impl std::ops::Drop for RealmOpenControllerResponder {
5167 fn drop(&mut self) {
5168 self.control_handle.shutdown();
5169 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5171 }
5172}
5173
5174impl fdomain_client::fidl::Responder for RealmOpenControllerResponder {
5175 type ControlHandle = RealmControlHandle;
5176
5177 fn control_handle(&self) -> &RealmControlHandle {
5178 &self.control_handle
5179 }
5180
5181 fn drop_without_shutdown(mut self) {
5182 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5184 std::mem::forget(self);
5186 }
5187}
5188
5189impl RealmOpenControllerResponder {
5190 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5194 let _result = self.send_raw(result);
5195 if _result.is_err() {
5196 self.control_handle.shutdown();
5197 }
5198 self.drop_without_shutdown();
5199 _result
5200 }
5201
5202 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5204 let _result = self.send_raw(result);
5205 self.drop_without_shutdown();
5206 _result
5207 }
5208
5209 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5210 self.control_handle
5211 .inner
5212 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
5213 result,
5214 self.tx_id,
5215 0x7150b7898d1b1180,
5216 fidl::encoding::DynamicFlags::empty(),
5217 )
5218 }
5219}
5220
5221#[must_use = "FIDL methods require a response to be sent"]
5222#[derive(Debug)]
5223pub struct RealmOpenExposedDirResponder {
5224 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
5225 tx_id: u32,
5226}
5227
5228impl std::ops::Drop for RealmOpenExposedDirResponder {
5232 fn drop(&mut self) {
5233 self.control_handle.shutdown();
5234 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5236 }
5237}
5238
5239impl fdomain_client::fidl::Responder for RealmOpenExposedDirResponder {
5240 type ControlHandle = RealmControlHandle;
5241
5242 fn control_handle(&self) -> &RealmControlHandle {
5243 &self.control_handle
5244 }
5245
5246 fn drop_without_shutdown(mut self) {
5247 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5249 std::mem::forget(self);
5251 }
5252}
5253
5254impl RealmOpenExposedDirResponder {
5255 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5259 let _result = self.send_raw(result);
5260 if _result.is_err() {
5261 self.control_handle.shutdown();
5262 }
5263 self.drop_without_shutdown();
5264 _result
5265 }
5266
5267 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5269 let _result = self.send_raw(result);
5270 self.drop_without_shutdown();
5271 _result
5272 }
5273
5274 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5275 self.control_handle
5276 .inner
5277 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
5278 result,
5279 self.tx_id,
5280 0x7f993235ca59f92c,
5281 fidl::encoding::DynamicFlags::empty(),
5282 )
5283 }
5284}
5285
5286#[must_use = "FIDL methods require a response to be sent"]
5287#[derive(Debug)]
5288pub struct RealmCreateChildResponder {
5289 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
5290 tx_id: u32,
5291}
5292
5293impl std::ops::Drop for RealmCreateChildResponder {
5297 fn drop(&mut self) {
5298 self.control_handle.shutdown();
5299 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5301 }
5302}
5303
5304impl fdomain_client::fidl::Responder for RealmCreateChildResponder {
5305 type ControlHandle = RealmControlHandle;
5306
5307 fn control_handle(&self) -> &RealmControlHandle {
5308 &self.control_handle
5309 }
5310
5311 fn drop_without_shutdown(mut self) {
5312 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5314 std::mem::forget(self);
5316 }
5317}
5318
5319impl RealmCreateChildResponder {
5320 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5324 let _result = self.send_raw(result);
5325 if _result.is_err() {
5326 self.control_handle.shutdown();
5327 }
5328 self.drop_without_shutdown();
5329 _result
5330 }
5331
5332 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5334 let _result = self.send_raw(result);
5335 self.drop_without_shutdown();
5336 _result
5337 }
5338
5339 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5340 self.control_handle
5341 .inner
5342 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
5343 result,
5344 self.tx_id,
5345 0x43e48ce8483d7560,
5346 fidl::encoding::DynamicFlags::empty(),
5347 )
5348 }
5349}
5350
5351#[must_use = "FIDL methods require a response to be sent"]
5352#[derive(Debug)]
5353pub struct RealmDestroyChildResponder {
5354 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
5355 tx_id: u32,
5356}
5357
5358impl std::ops::Drop for RealmDestroyChildResponder {
5362 fn drop(&mut self) {
5363 self.control_handle.shutdown();
5364 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5366 }
5367}
5368
5369impl fdomain_client::fidl::Responder for RealmDestroyChildResponder {
5370 type ControlHandle = RealmControlHandle;
5371
5372 fn control_handle(&self) -> &RealmControlHandle {
5373 &self.control_handle
5374 }
5375
5376 fn drop_without_shutdown(mut self) {
5377 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5379 std::mem::forget(self);
5381 }
5382}
5383
5384impl RealmDestroyChildResponder {
5385 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5389 let _result = self.send_raw(result);
5390 if _result.is_err() {
5391 self.control_handle.shutdown();
5392 }
5393 self.drop_without_shutdown();
5394 _result
5395 }
5396
5397 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5399 let _result = self.send_raw(result);
5400 self.drop_without_shutdown();
5401 _result
5402 }
5403
5404 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5405 self.control_handle
5406 .inner
5407 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
5408 result,
5409 self.tx_id,
5410 0x71d8caf8850c9222,
5411 fidl::encoding::DynamicFlags::empty(),
5412 )
5413 }
5414}
5415
5416#[must_use = "FIDL methods require a response to be sent"]
5417#[derive(Debug)]
5418pub struct RealmListChildrenResponder {
5419 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
5420 tx_id: u32,
5421}
5422
5423impl std::ops::Drop for RealmListChildrenResponder {
5427 fn drop(&mut self) {
5428 self.control_handle.shutdown();
5429 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5431 }
5432}
5433
5434impl fdomain_client::fidl::Responder for RealmListChildrenResponder {
5435 type ControlHandle = RealmControlHandle;
5436
5437 fn control_handle(&self) -> &RealmControlHandle {
5438 &self.control_handle
5439 }
5440
5441 fn drop_without_shutdown(mut self) {
5442 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5444 std::mem::forget(self);
5446 }
5447}
5448
5449impl RealmListChildrenResponder {
5450 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5454 let _result = self.send_raw(result);
5455 if _result.is_err() {
5456 self.control_handle.shutdown();
5457 }
5458 self.drop_without_shutdown();
5459 _result
5460 }
5461
5462 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5464 let _result = self.send_raw(result);
5465 self.drop_without_shutdown();
5466 _result
5467 }
5468
5469 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
5470 self.control_handle
5471 .inner
5472 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
5473 result,
5474 self.tx_id,
5475 0x6888a76683efc0a1,
5476 fidl::encoding::DynamicFlags::empty(),
5477 )
5478 }
5479}
5480
5481#[must_use = "FIDL methods require a response to be sent"]
5482#[derive(Debug)]
5483pub struct RealmGetResolvedInfoResponder {
5484 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
5485 tx_id: u32,
5486}
5487
5488impl std::ops::Drop for RealmGetResolvedInfoResponder {
5492 fn drop(&mut self) {
5493 self.control_handle.shutdown();
5494 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5496 }
5497}
5498
5499impl fdomain_client::fidl::Responder for RealmGetResolvedInfoResponder {
5500 type ControlHandle = RealmControlHandle;
5501
5502 fn control_handle(&self) -> &RealmControlHandle {
5503 &self.control_handle
5504 }
5505
5506 fn drop_without_shutdown(mut self) {
5507 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5509 std::mem::forget(self);
5511 }
5512}
5513
5514impl RealmGetResolvedInfoResponder {
5515 pub fn send(
5519 self,
5520 mut result: Result<fdomain_fuchsia_component_resolution::Component, Error>,
5521 ) -> Result<(), fidl::Error> {
5522 let _result = self.send_raw(result);
5523 if _result.is_err() {
5524 self.control_handle.shutdown();
5525 }
5526 self.drop_without_shutdown();
5527 _result
5528 }
5529
5530 pub fn send_no_shutdown_on_err(
5532 self,
5533 mut result: Result<fdomain_fuchsia_component_resolution::Component, Error>,
5534 ) -> Result<(), fidl::Error> {
5535 let _result = self.send_raw(result);
5536 self.drop_without_shutdown();
5537 _result
5538 }
5539
5540 fn send_raw(
5541 &self,
5542 mut result: Result<fdomain_fuchsia_component_resolution::Component, Error>,
5543 ) -> Result<(), fidl::Error> {
5544 self.control_handle
5545 .inner
5546 .send::<fidl::encoding::ResultType<RealmGetResolvedInfoResponse, Error>>(
5547 result.as_mut().map_err(|e| *e).map(|resolved_info| (resolved_info,)),
5548 self.tx_id,
5549 0x734f744cb7d210a2,
5550 fidl::encoding::DynamicFlags::empty(),
5551 )
5552 }
5553}
5554
5555#[must_use = "FIDL methods require a response to be sent"]
5556#[derive(Debug)]
5557pub struct RealmGetChildOutputDictionaryDeprecatedResponder {
5558 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
5559 tx_id: u32,
5560}
5561
5562impl std::ops::Drop for RealmGetChildOutputDictionaryDeprecatedResponder {
5566 fn drop(&mut self) {
5567 self.control_handle.shutdown();
5568 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5570 }
5571}
5572
5573impl fdomain_client::fidl::Responder for RealmGetChildOutputDictionaryDeprecatedResponder {
5574 type ControlHandle = RealmControlHandle;
5575
5576 fn control_handle(&self) -> &RealmControlHandle {
5577 &self.control_handle
5578 }
5579
5580 fn drop_without_shutdown(mut self) {
5581 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5583 std::mem::forget(self);
5585 }
5586}
5587
5588impl RealmGetChildOutputDictionaryDeprecatedResponder {
5589 pub fn send(
5593 self,
5594 mut result: Result<fdomain_fuchsia_component_sandbox::DictionaryRef, Error>,
5595 ) -> Result<(), fidl::Error> {
5596 let _result = self.send_raw(result);
5597 if _result.is_err() {
5598 self.control_handle.shutdown();
5599 }
5600 self.drop_without_shutdown();
5601 _result
5602 }
5603
5604 pub fn send_no_shutdown_on_err(
5606 self,
5607 mut result: Result<fdomain_fuchsia_component_sandbox::DictionaryRef, Error>,
5608 ) -> Result<(), fidl::Error> {
5609 let _result = self.send_raw(result);
5610 self.drop_without_shutdown();
5611 _result
5612 }
5613
5614 fn send_raw(
5615 &self,
5616 mut result: Result<fdomain_fuchsia_component_sandbox::DictionaryRef, Error>,
5617 ) -> Result<(), fidl::Error> {
5618 self.control_handle.inner.send::<fidl::encoding::ResultType<
5619 RealmGetChildOutputDictionaryDeprecatedResponse,
5620 Error,
5621 >>(
5622 result.as_mut().map_err(|e| *e).map(|dictionary| (dictionary,)),
5623 self.tx_id,
5624 0x39245b02aba94364,
5625 fidl::encoding::DynamicFlags::empty(),
5626 )
5627 }
5628}
5629
5630#[must_use = "FIDL methods require a response to be sent"]
5631#[derive(Debug)]
5632pub struct RealmGetChildOutputDictionaryResponder {
5633 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
5634 tx_id: u32,
5635}
5636
5637impl std::ops::Drop for RealmGetChildOutputDictionaryResponder {
5641 fn drop(&mut self) {
5642 self.control_handle.shutdown();
5643 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5645 }
5646}
5647
5648impl fdomain_client::fidl::Responder for RealmGetChildOutputDictionaryResponder {
5649 type ControlHandle = RealmControlHandle;
5650
5651 fn control_handle(&self) -> &RealmControlHandle {
5652 &self.control_handle
5653 }
5654
5655 fn drop_without_shutdown(mut self) {
5656 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5658 std::mem::forget(self);
5660 }
5661}
5662
5663impl RealmGetChildOutputDictionaryResponder {
5664 pub fn send(
5668 self,
5669 mut result: Result<fdomain_client::EventPair, Error>,
5670 ) -> Result<(), fidl::Error> {
5671 let _result = self.send_raw(result);
5672 if _result.is_err() {
5673 self.control_handle.shutdown();
5674 }
5675 self.drop_without_shutdown();
5676 _result
5677 }
5678
5679 pub fn send_no_shutdown_on_err(
5681 self,
5682 mut result: Result<fdomain_client::EventPair, Error>,
5683 ) -> Result<(), fidl::Error> {
5684 let _result = self.send_raw(result);
5685 self.drop_without_shutdown();
5686 _result
5687 }
5688
5689 fn send_raw(
5690 &self,
5691 mut result: Result<fdomain_client::EventPair, Error>,
5692 ) -> Result<(), fidl::Error> {
5693 self.control_handle.inner.send::<fidl::encoding::ResultType<
5694 RealmGetChildOutputDictionaryResponse,
5695 Error,
5696 >>(
5697 result.map(|dictionary| (dictionary,)),
5698 self.tx_id,
5699 0x4259d08d261d5610,
5700 fidl::encoding::DynamicFlags::empty(),
5701 )
5702 }
5703}
5704
5705#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5706pub struct StorageAdminMarker;
5707
5708impl fdomain_client::fidl::ProtocolMarker for StorageAdminMarker {
5709 type Proxy = StorageAdminProxy;
5710 type RequestStream = StorageAdminRequestStream;
5711
5712 const DEBUG_NAME: &'static str = "fuchsia.component.StorageAdmin";
5713}
5714impl fdomain_client::fidl::DiscoverableProtocolMarker for StorageAdminMarker {}
5715pub type StorageAdminOpenStorageResult = Result<(), Error>;
5716pub type StorageAdminListStorageInRealmResult = Result<(), Error>;
5717pub type StorageAdminOpenComponentStorageByIdResult = Result<(), Error>;
5718pub type StorageAdminDeleteComponentStorageResult = Result<(), Error>;
5719pub type StorageAdminGetStatusResult = Result<StorageStatus, StatusError>;
5720pub type StorageAdminDeleteAllStorageContentsResult = Result<(), DeletionError>;
5721
5722pub trait StorageAdminProxyInterface: Send + Sync {
5723 type OpenStorageResponseFut: std::future::Future<Output = Result<StorageAdminOpenStorageResult, fidl::Error>>
5724 + Send;
5725 fn r#open_storage(
5726 &self,
5727 relative_moniker: &str,
5728 object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
5729 ) -> Self::OpenStorageResponseFut;
5730 type ListStorageInRealmResponseFut: std::future::Future<Output = Result<StorageAdminListStorageInRealmResult, fidl::Error>>
5731 + Send;
5732 fn r#list_storage_in_realm(
5733 &self,
5734 relative_moniker: &str,
5735 iterator: fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
5736 ) -> Self::ListStorageInRealmResponseFut;
5737 type OpenComponentStorageByIdResponseFut: std::future::Future<
5738 Output = Result<StorageAdminOpenComponentStorageByIdResult, fidl::Error>,
5739 > + Send;
5740 fn r#open_component_storage_by_id(
5741 &self,
5742 id: &str,
5743 object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
5744 ) -> Self::OpenComponentStorageByIdResponseFut;
5745 type DeleteComponentStorageResponseFut: std::future::Future<Output = Result<StorageAdminDeleteComponentStorageResult, fidl::Error>>
5746 + Send;
5747 fn r#delete_component_storage(
5748 &self,
5749 relative_moniker: &str,
5750 ) -> Self::DeleteComponentStorageResponseFut;
5751 type GetStatusResponseFut: std::future::Future<Output = Result<StorageAdminGetStatusResult, fidl::Error>>
5752 + Send;
5753 fn r#get_status(&self) -> Self::GetStatusResponseFut;
5754 type DeleteAllStorageContentsResponseFut: std::future::Future<
5755 Output = Result<StorageAdminDeleteAllStorageContentsResult, fidl::Error>,
5756 > + Send;
5757 fn r#delete_all_storage_contents(&self) -> Self::DeleteAllStorageContentsResponseFut;
5758}
5759
5760#[derive(Debug, Clone)]
5761pub struct StorageAdminProxy {
5762 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5763}
5764
5765impl fdomain_client::fidl::Proxy for StorageAdminProxy {
5766 type Protocol = StorageAdminMarker;
5767
5768 fn from_channel(inner: fdomain_client::Channel) -> Self {
5769 Self::new(inner)
5770 }
5771
5772 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5773 self.client.into_channel().map_err(|client| Self { client })
5774 }
5775
5776 fn as_channel(&self) -> &fdomain_client::Channel {
5777 self.client.as_channel()
5778 }
5779}
5780
5781impl StorageAdminProxy {
5782 pub fn new(channel: fdomain_client::Channel) -> Self {
5784 let protocol_name =
5785 <StorageAdminMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5786 Self { client: fidl::client::Client::new(channel, protocol_name) }
5787 }
5788
5789 pub fn take_event_stream(&self) -> StorageAdminEventStream {
5795 StorageAdminEventStream { event_receiver: self.client.take_event_receiver() }
5796 }
5797
5798 pub fn r#open_storage(
5803 &self,
5804 mut relative_moniker: &str,
5805 mut object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
5806 ) -> fidl::client::QueryResponseFut<
5807 StorageAdminOpenStorageResult,
5808 fdomain_client::fidl::FDomainResourceDialect,
5809 > {
5810 StorageAdminProxyInterface::r#open_storage(self, relative_moniker, object)
5811 }
5812
5813 pub fn r#list_storage_in_realm(
5820 &self,
5821 mut relative_moniker: &str,
5822 mut iterator: fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
5823 ) -> fidl::client::QueryResponseFut<
5824 StorageAdminListStorageInRealmResult,
5825 fdomain_client::fidl::FDomainResourceDialect,
5826 > {
5827 StorageAdminProxyInterface::r#list_storage_in_realm(self, relative_moniker, iterator)
5828 }
5829
5830 pub fn r#open_component_storage_by_id(
5833 &self,
5834 mut id: &str,
5835 mut object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
5836 ) -> fidl::client::QueryResponseFut<
5837 StorageAdminOpenComponentStorageByIdResult,
5838 fdomain_client::fidl::FDomainResourceDialect,
5839 > {
5840 StorageAdminProxyInterface::r#open_component_storage_by_id(self, id, object)
5841 }
5842
5843 pub fn r#delete_component_storage(
5848 &self,
5849 mut relative_moniker: &str,
5850 ) -> fidl::client::QueryResponseFut<
5851 StorageAdminDeleteComponentStorageResult,
5852 fdomain_client::fidl::FDomainResourceDialect,
5853 > {
5854 StorageAdminProxyInterface::r#delete_component_storage(self, relative_moniker)
5855 }
5856
5857 pub fn r#get_status(
5859 &self,
5860 ) -> fidl::client::QueryResponseFut<
5861 StorageAdminGetStatusResult,
5862 fdomain_client::fidl::FDomainResourceDialect,
5863 > {
5864 StorageAdminProxyInterface::r#get_status(self)
5865 }
5866
5867 pub fn r#delete_all_storage_contents(
5875 &self,
5876 ) -> fidl::client::QueryResponseFut<
5877 StorageAdminDeleteAllStorageContentsResult,
5878 fdomain_client::fidl::FDomainResourceDialect,
5879 > {
5880 StorageAdminProxyInterface::r#delete_all_storage_contents(self)
5881 }
5882}
5883
5884impl StorageAdminProxyInterface for StorageAdminProxy {
5885 type OpenStorageResponseFut = fidl::client::QueryResponseFut<
5886 StorageAdminOpenStorageResult,
5887 fdomain_client::fidl::FDomainResourceDialect,
5888 >;
5889 fn r#open_storage(
5890 &self,
5891 mut relative_moniker: &str,
5892 mut object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
5893 ) -> Self::OpenStorageResponseFut {
5894 fn _decode(
5895 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5896 ) -> Result<StorageAdminOpenStorageResult, fidl::Error> {
5897 let _response = fidl::client::decode_transaction_body::<
5898 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
5899 fdomain_client::fidl::FDomainResourceDialect,
5900 0x6ceaa5904cfe4377,
5901 >(_buf?)?;
5902 Ok(_response.map(|x| x))
5903 }
5904 self.client
5905 .send_query_and_decode::<StorageAdminOpenStorageRequest, StorageAdminOpenStorageResult>(
5906 (relative_moniker, object),
5907 0x6ceaa5904cfe4377,
5908 fidl::encoding::DynamicFlags::empty(),
5909 _decode,
5910 )
5911 }
5912
5913 type ListStorageInRealmResponseFut = fidl::client::QueryResponseFut<
5914 StorageAdminListStorageInRealmResult,
5915 fdomain_client::fidl::FDomainResourceDialect,
5916 >;
5917 fn r#list_storage_in_realm(
5918 &self,
5919 mut relative_moniker: &str,
5920 mut iterator: fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
5921 ) -> Self::ListStorageInRealmResponseFut {
5922 fn _decode(
5923 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5924 ) -> Result<StorageAdminListStorageInRealmResult, fidl::Error> {
5925 let _response = fidl::client::decode_transaction_body::<
5926 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
5927 fdomain_client::fidl::FDomainResourceDialect,
5928 0x764f6d1f083e8bfb,
5929 >(_buf?)?;
5930 Ok(_response.map(|x| x))
5931 }
5932 self.client.send_query_and_decode::<
5933 StorageAdminListStorageInRealmRequest,
5934 StorageAdminListStorageInRealmResult,
5935 >(
5936 (relative_moniker, iterator,),
5937 0x764f6d1f083e8bfb,
5938 fidl::encoding::DynamicFlags::empty(),
5939 _decode,
5940 )
5941 }
5942
5943 type OpenComponentStorageByIdResponseFut = fidl::client::QueryResponseFut<
5944 StorageAdminOpenComponentStorageByIdResult,
5945 fdomain_client::fidl::FDomainResourceDialect,
5946 >;
5947 fn r#open_component_storage_by_id(
5948 &self,
5949 mut id: &str,
5950 mut object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
5951 ) -> Self::OpenComponentStorageByIdResponseFut {
5952 fn _decode(
5953 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5954 ) -> Result<StorageAdminOpenComponentStorageByIdResult, fidl::Error> {
5955 let _response = fidl::client::decode_transaction_body::<
5956 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
5957 fdomain_client::fidl::FDomainResourceDialect,
5958 0x4802102cc55d5df1,
5959 >(_buf?)?;
5960 Ok(_response.map(|x| x))
5961 }
5962 self.client.send_query_and_decode::<
5963 StorageAdminOpenComponentStorageByIdRequest,
5964 StorageAdminOpenComponentStorageByIdResult,
5965 >(
5966 (id, object,),
5967 0x4802102cc55d5df1,
5968 fidl::encoding::DynamicFlags::empty(),
5969 _decode,
5970 )
5971 }
5972
5973 type DeleteComponentStorageResponseFut = fidl::client::QueryResponseFut<
5974 StorageAdminDeleteComponentStorageResult,
5975 fdomain_client::fidl::FDomainResourceDialect,
5976 >;
5977 fn r#delete_component_storage(
5978 &self,
5979 mut relative_moniker: &str,
5980 ) -> Self::DeleteComponentStorageResponseFut {
5981 fn _decode(
5982 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5983 ) -> Result<StorageAdminDeleteComponentStorageResult, fidl::Error> {
5984 let _response = fidl::client::decode_transaction_body::<
5985 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
5986 fdomain_client::fidl::FDomainResourceDialect,
5987 0x1677c1cdfcdbf45a,
5988 >(_buf?)?;
5989 Ok(_response.map(|x| x))
5990 }
5991 self.client.send_query_and_decode::<
5992 StorageAdminDeleteComponentStorageRequest,
5993 StorageAdminDeleteComponentStorageResult,
5994 >(
5995 (relative_moniker,),
5996 0x1677c1cdfcdbf45a,
5997 fidl::encoding::DynamicFlags::empty(),
5998 _decode,
5999 )
6000 }
6001
6002 type GetStatusResponseFut = fidl::client::QueryResponseFut<
6003 StorageAdminGetStatusResult,
6004 fdomain_client::fidl::FDomainResourceDialect,
6005 >;
6006 fn r#get_status(&self) -> Self::GetStatusResponseFut {
6007 fn _decode(
6008 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6009 ) -> Result<StorageAdminGetStatusResult, fidl::Error> {
6010 let _response = fidl::client::decode_transaction_body::<
6011 fidl::encoding::ResultType<StorageStatus, StatusError>,
6012 fdomain_client::fidl::FDomainResourceDialect,
6013 0x7729e325a6c526c8,
6014 >(_buf?)?;
6015 Ok(_response.map(|x| x))
6016 }
6017 self.client
6018 .send_query_and_decode::<fidl::encoding::EmptyPayload, StorageAdminGetStatusResult>(
6019 (),
6020 0x7729e325a6c526c8,
6021 fidl::encoding::DynamicFlags::empty(),
6022 _decode,
6023 )
6024 }
6025
6026 type DeleteAllStorageContentsResponseFut = fidl::client::QueryResponseFut<
6027 StorageAdminDeleteAllStorageContentsResult,
6028 fdomain_client::fidl::FDomainResourceDialect,
6029 >;
6030 fn r#delete_all_storage_contents(&self) -> Self::DeleteAllStorageContentsResponseFut {
6031 fn _decode(
6032 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6033 ) -> Result<StorageAdminDeleteAllStorageContentsResult, fidl::Error> {
6034 let _response = fidl::client::decode_transaction_body::<
6035 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, DeletionError>,
6036 fdomain_client::fidl::FDomainResourceDialect,
6037 0x2ee980b4b2d24adb,
6038 >(_buf?)?;
6039 Ok(_response.map(|x| x))
6040 }
6041 self.client.send_query_and_decode::<
6042 fidl::encoding::EmptyPayload,
6043 StorageAdminDeleteAllStorageContentsResult,
6044 >(
6045 (),
6046 0x2ee980b4b2d24adb,
6047 fidl::encoding::DynamicFlags::empty(),
6048 _decode,
6049 )
6050 }
6051}
6052
6053pub struct StorageAdminEventStream {
6054 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6055}
6056
6057impl std::marker::Unpin for StorageAdminEventStream {}
6058
6059impl futures::stream::FusedStream for StorageAdminEventStream {
6060 fn is_terminated(&self) -> bool {
6061 self.event_receiver.is_terminated()
6062 }
6063}
6064
6065impl futures::Stream for StorageAdminEventStream {
6066 type Item = Result<StorageAdminEvent, fidl::Error>;
6067
6068 fn poll_next(
6069 mut self: std::pin::Pin<&mut Self>,
6070 cx: &mut std::task::Context<'_>,
6071 ) -> std::task::Poll<Option<Self::Item>> {
6072 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6073 &mut self.event_receiver,
6074 cx
6075 )?) {
6076 Some(buf) => std::task::Poll::Ready(Some(StorageAdminEvent::decode(buf))),
6077 None => std::task::Poll::Ready(None),
6078 }
6079 }
6080}
6081
6082#[derive(Debug)]
6083pub enum StorageAdminEvent {}
6084
6085impl StorageAdminEvent {
6086 fn decode(
6088 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6089 ) -> Result<StorageAdminEvent, fidl::Error> {
6090 let (bytes, _handles) = buf.split_mut();
6091 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6092 debug_assert_eq!(tx_header.tx_id, 0);
6093 match tx_header.ordinal {
6094 _ => Err(fidl::Error::UnknownOrdinal {
6095 ordinal: tx_header.ordinal,
6096 protocol_name:
6097 <StorageAdminMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6098 }),
6099 }
6100 }
6101}
6102
6103pub struct StorageAdminRequestStream {
6105 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6106 is_terminated: bool,
6107}
6108
6109impl std::marker::Unpin for StorageAdminRequestStream {}
6110
6111impl futures::stream::FusedStream for StorageAdminRequestStream {
6112 fn is_terminated(&self) -> bool {
6113 self.is_terminated
6114 }
6115}
6116
6117impl fdomain_client::fidl::RequestStream for StorageAdminRequestStream {
6118 type Protocol = StorageAdminMarker;
6119 type ControlHandle = StorageAdminControlHandle;
6120
6121 fn from_channel(channel: fdomain_client::Channel) -> Self {
6122 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6123 }
6124
6125 fn control_handle(&self) -> Self::ControlHandle {
6126 StorageAdminControlHandle { inner: self.inner.clone() }
6127 }
6128
6129 fn into_inner(
6130 self,
6131 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
6132 {
6133 (self.inner, self.is_terminated)
6134 }
6135
6136 fn from_inner(
6137 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6138 is_terminated: bool,
6139 ) -> Self {
6140 Self { inner, is_terminated }
6141 }
6142}
6143
6144impl futures::Stream for StorageAdminRequestStream {
6145 type Item = Result<StorageAdminRequest, fidl::Error>;
6146
6147 fn poll_next(
6148 mut self: std::pin::Pin<&mut Self>,
6149 cx: &mut std::task::Context<'_>,
6150 ) -> std::task::Poll<Option<Self::Item>> {
6151 let this = &mut *self;
6152 if this.inner.check_shutdown(cx) {
6153 this.is_terminated = true;
6154 return std::task::Poll::Ready(None);
6155 }
6156 if this.is_terminated {
6157 panic!("polled StorageAdminRequestStream after completion");
6158 }
6159 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
6160 |bytes, handles| {
6161 match this.inner.channel().read_etc(cx, bytes, handles) {
6162 std::task::Poll::Ready(Ok(())) => {}
6163 std::task::Poll::Pending => return std::task::Poll::Pending,
6164 std::task::Poll::Ready(Err(None)) => {
6165 this.is_terminated = true;
6166 return std::task::Poll::Ready(None);
6167 }
6168 std::task::Poll::Ready(Err(Some(e))) => {
6169 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6170 e.into(),
6171 ))));
6172 }
6173 }
6174
6175 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6177
6178 std::task::Poll::Ready(Some(match header.ordinal {
6179 0x6ceaa5904cfe4377 => {
6180 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6181 let mut req = fidl::new_empty!(
6182 StorageAdminOpenStorageRequest,
6183 fdomain_client::fidl::FDomainResourceDialect
6184 );
6185 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<StorageAdminOpenStorageRequest>(&header, _body_bytes, handles, &mut req)?;
6186 let control_handle =
6187 StorageAdminControlHandle { inner: this.inner.clone() };
6188 Ok(StorageAdminRequest::OpenStorage {
6189 relative_moniker: req.relative_moniker,
6190 object: req.object,
6191
6192 responder: StorageAdminOpenStorageResponder {
6193 control_handle: std::mem::ManuallyDrop::new(control_handle),
6194 tx_id: header.tx_id,
6195 },
6196 })
6197 }
6198 0x764f6d1f083e8bfb => {
6199 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6200 let mut req = fidl::new_empty!(
6201 StorageAdminListStorageInRealmRequest,
6202 fdomain_client::fidl::FDomainResourceDialect
6203 );
6204 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<StorageAdminListStorageInRealmRequest>(&header, _body_bytes, handles, &mut req)?;
6205 let control_handle =
6206 StorageAdminControlHandle { inner: this.inner.clone() };
6207 Ok(StorageAdminRequest::ListStorageInRealm {
6208 relative_moniker: req.relative_moniker,
6209 iterator: req.iterator,
6210
6211 responder: StorageAdminListStorageInRealmResponder {
6212 control_handle: std::mem::ManuallyDrop::new(control_handle),
6213 tx_id: header.tx_id,
6214 },
6215 })
6216 }
6217 0x4802102cc55d5df1 => {
6218 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6219 let mut req = fidl::new_empty!(
6220 StorageAdminOpenComponentStorageByIdRequest,
6221 fdomain_client::fidl::FDomainResourceDialect
6222 );
6223 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<StorageAdminOpenComponentStorageByIdRequest>(&header, _body_bytes, handles, &mut req)?;
6224 let control_handle =
6225 StorageAdminControlHandle { inner: this.inner.clone() };
6226 Ok(StorageAdminRequest::OpenComponentStorageById {
6227 id: req.id,
6228 object: req.object,
6229
6230 responder: StorageAdminOpenComponentStorageByIdResponder {
6231 control_handle: std::mem::ManuallyDrop::new(control_handle),
6232 tx_id: header.tx_id,
6233 },
6234 })
6235 }
6236 0x1677c1cdfcdbf45a => {
6237 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6238 let mut req = fidl::new_empty!(
6239 StorageAdminDeleteComponentStorageRequest,
6240 fdomain_client::fidl::FDomainResourceDialect
6241 );
6242 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<StorageAdminDeleteComponentStorageRequest>(&header, _body_bytes, handles, &mut req)?;
6243 let control_handle =
6244 StorageAdminControlHandle { inner: this.inner.clone() };
6245 Ok(StorageAdminRequest::DeleteComponentStorage {
6246 relative_moniker: req.relative_moniker,
6247
6248 responder: StorageAdminDeleteComponentStorageResponder {
6249 control_handle: std::mem::ManuallyDrop::new(control_handle),
6250 tx_id: header.tx_id,
6251 },
6252 })
6253 }
6254 0x7729e325a6c526c8 => {
6255 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6256 let mut req = fidl::new_empty!(
6257 fidl::encoding::EmptyPayload,
6258 fdomain_client::fidl::FDomainResourceDialect
6259 );
6260 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6261 let control_handle =
6262 StorageAdminControlHandle { inner: this.inner.clone() };
6263 Ok(StorageAdminRequest::GetStatus {
6264 responder: StorageAdminGetStatusResponder {
6265 control_handle: std::mem::ManuallyDrop::new(control_handle),
6266 tx_id: header.tx_id,
6267 },
6268 })
6269 }
6270 0x2ee980b4b2d24adb => {
6271 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6272 let mut req = fidl::new_empty!(
6273 fidl::encoding::EmptyPayload,
6274 fdomain_client::fidl::FDomainResourceDialect
6275 );
6276 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6277 let control_handle =
6278 StorageAdminControlHandle { inner: this.inner.clone() };
6279 Ok(StorageAdminRequest::DeleteAllStorageContents {
6280 responder: StorageAdminDeleteAllStorageContentsResponder {
6281 control_handle: std::mem::ManuallyDrop::new(control_handle),
6282 tx_id: header.tx_id,
6283 },
6284 })
6285 }
6286 _ => Err(fidl::Error::UnknownOrdinal {
6287 ordinal: header.ordinal,
6288 protocol_name:
6289 <StorageAdminMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6290 }),
6291 }))
6292 },
6293 )
6294 }
6295}
6296
6297#[derive(Debug)]
6298pub enum StorageAdminRequest {
6299 OpenStorage {
6304 relative_moniker: String,
6305 object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6306 responder: StorageAdminOpenStorageResponder,
6307 },
6308 ListStorageInRealm {
6315 relative_moniker: String,
6316 iterator: fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
6317 responder: StorageAdminListStorageInRealmResponder,
6318 },
6319 OpenComponentStorageById {
6322 id: String,
6323 object: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6324 responder: StorageAdminOpenComponentStorageByIdResponder,
6325 },
6326 DeleteComponentStorage {
6331 relative_moniker: String,
6332 responder: StorageAdminDeleteComponentStorageResponder,
6333 },
6334 GetStatus { responder: StorageAdminGetStatusResponder },
6336 DeleteAllStorageContents { responder: StorageAdminDeleteAllStorageContentsResponder },
6344}
6345
6346impl StorageAdminRequest {
6347 #[allow(irrefutable_let_patterns)]
6348 pub fn into_open_storage(
6349 self,
6350 ) -> Option<(
6351 String,
6352 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6353 StorageAdminOpenStorageResponder,
6354 )> {
6355 if let StorageAdminRequest::OpenStorage { relative_moniker, object, responder } = self {
6356 Some((relative_moniker, object, responder))
6357 } else {
6358 None
6359 }
6360 }
6361
6362 #[allow(irrefutable_let_patterns)]
6363 pub fn into_list_storage_in_realm(
6364 self,
6365 ) -> Option<(
6366 String,
6367 fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
6368 StorageAdminListStorageInRealmResponder,
6369 )> {
6370 if let StorageAdminRequest::ListStorageInRealm { relative_moniker, iterator, responder } =
6371 self
6372 {
6373 Some((relative_moniker, iterator, responder))
6374 } else {
6375 None
6376 }
6377 }
6378
6379 #[allow(irrefutable_let_patterns)]
6380 pub fn into_open_component_storage_by_id(
6381 self,
6382 ) -> Option<(
6383 String,
6384 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
6385 StorageAdminOpenComponentStorageByIdResponder,
6386 )> {
6387 if let StorageAdminRequest::OpenComponentStorageById { id, object, responder } = self {
6388 Some((id, object, responder))
6389 } else {
6390 None
6391 }
6392 }
6393
6394 #[allow(irrefutable_let_patterns)]
6395 pub fn into_delete_component_storage(
6396 self,
6397 ) -> Option<(String, StorageAdminDeleteComponentStorageResponder)> {
6398 if let StorageAdminRequest::DeleteComponentStorage { relative_moniker, responder } = self {
6399 Some((relative_moniker, responder))
6400 } else {
6401 None
6402 }
6403 }
6404
6405 #[allow(irrefutable_let_patterns)]
6406 pub fn into_get_status(self) -> Option<(StorageAdminGetStatusResponder)> {
6407 if let StorageAdminRequest::GetStatus { responder } = self {
6408 Some((responder))
6409 } else {
6410 None
6411 }
6412 }
6413
6414 #[allow(irrefutable_let_patterns)]
6415 pub fn into_delete_all_storage_contents(
6416 self,
6417 ) -> Option<(StorageAdminDeleteAllStorageContentsResponder)> {
6418 if let StorageAdminRequest::DeleteAllStorageContents { responder } = self {
6419 Some((responder))
6420 } else {
6421 None
6422 }
6423 }
6424
6425 pub fn method_name(&self) -> &'static str {
6427 match *self {
6428 StorageAdminRequest::OpenStorage { .. } => "open_storage",
6429 StorageAdminRequest::ListStorageInRealm { .. } => "list_storage_in_realm",
6430 StorageAdminRequest::OpenComponentStorageById { .. } => "open_component_storage_by_id",
6431 StorageAdminRequest::DeleteComponentStorage { .. } => "delete_component_storage",
6432 StorageAdminRequest::GetStatus { .. } => "get_status",
6433 StorageAdminRequest::DeleteAllStorageContents { .. } => "delete_all_storage_contents",
6434 }
6435 }
6436}
6437
6438#[derive(Debug, Clone)]
6439pub struct StorageAdminControlHandle {
6440 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
6441}
6442
6443impl StorageAdminControlHandle {
6444 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
6445 self.inner.shutdown_with_epitaph(status.into())
6446 }
6447}
6448
6449impl fdomain_client::fidl::ControlHandle for StorageAdminControlHandle {
6450 fn shutdown(&self) {
6451 self.inner.shutdown()
6452 }
6453
6454 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
6455 self.inner.shutdown_with_epitaph(status)
6456 }
6457
6458 fn is_closed(&self) -> bool {
6459 self.inner.channel().is_closed()
6460 }
6461 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
6462 self.inner.channel().on_closed()
6463 }
6464}
6465
6466impl StorageAdminControlHandle {}
6467
6468#[must_use = "FIDL methods require a response to be sent"]
6469#[derive(Debug)]
6470pub struct StorageAdminOpenStorageResponder {
6471 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6472 tx_id: u32,
6473}
6474
6475impl std::ops::Drop for StorageAdminOpenStorageResponder {
6479 fn drop(&mut self) {
6480 self.control_handle.shutdown();
6481 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6483 }
6484}
6485
6486impl fdomain_client::fidl::Responder for StorageAdminOpenStorageResponder {
6487 type ControlHandle = StorageAdminControlHandle;
6488
6489 fn control_handle(&self) -> &StorageAdminControlHandle {
6490 &self.control_handle
6491 }
6492
6493 fn drop_without_shutdown(mut self) {
6494 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6496 std::mem::forget(self);
6498 }
6499}
6500
6501impl StorageAdminOpenStorageResponder {
6502 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6506 let _result = self.send_raw(result);
6507 if _result.is_err() {
6508 self.control_handle.shutdown();
6509 }
6510 self.drop_without_shutdown();
6511 _result
6512 }
6513
6514 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6516 let _result = self.send_raw(result);
6517 self.drop_without_shutdown();
6518 _result
6519 }
6520
6521 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6522 self.control_handle
6523 .inner
6524 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
6525 result,
6526 self.tx_id,
6527 0x6ceaa5904cfe4377,
6528 fidl::encoding::DynamicFlags::empty(),
6529 )
6530 }
6531}
6532
6533#[must_use = "FIDL methods require a response to be sent"]
6534#[derive(Debug)]
6535pub struct StorageAdminListStorageInRealmResponder {
6536 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6537 tx_id: u32,
6538}
6539
6540impl std::ops::Drop for StorageAdminListStorageInRealmResponder {
6544 fn drop(&mut self) {
6545 self.control_handle.shutdown();
6546 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6548 }
6549}
6550
6551impl fdomain_client::fidl::Responder for StorageAdminListStorageInRealmResponder {
6552 type ControlHandle = StorageAdminControlHandle;
6553
6554 fn control_handle(&self) -> &StorageAdminControlHandle {
6555 &self.control_handle
6556 }
6557
6558 fn drop_without_shutdown(mut self) {
6559 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6561 std::mem::forget(self);
6563 }
6564}
6565
6566impl StorageAdminListStorageInRealmResponder {
6567 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6571 let _result = self.send_raw(result);
6572 if _result.is_err() {
6573 self.control_handle.shutdown();
6574 }
6575 self.drop_without_shutdown();
6576 _result
6577 }
6578
6579 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6581 let _result = self.send_raw(result);
6582 self.drop_without_shutdown();
6583 _result
6584 }
6585
6586 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6587 self.control_handle
6588 .inner
6589 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
6590 result,
6591 self.tx_id,
6592 0x764f6d1f083e8bfb,
6593 fidl::encoding::DynamicFlags::empty(),
6594 )
6595 }
6596}
6597
6598#[must_use = "FIDL methods require a response to be sent"]
6599#[derive(Debug)]
6600pub struct StorageAdminOpenComponentStorageByIdResponder {
6601 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6602 tx_id: u32,
6603}
6604
6605impl std::ops::Drop for StorageAdminOpenComponentStorageByIdResponder {
6609 fn drop(&mut self) {
6610 self.control_handle.shutdown();
6611 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6613 }
6614}
6615
6616impl fdomain_client::fidl::Responder for StorageAdminOpenComponentStorageByIdResponder {
6617 type ControlHandle = StorageAdminControlHandle;
6618
6619 fn control_handle(&self) -> &StorageAdminControlHandle {
6620 &self.control_handle
6621 }
6622
6623 fn drop_without_shutdown(mut self) {
6624 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6626 std::mem::forget(self);
6628 }
6629}
6630
6631impl StorageAdminOpenComponentStorageByIdResponder {
6632 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6636 let _result = self.send_raw(result);
6637 if _result.is_err() {
6638 self.control_handle.shutdown();
6639 }
6640 self.drop_without_shutdown();
6641 _result
6642 }
6643
6644 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6646 let _result = self.send_raw(result);
6647 self.drop_without_shutdown();
6648 _result
6649 }
6650
6651 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6652 self.control_handle
6653 .inner
6654 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
6655 result,
6656 self.tx_id,
6657 0x4802102cc55d5df1,
6658 fidl::encoding::DynamicFlags::empty(),
6659 )
6660 }
6661}
6662
6663#[must_use = "FIDL methods require a response to be sent"]
6664#[derive(Debug)]
6665pub struct StorageAdminDeleteComponentStorageResponder {
6666 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6667 tx_id: u32,
6668}
6669
6670impl std::ops::Drop for StorageAdminDeleteComponentStorageResponder {
6674 fn drop(&mut self) {
6675 self.control_handle.shutdown();
6676 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6678 }
6679}
6680
6681impl fdomain_client::fidl::Responder for StorageAdminDeleteComponentStorageResponder {
6682 type ControlHandle = StorageAdminControlHandle;
6683
6684 fn control_handle(&self) -> &StorageAdminControlHandle {
6685 &self.control_handle
6686 }
6687
6688 fn drop_without_shutdown(mut self) {
6689 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6691 std::mem::forget(self);
6693 }
6694}
6695
6696impl StorageAdminDeleteComponentStorageResponder {
6697 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6701 let _result = self.send_raw(result);
6702 if _result.is_err() {
6703 self.control_handle.shutdown();
6704 }
6705 self.drop_without_shutdown();
6706 _result
6707 }
6708
6709 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6711 let _result = self.send_raw(result);
6712 self.drop_without_shutdown();
6713 _result
6714 }
6715
6716 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
6717 self.control_handle
6718 .inner
6719 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
6720 result,
6721 self.tx_id,
6722 0x1677c1cdfcdbf45a,
6723 fidl::encoding::DynamicFlags::empty(),
6724 )
6725 }
6726}
6727
6728#[must_use = "FIDL methods require a response to be sent"]
6729#[derive(Debug)]
6730pub struct StorageAdminGetStatusResponder {
6731 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6732 tx_id: u32,
6733}
6734
6735impl std::ops::Drop for StorageAdminGetStatusResponder {
6739 fn drop(&mut self) {
6740 self.control_handle.shutdown();
6741 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6743 }
6744}
6745
6746impl fdomain_client::fidl::Responder for StorageAdminGetStatusResponder {
6747 type ControlHandle = StorageAdminControlHandle;
6748
6749 fn control_handle(&self) -> &StorageAdminControlHandle {
6750 &self.control_handle
6751 }
6752
6753 fn drop_without_shutdown(mut self) {
6754 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6756 std::mem::forget(self);
6758 }
6759}
6760
6761impl StorageAdminGetStatusResponder {
6762 pub fn send(self, mut result: Result<&StorageStatus, StatusError>) -> Result<(), fidl::Error> {
6766 let _result = self.send_raw(result);
6767 if _result.is_err() {
6768 self.control_handle.shutdown();
6769 }
6770 self.drop_without_shutdown();
6771 _result
6772 }
6773
6774 pub fn send_no_shutdown_on_err(
6776 self,
6777 mut result: Result<&StorageStatus, StatusError>,
6778 ) -> Result<(), fidl::Error> {
6779 let _result = self.send_raw(result);
6780 self.drop_without_shutdown();
6781 _result
6782 }
6783
6784 fn send_raw(&self, mut result: Result<&StorageStatus, StatusError>) -> Result<(), fidl::Error> {
6785 self.control_handle.inner.send::<fidl::encoding::ResultType<StorageStatus, StatusError>>(
6786 result,
6787 self.tx_id,
6788 0x7729e325a6c526c8,
6789 fidl::encoding::DynamicFlags::empty(),
6790 )
6791 }
6792}
6793
6794#[must_use = "FIDL methods require a response to be sent"]
6795#[derive(Debug)]
6796pub struct StorageAdminDeleteAllStorageContentsResponder {
6797 control_handle: std::mem::ManuallyDrop<StorageAdminControlHandle>,
6798 tx_id: u32,
6799}
6800
6801impl std::ops::Drop for StorageAdminDeleteAllStorageContentsResponder {
6805 fn drop(&mut self) {
6806 self.control_handle.shutdown();
6807 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6809 }
6810}
6811
6812impl fdomain_client::fidl::Responder for StorageAdminDeleteAllStorageContentsResponder {
6813 type ControlHandle = StorageAdminControlHandle;
6814
6815 fn control_handle(&self) -> &StorageAdminControlHandle {
6816 &self.control_handle
6817 }
6818
6819 fn drop_without_shutdown(mut self) {
6820 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6822 std::mem::forget(self);
6824 }
6825}
6826
6827impl StorageAdminDeleteAllStorageContentsResponder {
6828 pub fn send(self, mut result: Result<(), DeletionError>) -> Result<(), fidl::Error> {
6832 let _result = self.send_raw(result);
6833 if _result.is_err() {
6834 self.control_handle.shutdown();
6835 }
6836 self.drop_without_shutdown();
6837 _result
6838 }
6839
6840 pub fn send_no_shutdown_on_err(
6842 self,
6843 mut result: Result<(), DeletionError>,
6844 ) -> Result<(), fidl::Error> {
6845 let _result = self.send_raw(result);
6846 self.drop_without_shutdown();
6847 _result
6848 }
6849
6850 fn send_raw(&self, mut result: Result<(), DeletionError>) -> Result<(), fidl::Error> {
6851 self.control_handle.inner.send::<fidl::encoding::ResultType<
6852 fidl::encoding::EmptyStruct,
6853 DeletionError,
6854 >>(
6855 result,
6856 self.tx_id,
6857 0x2ee980b4b2d24adb,
6858 fidl::encoding::DynamicFlags::empty(),
6859 )
6860 }
6861}
6862
6863#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6864pub struct StorageIteratorMarker;
6865
6866impl fdomain_client::fidl::ProtocolMarker for StorageIteratorMarker {
6867 type Proxy = StorageIteratorProxy;
6868 type RequestStream = StorageIteratorRequestStream;
6869
6870 const DEBUG_NAME: &'static str = "(anonymous) StorageIterator";
6871}
6872
6873pub trait StorageIteratorProxyInterface: Send + Sync {
6874 type NextResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>> + Send;
6875 fn r#next(&self) -> Self::NextResponseFut;
6876}
6877
6878#[derive(Debug, Clone)]
6879pub struct StorageIteratorProxy {
6880 client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
6881}
6882
6883impl fdomain_client::fidl::Proxy for StorageIteratorProxy {
6884 type Protocol = StorageIteratorMarker;
6885
6886 fn from_channel(inner: fdomain_client::Channel) -> Self {
6887 Self::new(inner)
6888 }
6889
6890 fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
6891 self.client.into_channel().map_err(|client| Self { client })
6892 }
6893
6894 fn as_channel(&self) -> &fdomain_client::Channel {
6895 self.client.as_channel()
6896 }
6897}
6898
6899impl StorageIteratorProxy {
6900 pub fn new(channel: fdomain_client::Channel) -> Self {
6902 let protocol_name =
6903 <StorageIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
6904 Self { client: fidl::client::Client::new(channel, protocol_name) }
6905 }
6906
6907 pub fn take_event_stream(&self) -> StorageIteratorEventStream {
6913 StorageIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6914 }
6915
6916 pub fn r#next(
6921 &self,
6922 ) -> fidl::client::QueryResponseFut<Vec<String>, fdomain_client::fidl::FDomainResourceDialect>
6923 {
6924 StorageIteratorProxyInterface::r#next(self)
6925 }
6926}
6927
6928impl StorageIteratorProxyInterface for StorageIteratorProxy {
6929 type NextResponseFut =
6930 fidl::client::QueryResponseFut<Vec<String>, fdomain_client::fidl::FDomainResourceDialect>;
6931 fn r#next(&self) -> Self::NextResponseFut {
6932 fn _decode(
6933 mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6934 ) -> Result<Vec<String>, fidl::Error> {
6935 let _response = fidl::client::decode_transaction_body::<
6936 StorageIteratorNextResponse,
6937 fdomain_client::fidl::FDomainResourceDialect,
6938 0x7a6b21f15fd01b72,
6939 >(_buf?)?;
6940 Ok(_response.relative_monikers)
6941 }
6942 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
6943 (),
6944 0x7a6b21f15fd01b72,
6945 fidl::encoding::DynamicFlags::empty(),
6946 _decode,
6947 )
6948 }
6949}
6950
6951pub struct StorageIteratorEventStream {
6952 event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
6953}
6954
6955impl std::marker::Unpin for StorageIteratorEventStream {}
6956
6957impl futures::stream::FusedStream for StorageIteratorEventStream {
6958 fn is_terminated(&self) -> bool {
6959 self.event_receiver.is_terminated()
6960 }
6961}
6962
6963impl futures::Stream for StorageIteratorEventStream {
6964 type Item = Result<StorageIteratorEvent, fidl::Error>;
6965
6966 fn poll_next(
6967 mut self: std::pin::Pin<&mut Self>,
6968 cx: &mut std::task::Context<'_>,
6969 ) -> std::task::Poll<Option<Self::Item>> {
6970 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6971 &mut self.event_receiver,
6972 cx
6973 )?) {
6974 Some(buf) => std::task::Poll::Ready(Some(StorageIteratorEvent::decode(buf))),
6975 None => std::task::Poll::Ready(None),
6976 }
6977 }
6978}
6979
6980#[derive(Debug)]
6981pub enum StorageIteratorEvent {}
6982
6983impl StorageIteratorEvent {
6984 fn decode(
6986 mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6987 ) -> Result<StorageIteratorEvent, fidl::Error> {
6988 let (bytes, _handles) = buf.split_mut();
6989 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6990 debug_assert_eq!(tx_header.tx_id, 0);
6991 match tx_header.ordinal {
6992 _ => Err(fidl::Error::UnknownOrdinal {
6993 ordinal: tx_header.ordinal,
6994 protocol_name:
6995 <StorageIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
6996 }),
6997 }
6998 }
6999}
7000
7001pub struct StorageIteratorRequestStream {
7003 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7004 is_terminated: bool,
7005}
7006
7007impl std::marker::Unpin for StorageIteratorRequestStream {}
7008
7009impl futures::stream::FusedStream for StorageIteratorRequestStream {
7010 fn is_terminated(&self) -> bool {
7011 self.is_terminated
7012 }
7013}
7014
7015impl fdomain_client::fidl::RequestStream for StorageIteratorRequestStream {
7016 type Protocol = StorageIteratorMarker;
7017 type ControlHandle = StorageIteratorControlHandle;
7018
7019 fn from_channel(channel: fdomain_client::Channel) -> Self {
7020 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7021 }
7022
7023 fn control_handle(&self) -> Self::ControlHandle {
7024 StorageIteratorControlHandle { inner: self.inner.clone() }
7025 }
7026
7027 fn into_inner(
7028 self,
7029 ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7030 {
7031 (self.inner, self.is_terminated)
7032 }
7033
7034 fn from_inner(
7035 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7036 is_terminated: bool,
7037 ) -> Self {
7038 Self { inner, is_terminated }
7039 }
7040}
7041
7042impl futures::Stream for StorageIteratorRequestStream {
7043 type Item = Result<StorageIteratorRequest, fidl::Error>;
7044
7045 fn poll_next(
7046 mut self: std::pin::Pin<&mut Self>,
7047 cx: &mut std::task::Context<'_>,
7048 ) -> std::task::Poll<Option<Self::Item>> {
7049 let this = &mut *self;
7050 if this.inner.check_shutdown(cx) {
7051 this.is_terminated = true;
7052 return std::task::Poll::Ready(None);
7053 }
7054 if this.is_terminated {
7055 panic!("polled StorageIteratorRequestStream after completion");
7056 }
7057 fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7058 |bytes, handles| {
7059 match this.inner.channel().read_etc(cx, bytes, handles) {
7060 std::task::Poll::Ready(Ok(())) => {}
7061 std::task::Poll::Pending => return std::task::Poll::Pending,
7062 std::task::Poll::Ready(Err(None)) => {
7063 this.is_terminated = true;
7064 return std::task::Poll::Ready(None);
7065 }
7066 std::task::Poll::Ready(Err(Some(e))) => {
7067 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7068 e.into(),
7069 ))));
7070 }
7071 }
7072
7073 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7075
7076 std::task::Poll::Ready(Some(match header.ordinal {
7077 0x7a6b21f15fd01b72 => {
7078 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7079 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
7080 fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7081 let control_handle = StorageIteratorControlHandle {
7082 inner: this.inner.clone(),
7083 };
7084 Ok(StorageIteratorRequest::Next {
7085 responder: StorageIteratorNextResponder {
7086 control_handle: std::mem::ManuallyDrop::new(control_handle),
7087 tx_id: header.tx_id,
7088 },
7089 })
7090 }
7091 _ => Err(fidl::Error::UnknownOrdinal {
7092 ordinal: header.ordinal,
7093 protocol_name: <StorageIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7094 }),
7095 }))
7096 },
7097 )
7098 }
7099}
7100
7101#[derive(Debug)]
7104pub enum StorageIteratorRequest {
7105 Next { responder: StorageIteratorNextResponder },
7110}
7111
7112impl StorageIteratorRequest {
7113 #[allow(irrefutable_let_patterns)]
7114 pub fn into_next(self) -> Option<(StorageIteratorNextResponder)> {
7115 if let StorageIteratorRequest::Next { responder } = self { Some((responder)) } else { None }
7116 }
7117
7118 pub fn method_name(&self) -> &'static str {
7120 match *self {
7121 StorageIteratorRequest::Next { .. } => "next",
7122 }
7123 }
7124}
7125
7126#[derive(Debug, Clone)]
7127pub struct StorageIteratorControlHandle {
7128 inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7129}
7130
7131impl StorageIteratorControlHandle {
7132 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
7133 self.inner.shutdown_with_epitaph(status.into())
7134 }
7135}
7136
7137impl fdomain_client::fidl::ControlHandle for StorageIteratorControlHandle {
7138 fn shutdown(&self) {
7139 self.inner.shutdown()
7140 }
7141
7142 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
7143 self.inner.shutdown_with_epitaph(status)
7144 }
7145
7146 fn is_closed(&self) -> bool {
7147 self.inner.channel().is_closed()
7148 }
7149 fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
7150 self.inner.channel().on_closed()
7151 }
7152}
7153
7154impl StorageIteratorControlHandle {}
7155
7156#[must_use = "FIDL methods require a response to be sent"]
7157#[derive(Debug)]
7158pub struct StorageIteratorNextResponder {
7159 control_handle: std::mem::ManuallyDrop<StorageIteratorControlHandle>,
7160 tx_id: u32,
7161}
7162
7163impl std::ops::Drop for StorageIteratorNextResponder {
7167 fn drop(&mut self) {
7168 self.control_handle.shutdown();
7169 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7171 }
7172}
7173
7174impl fdomain_client::fidl::Responder for StorageIteratorNextResponder {
7175 type ControlHandle = StorageIteratorControlHandle;
7176
7177 fn control_handle(&self) -> &StorageIteratorControlHandle {
7178 &self.control_handle
7179 }
7180
7181 fn drop_without_shutdown(mut self) {
7182 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7184 std::mem::forget(self);
7186 }
7187}
7188
7189impl StorageIteratorNextResponder {
7190 pub fn send(self, mut relative_monikers: &[String]) -> Result<(), fidl::Error> {
7194 let _result = self.send_raw(relative_monikers);
7195 if _result.is_err() {
7196 self.control_handle.shutdown();
7197 }
7198 self.drop_without_shutdown();
7199 _result
7200 }
7201
7202 pub fn send_no_shutdown_on_err(
7204 self,
7205 mut relative_monikers: &[String],
7206 ) -> Result<(), fidl::Error> {
7207 let _result = self.send_raw(relative_monikers);
7208 self.drop_without_shutdown();
7209 _result
7210 }
7211
7212 fn send_raw(&self, mut relative_monikers: &[String]) -> Result<(), fidl::Error> {
7213 self.control_handle.inner.send::<StorageIteratorNextResponse>(
7214 (relative_monikers,),
7215 self.tx_id,
7216 0x7a6b21f15fd01b72,
7217 fidl::encoding::DynamicFlags::empty(),
7218 )
7219 }
7220}
7221
7222mod internal {
7223 use super::*;
7224
7225 impl fidl::encoding::ResourceTypeMarker for ControllerOpenExposedDirRequest {
7226 type Borrowed<'a> = &'a mut Self;
7227 fn take_or_borrow<'a>(
7228 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7229 ) -> Self::Borrowed<'a> {
7230 value
7231 }
7232 }
7233
7234 unsafe impl fidl::encoding::TypeMarker for ControllerOpenExposedDirRequest {
7235 type Owned = Self;
7236
7237 #[inline(always)]
7238 fn inline_align(_context: fidl::encoding::Context) -> usize {
7239 4
7240 }
7241
7242 #[inline(always)]
7243 fn inline_size(_context: fidl::encoding::Context) -> usize {
7244 4
7245 }
7246 }
7247
7248 unsafe impl
7249 fidl::encoding::Encode<
7250 ControllerOpenExposedDirRequest,
7251 fdomain_client::fidl::FDomainResourceDialect,
7252 > for &mut ControllerOpenExposedDirRequest
7253 {
7254 #[inline]
7255 unsafe fn encode(
7256 self,
7257 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7258 offset: usize,
7259 _depth: fidl::encoding::Depth,
7260 ) -> fidl::Result<()> {
7261 encoder.debug_check_bounds::<ControllerOpenExposedDirRequest>(offset);
7262 fidl::encoding::Encode::<
7264 ControllerOpenExposedDirRequest,
7265 fdomain_client::fidl::FDomainResourceDialect,
7266 >::encode(
7267 (<fidl::encoding::Endpoint<
7268 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
7269 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7270 &mut self.exposed_dir
7271 ),),
7272 encoder,
7273 offset,
7274 _depth,
7275 )
7276 }
7277 }
7278 unsafe impl<
7279 T0: fidl::encoding::Encode<
7280 fidl::encoding::Endpoint<
7281 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
7282 >,
7283 fdomain_client::fidl::FDomainResourceDialect,
7284 >,
7285 >
7286 fidl::encoding::Encode<
7287 ControllerOpenExposedDirRequest,
7288 fdomain_client::fidl::FDomainResourceDialect,
7289 > for (T0,)
7290 {
7291 #[inline]
7292 unsafe fn encode(
7293 self,
7294 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7295 offset: usize,
7296 depth: fidl::encoding::Depth,
7297 ) -> fidl::Result<()> {
7298 encoder.debug_check_bounds::<ControllerOpenExposedDirRequest>(offset);
7299 self.0.encode(encoder, offset + 0, depth)?;
7303 Ok(())
7304 }
7305 }
7306
7307 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
7308 for ControllerOpenExposedDirRequest
7309 {
7310 #[inline(always)]
7311 fn new_empty() -> Self {
7312 Self {
7313 exposed_dir: fidl::new_empty!(
7314 fidl::encoding::Endpoint<
7315 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
7316 >,
7317 fdomain_client::fidl::FDomainResourceDialect
7318 ),
7319 }
7320 }
7321
7322 #[inline]
7323 unsafe fn decode(
7324 &mut self,
7325 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7326 offset: usize,
7327 _depth: fidl::encoding::Depth,
7328 ) -> fidl::Result<()> {
7329 decoder.debug_check_bounds::<Self>(offset);
7330 fidl::decode!(
7332 fidl::encoding::Endpoint<
7333 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
7334 >,
7335 fdomain_client::fidl::FDomainResourceDialect,
7336 &mut self.exposed_dir,
7337 decoder,
7338 offset + 0,
7339 _depth
7340 )?;
7341 Ok(())
7342 }
7343 }
7344
7345 impl fidl::encoding::ResourceTypeMarker for ControllerStartRequest {
7346 type Borrowed<'a> = &'a mut Self;
7347 fn take_or_borrow<'a>(
7348 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7349 ) -> Self::Borrowed<'a> {
7350 value
7351 }
7352 }
7353
7354 unsafe impl fidl::encoding::TypeMarker for ControllerStartRequest {
7355 type Owned = Self;
7356
7357 #[inline(always)]
7358 fn inline_align(_context: fidl::encoding::Context) -> usize {
7359 8
7360 }
7361
7362 #[inline(always)]
7363 fn inline_size(_context: fidl::encoding::Context) -> usize {
7364 24
7365 }
7366 }
7367
7368 unsafe impl
7369 fidl::encoding::Encode<ControllerStartRequest, fdomain_client::fidl::FDomainResourceDialect>
7370 for &mut ControllerStartRequest
7371 {
7372 #[inline]
7373 unsafe fn encode(
7374 self,
7375 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7376 offset: usize,
7377 _depth: fidl::encoding::Depth,
7378 ) -> fidl::Result<()> {
7379 encoder.debug_check_bounds::<ControllerStartRequest>(offset);
7380 fidl::encoding::Encode::<
7382 ControllerStartRequest,
7383 fdomain_client::fidl::FDomainResourceDialect,
7384 >::encode(
7385 (
7386 <StartChildArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7387 &mut self.args,
7388 ),
7389 <fidl::encoding::Endpoint<
7390 fdomain_client::fidl::ServerEnd<ExecutionControllerMarker>,
7391 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7392 &mut self.execution_controller,
7393 ),
7394 ),
7395 encoder,
7396 offset,
7397 _depth,
7398 )
7399 }
7400 }
7401 unsafe impl<
7402 T0: fidl::encoding::Encode<StartChildArgs, fdomain_client::fidl::FDomainResourceDialect>,
7403 T1: fidl::encoding::Encode<
7404 fidl::encoding::Endpoint<
7405 fdomain_client::fidl::ServerEnd<ExecutionControllerMarker>,
7406 >,
7407 fdomain_client::fidl::FDomainResourceDialect,
7408 >,
7409 >
7410 fidl::encoding::Encode<ControllerStartRequest, fdomain_client::fidl::FDomainResourceDialect>
7411 for (T0, T1)
7412 {
7413 #[inline]
7414 unsafe fn encode(
7415 self,
7416 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7417 offset: usize,
7418 depth: fidl::encoding::Depth,
7419 ) -> fidl::Result<()> {
7420 encoder.debug_check_bounds::<ControllerStartRequest>(offset);
7421 unsafe {
7424 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7425 (ptr as *mut u64).write_unaligned(0);
7426 }
7427 self.0.encode(encoder, offset + 0, depth)?;
7429 self.1.encode(encoder, offset + 16, depth)?;
7430 Ok(())
7431 }
7432 }
7433
7434 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
7435 for ControllerStartRequest
7436 {
7437 #[inline(always)]
7438 fn new_empty() -> Self {
7439 Self {
7440 args: fidl::new_empty!(
7441 StartChildArgs,
7442 fdomain_client::fidl::FDomainResourceDialect
7443 ),
7444 execution_controller: fidl::new_empty!(
7445 fidl::encoding::Endpoint<
7446 fdomain_client::fidl::ServerEnd<ExecutionControllerMarker>,
7447 >,
7448 fdomain_client::fidl::FDomainResourceDialect
7449 ),
7450 }
7451 }
7452
7453 #[inline]
7454 unsafe fn decode(
7455 &mut self,
7456 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7457 offset: usize,
7458 _depth: fidl::encoding::Depth,
7459 ) -> fidl::Result<()> {
7460 decoder.debug_check_bounds::<Self>(offset);
7461 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7463 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7464 let mask = 0xffffffff00000000u64;
7465 let maskedval = padval & mask;
7466 if maskedval != 0 {
7467 return Err(fidl::Error::NonZeroPadding {
7468 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7469 });
7470 }
7471 fidl::decode!(
7472 StartChildArgs,
7473 fdomain_client::fidl::FDomainResourceDialect,
7474 &mut self.args,
7475 decoder,
7476 offset + 0,
7477 _depth
7478 )?;
7479 fidl::decode!(
7480 fidl::encoding::Endpoint<
7481 fdomain_client::fidl::ServerEnd<ExecutionControllerMarker>,
7482 >,
7483 fdomain_client::fidl::FDomainResourceDialect,
7484 &mut self.execution_controller,
7485 decoder,
7486 offset + 16,
7487 _depth
7488 )?;
7489 Ok(())
7490 }
7491 }
7492
7493 impl fidl::encoding::ResourceTypeMarker for ControllerGetExposedDictionaryResponse {
7494 type Borrowed<'a> = &'a mut Self;
7495 fn take_or_borrow<'a>(
7496 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7497 ) -> Self::Borrowed<'a> {
7498 value
7499 }
7500 }
7501
7502 unsafe impl fidl::encoding::TypeMarker for ControllerGetExposedDictionaryResponse {
7503 type Owned = Self;
7504
7505 #[inline(always)]
7506 fn inline_align(_context: fidl::encoding::Context) -> usize {
7507 4
7508 }
7509
7510 #[inline(always)]
7511 fn inline_size(_context: fidl::encoding::Context) -> usize {
7512 4
7513 }
7514 }
7515
7516 unsafe impl
7517 fidl::encoding::Encode<
7518 ControllerGetExposedDictionaryResponse,
7519 fdomain_client::fidl::FDomainResourceDialect,
7520 > for &mut ControllerGetExposedDictionaryResponse
7521 {
7522 #[inline]
7523 unsafe fn encode(
7524 self,
7525 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7526 offset: usize,
7527 _depth: fidl::encoding::Depth,
7528 ) -> fidl::Result<()> {
7529 encoder.debug_check_bounds::<ControllerGetExposedDictionaryResponse>(offset);
7530 fidl::encoding::Encode::<ControllerGetExposedDictionaryResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
7532 (
7533 <fdomain_fuchsia_component_sandbox::DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.dictionary),
7534 ),
7535 encoder, offset, _depth
7536 )
7537 }
7538 }
7539 unsafe impl<
7540 T0: fidl::encoding::Encode<
7541 fdomain_fuchsia_component_sandbox::DictionaryRef,
7542 fdomain_client::fidl::FDomainResourceDialect,
7543 >,
7544 >
7545 fidl::encoding::Encode<
7546 ControllerGetExposedDictionaryResponse,
7547 fdomain_client::fidl::FDomainResourceDialect,
7548 > for (T0,)
7549 {
7550 #[inline]
7551 unsafe fn encode(
7552 self,
7553 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7554 offset: usize,
7555 depth: fidl::encoding::Depth,
7556 ) -> fidl::Result<()> {
7557 encoder.debug_check_bounds::<ControllerGetExposedDictionaryResponse>(offset);
7558 self.0.encode(encoder, offset + 0, depth)?;
7562 Ok(())
7563 }
7564 }
7565
7566 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
7567 for ControllerGetExposedDictionaryResponse
7568 {
7569 #[inline(always)]
7570 fn new_empty() -> Self {
7571 Self {
7572 dictionary: fidl::new_empty!(
7573 fdomain_fuchsia_component_sandbox::DictionaryRef,
7574 fdomain_client::fidl::FDomainResourceDialect
7575 ),
7576 }
7577 }
7578
7579 #[inline]
7580 unsafe fn decode(
7581 &mut self,
7582 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7583 offset: usize,
7584 _depth: fidl::encoding::Depth,
7585 ) -> fidl::Result<()> {
7586 decoder.debug_check_bounds::<Self>(offset);
7587 fidl::decode!(
7589 fdomain_fuchsia_component_sandbox::DictionaryRef,
7590 fdomain_client::fidl::FDomainResourceDialect,
7591 &mut self.dictionary,
7592 decoder,
7593 offset + 0,
7594 _depth
7595 )?;
7596 Ok(())
7597 }
7598 }
7599
7600 impl fidl::encoding::ResourceTypeMarker for ControllerGetOutputDictionaryResponse {
7601 type Borrowed<'a> = &'a mut Self;
7602 fn take_or_borrow<'a>(
7603 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7604 ) -> Self::Borrowed<'a> {
7605 value
7606 }
7607 }
7608
7609 unsafe impl fidl::encoding::TypeMarker for ControllerGetOutputDictionaryResponse {
7610 type Owned = Self;
7611
7612 #[inline(always)]
7613 fn inline_align(_context: fidl::encoding::Context) -> usize {
7614 4
7615 }
7616
7617 #[inline(always)]
7618 fn inline_size(_context: fidl::encoding::Context) -> usize {
7619 4
7620 }
7621 }
7622
7623 unsafe impl
7624 fidl::encoding::Encode<
7625 ControllerGetOutputDictionaryResponse,
7626 fdomain_client::fidl::FDomainResourceDialect,
7627 > for &mut ControllerGetOutputDictionaryResponse
7628 {
7629 #[inline]
7630 unsafe fn encode(
7631 self,
7632 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7633 offset: usize,
7634 _depth: fidl::encoding::Depth,
7635 ) -> fidl::Result<()> {
7636 encoder.debug_check_bounds::<ControllerGetOutputDictionaryResponse>(offset);
7637 fidl::encoding::Encode::<
7639 ControllerGetOutputDictionaryResponse,
7640 fdomain_client::fidl::FDomainResourceDialect,
7641 >::encode(
7642 (<fidl::encoding::HandleType<
7643 fdomain_client::EventPair,
7644 { fidl::ObjectType::EVENTPAIR.into_raw() },
7645 2147483648,
7646 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7647 &mut self.dictionary
7648 ),),
7649 encoder,
7650 offset,
7651 _depth,
7652 )
7653 }
7654 }
7655 unsafe impl<
7656 T0: fidl::encoding::Encode<
7657 fidl::encoding::HandleType<
7658 fdomain_client::EventPair,
7659 { fidl::ObjectType::EVENTPAIR.into_raw() },
7660 2147483648,
7661 >,
7662 fdomain_client::fidl::FDomainResourceDialect,
7663 >,
7664 >
7665 fidl::encoding::Encode<
7666 ControllerGetOutputDictionaryResponse,
7667 fdomain_client::fidl::FDomainResourceDialect,
7668 > for (T0,)
7669 {
7670 #[inline]
7671 unsafe fn encode(
7672 self,
7673 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7674 offset: usize,
7675 depth: fidl::encoding::Depth,
7676 ) -> fidl::Result<()> {
7677 encoder.debug_check_bounds::<ControllerGetOutputDictionaryResponse>(offset);
7678 self.0.encode(encoder, offset + 0, depth)?;
7682 Ok(())
7683 }
7684 }
7685
7686 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
7687 for ControllerGetOutputDictionaryResponse
7688 {
7689 #[inline(always)]
7690 fn new_empty() -> Self {
7691 Self {
7692 dictionary: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
7693 }
7694 }
7695
7696 #[inline]
7697 unsafe fn decode(
7698 &mut self,
7699 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7700 offset: usize,
7701 _depth: fidl::encoding::Depth,
7702 ) -> fidl::Result<()> {
7703 decoder.debug_check_bounds::<Self>(offset);
7704 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dictionary, decoder, offset + 0, _depth)?;
7706 Ok(())
7707 }
7708 }
7709
7710 impl fidl::encoding::ResourceTypeMarker for ControllerIsStartedResponse {
7711 type Borrowed<'a> = &'a mut Self;
7712 fn take_or_borrow<'a>(
7713 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7714 ) -> Self::Borrowed<'a> {
7715 value
7716 }
7717 }
7718
7719 unsafe impl fidl::encoding::TypeMarker for ControllerIsStartedResponse {
7720 type Owned = Self;
7721
7722 #[inline(always)]
7723 fn inline_align(_context: fidl::encoding::Context) -> usize {
7724 1
7725 }
7726
7727 #[inline(always)]
7728 fn inline_size(_context: fidl::encoding::Context) -> usize {
7729 1
7730 }
7731 }
7732
7733 unsafe impl
7734 fidl::encoding::Encode<
7735 ControllerIsStartedResponse,
7736 fdomain_client::fidl::FDomainResourceDialect,
7737 > for &mut ControllerIsStartedResponse
7738 {
7739 #[inline]
7740 unsafe fn encode(
7741 self,
7742 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7743 offset: usize,
7744 _depth: fidl::encoding::Depth,
7745 ) -> fidl::Result<()> {
7746 encoder.debug_check_bounds::<ControllerIsStartedResponse>(offset);
7747 fidl::encoding::Encode::<
7749 ControllerIsStartedResponse,
7750 fdomain_client::fidl::FDomainResourceDialect,
7751 >::encode(
7752 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_started),),
7753 encoder,
7754 offset,
7755 _depth,
7756 )
7757 }
7758 }
7759 unsafe impl<T0: fidl::encoding::Encode<bool, fdomain_client::fidl::FDomainResourceDialect>>
7760 fidl::encoding::Encode<
7761 ControllerIsStartedResponse,
7762 fdomain_client::fidl::FDomainResourceDialect,
7763 > for (T0,)
7764 {
7765 #[inline]
7766 unsafe fn encode(
7767 self,
7768 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7769 offset: usize,
7770 depth: fidl::encoding::Depth,
7771 ) -> fidl::Result<()> {
7772 encoder.debug_check_bounds::<ControllerIsStartedResponse>(offset);
7773 self.0.encode(encoder, offset + 0, depth)?;
7777 Ok(())
7778 }
7779 }
7780
7781 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
7782 for ControllerIsStartedResponse
7783 {
7784 #[inline(always)]
7785 fn new_empty() -> Self {
7786 Self {
7787 is_started: fidl::new_empty!(bool, fdomain_client::fidl::FDomainResourceDialect),
7788 }
7789 }
7790
7791 #[inline]
7792 unsafe fn decode(
7793 &mut self,
7794 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7795 offset: usize,
7796 _depth: fidl::encoding::Depth,
7797 ) -> fidl::Result<()> {
7798 decoder.debug_check_bounds::<Self>(offset);
7799 fidl::decode!(
7801 bool,
7802 fdomain_client::fidl::FDomainResourceDialect,
7803 &mut self.is_started,
7804 decoder,
7805 offset + 0,
7806 _depth
7807 )?;
7808 Ok(())
7809 }
7810 }
7811
7812 impl fidl::encoding::ResourceTypeMarker for EventStreamGetNextResponse {
7813 type Borrowed<'a> = &'a mut Self;
7814 fn take_or_borrow<'a>(
7815 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7816 ) -> Self::Borrowed<'a> {
7817 value
7818 }
7819 }
7820
7821 unsafe impl fidl::encoding::TypeMarker for EventStreamGetNextResponse {
7822 type Owned = Self;
7823
7824 #[inline(always)]
7825 fn inline_align(_context: fidl::encoding::Context) -> usize {
7826 8
7827 }
7828
7829 #[inline(always)]
7830 fn inline_size(_context: fidl::encoding::Context) -> usize {
7831 16
7832 }
7833 }
7834
7835 unsafe impl
7836 fidl::encoding::Encode<
7837 EventStreamGetNextResponse,
7838 fdomain_client::fidl::FDomainResourceDialect,
7839 > for &mut EventStreamGetNextResponse
7840 {
7841 #[inline]
7842 unsafe fn encode(
7843 self,
7844 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7845 offset: usize,
7846 _depth: fidl::encoding::Depth,
7847 ) -> fidl::Result<()> {
7848 encoder.debug_check_bounds::<EventStreamGetNextResponse>(offset);
7849 fidl::encoding::Encode::<EventStreamGetNextResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
7851 (
7852 <fidl::encoding::UnboundedVector<Event> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.events),
7853 ),
7854 encoder, offset, _depth
7855 )
7856 }
7857 }
7858 unsafe impl<
7859 T0: fidl::encoding::Encode<
7860 fidl::encoding::UnboundedVector<Event>,
7861 fdomain_client::fidl::FDomainResourceDialect,
7862 >,
7863 >
7864 fidl::encoding::Encode<
7865 EventStreamGetNextResponse,
7866 fdomain_client::fidl::FDomainResourceDialect,
7867 > for (T0,)
7868 {
7869 #[inline]
7870 unsafe fn encode(
7871 self,
7872 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7873 offset: usize,
7874 depth: fidl::encoding::Depth,
7875 ) -> fidl::Result<()> {
7876 encoder.debug_check_bounds::<EventStreamGetNextResponse>(offset);
7877 self.0.encode(encoder, offset + 0, depth)?;
7881 Ok(())
7882 }
7883 }
7884
7885 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
7886 for EventStreamGetNextResponse
7887 {
7888 #[inline(always)]
7889 fn new_empty() -> Self {
7890 Self {
7891 events: fidl::new_empty!(
7892 fidl::encoding::UnboundedVector<Event>,
7893 fdomain_client::fidl::FDomainResourceDialect
7894 ),
7895 }
7896 }
7897
7898 #[inline]
7899 unsafe fn decode(
7900 &mut self,
7901 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7902 offset: usize,
7903 _depth: fidl::encoding::Depth,
7904 ) -> fidl::Result<()> {
7905 decoder.debug_check_bounds::<Self>(offset);
7906 fidl::decode!(
7908 fidl::encoding::UnboundedVector<Event>,
7909 fdomain_client::fidl::FDomainResourceDialect,
7910 &mut self.events,
7911 decoder,
7912 offset + 0,
7913 _depth
7914 )?;
7915 Ok(())
7916 }
7917 }
7918
7919 impl fidl::encoding::ResourceTypeMarker for IntrospectorGetMonikerRequest {
7920 type Borrowed<'a> = &'a mut Self;
7921 fn take_or_borrow<'a>(
7922 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7923 ) -> Self::Borrowed<'a> {
7924 value
7925 }
7926 }
7927
7928 unsafe impl fidl::encoding::TypeMarker for IntrospectorGetMonikerRequest {
7929 type Owned = Self;
7930
7931 #[inline(always)]
7932 fn inline_align(_context: fidl::encoding::Context) -> usize {
7933 4
7934 }
7935
7936 #[inline(always)]
7937 fn inline_size(_context: fidl::encoding::Context) -> usize {
7938 4
7939 }
7940 }
7941
7942 unsafe impl
7943 fidl::encoding::Encode<
7944 IntrospectorGetMonikerRequest,
7945 fdomain_client::fidl::FDomainResourceDialect,
7946 > for &mut IntrospectorGetMonikerRequest
7947 {
7948 #[inline]
7949 unsafe fn encode(
7950 self,
7951 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7952 offset: usize,
7953 _depth: fidl::encoding::Depth,
7954 ) -> fidl::Result<()> {
7955 encoder.debug_check_bounds::<IntrospectorGetMonikerRequest>(offset);
7956 fidl::encoding::Encode::<
7958 IntrospectorGetMonikerRequest,
7959 fdomain_client::fidl::FDomainResourceDialect,
7960 >::encode(
7961 (<fidl::encoding::HandleType<
7962 fdomain_client::Event,
7963 { fidl::ObjectType::EVENT.into_raw() },
7964 2147483648,
7965 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7966 &mut self.component_instance,
7967 ),),
7968 encoder,
7969 offset,
7970 _depth,
7971 )
7972 }
7973 }
7974 unsafe impl<
7975 T0: fidl::encoding::Encode<
7976 fidl::encoding::HandleType<
7977 fdomain_client::Event,
7978 { fidl::ObjectType::EVENT.into_raw() },
7979 2147483648,
7980 >,
7981 fdomain_client::fidl::FDomainResourceDialect,
7982 >,
7983 >
7984 fidl::encoding::Encode<
7985 IntrospectorGetMonikerRequest,
7986 fdomain_client::fidl::FDomainResourceDialect,
7987 > for (T0,)
7988 {
7989 #[inline]
7990 unsafe fn encode(
7991 self,
7992 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
7993 offset: usize,
7994 depth: fidl::encoding::Depth,
7995 ) -> fidl::Result<()> {
7996 encoder.debug_check_bounds::<IntrospectorGetMonikerRequest>(offset);
7997 self.0.encode(encoder, offset + 0, depth)?;
8001 Ok(())
8002 }
8003 }
8004
8005 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8006 for IntrospectorGetMonikerRequest
8007 {
8008 #[inline(always)]
8009 fn new_empty() -> Self {
8010 Self {
8011 component_instance: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
8012 }
8013 }
8014
8015 #[inline]
8016 unsafe fn decode(
8017 &mut self,
8018 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8019 offset: usize,
8020 _depth: fidl::encoding::Depth,
8021 ) -> fidl::Result<()> {
8022 decoder.debug_check_bounds::<Self>(offset);
8023 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.component_instance, decoder, offset + 0, _depth)?;
8025 Ok(())
8026 }
8027 }
8028
8029 impl fidl::encoding::ResourceTypeMarker for NamespaceCreate2Request {
8030 type Borrowed<'a> = &'a mut Self;
8031 fn take_or_borrow<'a>(
8032 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8033 ) -> Self::Borrowed<'a> {
8034 value
8035 }
8036 }
8037
8038 unsafe impl fidl::encoding::TypeMarker for NamespaceCreate2Request {
8039 type Owned = Self;
8040
8041 #[inline(always)]
8042 fn inline_align(_context: fidl::encoding::Context) -> usize {
8043 8
8044 }
8045
8046 #[inline(always)]
8047 fn inline_size(_context: fidl::encoding::Context) -> usize {
8048 16
8049 }
8050 }
8051
8052 unsafe impl
8053 fidl::encoding::Encode<
8054 NamespaceCreate2Request,
8055 fdomain_client::fidl::FDomainResourceDialect,
8056 > for &mut NamespaceCreate2Request
8057 {
8058 #[inline]
8059 unsafe fn encode(
8060 self,
8061 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8062 offset: usize,
8063 _depth: fidl::encoding::Depth,
8064 ) -> fidl::Result<()> {
8065 encoder.debug_check_bounds::<NamespaceCreate2Request>(offset);
8066 fidl::encoding::Encode::<NamespaceCreate2Request, fdomain_client::fidl::FDomainResourceDialect>::encode(
8068 (
8069 <fidl::encoding::UnboundedVector<NamespaceInputEntry2> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.entries),
8070 ),
8071 encoder, offset, _depth
8072 )
8073 }
8074 }
8075 unsafe impl<
8076 T0: fidl::encoding::Encode<
8077 fidl::encoding::UnboundedVector<NamespaceInputEntry2>,
8078 fdomain_client::fidl::FDomainResourceDialect,
8079 >,
8080 >
8081 fidl::encoding::Encode<
8082 NamespaceCreate2Request,
8083 fdomain_client::fidl::FDomainResourceDialect,
8084 > for (T0,)
8085 {
8086 #[inline]
8087 unsafe fn encode(
8088 self,
8089 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8090 offset: usize,
8091 depth: fidl::encoding::Depth,
8092 ) -> fidl::Result<()> {
8093 encoder.debug_check_bounds::<NamespaceCreate2Request>(offset);
8094 self.0.encode(encoder, offset + 0, depth)?;
8098 Ok(())
8099 }
8100 }
8101
8102 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8103 for NamespaceCreate2Request
8104 {
8105 #[inline(always)]
8106 fn new_empty() -> Self {
8107 Self {
8108 entries: fidl::new_empty!(
8109 fidl::encoding::UnboundedVector<NamespaceInputEntry2>,
8110 fdomain_client::fidl::FDomainResourceDialect
8111 ),
8112 }
8113 }
8114
8115 #[inline]
8116 unsafe fn decode(
8117 &mut self,
8118 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8119 offset: usize,
8120 _depth: fidl::encoding::Depth,
8121 ) -> fidl::Result<()> {
8122 decoder.debug_check_bounds::<Self>(offset);
8123 fidl::decode!(
8125 fidl::encoding::UnboundedVector<NamespaceInputEntry2>,
8126 fdomain_client::fidl::FDomainResourceDialect,
8127 &mut self.entries,
8128 decoder,
8129 offset + 0,
8130 _depth
8131 )?;
8132 Ok(())
8133 }
8134 }
8135
8136 impl fidl::encoding::ResourceTypeMarker for NamespaceCreateRequest {
8137 type Borrowed<'a> = &'a mut Self;
8138 fn take_or_borrow<'a>(
8139 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8140 ) -> Self::Borrowed<'a> {
8141 value
8142 }
8143 }
8144
8145 unsafe impl fidl::encoding::TypeMarker for NamespaceCreateRequest {
8146 type Owned = Self;
8147
8148 #[inline(always)]
8149 fn inline_align(_context: fidl::encoding::Context) -> usize {
8150 8
8151 }
8152
8153 #[inline(always)]
8154 fn inline_size(_context: fidl::encoding::Context) -> usize {
8155 16
8156 }
8157 }
8158
8159 unsafe impl
8160 fidl::encoding::Encode<NamespaceCreateRequest, fdomain_client::fidl::FDomainResourceDialect>
8161 for &mut NamespaceCreateRequest
8162 {
8163 #[inline]
8164 unsafe fn encode(
8165 self,
8166 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8167 offset: usize,
8168 _depth: fidl::encoding::Depth,
8169 ) -> fidl::Result<()> {
8170 encoder.debug_check_bounds::<NamespaceCreateRequest>(offset);
8171 fidl::encoding::Encode::<NamespaceCreateRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
8173 (
8174 <fidl::encoding::UnboundedVector<NamespaceInputEntry> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.entries),
8175 ),
8176 encoder, offset, _depth
8177 )
8178 }
8179 }
8180 unsafe impl<
8181 T0: fidl::encoding::Encode<
8182 fidl::encoding::UnboundedVector<NamespaceInputEntry>,
8183 fdomain_client::fidl::FDomainResourceDialect,
8184 >,
8185 >
8186 fidl::encoding::Encode<NamespaceCreateRequest, fdomain_client::fidl::FDomainResourceDialect>
8187 for (T0,)
8188 {
8189 #[inline]
8190 unsafe fn encode(
8191 self,
8192 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8193 offset: usize,
8194 depth: fidl::encoding::Depth,
8195 ) -> fidl::Result<()> {
8196 encoder.debug_check_bounds::<NamespaceCreateRequest>(offset);
8197 self.0.encode(encoder, offset + 0, depth)?;
8201 Ok(())
8202 }
8203 }
8204
8205 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8206 for NamespaceCreateRequest
8207 {
8208 #[inline(always)]
8209 fn new_empty() -> Self {
8210 Self {
8211 entries: fidl::new_empty!(
8212 fidl::encoding::UnboundedVector<NamespaceInputEntry>,
8213 fdomain_client::fidl::FDomainResourceDialect
8214 ),
8215 }
8216 }
8217
8218 #[inline]
8219 unsafe fn decode(
8220 &mut self,
8221 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8222 offset: usize,
8223 _depth: fidl::encoding::Depth,
8224 ) -> fidl::Result<()> {
8225 decoder.debug_check_bounds::<Self>(offset);
8226 fidl::decode!(
8228 fidl::encoding::UnboundedVector<NamespaceInputEntry>,
8229 fdomain_client::fidl::FDomainResourceDialect,
8230 &mut self.entries,
8231 decoder,
8232 offset + 0,
8233 _depth
8234 )?;
8235 Ok(())
8236 }
8237 }
8238
8239 impl fidl::encoding::ResourceTypeMarker for NamespaceInputEntry {
8240 type Borrowed<'a> = &'a mut Self;
8241 fn take_or_borrow<'a>(
8242 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8243 ) -> Self::Borrowed<'a> {
8244 value
8245 }
8246 }
8247
8248 unsafe impl fidl::encoding::TypeMarker for NamespaceInputEntry {
8249 type Owned = Self;
8250
8251 #[inline(always)]
8252 fn inline_align(_context: fidl::encoding::Context) -> usize {
8253 8
8254 }
8255
8256 #[inline(always)]
8257 fn inline_size(_context: fidl::encoding::Context) -> usize {
8258 24
8259 }
8260 }
8261
8262 unsafe impl
8263 fidl::encoding::Encode<NamespaceInputEntry, fdomain_client::fidl::FDomainResourceDialect>
8264 for &mut NamespaceInputEntry
8265 {
8266 #[inline]
8267 unsafe fn encode(
8268 self,
8269 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8270 offset: usize,
8271 _depth: fidl::encoding::Depth,
8272 ) -> fidl::Result<()> {
8273 encoder.debug_check_bounds::<NamespaceInputEntry>(offset);
8274 fidl::encoding::Encode::<NamespaceInputEntry, fdomain_client::fidl::FDomainResourceDialect>::encode(
8276 (
8277 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
8278 <fidl::encoding::Endpoint<fdomain_client::fidl::ClientEnd<fdomain_fuchsia_component_sandbox::DictionaryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.dictionary),
8279 ),
8280 encoder, offset, _depth
8281 )
8282 }
8283 }
8284 unsafe impl<
8285 T0: fidl::encoding::Encode<
8286 fidl::encoding::BoundedString<4095>,
8287 fdomain_client::fidl::FDomainResourceDialect,
8288 >,
8289 T1: fidl::encoding::Encode<
8290 fidl::encoding::Endpoint<
8291 fdomain_client::fidl::ClientEnd<
8292 fdomain_fuchsia_component_sandbox::DictionaryMarker,
8293 >,
8294 >,
8295 fdomain_client::fidl::FDomainResourceDialect,
8296 >,
8297 > fidl::encoding::Encode<NamespaceInputEntry, fdomain_client::fidl::FDomainResourceDialect>
8298 for (T0, T1)
8299 {
8300 #[inline]
8301 unsafe fn encode(
8302 self,
8303 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8304 offset: usize,
8305 depth: fidl::encoding::Depth,
8306 ) -> fidl::Result<()> {
8307 encoder.debug_check_bounds::<NamespaceInputEntry>(offset);
8308 unsafe {
8311 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
8312 (ptr as *mut u64).write_unaligned(0);
8313 }
8314 self.0.encode(encoder, offset + 0, depth)?;
8316 self.1.encode(encoder, offset + 16, depth)?;
8317 Ok(())
8318 }
8319 }
8320
8321 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8322 for NamespaceInputEntry
8323 {
8324 #[inline(always)]
8325 fn new_empty() -> Self {
8326 Self {
8327 path: fidl::new_empty!(
8328 fidl::encoding::BoundedString<4095>,
8329 fdomain_client::fidl::FDomainResourceDialect
8330 ),
8331 dictionary: fidl::new_empty!(
8332 fidl::encoding::Endpoint<
8333 fdomain_client::fidl::ClientEnd<
8334 fdomain_fuchsia_component_sandbox::DictionaryMarker,
8335 >,
8336 >,
8337 fdomain_client::fidl::FDomainResourceDialect
8338 ),
8339 }
8340 }
8341
8342 #[inline]
8343 unsafe fn decode(
8344 &mut self,
8345 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8346 offset: usize,
8347 _depth: fidl::encoding::Depth,
8348 ) -> fidl::Result<()> {
8349 decoder.debug_check_bounds::<Self>(offset);
8350 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
8352 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8353 let mask = 0xffffffff00000000u64;
8354 let maskedval = padval & mask;
8355 if maskedval != 0 {
8356 return Err(fidl::Error::NonZeroPadding {
8357 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
8358 });
8359 }
8360 fidl::decode!(
8361 fidl::encoding::BoundedString<4095>,
8362 fdomain_client::fidl::FDomainResourceDialect,
8363 &mut self.path,
8364 decoder,
8365 offset + 0,
8366 _depth
8367 )?;
8368 fidl::decode!(
8369 fidl::encoding::Endpoint<
8370 fdomain_client::fidl::ClientEnd<
8371 fdomain_fuchsia_component_sandbox::DictionaryMarker,
8372 >,
8373 >,
8374 fdomain_client::fidl::FDomainResourceDialect,
8375 &mut self.dictionary,
8376 decoder,
8377 offset + 16,
8378 _depth
8379 )?;
8380 Ok(())
8381 }
8382 }
8383
8384 impl fidl::encoding::ResourceTypeMarker for NamespaceInputEntry2 {
8385 type Borrowed<'a> = &'a mut Self;
8386 fn take_or_borrow<'a>(
8387 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8388 ) -> Self::Borrowed<'a> {
8389 value
8390 }
8391 }
8392
8393 unsafe impl fidl::encoding::TypeMarker for NamespaceInputEntry2 {
8394 type Owned = Self;
8395
8396 #[inline(always)]
8397 fn inline_align(_context: fidl::encoding::Context) -> usize {
8398 8
8399 }
8400
8401 #[inline(always)]
8402 fn inline_size(_context: fidl::encoding::Context) -> usize {
8403 24
8404 }
8405 }
8406
8407 unsafe impl
8408 fidl::encoding::Encode<NamespaceInputEntry2, fdomain_client::fidl::FDomainResourceDialect>
8409 for &mut NamespaceInputEntry2
8410 {
8411 #[inline]
8412 unsafe fn encode(
8413 self,
8414 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8415 offset: usize,
8416 _depth: fidl::encoding::Depth,
8417 ) -> fidl::Result<()> {
8418 encoder.debug_check_bounds::<NamespaceInputEntry2>(offset);
8419 fidl::encoding::Encode::<NamespaceInputEntry2, fdomain_client::fidl::FDomainResourceDialect>::encode(
8421 (
8422 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
8423 <fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.capability),
8424 ),
8425 encoder, offset, _depth
8426 )
8427 }
8428 }
8429 unsafe impl<
8430 T0: fidl::encoding::Encode<
8431 fidl::encoding::BoundedString<4095>,
8432 fdomain_client::fidl::FDomainResourceDialect,
8433 >,
8434 T1: fidl::encoding::Encode<
8435 fidl::encoding::HandleType<
8436 fdomain_client::EventPair,
8437 { fidl::ObjectType::EVENTPAIR.into_raw() },
8438 2147483648,
8439 >,
8440 fdomain_client::fidl::FDomainResourceDialect,
8441 >,
8442 > fidl::encoding::Encode<NamespaceInputEntry2, fdomain_client::fidl::FDomainResourceDialect>
8443 for (T0, T1)
8444 {
8445 #[inline]
8446 unsafe fn encode(
8447 self,
8448 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8449 offset: usize,
8450 depth: fidl::encoding::Depth,
8451 ) -> fidl::Result<()> {
8452 encoder.debug_check_bounds::<NamespaceInputEntry2>(offset);
8453 unsafe {
8456 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
8457 (ptr as *mut u64).write_unaligned(0);
8458 }
8459 self.0.encode(encoder, offset + 0, depth)?;
8461 self.1.encode(encoder, offset + 16, depth)?;
8462 Ok(())
8463 }
8464 }
8465
8466 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8467 for NamespaceInputEntry2
8468 {
8469 #[inline(always)]
8470 fn new_empty() -> Self {
8471 Self {
8472 path: fidl::new_empty!(
8473 fidl::encoding::BoundedString<4095>,
8474 fdomain_client::fidl::FDomainResourceDialect
8475 ),
8476 capability: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
8477 }
8478 }
8479
8480 #[inline]
8481 unsafe fn decode(
8482 &mut self,
8483 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8484 offset: usize,
8485 _depth: fidl::encoding::Depth,
8486 ) -> fidl::Result<()> {
8487 decoder.debug_check_bounds::<Self>(offset);
8488 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
8490 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8491 let mask = 0xffffffff00000000u64;
8492 let maskedval = padval & mask;
8493 if maskedval != 0 {
8494 return Err(fidl::Error::NonZeroPadding {
8495 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
8496 });
8497 }
8498 fidl::decode!(
8499 fidl::encoding::BoundedString<4095>,
8500 fdomain_client::fidl::FDomainResourceDialect,
8501 &mut self.path,
8502 decoder,
8503 offset + 0,
8504 _depth
8505 )?;
8506 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.capability, decoder, offset + 16, _depth)?;
8507 Ok(())
8508 }
8509 }
8510
8511 impl fidl::encoding::ResourceTypeMarker for NamespaceCreate2Response {
8512 type Borrowed<'a> = &'a mut Self;
8513 fn take_or_borrow<'a>(
8514 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8515 ) -> Self::Borrowed<'a> {
8516 value
8517 }
8518 }
8519
8520 unsafe impl fidl::encoding::TypeMarker for NamespaceCreate2Response {
8521 type Owned = Self;
8522
8523 #[inline(always)]
8524 fn inline_align(_context: fidl::encoding::Context) -> usize {
8525 8
8526 }
8527
8528 #[inline(always)]
8529 fn inline_size(_context: fidl::encoding::Context) -> usize {
8530 16
8531 }
8532 }
8533
8534 unsafe impl
8535 fidl::encoding::Encode<
8536 NamespaceCreate2Response,
8537 fdomain_client::fidl::FDomainResourceDialect,
8538 > for &mut NamespaceCreate2Response
8539 {
8540 #[inline]
8541 unsafe fn encode(
8542 self,
8543 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8544 offset: usize,
8545 _depth: fidl::encoding::Depth,
8546 ) -> fidl::Result<()> {
8547 encoder.debug_check_bounds::<NamespaceCreate2Response>(offset);
8548 fidl::encoding::Encode::<NamespaceCreate2Response, fdomain_client::fidl::FDomainResourceDialect>::encode(
8550 (
8551 <fidl::encoding::UnboundedVector<NamespaceEntry> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.entries),
8552 ),
8553 encoder, offset, _depth
8554 )
8555 }
8556 }
8557 unsafe impl<
8558 T0: fidl::encoding::Encode<
8559 fidl::encoding::UnboundedVector<NamespaceEntry>,
8560 fdomain_client::fidl::FDomainResourceDialect,
8561 >,
8562 >
8563 fidl::encoding::Encode<
8564 NamespaceCreate2Response,
8565 fdomain_client::fidl::FDomainResourceDialect,
8566 > for (T0,)
8567 {
8568 #[inline]
8569 unsafe fn encode(
8570 self,
8571 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8572 offset: usize,
8573 depth: fidl::encoding::Depth,
8574 ) -> fidl::Result<()> {
8575 encoder.debug_check_bounds::<NamespaceCreate2Response>(offset);
8576 self.0.encode(encoder, offset + 0, depth)?;
8580 Ok(())
8581 }
8582 }
8583
8584 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8585 for NamespaceCreate2Response
8586 {
8587 #[inline(always)]
8588 fn new_empty() -> Self {
8589 Self {
8590 entries: fidl::new_empty!(
8591 fidl::encoding::UnboundedVector<NamespaceEntry>,
8592 fdomain_client::fidl::FDomainResourceDialect
8593 ),
8594 }
8595 }
8596
8597 #[inline]
8598 unsafe fn decode(
8599 &mut self,
8600 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8601 offset: usize,
8602 _depth: fidl::encoding::Depth,
8603 ) -> fidl::Result<()> {
8604 decoder.debug_check_bounds::<Self>(offset);
8605 fidl::decode!(
8607 fidl::encoding::UnboundedVector<NamespaceEntry>,
8608 fdomain_client::fidl::FDomainResourceDialect,
8609 &mut self.entries,
8610 decoder,
8611 offset + 0,
8612 _depth
8613 )?;
8614 Ok(())
8615 }
8616 }
8617
8618 impl fidl::encoding::ResourceTypeMarker for NamespaceCreateResponse {
8619 type Borrowed<'a> = &'a mut Self;
8620 fn take_or_borrow<'a>(
8621 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8622 ) -> Self::Borrowed<'a> {
8623 value
8624 }
8625 }
8626
8627 unsafe impl fidl::encoding::TypeMarker for NamespaceCreateResponse {
8628 type Owned = Self;
8629
8630 #[inline(always)]
8631 fn inline_align(_context: fidl::encoding::Context) -> usize {
8632 8
8633 }
8634
8635 #[inline(always)]
8636 fn inline_size(_context: fidl::encoding::Context) -> usize {
8637 16
8638 }
8639 }
8640
8641 unsafe impl
8642 fidl::encoding::Encode<
8643 NamespaceCreateResponse,
8644 fdomain_client::fidl::FDomainResourceDialect,
8645 > for &mut NamespaceCreateResponse
8646 {
8647 #[inline]
8648 unsafe fn encode(
8649 self,
8650 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8651 offset: usize,
8652 _depth: fidl::encoding::Depth,
8653 ) -> fidl::Result<()> {
8654 encoder.debug_check_bounds::<NamespaceCreateResponse>(offset);
8655 fidl::encoding::Encode::<NamespaceCreateResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
8657 (
8658 <fidl::encoding::UnboundedVector<NamespaceEntry> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.entries),
8659 ),
8660 encoder, offset, _depth
8661 )
8662 }
8663 }
8664 unsafe impl<
8665 T0: fidl::encoding::Encode<
8666 fidl::encoding::UnboundedVector<NamespaceEntry>,
8667 fdomain_client::fidl::FDomainResourceDialect,
8668 >,
8669 >
8670 fidl::encoding::Encode<
8671 NamespaceCreateResponse,
8672 fdomain_client::fidl::FDomainResourceDialect,
8673 > for (T0,)
8674 {
8675 #[inline]
8676 unsafe fn encode(
8677 self,
8678 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8679 offset: usize,
8680 depth: fidl::encoding::Depth,
8681 ) -> fidl::Result<()> {
8682 encoder.debug_check_bounds::<NamespaceCreateResponse>(offset);
8683 self.0.encode(encoder, offset + 0, depth)?;
8687 Ok(())
8688 }
8689 }
8690
8691 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8692 for NamespaceCreateResponse
8693 {
8694 #[inline(always)]
8695 fn new_empty() -> Self {
8696 Self {
8697 entries: fidl::new_empty!(
8698 fidl::encoding::UnboundedVector<NamespaceEntry>,
8699 fdomain_client::fidl::FDomainResourceDialect
8700 ),
8701 }
8702 }
8703
8704 #[inline]
8705 unsafe fn decode(
8706 &mut self,
8707 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8708 offset: usize,
8709 _depth: fidl::encoding::Depth,
8710 ) -> fidl::Result<()> {
8711 decoder.debug_check_bounds::<Self>(offset);
8712 fidl::decode!(
8714 fidl::encoding::UnboundedVector<NamespaceEntry>,
8715 fdomain_client::fidl::FDomainResourceDialect,
8716 &mut self.entries,
8717 decoder,
8718 offset + 0,
8719 _depth
8720 )?;
8721 Ok(())
8722 }
8723 }
8724
8725 impl fidl::encoding::ResourceTypeMarker for RealmCreateChildRequest {
8726 type Borrowed<'a> = &'a mut Self;
8727 fn take_or_borrow<'a>(
8728 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8729 ) -> Self::Borrowed<'a> {
8730 value
8731 }
8732 }
8733
8734 unsafe impl fidl::encoding::TypeMarker for RealmCreateChildRequest {
8735 type Owned = Self;
8736
8737 #[inline(always)]
8738 fn inline_align(_context: fidl::encoding::Context) -> usize {
8739 8
8740 }
8741
8742 #[inline(always)]
8743 fn inline_size(_context: fidl::encoding::Context) -> usize {
8744 48
8745 }
8746 }
8747
8748 unsafe impl
8749 fidl::encoding::Encode<
8750 RealmCreateChildRequest,
8751 fdomain_client::fidl::FDomainResourceDialect,
8752 > for &mut RealmCreateChildRequest
8753 {
8754 #[inline]
8755 unsafe fn encode(
8756 self,
8757 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8758 offset: usize,
8759 _depth: fidl::encoding::Depth,
8760 ) -> fidl::Result<()> {
8761 encoder.debug_check_bounds::<RealmCreateChildRequest>(offset);
8762 fidl::encoding::Encode::<RealmCreateChildRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
8764 (
8765 <fdomain_fuchsia_component_decl::CollectionRef as fidl::encoding::ValueTypeMarker>::borrow(&self.collection),
8766 <fdomain_fuchsia_component_decl::Child as fidl::encoding::ValueTypeMarker>::borrow(&self.decl),
8767 <CreateChildArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.args),
8768 ),
8769 encoder, offset, _depth
8770 )
8771 }
8772 }
8773 unsafe impl<
8774 T0: fidl::encoding::Encode<
8775 fdomain_fuchsia_component_decl::CollectionRef,
8776 fdomain_client::fidl::FDomainResourceDialect,
8777 >,
8778 T1: fidl::encoding::Encode<
8779 fdomain_fuchsia_component_decl::Child,
8780 fdomain_client::fidl::FDomainResourceDialect,
8781 >,
8782 T2: fidl::encoding::Encode<CreateChildArgs, fdomain_client::fidl::FDomainResourceDialect>,
8783 >
8784 fidl::encoding::Encode<
8785 RealmCreateChildRequest,
8786 fdomain_client::fidl::FDomainResourceDialect,
8787 > for (T0, T1, T2)
8788 {
8789 #[inline]
8790 unsafe fn encode(
8791 self,
8792 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8793 offset: usize,
8794 depth: fidl::encoding::Depth,
8795 ) -> fidl::Result<()> {
8796 encoder.debug_check_bounds::<RealmCreateChildRequest>(offset);
8797 self.0.encode(encoder, offset + 0, depth)?;
8801 self.1.encode(encoder, offset + 16, depth)?;
8802 self.2.encode(encoder, offset + 32, depth)?;
8803 Ok(())
8804 }
8805 }
8806
8807 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8808 for RealmCreateChildRequest
8809 {
8810 #[inline(always)]
8811 fn new_empty() -> Self {
8812 Self {
8813 collection: fidl::new_empty!(
8814 fdomain_fuchsia_component_decl::CollectionRef,
8815 fdomain_client::fidl::FDomainResourceDialect
8816 ),
8817 decl: fidl::new_empty!(
8818 fdomain_fuchsia_component_decl::Child,
8819 fdomain_client::fidl::FDomainResourceDialect
8820 ),
8821 args: fidl::new_empty!(
8822 CreateChildArgs,
8823 fdomain_client::fidl::FDomainResourceDialect
8824 ),
8825 }
8826 }
8827
8828 #[inline]
8829 unsafe fn decode(
8830 &mut self,
8831 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8832 offset: usize,
8833 _depth: fidl::encoding::Depth,
8834 ) -> fidl::Result<()> {
8835 decoder.debug_check_bounds::<Self>(offset);
8836 fidl::decode!(
8838 fdomain_fuchsia_component_decl::CollectionRef,
8839 fdomain_client::fidl::FDomainResourceDialect,
8840 &mut self.collection,
8841 decoder,
8842 offset + 0,
8843 _depth
8844 )?;
8845 fidl::decode!(
8846 fdomain_fuchsia_component_decl::Child,
8847 fdomain_client::fidl::FDomainResourceDialect,
8848 &mut self.decl,
8849 decoder,
8850 offset + 16,
8851 _depth
8852 )?;
8853 fidl::decode!(
8854 CreateChildArgs,
8855 fdomain_client::fidl::FDomainResourceDialect,
8856 &mut self.args,
8857 decoder,
8858 offset + 32,
8859 _depth
8860 )?;
8861 Ok(())
8862 }
8863 }
8864
8865 impl fidl::encoding::ResourceTypeMarker for RealmGetChildOutputDictionaryDeprecatedRequest {
8866 type Borrowed<'a> = &'a mut Self;
8867 fn take_or_borrow<'a>(
8868 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8869 ) -> Self::Borrowed<'a> {
8870 value
8871 }
8872 }
8873
8874 unsafe impl fidl::encoding::TypeMarker for RealmGetChildOutputDictionaryDeprecatedRequest {
8875 type Owned = Self;
8876
8877 #[inline(always)]
8878 fn inline_align(_context: fidl::encoding::Context) -> usize {
8879 8
8880 }
8881
8882 #[inline(always)]
8883 fn inline_size(_context: fidl::encoding::Context) -> usize {
8884 32
8885 }
8886 }
8887
8888 unsafe impl
8889 fidl::encoding::Encode<
8890 RealmGetChildOutputDictionaryDeprecatedRequest,
8891 fdomain_client::fidl::FDomainResourceDialect,
8892 > for &mut RealmGetChildOutputDictionaryDeprecatedRequest
8893 {
8894 #[inline]
8895 unsafe fn encode(
8896 self,
8897 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8898 offset: usize,
8899 _depth: fidl::encoding::Depth,
8900 ) -> fidl::Result<()> {
8901 encoder.debug_check_bounds::<RealmGetChildOutputDictionaryDeprecatedRequest>(offset);
8902 fidl::encoding::Encode::<RealmGetChildOutputDictionaryDeprecatedRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
8904 (
8905 <fdomain_fuchsia_component_decl::ChildRef as fidl::encoding::ValueTypeMarker>::borrow(&self.child),
8906 ),
8907 encoder, offset, _depth
8908 )
8909 }
8910 }
8911 unsafe impl<
8912 T0: fidl::encoding::Encode<
8913 fdomain_fuchsia_component_decl::ChildRef,
8914 fdomain_client::fidl::FDomainResourceDialect,
8915 >,
8916 >
8917 fidl::encoding::Encode<
8918 RealmGetChildOutputDictionaryDeprecatedRequest,
8919 fdomain_client::fidl::FDomainResourceDialect,
8920 > for (T0,)
8921 {
8922 #[inline]
8923 unsafe fn encode(
8924 self,
8925 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8926 offset: usize,
8927 depth: fidl::encoding::Depth,
8928 ) -> fidl::Result<()> {
8929 encoder.debug_check_bounds::<RealmGetChildOutputDictionaryDeprecatedRequest>(offset);
8930 self.0.encode(encoder, offset + 0, depth)?;
8934 Ok(())
8935 }
8936 }
8937
8938 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
8939 for RealmGetChildOutputDictionaryDeprecatedRequest
8940 {
8941 #[inline(always)]
8942 fn new_empty() -> Self {
8943 Self {
8944 child: fidl::new_empty!(
8945 fdomain_fuchsia_component_decl::ChildRef,
8946 fdomain_client::fidl::FDomainResourceDialect
8947 ),
8948 }
8949 }
8950
8951 #[inline]
8952 unsafe fn decode(
8953 &mut self,
8954 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
8955 offset: usize,
8956 _depth: fidl::encoding::Depth,
8957 ) -> fidl::Result<()> {
8958 decoder.debug_check_bounds::<Self>(offset);
8959 fidl::decode!(
8961 fdomain_fuchsia_component_decl::ChildRef,
8962 fdomain_client::fidl::FDomainResourceDialect,
8963 &mut self.child,
8964 decoder,
8965 offset + 0,
8966 _depth
8967 )?;
8968 Ok(())
8969 }
8970 }
8971
8972 impl fidl::encoding::ResourceTypeMarker for RealmGetChildOutputDictionaryRequest {
8973 type Borrowed<'a> = &'a mut Self;
8974 fn take_or_borrow<'a>(
8975 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8976 ) -> Self::Borrowed<'a> {
8977 value
8978 }
8979 }
8980
8981 unsafe impl fidl::encoding::TypeMarker for RealmGetChildOutputDictionaryRequest {
8982 type Owned = Self;
8983
8984 #[inline(always)]
8985 fn inline_align(_context: fidl::encoding::Context) -> usize {
8986 8
8987 }
8988
8989 #[inline(always)]
8990 fn inline_size(_context: fidl::encoding::Context) -> usize {
8991 32
8992 }
8993 }
8994
8995 unsafe impl
8996 fidl::encoding::Encode<
8997 RealmGetChildOutputDictionaryRequest,
8998 fdomain_client::fidl::FDomainResourceDialect,
8999 > for &mut RealmGetChildOutputDictionaryRequest
9000 {
9001 #[inline]
9002 unsafe fn encode(
9003 self,
9004 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9005 offset: usize,
9006 _depth: fidl::encoding::Depth,
9007 ) -> fidl::Result<()> {
9008 encoder.debug_check_bounds::<RealmGetChildOutputDictionaryRequest>(offset);
9009 fidl::encoding::Encode::<RealmGetChildOutputDictionaryRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9011 (
9012 <fdomain_fuchsia_component_decl::ChildRef as fidl::encoding::ValueTypeMarker>::borrow(&self.child),
9013 ),
9014 encoder, offset, _depth
9015 )
9016 }
9017 }
9018 unsafe impl<
9019 T0: fidl::encoding::Encode<
9020 fdomain_fuchsia_component_decl::ChildRef,
9021 fdomain_client::fidl::FDomainResourceDialect,
9022 >,
9023 >
9024 fidl::encoding::Encode<
9025 RealmGetChildOutputDictionaryRequest,
9026 fdomain_client::fidl::FDomainResourceDialect,
9027 > for (T0,)
9028 {
9029 #[inline]
9030 unsafe fn encode(
9031 self,
9032 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9033 offset: usize,
9034 depth: fidl::encoding::Depth,
9035 ) -> fidl::Result<()> {
9036 encoder.debug_check_bounds::<RealmGetChildOutputDictionaryRequest>(offset);
9037 self.0.encode(encoder, offset + 0, depth)?;
9041 Ok(())
9042 }
9043 }
9044
9045 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9046 for RealmGetChildOutputDictionaryRequest
9047 {
9048 #[inline(always)]
9049 fn new_empty() -> Self {
9050 Self {
9051 child: fidl::new_empty!(
9052 fdomain_fuchsia_component_decl::ChildRef,
9053 fdomain_client::fidl::FDomainResourceDialect
9054 ),
9055 }
9056 }
9057
9058 #[inline]
9059 unsafe fn decode(
9060 &mut self,
9061 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9062 offset: usize,
9063 _depth: fidl::encoding::Depth,
9064 ) -> fidl::Result<()> {
9065 decoder.debug_check_bounds::<Self>(offset);
9066 fidl::decode!(
9068 fdomain_fuchsia_component_decl::ChildRef,
9069 fdomain_client::fidl::FDomainResourceDialect,
9070 &mut self.child,
9071 decoder,
9072 offset + 0,
9073 _depth
9074 )?;
9075 Ok(())
9076 }
9077 }
9078
9079 impl fidl::encoding::ResourceTypeMarker for RealmListChildrenRequest {
9080 type Borrowed<'a> = &'a mut Self;
9081 fn take_or_borrow<'a>(
9082 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9083 ) -> Self::Borrowed<'a> {
9084 value
9085 }
9086 }
9087
9088 unsafe impl fidl::encoding::TypeMarker for RealmListChildrenRequest {
9089 type Owned = Self;
9090
9091 #[inline(always)]
9092 fn inline_align(_context: fidl::encoding::Context) -> usize {
9093 8
9094 }
9095
9096 #[inline(always)]
9097 fn inline_size(_context: fidl::encoding::Context) -> usize {
9098 24
9099 }
9100 }
9101
9102 unsafe impl
9103 fidl::encoding::Encode<
9104 RealmListChildrenRequest,
9105 fdomain_client::fidl::FDomainResourceDialect,
9106 > for &mut RealmListChildrenRequest
9107 {
9108 #[inline]
9109 unsafe fn encode(
9110 self,
9111 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9112 offset: usize,
9113 _depth: fidl::encoding::Depth,
9114 ) -> fidl::Result<()> {
9115 encoder.debug_check_bounds::<RealmListChildrenRequest>(offset);
9116 fidl::encoding::Encode::<RealmListChildrenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9118 (
9119 <fdomain_fuchsia_component_decl::CollectionRef as fidl::encoding::ValueTypeMarker>::borrow(&self.collection),
9120 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ChildIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iter),
9121 ),
9122 encoder, offset, _depth
9123 )
9124 }
9125 }
9126 unsafe impl<
9127 T0: fidl::encoding::Encode<
9128 fdomain_fuchsia_component_decl::CollectionRef,
9129 fdomain_client::fidl::FDomainResourceDialect,
9130 >,
9131 T1: fidl::encoding::Encode<
9132 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ChildIteratorMarker>>,
9133 fdomain_client::fidl::FDomainResourceDialect,
9134 >,
9135 >
9136 fidl::encoding::Encode<
9137 RealmListChildrenRequest,
9138 fdomain_client::fidl::FDomainResourceDialect,
9139 > for (T0, T1)
9140 {
9141 #[inline]
9142 unsafe fn encode(
9143 self,
9144 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9145 offset: usize,
9146 depth: fidl::encoding::Depth,
9147 ) -> fidl::Result<()> {
9148 encoder.debug_check_bounds::<RealmListChildrenRequest>(offset);
9149 unsafe {
9152 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
9153 (ptr as *mut u64).write_unaligned(0);
9154 }
9155 self.0.encode(encoder, offset + 0, depth)?;
9157 self.1.encode(encoder, offset + 16, depth)?;
9158 Ok(())
9159 }
9160 }
9161
9162 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9163 for RealmListChildrenRequest
9164 {
9165 #[inline(always)]
9166 fn new_empty() -> Self {
9167 Self {
9168 collection: fidl::new_empty!(
9169 fdomain_fuchsia_component_decl::CollectionRef,
9170 fdomain_client::fidl::FDomainResourceDialect
9171 ),
9172 iter: fidl::new_empty!(
9173 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ChildIteratorMarker>>,
9174 fdomain_client::fidl::FDomainResourceDialect
9175 ),
9176 }
9177 }
9178
9179 #[inline]
9180 unsafe fn decode(
9181 &mut self,
9182 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9183 offset: usize,
9184 _depth: fidl::encoding::Depth,
9185 ) -> fidl::Result<()> {
9186 decoder.debug_check_bounds::<Self>(offset);
9187 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
9189 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9190 let mask = 0xffffffff00000000u64;
9191 let maskedval = padval & mask;
9192 if maskedval != 0 {
9193 return Err(fidl::Error::NonZeroPadding {
9194 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
9195 });
9196 }
9197 fidl::decode!(
9198 fdomain_fuchsia_component_decl::CollectionRef,
9199 fdomain_client::fidl::FDomainResourceDialect,
9200 &mut self.collection,
9201 decoder,
9202 offset + 0,
9203 _depth
9204 )?;
9205 fidl::decode!(
9206 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ChildIteratorMarker>>,
9207 fdomain_client::fidl::FDomainResourceDialect,
9208 &mut self.iter,
9209 decoder,
9210 offset + 16,
9211 _depth
9212 )?;
9213 Ok(())
9214 }
9215 }
9216
9217 impl fidl::encoding::ResourceTypeMarker for RealmOpenControllerRequest {
9218 type Borrowed<'a> = &'a mut Self;
9219 fn take_or_borrow<'a>(
9220 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9221 ) -> Self::Borrowed<'a> {
9222 value
9223 }
9224 }
9225
9226 unsafe impl fidl::encoding::TypeMarker for RealmOpenControllerRequest {
9227 type Owned = Self;
9228
9229 #[inline(always)]
9230 fn inline_align(_context: fidl::encoding::Context) -> usize {
9231 8
9232 }
9233
9234 #[inline(always)]
9235 fn inline_size(_context: fidl::encoding::Context) -> usize {
9236 40
9237 }
9238 }
9239
9240 unsafe impl
9241 fidl::encoding::Encode<
9242 RealmOpenControllerRequest,
9243 fdomain_client::fidl::FDomainResourceDialect,
9244 > for &mut RealmOpenControllerRequest
9245 {
9246 #[inline]
9247 unsafe fn encode(
9248 self,
9249 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9250 offset: usize,
9251 _depth: fidl::encoding::Depth,
9252 ) -> fidl::Result<()> {
9253 encoder.debug_check_bounds::<RealmOpenControllerRequest>(offset);
9254 fidl::encoding::Encode::<RealmOpenControllerRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9256 (
9257 <fdomain_fuchsia_component_decl::ChildRef as fidl::encoding::ValueTypeMarker>::borrow(&self.child),
9258 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
9259 ),
9260 encoder, offset, _depth
9261 )
9262 }
9263 }
9264 unsafe impl<
9265 T0: fidl::encoding::Encode<
9266 fdomain_fuchsia_component_decl::ChildRef,
9267 fdomain_client::fidl::FDomainResourceDialect,
9268 >,
9269 T1: fidl::encoding::Encode<
9270 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ControllerMarker>>,
9271 fdomain_client::fidl::FDomainResourceDialect,
9272 >,
9273 >
9274 fidl::encoding::Encode<
9275 RealmOpenControllerRequest,
9276 fdomain_client::fidl::FDomainResourceDialect,
9277 > for (T0, T1)
9278 {
9279 #[inline]
9280 unsafe fn encode(
9281 self,
9282 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9283 offset: usize,
9284 depth: fidl::encoding::Depth,
9285 ) -> fidl::Result<()> {
9286 encoder.debug_check_bounds::<RealmOpenControllerRequest>(offset);
9287 unsafe {
9290 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
9291 (ptr as *mut u64).write_unaligned(0);
9292 }
9293 self.0.encode(encoder, offset + 0, depth)?;
9295 self.1.encode(encoder, offset + 32, depth)?;
9296 Ok(())
9297 }
9298 }
9299
9300 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9301 for RealmOpenControllerRequest
9302 {
9303 #[inline(always)]
9304 fn new_empty() -> Self {
9305 Self {
9306 child: fidl::new_empty!(
9307 fdomain_fuchsia_component_decl::ChildRef,
9308 fdomain_client::fidl::FDomainResourceDialect
9309 ),
9310 controller: fidl::new_empty!(
9311 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ControllerMarker>>,
9312 fdomain_client::fidl::FDomainResourceDialect
9313 ),
9314 }
9315 }
9316
9317 #[inline]
9318 unsafe fn decode(
9319 &mut self,
9320 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9321 offset: usize,
9322 _depth: fidl::encoding::Depth,
9323 ) -> fidl::Result<()> {
9324 decoder.debug_check_bounds::<Self>(offset);
9325 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9327 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9328 let mask = 0xffffffff00000000u64;
9329 let maskedval = padval & mask;
9330 if maskedval != 0 {
9331 return Err(fidl::Error::NonZeroPadding {
9332 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9333 });
9334 }
9335 fidl::decode!(
9336 fdomain_fuchsia_component_decl::ChildRef,
9337 fdomain_client::fidl::FDomainResourceDialect,
9338 &mut self.child,
9339 decoder,
9340 offset + 0,
9341 _depth
9342 )?;
9343 fidl::decode!(
9344 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ControllerMarker>>,
9345 fdomain_client::fidl::FDomainResourceDialect,
9346 &mut self.controller,
9347 decoder,
9348 offset + 32,
9349 _depth
9350 )?;
9351 Ok(())
9352 }
9353 }
9354
9355 impl fidl::encoding::ResourceTypeMarker for RealmOpenExposedDirRequest {
9356 type Borrowed<'a> = &'a mut Self;
9357 fn take_or_borrow<'a>(
9358 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9359 ) -> Self::Borrowed<'a> {
9360 value
9361 }
9362 }
9363
9364 unsafe impl fidl::encoding::TypeMarker for RealmOpenExposedDirRequest {
9365 type Owned = Self;
9366
9367 #[inline(always)]
9368 fn inline_align(_context: fidl::encoding::Context) -> usize {
9369 8
9370 }
9371
9372 #[inline(always)]
9373 fn inline_size(_context: fidl::encoding::Context) -> usize {
9374 40
9375 }
9376 }
9377
9378 unsafe impl
9379 fidl::encoding::Encode<
9380 RealmOpenExposedDirRequest,
9381 fdomain_client::fidl::FDomainResourceDialect,
9382 > for &mut RealmOpenExposedDirRequest
9383 {
9384 #[inline]
9385 unsafe fn encode(
9386 self,
9387 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9388 offset: usize,
9389 _depth: fidl::encoding::Depth,
9390 ) -> fidl::Result<()> {
9391 encoder.debug_check_bounds::<RealmOpenExposedDirRequest>(offset);
9392 fidl::encoding::Encode::<RealmOpenExposedDirRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9394 (
9395 <fdomain_fuchsia_component_decl::ChildRef as fidl::encoding::ValueTypeMarker>::borrow(&self.child),
9396 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.exposed_dir),
9397 ),
9398 encoder, offset, _depth
9399 )
9400 }
9401 }
9402 unsafe impl<
9403 T0: fidl::encoding::Encode<
9404 fdomain_fuchsia_component_decl::ChildRef,
9405 fdomain_client::fidl::FDomainResourceDialect,
9406 >,
9407 T1: fidl::encoding::Encode<
9408 fidl::encoding::Endpoint<
9409 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
9410 >,
9411 fdomain_client::fidl::FDomainResourceDialect,
9412 >,
9413 >
9414 fidl::encoding::Encode<
9415 RealmOpenExposedDirRequest,
9416 fdomain_client::fidl::FDomainResourceDialect,
9417 > for (T0, T1)
9418 {
9419 #[inline]
9420 unsafe fn encode(
9421 self,
9422 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9423 offset: usize,
9424 depth: fidl::encoding::Depth,
9425 ) -> fidl::Result<()> {
9426 encoder.debug_check_bounds::<RealmOpenExposedDirRequest>(offset);
9427 unsafe {
9430 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
9431 (ptr as *mut u64).write_unaligned(0);
9432 }
9433 self.0.encode(encoder, offset + 0, depth)?;
9435 self.1.encode(encoder, offset + 32, depth)?;
9436 Ok(())
9437 }
9438 }
9439
9440 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9441 for RealmOpenExposedDirRequest
9442 {
9443 #[inline(always)]
9444 fn new_empty() -> Self {
9445 Self {
9446 child: fidl::new_empty!(
9447 fdomain_fuchsia_component_decl::ChildRef,
9448 fdomain_client::fidl::FDomainResourceDialect
9449 ),
9450 exposed_dir: fidl::new_empty!(
9451 fidl::encoding::Endpoint<
9452 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
9453 >,
9454 fdomain_client::fidl::FDomainResourceDialect
9455 ),
9456 }
9457 }
9458
9459 #[inline]
9460 unsafe fn decode(
9461 &mut self,
9462 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9463 offset: usize,
9464 _depth: fidl::encoding::Depth,
9465 ) -> fidl::Result<()> {
9466 decoder.debug_check_bounds::<Self>(offset);
9467 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9469 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9470 let mask = 0xffffffff00000000u64;
9471 let maskedval = padval & mask;
9472 if maskedval != 0 {
9473 return Err(fidl::Error::NonZeroPadding {
9474 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9475 });
9476 }
9477 fidl::decode!(
9478 fdomain_fuchsia_component_decl::ChildRef,
9479 fdomain_client::fidl::FDomainResourceDialect,
9480 &mut self.child,
9481 decoder,
9482 offset + 0,
9483 _depth
9484 )?;
9485 fidl::decode!(
9486 fidl::encoding::Endpoint<
9487 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::DirectoryMarker>,
9488 >,
9489 fdomain_client::fidl::FDomainResourceDialect,
9490 &mut self.exposed_dir,
9491 decoder,
9492 offset + 32,
9493 _depth
9494 )?;
9495 Ok(())
9496 }
9497 }
9498
9499 impl fidl::encoding::ResourceTypeMarker for RealmGetChildOutputDictionaryDeprecatedResponse {
9500 type Borrowed<'a> = &'a mut Self;
9501 fn take_or_borrow<'a>(
9502 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9503 ) -> Self::Borrowed<'a> {
9504 value
9505 }
9506 }
9507
9508 unsafe impl fidl::encoding::TypeMarker for RealmGetChildOutputDictionaryDeprecatedResponse {
9509 type Owned = Self;
9510
9511 #[inline(always)]
9512 fn inline_align(_context: fidl::encoding::Context) -> usize {
9513 4
9514 }
9515
9516 #[inline(always)]
9517 fn inline_size(_context: fidl::encoding::Context) -> usize {
9518 4
9519 }
9520 }
9521
9522 unsafe impl
9523 fidl::encoding::Encode<
9524 RealmGetChildOutputDictionaryDeprecatedResponse,
9525 fdomain_client::fidl::FDomainResourceDialect,
9526 > for &mut RealmGetChildOutputDictionaryDeprecatedResponse
9527 {
9528 #[inline]
9529 unsafe fn encode(
9530 self,
9531 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9532 offset: usize,
9533 _depth: fidl::encoding::Depth,
9534 ) -> fidl::Result<()> {
9535 encoder.debug_check_bounds::<RealmGetChildOutputDictionaryDeprecatedResponse>(offset);
9536 fidl::encoding::Encode::<RealmGetChildOutputDictionaryDeprecatedResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
9538 (
9539 <fdomain_fuchsia_component_sandbox::DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.dictionary),
9540 ),
9541 encoder, offset, _depth
9542 )
9543 }
9544 }
9545 unsafe impl<
9546 T0: fidl::encoding::Encode<
9547 fdomain_fuchsia_component_sandbox::DictionaryRef,
9548 fdomain_client::fidl::FDomainResourceDialect,
9549 >,
9550 >
9551 fidl::encoding::Encode<
9552 RealmGetChildOutputDictionaryDeprecatedResponse,
9553 fdomain_client::fidl::FDomainResourceDialect,
9554 > for (T0,)
9555 {
9556 #[inline]
9557 unsafe fn encode(
9558 self,
9559 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9560 offset: usize,
9561 depth: fidl::encoding::Depth,
9562 ) -> fidl::Result<()> {
9563 encoder.debug_check_bounds::<RealmGetChildOutputDictionaryDeprecatedResponse>(offset);
9564 self.0.encode(encoder, offset + 0, depth)?;
9568 Ok(())
9569 }
9570 }
9571
9572 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9573 for RealmGetChildOutputDictionaryDeprecatedResponse
9574 {
9575 #[inline(always)]
9576 fn new_empty() -> Self {
9577 Self {
9578 dictionary: fidl::new_empty!(
9579 fdomain_fuchsia_component_sandbox::DictionaryRef,
9580 fdomain_client::fidl::FDomainResourceDialect
9581 ),
9582 }
9583 }
9584
9585 #[inline]
9586 unsafe fn decode(
9587 &mut self,
9588 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9589 offset: usize,
9590 _depth: fidl::encoding::Depth,
9591 ) -> fidl::Result<()> {
9592 decoder.debug_check_bounds::<Self>(offset);
9593 fidl::decode!(
9595 fdomain_fuchsia_component_sandbox::DictionaryRef,
9596 fdomain_client::fidl::FDomainResourceDialect,
9597 &mut self.dictionary,
9598 decoder,
9599 offset + 0,
9600 _depth
9601 )?;
9602 Ok(())
9603 }
9604 }
9605
9606 impl fidl::encoding::ResourceTypeMarker for RealmGetChildOutputDictionaryResponse {
9607 type Borrowed<'a> = &'a mut Self;
9608 fn take_or_borrow<'a>(
9609 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9610 ) -> Self::Borrowed<'a> {
9611 value
9612 }
9613 }
9614
9615 unsafe impl fidl::encoding::TypeMarker for RealmGetChildOutputDictionaryResponse {
9616 type Owned = Self;
9617
9618 #[inline(always)]
9619 fn inline_align(_context: fidl::encoding::Context) -> usize {
9620 4
9621 }
9622
9623 #[inline(always)]
9624 fn inline_size(_context: fidl::encoding::Context) -> usize {
9625 4
9626 }
9627 }
9628
9629 unsafe impl
9630 fidl::encoding::Encode<
9631 RealmGetChildOutputDictionaryResponse,
9632 fdomain_client::fidl::FDomainResourceDialect,
9633 > for &mut RealmGetChildOutputDictionaryResponse
9634 {
9635 #[inline]
9636 unsafe fn encode(
9637 self,
9638 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9639 offset: usize,
9640 _depth: fidl::encoding::Depth,
9641 ) -> fidl::Result<()> {
9642 encoder.debug_check_bounds::<RealmGetChildOutputDictionaryResponse>(offset);
9643 fidl::encoding::Encode::<
9645 RealmGetChildOutputDictionaryResponse,
9646 fdomain_client::fidl::FDomainResourceDialect,
9647 >::encode(
9648 (<fidl::encoding::HandleType<
9649 fdomain_client::EventPair,
9650 { fidl::ObjectType::EVENTPAIR.into_raw() },
9651 2147483648,
9652 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9653 &mut self.dictionary
9654 ),),
9655 encoder,
9656 offset,
9657 _depth,
9658 )
9659 }
9660 }
9661 unsafe impl<
9662 T0: fidl::encoding::Encode<
9663 fidl::encoding::HandleType<
9664 fdomain_client::EventPair,
9665 { fidl::ObjectType::EVENTPAIR.into_raw() },
9666 2147483648,
9667 >,
9668 fdomain_client::fidl::FDomainResourceDialect,
9669 >,
9670 >
9671 fidl::encoding::Encode<
9672 RealmGetChildOutputDictionaryResponse,
9673 fdomain_client::fidl::FDomainResourceDialect,
9674 > for (T0,)
9675 {
9676 #[inline]
9677 unsafe fn encode(
9678 self,
9679 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9680 offset: usize,
9681 depth: fidl::encoding::Depth,
9682 ) -> fidl::Result<()> {
9683 encoder.debug_check_bounds::<RealmGetChildOutputDictionaryResponse>(offset);
9684 self.0.encode(encoder, offset + 0, depth)?;
9688 Ok(())
9689 }
9690 }
9691
9692 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9693 for RealmGetChildOutputDictionaryResponse
9694 {
9695 #[inline(always)]
9696 fn new_empty() -> Self {
9697 Self {
9698 dictionary: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
9699 }
9700 }
9701
9702 #[inline]
9703 unsafe fn decode(
9704 &mut self,
9705 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9706 offset: usize,
9707 _depth: fidl::encoding::Depth,
9708 ) -> fidl::Result<()> {
9709 decoder.debug_check_bounds::<Self>(offset);
9710 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dictionary, decoder, offset + 0, _depth)?;
9712 Ok(())
9713 }
9714 }
9715
9716 impl fidl::encoding::ResourceTypeMarker for RealmGetResolvedInfoResponse {
9717 type Borrowed<'a> = &'a mut Self;
9718 fn take_or_borrow<'a>(
9719 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9720 ) -> Self::Borrowed<'a> {
9721 value
9722 }
9723 }
9724
9725 unsafe impl fidl::encoding::TypeMarker for RealmGetResolvedInfoResponse {
9726 type Owned = Self;
9727
9728 #[inline(always)]
9729 fn inline_align(_context: fidl::encoding::Context) -> usize {
9730 8
9731 }
9732
9733 #[inline(always)]
9734 fn inline_size(_context: fidl::encoding::Context) -> usize {
9735 16
9736 }
9737 }
9738
9739 unsafe impl
9740 fidl::encoding::Encode<
9741 RealmGetResolvedInfoResponse,
9742 fdomain_client::fidl::FDomainResourceDialect,
9743 > for &mut RealmGetResolvedInfoResponse
9744 {
9745 #[inline]
9746 unsafe fn encode(
9747 self,
9748 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9749 offset: usize,
9750 _depth: fidl::encoding::Depth,
9751 ) -> fidl::Result<()> {
9752 encoder.debug_check_bounds::<RealmGetResolvedInfoResponse>(offset);
9753 fidl::encoding::Encode::<RealmGetResolvedInfoResponse, fdomain_client::fidl::FDomainResourceDialect>::encode(
9755 (
9756 <fdomain_fuchsia_component_resolution::Component as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.resolved_info),
9757 ),
9758 encoder, offset, _depth
9759 )
9760 }
9761 }
9762 unsafe impl<
9763 T0: fidl::encoding::Encode<
9764 fdomain_fuchsia_component_resolution::Component,
9765 fdomain_client::fidl::FDomainResourceDialect,
9766 >,
9767 >
9768 fidl::encoding::Encode<
9769 RealmGetResolvedInfoResponse,
9770 fdomain_client::fidl::FDomainResourceDialect,
9771 > for (T0,)
9772 {
9773 #[inline]
9774 unsafe fn encode(
9775 self,
9776 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9777 offset: usize,
9778 depth: fidl::encoding::Depth,
9779 ) -> fidl::Result<()> {
9780 encoder.debug_check_bounds::<RealmGetResolvedInfoResponse>(offset);
9781 self.0.encode(encoder, offset + 0, depth)?;
9785 Ok(())
9786 }
9787 }
9788
9789 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9790 for RealmGetResolvedInfoResponse
9791 {
9792 #[inline(always)]
9793 fn new_empty() -> Self {
9794 Self {
9795 resolved_info: fidl::new_empty!(
9796 fdomain_fuchsia_component_resolution::Component,
9797 fdomain_client::fidl::FDomainResourceDialect
9798 ),
9799 }
9800 }
9801
9802 #[inline]
9803 unsafe fn decode(
9804 &mut self,
9805 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9806 offset: usize,
9807 _depth: fidl::encoding::Depth,
9808 ) -> fidl::Result<()> {
9809 decoder.debug_check_bounds::<Self>(offset);
9810 fidl::decode!(
9812 fdomain_fuchsia_component_resolution::Component,
9813 fdomain_client::fidl::FDomainResourceDialect,
9814 &mut self.resolved_info,
9815 decoder,
9816 offset + 0,
9817 _depth
9818 )?;
9819 Ok(())
9820 }
9821 }
9822
9823 impl fidl::encoding::ResourceTypeMarker for StorageAdminListStorageInRealmRequest {
9824 type Borrowed<'a> = &'a mut Self;
9825 fn take_or_borrow<'a>(
9826 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9827 ) -> Self::Borrowed<'a> {
9828 value
9829 }
9830 }
9831
9832 unsafe impl fidl::encoding::TypeMarker for StorageAdminListStorageInRealmRequest {
9833 type Owned = Self;
9834
9835 #[inline(always)]
9836 fn inline_align(_context: fidl::encoding::Context) -> usize {
9837 8
9838 }
9839
9840 #[inline(always)]
9841 fn inline_size(_context: fidl::encoding::Context) -> usize {
9842 24
9843 }
9844 }
9845
9846 unsafe impl
9847 fidl::encoding::Encode<
9848 StorageAdminListStorageInRealmRequest,
9849 fdomain_client::fidl::FDomainResourceDialect,
9850 > for &mut StorageAdminListStorageInRealmRequest
9851 {
9852 #[inline]
9853 unsafe fn encode(
9854 self,
9855 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9856 offset: usize,
9857 _depth: fidl::encoding::Depth,
9858 ) -> fidl::Result<()> {
9859 encoder.debug_check_bounds::<StorageAdminListStorageInRealmRequest>(offset);
9860 fidl::encoding::Encode::<StorageAdminListStorageInRealmRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
9862 (
9863 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.relative_moniker),
9864 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<StorageIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
9865 ),
9866 encoder, offset, _depth
9867 )
9868 }
9869 }
9870 unsafe impl<
9871 T0: fidl::encoding::Encode<
9872 fidl::encoding::BoundedString<4096>,
9873 fdomain_client::fidl::FDomainResourceDialect,
9874 >,
9875 T1: fidl::encoding::Encode<
9876 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<StorageIteratorMarker>>,
9877 fdomain_client::fidl::FDomainResourceDialect,
9878 >,
9879 >
9880 fidl::encoding::Encode<
9881 StorageAdminListStorageInRealmRequest,
9882 fdomain_client::fidl::FDomainResourceDialect,
9883 > for (T0, T1)
9884 {
9885 #[inline]
9886 unsafe fn encode(
9887 self,
9888 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9889 offset: usize,
9890 depth: fidl::encoding::Depth,
9891 ) -> fidl::Result<()> {
9892 encoder.debug_check_bounds::<StorageAdminListStorageInRealmRequest>(offset);
9893 unsafe {
9896 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
9897 (ptr as *mut u64).write_unaligned(0);
9898 }
9899 self.0.encode(encoder, offset + 0, depth)?;
9901 self.1.encode(encoder, offset + 16, depth)?;
9902 Ok(())
9903 }
9904 }
9905
9906 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
9907 for StorageAdminListStorageInRealmRequest
9908 {
9909 #[inline(always)]
9910 fn new_empty() -> Self {
9911 Self {
9912 relative_moniker: fidl::new_empty!(
9913 fidl::encoding::BoundedString<4096>,
9914 fdomain_client::fidl::FDomainResourceDialect
9915 ),
9916 iterator: fidl::new_empty!(
9917 fidl::encoding::Endpoint<
9918 fdomain_client::fidl::ServerEnd<StorageIteratorMarker>,
9919 >,
9920 fdomain_client::fidl::FDomainResourceDialect
9921 ),
9922 }
9923 }
9924
9925 #[inline]
9926 unsafe fn decode(
9927 &mut self,
9928 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9929 offset: usize,
9930 _depth: fidl::encoding::Depth,
9931 ) -> fidl::Result<()> {
9932 decoder.debug_check_bounds::<Self>(offset);
9933 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
9935 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9936 let mask = 0xffffffff00000000u64;
9937 let maskedval = padval & mask;
9938 if maskedval != 0 {
9939 return Err(fidl::Error::NonZeroPadding {
9940 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
9941 });
9942 }
9943 fidl::decode!(
9944 fidl::encoding::BoundedString<4096>,
9945 fdomain_client::fidl::FDomainResourceDialect,
9946 &mut self.relative_moniker,
9947 decoder,
9948 offset + 0,
9949 _depth
9950 )?;
9951 fidl::decode!(
9952 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<StorageIteratorMarker>>,
9953 fdomain_client::fidl::FDomainResourceDialect,
9954 &mut self.iterator,
9955 decoder,
9956 offset + 16,
9957 _depth
9958 )?;
9959 Ok(())
9960 }
9961 }
9962
9963 impl fidl::encoding::ResourceTypeMarker for StorageAdminOpenComponentStorageByIdRequest {
9964 type Borrowed<'a> = &'a mut Self;
9965 fn take_or_borrow<'a>(
9966 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9967 ) -> Self::Borrowed<'a> {
9968 value
9969 }
9970 }
9971
9972 unsafe impl fidl::encoding::TypeMarker for StorageAdminOpenComponentStorageByIdRequest {
9973 type Owned = Self;
9974
9975 #[inline(always)]
9976 fn inline_align(_context: fidl::encoding::Context) -> usize {
9977 8
9978 }
9979
9980 #[inline(always)]
9981 fn inline_size(_context: fidl::encoding::Context) -> usize {
9982 24
9983 }
9984 }
9985
9986 unsafe impl
9987 fidl::encoding::Encode<
9988 StorageAdminOpenComponentStorageByIdRequest,
9989 fdomain_client::fidl::FDomainResourceDialect,
9990 > for &mut StorageAdminOpenComponentStorageByIdRequest
9991 {
9992 #[inline]
9993 unsafe fn encode(
9994 self,
9995 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
9996 offset: usize,
9997 _depth: fidl::encoding::Depth,
9998 ) -> fidl::Result<()> {
9999 encoder.debug_check_bounds::<StorageAdminOpenComponentStorageByIdRequest>(offset);
10000 fidl::encoding::Encode::<
10002 StorageAdminOpenComponentStorageByIdRequest,
10003 fdomain_client::fidl::FDomainResourceDialect,
10004 >::encode(
10005 (
10006 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
10007 &self.id,
10008 ),
10009 <fidl::encoding::Endpoint<
10010 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
10011 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10012 &mut self.object
10013 ),
10014 ),
10015 encoder,
10016 offset,
10017 _depth,
10018 )
10019 }
10020 }
10021 unsafe impl<
10022 T0: fidl::encoding::Encode<
10023 fidl::encoding::BoundedString<64>,
10024 fdomain_client::fidl::FDomainResourceDialect,
10025 >,
10026 T1: fidl::encoding::Encode<
10027 fidl::encoding::Endpoint<
10028 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
10029 >,
10030 fdomain_client::fidl::FDomainResourceDialect,
10031 >,
10032 >
10033 fidl::encoding::Encode<
10034 StorageAdminOpenComponentStorageByIdRequest,
10035 fdomain_client::fidl::FDomainResourceDialect,
10036 > for (T0, T1)
10037 {
10038 #[inline]
10039 unsafe fn encode(
10040 self,
10041 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10042 offset: usize,
10043 depth: fidl::encoding::Depth,
10044 ) -> fidl::Result<()> {
10045 encoder.debug_check_bounds::<StorageAdminOpenComponentStorageByIdRequest>(offset);
10046 unsafe {
10049 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
10050 (ptr as *mut u64).write_unaligned(0);
10051 }
10052 self.0.encode(encoder, offset + 0, depth)?;
10054 self.1.encode(encoder, offset + 16, depth)?;
10055 Ok(())
10056 }
10057 }
10058
10059 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10060 for StorageAdminOpenComponentStorageByIdRequest
10061 {
10062 #[inline(always)]
10063 fn new_empty() -> Self {
10064 Self {
10065 id: fidl::new_empty!(
10066 fidl::encoding::BoundedString<64>,
10067 fdomain_client::fidl::FDomainResourceDialect
10068 ),
10069 object: fidl::new_empty!(
10070 fidl::encoding::Endpoint<
10071 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
10072 >,
10073 fdomain_client::fidl::FDomainResourceDialect
10074 ),
10075 }
10076 }
10077
10078 #[inline]
10079 unsafe fn decode(
10080 &mut self,
10081 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10082 offset: usize,
10083 _depth: fidl::encoding::Depth,
10084 ) -> fidl::Result<()> {
10085 decoder.debug_check_bounds::<Self>(offset);
10086 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
10088 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10089 let mask = 0xffffffff00000000u64;
10090 let maskedval = padval & mask;
10091 if maskedval != 0 {
10092 return Err(fidl::Error::NonZeroPadding {
10093 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
10094 });
10095 }
10096 fidl::decode!(
10097 fidl::encoding::BoundedString<64>,
10098 fdomain_client::fidl::FDomainResourceDialect,
10099 &mut self.id,
10100 decoder,
10101 offset + 0,
10102 _depth
10103 )?;
10104 fidl::decode!(
10105 fidl::encoding::Endpoint<
10106 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
10107 >,
10108 fdomain_client::fidl::FDomainResourceDialect,
10109 &mut self.object,
10110 decoder,
10111 offset + 16,
10112 _depth
10113 )?;
10114 Ok(())
10115 }
10116 }
10117
10118 impl fidl::encoding::ResourceTypeMarker for StorageAdminOpenStorageRequest {
10119 type Borrowed<'a> = &'a mut Self;
10120 fn take_or_borrow<'a>(
10121 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10122 ) -> Self::Borrowed<'a> {
10123 value
10124 }
10125 }
10126
10127 unsafe impl fidl::encoding::TypeMarker for StorageAdminOpenStorageRequest {
10128 type Owned = Self;
10129
10130 #[inline(always)]
10131 fn inline_align(_context: fidl::encoding::Context) -> usize {
10132 8
10133 }
10134
10135 #[inline(always)]
10136 fn inline_size(_context: fidl::encoding::Context) -> usize {
10137 24
10138 }
10139 }
10140
10141 unsafe impl
10142 fidl::encoding::Encode<
10143 StorageAdminOpenStorageRequest,
10144 fdomain_client::fidl::FDomainResourceDialect,
10145 > for &mut StorageAdminOpenStorageRequest
10146 {
10147 #[inline]
10148 unsafe fn encode(
10149 self,
10150 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10151 offset: usize,
10152 _depth: fidl::encoding::Depth,
10153 ) -> fidl::Result<()> {
10154 encoder.debug_check_bounds::<StorageAdminOpenStorageRequest>(offset);
10155 fidl::encoding::Encode::<StorageAdminOpenStorageRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
10157 (
10158 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.relative_moniker),
10159 <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
10160 ),
10161 encoder, offset, _depth
10162 )
10163 }
10164 }
10165 unsafe impl<
10166 T0: fidl::encoding::Encode<
10167 fidl::encoding::BoundedString<4096>,
10168 fdomain_client::fidl::FDomainResourceDialect,
10169 >,
10170 T1: fidl::encoding::Encode<
10171 fidl::encoding::Endpoint<
10172 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
10173 >,
10174 fdomain_client::fidl::FDomainResourceDialect,
10175 >,
10176 >
10177 fidl::encoding::Encode<
10178 StorageAdminOpenStorageRequest,
10179 fdomain_client::fidl::FDomainResourceDialect,
10180 > for (T0, T1)
10181 {
10182 #[inline]
10183 unsafe fn encode(
10184 self,
10185 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10186 offset: usize,
10187 depth: fidl::encoding::Depth,
10188 ) -> fidl::Result<()> {
10189 encoder.debug_check_bounds::<StorageAdminOpenStorageRequest>(offset);
10190 unsafe {
10193 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
10194 (ptr as *mut u64).write_unaligned(0);
10195 }
10196 self.0.encode(encoder, offset + 0, depth)?;
10198 self.1.encode(encoder, offset + 16, depth)?;
10199 Ok(())
10200 }
10201 }
10202
10203 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10204 for StorageAdminOpenStorageRequest
10205 {
10206 #[inline(always)]
10207 fn new_empty() -> Self {
10208 Self {
10209 relative_moniker: fidl::new_empty!(
10210 fidl::encoding::BoundedString<4096>,
10211 fdomain_client::fidl::FDomainResourceDialect
10212 ),
10213 object: fidl::new_empty!(
10214 fidl::encoding::Endpoint<
10215 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
10216 >,
10217 fdomain_client::fidl::FDomainResourceDialect
10218 ),
10219 }
10220 }
10221
10222 #[inline]
10223 unsafe fn decode(
10224 &mut self,
10225 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10226 offset: usize,
10227 _depth: fidl::encoding::Depth,
10228 ) -> fidl::Result<()> {
10229 decoder.debug_check_bounds::<Self>(offset);
10230 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
10232 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10233 let mask = 0xffffffff00000000u64;
10234 let maskedval = padval & mask;
10235 if maskedval != 0 {
10236 return Err(fidl::Error::NonZeroPadding {
10237 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
10238 });
10239 }
10240 fidl::decode!(
10241 fidl::encoding::BoundedString<4096>,
10242 fdomain_client::fidl::FDomainResourceDialect,
10243 &mut self.relative_moniker,
10244 decoder,
10245 offset + 0,
10246 _depth
10247 )?;
10248 fidl::decode!(
10249 fidl::encoding::Endpoint<
10250 fdomain_client::fidl::ServerEnd<fdomain_fuchsia_io::NodeMarker>,
10251 >,
10252 fdomain_client::fidl::FDomainResourceDialect,
10253 &mut self.object,
10254 decoder,
10255 offset + 16,
10256 _depth
10257 )?;
10258 Ok(())
10259 }
10260 }
10261
10262 impl CapabilityRequestedPayload {
10263 #[inline(always)]
10264 fn max_ordinal_present(&self) -> u64 {
10265 if let Some(_) = self.capability {
10266 return 2;
10267 }
10268 if let Some(_) = self.name {
10269 return 1;
10270 }
10271 0
10272 }
10273 }
10274
10275 impl fidl::encoding::ResourceTypeMarker for CapabilityRequestedPayload {
10276 type Borrowed<'a> = &'a mut Self;
10277 fn take_or_borrow<'a>(
10278 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10279 ) -> Self::Borrowed<'a> {
10280 value
10281 }
10282 }
10283
10284 unsafe impl fidl::encoding::TypeMarker for CapabilityRequestedPayload {
10285 type Owned = Self;
10286
10287 #[inline(always)]
10288 fn inline_align(_context: fidl::encoding::Context) -> usize {
10289 8
10290 }
10291
10292 #[inline(always)]
10293 fn inline_size(_context: fidl::encoding::Context) -> usize {
10294 16
10295 }
10296 }
10297
10298 unsafe impl
10299 fidl::encoding::Encode<
10300 CapabilityRequestedPayload,
10301 fdomain_client::fidl::FDomainResourceDialect,
10302 > for &mut CapabilityRequestedPayload
10303 {
10304 unsafe fn encode(
10305 self,
10306 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10307 offset: usize,
10308 mut depth: fidl::encoding::Depth,
10309 ) -> fidl::Result<()> {
10310 encoder.debug_check_bounds::<CapabilityRequestedPayload>(offset);
10311 let max_ordinal: u64 = self.max_ordinal_present();
10313 encoder.write_num(max_ordinal, offset);
10314 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10315 if max_ordinal == 0 {
10317 return Ok(());
10318 }
10319 depth.increment()?;
10320 let envelope_size = 8;
10321 let bytes_len = max_ordinal as usize * envelope_size;
10322 #[allow(unused_variables)]
10323 let offset = encoder.out_of_line_offset(bytes_len);
10324 let mut _prev_end_offset: usize = 0;
10325 if 1 > max_ordinal {
10326 return Ok(());
10327 }
10328
10329 let cur_offset: usize = (1 - 1) * envelope_size;
10332
10333 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10335
10336 fidl::encoding::encode_in_envelope_optional::<
10341 fidl::encoding::BoundedString<255>,
10342 fdomain_client::fidl::FDomainResourceDialect,
10343 >(
10344 self.name.as_ref().map(
10345 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow,
10346 ),
10347 encoder,
10348 offset + cur_offset,
10349 depth,
10350 )?;
10351
10352 _prev_end_offset = cur_offset + envelope_size;
10353 if 2 > max_ordinal {
10354 return Ok(());
10355 }
10356
10357 let cur_offset: usize = (2 - 1) * envelope_size;
10360
10361 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10363
10364 fidl::encoding::encode_in_envelope_optional::<
10369 fidl::encoding::HandleType<
10370 fdomain_client::Channel,
10371 { fidl::ObjectType::CHANNEL.into_raw() },
10372 2147483648,
10373 >,
10374 fdomain_client::fidl::FDomainResourceDialect,
10375 >(
10376 self.capability.as_mut().map(
10377 <fidl::encoding::HandleType<
10378 fdomain_client::Channel,
10379 { fidl::ObjectType::CHANNEL.into_raw() },
10380 2147483648,
10381 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
10382 ),
10383 encoder,
10384 offset + cur_offset,
10385 depth,
10386 )?;
10387
10388 _prev_end_offset = cur_offset + envelope_size;
10389
10390 Ok(())
10391 }
10392 }
10393
10394 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10395 for CapabilityRequestedPayload
10396 {
10397 #[inline(always)]
10398 fn new_empty() -> Self {
10399 Self::default()
10400 }
10401
10402 unsafe fn decode(
10403 &mut self,
10404 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10405 offset: usize,
10406 mut depth: fidl::encoding::Depth,
10407 ) -> fidl::Result<()> {
10408 decoder.debug_check_bounds::<Self>(offset);
10409 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10410 None => return Err(fidl::Error::NotNullable),
10411 Some(len) => len,
10412 };
10413 if len == 0 {
10415 return Ok(());
10416 };
10417 depth.increment()?;
10418 let envelope_size = 8;
10419 let bytes_len = len * envelope_size;
10420 let offset = decoder.out_of_line_offset(bytes_len)?;
10421 let mut _next_ordinal_to_read = 0;
10423 let mut next_offset = offset;
10424 let end_offset = offset + bytes_len;
10425 _next_ordinal_to_read += 1;
10426 if next_offset >= end_offset {
10427 return Ok(());
10428 }
10429
10430 while _next_ordinal_to_read < 1 {
10432 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10433 _next_ordinal_to_read += 1;
10434 next_offset += envelope_size;
10435 }
10436
10437 let next_out_of_line = decoder.next_out_of_line();
10438 let handles_before = decoder.remaining_handles();
10439 if let Some((inlined, num_bytes, num_handles)) =
10440 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10441 {
10442 let member_inline_size =
10443 <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(
10444 decoder.context,
10445 );
10446 if inlined != (member_inline_size <= 4) {
10447 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10448 }
10449 let inner_offset;
10450 let mut inner_depth = depth.clone();
10451 if inlined {
10452 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10453 inner_offset = next_offset;
10454 } else {
10455 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10456 inner_depth.increment()?;
10457 }
10458 let val_ref = self.name.get_or_insert_with(|| {
10459 fidl::new_empty!(
10460 fidl::encoding::BoundedString<255>,
10461 fdomain_client::fidl::FDomainResourceDialect
10462 )
10463 });
10464 fidl::decode!(
10465 fidl::encoding::BoundedString<255>,
10466 fdomain_client::fidl::FDomainResourceDialect,
10467 val_ref,
10468 decoder,
10469 inner_offset,
10470 inner_depth
10471 )?;
10472 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10473 {
10474 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10475 }
10476 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10477 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10478 }
10479 }
10480
10481 next_offset += envelope_size;
10482 _next_ordinal_to_read += 1;
10483 if next_offset >= end_offset {
10484 return Ok(());
10485 }
10486
10487 while _next_ordinal_to_read < 2 {
10489 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10490 _next_ordinal_to_read += 1;
10491 next_offset += envelope_size;
10492 }
10493
10494 let next_out_of_line = decoder.next_out_of_line();
10495 let handles_before = decoder.remaining_handles();
10496 if let Some((inlined, num_bytes, num_handles)) =
10497 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10498 {
10499 let member_inline_size = <fidl::encoding::HandleType<
10500 fdomain_client::Channel,
10501 { fidl::ObjectType::CHANNEL.into_raw() },
10502 2147483648,
10503 > as fidl::encoding::TypeMarker>::inline_size(
10504 decoder.context
10505 );
10506 if inlined != (member_inline_size <= 4) {
10507 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10508 }
10509 let inner_offset;
10510 let mut inner_depth = depth.clone();
10511 if inlined {
10512 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10513 inner_offset = next_offset;
10514 } else {
10515 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10516 inner_depth.increment()?;
10517 }
10518 let val_ref =
10519 self.capability.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect));
10520 fidl::decode!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
10521 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10522 {
10523 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10524 }
10525 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10526 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10527 }
10528 }
10529
10530 next_offset += envelope_size;
10531
10532 while next_offset < end_offset {
10534 _next_ordinal_to_read += 1;
10535 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10536 next_offset += envelope_size;
10537 }
10538
10539 Ok(())
10540 }
10541 }
10542
10543 impl CreateChildArgs {
10544 #[inline(always)]
10545 fn max_ordinal_present(&self) -> u64 {
10546 if let Some(_) = self.additional_inputs {
10547 return 5;
10548 }
10549 if let Some(_) = self.dictionary {
10550 return 4;
10551 }
10552 if let Some(_) = self.controller {
10553 return 3;
10554 }
10555 if let Some(_) = self.dynamic_offers {
10556 return 2;
10557 }
10558 if let Some(_) = self.numbered_handles {
10559 return 1;
10560 }
10561 0
10562 }
10563 }
10564
10565 impl fidl::encoding::ResourceTypeMarker for CreateChildArgs {
10566 type Borrowed<'a> = &'a mut Self;
10567 fn take_or_borrow<'a>(
10568 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10569 ) -> Self::Borrowed<'a> {
10570 value
10571 }
10572 }
10573
10574 unsafe impl fidl::encoding::TypeMarker for CreateChildArgs {
10575 type Owned = Self;
10576
10577 #[inline(always)]
10578 fn inline_align(_context: fidl::encoding::Context) -> usize {
10579 8
10580 }
10581
10582 #[inline(always)]
10583 fn inline_size(_context: fidl::encoding::Context) -> usize {
10584 16
10585 }
10586 }
10587
10588 unsafe impl
10589 fidl::encoding::Encode<CreateChildArgs, fdomain_client::fidl::FDomainResourceDialect>
10590 for &mut CreateChildArgs
10591 {
10592 unsafe fn encode(
10593 self,
10594 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10595 offset: usize,
10596 mut depth: fidl::encoding::Depth,
10597 ) -> fidl::Result<()> {
10598 encoder.debug_check_bounds::<CreateChildArgs>(offset);
10599 let max_ordinal: u64 = self.max_ordinal_present();
10601 encoder.write_num(max_ordinal, offset);
10602 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10603 if max_ordinal == 0 {
10605 return Ok(());
10606 }
10607 depth.increment()?;
10608 let envelope_size = 8;
10609 let bytes_len = max_ordinal as usize * envelope_size;
10610 #[allow(unused_variables)]
10611 let offset = encoder.out_of_line_offset(bytes_len);
10612 let mut _prev_end_offset: usize = 0;
10613 if 1 > max_ordinal {
10614 return Ok(());
10615 }
10616
10617 let cur_offset: usize = (1 - 1) * envelope_size;
10620
10621 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10623
10624 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fdomain_fuchsia_process::HandleInfo, 128>, fdomain_client::fidl::FDomainResourceDialect>(
10629 self.numbered_handles.as_mut().map(<fidl::encoding::Vector<fdomain_fuchsia_process::HandleInfo, 128> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
10630 encoder, offset + cur_offset, depth
10631 )?;
10632
10633 _prev_end_offset = cur_offset + envelope_size;
10634 if 2 > max_ordinal {
10635 return Ok(());
10636 }
10637
10638 let cur_offset: usize = (2 - 1) * envelope_size;
10641
10642 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10644
10645 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fdomain_fuchsia_component_decl::Offer, 128>, fdomain_client::fidl::FDomainResourceDialect>(
10650 self.dynamic_offers.as_ref().map(<fidl::encoding::Vector<fdomain_fuchsia_component_decl::Offer, 128> as fidl::encoding::ValueTypeMarker>::borrow),
10651 encoder, offset + cur_offset, depth
10652 )?;
10653
10654 _prev_end_offset = cur_offset + envelope_size;
10655 if 3 > max_ordinal {
10656 return Ok(());
10657 }
10658
10659 let cur_offset: usize = (3 - 1) * envelope_size;
10662
10663 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10665
10666 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ControllerMarker>>, fdomain_client::fidl::FDomainResourceDialect>(
10671 self.controller.as_mut().map(<fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
10672 encoder, offset + cur_offset, depth
10673 )?;
10674
10675 _prev_end_offset = cur_offset + envelope_size;
10676 if 4 > max_ordinal {
10677 return Ok(());
10678 }
10679
10680 let cur_offset: usize = (4 - 1) * envelope_size;
10683
10684 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10686
10687 fidl::encoding::encode_in_envelope_optional::<fdomain_fuchsia_component_sandbox::DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>(
10692 self.dictionary.as_mut().map(<fdomain_fuchsia_component_sandbox::DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
10693 encoder, offset + cur_offset, depth
10694 )?;
10695
10696 _prev_end_offset = cur_offset + envelope_size;
10697 if 5 > max_ordinal {
10698 return Ok(());
10699 }
10700
10701 let cur_offset: usize = (5 - 1) * envelope_size;
10704
10705 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10707
10708 fidl::encoding::encode_in_envelope_optional::<
10713 fidl::encoding::HandleType<
10714 fdomain_client::EventPair,
10715 { fidl::ObjectType::EVENTPAIR.into_raw() },
10716 2147483648,
10717 >,
10718 fdomain_client::fidl::FDomainResourceDialect,
10719 >(
10720 self.additional_inputs.as_mut().map(
10721 <fidl::encoding::HandleType<
10722 fdomain_client::EventPair,
10723 { fidl::ObjectType::EVENTPAIR.into_raw() },
10724 2147483648,
10725 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
10726 ),
10727 encoder,
10728 offset + cur_offset,
10729 depth,
10730 )?;
10731
10732 _prev_end_offset = cur_offset + envelope_size;
10733
10734 Ok(())
10735 }
10736 }
10737
10738 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
10739 for CreateChildArgs
10740 {
10741 #[inline(always)]
10742 fn new_empty() -> Self {
10743 Self::default()
10744 }
10745
10746 unsafe fn decode(
10747 &mut self,
10748 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
10749 offset: usize,
10750 mut depth: fidl::encoding::Depth,
10751 ) -> fidl::Result<()> {
10752 decoder.debug_check_bounds::<Self>(offset);
10753 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10754 None => return Err(fidl::Error::NotNullable),
10755 Some(len) => len,
10756 };
10757 if len == 0 {
10759 return Ok(());
10760 };
10761 depth.increment()?;
10762 let envelope_size = 8;
10763 let bytes_len = len * envelope_size;
10764 let offset = decoder.out_of_line_offset(bytes_len)?;
10765 let mut _next_ordinal_to_read = 0;
10767 let mut next_offset = offset;
10768 let end_offset = offset + bytes_len;
10769 _next_ordinal_to_read += 1;
10770 if next_offset >= end_offset {
10771 return Ok(());
10772 }
10773
10774 while _next_ordinal_to_read < 1 {
10776 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10777 _next_ordinal_to_read += 1;
10778 next_offset += envelope_size;
10779 }
10780
10781 let next_out_of_line = decoder.next_out_of_line();
10782 let handles_before = decoder.remaining_handles();
10783 if let Some((inlined, num_bytes, num_handles)) =
10784 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10785 {
10786 let member_inline_size = <fidl::encoding::Vector<
10787 fdomain_fuchsia_process::HandleInfo,
10788 128,
10789 > as fidl::encoding::TypeMarker>::inline_size(
10790 decoder.context
10791 );
10792 if inlined != (member_inline_size <= 4) {
10793 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10794 }
10795 let inner_offset;
10796 let mut inner_depth = depth.clone();
10797 if inlined {
10798 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10799 inner_offset = next_offset;
10800 } else {
10801 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10802 inner_depth.increment()?;
10803 }
10804 let val_ref =
10805 self.numbered_handles.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fdomain_fuchsia_process::HandleInfo, 128>, fdomain_client::fidl::FDomainResourceDialect));
10806 fidl::decode!(fidl::encoding::Vector<fdomain_fuchsia_process::HandleInfo, 128>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
10807 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10808 {
10809 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10810 }
10811 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10812 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10813 }
10814 }
10815
10816 next_offset += envelope_size;
10817 _next_ordinal_to_read += 1;
10818 if next_offset >= end_offset {
10819 return Ok(());
10820 }
10821
10822 while _next_ordinal_to_read < 2 {
10824 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10825 _next_ordinal_to_read += 1;
10826 next_offset += envelope_size;
10827 }
10828
10829 let next_out_of_line = decoder.next_out_of_line();
10830 let handles_before = decoder.remaining_handles();
10831 if let Some((inlined, num_bytes, num_handles)) =
10832 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10833 {
10834 let member_inline_size = <fidl::encoding::Vector<
10835 fdomain_fuchsia_component_decl::Offer,
10836 128,
10837 > as fidl::encoding::TypeMarker>::inline_size(
10838 decoder.context
10839 );
10840 if inlined != (member_inline_size <= 4) {
10841 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10842 }
10843 let inner_offset;
10844 let mut inner_depth = depth.clone();
10845 if inlined {
10846 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10847 inner_offset = next_offset;
10848 } else {
10849 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10850 inner_depth.increment()?;
10851 }
10852 let val_ref =
10853 self.dynamic_offers.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fdomain_fuchsia_component_decl::Offer, 128>, fdomain_client::fidl::FDomainResourceDialect));
10854 fidl::decode!(fidl::encoding::Vector<fdomain_fuchsia_component_decl::Offer, 128>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
10855 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10856 {
10857 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10858 }
10859 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10860 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10861 }
10862 }
10863
10864 next_offset += envelope_size;
10865 _next_ordinal_to_read += 1;
10866 if next_offset >= end_offset {
10867 return Ok(());
10868 }
10869
10870 while _next_ordinal_to_read < 3 {
10872 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10873 _next_ordinal_to_read += 1;
10874 next_offset += envelope_size;
10875 }
10876
10877 let next_out_of_line = decoder.next_out_of_line();
10878 let handles_before = decoder.remaining_handles();
10879 if let Some((inlined, num_bytes, num_handles)) =
10880 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10881 {
10882 let member_inline_size = <fidl::encoding::Endpoint<
10883 fdomain_client::fidl::ServerEnd<ControllerMarker>,
10884 > as fidl::encoding::TypeMarker>::inline_size(
10885 decoder.context
10886 );
10887 if inlined != (member_inline_size <= 4) {
10888 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10889 }
10890 let inner_offset;
10891 let mut inner_depth = depth.clone();
10892 if inlined {
10893 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10894 inner_offset = next_offset;
10895 } else {
10896 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10897 inner_depth.increment()?;
10898 }
10899 let val_ref = self.controller.get_or_insert_with(|| {
10900 fidl::new_empty!(
10901 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ControllerMarker>>,
10902 fdomain_client::fidl::FDomainResourceDialect
10903 )
10904 });
10905 fidl::decode!(
10906 fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<ControllerMarker>>,
10907 fdomain_client::fidl::FDomainResourceDialect,
10908 val_ref,
10909 decoder,
10910 inner_offset,
10911 inner_depth
10912 )?;
10913 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10914 {
10915 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10916 }
10917 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10918 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10919 }
10920 }
10921
10922 next_offset += envelope_size;
10923 _next_ordinal_to_read += 1;
10924 if next_offset >= end_offset {
10925 return Ok(());
10926 }
10927
10928 while _next_ordinal_to_read < 4 {
10930 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10931 _next_ordinal_to_read += 1;
10932 next_offset += envelope_size;
10933 }
10934
10935 let next_out_of_line = decoder.next_out_of_line();
10936 let handles_before = decoder.remaining_handles();
10937 if let Some((inlined, num_bytes, num_handles)) =
10938 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10939 {
10940 let member_inline_size = <fdomain_fuchsia_component_sandbox::DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10941 if inlined != (member_inline_size <= 4) {
10942 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10943 }
10944 let inner_offset;
10945 let mut inner_depth = depth.clone();
10946 if inlined {
10947 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10948 inner_offset = next_offset;
10949 } else {
10950 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10951 inner_depth.increment()?;
10952 }
10953 let val_ref = self.dictionary.get_or_insert_with(|| {
10954 fidl::new_empty!(
10955 fdomain_fuchsia_component_sandbox::DictionaryRef,
10956 fdomain_client::fidl::FDomainResourceDialect
10957 )
10958 });
10959 fidl::decode!(
10960 fdomain_fuchsia_component_sandbox::DictionaryRef,
10961 fdomain_client::fidl::FDomainResourceDialect,
10962 val_ref,
10963 decoder,
10964 inner_offset,
10965 inner_depth
10966 )?;
10967 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10968 {
10969 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10970 }
10971 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10972 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10973 }
10974 }
10975
10976 next_offset += envelope_size;
10977 _next_ordinal_to_read += 1;
10978 if next_offset >= end_offset {
10979 return Ok(());
10980 }
10981
10982 while _next_ordinal_to_read < 5 {
10984 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10985 _next_ordinal_to_read += 1;
10986 next_offset += envelope_size;
10987 }
10988
10989 let next_out_of_line = decoder.next_out_of_line();
10990 let handles_before = decoder.remaining_handles();
10991 if let Some((inlined, num_bytes, num_handles)) =
10992 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10993 {
10994 let member_inline_size = <fidl::encoding::HandleType<
10995 fdomain_client::EventPair,
10996 { fidl::ObjectType::EVENTPAIR.into_raw() },
10997 2147483648,
10998 > as fidl::encoding::TypeMarker>::inline_size(
10999 decoder.context
11000 );
11001 if inlined != (member_inline_size <= 4) {
11002 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11003 }
11004 let inner_offset;
11005 let mut inner_depth = depth.clone();
11006 if inlined {
11007 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11008 inner_offset = next_offset;
11009 } else {
11010 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11011 inner_depth.increment()?;
11012 }
11013 let val_ref =
11014 self.additional_inputs.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect));
11015 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
11016 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11017 {
11018 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11019 }
11020 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11021 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11022 }
11023 }
11024
11025 next_offset += envelope_size;
11026
11027 while next_offset < end_offset {
11029 _next_ordinal_to_read += 1;
11030 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11031 next_offset += envelope_size;
11032 }
11033
11034 Ok(())
11035 }
11036 }
11037
11038 impl DebugStartedPayload {
11039 #[inline(always)]
11040 fn max_ordinal_present(&self) -> u64 {
11041 if let Some(_) = self.break_on_start {
11042 return 2;
11043 }
11044 if let Some(_) = self.runtime_dir {
11045 return 1;
11046 }
11047 0
11048 }
11049 }
11050
11051 impl fidl::encoding::ResourceTypeMarker for DebugStartedPayload {
11052 type Borrowed<'a> = &'a mut Self;
11053 fn take_or_borrow<'a>(
11054 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11055 ) -> Self::Borrowed<'a> {
11056 value
11057 }
11058 }
11059
11060 unsafe impl fidl::encoding::TypeMarker for DebugStartedPayload {
11061 type Owned = Self;
11062
11063 #[inline(always)]
11064 fn inline_align(_context: fidl::encoding::Context) -> usize {
11065 8
11066 }
11067
11068 #[inline(always)]
11069 fn inline_size(_context: fidl::encoding::Context) -> usize {
11070 16
11071 }
11072 }
11073
11074 unsafe impl
11075 fidl::encoding::Encode<DebugStartedPayload, fdomain_client::fidl::FDomainResourceDialect>
11076 for &mut DebugStartedPayload
11077 {
11078 unsafe fn encode(
11079 self,
11080 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11081 offset: usize,
11082 mut depth: fidl::encoding::Depth,
11083 ) -> fidl::Result<()> {
11084 encoder.debug_check_bounds::<DebugStartedPayload>(offset);
11085 let max_ordinal: u64 = self.max_ordinal_present();
11087 encoder.write_num(max_ordinal, offset);
11088 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11089 if max_ordinal == 0 {
11091 return Ok(());
11092 }
11093 depth.increment()?;
11094 let envelope_size = 8;
11095 let bytes_len = max_ordinal as usize * envelope_size;
11096 #[allow(unused_variables)]
11097 let offset = encoder.out_of_line_offset(bytes_len);
11098 let mut _prev_end_offset: usize = 0;
11099 if 1 > max_ordinal {
11100 return Ok(());
11101 }
11102
11103 let cur_offset: usize = (1 - 1) * envelope_size;
11106
11107 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11109
11110 fidl::encoding::encode_in_envelope_optional::<
11115 fidl::encoding::Endpoint<
11116 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
11117 >,
11118 fdomain_client::fidl::FDomainResourceDialect,
11119 >(
11120 self.runtime_dir.as_mut().map(
11121 <fidl::encoding::Endpoint<
11122 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
11123 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11124 ),
11125 encoder,
11126 offset + cur_offset,
11127 depth,
11128 )?;
11129
11130 _prev_end_offset = cur_offset + envelope_size;
11131 if 2 > max_ordinal {
11132 return Ok(());
11133 }
11134
11135 let cur_offset: usize = (2 - 1) * envelope_size;
11138
11139 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11141
11142 fidl::encoding::encode_in_envelope_optional::<
11147 fidl::encoding::HandleType<
11148 fdomain_client::EventPair,
11149 { fidl::ObjectType::EVENTPAIR.into_raw() },
11150 2147483648,
11151 >,
11152 fdomain_client::fidl::FDomainResourceDialect,
11153 >(
11154 self.break_on_start.as_mut().map(
11155 <fidl::encoding::HandleType<
11156 fdomain_client::EventPair,
11157 { fidl::ObjectType::EVENTPAIR.into_raw() },
11158 2147483648,
11159 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11160 ),
11161 encoder,
11162 offset + cur_offset,
11163 depth,
11164 )?;
11165
11166 _prev_end_offset = cur_offset + envelope_size;
11167
11168 Ok(())
11169 }
11170 }
11171
11172 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
11173 for DebugStartedPayload
11174 {
11175 #[inline(always)]
11176 fn new_empty() -> Self {
11177 Self::default()
11178 }
11179
11180 unsafe fn decode(
11181 &mut self,
11182 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11183 offset: usize,
11184 mut depth: fidl::encoding::Depth,
11185 ) -> fidl::Result<()> {
11186 decoder.debug_check_bounds::<Self>(offset);
11187 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11188 None => return Err(fidl::Error::NotNullable),
11189 Some(len) => len,
11190 };
11191 if len == 0 {
11193 return Ok(());
11194 };
11195 depth.increment()?;
11196 let envelope_size = 8;
11197 let bytes_len = len * envelope_size;
11198 let offset = decoder.out_of_line_offset(bytes_len)?;
11199 let mut _next_ordinal_to_read = 0;
11201 let mut next_offset = offset;
11202 let end_offset = offset + bytes_len;
11203 _next_ordinal_to_read += 1;
11204 if next_offset >= end_offset {
11205 return Ok(());
11206 }
11207
11208 while _next_ordinal_to_read < 1 {
11210 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11211 _next_ordinal_to_read += 1;
11212 next_offset += envelope_size;
11213 }
11214
11215 let next_out_of_line = decoder.next_out_of_line();
11216 let handles_before = decoder.remaining_handles();
11217 if let Some((inlined, num_bytes, num_handles)) =
11218 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11219 {
11220 let member_inline_size = <fidl::encoding::Endpoint<
11221 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
11222 > as fidl::encoding::TypeMarker>::inline_size(
11223 decoder.context
11224 );
11225 if inlined != (member_inline_size <= 4) {
11226 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11227 }
11228 let inner_offset;
11229 let mut inner_depth = depth.clone();
11230 if inlined {
11231 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11232 inner_offset = next_offset;
11233 } else {
11234 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11235 inner_depth.increment()?;
11236 }
11237 let val_ref = self.runtime_dir.get_or_insert_with(|| {
11238 fidl::new_empty!(
11239 fidl::encoding::Endpoint<
11240 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
11241 >,
11242 fdomain_client::fidl::FDomainResourceDialect
11243 )
11244 });
11245 fidl::decode!(
11246 fidl::encoding::Endpoint<
11247 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
11248 >,
11249 fdomain_client::fidl::FDomainResourceDialect,
11250 val_ref,
11251 decoder,
11252 inner_offset,
11253 inner_depth
11254 )?;
11255 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11256 {
11257 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11258 }
11259 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11260 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11261 }
11262 }
11263
11264 next_offset += envelope_size;
11265 _next_ordinal_to_read += 1;
11266 if next_offset >= end_offset {
11267 return Ok(());
11268 }
11269
11270 while _next_ordinal_to_read < 2 {
11272 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11273 _next_ordinal_to_read += 1;
11274 next_offset += envelope_size;
11275 }
11276
11277 let next_out_of_line = decoder.next_out_of_line();
11278 let handles_before = decoder.remaining_handles();
11279 if let Some((inlined, num_bytes, num_handles)) =
11280 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11281 {
11282 let member_inline_size = <fidl::encoding::HandleType<
11283 fdomain_client::EventPair,
11284 { fidl::ObjectType::EVENTPAIR.into_raw() },
11285 2147483648,
11286 > as fidl::encoding::TypeMarker>::inline_size(
11287 decoder.context
11288 );
11289 if inlined != (member_inline_size <= 4) {
11290 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11291 }
11292 let inner_offset;
11293 let mut inner_depth = depth.clone();
11294 if inlined {
11295 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11296 inner_offset = next_offset;
11297 } else {
11298 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11299 inner_depth.increment()?;
11300 }
11301 let val_ref =
11302 self.break_on_start.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect));
11303 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
11304 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11305 {
11306 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11307 }
11308 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11309 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11310 }
11311 }
11312
11313 next_offset += envelope_size;
11314
11315 while next_offset < end_offset {
11317 _next_ordinal_to_read += 1;
11318 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11319 next_offset += envelope_size;
11320 }
11321
11322 Ok(())
11323 }
11324 }
11325
11326 impl Event {
11327 #[inline(always)]
11328 fn max_ordinal_present(&self) -> u64 {
11329 if let Some(_) = self.payload {
11330 return 2;
11331 }
11332 if let Some(_) = self.header {
11333 return 1;
11334 }
11335 0
11336 }
11337 }
11338
11339 impl fidl::encoding::ResourceTypeMarker for Event {
11340 type Borrowed<'a> = &'a mut Self;
11341 fn take_or_borrow<'a>(
11342 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11343 ) -> Self::Borrowed<'a> {
11344 value
11345 }
11346 }
11347
11348 unsafe impl fidl::encoding::TypeMarker for Event {
11349 type Owned = Self;
11350
11351 #[inline(always)]
11352 fn inline_align(_context: fidl::encoding::Context) -> usize {
11353 8
11354 }
11355
11356 #[inline(always)]
11357 fn inline_size(_context: fidl::encoding::Context) -> usize {
11358 16
11359 }
11360 }
11361
11362 unsafe impl fidl::encoding::Encode<Event, fdomain_client::fidl::FDomainResourceDialect>
11363 for &mut Event
11364 {
11365 unsafe fn encode(
11366 self,
11367 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11368 offset: usize,
11369 mut depth: fidl::encoding::Depth,
11370 ) -> fidl::Result<()> {
11371 encoder.debug_check_bounds::<Event>(offset);
11372 let max_ordinal: u64 = self.max_ordinal_present();
11374 encoder.write_num(max_ordinal, offset);
11375 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11376 if max_ordinal == 0 {
11378 return Ok(());
11379 }
11380 depth.increment()?;
11381 let envelope_size = 8;
11382 let bytes_len = max_ordinal as usize * envelope_size;
11383 #[allow(unused_variables)]
11384 let offset = encoder.out_of_line_offset(bytes_len);
11385 let mut _prev_end_offset: usize = 0;
11386 if 1 > max_ordinal {
11387 return Ok(());
11388 }
11389
11390 let cur_offset: usize = (1 - 1) * envelope_size;
11393
11394 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11396
11397 fidl::encoding::encode_in_envelope_optional::<
11402 EventHeader,
11403 fdomain_client::fidl::FDomainResourceDialect,
11404 >(
11405 self.header.as_ref().map(<EventHeader as fidl::encoding::ValueTypeMarker>::borrow),
11406 encoder,
11407 offset + cur_offset,
11408 depth,
11409 )?;
11410
11411 _prev_end_offset = cur_offset + envelope_size;
11412 if 2 > max_ordinal {
11413 return Ok(());
11414 }
11415
11416 let cur_offset: usize = (2 - 1) * envelope_size;
11419
11420 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11422
11423 fidl::encoding::encode_in_envelope_optional::<
11428 EventPayload,
11429 fdomain_client::fidl::FDomainResourceDialect,
11430 >(
11431 self.payload
11432 .as_mut()
11433 .map(<EventPayload as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11434 encoder,
11435 offset + cur_offset,
11436 depth,
11437 )?;
11438
11439 _prev_end_offset = cur_offset + envelope_size;
11440
11441 Ok(())
11442 }
11443 }
11444
11445 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Event {
11446 #[inline(always)]
11447 fn new_empty() -> Self {
11448 Self::default()
11449 }
11450
11451 unsafe fn decode(
11452 &mut self,
11453 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11454 offset: usize,
11455 mut depth: fidl::encoding::Depth,
11456 ) -> fidl::Result<()> {
11457 decoder.debug_check_bounds::<Self>(offset);
11458 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11459 None => return Err(fidl::Error::NotNullable),
11460 Some(len) => len,
11461 };
11462 if len == 0 {
11464 return Ok(());
11465 };
11466 depth.increment()?;
11467 let envelope_size = 8;
11468 let bytes_len = len * envelope_size;
11469 let offset = decoder.out_of_line_offset(bytes_len)?;
11470 let mut _next_ordinal_to_read = 0;
11472 let mut next_offset = offset;
11473 let end_offset = offset + bytes_len;
11474 _next_ordinal_to_read += 1;
11475 if next_offset >= end_offset {
11476 return Ok(());
11477 }
11478
11479 while _next_ordinal_to_read < 1 {
11481 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11482 _next_ordinal_to_read += 1;
11483 next_offset += envelope_size;
11484 }
11485
11486 let next_out_of_line = decoder.next_out_of_line();
11487 let handles_before = decoder.remaining_handles();
11488 if let Some((inlined, num_bytes, num_handles)) =
11489 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11490 {
11491 let member_inline_size =
11492 <EventHeader as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11493 if inlined != (member_inline_size <= 4) {
11494 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11495 }
11496 let inner_offset;
11497 let mut inner_depth = depth.clone();
11498 if inlined {
11499 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11500 inner_offset = next_offset;
11501 } else {
11502 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11503 inner_depth.increment()?;
11504 }
11505 let val_ref = self.header.get_or_insert_with(|| {
11506 fidl::new_empty!(EventHeader, fdomain_client::fidl::FDomainResourceDialect)
11507 });
11508 fidl::decode!(
11509 EventHeader,
11510 fdomain_client::fidl::FDomainResourceDialect,
11511 val_ref,
11512 decoder,
11513 inner_offset,
11514 inner_depth
11515 )?;
11516 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11517 {
11518 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11519 }
11520 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11521 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11522 }
11523 }
11524
11525 next_offset += envelope_size;
11526 _next_ordinal_to_read += 1;
11527 if next_offset >= end_offset {
11528 return Ok(());
11529 }
11530
11531 while _next_ordinal_to_read < 2 {
11533 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11534 _next_ordinal_to_read += 1;
11535 next_offset += envelope_size;
11536 }
11537
11538 let next_out_of_line = decoder.next_out_of_line();
11539 let handles_before = decoder.remaining_handles();
11540 if let Some((inlined, num_bytes, num_handles)) =
11541 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11542 {
11543 let member_inline_size =
11544 <EventPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11545 if inlined != (member_inline_size <= 4) {
11546 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11547 }
11548 let inner_offset;
11549 let mut inner_depth = depth.clone();
11550 if inlined {
11551 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11552 inner_offset = next_offset;
11553 } else {
11554 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11555 inner_depth.increment()?;
11556 }
11557 let val_ref = self.payload.get_or_insert_with(|| {
11558 fidl::new_empty!(EventPayload, fdomain_client::fidl::FDomainResourceDialect)
11559 });
11560 fidl::decode!(
11561 EventPayload,
11562 fdomain_client::fidl::FDomainResourceDialect,
11563 val_ref,
11564 decoder,
11565 inner_offset,
11566 inner_depth
11567 )?;
11568 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11569 {
11570 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11571 }
11572 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11573 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11574 }
11575 }
11576
11577 next_offset += envelope_size;
11578
11579 while next_offset < end_offset {
11581 _next_ordinal_to_read += 1;
11582 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11583 next_offset += envelope_size;
11584 }
11585
11586 Ok(())
11587 }
11588 }
11589
11590 impl NamespaceEntry {
11591 #[inline(always)]
11592 fn max_ordinal_present(&self) -> u64 {
11593 if let Some(_) = self.directory {
11594 return 2;
11595 }
11596 if let Some(_) = self.path {
11597 return 1;
11598 }
11599 0
11600 }
11601 }
11602
11603 impl fidl::encoding::ResourceTypeMarker for NamespaceEntry {
11604 type Borrowed<'a> = &'a mut Self;
11605 fn take_or_borrow<'a>(
11606 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11607 ) -> Self::Borrowed<'a> {
11608 value
11609 }
11610 }
11611
11612 unsafe impl fidl::encoding::TypeMarker for NamespaceEntry {
11613 type Owned = Self;
11614
11615 #[inline(always)]
11616 fn inline_align(_context: fidl::encoding::Context) -> usize {
11617 8
11618 }
11619
11620 #[inline(always)]
11621 fn inline_size(_context: fidl::encoding::Context) -> usize {
11622 16
11623 }
11624 }
11625
11626 unsafe impl fidl::encoding::Encode<NamespaceEntry, fdomain_client::fidl::FDomainResourceDialect>
11627 for &mut NamespaceEntry
11628 {
11629 unsafe fn encode(
11630 self,
11631 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11632 offset: usize,
11633 mut depth: fidl::encoding::Depth,
11634 ) -> fidl::Result<()> {
11635 encoder.debug_check_bounds::<NamespaceEntry>(offset);
11636 let max_ordinal: u64 = self.max_ordinal_present();
11638 encoder.write_num(max_ordinal, offset);
11639 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11640 if max_ordinal == 0 {
11642 return Ok(());
11643 }
11644 depth.increment()?;
11645 let envelope_size = 8;
11646 let bytes_len = max_ordinal as usize * envelope_size;
11647 #[allow(unused_variables)]
11648 let offset = encoder.out_of_line_offset(bytes_len);
11649 let mut _prev_end_offset: usize = 0;
11650 if 1 > max_ordinal {
11651 return Ok(());
11652 }
11653
11654 let cur_offset: usize = (1 - 1) * envelope_size;
11657
11658 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11660
11661 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4095>, fdomain_client::fidl::FDomainResourceDialect>(
11666 self.path.as_ref().map(<fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow),
11667 encoder, offset + cur_offset, depth
11668 )?;
11669
11670 _prev_end_offset = cur_offset + envelope_size;
11671 if 2 > max_ordinal {
11672 return Ok(());
11673 }
11674
11675 let cur_offset: usize = (2 - 1) * envelope_size;
11678
11679 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11681
11682 fidl::encoding::encode_in_envelope_optional::<
11687 fidl::encoding::Endpoint<
11688 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
11689 >,
11690 fdomain_client::fidl::FDomainResourceDialect,
11691 >(
11692 self.directory.as_mut().map(
11693 <fidl::encoding::Endpoint<
11694 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
11695 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11696 ),
11697 encoder,
11698 offset + cur_offset,
11699 depth,
11700 )?;
11701
11702 _prev_end_offset = cur_offset + envelope_size;
11703
11704 Ok(())
11705 }
11706 }
11707
11708 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for NamespaceEntry {
11709 #[inline(always)]
11710 fn new_empty() -> Self {
11711 Self::default()
11712 }
11713
11714 unsafe fn decode(
11715 &mut self,
11716 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11717 offset: usize,
11718 mut depth: fidl::encoding::Depth,
11719 ) -> fidl::Result<()> {
11720 decoder.debug_check_bounds::<Self>(offset);
11721 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11722 None => return Err(fidl::Error::NotNullable),
11723 Some(len) => len,
11724 };
11725 if len == 0 {
11727 return Ok(());
11728 };
11729 depth.increment()?;
11730 let envelope_size = 8;
11731 let bytes_len = len * envelope_size;
11732 let offset = decoder.out_of_line_offset(bytes_len)?;
11733 let mut _next_ordinal_to_read = 0;
11735 let mut next_offset = offset;
11736 let end_offset = offset + bytes_len;
11737 _next_ordinal_to_read += 1;
11738 if next_offset >= end_offset {
11739 return Ok(());
11740 }
11741
11742 while _next_ordinal_to_read < 1 {
11744 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11745 _next_ordinal_to_read += 1;
11746 next_offset += envelope_size;
11747 }
11748
11749 let next_out_of_line = decoder.next_out_of_line();
11750 let handles_before = decoder.remaining_handles();
11751 if let Some((inlined, num_bytes, num_handles)) =
11752 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11753 {
11754 let member_inline_size = <fidl::encoding::BoundedString<4095> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11755 if inlined != (member_inline_size <= 4) {
11756 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11757 }
11758 let inner_offset;
11759 let mut inner_depth = depth.clone();
11760 if inlined {
11761 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11762 inner_offset = next_offset;
11763 } else {
11764 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11765 inner_depth.increment()?;
11766 }
11767 let val_ref = self.path.get_or_insert_with(|| {
11768 fidl::new_empty!(
11769 fidl::encoding::BoundedString<4095>,
11770 fdomain_client::fidl::FDomainResourceDialect
11771 )
11772 });
11773 fidl::decode!(
11774 fidl::encoding::BoundedString<4095>,
11775 fdomain_client::fidl::FDomainResourceDialect,
11776 val_ref,
11777 decoder,
11778 inner_offset,
11779 inner_depth
11780 )?;
11781 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11782 {
11783 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11784 }
11785 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11786 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11787 }
11788 }
11789
11790 next_offset += envelope_size;
11791 _next_ordinal_to_read += 1;
11792 if next_offset >= end_offset {
11793 return Ok(());
11794 }
11795
11796 while _next_ordinal_to_read < 2 {
11798 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11799 _next_ordinal_to_read += 1;
11800 next_offset += envelope_size;
11801 }
11802
11803 let next_out_of_line = decoder.next_out_of_line();
11804 let handles_before = decoder.remaining_handles();
11805 if let Some((inlined, num_bytes, num_handles)) =
11806 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11807 {
11808 let member_inline_size = <fidl::encoding::Endpoint<
11809 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
11810 > as fidl::encoding::TypeMarker>::inline_size(
11811 decoder.context
11812 );
11813 if inlined != (member_inline_size <= 4) {
11814 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11815 }
11816 let inner_offset;
11817 let mut inner_depth = depth.clone();
11818 if inlined {
11819 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11820 inner_offset = next_offset;
11821 } else {
11822 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11823 inner_depth.increment()?;
11824 }
11825 let val_ref = self.directory.get_or_insert_with(|| {
11826 fidl::new_empty!(
11827 fidl::encoding::Endpoint<
11828 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
11829 >,
11830 fdomain_client::fidl::FDomainResourceDialect
11831 )
11832 });
11833 fidl::decode!(
11834 fidl::encoding::Endpoint<
11835 fdomain_client::fidl::ClientEnd<fdomain_fuchsia_io::DirectoryMarker>,
11836 >,
11837 fdomain_client::fidl::FDomainResourceDialect,
11838 val_ref,
11839 decoder,
11840 inner_offset,
11841 inner_depth
11842 )?;
11843 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11844 {
11845 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11846 }
11847 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11848 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11849 }
11850 }
11851
11852 next_offset += envelope_size;
11853
11854 while next_offset < end_offset {
11856 _next_ordinal_to_read += 1;
11857 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11858 next_offset += envelope_size;
11859 }
11860
11861 Ok(())
11862 }
11863 }
11864
11865 impl StartChildArgs {
11866 #[inline(always)]
11867 fn max_ordinal_present(&self) -> u64 {
11868 if let Some(_) = self.additional_inputs {
11869 return 4;
11870 }
11871 if let Some(_) = self.dictionary {
11872 return 3;
11873 }
11874 if let Some(_) = self.namespace_entries {
11875 return 2;
11876 }
11877 if let Some(_) = self.numbered_handles {
11878 return 1;
11879 }
11880 0
11881 }
11882 }
11883
11884 impl fidl::encoding::ResourceTypeMarker for StartChildArgs {
11885 type Borrowed<'a> = &'a mut Self;
11886 fn take_or_borrow<'a>(
11887 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11888 ) -> Self::Borrowed<'a> {
11889 value
11890 }
11891 }
11892
11893 unsafe impl fidl::encoding::TypeMarker for StartChildArgs {
11894 type Owned = Self;
11895
11896 #[inline(always)]
11897 fn inline_align(_context: fidl::encoding::Context) -> usize {
11898 8
11899 }
11900
11901 #[inline(always)]
11902 fn inline_size(_context: fidl::encoding::Context) -> usize {
11903 16
11904 }
11905 }
11906
11907 unsafe impl fidl::encoding::Encode<StartChildArgs, fdomain_client::fidl::FDomainResourceDialect>
11908 for &mut StartChildArgs
11909 {
11910 unsafe fn encode(
11911 self,
11912 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
11913 offset: usize,
11914 mut depth: fidl::encoding::Depth,
11915 ) -> fidl::Result<()> {
11916 encoder.debug_check_bounds::<StartChildArgs>(offset);
11917 let max_ordinal: u64 = self.max_ordinal_present();
11919 encoder.write_num(max_ordinal, offset);
11920 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11921 if max_ordinal == 0 {
11923 return Ok(());
11924 }
11925 depth.increment()?;
11926 let envelope_size = 8;
11927 let bytes_len = max_ordinal as usize * envelope_size;
11928 #[allow(unused_variables)]
11929 let offset = encoder.out_of_line_offset(bytes_len);
11930 let mut _prev_end_offset: usize = 0;
11931 if 1 > max_ordinal {
11932 return Ok(());
11933 }
11934
11935 let cur_offset: usize = (1 - 1) * envelope_size;
11938
11939 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11941
11942 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fdomain_fuchsia_process::HandleInfo, 128>, fdomain_client::fidl::FDomainResourceDialect>(
11947 self.numbered_handles.as_mut().map(<fidl::encoding::Vector<fdomain_fuchsia_process::HandleInfo, 128> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11948 encoder, offset + cur_offset, depth
11949 )?;
11950
11951 _prev_end_offset = cur_offset + envelope_size;
11952 if 2 > max_ordinal {
11953 return Ok(());
11954 }
11955
11956 let cur_offset: usize = (2 - 1) * envelope_size;
11959
11960 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11962
11963 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<NamespaceEntry, 32>, fdomain_client::fidl::FDomainResourceDialect>(
11968 self.namespace_entries.as_mut().map(<fidl::encoding::Vector<NamespaceEntry, 32> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11969 encoder, offset + cur_offset, depth
11970 )?;
11971
11972 _prev_end_offset = cur_offset + envelope_size;
11973 if 3 > max_ordinal {
11974 return Ok(());
11975 }
11976
11977 let cur_offset: usize = (3 - 1) * envelope_size;
11980
11981 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11983
11984 fidl::encoding::encode_in_envelope_optional::<fdomain_fuchsia_component_sandbox::DictionaryRef, fdomain_client::fidl::FDomainResourceDialect>(
11989 self.dictionary.as_mut().map(<fdomain_fuchsia_component_sandbox::DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11990 encoder, offset + cur_offset, depth
11991 )?;
11992
11993 _prev_end_offset = cur_offset + envelope_size;
11994 if 4 > max_ordinal {
11995 return Ok(());
11996 }
11997
11998 let cur_offset: usize = (4 - 1) * envelope_size;
12001
12002 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12004
12005 fidl::encoding::encode_in_envelope_optional::<
12010 fidl::encoding::HandleType<
12011 fdomain_client::EventPair,
12012 { fidl::ObjectType::EVENTPAIR.into_raw() },
12013 2147483648,
12014 >,
12015 fdomain_client::fidl::FDomainResourceDialect,
12016 >(
12017 self.additional_inputs.as_mut().map(
12018 <fidl::encoding::HandleType<
12019 fdomain_client::EventPair,
12020 { fidl::ObjectType::EVENTPAIR.into_raw() },
12021 2147483648,
12022 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12023 ),
12024 encoder,
12025 offset + cur_offset,
12026 depth,
12027 )?;
12028
12029 _prev_end_offset = cur_offset + envelope_size;
12030
12031 Ok(())
12032 }
12033 }
12034
12035 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for StartChildArgs {
12036 #[inline(always)]
12037 fn new_empty() -> Self {
12038 Self::default()
12039 }
12040
12041 unsafe fn decode(
12042 &mut self,
12043 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12044 offset: usize,
12045 mut depth: fidl::encoding::Depth,
12046 ) -> fidl::Result<()> {
12047 decoder.debug_check_bounds::<Self>(offset);
12048 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12049 None => return Err(fidl::Error::NotNullable),
12050 Some(len) => len,
12051 };
12052 if len == 0 {
12054 return Ok(());
12055 };
12056 depth.increment()?;
12057 let envelope_size = 8;
12058 let bytes_len = len * envelope_size;
12059 let offset = decoder.out_of_line_offset(bytes_len)?;
12060 let mut _next_ordinal_to_read = 0;
12062 let mut next_offset = offset;
12063 let end_offset = offset + bytes_len;
12064 _next_ordinal_to_read += 1;
12065 if next_offset >= end_offset {
12066 return Ok(());
12067 }
12068
12069 while _next_ordinal_to_read < 1 {
12071 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12072 _next_ordinal_to_read += 1;
12073 next_offset += envelope_size;
12074 }
12075
12076 let next_out_of_line = decoder.next_out_of_line();
12077 let handles_before = decoder.remaining_handles();
12078 if let Some((inlined, num_bytes, num_handles)) =
12079 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12080 {
12081 let member_inline_size = <fidl::encoding::Vector<
12082 fdomain_fuchsia_process::HandleInfo,
12083 128,
12084 > as fidl::encoding::TypeMarker>::inline_size(
12085 decoder.context
12086 );
12087 if inlined != (member_inline_size <= 4) {
12088 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12089 }
12090 let inner_offset;
12091 let mut inner_depth = depth.clone();
12092 if inlined {
12093 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12094 inner_offset = next_offset;
12095 } else {
12096 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12097 inner_depth.increment()?;
12098 }
12099 let val_ref =
12100 self.numbered_handles.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fdomain_fuchsia_process::HandleInfo, 128>, fdomain_client::fidl::FDomainResourceDialect));
12101 fidl::decode!(fidl::encoding::Vector<fdomain_fuchsia_process::HandleInfo, 128>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
12102 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12103 {
12104 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12105 }
12106 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12107 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12108 }
12109 }
12110
12111 next_offset += envelope_size;
12112 _next_ordinal_to_read += 1;
12113 if next_offset >= end_offset {
12114 return Ok(());
12115 }
12116
12117 while _next_ordinal_to_read < 2 {
12119 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12120 _next_ordinal_to_read += 1;
12121 next_offset += envelope_size;
12122 }
12123
12124 let next_out_of_line = decoder.next_out_of_line();
12125 let handles_before = decoder.remaining_handles();
12126 if let Some((inlined, num_bytes, num_handles)) =
12127 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12128 {
12129 let member_inline_size = <fidl::encoding::Vector<NamespaceEntry, 32> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12130 if inlined != (member_inline_size <= 4) {
12131 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12132 }
12133 let inner_offset;
12134 let mut inner_depth = depth.clone();
12135 if inlined {
12136 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12137 inner_offset = next_offset;
12138 } else {
12139 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12140 inner_depth.increment()?;
12141 }
12142 let val_ref =
12143 self.namespace_entries.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<NamespaceEntry, 32>, fdomain_client::fidl::FDomainResourceDialect));
12144 fidl::decode!(fidl::encoding::Vector<NamespaceEntry, 32>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
12145 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12146 {
12147 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12148 }
12149 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12150 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12151 }
12152 }
12153
12154 next_offset += envelope_size;
12155 _next_ordinal_to_read += 1;
12156 if next_offset >= end_offset {
12157 return Ok(());
12158 }
12159
12160 while _next_ordinal_to_read < 3 {
12162 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12163 _next_ordinal_to_read += 1;
12164 next_offset += envelope_size;
12165 }
12166
12167 let next_out_of_line = decoder.next_out_of_line();
12168 let handles_before = decoder.remaining_handles();
12169 if let Some((inlined, num_bytes, num_handles)) =
12170 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12171 {
12172 let member_inline_size = <fdomain_fuchsia_component_sandbox::DictionaryRef as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12173 if inlined != (member_inline_size <= 4) {
12174 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12175 }
12176 let inner_offset;
12177 let mut inner_depth = depth.clone();
12178 if inlined {
12179 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12180 inner_offset = next_offset;
12181 } else {
12182 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12183 inner_depth.increment()?;
12184 }
12185 let val_ref = self.dictionary.get_or_insert_with(|| {
12186 fidl::new_empty!(
12187 fdomain_fuchsia_component_sandbox::DictionaryRef,
12188 fdomain_client::fidl::FDomainResourceDialect
12189 )
12190 });
12191 fidl::decode!(
12192 fdomain_fuchsia_component_sandbox::DictionaryRef,
12193 fdomain_client::fidl::FDomainResourceDialect,
12194 val_ref,
12195 decoder,
12196 inner_offset,
12197 inner_depth
12198 )?;
12199 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12200 {
12201 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12202 }
12203 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12204 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12205 }
12206 }
12207
12208 next_offset += envelope_size;
12209 _next_ordinal_to_read += 1;
12210 if next_offset >= end_offset {
12211 return Ok(());
12212 }
12213
12214 while _next_ordinal_to_read < 4 {
12216 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12217 _next_ordinal_to_read += 1;
12218 next_offset += envelope_size;
12219 }
12220
12221 let next_out_of_line = decoder.next_out_of_line();
12222 let handles_before = decoder.remaining_handles();
12223 if let Some((inlined, num_bytes, num_handles)) =
12224 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12225 {
12226 let member_inline_size = <fidl::encoding::HandleType<
12227 fdomain_client::EventPair,
12228 { fidl::ObjectType::EVENTPAIR.into_raw() },
12229 2147483648,
12230 > as fidl::encoding::TypeMarker>::inline_size(
12231 decoder.context
12232 );
12233 if inlined != (member_inline_size <= 4) {
12234 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12235 }
12236 let inner_offset;
12237 let mut inner_depth = depth.clone();
12238 if inlined {
12239 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12240 inner_offset = next_offset;
12241 } else {
12242 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12243 inner_depth.increment()?;
12244 }
12245 let val_ref =
12246 self.additional_inputs.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect));
12247 fidl::decode!(fidl::encoding::HandleType<fdomain_client::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
12248 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12249 {
12250 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12251 }
12252 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12253 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12254 }
12255 }
12256
12257 next_offset += envelope_size;
12258
12259 while next_offset < end_offset {
12261 _next_ordinal_to_read += 1;
12262 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12263 next_offset += envelope_size;
12264 }
12265
12266 Ok(())
12267 }
12268 }
12269
12270 impl fidl::encoding::ResourceTypeMarker for EventPayload {
12271 type Borrowed<'a> = &'a mut Self;
12272 fn take_or_borrow<'a>(
12273 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12274 ) -> Self::Borrowed<'a> {
12275 value
12276 }
12277 }
12278
12279 unsafe impl fidl::encoding::TypeMarker for EventPayload {
12280 type Owned = Self;
12281
12282 #[inline(always)]
12283 fn inline_align(_context: fidl::encoding::Context) -> usize {
12284 8
12285 }
12286
12287 #[inline(always)]
12288 fn inline_size(_context: fidl::encoding::Context) -> usize {
12289 16
12290 }
12291 }
12292
12293 unsafe impl fidl::encoding::Encode<EventPayload, fdomain_client::fidl::FDomainResourceDialect>
12294 for &mut EventPayload
12295 {
12296 #[inline]
12297 unsafe fn encode(
12298 self,
12299 encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12300 offset: usize,
12301 _depth: fidl::encoding::Depth,
12302 ) -> fidl::Result<()> {
12303 encoder.debug_check_bounds::<EventPayload>(offset);
12304 encoder.write_num::<u64>(self.ordinal(), offset);
12305 match self {
12306 EventPayload::CapabilityRequested(ref mut val) => {
12307 fidl::encoding::encode_in_envelope::<CapabilityRequestedPayload, fdomain_client::fidl::FDomainResourceDialect>(
12308 <CapabilityRequestedPayload as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12309 encoder, offset + 8, _depth
12310 )
12311 }
12312 EventPayload::Purged(ref val) => {
12313 fidl::encoding::encode_in_envelope::<PurgedPayload, fdomain_client::fidl::FDomainResourceDialect>(
12314 <PurgedPayload as fidl::encoding::ValueTypeMarker>::borrow(val),
12315 encoder, offset + 8, _depth
12316 )
12317 }
12318 EventPayload::Discovered(ref val) => {
12319 fidl::encoding::encode_in_envelope::<DiscoveredPayload, fdomain_client::fidl::FDomainResourceDialect>(
12320 <DiscoveredPayload as fidl::encoding::ValueTypeMarker>::borrow(val),
12321 encoder, offset + 8, _depth
12322 )
12323 }
12324 EventPayload::Destroyed(ref val) => {
12325 fidl::encoding::encode_in_envelope::<DestroyedPayload, fdomain_client::fidl::FDomainResourceDialect>(
12326 <DestroyedPayload as fidl::encoding::ValueTypeMarker>::borrow(val),
12327 encoder, offset + 8, _depth
12328 )
12329 }
12330 EventPayload::Resolved(ref val) => {
12331 fidl::encoding::encode_in_envelope::<ResolvedPayload, fdomain_client::fidl::FDomainResourceDialect>(
12332 <ResolvedPayload as fidl::encoding::ValueTypeMarker>::borrow(val),
12333 encoder, offset + 8, _depth
12334 )
12335 }
12336 EventPayload::Started(ref val) => {
12337 fidl::encoding::encode_in_envelope::<StartedPayload, fdomain_client::fidl::FDomainResourceDialect>(
12338 <StartedPayload as fidl::encoding::ValueTypeMarker>::borrow(val),
12339 encoder, offset + 8, _depth
12340 )
12341 }
12342 EventPayload::Stopped(ref val) => {
12343 fidl::encoding::encode_in_envelope::<StoppedPayload, fdomain_client::fidl::FDomainResourceDialect>(
12344 <StoppedPayload as fidl::encoding::ValueTypeMarker>::borrow(val),
12345 encoder, offset + 8, _depth
12346 )
12347 }
12348 EventPayload::DebugStarted(ref mut val) => {
12349 fidl::encoding::encode_in_envelope::<DebugStartedPayload, fdomain_client::fidl::FDomainResourceDialect>(
12350 <DebugStartedPayload as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12351 encoder, offset + 8, _depth
12352 )
12353 }
12354 EventPayload::Unresolved(ref val) => {
12355 fidl::encoding::encode_in_envelope::<UnresolvedPayload, fdomain_client::fidl::FDomainResourceDialect>(
12356 <UnresolvedPayload as fidl::encoding::ValueTypeMarker>::borrow(val),
12357 encoder, offset + 8, _depth
12358 )
12359 }
12360 EventPayload::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
12361 }
12362 }
12363 }
12364
12365 impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for EventPayload {
12366 #[inline(always)]
12367 fn new_empty() -> Self {
12368 Self::__SourceBreaking { unknown_ordinal: 0 }
12369 }
12370
12371 #[inline]
12372 unsafe fn decode(
12373 &mut self,
12374 decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
12375 offset: usize,
12376 mut depth: fidl::encoding::Depth,
12377 ) -> fidl::Result<()> {
12378 decoder.debug_check_bounds::<Self>(offset);
12379 #[allow(unused_variables)]
12380 let next_out_of_line = decoder.next_out_of_line();
12381 let handles_before = decoder.remaining_handles();
12382 let (ordinal, inlined, num_bytes, num_handles) =
12383 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12384
12385 let member_inline_size = match ordinal {
12386 1 => <CapabilityRequestedPayload as fidl::encoding::TypeMarker>::inline_size(
12387 decoder.context,
12388 ),
12389 2 => <PurgedPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12390 4 => {
12391 <DiscoveredPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context)
12392 }
12393 5 => <DestroyedPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12394 6 => <ResolvedPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12395 7 => <StartedPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12396 8 => <StoppedPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12397 9 => <DebugStartedPayload as fidl::encoding::TypeMarker>::inline_size(
12398 decoder.context,
12399 ),
12400 10 => {
12401 <UnresolvedPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context)
12402 }
12403 0 => return Err(fidl::Error::UnknownUnionTag),
12404 _ => num_bytes as usize,
12405 };
12406
12407 if inlined != (member_inline_size <= 4) {
12408 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12409 }
12410 let _inner_offset;
12411 if inlined {
12412 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12413 _inner_offset = offset + 8;
12414 } else {
12415 depth.increment()?;
12416 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12417 }
12418 match ordinal {
12419 1 => {
12420 #[allow(irrefutable_let_patterns)]
12421 if let EventPayload::CapabilityRequested(_) = self {
12422 } else {
12424 *self = EventPayload::CapabilityRequested(fidl::new_empty!(
12426 CapabilityRequestedPayload,
12427 fdomain_client::fidl::FDomainResourceDialect
12428 ));
12429 }
12430 #[allow(irrefutable_let_patterns)]
12431 if let EventPayload::CapabilityRequested(ref mut val) = self {
12432 fidl::decode!(
12433 CapabilityRequestedPayload,
12434 fdomain_client::fidl::FDomainResourceDialect,
12435 val,
12436 decoder,
12437 _inner_offset,
12438 depth
12439 )?;
12440 } else {
12441 unreachable!()
12442 }
12443 }
12444 2 => {
12445 #[allow(irrefutable_let_patterns)]
12446 if let EventPayload::Purged(_) = self {
12447 } else {
12449 *self = EventPayload::Purged(fidl::new_empty!(
12451 PurgedPayload,
12452 fdomain_client::fidl::FDomainResourceDialect
12453 ));
12454 }
12455 #[allow(irrefutable_let_patterns)]
12456 if let EventPayload::Purged(ref mut val) = self {
12457 fidl::decode!(
12458 PurgedPayload,
12459 fdomain_client::fidl::FDomainResourceDialect,
12460 val,
12461 decoder,
12462 _inner_offset,
12463 depth
12464 )?;
12465 } else {
12466 unreachable!()
12467 }
12468 }
12469 4 => {
12470 #[allow(irrefutable_let_patterns)]
12471 if let EventPayload::Discovered(_) = self {
12472 } else {
12474 *self = EventPayload::Discovered(fidl::new_empty!(
12476 DiscoveredPayload,
12477 fdomain_client::fidl::FDomainResourceDialect
12478 ));
12479 }
12480 #[allow(irrefutable_let_patterns)]
12481 if let EventPayload::Discovered(ref mut val) = self {
12482 fidl::decode!(
12483 DiscoveredPayload,
12484 fdomain_client::fidl::FDomainResourceDialect,
12485 val,
12486 decoder,
12487 _inner_offset,
12488 depth
12489 )?;
12490 } else {
12491 unreachable!()
12492 }
12493 }
12494 5 => {
12495 #[allow(irrefutable_let_patterns)]
12496 if let EventPayload::Destroyed(_) = self {
12497 } else {
12499 *self = EventPayload::Destroyed(fidl::new_empty!(
12501 DestroyedPayload,
12502 fdomain_client::fidl::FDomainResourceDialect
12503 ));
12504 }
12505 #[allow(irrefutable_let_patterns)]
12506 if let EventPayload::Destroyed(ref mut val) = self {
12507 fidl::decode!(
12508 DestroyedPayload,
12509 fdomain_client::fidl::FDomainResourceDialect,
12510 val,
12511 decoder,
12512 _inner_offset,
12513 depth
12514 )?;
12515 } else {
12516 unreachable!()
12517 }
12518 }
12519 6 => {
12520 #[allow(irrefutable_let_patterns)]
12521 if let EventPayload::Resolved(_) = self {
12522 } else {
12524 *self = EventPayload::Resolved(fidl::new_empty!(
12526 ResolvedPayload,
12527 fdomain_client::fidl::FDomainResourceDialect
12528 ));
12529 }
12530 #[allow(irrefutable_let_patterns)]
12531 if let EventPayload::Resolved(ref mut val) = self {
12532 fidl::decode!(
12533 ResolvedPayload,
12534 fdomain_client::fidl::FDomainResourceDialect,
12535 val,
12536 decoder,
12537 _inner_offset,
12538 depth
12539 )?;
12540 } else {
12541 unreachable!()
12542 }
12543 }
12544 7 => {
12545 #[allow(irrefutable_let_patterns)]
12546 if let EventPayload::Started(_) = self {
12547 } else {
12549 *self = EventPayload::Started(fidl::new_empty!(
12551 StartedPayload,
12552 fdomain_client::fidl::FDomainResourceDialect
12553 ));
12554 }
12555 #[allow(irrefutable_let_patterns)]
12556 if let EventPayload::Started(ref mut val) = self {
12557 fidl::decode!(
12558 StartedPayload,
12559 fdomain_client::fidl::FDomainResourceDialect,
12560 val,
12561 decoder,
12562 _inner_offset,
12563 depth
12564 )?;
12565 } else {
12566 unreachable!()
12567 }
12568 }
12569 8 => {
12570 #[allow(irrefutable_let_patterns)]
12571 if let EventPayload::Stopped(_) = self {
12572 } else {
12574 *self = EventPayload::Stopped(fidl::new_empty!(
12576 StoppedPayload,
12577 fdomain_client::fidl::FDomainResourceDialect
12578 ));
12579 }
12580 #[allow(irrefutable_let_patterns)]
12581 if let EventPayload::Stopped(ref mut val) = self {
12582 fidl::decode!(
12583 StoppedPayload,
12584 fdomain_client::fidl::FDomainResourceDialect,
12585 val,
12586 decoder,
12587 _inner_offset,
12588 depth
12589 )?;
12590 } else {
12591 unreachable!()
12592 }
12593 }
12594 9 => {
12595 #[allow(irrefutable_let_patterns)]
12596 if let EventPayload::DebugStarted(_) = self {
12597 } else {
12599 *self = EventPayload::DebugStarted(fidl::new_empty!(
12601 DebugStartedPayload,
12602 fdomain_client::fidl::FDomainResourceDialect
12603 ));
12604 }
12605 #[allow(irrefutable_let_patterns)]
12606 if let EventPayload::DebugStarted(ref mut val) = self {
12607 fidl::decode!(
12608 DebugStartedPayload,
12609 fdomain_client::fidl::FDomainResourceDialect,
12610 val,
12611 decoder,
12612 _inner_offset,
12613 depth
12614 )?;
12615 } else {
12616 unreachable!()
12617 }
12618 }
12619 10 => {
12620 #[allow(irrefutable_let_patterns)]
12621 if let EventPayload::Unresolved(_) = self {
12622 } else {
12624 *self = EventPayload::Unresolved(fidl::new_empty!(
12626 UnresolvedPayload,
12627 fdomain_client::fidl::FDomainResourceDialect
12628 ));
12629 }
12630 #[allow(irrefutable_let_patterns)]
12631 if let EventPayload::Unresolved(ref mut val) = self {
12632 fidl::decode!(
12633 UnresolvedPayload,
12634 fdomain_client::fidl::FDomainResourceDialect,
12635 val,
12636 decoder,
12637 _inner_offset,
12638 depth
12639 )?;
12640 } else {
12641 unreachable!()
12642 }
12643 }
12644 #[allow(deprecated)]
12645 ordinal => {
12646 for _ in 0..num_handles {
12647 decoder.drop_next_handle()?;
12648 }
12649 *self = EventPayload::__SourceBreaking { unknown_ordinal: ordinal };
12650 }
12651 }
12652 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12653 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12654 }
12655 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12656 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12657 }
12658 Ok(())
12659 }
12660 }
12661}