fidl_next_fuchsia_component_runner/
fidl_next_fuchsia_component_runner.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    pub use fidl_next_common_fuchsia_component_runner::natural::*;
8
9    #[derive(Debug, PartialEq)]
10    pub enum Task {
11        Job(::fidl_next::fuchsia::zx::Job),
12
13        Process(::fidl_next::fuchsia::zx::Process),
14
15        Thread(::fidl_next::fuchsia::zx::Thread),
16
17        UnknownOrdinal_(u64),
18    }
19
20    impl Task {
21        pub fn is_unknown(&self) -> bool {
22            #[allow(unreachable_patterns)]
23            match self {
24                Self::UnknownOrdinal_(_) => true,
25                _ => false,
26            }
27        }
28    }
29
30    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Task<'static>, ___E> for Task
31    where
32        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
33        ___E: ::fidl_next::Encoder,
34        ___E: ::fidl_next::fuchsia::HandleEncoder,
35    {
36        #[inline]
37        fn encode(
38            self,
39            encoder: &mut ___E,
40            out: &mut ::core::mem::MaybeUninit<crate::wire::Task<'static>>,
41            _: (),
42        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
43            ::fidl_next::munge!(let crate::wire::Task { raw, _phantom: _ } = out);
44
45            match self {
46                Self::Job(value) => ::fidl_next::RawWireUnion::encode_as::<
47                    ___E,
48                    ::fidl_next::fuchsia::WireJob,
49                >(value, 1, encoder, raw, ())?,
50
51                Self::Process(value) => ::fidl_next::RawWireUnion::encode_as::<
52                    ___E,
53                    ::fidl_next::fuchsia::WireProcess,
54                >(value, 2, encoder, raw, ())?,
55
56                Self::Thread(value) => ::fidl_next::RawWireUnion::encode_as::<
57                    ___E,
58                    ::fidl_next::fuchsia::WireThread,
59                >(value, 3, encoder, raw, ())?,
60
61                Self::UnknownOrdinal_(ordinal) => {
62                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
63                }
64            }
65
66            Ok(())
67        }
68    }
69
70    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Task<'static>, ___E> for Task
71    where
72        ___E: ?Sized,
73        Task: ::fidl_next::Encode<crate::wire::Task<'static>, ___E>,
74    {
75        #[inline]
76        fn encode_option(
77            this: ::core::option::Option<Self>,
78            encoder: &mut ___E,
79            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Task<'static>>,
80            _: (),
81        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
82            ::fidl_next::munge!(let crate::wire_optional::Task { raw, _phantom: _ } = &mut *out);
83
84            if let Some(inner) = this {
85                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
86                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
87            } else {
88                ::fidl_next::RawWireUnion::encode_absent(raw);
89            }
90
91            Ok(())
92        }
93    }
94
95    impl<'de> ::fidl_next::FromWire<crate::wire::Task<'de>> for Task {
96        #[inline]
97        fn from_wire(wire: crate::wire::Task<'de>) -> Self {
98            let wire = ::core::mem::ManuallyDrop::new(wire);
99            match wire.raw.ordinal() {
100                1 => Self::Job(::fidl_next::FromWire::from_wire(unsafe {
101                    wire.raw.get().read_unchecked::<::fidl_next::fuchsia::WireJob>()
102                })),
103
104                2 => Self::Process(::fidl_next::FromWire::from_wire(unsafe {
105                    wire.raw.get().read_unchecked::<::fidl_next::fuchsia::WireProcess>()
106                })),
107
108                3 => Self::Thread(::fidl_next::FromWire::from_wire(unsafe {
109                    wire.raw.get().read_unchecked::<::fidl_next::fuchsia::WireThread>()
110                })),
111
112                ord => return Self::UnknownOrdinal_(ord as u64),
113            }
114        }
115    }
116
117    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Task<'de>> for Task {
118        #[inline]
119        fn from_wire_option(wire: crate::wire_optional::Task<'de>) -> ::core::option::Option<Self> {
120            if let Some(inner) = wire.into_option() {
121                Some(::fidl_next::FromWire::from_wire(inner))
122            } else {
123                None
124            }
125        }
126    }
127
128    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Task<'de>> for Box<Task> {
129        #[inline]
130        fn from_wire_option(wire: crate::wire_optional::Task<'de>) -> ::core::option::Option<Self> {
131            <
132            Task as ::fidl_next::FromWireOption<crate::wire_optional::Task<'de>>
133        >::from_wire_option(wire).map(Box::new)
134        }
135    }
136
137    #[derive(Debug, Default, PartialEq)]
138    pub struct ComponentTasks {
139        pub component_task: ::core::option::Option<crate::natural::Task>,
140
141        pub parent_task: ::core::option::Option<crate::natural::Task>,
142    }
143
144    impl ComponentTasks {
145        fn __max_ordinal(&self) -> usize {
146            if self.parent_task.is_some() {
147                return 2;
148            }
149
150            if self.component_task.is_some() {
151                return 1;
152            }
153
154            0
155        }
156    }
157
158    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentTasks<'static>, ___E> for ComponentTasks
159    where
160        ___E: ::fidl_next::Encoder + ?Sized,
161        ___E: ::fidl_next::fuchsia::HandleEncoder,
162    {
163        #[inline]
164        fn encode(
165            mut self,
166            encoder: &mut ___E,
167            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentTasks<'static>>,
168            _: (),
169        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
170            ::fidl_next::munge!(let crate::wire::ComponentTasks { table } = out);
171
172            let max_ord = self.__max_ordinal();
173
174            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
175            ::fidl_next::Wire::zero_padding(&mut out);
176
177            let mut preallocated =
178                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
179
180            for i in 1..=max_ord {
181                match i {
182                    2 => {
183                        if let Some(value) = self.parent_task.take() {
184                            ::fidl_next::WireEnvelope::encode_value::<
185                                crate::wire::Task<'static>,
186                                ___E,
187                            >(
188                                value, preallocated.encoder, &mut out, ()
189                            )?;
190                        } else {
191                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
192                        }
193                    }
194
195                    1 => {
196                        if let Some(value) = self.component_task.take() {
197                            ::fidl_next::WireEnvelope::encode_value::<
198                                crate::wire::Task<'static>,
199                                ___E,
200                            >(
201                                value, preallocated.encoder, &mut out, ()
202                            )?;
203                        } else {
204                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
205                        }
206                    }
207
208                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
209                }
210                unsafe {
211                    preallocated.write_next(out.assume_init_ref());
212                }
213            }
214
215            ::fidl_next::WireTable::encode_len(table, max_ord);
216
217            Ok(())
218        }
219    }
220
221    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentTasks<'de>> for ComponentTasks {
222        #[inline]
223        fn from_wire(wire_: crate::wire::ComponentTasks<'de>) -> Self {
224            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
225
226            let component_task = wire_.table.get(1);
227
228            let parent_task = wire_.table.get(2);
229
230            Self {
231                component_task: component_task.map(|envelope| {
232                    ::fidl_next::FromWire::from_wire(unsafe {
233                        envelope.read_unchecked::<crate::wire::Task<'de>>()
234                    })
235                }),
236
237                parent_task: parent_task.map(|envelope| {
238                    ::fidl_next::FromWire::from_wire(unsafe {
239                        envelope.read_unchecked::<crate::wire::Task<'de>>()
240                    })
241                }),
242            }
243        }
244    }
245
246    #[derive(Debug, Default, PartialEq)]
247    pub struct ComponentDiagnostics {
248        pub tasks: ::core::option::Option<crate::natural::ComponentTasks>,
249    }
250
251    impl ComponentDiagnostics {
252        fn __max_ordinal(&self) -> usize {
253            if self.tasks.is_some() {
254                return 1;
255            }
256
257            0
258        }
259    }
260
261    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentDiagnostics<'static>, ___E>
262        for ComponentDiagnostics
263    where
264        ___E: ::fidl_next::Encoder + ?Sized,
265        ___E: ::fidl_next::fuchsia::HandleEncoder,
266    {
267        #[inline]
268        fn encode(
269            mut self,
270            encoder: &mut ___E,
271            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentDiagnostics<'static>>,
272            _: (),
273        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
274            ::fidl_next::munge!(let crate::wire::ComponentDiagnostics { table } = out);
275
276            let max_ord = self.__max_ordinal();
277
278            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
279            ::fidl_next::Wire::zero_padding(&mut out);
280
281            let mut preallocated =
282                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
283
284            for i in 1..=max_ord {
285                match i {
286                    1 => {
287                        if let Some(value) = self.tasks.take() {
288                            ::fidl_next::WireEnvelope::encode_value::<
289                                crate::wire::ComponentTasks<'static>,
290                                ___E,
291                            >(
292                                value, preallocated.encoder, &mut out, ()
293                            )?;
294                        } else {
295                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
296                        }
297                    }
298
299                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
300                }
301                unsafe {
302                    preallocated.write_next(out.assume_init_ref());
303                }
304            }
305
306            ::fidl_next::WireTable::encode_len(table, max_ord);
307
308            Ok(())
309        }
310    }
311
312    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentDiagnostics<'de>> for ComponentDiagnostics {
313        #[inline]
314        fn from_wire(wire_: crate::wire::ComponentDiagnostics<'de>) -> Self {
315            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
316
317            let tasks = wire_.table.get(1);
318
319            Self {
320                tasks: tasks.map(|envelope| {
321                    ::fidl_next::FromWire::from_wire(unsafe {
322                        envelope.read_unchecked::<crate::wire::ComponentTasks<'de>>()
323                    })
324                }),
325            }
326        }
327    }
328
329    #[derive(Debug, PartialEq)]
330    pub struct ComponentControllerOnPublishDiagnosticsRequest {
331        pub payload: crate::natural::ComponentDiagnostics,
332    }
333
334    unsafe impl<___E>
335        ::fidl_next::Encode<
336            crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
337            ___E,
338        > for ComponentControllerOnPublishDiagnosticsRequest
339    where
340        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
341        ___E: ::fidl_next::Encoder,
342        ___E: ::fidl_next::fuchsia::HandleEncoder,
343    {
344        #[inline]
345        fn encode(
346            self,
347            encoder_: &mut ___E,
348            out_: &mut ::core::mem::MaybeUninit<
349                crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
350            >,
351            _: (),
352        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
353            ::fidl_next::munge! {
354                let crate::wire::ComponentControllerOnPublishDiagnosticsRequest {
355                    payload,
356
357                } = out_;
358            }
359
360            ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
361
362            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
363
364            Ok(())
365        }
366    }
367
368    unsafe impl<___E>
369        ::fidl_next::EncodeOption<
370            ::fidl_next::WireBox<
371                'static,
372                crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
373            >,
374            ___E,
375        > for ComponentControllerOnPublishDiagnosticsRequest
376    where
377        ___E: ::fidl_next::Encoder + ?Sized,
378        ComponentControllerOnPublishDiagnosticsRequest: ::fidl_next::Encode<
379                crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
380                ___E,
381            >,
382    {
383        #[inline]
384        fn encode_option(
385            this: ::core::option::Option<Self>,
386            encoder: &mut ___E,
387            out: &mut ::core::mem::MaybeUninit<
388                ::fidl_next::WireBox<
389                    'static,
390                    crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
391                >,
392            >,
393            _: (),
394        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
395            if let Some(inner) = this {
396                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
397                ::fidl_next::WireBox::encode_present(out);
398            } else {
399                ::fidl_next::WireBox::encode_absent(out);
400            }
401
402            Ok(())
403        }
404    }
405
406    impl<'de>
407        ::fidl_next::FromWire<crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>>
408        for ComponentControllerOnPublishDiagnosticsRequest
409    {
410        #[inline]
411        fn from_wire(
412            wire: crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>,
413        ) -> Self {
414            Self { payload: ::fidl_next::FromWire::from_wire(wire.payload) }
415        }
416    }
417
418    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
419    pub struct ComponentStopInfo {
420        pub termination_status: ::core::option::Option<i32>,
421
422        pub exit_code: ::core::option::Option<i64>,
423    }
424
425    impl ComponentStopInfo {
426        fn __max_ordinal(&self) -> usize {
427            if self.exit_code.is_some() {
428                return 2;
429            }
430
431            if self.termination_status.is_some() {
432                return 1;
433            }
434
435            0
436        }
437    }
438
439    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentStopInfo<'static>, ___E>
440        for ComponentStopInfo
441    where
442        ___E: ::fidl_next::Encoder + ?Sized,
443        ___E: ::fidl_next::fuchsia::HandleEncoder,
444    {
445        #[inline]
446        fn encode(
447            mut self,
448            encoder: &mut ___E,
449            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentStopInfo<'static>>,
450            _: (),
451        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
452            ::fidl_next::munge!(let crate::wire::ComponentStopInfo { table } = out);
453
454            let max_ord = self.__max_ordinal();
455
456            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
457            ::fidl_next::Wire::zero_padding(&mut out);
458
459            let mut preallocated =
460                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
461
462            for i in 1..=max_ord {
463                match i {
464                    2 => {
465                        if let Some(value) = self.exit_code.take() {
466                            ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireI64, ___E>(
467                                value,
468                                preallocated.encoder,
469                                &mut out,
470                                (),
471                            )?;
472                        } else {
473                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
474                        }
475                    }
476
477                    1 => {
478                        if let Some(value) = self.termination_status.take() {
479                            ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireI32, ___E>(
480                                value,
481                                preallocated.encoder,
482                                &mut out,
483                                (),
484                            )?;
485                        } else {
486                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
487                        }
488                    }
489
490                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
491                }
492                unsafe {
493                    preallocated.write_next(out.assume_init_ref());
494                }
495            }
496
497            ::fidl_next::WireTable::encode_len(table, max_ord);
498
499            Ok(())
500        }
501    }
502
503    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentStopInfo<'de>> for ComponentStopInfo {
504        #[inline]
505        fn from_wire(wire_: crate::wire::ComponentStopInfo<'de>) -> Self {
506            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
507
508            let termination_status = wire_.table.get(1);
509
510            let exit_code = wire_.table.get(2);
511
512            Self {
513                termination_status: termination_status.map(|envelope| {
514                    ::fidl_next::FromWire::from_wire(unsafe {
515                        envelope.read_unchecked::<::fidl_next::WireI32>()
516                    })
517                }),
518
519                exit_code: exit_code.map(|envelope| {
520                    ::fidl_next::FromWire::from_wire(unsafe {
521                        envelope.read_unchecked::<::fidl_next::WireI64>()
522                    })
523                }),
524            }
525        }
526    }
527
528    #[derive(Debug, Default, PartialEq)]
529    pub struct ComponentControllerOnEscrowRequest {
530        pub outgoing_dir: ::core::option::Option<
531            ::fidl_next::ServerEnd<
532                ::fidl_next_fuchsia_io::Directory,
533                ::fidl_next::fuchsia::zx::Channel,
534            >,
535        >,
536
537        pub escrowed_dictionary:
538            ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
539
540        pub escrowed_dictionary_handle: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
541    }
542
543    impl ComponentControllerOnEscrowRequest {
544        fn __max_ordinal(&self) -> usize {
545            if self.escrowed_dictionary_handle.is_some() {
546                return 3;
547            }
548
549            if self.escrowed_dictionary.is_some() {
550                return 2;
551            }
552
553            if self.outgoing_dir.is_some() {
554                return 1;
555            }
556
557            0
558        }
559    }
560
561    unsafe impl<___E>
562        ::fidl_next::Encode<crate::wire::ComponentControllerOnEscrowRequest<'static>, ___E>
563        for ComponentControllerOnEscrowRequest
564    where
565        ___E: ::fidl_next::Encoder + ?Sized,
566        ___E: ::fidl_next::fuchsia::HandleEncoder,
567    {
568        #[inline]
569        fn encode(
570            mut self,
571            encoder: &mut ___E,
572            out: &mut ::core::mem::MaybeUninit<
573                crate::wire::ComponentControllerOnEscrowRequest<'static>,
574            >,
575            _: (),
576        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
577            ::fidl_next::munge!(let crate::wire::ComponentControllerOnEscrowRequest { table } = out);
578
579            let max_ord = self.__max_ordinal();
580
581            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
582            ::fidl_next::Wire::zero_padding(&mut out);
583
584            let mut preallocated =
585                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
586
587            for i in 1..=max_ord {
588                match i {
589                    3 => {
590                        if let Some(value) = self.escrowed_dictionary_handle.take() {
591                            ::fidl_next::WireEnvelope::encode_value::<
592                                ::fidl_next::fuchsia::WireEventPair,
593                                ___E,
594                            >(
595                                value, preallocated.encoder, &mut out, ()
596                            )?;
597                        } else {
598                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
599                        }
600                    }
601
602                    2 => {
603                        if let Some(value) = self.escrowed_dictionary.take() {
604                            ::fidl_next::WireEnvelope::encode_value::<
605                                ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
606                                ___E,
607                            >(
608                                value, preallocated.encoder, &mut out, ()
609                            )?;
610                        } else {
611                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
612                        }
613                    }
614
615                    1 => {
616                        if let Some(value) = self.outgoing_dir.take() {
617                            ::fidl_next::WireEnvelope::encode_value::<
618                                ::fidl_next::ServerEnd<
619                                    ::fidl_next_fuchsia_io::Directory,
620                                    ::fidl_next::fuchsia::WireChannel,
621                                >,
622                                ___E,
623                            >(
624                                value, preallocated.encoder, &mut out, ()
625                            )?;
626                        } else {
627                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
628                        }
629                    }
630
631                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
632                }
633                unsafe {
634                    preallocated.write_next(out.assume_init_ref());
635                }
636            }
637
638            ::fidl_next::WireTable::encode_len(table, max_ord);
639
640            Ok(())
641        }
642    }
643
644    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentControllerOnEscrowRequest<'de>>
645        for ComponentControllerOnEscrowRequest
646    {
647        #[inline]
648        fn from_wire(wire_: crate::wire::ComponentControllerOnEscrowRequest<'de>) -> Self {
649            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
650
651            let outgoing_dir = wire_.table.get(1);
652
653            let escrowed_dictionary = wire_.table.get(2);
654
655            let escrowed_dictionary_handle = wire_.table.get(3);
656
657            Self {
658
659
660                outgoing_dir: outgoing_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
661                    unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::fuchsia::WireChannel>>() }
662                )),
663
664
665                escrowed_dictionary: escrowed_dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
666                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
667                )),
668
669
670                escrowed_dictionary_handle: escrowed_dictionary_handle.map(|envelope| ::fidl_next::FromWire::from_wire(
671                    unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>() }
672                )),
673
674        }
675        }
676    }
677
678    #[doc = " A single component namespace entry, which describes a namespace mount point\n (`path`) and the directory backing it (`directory`). This type is usually\n composed inside a vector.  See `ComponentStartInfo.ns` for more details.\n"]
679    #[derive(Debug, Default, PartialEq)]
680    pub struct ComponentNamespaceEntry {
681        pub path: ::core::option::Option<::std::string::String>,
682
683        pub directory: ::core::option::Option<
684            ::fidl_next::ClientEnd<
685                ::fidl_next_fuchsia_io::Directory,
686                ::fidl_next::fuchsia::zx::Channel,
687            >,
688        >,
689    }
690
691    impl ComponentNamespaceEntry {
692        fn __max_ordinal(&self) -> usize {
693            if self.directory.is_some() {
694                return 2;
695            }
696
697            if self.path.is_some() {
698                return 1;
699            }
700
701            0
702        }
703    }
704
705    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentNamespaceEntry<'static>, ___E>
706        for ComponentNamespaceEntry
707    where
708        ___E: ::fidl_next::Encoder + ?Sized,
709        ___E: ::fidl_next::fuchsia::HandleEncoder,
710    {
711        #[inline]
712        fn encode(
713            mut self,
714            encoder: &mut ___E,
715            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentNamespaceEntry<'static>>,
716            _: (),
717        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
718            ::fidl_next::munge!(let crate::wire::ComponentNamespaceEntry { table } = out);
719
720            let max_ord = self.__max_ordinal();
721
722            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
723            ::fidl_next::Wire::zero_padding(&mut out);
724
725            let mut preallocated =
726                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
727
728            for i in 1..=max_ord {
729                match i {
730                    2 => {
731                        if let Some(value) = self.directory.take() {
732                            ::fidl_next::WireEnvelope::encode_value::<
733                                ::fidl_next::ClientEnd<
734                                    ::fidl_next_fuchsia_io::Directory,
735                                    ::fidl_next::fuchsia::WireChannel,
736                                >,
737                                ___E,
738                            >(
739                                value, preallocated.encoder, &mut out, ()
740                            )?;
741                        } else {
742                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
743                        }
744                    }
745
746                    1 => {
747                        if let Some(value) = self.path.take() {
748                            ::fidl_next::WireEnvelope::encode_value::<
749                                ::fidl_next::WireString<'static>,
750                                ___E,
751                            >(
752                                value, preallocated.encoder, &mut out, 4095
753                            )?;
754                        } else {
755                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
756                        }
757                    }
758
759                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
760                }
761                unsafe {
762                    preallocated.write_next(out.assume_init_ref());
763                }
764            }
765
766            ::fidl_next::WireTable::encode_len(table, max_ord);
767
768            Ok(())
769        }
770    }
771
772    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentNamespaceEntry<'de>>
773        for ComponentNamespaceEntry
774    {
775        #[inline]
776        fn from_wire(wire_: crate::wire::ComponentNamespaceEntry<'de>) -> Self {
777            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
778
779            let path = wire_.table.get(1);
780
781            let directory = wire_.table.get(2);
782
783            Self {
784                path: path.map(|envelope| {
785                    ::fidl_next::FromWire::from_wire(unsafe {
786                        envelope.read_unchecked::<::fidl_next::WireString<'de>>()
787                    })
788                }),
789
790                directory: directory.map(|envelope| {
791                    ::fidl_next::FromWire::from_wire(unsafe {
792                        envelope.read_unchecked::<::fidl_next::ClientEnd<
793                            ::fidl_next_fuchsia_io::Directory,
794                            ::fidl_next::fuchsia::WireChannel,
795                        >>()
796                    })
797                }),
798            }
799        }
800    }
801
802    #[doc = " Parameters for starting a new component instance.\n"]
803    #[derive(Debug, Default, PartialEq)]
804    pub struct ComponentStartInfo {
805        pub resolved_url: ::core::option::Option<::std::string::String>,
806
807        pub program: ::core::option::Option<::fidl_next_fuchsia_data::natural::Dictionary>,
808
809        pub ns: ::core::option::Option<::std::vec::Vec<crate::natural::ComponentNamespaceEntry>>,
810
811        pub outgoing_dir: ::core::option::Option<
812            ::fidl_next::ServerEnd<
813                ::fidl_next_fuchsia_io::Directory,
814                ::fidl_next::fuchsia::zx::Channel,
815            >,
816        >,
817
818        pub runtime_dir: ::core::option::Option<
819            ::fidl_next::ServerEnd<
820                ::fidl_next_fuchsia_io::Directory,
821                ::fidl_next::fuchsia::zx::Channel,
822            >,
823        >,
824
825        pub numbered_handles: ::core::option::Option<
826            ::std::vec::Vec<::fidl_next_fuchsia_process::natural::HandleInfo>,
827        >,
828
829        pub encoded_config: ::core::option::Option<::fidl_next_fuchsia_mem::natural::Data>,
830
831        pub break_on_start: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
832
833        pub component_instance: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
834
835        pub escrowed_dictionary:
836            ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
837
838        pub escrowed_dictionary_handle: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
839    }
840
841    impl ComponentStartInfo {
842        fn __max_ordinal(&self) -> usize {
843            if self.escrowed_dictionary_handle.is_some() {
844                return 11;
845            }
846
847            if self.escrowed_dictionary.is_some() {
848                return 10;
849            }
850
851            if self.component_instance.is_some() {
852                return 9;
853            }
854
855            if self.break_on_start.is_some() {
856                return 8;
857            }
858
859            if self.encoded_config.is_some() {
860                return 7;
861            }
862
863            if self.numbered_handles.is_some() {
864                return 6;
865            }
866
867            if self.runtime_dir.is_some() {
868                return 5;
869            }
870
871            if self.outgoing_dir.is_some() {
872                return 4;
873            }
874
875            if self.ns.is_some() {
876                return 3;
877            }
878
879            if self.program.is_some() {
880                return 2;
881            }
882
883            if self.resolved_url.is_some() {
884                return 1;
885            }
886
887            0
888        }
889    }
890
891    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentStartInfo<'static>, ___E>
892        for ComponentStartInfo
893    where
894        ___E: ::fidl_next::Encoder + ?Sized,
895        ___E: ::fidl_next::fuchsia::HandleEncoder,
896    {
897        #[inline]
898        fn encode(
899            mut self,
900            encoder: &mut ___E,
901            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentStartInfo<'static>>,
902            _: (),
903        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
904            ::fidl_next::munge!(let crate::wire::ComponentStartInfo { table } = out);
905
906            let max_ord = self.__max_ordinal();
907
908            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
909            ::fidl_next::Wire::zero_padding(&mut out);
910
911            let mut preallocated =
912                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
913
914            for i in 1..=max_ord {
915                match i {
916                    11 => {
917                        if let Some(value) = self.escrowed_dictionary_handle.take() {
918                            ::fidl_next::WireEnvelope::encode_value::<
919                                ::fidl_next::fuchsia::WireEventPair,
920                                ___E,
921                            >(
922                                value, preallocated.encoder, &mut out, ()
923                            )?;
924                        } else {
925                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
926                        }
927                    }
928
929                    10 => {
930                        if let Some(value) = self.escrowed_dictionary.take() {
931                            ::fidl_next::WireEnvelope::encode_value::<
932                                ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
933                                ___E,
934                            >(
935                                value, preallocated.encoder, &mut out, ()
936                            )?;
937                        } else {
938                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
939                        }
940                    }
941
942                    9 => {
943                        if let Some(value) = self.component_instance.take() {
944                            ::fidl_next::WireEnvelope::encode_value::<
945                                ::fidl_next::fuchsia::WireEvent,
946                                ___E,
947                            >(
948                                value, preallocated.encoder, &mut out, ()
949                            )?;
950                        } else {
951                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
952                        }
953                    }
954
955                    8 => {
956                        if let Some(value) = self.break_on_start.take() {
957                            ::fidl_next::WireEnvelope::encode_value::<
958                                ::fidl_next::fuchsia::WireEventPair,
959                                ___E,
960                            >(
961                                value, preallocated.encoder, &mut out, ()
962                            )?;
963                        } else {
964                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
965                        }
966                    }
967
968                    7 => {
969                        if let Some(value) = self.encoded_config.take() {
970                            ::fidl_next::WireEnvelope::encode_value::<
971                                ::fidl_next_fuchsia_mem::wire::Data<'static>,
972                                ___E,
973                            >(
974                                value, preallocated.encoder, &mut out, ()
975                            )?;
976                        } else {
977                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
978                        }
979                    }
980
981                    6 => {
982                        if let Some(value) = self.numbered_handles.take() {
983                            ::fidl_next::WireEnvelope::encode_value::<
984                                ::fidl_next::WireVector<
985                                    'static,
986                                    ::fidl_next_fuchsia_process::wire::HandleInfo,
987                                >,
988                                ___E,
989                            >(
990                                value, preallocated.encoder, &mut out, (128, ())
991                            )?;
992                        } else {
993                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
994                        }
995                    }
996
997                    5 => {
998                        if let Some(value) = self.runtime_dir.take() {
999                            ::fidl_next::WireEnvelope::encode_value::<
1000                                ::fidl_next::ServerEnd<
1001                                    ::fidl_next_fuchsia_io::Directory,
1002                                    ::fidl_next::fuchsia::WireChannel,
1003                                >,
1004                                ___E,
1005                            >(
1006                                value, preallocated.encoder, &mut out, ()
1007                            )?;
1008                        } else {
1009                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1010                        }
1011                    }
1012
1013                    4 => {
1014                        if let Some(value) = self.outgoing_dir.take() {
1015                            ::fidl_next::WireEnvelope::encode_value::<
1016                                ::fidl_next::ServerEnd<
1017                                    ::fidl_next_fuchsia_io::Directory,
1018                                    ::fidl_next::fuchsia::WireChannel,
1019                                >,
1020                                ___E,
1021                            >(
1022                                value, preallocated.encoder, &mut out, ()
1023                            )?;
1024                        } else {
1025                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1026                        }
1027                    }
1028
1029                    3 => {
1030                        if let Some(value) = self.ns.take() {
1031                            ::fidl_next::WireEnvelope::encode_value::<
1032                                ::fidl_next::WireVector<
1033                                    'static,
1034                                    crate::wire::ComponentNamespaceEntry<'static>,
1035                                >,
1036                                ___E,
1037                            >(
1038                                value, preallocated.encoder, &mut out, (32, ())
1039                            )?;
1040                        } else {
1041                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1042                        }
1043                    }
1044
1045                    2 => {
1046                        if let Some(value) = self.program.take() {
1047                            ::fidl_next::WireEnvelope::encode_value::<
1048                                ::fidl_next_fuchsia_data::wire::Dictionary<'static>,
1049                                ___E,
1050                            >(
1051                                value, preallocated.encoder, &mut out, ()
1052                            )?;
1053                        } else {
1054                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1055                        }
1056                    }
1057
1058                    1 => {
1059                        if let Some(value) = self.resolved_url.take() {
1060                            ::fidl_next::WireEnvelope::encode_value::<
1061                                ::fidl_next::WireString<'static>,
1062                                ___E,
1063                            >(
1064                                value, preallocated.encoder, &mut out, 4096
1065                            )?;
1066                        } else {
1067                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1068                        }
1069                    }
1070
1071                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1072                }
1073                unsafe {
1074                    preallocated.write_next(out.assume_init_ref());
1075                }
1076            }
1077
1078            ::fidl_next::WireTable::encode_len(table, max_ord);
1079
1080            Ok(())
1081        }
1082    }
1083
1084    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentStartInfo<'de>> for ComponentStartInfo {
1085        #[inline]
1086        fn from_wire(wire_: crate::wire::ComponentStartInfo<'de>) -> Self {
1087            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1088
1089            let resolved_url = wire_.table.get(1);
1090
1091            let program = wire_.table.get(2);
1092
1093            let ns = wire_.table.get(3);
1094
1095            let outgoing_dir = wire_.table.get(4);
1096
1097            let runtime_dir = wire_.table.get(5);
1098
1099            let numbered_handles = wire_.table.get(6);
1100
1101            let encoded_config = wire_.table.get(7);
1102
1103            let break_on_start = wire_.table.get(8);
1104
1105            let component_instance = wire_.table.get(9);
1106
1107            let escrowed_dictionary = wire_.table.get(10);
1108
1109            let escrowed_dictionary_handle = wire_.table.get(11);
1110
1111            Self {
1112
1113
1114                resolved_url: resolved_url.map(|envelope| ::fidl_next::FromWire::from_wire(
1115                    unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() }
1116                )),
1117
1118
1119                program: program.map(|envelope| ::fidl_next::FromWire::from_wire(
1120                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>() }
1121                )),
1122
1123
1124                ns: ns.map(|envelope| ::fidl_next::FromWire::from_wire(
1125                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::ComponentNamespaceEntry<'de>>>() }
1126                )),
1127
1128
1129                outgoing_dir: outgoing_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
1130                    unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::fuchsia::WireChannel>>() }
1131                )),
1132
1133
1134                runtime_dir: runtime_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
1135                    unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::fuchsia::WireChannel>>() }
1136                )),
1137
1138
1139                numbered_handles: numbered_handles.map(|envelope| ::fidl_next::FromWire::from_wire(
1140                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>() }
1141                )),
1142
1143
1144                encoded_config: encoded_config.map(|envelope| ::fidl_next::FromWire::from_wire(
1145                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_mem::wire::Data<'de>>() }
1146                )),
1147
1148
1149                break_on_start: break_on_start.map(|envelope| ::fidl_next::FromWire::from_wire(
1150                    unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>() }
1151                )),
1152
1153
1154                component_instance: component_instance.map(|envelope| ::fidl_next::FromWire::from_wire(
1155                    unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>() }
1156                )),
1157
1158
1159                escrowed_dictionary: escrowed_dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1160                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
1161                )),
1162
1163
1164                escrowed_dictionary_handle: escrowed_dictionary_handle.map(|envelope| ::fidl_next::FromWire::from_wire(
1165                    unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>() }
1166                )),
1167
1168        }
1169        }
1170    }
1171
1172    #[derive(Debug, PartialEq)]
1173    pub struct ComponentRunnerStartRequest {
1174        pub start_info: crate::natural::ComponentStartInfo,
1175
1176        pub controller:
1177            ::fidl_next::ServerEnd<crate::ComponentController, ::fidl_next::fuchsia::zx::Channel>,
1178    }
1179
1180    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>
1181        for ComponentRunnerStartRequest
1182    where
1183        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1184        ___E: ::fidl_next::Encoder,
1185        ___E: ::fidl_next::fuchsia::HandleEncoder,
1186    {
1187        #[inline]
1188        fn encode(
1189            self,
1190            encoder_: &mut ___E,
1191            out_: &mut ::core::mem::MaybeUninit<crate::wire::ComponentRunnerStartRequest<'static>>,
1192            _: (),
1193        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1194            ::fidl_next::munge! {
1195                let crate::wire::ComponentRunnerStartRequest {
1196                    start_info,
1197                    controller,
1198
1199                } = out_;
1200            }
1201
1202            ::fidl_next::Encode::encode(self.start_info, encoder_, start_info, ())?;
1203
1204            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_info.as_mut_ptr()) };
1205
1206            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1207
1208            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1209
1210            Ok(())
1211        }
1212    }
1213
1214    unsafe impl<___E>
1215        ::fidl_next::EncodeOption<
1216            ::fidl_next::WireBox<'static, crate::wire::ComponentRunnerStartRequest<'static>>,
1217            ___E,
1218        > for ComponentRunnerStartRequest
1219    where
1220        ___E: ::fidl_next::Encoder + ?Sized,
1221        ComponentRunnerStartRequest:
1222            ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>,
1223    {
1224        #[inline]
1225        fn encode_option(
1226            this: ::core::option::Option<Self>,
1227            encoder: &mut ___E,
1228            out: &mut ::core::mem::MaybeUninit<
1229                ::fidl_next::WireBox<'static, crate::wire::ComponentRunnerStartRequest<'static>>,
1230            >,
1231            _: (),
1232        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1233            if let Some(inner) = this {
1234                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1235                ::fidl_next::WireBox::encode_present(out);
1236            } else {
1237                ::fidl_next::WireBox::encode_absent(out);
1238            }
1239
1240            Ok(())
1241        }
1242    }
1243
1244    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentRunnerStartRequest<'de>>
1245        for ComponentRunnerStartRequest
1246    {
1247        #[inline]
1248        fn from_wire(wire: crate::wire::ComponentRunnerStartRequest<'de>) -> Self {
1249            Self {
1250                start_info: ::fidl_next::FromWire::from_wire(wire.start_info),
1251
1252                controller: ::fidl_next::FromWire::from_wire(wire.controller),
1253            }
1254        }
1255    }
1256
1257    #[derive(Debug, PartialEq)]
1258    #[repr(C)]
1259    pub struct TaskProviderGetJobResponse {
1260        pub job: ::fidl_next::fuchsia::zx::Job,
1261    }
1262
1263    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>
1264        for TaskProviderGetJobResponse
1265    where
1266        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1267        ___E: ::fidl_next::fuchsia::HandleEncoder,
1268    {
1269        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1270            Self,
1271            crate::wire::TaskProviderGetJobResponse,
1272        > = unsafe {
1273            ::fidl_next::CopyOptimization::enable_if(
1274                true && <::fidl_next::fuchsia::zx::Job as ::fidl_next::Encode<
1275                    ::fidl_next::fuchsia::WireJob,
1276                    ___E,
1277                >>::COPY_OPTIMIZATION
1278                    .is_enabled(),
1279            )
1280        };
1281
1282        #[inline]
1283        fn encode(
1284            self,
1285            encoder_: &mut ___E,
1286            out_: &mut ::core::mem::MaybeUninit<crate::wire::TaskProviderGetJobResponse>,
1287            _: (),
1288        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1289            ::fidl_next::munge! {
1290                let crate::wire::TaskProviderGetJobResponse {
1291                    job,
1292
1293                } = out_;
1294            }
1295
1296            ::fidl_next::Encode::encode(self.job, encoder_, job, ())?;
1297
1298            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(job.as_mut_ptr()) };
1299
1300            Ok(())
1301        }
1302    }
1303
1304    unsafe impl<___E>
1305        ::fidl_next::EncodeOption<
1306            ::fidl_next::WireBox<'static, crate::wire::TaskProviderGetJobResponse>,
1307            ___E,
1308        > for TaskProviderGetJobResponse
1309    where
1310        ___E: ::fidl_next::Encoder + ?Sized,
1311        TaskProviderGetJobResponse:
1312            ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>,
1313    {
1314        #[inline]
1315        fn encode_option(
1316            this: ::core::option::Option<Self>,
1317            encoder: &mut ___E,
1318            out: &mut ::core::mem::MaybeUninit<
1319                ::fidl_next::WireBox<'static, crate::wire::TaskProviderGetJobResponse>,
1320            >,
1321            _: (),
1322        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1323            if let Some(inner) = this {
1324                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1325                ::fidl_next::WireBox::encode_present(out);
1326            } else {
1327                ::fidl_next::WireBox::encode_absent(out);
1328            }
1329
1330            Ok(())
1331        }
1332    }
1333
1334    impl ::fidl_next::FromWire<crate::wire::TaskProviderGetJobResponse> for TaskProviderGetJobResponse {
1335        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1336            crate::wire::TaskProviderGetJobResponse,
1337            Self,
1338        > = unsafe {
1339            ::fidl_next::CopyOptimization::enable_if(
1340                true && <::fidl_next::fuchsia::zx::Job as ::fidl_next::FromWire<
1341                    ::fidl_next::fuchsia::WireJob,
1342                >>::COPY_OPTIMIZATION
1343                    .is_enabled(),
1344            )
1345        };
1346
1347        #[inline]
1348        fn from_wire(wire: crate::wire::TaskProviderGetJobResponse) -> Self {
1349            Self { job: ::fidl_next::FromWire::from_wire(wire.job) }
1350        }
1351    }
1352}
1353
1354pub mod wire {
1355
1356    pub use fidl_next_common_fuchsia_component_runner::wire::*;
1357
1358    /// The wire type corresponding to [`Task`].
1359    #[repr(transparent)]
1360    pub struct Task<'de> {
1361        pub(crate) raw: ::fidl_next::RawWireUnion,
1362        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
1363    }
1364
1365    impl<'de> Drop for Task<'de> {
1366        fn drop(&mut self) {
1367            match self.raw.ordinal() {
1368                1 => {
1369                    let _ =
1370                        unsafe { self.raw.get().read_unchecked::<::fidl_next::fuchsia::WireJob>() };
1371                }
1372
1373                2 => {
1374                    let _ = unsafe {
1375                        self.raw.get().read_unchecked::<::fidl_next::fuchsia::WireProcess>()
1376                    };
1377                }
1378
1379                3 => {
1380                    let _ = unsafe {
1381                        self.raw.get().read_unchecked::<::fidl_next::fuchsia::WireThread>()
1382                    };
1383                }
1384
1385                _ => (),
1386            }
1387        }
1388    }
1389
1390    unsafe impl ::fidl_next::Wire for Task<'static> {
1391        type Owned<'de> = Task<'de>;
1392
1393        #[inline]
1394        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1395            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
1396            ::fidl_next::RawWireUnion::zero_padding(raw);
1397        }
1398    }
1399
1400    pub mod task {
1401        pub enum Ref<'de> {
1402            Job(&'de ::fidl_next::fuchsia::WireJob),
1403
1404            Process(&'de ::fidl_next::fuchsia::WireProcess),
1405
1406            Thread(&'de ::fidl_next::fuchsia::WireThread),
1407
1408            UnknownOrdinal_(u64),
1409        }
1410    }
1411
1412    impl<'de> Task<'de> {
1413        pub fn as_ref(&self) -> crate::wire::task::Ref<'_> {
1414            match self.raw.ordinal() {
1415                1 => crate::wire::task::Ref::Job(unsafe {
1416                    self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireJob>()
1417                }),
1418
1419                2 => crate::wire::task::Ref::Process(unsafe {
1420                    self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireProcess>()
1421                }),
1422
1423                3 => crate::wire::task::Ref::Thread(unsafe {
1424                    self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireThread>()
1425                }),
1426
1427                unknown => crate::wire::task::Ref::UnknownOrdinal_(unknown),
1428            }
1429        }
1430    }
1431
1432    unsafe impl<___D> ::fidl_next::Decode<___D> for Task<'static>
1433    where
1434        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1435        ___D: ::fidl_next::Decoder,
1436        ___D: ::fidl_next::fuchsia::HandleDecoder,
1437    {
1438        fn decode(
1439            mut slot: ::fidl_next::Slot<'_, Self>,
1440            decoder: &mut ___D,
1441            _: (),
1442        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1443            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
1444            match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1445                1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireJob>(
1446                    raw,
1447                    decoder,
1448                    (),
1449                )?,
1450
1451                2 => {
1452                    ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireProcess>(
1453                        raw,
1454                        decoder,
1455                        (),
1456                    )?
1457                }
1458
1459                3 => {
1460                    ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireThread>(
1461                        raw,
1462                        decoder,
1463                        (),
1464                    )?
1465                }
1466
1467                _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
1468            }
1469
1470            Ok(())
1471        }
1472    }
1473
1474    impl<'de> ::core::fmt::Debug for Task<'de> {
1475        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1476            match self.raw.ordinal() {
1477                1 => unsafe {
1478                    self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireJob>().fmt(f)
1479                },
1480                2 => unsafe {
1481                    self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireProcess>().fmt(f)
1482                },
1483                3 => unsafe {
1484                    self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireThread>().fmt(f)
1485                },
1486                _ => unsafe { ::core::hint::unreachable_unchecked() },
1487            }
1488        }
1489    }
1490
1491    impl<'de> ::fidl_next::IntoNatural for Task<'de> {
1492        type Natural = crate::natural::Task;
1493    }
1494
1495    impl ::fidl_next::Unconstrained for Task<'static> {}
1496
1497    /// The wire type corresponding to [`ComponentTasks`].
1498    #[repr(C)]
1499    pub struct ComponentTasks<'de> {
1500        pub(crate) table: ::fidl_next::WireTable<'de>,
1501    }
1502
1503    impl<'de> Drop for ComponentTasks<'de> {
1504        fn drop(&mut self) {
1505            let _ = self
1506                .table
1507                .get(1)
1508                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Task<'de>>() });
1509
1510            let _ = self
1511                .table
1512                .get(2)
1513                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Task<'de>>() });
1514        }
1515    }
1516
1517    unsafe impl ::fidl_next::Wire for ComponentTasks<'static> {
1518        type Owned<'de> = ComponentTasks<'de>;
1519
1520        #[inline]
1521        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1522            ::fidl_next::munge!(let Self { table } = out);
1523            ::fidl_next::WireTable::zero_padding(table);
1524        }
1525    }
1526
1527    unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentTasks<'static>
1528    where
1529        ___D: ::fidl_next::Decoder + ?Sized,
1530        ___D: ::fidl_next::fuchsia::HandleDecoder,
1531    {
1532        fn decode(
1533            slot: ::fidl_next::Slot<'_, Self>,
1534            decoder: &mut ___D,
1535            _: (),
1536        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1537            ::fidl_next::munge!(let Self { table } = slot);
1538
1539            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1540                match ordinal {
1541                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1542
1543                    1 => {
1544                        ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::Task<'static>>(
1545                            slot.as_mut(),
1546                            decoder,
1547                            (),
1548                        )?;
1549
1550                        Ok(())
1551                    }
1552
1553                    2 => {
1554                        ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::Task<'static>>(
1555                            slot.as_mut(),
1556                            decoder,
1557                            (),
1558                        )?;
1559
1560                        Ok(())
1561                    }
1562
1563                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1564                }
1565            })
1566        }
1567    }
1568
1569    impl<'de> ComponentTasks<'de> {
1570        pub fn component_task(&self) -> ::core::option::Option<&crate::wire::Task<'de>> {
1571            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1572        }
1573
1574        pub fn parent_task(&self) -> ::core::option::Option<&crate::wire::Task<'de>> {
1575            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1576        }
1577    }
1578
1579    impl<'de> ::core::fmt::Debug for ComponentTasks<'de> {
1580        fn fmt(
1581            &self,
1582            f: &mut ::core::fmt::Formatter<'_>,
1583        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1584            f.debug_struct("ComponentTasks")
1585                .field("component_task", &self.component_task())
1586                .field("parent_task", &self.parent_task())
1587                .finish()
1588        }
1589    }
1590
1591    impl<'de> ::fidl_next::IntoNatural for ComponentTasks<'de> {
1592        type Natural = crate::natural::ComponentTasks;
1593    }
1594
1595    impl ::fidl_next::Unconstrained for ComponentTasks<'_> {}
1596
1597    /// The wire type corresponding to [`ComponentDiagnostics`].
1598    #[repr(C)]
1599    pub struct ComponentDiagnostics<'de> {
1600        pub(crate) table: ::fidl_next::WireTable<'de>,
1601    }
1602
1603    impl<'de> Drop for ComponentDiagnostics<'de> {
1604        fn drop(&mut self) {
1605            let _ = self.table.get(1).map(|envelope| unsafe {
1606                envelope.read_unchecked::<crate::wire::ComponentTasks<'de>>()
1607            });
1608        }
1609    }
1610
1611    unsafe impl ::fidl_next::Wire for ComponentDiagnostics<'static> {
1612        type Owned<'de> = ComponentDiagnostics<'de>;
1613
1614        #[inline]
1615        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1616            ::fidl_next::munge!(let Self { table } = out);
1617            ::fidl_next::WireTable::zero_padding(table);
1618        }
1619    }
1620
1621    unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentDiagnostics<'static>
1622    where
1623        ___D: ::fidl_next::Decoder + ?Sized,
1624        ___D: ::fidl_next::fuchsia::HandleDecoder,
1625    {
1626        fn decode(
1627            slot: ::fidl_next::Slot<'_, Self>,
1628            decoder: &mut ___D,
1629            _: (),
1630        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1631            ::fidl_next::munge!(let Self { table } = slot);
1632
1633            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1634                match ordinal {
1635                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1636
1637                    1 => {
1638                        ::fidl_next::WireEnvelope::decode_as::<
1639                            ___D,
1640                            crate::wire::ComponentTasks<'static>,
1641                        >(slot.as_mut(), decoder, ())?;
1642
1643                        Ok(())
1644                    }
1645
1646                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1647                }
1648            })
1649        }
1650    }
1651
1652    impl<'de> ComponentDiagnostics<'de> {
1653        pub fn tasks(&self) -> ::core::option::Option<&crate::wire::ComponentTasks<'de>> {
1654            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1655        }
1656    }
1657
1658    impl<'de> ::core::fmt::Debug for ComponentDiagnostics<'de> {
1659        fn fmt(
1660            &self,
1661            f: &mut ::core::fmt::Formatter<'_>,
1662        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1663            f.debug_struct("ComponentDiagnostics").field("tasks", &self.tasks()).finish()
1664        }
1665    }
1666
1667    impl<'de> ::fidl_next::IntoNatural for ComponentDiagnostics<'de> {
1668        type Natural = crate::natural::ComponentDiagnostics;
1669    }
1670
1671    impl ::fidl_next::Unconstrained for ComponentDiagnostics<'_> {}
1672
1673    /// The wire type corresponding to [`ComponentControllerOnPublishDiagnosticsRequest`].
1674    #[derive(Debug)]
1675    #[repr(C)]
1676    pub struct ComponentControllerOnPublishDiagnosticsRequest<'de> {
1677        pub payload: crate::wire::ComponentDiagnostics<'de>,
1678    }
1679
1680    static_assertions::const_assert_eq!(
1681        std::mem::size_of::<ComponentControllerOnPublishDiagnosticsRequest<'_>>(),
1682        16
1683    );
1684    static_assertions::const_assert_eq!(
1685        std::mem::align_of::<ComponentControllerOnPublishDiagnosticsRequest<'_>>(),
1686        8
1687    );
1688
1689    static_assertions::const_assert_eq!(
1690        std::mem::offset_of!(ComponentControllerOnPublishDiagnosticsRequest<'_>, payload),
1691        0
1692    );
1693
1694    unsafe impl ::fidl_next::Wire for ComponentControllerOnPublishDiagnosticsRequest<'static> {
1695        type Owned<'de> = ComponentControllerOnPublishDiagnosticsRequest<'de>;
1696
1697        #[inline]
1698        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1699            ::fidl_next::munge! {
1700                let Self {
1701
1702                    payload,
1703
1704                } = &mut *out_;
1705            }
1706
1707            ::fidl_next::Wire::zero_padding(payload);
1708        }
1709    }
1710
1711    unsafe impl<___D> ::fidl_next::Decode<___D>
1712        for ComponentControllerOnPublishDiagnosticsRequest<'static>
1713    where
1714        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1715        ___D: ::fidl_next::Decoder,
1716        ___D: ::fidl_next::fuchsia::HandleDecoder,
1717    {
1718        fn decode(
1719            slot_: ::fidl_next::Slot<'_, Self>,
1720            decoder_: &mut ___D,
1721            _: (),
1722        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1723            ::fidl_next::munge! {
1724                let Self {
1725
1726                    mut payload,
1727
1728                } = slot_;
1729            }
1730
1731            let _field = payload.as_mut();
1732
1733            ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
1734
1735            Ok(())
1736        }
1737    }
1738
1739    impl<'de> ::fidl_next::IntoNatural for ComponentControllerOnPublishDiagnosticsRequest<'de> {
1740        type Natural = crate::natural::ComponentControllerOnPublishDiagnosticsRequest;
1741    }
1742
1743    impl ::fidl_next::Unconstrained for ComponentControllerOnPublishDiagnosticsRequest<'static> {}
1744
1745    /// The wire type corresponding to [`ComponentStopInfo`].
1746    #[repr(C)]
1747    pub struct ComponentStopInfo<'de> {
1748        pub(crate) table: ::fidl_next::WireTable<'de>,
1749    }
1750
1751    impl<'de> Drop for ComponentStopInfo<'de> {
1752        fn drop(&mut self) {
1753            let _ = self
1754                .table
1755                .get(1)
1756                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
1757
1758            let _ = self
1759                .table
1760                .get(2)
1761                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI64>() });
1762        }
1763    }
1764
1765    unsafe impl ::fidl_next::Wire for ComponentStopInfo<'static> {
1766        type Owned<'de> = ComponentStopInfo<'de>;
1767
1768        #[inline]
1769        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1770            ::fidl_next::munge!(let Self { table } = out);
1771            ::fidl_next::WireTable::zero_padding(table);
1772        }
1773    }
1774
1775    unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentStopInfo<'static>
1776    where
1777        ___D: ::fidl_next::Decoder + ?Sized,
1778        ___D: ::fidl_next::fuchsia::HandleDecoder,
1779    {
1780        fn decode(
1781            slot: ::fidl_next::Slot<'_, Self>,
1782            decoder: &mut ___D,
1783            _: (),
1784        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1785            ::fidl_next::munge!(let Self { table } = slot);
1786
1787            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1788                match ordinal {
1789                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1790
1791                    1 => {
1792                        ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
1793                            slot.as_mut(),
1794                            decoder,
1795                            (),
1796                        )?;
1797
1798                        Ok(())
1799                    }
1800
1801                    2 => {
1802                        ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI64>(
1803                            slot.as_mut(),
1804                            decoder,
1805                            (),
1806                        )?;
1807
1808                        Ok(())
1809                    }
1810
1811                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1812                }
1813            })
1814        }
1815    }
1816
1817    impl<'de> ComponentStopInfo<'de> {
1818        pub fn termination_status(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
1819            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1820        }
1821
1822        pub fn exit_code(&self) -> ::core::option::Option<&::fidl_next::WireI64> {
1823            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1824        }
1825    }
1826
1827    impl<'de> ::core::fmt::Debug for ComponentStopInfo<'de> {
1828        fn fmt(
1829            &self,
1830            f: &mut ::core::fmt::Formatter<'_>,
1831        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1832            f.debug_struct("ComponentStopInfo")
1833                .field("termination_status", &self.termination_status())
1834                .field("exit_code", &self.exit_code())
1835                .finish()
1836        }
1837    }
1838
1839    impl<'de> ::fidl_next::IntoNatural for ComponentStopInfo<'de> {
1840        type Natural = crate::natural::ComponentStopInfo;
1841    }
1842
1843    impl ::fidl_next::Unconstrained for ComponentStopInfo<'_> {}
1844
1845    /// The wire type corresponding to [`ComponentControllerOnEscrowRequest`].
1846    #[repr(C)]
1847    pub struct ComponentControllerOnEscrowRequest<'de> {
1848        pub(crate) table: ::fidl_next::WireTable<'de>,
1849    }
1850
1851    impl<'de> Drop for ComponentControllerOnEscrowRequest<'de> {
1852        fn drop(&mut self) {
1853            let _ = self.table.get(1).map(|envelope| unsafe {
1854                envelope.read_unchecked::<::fidl_next::ServerEnd<
1855                    ::fidl_next_fuchsia_io::Directory,
1856                    ::fidl_next::fuchsia::WireChannel,
1857                >>()
1858            });
1859
1860            let _ = self.table.get(2)
1861                .map(|envelope| unsafe {
1862                    envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
1863                });
1864
1865            let _ = self.table.get(3).map(|envelope| unsafe {
1866                envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
1867            });
1868        }
1869    }
1870
1871    unsafe impl ::fidl_next::Wire for ComponentControllerOnEscrowRequest<'static> {
1872        type Owned<'de> = ComponentControllerOnEscrowRequest<'de>;
1873
1874        #[inline]
1875        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1876            ::fidl_next::munge!(let Self { table } = out);
1877            ::fidl_next::WireTable::zero_padding(table);
1878        }
1879    }
1880
1881    unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentControllerOnEscrowRequest<'static>
1882    where
1883        ___D: ::fidl_next::Decoder + ?Sized,
1884        ___D: ::fidl_next::fuchsia::HandleDecoder,
1885    {
1886        fn decode(
1887            slot: ::fidl_next::Slot<'_, Self>,
1888            decoder: &mut ___D,
1889            _: (),
1890        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1891            ::fidl_next::munge!(let Self { table } = slot);
1892
1893            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1894                match ordinal {
1895                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1896
1897                    1 => {
1898                        ::fidl_next::WireEnvelope::decode_as::<
1899                            ___D,
1900                            ::fidl_next::ServerEnd<
1901                                ::fidl_next_fuchsia_io::Directory,
1902                                ::fidl_next::fuchsia::WireChannel,
1903                            >,
1904                        >(slot.as_mut(), decoder, ())?;
1905
1906                        Ok(())
1907                    }
1908
1909                    2 => {
1910                        ::fidl_next::WireEnvelope::decode_as::<
1911                            ___D,
1912                            ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
1913                        >(slot.as_mut(), decoder, ())?;
1914
1915                        Ok(())
1916                    }
1917
1918                    3 => {
1919                        ::fidl_next::WireEnvelope::decode_as::<
1920                            ___D,
1921                            ::fidl_next::fuchsia::WireEventPair,
1922                        >(slot.as_mut(), decoder, ())?;
1923
1924                        Ok(())
1925                    }
1926
1927                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1928                }
1929            })
1930        }
1931    }
1932
1933    impl<'de> ComponentControllerOnEscrowRequest<'de> {
1934        pub fn outgoing_dir(
1935            &self,
1936        ) -> ::core::option::Option<
1937            &::fidl_next::ServerEnd<
1938                ::fidl_next_fuchsia_io::Directory,
1939                ::fidl_next::fuchsia::WireChannel,
1940            >,
1941        > {
1942            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1943        }
1944
1945        pub fn escrowed_dictionary(
1946            &self,
1947        ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
1948        {
1949            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1950        }
1951
1952        pub fn escrowed_dictionary_handle(
1953            &self,
1954        ) -> ::core::option::Option<&::fidl_next::fuchsia::WireEventPair> {
1955            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1956        }
1957    }
1958
1959    impl<'de> ::core::fmt::Debug for ComponentControllerOnEscrowRequest<'de> {
1960        fn fmt(
1961            &self,
1962            f: &mut ::core::fmt::Formatter<'_>,
1963        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1964            f.debug_struct("ComponentControllerOnEscrowRequest")
1965                .field("outgoing_dir", &self.outgoing_dir())
1966                .field("escrowed_dictionary", &self.escrowed_dictionary())
1967                .field("escrowed_dictionary_handle", &self.escrowed_dictionary_handle())
1968                .finish()
1969        }
1970    }
1971
1972    impl<'de> ::fidl_next::IntoNatural for ComponentControllerOnEscrowRequest<'de> {
1973        type Natural = crate::natural::ComponentControllerOnEscrowRequest;
1974    }
1975
1976    impl ::fidl_next::Unconstrained for ComponentControllerOnEscrowRequest<'_> {}
1977
1978    /// The wire type corresponding to [`ComponentNamespaceEntry`].
1979    #[repr(C)]
1980    pub struct ComponentNamespaceEntry<'de> {
1981        pub(crate) table: ::fidl_next::WireTable<'de>,
1982    }
1983
1984    impl<'de> Drop for ComponentNamespaceEntry<'de> {
1985        fn drop(&mut self) {
1986            let _ = self.table.get(1).map(|envelope| unsafe {
1987                envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1988            });
1989
1990            let _ = self.table.get(2).map(|envelope| unsafe {
1991                envelope.read_unchecked::<::fidl_next::ClientEnd<
1992                    ::fidl_next_fuchsia_io::Directory,
1993                    ::fidl_next::fuchsia::WireChannel,
1994                >>()
1995            });
1996        }
1997    }
1998
1999    unsafe impl ::fidl_next::Wire for ComponentNamespaceEntry<'static> {
2000        type Owned<'de> = ComponentNamespaceEntry<'de>;
2001
2002        #[inline]
2003        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2004            ::fidl_next::munge!(let Self { table } = out);
2005            ::fidl_next::WireTable::zero_padding(table);
2006        }
2007    }
2008
2009    unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentNamespaceEntry<'static>
2010    where
2011        ___D: ::fidl_next::Decoder + ?Sized,
2012        ___D: ::fidl_next::fuchsia::HandleDecoder,
2013    {
2014        fn decode(
2015            slot: ::fidl_next::Slot<'_, Self>,
2016            decoder: &mut ___D,
2017            _: (),
2018        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2019            ::fidl_next::munge!(let Self { table } = slot);
2020
2021            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2022                match ordinal {
2023                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2024
2025                    1 => {
2026                        ::fidl_next::WireEnvelope::decode_as::<
2027                            ___D,
2028                            ::fidl_next::WireString<'static>,
2029                        >(slot.as_mut(), decoder, 4095)?;
2030
2031                        let value = unsafe {
2032                            slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
2033                        };
2034
2035                        if value.len() > 4095 {
2036                            return Err(::fidl_next::DecodeError::VectorTooLong {
2037                                size: value.len() as u64,
2038                                limit: 4095,
2039                            });
2040                        }
2041
2042                        Ok(())
2043                    }
2044
2045                    2 => {
2046                        ::fidl_next::WireEnvelope::decode_as::<
2047                            ___D,
2048                            ::fidl_next::ClientEnd<
2049                                ::fidl_next_fuchsia_io::Directory,
2050                                ::fidl_next::fuchsia::WireChannel,
2051                            >,
2052                        >(slot.as_mut(), decoder, ())?;
2053
2054                        Ok(())
2055                    }
2056
2057                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2058                }
2059            })
2060        }
2061    }
2062
2063    impl<'de> ComponentNamespaceEntry<'de> {
2064        pub fn path(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
2065            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2066        }
2067
2068        pub fn directory(
2069            &self,
2070        ) -> ::core::option::Option<
2071            &::fidl_next::ClientEnd<
2072                ::fidl_next_fuchsia_io::Directory,
2073                ::fidl_next::fuchsia::WireChannel,
2074            >,
2075        > {
2076            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2077        }
2078    }
2079
2080    impl<'de> ::core::fmt::Debug for ComponentNamespaceEntry<'de> {
2081        fn fmt(
2082            &self,
2083            f: &mut ::core::fmt::Formatter<'_>,
2084        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2085            f.debug_struct("ComponentNamespaceEntry")
2086                .field("path", &self.path())
2087                .field("directory", &self.directory())
2088                .finish()
2089        }
2090    }
2091
2092    impl<'de> ::fidl_next::IntoNatural for ComponentNamespaceEntry<'de> {
2093        type Natural = crate::natural::ComponentNamespaceEntry;
2094    }
2095
2096    impl ::fidl_next::Unconstrained for ComponentNamespaceEntry<'_> {}
2097
2098    /// The wire type corresponding to [`ComponentStartInfo`].
2099    #[repr(C)]
2100    pub struct ComponentStartInfo<'de> {
2101        pub(crate) table: ::fidl_next::WireTable<'de>,
2102    }
2103
2104    impl<'de> Drop for ComponentStartInfo<'de> {
2105        fn drop(&mut self) {
2106            let _ = self.table.get(1).map(|envelope| unsafe {
2107                envelope.read_unchecked::<::fidl_next::WireString<'de>>()
2108            });
2109
2110            let _ = self.table.get(2).map(|envelope| unsafe {
2111                envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>()
2112            });
2113
2114            let _ = self.table.get(3)
2115                .map(|envelope| unsafe {
2116                    envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::ComponentNamespaceEntry<'de>>>()
2117                });
2118
2119            let _ = self.table.get(4).map(|envelope| unsafe {
2120                envelope.read_unchecked::<::fidl_next::ServerEnd<
2121                    ::fidl_next_fuchsia_io::Directory,
2122                    ::fidl_next::fuchsia::WireChannel,
2123                >>()
2124            });
2125
2126            let _ = self.table.get(5).map(|envelope| unsafe {
2127                envelope.read_unchecked::<::fidl_next::ServerEnd<
2128                    ::fidl_next_fuchsia_io::Directory,
2129                    ::fidl_next::fuchsia::WireChannel,
2130                >>()
2131            });
2132
2133            let _ = self.table.get(6)
2134                .map(|envelope| unsafe {
2135                    envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>()
2136                });
2137
2138            let _ = self.table.get(7).map(|envelope| unsafe {
2139                envelope.read_unchecked::<::fidl_next_fuchsia_mem::wire::Data<'de>>()
2140            });
2141
2142            let _ = self.table.get(8).map(|envelope| unsafe {
2143                envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
2144            });
2145
2146            let _ = self.table.get(9).map(|envelope| unsafe {
2147                envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
2148            });
2149
2150            let _ = self.table.get(10)
2151                .map(|envelope| unsafe {
2152                    envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
2153                });
2154
2155            let _ = self.table.get(11).map(|envelope| unsafe {
2156                envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
2157            });
2158        }
2159    }
2160
2161    unsafe impl ::fidl_next::Wire for ComponentStartInfo<'static> {
2162        type Owned<'de> = ComponentStartInfo<'de>;
2163
2164        #[inline]
2165        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2166            ::fidl_next::munge!(let Self { table } = out);
2167            ::fidl_next::WireTable::zero_padding(table);
2168        }
2169    }
2170
2171    unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentStartInfo<'static>
2172    where
2173        ___D: ::fidl_next::Decoder + ?Sized,
2174        ___D: ::fidl_next::fuchsia::HandleDecoder,
2175    {
2176        fn decode(
2177            slot: ::fidl_next::Slot<'_, Self>,
2178            decoder: &mut ___D,
2179            _: (),
2180        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2181            ::fidl_next::munge!(let Self { table } = slot);
2182
2183            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2184                match ordinal {
2185                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2186
2187                    1 => {
2188                        ::fidl_next::WireEnvelope::decode_as::<
2189                            ___D,
2190                            ::fidl_next::WireString<'static>,
2191                        >(slot.as_mut(), decoder, 4096)?;
2192
2193                        let value = unsafe {
2194                            slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
2195                        };
2196
2197                        if value.len() > 4096 {
2198                            return Err(::fidl_next::DecodeError::VectorTooLong {
2199                                size: value.len() as u64,
2200                                limit: 4096,
2201                            });
2202                        }
2203
2204                        Ok(())
2205                    }
2206
2207                    2 => {
2208                        ::fidl_next::WireEnvelope::decode_as::<
2209                            ___D,
2210                            ::fidl_next_fuchsia_data::wire::Dictionary<'static>,
2211                        >(slot.as_mut(), decoder, ())?;
2212
2213                        Ok(())
2214                    }
2215
2216                    3 => {
2217                        ::fidl_next::WireEnvelope::decode_as::<
2218                            ___D,
2219                            ::fidl_next::WireVector<
2220                                'static,
2221                                crate::wire::ComponentNamespaceEntry<'static>,
2222                            >,
2223                        >(slot.as_mut(), decoder, (32, ()))?;
2224
2225                        let value = unsafe {
2226                            slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
2227                                '_,
2228                                crate::wire::ComponentNamespaceEntry<'_>,
2229                            >>()
2230                        };
2231
2232                        if value.len() > 32 {
2233                            return Err(::fidl_next::DecodeError::VectorTooLong {
2234                                size: value.len() as u64,
2235                                limit: 32,
2236                            });
2237                        }
2238
2239                        Ok(())
2240                    }
2241
2242                    4 => {
2243                        ::fidl_next::WireEnvelope::decode_as::<
2244                            ___D,
2245                            ::fidl_next::ServerEnd<
2246                                ::fidl_next_fuchsia_io::Directory,
2247                                ::fidl_next::fuchsia::WireChannel,
2248                            >,
2249                        >(slot.as_mut(), decoder, ())?;
2250
2251                        Ok(())
2252                    }
2253
2254                    5 => {
2255                        ::fidl_next::WireEnvelope::decode_as::<
2256                            ___D,
2257                            ::fidl_next::ServerEnd<
2258                                ::fidl_next_fuchsia_io::Directory,
2259                                ::fidl_next::fuchsia::WireChannel,
2260                            >,
2261                        >(slot.as_mut(), decoder, ())?;
2262
2263                        Ok(())
2264                    }
2265
2266                    6 => {
2267                        ::fidl_next::WireEnvelope::decode_as::<
2268                            ___D,
2269                            ::fidl_next::WireVector<
2270                                'static,
2271                                ::fidl_next_fuchsia_process::wire::HandleInfo,
2272                            >,
2273                        >(slot.as_mut(), decoder, (128, ()))?;
2274
2275                        let value = unsafe {
2276                            slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
2277                                '_,
2278                                ::fidl_next_fuchsia_process::wire::HandleInfo,
2279                            >>()
2280                        };
2281
2282                        if value.len() > 128 {
2283                            return Err(::fidl_next::DecodeError::VectorTooLong {
2284                                size: value.len() as u64,
2285                                limit: 128,
2286                            });
2287                        }
2288
2289                        Ok(())
2290                    }
2291
2292                    7 => {
2293                        ::fidl_next::WireEnvelope::decode_as::<
2294                            ___D,
2295                            ::fidl_next_fuchsia_mem::wire::Data<'static>,
2296                        >(slot.as_mut(), decoder, ())?;
2297
2298                        Ok(())
2299                    }
2300
2301                    8 => {
2302                        ::fidl_next::WireEnvelope::decode_as::<
2303                            ___D,
2304                            ::fidl_next::fuchsia::WireEventPair,
2305                        >(slot.as_mut(), decoder, ())?;
2306
2307                        Ok(())
2308                    }
2309
2310                    9 => {
2311                        ::fidl_next::WireEnvelope::decode_as::<
2312                            ___D,
2313                            ::fidl_next::fuchsia::WireEvent,
2314                        >(slot.as_mut(), decoder, ())?;
2315
2316                        Ok(())
2317                    }
2318
2319                    10 => {
2320                        ::fidl_next::WireEnvelope::decode_as::<
2321                            ___D,
2322                            ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
2323                        >(slot.as_mut(), decoder, ())?;
2324
2325                        Ok(())
2326                    }
2327
2328                    11 => {
2329                        ::fidl_next::WireEnvelope::decode_as::<
2330                            ___D,
2331                            ::fidl_next::fuchsia::WireEventPair,
2332                        >(slot.as_mut(), decoder, ())?;
2333
2334                        Ok(())
2335                    }
2336
2337                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2338                }
2339            })
2340        }
2341    }
2342
2343    impl<'de> ComponentStartInfo<'de> {
2344        pub fn resolved_url(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
2345            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2346        }
2347
2348        pub fn program(
2349            &self,
2350        ) -> ::core::option::Option<&::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2351            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2352        }
2353
2354        pub fn ns(
2355            &self,
2356        ) -> ::core::option::Option<
2357            &::fidl_next::WireVector<'de, crate::wire::ComponentNamespaceEntry<'de>>,
2358        > {
2359            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2360        }
2361
2362        pub fn outgoing_dir(
2363            &self,
2364        ) -> ::core::option::Option<
2365            &::fidl_next::ServerEnd<
2366                ::fidl_next_fuchsia_io::Directory,
2367                ::fidl_next::fuchsia::WireChannel,
2368            >,
2369        > {
2370            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2371        }
2372
2373        pub fn runtime_dir(
2374            &self,
2375        ) -> ::core::option::Option<
2376            &::fidl_next::ServerEnd<
2377                ::fidl_next_fuchsia_io::Directory,
2378                ::fidl_next::fuchsia::WireChannel,
2379            >,
2380        > {
2381            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2382        }
2383
2384        pub fn numbered_handles(
2385            &self,
2386        ) -> ::core::option::Option<
2387            &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
2388        > {
2389            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2390        }
2391
2392        pub fn encoded_config(
2393            &self,
2394        ) -> ::core::option::Option<&::fidl_next_fuchsia_mem::wire::Data<'de>> {
2395            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
2396        }
2397
2398        pub fn break_on_start(
2399            &self,
2400        ) -> ::core::option::Option<&::fidl_next::fuchsia::WireEventPair> {
2401            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
2402        }
2403
2404        pub fn component_instance(
2405            &self,
2406        ) -> ::core::option::Option<&::fidl_next::fuchsia::WireEvent> {
2407            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
2408        }
2409
2410        pub fn escrowed_dictionary(
2411            &self,
2412        ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
2413        {
2414            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
2415        }
2416
2417        pub fn escrowed_dictionary_handle(
2418            &self,
2419        ) -> ::core::option::Option<&::fidl_next::fuchsia::WireEventPair> {
2420            unsafe { Some(self.table.get(11)?.deref_unchecked()) }
2421        }
2422    }
2423
2424    impl<'de> ::core::fmt::Debug for ComponentStartInfo<'de> {
2425        fn fmt(
2426            &self,
2427            f: &mut ::core::fmt::Formatter<'_>,
2428        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2429            f.debug_struct("ComponentStartInfo")
2430                .field("resolved_url", &self.resolved_url())
2431                .field("program", &self.program())
2432                .field("ns", &self.ns())
2433                .field("outgoing_dir", &self.outgoing_dir())
2434                .field("runtime_dir", &self.runtime_dir())
2435                .field("numbered_handles", &self.numbered_handles())
2436                .field("encoded_config", &self.encoded_config())
2437                .field("break_on_start", &self.break_on_start())
2438                .field("component_instance", &self.component_instance())
2439                .field("escrowed_dictionary", &self.escrowed_dictionary())
2440                .field("escrowed_dictionary_handle", &self.escrowed_dictionary_handle())
2441                .finish()
2442        }
2443    }
2444
2445    impl<'de> ::fidl_next::IntoNatural for ComponentStartInfo<'de> {
2446        type Natural = crate::natural::ComponentStartInfo;
2447    }
2448
2449    impl ::fidl_next::Unconstrained for ComponentStartInfo<'_> {}
2450
2451    /// The wire type corresponding to [`ComponentRunnerStartRequest`].
2452    #[derive(Debug)]
2453    #[repr(C)]
2454    pub struct ComponentRunnerStartRequest<'de> {
2455        pub start_info: crate::wire::ComponentStartInfo<'de>,
2456
2457        pub controller:
2458            ::fidl_next::ServerEnd<crate::ComponentController, ::fidl_next::fuchsia::WireChannel>,
2459    }
2460
2461    static_assertions::const_assert_eq!(std::mem::size_of::<ComponentRunnerStartRequest<'_>>(), 24);
2462    static_assertions::const_assert_eq!(std::mem::align_of::<ComponentRunnerStartRequest<'_>>(), 8);
2463
2464    static_assertions::const_assert_eq!(
2465        std::mem::offset_of!(ComponentRunnerStartRequest<'_>, start_info),
2466        0
2467    );
2468
2469    static_assertions::const_assert_eq!(
2470        std::mem::offset_of!(ComponentRunnerStartRequest<'_>, controller),
2471        16
2472    );
2473
2474    unsafe impl ::fidl_next::Wire for ComponentRunnerStartRequest<'static> {
2475        type Owned<'de> = ComponentRunnerStartRequest<'de>;
2476
2477        #[inline]
2478        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2479            ::fidl_next::munge! {
2480                let Self {
2481
2482                    start_info,
2483                    controller,
2484
2485                } = &mut *out_;
2486            }
2487
2488            ::fidl_next::Wire::zero_padding(start_info);
2489
2490            ::fidl_next::Wire::zero_padding(controller);
2491
2492            unsafe {
2493                out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2494            }
2495        }
2496    }
2497
2498    unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentRunnerStartRequest<'static>
2499    where
2500        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2501        ___D: ::fidl_next::Decoder,
2502        ___D: ::fidl_next::fuchsia::HandleDecoder,
2503    {
2504        fn decode(
2505            slot_: ::fidl_next::Slot<'_, Self>,
2506            decoder_: &mut ___D,
2507            _: (),
2508        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2509            if slot_.as_bytes()[20..24] != [0u8; 4] {
2510                return Err(::fidl_next::DecodeError::InvalidPadding);
2511            }
2512
2513            ::fidl_next::munge! {
2514                let Self {
2515
2516                    mut start_info,
2517                    mut controller,
2518
2519                } = slot_;
2520            }
2521
2522            let _field = start_info.as_mut();
2523
2524            ::fidl_next::Decode::decode(start_info.as_mut(), decoder_, ())?;
2525
2526            let _field = controller.as_mut();
2527
2528            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
2529
2530            Ok(())
2531        }
2532    }
2533
2534    impl<'de> ::fidl_next::IntoNatural for ComponentRunnerStartRequest<'de> {
2535        type Natural = crate::natural::ComponentRunnerStartRequest;
2536    }
2537
2538    impl ::fidl_next::Unconstrained for ComponentRunnerStartRequest<'static> {}
2539
2540    /// The wire type corresponding to [`TaskProviderGetJobResponse`].
2541    #[derive(Debug)]
2542    #[repr(C)]
2543    pub struct TaskProviderGetJobResponse {
2544        pub job: ::fidl_next::fuchsia::WireJob,
2545    }
2546
2547    static_assertions::const_assert_eq!(std::mem::size_of::<TaskProviderGetJobResponse>(), 4);
2548    static_assertions::const_assert_eq!(std::mem::align_of::<TaskProviderGetJobResponse>(), 4);
2549
2550    static_assertions::const_assert_eq!(std::mem::offset_of!(TaskProviderGetJobResponse, job), 0);
2551
2552    unsafe impl ::fidl_next::Wire for TaskProviderGetJobResponse {
2553        type Owned<'de> = TaskProviderGetJobResponse;
2554
2555        #[inline]
2556        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2557            ::fidl_next::munge! {
2558                let Self {
2559
2560                    job,
2561
2562                } = &mut *out_;
2563            }
2564
2565            ::fidl_next::Wire::zero_padding(job);
2566        }
2567    }
2568
2569    unsafe impl<___D> ::fidl_next::Decode<___D> for TaskProviderGetJobResponse
2570    where
2571        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2572        ___D: ::fidl_next::fuchsia::HandleDecoder,
2573    {
2574        fn decode(
2575            slot_: ::fidl_next::Slot<'_, Self>,
2576            decoder_: &mut ___D,
2577            _: (),
2578        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2579            ::fidl_next::munge! {
2580                let Self {
2581
2582                    mut job,
2583
2584                } = slot_;
2585            }
2586
2587            let _field = job.as_mut();
2588
2589            ::fidl_next::Decode::decode(job.as_mut(), decoder_, ())?;
2590
2591            Ok(())
2592        }
2593    }
2594
2595    impl ::fidl_next::IntoNatural for TaskProviderGetJobResponse {
2596        type Natural = crate::natural::TaskProviderGetJobResponse;
2597    }
2598
2599    impl ::fidl_next::Unconstrained for TaskProviderGetJobResponse {}
2600}
2601
2602pub mod wire_optional {
2603
2604    pub use fidl_next_common_fuchsia_component_runner::wire_optional::*;
2605
2606    #[repr(transparent)]
2607    pub struct Task<'de> {
2608        pub(crate) raw: ::fidl_next::RawWireUnion,
2609        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2610    }
2611
2612    unsafe impl ::fidl_next::Wire for Task<'static> {
2613        type Owned<'de> = Task<'de>;
2614
2615        #[inline]
2616        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2617            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2618            ::fidl_next::RawWireUnion::zero_padding(raw);
2619        }
2620    }
2621
2622    impl<'de> Task<'de> {
2623        pub fn is_some(&self) -> bool {
2624            self.raw.is_some()
2625        }
2626
2627        pub fn is_none(&self) -> bool {
2628            self.raw.is_none()
2629        }
2630
2631        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Task<'de>> {
2632            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
2633        }
2634
2635        pub fn into_option(self) -> ::core::option::Option<crate::wire::Task<'de>> {
2636            if self.is_some() {
2637                Some(crate::wire::Task { raw: self.raw, _phantom: ::core::marker::PhantomData })
2638            } else {
2639                None
2640            }
2641        }
2642    }
2643
2644    unsafe impl<___D> ::fidl_next::Decode<___D> for Task<'static>
2645    where
2646        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2647        ___D: ::fidl_next::Decoder,
2648        ___D: ::fidl_next::fuchsia::HandleDecoder,
2649    {
2650        fn decode(
2651            mut slot: ::fidl_next::Slot<'_, Self>,
2652            decoder: &mut ___D,
2653            _: (),
2654        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2655            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2656            match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
2657                1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireJob>(
2658                    raw,
2659                    decoder,
2660                    (),
2661                )?,
2662
2663                2 => {
2664                    ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireProcess>(
2665                        raw,
2666                        decoder,
2667                        (),
2668                    )?
2669                }
2670
2671                3 => {
2672                    ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireThread>(
2673                        raw,
2674                        decoder,
2675                        (),
2676                    )?
2677                }
2678
2679                0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
2680                _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
2681            }
2682
2683            Ok(())
2684        }
2685    }
2686
2687    impl<'de> ::core::fmt::Debug for Task<'de> {
2688        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2689            self.as_ref().fmt(f)
2690        }
2691    }
2692
2693    impl<'de> ::fidl_next::IntoNatural for Task<'de> {
2694        type Natural = ::core::option::Option<crate::natural::Task>;
2695    }
2696
2697    impl ::fidl_next::Unconstrained for Task<'static> {}
2698}
2699
2700pub mod generic {
2701
2702    pub use fidl_next_common_fuchsia_component_runner::generic::*;
2703
2704    pub struct ComponentControllerOnPublishDiagnosticsRequest<T0> {
2705        pub payload: T0,
2706    }
2707
2708    unsafe impl<___E, T0>
2709        ::fidl_next::Encode<
2710            crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
2711            ___E,
2712        > for ComponentControllerOnPublishDiagnosticsRequest<T0>
2713    where
2714        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2715        ___E: ::fidl_next::Encoder,
2716        ___E: ::fidl_next::fuchsia::HandleEncoder,
2717        T0: ::fidl_next::Encode<crate::wire::ComponentDiagnostics<'static>, ___E>,
2718    {
2719        #[inline]
2720        fn encode(
2721            self,
2722            encoder_: &mut ___E,
2723            out_: &mut ::core::mem::MaybeUninit<
2724                crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
2725            >,
2726            _: (),
2727        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2728            ::fidl_next::munge! {
2729                let crate::wire::ComponentControllerOnPublishDiagnosticsRequest {
2730
2731                    payload,
2732
2733                } = out_;
2734            }
2735
2736            ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
2737
2738            Ok(())
2739        }
2740    }
2741
2742    pub struct ComponentRunnerStartRequest<T0, T1> {
2743        pub start_info: T0,
2744
2745        pub controller: T1,
2746    }
2747
2748    unsafe impl<___E, T0, T1>
2749        ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>
2750        for ComponentRunnerStartRequest<T0, T1>
2751    where
2752        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2753        ___E: ::fidl_next::Encoder,
2754        ___E: ::fidl_next::fuchsia::HandleEncoder,
2755        T0: ::fidl_next::Encode<crate::wire::ComponentStartInfo<'static>, ___E>,
2756        T1: ::fidl_next::Encode<
2757                ::fidl_next::ServerEnd<
2758                    crate::ComponentController,
2759                    ::fidl_next::fuchsia::WireChannel,
2760                >,
2761                ___E,
2762            >,
2763    {
2764        #[inline]
2765        fn encode(
2766            self,
2767            encoder_: &mut ___E,
2768            out_: &mut ::core::mem::MaybeUninit<crate::wire::ComponentRunnerStartRequest<'static>>,
2769            _: (),
2770        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2771            ::fidl_next::munge! {
2772                let crate::wire::ComponentRunnerStartRequest {
2773
2774                    start_info,
2775                    controller,
2776
2777                } = out_;
2778            }
2779
2780            ::fidl_next::Encode::encode(self.start_info, encoder_, start_info, ())?;
2781
2782            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
2783
2784            Ok(())
2785        }
2786    }
2787
2788    pub struct TaskProviderGetJobResponse<T0> {
2789        pub job: T0,
2790    }
2791
2792    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>
2793        for TaskProviderGetJobResponse<T0>
2794    where
2795        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2796        ___E: ::fidl_next::fuchsia::HandleEncoder,
2797        T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireJob, ___E>,
2798    {
2799        #[inline]
2800        fn encode(
2801            self,
2802            encoder_: &mut ___E,
2803            out_: &mut ::core::mem::MaybeUninit<crate::wire::TaskProviderGetJobResponse>,
2804            _: (),
2805        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2806            ::fidl_next::munge! {
2807                let crate::wire::TaskProviderGetJobResponse {
2808
2809                    job,
2810
2811                } = out_;
2812            }
2813
2814            ::fidl_next::Encode::encode(self.job, encoder_, job, ())?;
2815
2816            Ok(())
2817        }
2818    }
2819}
2820
2821pub use self::natural::*;
2822
2823/// The type corresponding to the ComponentController protocol.
2824#[doc = " A protocol for binding and controlling the lifetime of a component instance\n started using `ComponentRunner.Start()`. The component manager is the\n intended direct client of this protocol.\n\n When the controlled component instance terminates or becomes inaccessible\n for any reason, the server closes the connection with an epitaph.\n\n # Lifecycle\n\n A component may exist in one of two states: `Started`, or `Stopped`. The\n component is `Started` from the time `ComponentRunner.Start()` is called\n until the ComponentRunner closes the ComponentController handle. The\n component then transitions to `Stopped`.\n\n Component manager uses ComponentController to terminate a component in two\n steps:\n\n 1.  Component manager calls `Stop()` to indicate that the ComponentRunner\n     should stop a component\'s execution and send the `OnStop` event.\n 2.  If after some time the ComponentController is not closed, component\n     manager calls `Kill()` to indicate that the ComponentRunner must halt a\n     component\'s execution immediately, and then send the `OnStop` event.\n     The component manager may wait some period of time after calling `Kill()`\n     before sending `OnStop`, but makes no guarantees it will wait or for how long.\n\n Component manager first waits for the ComponentController to close, and\n then tears down the namespace it hosts for the stopped component. Component\n manager may call `Kill()` without first having called `Stop()`.\n\n Before stopping, a component can optionally use `OnEscrow` to store some\n state in the framework, to receive those state again the next time it is\n started.\n\n When the component stops, the runner should send an `OnStop` event\n instead of just closing the channel, to report the component\'s termination status\n (see below) and (optionally) an exit code. Once the runner has sent `OnStop`\n it is free to close [ComponentRunner]; the component framework will close\n its end of the channel when it receives this event.\n\n ## Legacy\n\n Instead of sending `OnStop`, it is also legal for a runner to close the channel\n with with an epitaph equal to the termination status, but this is a legacy method\n for backward compatibility that\'s no longer recommended.\n\n # Termination status\n\n The termination status indicates the component\'s final disposition in the eyes of\n the runner.\n\n Note that termination status is _not_ synonymous with a component\'s exit code.\n A component\'s exit code, which is optional for a runner to report, is an\n integer that represents the program\'s own return code. For example, for ELF\n components, it is the value returned by main(). The termination status is\n the _runner_\'s status code for the component\'s termination, which may capture\n failure modes that occur in the context of the runner itself rather than the\n program.\n\n The following termination statuses may be sent by the server on error:\n\n - `ZX_OK`: The component exited successfully, typically because the\n   component was asked to stop or it decided independently to exit.\n - `INVALID_ARGUMENTS`:\n     * `start_info.resolved_url` is not supported by this\n       runner;\n     * `start_info` contains missing or invalid arguments.\n - `INSTANCE_CANNOT_START`: The runner could not start the component.\n   For example, a critical part of the program could not be found or\n   loaded, or the referenced binary was invalid for this runner.\n - `RESOURCE_UNAVAILABLE`: The component could not be launched due to\n   lack of resources.\n - `INTERNAL`: An unexpected internal runner error was encountered.\n - `INSTANCE_DIED`: The component instance was started but\n   subsequently terminated with an error.\n - Other status codes (e.g. `ZX_ERR_PEER_CLOSED`) may indicate a failure\n   of the component runner itself. The component manager may respond to such\n   failures by terminating the component runner\'s job to ensure system\n   stability.\n"]
2825#[derive(PartialEq, Debug)]
2826pub struct ComponentController;
2827
2828#[cfg(target_os = "fuchsia")]
2829impl ::fidl_next::HasTransport for ComponentController {
2830    type Transport = ::fidl_next::fuchsia::zx::Channel;
2831}
2832
2833pub mod component_controller {
2834    pub mod prelude {
2835        pub use crate::{
2836            ComponentController, ComponentControllerClientHandler,
2837            ComponentControllerServerHandler, component_controller,
2838        };
2839
2840        pub use crate::natural::ComponentControllerOnEscrowRequest;
2841
2842        pub use crate::natural::ComponentControllerOnPublishDiagnosticsRequest;
2843
2844        pub use crate::natural::ComponentStopInfo;
2845    }
2846
2847    pub struct Stop;
2848
2849    impl ::fidl_next::Method for Stop {
2850        const ORDINAL: u64 = 4804506821232171874;
2851        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2852            ::fidl_next::protocol::Flexibility::Strict;
2853
2854        type Protocol = crate::ComponentController;
2855
2856        type Request = ();
2857    }
2858
2859    pub struct Kill;
2860
2861    impl ::fidl_next::Method for Kill {
2862        const ORDINAL: u64 = 4514346391631670964;
2863        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2864            ::fidl_next::protocol::Flexibility::Strict;
2865
2866        type Protocol = crate::ComponentController;
2867
2868        type Request = ();
2869    }
2870
2871    pub struct OnPublishDiagnostics;
2872
2873    impl ::fidl_next::Method for OnPublishDiagnostics {
2874        const ORDINAL: u64 = 2240216199992207687;
2875        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2876            ::fidl_next::protocol::Flexibility::Strict;
2877
2878        type Protocol = crate::ComponentController;
2879
2880        type Request = crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>;
2881    }
2882
2883    pub struct OnEscrow;
2884
2885    impl ::fidl_next::Method for OnEscrow {
2886        const ORDINAL: u64 = 730448769712342012;
2887        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2888            ::fidl_next::protocol::Flexibility::Flexible;
2889
2890        type Protocol = crate::ComponentController;
2891
2892        type Request = crate::wire::ComponentControllerOnEscrowRequest<'static>;
2893    }
2894
2895    pub struct OnStop;
2896
2897    impl ::fidl_next::Method for OnStop {
2898        const ORDINAL: u64 = 4322651556509354674;
2899        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2900            ::fidl_next::protocol::Flexibility::Flexible;
2901
2902        type Protocol = crate::ComponentController;
2903
2904        type Request = crate::wire::ComponentStopInfo<'static>;
2905    }
2906
2907    mod ___detail {
2908        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ComponentController
2909        where
2910            ___T: ::fidl_next::Transport,
2911        {
2912            type Client = ComponentControllerClient<___T>;
2913            type Server = ComponentControllerServer<___T>;
2914        }
2915
2916        /// The client for the `ComponentController` protocol.
2917        #[repr(transparent)]
2918        pub struct ComponentControllerClient<___T: ::fidl_next::Transport> {
2919            #[allow(dead_code)]
2920            client: ::fidl_next::protocol::Client<___T>,
2921        }
2922
2923        impl<___T> ComponentControllerClient<___T>
2924        where
2925            ___T: ::fidl_next::Transport,
2926        {
2927            #[doc = " Request to stop the component instance.\n\n After stopping the component instance, the server should close this\n connection with an epitaph. After the connection\n closes, component manager considers this component instance to be\n Stopped and the component\'s namespace will be torn down.\n"]
2928            pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
2929                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2930                    4804506821232171874,
2931                    <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
2932                    (),
2933                ))
2934            }
2935
2936            #[doc = " Stop this component instance immediately.\n\n The ComponentRunner must immediately kill the component instance, and\n then close this connection with an epitaph. After the connection\n closes, component manager considers this component instance to be\n Stopped and the component\'s namespace will be torn down.\n\n In some cases Kill() may be issued before Stop(), but that is not\n guaranteed.\n"]
2937            pub fn kill(&self) -> ::fidl_next::SendFuture<'_, ___T> {
2938                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2939                    4514346391631670964,
2940                    <super::Kill as ::fidl_next::Method>::FLEXIBILITY,
2941                    (),
2942                ))
2943            }
2944        }
2945
2946        /// The server for the `ComponentController` protocol.
2947        #[repr(transparent)]
2948        pub struct ComponentControllerServer<___T: ::fidl_next::Transport> {
2949            server: ::fidl_next::protocol::Server<___T>,
2950        }
2951
2952        impl<___T> ComponentControllerServer<___T>
2953        where
2954            ___T: ::fidl_next::Transport,
2955        {
2956            #[doc = " Event for runners to publish diagnostics to the platform.\n\n This event signals to the platform that the runner for this\n component is publishing diagnostics about the runtime of the\n component. The component manager may optionally expose this data\n to clients.\n"]
2957            pub fn on_publish_diagnostics(
2958                &self,
2959
2960                payload: impl ::fidl_next::Encode<
2961                    crate::wire::ComponentDiagnostics<'static>,
2962                    <___T as ::fidl_next::Transport>::SendBuffer,
2963                >,
2964            ) -> ::fidl_next::SendFuture<'_, ___T>
2965            where
2966                <___T as ::fidl_next::Transport>::SendBuffer:
2967                    ::fidl_next::encoder::InternalHandleEncoder,
2968                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2969                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2970            {
2971                self.on_publish_diagnostics_with(
2972                    crate::generic::ComponentControllerOnPublishDiagnosticsRequest { payload },
2973                )
2974            }
2975
2976            #[doc = " Event for runners to publish diagnostics to the platform.\n\n This event signals to the platform that the runner for this\n component is publishing diagnostics about the runtime of the\n component. The component manager may optionally expose this data\n to clients.\n"]
2977
2978            pub fn on_publish_diagnostics_with<___R>(
2979                &self,
2980                request: ___R,
2981            ) -> ::fidl_next::SendFuture<'_, ___T>
2982            where
2983                ___R: ::fidl_next::Encode<
2984                        <super::OnPublishDiagnostics as ::fidl_next::Method>::Request,
2985                        <___T as ::fidl_next::Transport>::SendBuffer,
2986                    >,
2987            {
2988                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
2989                    2240216199992207687,
2990                    <super::OnPublishDiagnostics as ::fidl_next::Method>::FLEXIBILITY,
2991                    request,
2992                ))
2993            }
2994
2995            #[doc = " Store some of the component\'s state in the framework, to be redelivered\n to the component the next time it\'s started (a practice called\n \"escrowing\").\n\n When the framework receives this event, it will wait until the current\n execution of the component has finished, then start the component again\n when the `ZX_CHANNEL_READABLE` signal is observed on `outgoing_dir`.\n\n Repeated calls will replace the old escrowed value. This is discouraged.\n\n Handles escrowed via `OnEscrow` are always delivered to the next\n execution of the component.\n"]
2996
2997            pub fn on_escrow_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
2998            where
2999                ___R: ::fidl_next::Encode<
3000                        <super::OnEscrow as ::fidl_next::Method>::Request,
3001                        <___T as ::fidl_next::Transport>::SendBuffer,
3002                    >,
3003            {
3004                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3005                    730448769712342012,
3006                    <super::OnEscrow as ::fidl_next::Method>::FLEXIBILITY,
3007                    request,
3008                ))
3009            }
3010
3011            #[doc = " Report that the component has stopped, with data about its termination. This will\n cause the component to make a lifecycle transition to `Stopped`.\n\n Once the runner has sent `OnStop` it is free to close this [ComponentRunner]; the\n component framework will close its end of the channel when it receives this event.\n\n Alternatively, a runner may close the controller channel without this event to signal\n component stop, but this method is legacy and no longer recommended.\n"]
3012
3013            pub fn on_stop_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3014            where
3015                ___R: ::fidl_next::Encode<
3016                        <super::OnStop as ::fidl_next::Method>::Request,
3017                        <___T as ::fidl_next::Transport>::SendBuffer,
3018                    >,
3019            {
3020                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3021                    4322651556509354674,
3022                    <super::OnStop as ::fidl_next::Method>::FLEXIBILITY,
3023                    request,
3024                ))
3025            }
3026        }
3027    }
3028}
3029
3030/// A client handler for the ComponentController protocol.
3031///
3032/// See [`ComponentController`] for more details.
3033pub trait ComponentControllerClientHandler<
3034    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3035    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3036>
3037{
3038    #[doc = " Event for runners to publish diagnostics to the platform.\n\n This event signals to the platform that the runner for this\n component is publishing diagnostics about the runtime of the\n component. The component manager may optionally expose this data\n to clients.\n"]
3039    fn on_publish_diagnostics(
3040        &mut self,
3041
3042        request: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3043    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3044
3045    #[doc = " Store some of the component\'s state in the framework, to be redelivered\n to the component the next time it\'s started (a practice called\n \"escrowing\").\n\n When the framework receives this event, it will wait until the current\n execution of the component has finished, then start the component again\n when the `ZX_CHANNEL_READABLE` signal is observed on `outgoing_dir`.\n\n Repeated calls will replace the old escrowed value. This is discouraged.\n\n Handles escrowed via `OnEscrow` are always delivered to the next\n execution of the component.\n"]
3046    fn on_escrow(
3047        &mut self,
3048
3049        request: ::fidl_next::Request<component_controller::OnEscrow, ___T>,
3050    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3051
3052    #[doc = " Report that the component has stopped, with data about its termination. This will\n cause the component to make a lifecycle transition to `Stopped`.\n\n Once the runner has sent `OnStop` it is free to close this [ComponentRunner]; the\n component framework will close its end of the channel when it receives this event.\n\n Alternatively, a runner may close the controller channel without this event to signal\n component stop, but this method is legacy and no longer recommended.\n"]
3053    fn on_stop(
3054        &mut self,
3055
3056        request: ::fidl_next::Request<component_controller::OnStop, ___T>,
3057    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3058
3059    fn on_unknown_interaction(
3060        &mut self,
3061        ordinal: u64,
3062    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3063        ::core::future::ready(())
3064    }
3065}
3066
3067impl<___T> ComponentControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
3068where
3069    ___T: ::fidl_next::Transport,
3070{
3071    async fn on_publish_diagnostics(
3072        &mut self,
3073
3074        _: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3075    ) {
3076    }
3077
3078    async fn on_escrow(&mut self, _: ::fidl_next::Request<component_controller::OnEscrow, ___T>) {}
3079
3080    async fn on_stop(&mut self, _: ::fidl_next::Request<component_controller::OnStop, ___T>) {}
3081
3082    async fn on_unknown_interaction(&mut self, _: u64) {}
3083}
3084
3085impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ComponentController
3086where
3087    ___H: ComponentControllerClientHandler<___T> + ::core::marker::Send,
3088    ___T: ::fidl_next::Transport,
3089    <component_controller::OnPublishDiagnostics as ::fidl_next::Method>::Request:
3090        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3091    <component_controller::OnEscrow as ::fidl_next::Method>::Request:
3092        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3093    <component_controller::OnStop as ::fidl_next::Method>::Request:
3094        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3095{
3096    async fn on_event(
3097        handler: &mut ___H,
3098        ordinal: u64,
3099        flexibility: ::fidl_next::protocol::Flexibility,
3100        buffer: ___T::RecvBuffer,
3101    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3102        match ordinal {
3103            2240216199992207687 => match ::fidl_next::DecoderExt::decode(buffer) {
3104                Ok(decoded) => {
3105                    handler
3106                        .on_publish_diagnostics(::fidl_next::Request::from_decoded(decoded))
3107                        .await;
3108                    Ok(())
3109                }
3110                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3111                    ordinal: 2240216199992207687,
3112                    error,
3113                }),
3114            },
3115
3116            730448769712342012 => match ::fidl_next::DecoderExt::decode(buffer) {
3117                Ok(decoded) => {
3118                    handler.on_escrow(::fidl_next::Request::from_decoded(decoded)).await;
3119                    Ok(())
3120                }
3121                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3122                    ordinal: 730448769712342012,
3123                    error,
3124                }),
3125            },
3126
3127            4322651556509354674 => match ::fidl_next::DecoderExt::decode(buffer) {
3128                Ok(decoded) => {
3129                    handler.on_stop(::fidl_next::Request::from_decoded(decoded)).await;
3130                    Ok(())
3131                }
3132                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3133                    ordinal: 4322651556509354674,
3134                    error,
3135                }),
3136            },
3137
3138            ordinal => {
3139                handler.on_unknown_interaction(ordinal).await;
3140                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3141                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3142                } else {
3143                    Ok(())
3144                }
3145            }
3146        }
3147    }
3148}
3149
3150/// A server handler for the ComponentController protocol.
3151///
3152/// See [`ComponentController`] for more details.
3153pub trait ComponentControllerServerHandler<
3154    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3155    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3156>
3157{
3158    #[doc = " Request to stop the component instance.\n\n After stopping the component instance, the server should close this\n connection with an epitaph. After the connection\n closes, component manager considers this component instance to be\n Stopped and the component\'s namespace will be torn down.\n"]
3159    fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3160
3161    #[doc = " Stop this component instance immediately.\n\n The ComponentRunner must immediately kill the component instance, and\n then close this connection with an epitaph. After the connection\n closes, component manager considers this component instance to be\n Stopped and the component\'s namespace will be torn down.\n\n In some cases Kill() may be issued before Stop(), but that is not\n guaranteed.\n"]
3162    fn kill(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3163
3164    fn on_unknown_interaction(
3165        &mut self,
3166        ordinal: u64,
3167    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3168        ::core::future::ready(())
3169    }
3170}
3171
3172impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ComponentController
3173where
3174    ___H: ComponentControllerServerHandler<___T> + ::core::marker::Send,
3175    ___T: ::fidl_next::Transport,
3176{
3177    async fn on_one_way(
3178        handler: &mut ___H,
3179        ordinal: u64,
3180        flexibility: ::fidl_next::protocol::Flexibility,
3181        buffer: ___T::RecvBuffer,
3182    ) -> ::core::result::Result<
3183        (),
3184        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3185    > {
3186        match ordinal {
3187            4804506821232171874 => {
3188                handler.stop().await;
3189                Ok(())
3190            }
3191
3192            4514346391631670964 => {
3193                handler.kill().await;
3194                Ok(())
3195            }
3196
3197            ordinal => {
3198                handler.on_unknown_interaction(ordinal).await;
3199                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3200                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3201                } else {
3202                    Ok(())
3203                }
3204            }
3205        }
3206    }
3207
3208    async fn on_two_way(
3209        handler: &mut ___H,
3210        ordinal: u64,
3211        flexibility: ::fidl_next::protocol::Flexibility,
3212        buffer: ___T::RecvBuffer,
3213        responder: ::fidl_next::protocol::Responder<___T>,
3214    ) -> ::core::result::Result<
3215        (),
3216        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3217    > {
3218        match ordinal {
3219            ordinal => {
3220                handler.on_unknown_interaction(ordinal).await;
3221                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3222                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3223                } else {
3224                    responder
3225                        .respond(
3226                            ordinal,
3227                            flexibility,
3228                            ::fidl_next::Flexible::<()>::FrameworkErr(
3229                                ::fidl_next::FrameworkError::UnknownMethod,
3230                            ),
3231                        )
3232                        .expect("encoding a framework error should never fail")
3233                        .await?;
3234                    Ok(())
3235                }
3236            }
3237        }
3238    }
3239}
3240
3241/// The type corresponding to the ComponentRunner protocol.
3242#[doc = " A protocol used for running components.\n\n This protocol is implemented by components which provide a runtime\n environment for other components.\n\n Note: The component manager is the only intended direct client of this\n interface.\n"]
3243#[derive(PartialEq, Debug)]
3244pub struct ComponentRunner;
3245
3246impl ::fidl_next::Discoverable for ComponentRunner {
3247    const PROTOCOL_NAME: &'static str = "fuchsia.component.runner.ComponentRunner";
3248}
3249
3250#[cfg(target_os = "fuchsia")]
3251impl ::fidl_next::HasTransport for ComponentRunner {
3252    type Transport = ::fidl_next::fuchsia::zx::Channel;
3253}
3254
3255pub mod component_runner {
3256    pub mod prelude {
3257        pub use crate::{
3258            ComponentRunner, ComponentRunnerClientHandler, ComponentRunnerServerHandler,
3259            component_runner,
3260        };
3261
3262        pub use crate::natural::ComponentRunnerStartRequest;
3263    }
3264
3265    pub struct Start;
3266
3267    impl ::fidl_next::Method for Start {
3268        const ORDINAL: u64 = 780715659970866697;
3269        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3270            ::fidl_next::protocol::Flexibility::Strict;
3271
3272        type Protocol = crate::ComponentRunner;
3273
3274        type Request = crate::wire::ComponentRunnerStartRequest<'static>;
3275    }
3276
3277    mod ___detail {
3278        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ComponentRunner
3279        where
3280            ___T: ::fidl_next::Transport,
3281        {
3282            type Client = ComponentRunnerClient<___T>;
3283            type Server = ComponentRunnerServer<___T>;
3284        }
3285
3286        /// The client for the `ComponentRunner` protocol.
3287        #[repr(transparent)]
3288        pub struct ComponentRunnerClient<___T: ::fidl_next::Transport> {
3289            #[allow(dead_code)]
3290            client: ::fidl_next::protocol::Client<___T>,
3291        }
3292
3293        impl<___T> ComponentRunnerClient<___T>
3294        where
3295            ___T: ::fidl_next::Transport,
3296        {
3297            #[doc = " Start running a component instance described by `start_info`.\n\n Component manager binds and uses `controller` to control the\n lifetime of the newly started component instance.\n\n Errors are delivered as epitaphs over the `ComponentController`\n protocol. In the event of an error, the runner must ensure that\n resources are cleaned up.\n"]
3298            pub fn start(
3299                &self,
3300
3301                start_info: impl ::fidl_next::Encode<
3302                    crate::wire::ComponentStartInfo<'static>,
3303                    <___T as ::fidl_next::Transport>::SendBuffer,
3304                >,
3305
3306                controller: impl ::fidl_next::Encode<
3307                    ::fidl_next::ServerEnd<
3308                        crate::ComponentController,
3309                        ::fidl_next::fuchsia::WireChannel,
3310                    >,
3311                    <___T as ::fidl_next::Transport>::SendBuffer,
3312                >,
3313            ) -> ::fidl_next::SendFuture<'_, ___T>
3314            where
3315                <___T as ::fidl_next::Transport>::SendBuffer:
3316                    ::fidl_next::encoder::InternalHandleEncoder,
3317                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3318                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3319            {
3320                self.start_with(crate::generic::ComponentRunnerStartRequest {
3321                    start_info,
3322
3323                    controller,
3324                })
3325            }
3326
3327            #[doc = " Start running a component instance described by `start_info`.\n\n Component manager binds and uses `controller` to control the\n lifetime of the newly started component instance.\n\n Errors are delivered as epitaphs over the `ComponentController`\n protocol. In the event of an error, the runner must ensure that\n resources are cleaned up.\n"]
3328            pub fn start_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3329            where
3330                ___R: ::fidl_next::Encode<
3331                        crate::wire::ComponentRunnerStartRequest<'static>,
3332                        <___T as ::fidl_next::Transport>::SendBuffer,
3333                    >,
3334            {
3335                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3336                    780715659970866697,
3337                    <super::Start as ::fidl_next::Method>::FLEXIBILITY,
3338                    request,
3339                ))
3340            }
3341        }
3342
3343        /// The server for the `ComponentRunner` protocol.
3344        #[repr(transparent)]
3345        pub struct ComponentRunnerServer<___T: ::fidl_next::Transport> {
3346            server: ::fidl_next::protocol::Server<___T>,
3347        }
3348
3349        impl<___T> ComponentRunnerServer<___T> where ___T: ::fidl_next::Transport {}
3350    }
3351}
3352
3353/// A client handler for the ComponentRunner protocol.
3354///
3355/// See [`ComponentRunner`] for more details.
3356pub trait ComponentRunnerClientHandler<
3357    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3358    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3359>
3360{
3361    fn on_unknown_interaction(
3362        &mut self,
3363        ordinal: u64,
3364    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3365        ::core::future::ready(())
3366    }
3367}
3368
3369impl<___T> ComponentRunnerClientHandler<___T> for ::fidl_next::IgnoreEvents
3370where
3371    ___T: ::fidl_next::Transport,
3372{
3373    async fn on_unknown_interaction(&mut self, _: u64) {}
3374}
3375
3376impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ComponentRunner
3377where
3378    ___H: ComponentRunnerClientHandler<___T> + ::core::marker::Send,
3379    ___T: ::fidl_next::Transport,
3380{
3381    async fn on_event(
3382        handler: &mut ___H,
3383        ordinal: u64,
3384        flexibility: ::fidl_next::protocol::Flexibility,
3385        buffer: ___T::RecvBuffer,
3386    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3387        match ordinal {
3388            ordinal => {
3389                handler.on_unknown_interaction(ordinal).await;
3390                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3391                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3392                } else {
3393                    Ok(())
3394                }
3395            }
3396        }
3397    }
3398}
3399
3400/// A server handler for the ComponentRunner protocol.
3401///
3402/// See [`ComponentRunner`] for more details.
3403pub trait ComponentRunnerServerHandler<
3404    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3405    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3406>
3407{
3408    #[doc = " Start running a component instance described by `start_info`.\n\n Component manager binds and uses `controller` to control the\n lifetime of the newly started component instance.\n\n Errors are delivered as epitaphs over the `ComponentController`\n protocol. In the event of an error, the runner must ensure that\n resources are cleaned up.\n"]
3409    fn start(
3410        &mut self,
3411
3412        request: ::fidl_next::Request<component_runner::Start, ___T>,
3413    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3414
3415    fn on_unknown_interaction(
3416        &mut self,
3417        ordinal: u64,
3418    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3419        ::core::future::ready(())
3420    }
3421}
3422
3423impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ComponentRunner
3424where
3425    ___H: ComponentRunnerServerHandler<___T> + ::core::marker::Send,
3426    ___T: ::fidl_next::Transport,
3427    <component_runner::Start as ::fidl_next::Method>::Request:
3428        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3429{
3430    async fn on_one_way(
3431        handler: &mut ___H,
3432        ordinal: u64,
3433        flexibility: ::fidl_next::protocol::Flexibility,
3434        buffer: ___T::RecvBuffer,
3435    ) -> ::core::result::Result<
3436        (),
3437        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3438    > {
3439        match ordinal {
3440            780715659970866697 => match ::fidl_next::DecoderExt::decode(buffer) {
3441                Ok(decoded) => {
3442                    handler.start(::fidl_next::Request::from_decoded(decoded)).await;
3443                    Ok(())
3444                }
3445                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3446                    ordinal: 780715659970866697,
3447                    error,
3448                }),
3449            },
3450
3451            ordinal => {
3452                handler.on_unknown_interaction(ordinal).await;
3453                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3454                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3455                } else {
3456                    Ok(())
3457                }
3458            }
3459        }
3460    }
3461
3462    async fn on_two_way(
3463        handler: &mut ___H,
3464        ordinal: u64,
3465        flexibility: ::fidl_next::protocol::Flexibility,
3466        buffer: ___T::RecvBuffer,
3467        responder: ::fidl_next::protocol::Responder<___T>,
3468    ) -> ::core::result::Result<
3469        (),
3470        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3471    > {
3472        match ordinal {
3473            ordinal => {
3474                handler.on_unknown_interaction(ordinal).await;
3475                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3476                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3477                } else {
3478                    responder
3479                        .respond(
3480                            ordinal,
3481                            flexibility,
3482                            ::fidl_next::Flexible::<()>::FrameworkErr(
3483                                ::fidl_next::FrameworkError::UnknownMethod,
3484                            ),
3485                        )
3486                        .expect("encoding a framework error should never fail")
3487                        .await?;
3488                    Ok(())
3489                }
3490            }
3491        }
3492    }
3493}
3494
3495/// The type corresponding to the TaskProvider protocol.
3496#[doc = " Served by runners that want to make a zircon job available through their runtime directory.\n"]
3497#[derive(PartialEq, Debug)]
3498pub struct TaskProvider;
3499
3500impl ::fidl_next::Discoverable for TaskProvider {
3501    const PROTOCOL_NAME: &'static str = "fuchsia.component.runner.TaskProvider";
3502}
3503
3504#[cfg(target_os = "fuchsia")]
3505impl ::fidl_next::HasTransport for TaskProvider {
3506    type Transport = ::fidl_next::fuchsia::zx::Channel;
3507}
3508
3509pub mod task_provider {
3510    pub mod prelude {
3511        pub use crate::{
3512            TaskProvider, TaskProviderClientHandler, TaskProviderServerHandler, task_provider,
3513        };
3514
3515        pub use crate::natural::TaskProviderGetJobResponse;
3516    }
3517
3518    pub struct GetJob;
3519
3520    impl ::fidl_next::Method for GetJob {
3521        const ORDINAL: u64 = 5520468615388521389;
3522        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3523            ::fidl_next::protocol::Flexibility::Strict;
3524
3525        type Protocol = crate::TaskProvider;
3526
3527        type Request = ();
3528    }
3529
3530    impl ::fidl_next::TwoWayMethod for GetJob {
3531        type Response = ::fidl_next::WireResult<
3532            'static,
3533            crate::wire::TaskProviderGetJobResponse,
3534            ::fidl_next::WireI32,
3535        >;
3536    }
3537
3538    impl<___R> ::fidl_next::Respond<___R> for GetJob {
3539        type Output = ::core::result::Result<
3540            crate::generic::TaskProviderGetJobResponse<___R>,
3541            ::fidl_next::util::Never,
3542        >;
3543
3544        fn respond(response: ___R) -> Self::Output {
3545            ::core::result::Result::Ok(crate::generic::TaskProviderGetJobResponse { job: response })
3546        }
3547    }
3548
3549    impl<___R> ::fidl_next::RespondErr<___R> for GetJob {
3550        type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3551
3552        fn respond_err(response: ___R) -> Self::Output {
3553            ::core::result::Result::Err(response)
3554        }
3555    }
3556
3557    mod ___detail {
3558        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::TaskProvider
3559        where
3560            ___T: ::fidl_next::Transport,
3561        {
3562            type Client = TaskProviderClient<___T>;
3563            type Server = TaskProviderServer<___T>;
3564        }
3565
3566        /// The client for the `TaskProvider` protocol.
3567        #[repr(transparent)]
3568        pub struct TaskProviderClient<___T: ::fidl_next::Transport> {
3569            #[allow(dead_code)]
3570            client: ::fidl_next::protocol::Client<___T>,
3571        }
3572
3573        impl<___T> TaskProviderClient<___T>
3574        where
3575            ___T: ::fidl_next::Transport,
3576        {
3577            #[doc = " Returns a job handle for the component requested.\n\n On success, returns a handle with the same rights as the runner\'s.\n"]
3578            pub fn get_job(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetJob, ___T> {
3579                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3580                    5520468615388521389,
3581                    <super::GetJob as ::fidl_next::Method>::FLEXIBILITY,
3582                    (),
3583                ))
3584            }
3585        }
3586
3587        /// The server for the `TaskProvider` protocol.
3588        #[repr(transparent)]
3589        pub struct TaskProviderServer<___T: ::fidl_next::Transport> {
3590            server: ::fidl_next::protocol::Server<___T>,
3591        }
3592
3593        impl<___T> TaskProviderServer<___T> where ___T: ::fidl_next::Transport {}
3594    }
3595}
3596
3597/// A client handler for the TaskProvider protocol.
3598///
3599/// See [`TaskProvider`] for more details.
3600pub trait TaskProviderClientHandler<
3601    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3602    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3603>
3604{
3605    fn on_unknown_interaction(
3606        &mut self,
3607        ordinal: u64,
3608    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3609        ::core::future::ready(())
3610    }
3611}
3612
3613impl<___T> TaskProviderClientHandler<___T> for ::fidl_next::IgnoreEvents
3614where
3615    ___T: ::fidl_next::Transport,
3616{
3617    async fn on_unknown_interaction(&mut self, _: u64) {}
3618}
3619
3620impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for TaskProvider
3621where
3622    ___H: TaskProviderClientHandler<___T> + ::core::marker::Send,
3623    ___T: ::fidl_next::Transport,
3624{
3625    async fn on_event(
3626        handler: &mut ___H,
3627        ordinal: u64,
3628        flexibility: ::fidl_next::protocol::Flexibility,
3629        buffer: ___T::RecvBuffer,
3630    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3631        match ordinal {
3632            ordinal => {
3633                handler.on_unknown_interaction(ordinal).await;
3634                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3635                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3636                } else {
3637                    Ok(())
3638                }
3639            }
3640        }
3641    }
3642}
3643
3644/// A server handler for the TaskProvider protocol.
3645///
3646/// See [`TaskProvider`] for more details.
3647pub trait TaskProviderServerHandler<
3648    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3649    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3650>
3651{
3652    #[doc = " Returns a job handle for the component requested.\n\n On success, returns a handle with the same rights as the runner\'s.\n"]
3653    fn get_job(
3654        &mut self,
3655
3656        responder: ::fidl_next::Responder<task_provider::GetJob, ___T>,
3657    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3658
3659    fn on_unknown_interaction(
3660        &mut self,
3661        ordinal: u64,
3662    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3663        ::core::future::ready(())
3664    }
3665}
3666
3667impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for TaskProvider
3668where
3669    ___H: TaskProviderServerHandler<___T> + ::core::marker::Send,
3670    ___T: ::fidl_next::Transport,
3671{
3672    async fn on_one_way(
3673        handler: &mut ___H,
3674        ordinal: u64,
3675        flexibility: ::fidl_next::protocol::Flexibility,
3676        buffer: ___T::RecvBuffer,
3677    ) -> ::core::result::Result<
3678        (),
3679        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3680    > {
3681        match ordinal {
3682            ordinal => {
3683                handler.on_unknown_interaction(ordinal).await;
3684                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3685                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3686                } else {
3687                    Ok(())
3688                }
3689            }
3690        }
3691    }
3692
3693    async fn on_two_way(
3694        handler: &mut ___H,
3695        ordinal: u64,
3696        flexibility: ::fidl_next::protocol::Flexibility,
3697        buffer: ___T::RecvBuffer,
3698        responder: ::fidl_next::protocol::Responder<___T>,
3699    ) -> ::core::result::Result<
3700        (),
3701        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3702    > {
3703        match ordinal {
3704            5520468615388521389 => {
3705                let responder = ::fidl_next::Responder::from_untyped(responder);
3706
3707                handler.get_job(responder).await;
3708                Ok(())
3709            }
3710
3711            ordinal => {
3712                handler.on_unknown_interaction(ordinal).await;
3713                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3714                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3715                } else {
3716                    responder
3717                        .respond(
3718                            ordinal,
3719                            flexibility,
3720                            ::fidl_next::Flexible::<()>::FrameworkErr(
3721                                ::fidl_next::FrameworkError::UnknownMethod,
3722                            ),
3723                        )
3724                        .expect("encoding a framework error should never fail")
3725                        .await?;
3726                    Ok(())
3727                }
3728            }
3729        }
3730    }
3731}
3732
3733pub use fidl_next_common_fuchsia_component_runner::*;
3734
3735/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
3736pub mod compat {
3737
3738    pub use fidl_next_common_fuchsia_component_runner::compat::*;
3739
3740    impl ::fidl_next::CompatFrom<crate::Task> for ::fidl_fuchsia_component_runner::Task {
3741        fn compat_from(value: crate::Task) -> Self {
3742            match value {
3743                crate::Task::Job(value) => Self::Job(::fidl_next::CompatFrom::compat_from(value)),
3744
3745                crate::Task::Process(value) => {
3746                    Self::Process(::fidl_next::CompatFrom::compat_from(value))
3747                }
3748
3749                crate::Task::Thread(value) => {
3750                    Self::Thread(::fidl_next::CompatFrom::compat_from(value))
3751                }
3752
3753                crate::Task::UnknownOrdinal_(unknown_ordinal) => {
3754                    Self::__SourceBreaking { unknown_ordinal }
3755                }
3756            }
3757        }
3758    }
3759
3760    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::Task> for crate::Task {
3761        fn compat_from(value: ::fidl_fuchsia_component_runner::Task) -> Self {
3762            match value {
3763                ::fidl_fuchsia_component_runner::Task::Job(value) => {
3764                    Self::Job(::fidl_next::CompatFrom::compat_from(value))
3765                }
3766
3767                ::fidl_fuchsia_component_runner::Task::Process(value) => {
3768                    Self::Process(::fidl_next::CompatFrom::compat_from(value))
3769                }
3770
3771                ::fidl_fuchsia_component_runner::Task::Thread(value) => {
3772                    Self::Thread(::fidl_next::CompatFrom::compat_from(value))
3773                }
3774
3775                ::fidl_fuchsia_component_runner::Task::__SourceBreaking { unknown_ordinal } => {
3776                    Self::UnknownOrdinal_(unknown_ordinal)
3777                }
3778            }
3779        }
3780    }
3781
3782    impl ::fidl_next::CompatFrom<crate::ComponentTasks>
3783        for ::fidl_fuchsia_component_runner::ComponentTasks
3784    {
3785        fn compat_from(value: crate::ComponentTasks) -> Self {
3786            Self {
3787                component_task: ::fidl_next::CompatFrom::compat_from(value.component_task),
3788
3789                parent_task: ::fidl_next::CompatFrom::compat_from(value.parent_task),
3790
3791                __source_breaking: ::fidl::marker::SourceBreaking,
3792            }
3793        }
3794    }
3795
3796    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentTasks>
3797        for crate::ComponentTasks
3798    {
3799        fn compat_from(value: ::fidl_fuchsia_component_runner::ComponentTasks) -> Self {
3800            Self {
3801                component_task: ::fidl_next::CompatFrom::compat_from(value.component_task),
3802
3803                parent_task: ::fidl_next::CompatFrom::compat_from(value.parent_task),
3804            }
3805        }
3806    }
3807
3808    impl ::fidl_next::CompatFrom<crate::ComponentDiagnostics>
3809        for ::fidl_fuchsia_component_runner::ComponentDiagnostics
3810    {
3811        fn compat_from(value: crate::ComponentDiagnostics) -> Self {
3812            Self {
3813                tasks: ::fidl_next::CompatFrom::compat_from(value.tasks),
3814
3815                __source_breaking: ::fidl::marker::SourceBreaking,
3816            }
3817        }
3818    }
3819
3820    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentDiagnostics>
3821        for crate::ComponentDiagnostics
3822    {
3823        fn compat_from(value: ::fidl_fuchsia_component_runner::ComponentDiagnostics) -> Self {
3824            Self { tasks: ::fidl_next::CompatFrom::compat_from(value.tasks) }
3825        }
3826    }
3827
3828    impl ::fidl_next::CompatFrom<crate::ComponentControllerOnPublishDiagnosticsRequest>
3829        for ::fidl_fuchsia_component_runner::ComponentControllerOnPublishDiagnosticsRequest
3830    {
3831        #[inline]
3832        fn compat_from(value: crate::ComponentControllerOnPublishDiagnosticsRequest) -> Self {
3833            Self { payload: ::fidl_next::CompatFrom::compat_from(value.payload) }
3834        }
3835    }
3836
3837    impl
3838        ::fidl_next::CompatFrom<
3839            ::fidl_fuchsia_component_runner::ComponentControllerOnPublishDiagnosticsRequest,
3840        > for crate::ComponentControllerOnPublishDiagnosticsRequest
3841    {
3842        #[inline]
3843        fn compat_from(
3844            value: ::fidl_fuchsia_component_runner::ComponentControllerOnPublishDiagnosticsRequest,
3845        ) -> Self {
3846            Self { payload: ::fidl_next::CompatFrom::compat_from(value.payload) }
3847        }
3848    }
3849
3850    impl ::fidl_next::CompatFrom<crate::ComponentStopInfo>
3851        for ::fidl_fuchsia_component_runner::ComponentStopInfo
3852    {
3853        fn compat_from(value: crate::ComponentStopInfo) -> Self {
3854            Self {
3855                termination_status: ::fidl_next::CompatFrom::compat_from(value.termination_status),
3856
3857                exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
3858
3859                __source_breaking: ::fidl::marker::SourceBreaking,
3860            }
3861        }
3862    }
3863
3864    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentStopInfo>
3865        for crate::ComponentStopInfo
3866    {
3867        fn compat_from(value: ::fidl_fuchsia_component_runner::ComponentStopInfo) -> Self {
3868            Self {
3869                termination_status: ::fidl_next::CompatFrom::compat_from(value.termination_status),
3870
3871                exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
3872            }
3873        }
3874    }
3875
3876    impl ::fidl_next::CompatFrom<crate::ComponentControllerOnEscrowRequest>
3877        for ::fidl_fuchsia_component_runner::ComponentControllerOnEscrowRequest
3878    {
3879        fn compat_from(value: crate::ComponentControllerOnEscrowRequest) -> Self {
3880            Self {
3881                outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
3882
3883                escrowed_dictionary: ::fidl_next::CompatFrom::compat_from(
3884                    value.escrowed_dictionary,
3885                ),
3886
3887                escrowed_dictionary_handle: ::fidl_next::CompatFrom::compat_from(
3888                    value.escrowed_dictionary_handle,
3889                ),
3890
3891                __source_breaking: ::fidl::marker::SourceBreaking,
3892            }
3893        }
3894    }
3895
3896    impl
3897        ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentControllerOnEscrowRequest>
3898        for crate::ComponentControllerOnEscrowRequest
3899    {
3900        fn compat_from(
3901            value: ::fidl_fuchsia_component_runner::ComponentControllerOnEscrowRequest,
3902        ) -> Self {
3903            Self {
3904                outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
3905
3906                escrowed_dictionary: ::fidl_next::CompatFrom::compat_from(
3907                    value.escrowed_dictionary,
3908                ),
3909
3910                escrowed_dictionary_handle: ::fidl_next::CompatFrom::compat_from(
3911                    value.escrowed_dictionary_handle,
3912                ),
3913            }
3914        }
3915    }
3916
3917    #[cfg(target_os = "fuchsia")]
3918    /// An alias for a client over `zx::Channel` for the `ComponentController`
3919    /// protocol.
3920    pub type ComponentControllerProxy = ::fidl_next::Client<crate::ComponentController>;
3921
3922    impl ::fidl_next::CompatFrom<crate::ComponentController>
3923        for ::fidl_fuchsia_component_runner::ComponentControllerMarker
3924    {
3925        fn compat_from(_: crate::ComponentController) -> Self {
3926            Self
3927        }
3928    }
3929
3930    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentControllerMarker>
3931        for crate::ComponentController
3932    {
3933        fn compat_from(_: ::fidl_fuchsia_component_runner::ComponentControllerMarker) -> Self {
3934            Self
3935        }
3936    }
3937
3938    #[cfg(target_os = "fuchsia")]
3939
3940    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_runner::ComponentControllerProxy>
3941        for crate::ComponentController
3942    {
3943        fn client_compat_from(
3944            proxy: ::fidl_fuchsia_component_runner::ComponentControllerProxy,
3945        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
3946            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
3947            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
3948            ::fidl_next::ClientDispatcher::new(client_end)
3949        }
3950    }
3951
3952    impl ::fidl_next::CompatFrom<crate::ComponentNamespaceEntry>
3953        for ::fidl_fuchsia_component_runner::ComponentNamespaceEntry
3954    {
3955        fn compat_from(value: crate::ComponentNamespaceEntry) -> Self {
3956            Self {
3957                path: ::fidl_next::CompatFrom::compat_from(value.path),
3958
3959                directory: ::fidl_next::CompatFrom::compat_from(value.directory),
3960
3961                __source_breaking: ::fidl::marker::SourceBreaking,
3962            }
3963        }
3964    }
3965
3966    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentNamespaceEntry>
3967        for crate::ComponentNamespaceEntry
3968    {
3969        fn compat_from(value: ::fidl_fuchsia_component_runner::ComponentNamespaceEntry) -> Self {
3970            Self {
3971                path: ::fidl_next::CompatFrom::compat_from(value.path),
3972
3973                directory: ::fidl_next::CompatFrom::compat_from(value.directory),
3974            }
3975        }
3976    }
3977
3978    impl ::fidl_next::CompatFrom<crate::ComponentStartInfo>
3979        for ::fidl_fuchsia_component_runner::ComponentStartInfo
3980    {
3981        fn compat_from(value: crate::ComponentStartInfo) -> Self {
3982            Self {
3983                resolved_url: ::fidl_next::CompatFrom::compat_from(value.resolved_url),
3984
3985                program: ::fidl_next::CompatFrom::compat_from(value.program),
3986
3987                ns: ::fidl_next::CompatFrom::compat_from(value.ns),
3988
3989                outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
3990
3991                runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
3992
3993                numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
3994
3995                encoded_config: ::fidl_next::CompatFrom::compat_from(value.encoded_config),
3996
3997                break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
3998
3999                component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
4000
4001                escrowed_dictionary: ::fidl_next::CompatFrom::compat_from(
4002                    value.escrowed_dictionary,
4003                ),
4004
4005                escrowed_dictionary_handle: ::fidl_next::CompatFrom::compat_from(
4006                    value.escrowed_dictionary_handle,
4007                ),
4008
4009                __source_breaking: ::fidl::marker::SourceBreaking,
4010            }
4011        }
4012    }
4013
4014    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentStartInfo>
4015        for crate::ComponentStartInfo
4016    {
4017        fn compat_from(value: ::fidl_fuchsia_component_runner::ComponentStartInfo) -> Self {
4018            Self {
4019                resolved_url: ::fidl_next::CompatFrom::compat_from(value.resolved_url),
4020
4021                program: ::fidl_next::CompatFrom::compat_from(value.program),
4022
4023                ns: ::fidl_next::CompatFrom::compat_from(value.ns),
4024
4025                outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
4026
4027                runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
4028
4029                numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
4030
4031                encoded_config: ::fidl_next::CompatFrom::compat_from(value.encoded_config),
4032
4033                break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
4034
4035                component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
4036
4037                escrowed_dictionary: ::fidl_next::CompatFrom::compat_from(
4038                    value.escrowed_dictionary,
4039                ),
4040
4041                escrowed_dictionary_handle: ::fidl_next::CompatFrom::compat_from(
4042                    value.escrowed_dictionary_handle,
4043                ),
4044            }
4045        }
4046    }
4047
4048    impl ::fidl_next::CompatFrom<crate::ComponentRunnerStartRequest>
4049        for ::fidl_fuchsia_component_runner::ComponentRunnerStartRequest
4050    {
4051        #[inline]
4052        fn compat_from(value: crate::ComponentRunnerStartRequest) -> Self {
4053            Self {
4054                start_info: ::fidl_next::CompatFrom::compat_from(value.start_info),
4055
4056                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
4057            }
4058        }
4059    }
4060
4061    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentRunnerStartRequest>
4062        for crate::ComponentRunnerStartRequest
4063    {
4064        #[inline]
4065        fn compat_from(
4066            value: ::fidl_fuchsia_component_runner::ComponentRunnerStartRequest,
4067        ) -> Self {
4068            Self {
4069                start_info: ::fidl_next::CompatFrom::compat_from(value.start_info),
4070
4071                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
4072            }
4073        }
4074    }
4075
4076    #[cfg(target_os = "fuchsia")]
4077    /// An alias for a client over `zx::Channel` for the `ComponentRunner`
4078    /// protocol.
4079    pub type ComponentRunnerProxy = ::fidl_next::Client<crate::ComponentRunner>;
4080
4081    impl ::fidl_next::CompatFrom<crate::ComponentRunner>
4082        for ::fidl_fuchsia_component_runner::ComponentRunnerMarker
4083    {
4084        fn compat_from(_: crate::ComponentRunner) -> Self {
4085            Self
4086        }
4087    }
4088
4089    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentRunnerMarker>
4090        for crate::ComponentRunner
4091    {
4092        fn compat_from(_: ::fidl_fuchsia_component_runner::ComponentRunnerMarker) -> Self {
4093            Self
4094        }
4095    }
4096
4097    #[cfg(target_os = "fuchsia")]
4098
4099    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_runner::ComponentRunnerProxy>
4100        for crate::ComponentRunner
4101    {
4102        fn client_compat_from(
4103            proxy: ::fidl_fuchsia_component_runner::ComponentRunnerProxy,
4104        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
4105            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
4106            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
4107            ::fidl_next::ClientDispatcher::new(client_end)
4108        }
4109    }
4110
4111    impl ::fidl_next::CompatFrom<crate::TaskProviderGetJobResponse>
4112        for ::fidl_fuchsia_component_runner::TaskProviderGetJobResponse
4113    {
4114        #[inline]
4115        fn compat_from(value: crate::TaskProviderGetJobResponse) -> Self {
4116            Self { job: ::fidl_next::CompatFrom::compat_from(value.job) }
4117        }
4118    }
4119
4120    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::TaskProviderGetJobResponse>
4121        for crate::TaskProviderGetJobResponse
4122    {
4123        #[inline]
4124        fn compat_from(value: ::fidl_fuchsia_component_runner::TaskProviderGetJobResponse) -> Self {
4125            Self { job: ::fidl_next::CompatFrom::compat_from(value.job) }
4126        }
4127    }
4128
4129    #[cfg(target_os = "fuchsia")]
4130    /// An alias for a client over `zx::Channel` for the `TaskProvider`
4131    /// protocol.
4132    pub type TaskProviderProxy = ::fidl_next::Client<crate::TaskProvider>;
4133
4134    impl ::fidl_next::CompatFrom<crate::TaskProvider>
4135        for ::fidl_fuchsia_component_runner::TaskProviderMarker
4136    {
4137        fn compat_from(_: crate::TaskProvider) -> Self {
4138            Self
4139        }
4140    }
4141
4142    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::TaskProviderMarker>
4143        for crate::TaskProvider
4144    {
4145        fn compat_from(_: ::fidl_fuchsia_component_runner::TaskProviderMarker) -> Self {
4146            Self
4147        }
4148    }
4149
4150    #[cfg(target_os = "fuchsia")]
4151
4152    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_runner::TaskProviderProxy>
4153        for crate::TaskProvider
4154    {
4155        fn client_compat_from(
4156            proxy: ::fidl_fuchsia_component_runner::TaskProviderProxy,
4157        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
4158            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
4159            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
4160            ::fidl_next::ClientDispatcher::new(client_end)
4161        }
4162    }
4163}