Skip to main content

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::wire::Union::encode_as::<
47                    ___E,
48                    ::fidl_next::wire::fuchsia::Job,
49                >(value, 1, encoder, raw, ())?,
50
51                Self::Process(value) => ::fidl_next::wire::Union::encode_as::<
52                    ___E,
53                    ::fidl_next::wire::fuchsia::Process,
54                >(value, 2, encoder, raw, ())?,
55
56                Self::Thread(value) => ::fidl_next::wire::Union::encode_as::<
57                    ___E,
58                    ::fidl_next::wire::fuchsia::Thread,
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::wire::Union::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::wire::fuchsia::Job>()
102                })),
103
104                2 => Self::Process(::fidl_next::FromWire::from_wire(unsafe {
105                    wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Process>()
106                })),
107
108                3 => Self::Thread(::fidl_next::FromWire::from_wire(unsafe {
109                    wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Thread>()
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::wire::Envelope>::uninit();
175            ::fidl_next::Wire::zero_padding(&mut out);
176
177            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
178                ::fidl_next::wire::Envelope,
179            >(encoder, max_ord);
180
181            for i in 1..=max_ord {
182                match i {
183                    2 => {
184                        if let Some(value) = self.parent_task.take() {
185                            ::fidl_next::wire::Envelope::encode_value::<
186                                crate::wire::Task<'static>,
187                                ___E,
188                            >(
189                                value, preallocated.encoder, &mut out, ()
190                            )?;
191                        } else {
192                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
193                        }
194                    }
195
196                    1 => {
197                        if let Some(value) = self.component_task.take() {
198                            ::fidl_next::wire::Envelope::encode_value::<
199                                crate::wire::Task<'static>,
200                                ___E,
201                            >(
202                                value, preallocated.encoder, &mut out, ()
203                            )?;
204                        } else {
205                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
206                        }
207                    }
208
209                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
210                }
211                unsafe {
212                    preallocated.write_next(out.assume_init_ref());
213                }
214            }
215
216            ::fidl_next::wire::Table::encode_len(table, max_ord);
217
218            Ok(())
219        }
220    }
221
222    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentTasks<'de>> for ComponentTasks {
223        #[inline]
224        fn from_wire(wire_: crate::wire::ComponentTasks<'de>) -> Self {
225            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
226
227            let component_task = wire_.table.get(1);
228
229            let parent_task = wire_.table.get(2);
230
231            Self {
232                component_task: component_task.map(|envelope| {
233                    ::fidl_next::FromWire::from_wire(unsafe {
234                        envelope.read_unchecked::<crate::wire::Task<'de>>()
235                    })
236                }),
237
238                parent_task: parent_task.map(|envelope| {
239                    ::fidl_next::FromWire::from_wire(unsafe {
240                        envelope.read_unchecked::<crate::wire::Task<'de>>()
241                    })
242                }),
243            }
244        }
245    }
246
247    #[derive(Debug, Default, PartialEq)]
248    pub struct ComponentDiagnostics {
249        pub tasks: ::core::option::Option<crate::natural::ComponentTasks>,
250    }
251
252    impl ComponentDiagnostics {
253        fn __max_ordinal(&self) -> usize {
254            if self.tasks.is_some() {
255                return 1;
256            }
257
258            0
259        }
260    }
261
262    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentDiagnostics<'static>, ___E>
263        for ComponentDiagnostics
264    where
265        ___E: ::fidl_next::Encoder + ?Sized,
266        ___E: ::fidl_next::fuchsia::HandleEncoder,
267    {
268        #[inline]
269        fn encode(
270            mut self,
271            encoder: &mut ___E,
272            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentDiagnostics<'static>>,
273            _: (),
274        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
275            ::fidl_next::munge!(let crate::wire::ComponentDiagnostics { table } = out);
276
277            let max_ord = self.__max_ordinal();
278
279            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
280            ::fidl_next::Wire::zero_padding(&mut out);
281
282            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
283                ::fidl_next::wire::Envelope,
284            >(encoder, max_ord);
285
286            for i in 1..=max_ord {
287                match i {
288                    1 => {
289                        if let Some(value) = self.tasks.take() {
290                            ::fidl_next::wire::Envelope::encode_value::<
291                                crate::wire::ComponentTasks<'static>,
292                                ___E,
293                            >(
294                                value, preallocated.encoder, &mut out, ()
295                            )?;
296                        } else {
297                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
298                        }
299                    }
300
301                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
302                }
303                unsafe {
304                    preallocated.write_next(out.assume_init_ref());
305                }
306            }
307
308            ::fidl_next::wire::Table::encode_len(table, max_ord);
309
310            Ok(())
311        }
312    }
313
314    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentDiagnostics<'de>> for ComponentDiagnostics {
315        #[inline]
316        fn from_wire(wire_: crate::wire::ComponentDiagnostics<'de>) -> Self {
317            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
318
319            let tasks = wire_.table.get(1);
320
321            Self {
322                tasks: tasks.map(|envelope| {
323                    ::fidl_next::FromWire::from_wire(unsafe {
324                        envelope.read_unchecked::<crate::wire::ComponentTasks<'de>>()
325                    })
326                }),
327            }
328        }
329    }
330
331    #[derive(Debug, PartialEq)]
332    pub struct ComponentControllerOnPublishDiagnosticsRequest {
333        pub payload: crate::natural::ComponentDiagnostics,
334    }
335
336    unsafe impl<___E>
337        ::fidl_next::Encode<
338            crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
339            ___E,
340        > for ComponentControllerOnPublishDiagnosticsRequest
341    where
342        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
343        ___E: ::fidl_next::Encoder,
344        ___E: ::fidl_next::fuchsia::HandleEncoder,
345    {
346        #[inline]
347        fn encode(
348            self,
349            encoder_: &mut ___E,
350            out_: &mut ::core::mem::MaybeUninit<
351                crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
352            >,
353            _: (),
354        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
355            ::fidl_next::munge! {
356                let crate::wire::ComponentControllerOnPublishDiagnosticsRequest {
357                    payload,
358
359                } = out_;
360            }
361
362            ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
363
364            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
365
366            Ok(())
367        }
368    }
369
370    unsafe impl<___E>
371        ::fidl_next::EncodeOption<
372            ::fidl_next::wire::Box<
373                'static,
374                crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
375            >,
376            ___E,
377        > for ComponentControllerOnPublishDiagnosticsRequest
378    where
379        ___E: ::fidl_next::Encoder + ?Sized,
380        ComponentControllerOnPublishDiagnosticsRequest: ::fidl_next::Encode<
381                crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
382                ___E,
383            >,
384    {
385        #[inline]
386        fn encode_option(
387            this: ::core::option::Option<Self>,
388            encoder: &mut ___E,
389            out: &mut ::core::mem::MaybeUninit<
390                ::fidl_next::wire::Box<
391                    'static,
392                    crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
393                >,
394            >,
395            _: (),
396        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
397            if let Some(inner) = this {
398                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
399                ::fidl_next::wire::Box::encode_present(out);
400            } else {
401                ::fidl_next::wire::Box::encode_absent(out);
402            }
403
404            Ok(())
405        }
406    }
407
408    impl<'de>
409        ::fidl_next::FromWire<crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>>
410        for ComponentControllerOnPublishDiagnosticsRequest
411    {
412        #[inline]
413        fn from_wire(
414            wire: crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>,
415        ) -> Self {
416            Self { payload: ::fidl_next::FromWire::from_wire(wire.payload) }
417        }
418    }
419
420    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
421    pub struct ComponentStopInfo {
422        pub termination_status:
423            ::core::option::Option<::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>>,
424
425        pub exit_code: ::core::option::Option<i64>,
426    }
427
428    impl ComponentStopInfo {
429        fn __max_ordinal(&self) -> usize {
430            if self.exit_code.is_some() {
431                return 2;
432            }
433
434            if self.termination_status.is_some() {
435                return 1;
436            }
437
438            0
439        }
440    }
441
442    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentStopInfo<'static>, ___E>
443        for ComponentStopInfo
444    where
445        ___E: ::fidl_next::Encoder + ?Sized,
446        ___E: ::fidl_next::fuchsia::HandleEncoder,
447    {
448        #[inline]
449        fn encode(
450            mut self,
451            encoder: &mut ___E,
452            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentStopInfo<'static>>,
453            _: (),
454        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
455            ::fidl_next::munge!(let crate::wire::ComponentStopInfo { table } = out);
456
457            let max_ord = self.__max_ordinal();
458
459            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
460            ::fidl_next::Wire::zero_padding(&mut out);
461
462            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
463                ::fidl_next::wire::Envelope,
464            >(encoder, max_ord);
465
466            for i in 1..=max_ord {
467                match i {
468                    2 => {
469                        if let Some(value) = self.exit_code.take() {
470                            ::fidl_next::wire::Envelope::encode_value::<
471                                ::fidl_next::wire::Int64,
472                                ___E,
473                            >(
474                                value, preallocated.encoder, &mut out, ()
475                            )?;
476                        } else {
477                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
478                        }
479                    }
480
481                    1 => {
482                        if let Some(value) = self.termination_status.take() {
483                            ::fidl_next::wire::Envelope::encode_value::<
484                                ::fidl_next::wire::fuchsia::StatusResult,
485                                ___E,
486                            >(
487                                value, preallocated.encoder, &mut out, ()
488                            )?;
489                        } else {
490                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
491                        }
492                    }
493
494                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
495                }
496                unsafe {
497                    preallocated.write_next(out.assume_init_ref());
498                }
499            }
500
501            ::fidl_next::wire::Table::encode_len(table, max_ord);
502
503            Ok(())
504        }
505    }
506
507    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentStopInfo<'de>> for ComponentStopInfo {
508        #[inline]
509        fn from_wire(wire_: crate::wire::ComponentStopInfo<'de>) -> Self {
510            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
511
512            let termination_status = wire_.table.get(1);
513
514            let exit_code = wire_.table.get(2);
515
516            Self {
517                termination_status: termination_status.map(|envelope| {
518                    ::fidl_next::FromWire::from_wire(unsafe {
519                        envelope.read_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
520                    })
521                }),
522
523                exit_code: exit_code.map(|envelope| {
524                    ::fidl_next::FromWire::from_wire(unsafe {
525                        envelope.read_unchecked::<::fidl_next::wire::Int64>()
526                    })
527                }),
528            }
529        }
530    }
531
532    #[derive(Debug, Default, PartialEq)]
533    pub struct ComponentControllerOnEscrowRequest {
534        pub outgoing_dir: ::core::option::Option<
535            ::fidl_next::ServerEnd<
536                ::fidl_next_fuchsia_io::Directory,
537                ::fidl_next::fuchsia::zx::Channel,
538            >,
539        >,
540
541        pub escrowed_dictionary:
542            ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
543
544        pub escrowed_dictionary_handle: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
545
546        pub recoverable_bytes: ::core::option::Option<u64>,
547    }
548
549    impl ComponentControllerOnEscrowRequest {
550        fn __max_ordinal(&self) -> usize {
551            if self.recoverable_bytes.is_some() {
552                return 4;
553            }
554
555            if self.escrowed_dictionary_handle.is_some() {
556                return 3;
557            }
558
559            if self.escrowed_dictionary.is_some() {
560                return 2;
561            }
562
563            if self.outgoing_dir.is_some() {
564                return 1;
565            }
566
567            0
568        }
569    }
570
571    unsafe impl<___E>
572        ::fidl_next::Encode<crate::wire::ComponentControllerOnEscrowRequest<'static>, ___E>
573        for ComponentControllerOnEscrowRequest
574    where
575        ___E: ::fidl_next::Encoder + ?Sized,
576        ___E: ::fidl_next::fuchsia::HandleEncoder,
577    {
578        #[inline]
579        fn encode(
580            mut self,
581            encoder: &mut ___E,
582            out: &mut ::core::mem::MaybeUninit<
583                crate::wire::ComponentControllerOnEscrowRequest<'static>,
584            >,
585            _: (),
586        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
587            ::fidl_next::munge!(let crate::wire::ComponentControllerOnEscrowRequest { table } = out);
588
589            let max_ord = self.__max_ordinal();
590
591            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
592            ::fidl_next::Wire::zero_padding(&mut out);
593
594            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
595                ::fidl_next::wire::Envelope,
596            >(encoder, max_ord);
597
598            for i in 1..=max_ord {
599                match i {
600                    4 => {
601                        if let Some(value) = self.recoverable_bytes.take() {
602                            ::fidl_next::wire::Envelope::encode_value::<
603                                ::fidl_next::wire::Uint64,
604                                ___E,
605                            >(
606                                value, preallocated.encoder, &mut out, ()
607                            )?;
608                        } else {
609                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
610                        }
611                    }
612
613                    3 => {
614                        if let Some(value) = self.escrowed_dictionary_handle.take() {
615                            ::fidl_next::wire::Envelope::encode_value::<
616                                ::fidl_next::wire::fuchsia::EventPair,
617                                ___E,
618                            >(
619                                value, preallocated.encoder, &mut out, ()
620                            )?;
621                        } else {
622                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
623                        }
624                    }
625
626                    2 => {
627                        if let Some(value) = self.escrowed_dictionary.take() {
628                            ::fidl_next::wire::Envelope::encode_value::<
629                                ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
630                                ___E,
631                            >(
632                                value, preallocated.encoder, &mut out, ()
633                            )?;
634                        } else {
635                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
636                        }
637                    }
638
639                    1 => {
640                        if let Some(value) = self.outgoing_dir.take() {
641                            ::fidl_next::wire::Envelope::encode_value::<
642                                ::fidl_next::ServerEnd<
643                                    ::fidl_next_fuchsia_io::Directory,
644                                    ::fidl_next::wire::fuchsia::Channel,
645                                >,
646                                ___E,
647                            >(
648                                value, preallocated.encoder, &mut out, ()
649                            )?;
650                        } else {
651                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
652                        }
653                    }
654
655                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
656                }
657                unsafe {
658                    preallocated.write_next(out.assume_init_ref());
659                }
660            }
661
662            ::fidl_next::wire::Table::encode_len(table, max_ord);
663
664            Ok(())
665        }
666    }
667
668    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentControllerOnEscrowRequest<'de>>
669        for ComponentControllerOnEscrowRequest
670    {
671        #[inline]
672        fn from_wire(wire_: crate::wire::ComponentControllerOnEscrowRequest<'de>) -> Self {
673            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
674
675            let outgoing_dir = wire_.table.get(1);
676
677            let escrowed_dictionary = wire_.table.get(2);
678
679            let escrowed_dictionary_handle = wire_.table.get(3);
680
681            let recoverable_bytes = wire_.table.get(4);
682
683            Self {
684
685
686                outgoing_dir: outgoing_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
687                    unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::wire::fuchsia::Channel>>() }
688                )),
689
690
691                escrowed_dictionary: escrowed_dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
692                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
693                )),
694
695
696                escrowed_dictionary_handle: escrowed_dictionary_handle.map(|envelope| ::fidl_next::FromWire::from_wire(
697                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>() }
698                )),
699
700
701                recoverable_bytes: recoverable_bytes.map(|envelope| ::fidl_next::FromWire::from_wire(
702                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() }
703                )),
704
705        }
706        }
707    }
708
709    #[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"]
710    #[derive(Debug, Default, PartialEq)]
711    pub struct ComponentNamespaceEntry {
712        pub path: ::core::option::Option<::std::string::String>,
713
714        pub directory: ::core::option::Option<
715            ::fidl_next::ClientEnd<
716                ::fidl_next_fuchsia_io::Directory,
717                ::fidl_next::fuchsia::zx::Channel,
718            >,
719        >,
720    }
721
722    impl ComponentNamespaceEntry {
723        fn __max_ordinal(&self) -> usize {
724            if self.directory.is_some() {
725                return 2;
726            }
727
728            if self.path.is_some() {
729                return 1;
730            }
731
732            0
733        }
734    }
735
736    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentNamespaceEntry<'static>, ___E>
737        for ComponentNamespaceEntry
738    where
739        ___E: ::fidl_next::Encoder + ?Sized,
740        ___E: ::fidl_next::fuchsia::HandleEncoder,
741    {
742        #[inline]
743        fn encode(
744            mut self,
745            encoder: &mut ___E,
746            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentNamespaceEntry<'static>>,
747            _: (),
748        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
749            ::fidl_next::munge!(let crate::wire::ComponentNamespaceEntry { table } = out);
750
751            let max_ord = self.__max_ordinal();
752
753            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
754            ::fidl_next::Wire::zero_padding(&mut out);
755
756            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
757                ::fidl_next::wire::Envelope,
758            >(encoder, max_ord);
759
760            for i in 1..=max_ord {
761                match i {
762                    2 => {
763                        if let Some(value) = self.directory.take() {
764                            ::fidl_next::wire::Envelope::encode_value::<
765                                ::fidl_next::ClientEnd<
766                                    ::fidl_next_fuchsia_io::Directory,
767                                    ::fidl_next::wire::fuchsia::Channel,
768                                >,
769                                ___E,
770                            >(
771                                value, preallocated.encoder, &mut out, ()
772                            )?;
773                        } else {
774                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
775                        }
776                    }
777
778                    1 => {
779                        if let Some(value) = self.path.take() {
780                            ::fidl_next::wire::Envelope::encode_value::<
781                                ::fidl_next::wire::String<'static>,
782                                ___E,
783                            >(
784                                value, preallocated.encoder, &mut out, 4095
785                            )?;
786                        } else {
787                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
788                        }
789                    }
790
791                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
792                }
793                unsafe {
794                    preallocated.write_next(out.assume_init_ref());
795                }
796            }
797
798            ::fidl_next::wire::Table::encode_len(table, max_ord);
799
800            Ok(())
801        }
802    }
803
804    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentNamespaceEntry<'de>>
805        for ComponentNamespaceEntry
806    {
807        #[inline]
808        fn from_wire(wire_: crate::wire::ComponentNamespaceEntry<'de>) -> Self {
809            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
810
811            let path = wire_.table.get(1);
812
813            let directory = wire_.table.get(2);
814
815            Self {
816                path: path.map(|envelope| {
817                    ::fidl_next::FromWire::from_wire(unsafe {
818                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
819                    })
820                }),
821
822                directory: directory.map(|envelope| {
823                    ::fidl_next::FromWire::from_wire(unsafe {
824                        envelope.read_unchecked::<::fidl_next::ClientEnd<
825                            ::fidl_next_fuchsia_io::Directory,
826                            ::fidl_next::wire::fuchsia::Channel,
827                        >>()
828                    })
829                }),
830            }
831        }
832    }
833
834    #[doc = " Parameters for starting a new component instance.\n"]
835    #[derive(Debug, Default, PartialEq)]
836    pub struct ComponentStartInfo {
837        pub resolved_url: ::core::option::Option<::std::string::String>,
838
839        pub program: ::core::option::Option<::fidl_next_fuchsia_data::natural::Dictionary>,
840
841        pub ns: ::core::option::Option<::std::vec::Vec<crate::natural::ComponentNamespaceEntry>>,
842
843        pub outgoing_dir: ::core::option::Option<
844            ::fidl_next::ServerEnd<
845                ::fidl_next_fuchsia_io::Directory,
846                ::fidl_next::fuchsia::zx::Channel,
847            >,
848        >,
849
850        pub runtime_dir: ::core::option::Option<
851            ::fidl_next::ServerEnd<
852                ::fidl_next_fuchsia_io::Directory,
853                ::fidl_next::fuchsia::zx::Channel,
854            >,
855        >,
856
857        pub numbered_handles: ::core::option::Option<
858            ::std::vec::Vec<::fidl_next_fuchsia_process::natural::HandleInfo>,
859        >,
860
861        pub encoded_config: ::core::option::Option<::fidl_next_fuchsia_mem::natural::Data>,
862
863        pub break_on_start: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
864
865        pub component_instance: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
866
867        pub escrowed_dictionary:
868            ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
869
870        pub escrowed_dictionary_handle: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
871    }
872
873    impl ComponentStartInfo {
874        fn __max_ordinal(&self) -> usize {
875            if self.escrowed_dictionary_handle.is_some() {
876                return 11;
877            }
878
879            if self.escrowed_dictionary.is_some() {
880                return 10;
881            }
882
883            if self.component_instance.is_some() {
884                return 9;
885            }
886
887            if self.break_on_start.is_some() {
888                return 8;
889            }
890
891            if self.encoded_config.is_some() {
892                return 7;
893            }
894
895            if self.numbered_handles.is_some() {
896                return 6;
897            }
898
899            if self.runtime_dir.is_some() {
900                return 5;
901            }
902
903            if self.outgoing_dir.is_some() {
904                return 4;
905            }
906
907            if self.ns.is_some() {
908                return 3;
909            }
910
911            if self.program.is_some() {
912                return 2;
913            }
914
915            if self.resolved_url.is_some() {
916                return 1;
917            }
918
919            0
920        }
921    }
922
923    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentStartInfo<'static>, ___E>
924        for ComponentStartInfo
925    where
926        ___E: ::fidl_next::Encoder + ?Sized,
927        ___E: ::fidl_next::fuchsia::HandleEncoder,
928    {
929        #[inline]
930        fn encode(
931            mut self,
932            encoder: &mut ___E,
933            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentStartInfo<'static>>,
934            _: (),
935        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
936            ::fidl_next::munge!(let crate::wire::ComponentStartInfo { table } = out);
937
938            let max_ord = self.__max_ordinal();
939
940            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
941            ::fidl_next::Wire::zero_padding(&mut out);
942
943            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
944                ::fidl_next::wire::Envelope,
945            >(encoder, max_ord);
946
947            for i in 1..=max_ord {
948                match i {
949                    11 => {
950                        if let Some(value) = self.escrowed_dictionary_handle.take() {
951                            ::fidl_next::wire::Envelope::encode_value::<
952                                ::fidl_next::wire::fuchsia::EventPair,
953                                ___E,
954                            >(
955                                value, preallocated.encoder, &mut out, ()
956                            )?;
957                        } else {
958                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
959                        }
960                    }
961
962                    10 => {
963                        if let Some(value) = self.escrowed_dictionary.take() {
964                            ::fidl_next::wire::Envelope::encode_value::<
965                                ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
966                                ___E,
967                            >(
968                                value, preallocated.encoder, &mut out, ()
969                            )?;
970                        } else {
971                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
972                        }
973                    }
974
975                    9 => {
976                        if let Some(value) = self.component_instance.take() {
977                            ::fidl_next::wire::Envelope::encode_value::<
978                                ::fidl_next::wire::fuchsia::Event,
979                                ___E,
980                            >(
981                                value, preallocated.encoder, &mut out, ()
982                            )?;
983                        } else {
984                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
985                        }
986                    }
987
988                    8 => {
989                        if let Some(value) = self.break_on_start.take() {
990                            ::fidl_next::wire::Envelope::encode_value::<
991                                ::fidl_next::wire::fuchsia::EventPair,
992                                ___E,
993                            >(
994                                value, preallocated.encoder, &mut out, ()
995                            )?;
996                        } else {
997                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
998                        }
999                    }
1000
1001                    7 => {
1002                        if let Some(value) = self.encoded_config.take() {
1003                            ::fidl_next::wire::Envelope::encode_value::<
1004                                ::fidl_next_fuchsia_mem::wire::Data<'static>,
1005                                ___E,
1006                            >(
1007                                value, preallocated.encoder, &mut out, ()
1008                            )?;
1009                        } else {
1010                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1011                        }
1012                    }
1013
1014                    6 => {
1015                        if let Some(value) = self.numbered_handles.take() {
1016                            ::fidl_next::wire::Envelope::encode_value::<
1017                                ::fidl_next::wire::Vector<
1018                                    'static,
1019                                    ::fidl_next_fuchsia_process::wire::HandleInfo,
1020                                >,
1021                                ___E,
1022                            >(
1023                                value, preallocated.encoder, &mut out, (128, ())
1024                            )?;
1025                        } else {
1026                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1027                        }
1028                    }
1029
1030                    5 => {
1031                        if let Some(value) = self.runtime_dir.take() {
1032                            ::fidl_next::wire::Envelope::encode_value::<
1033                                ::fidl_next::ServerEnd<
1034                                    ::fidl_next_fuchsia_io::Directory,
1035                                    ::fidl_next::wire::fuchsia::Channel,
1036                                >,
1037                                ___E,
1038                            >(
1039                                value, preallocated.encoder, &mut out, ()
1040                            )?;
1041                        } else {
1042                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1043                        }
1044                    }
1045
1046                    4 => {
1047                        if let Some(value) = self.outgoing_dir.take() {
1048                            ::fidl_next::wire::Envelope::encode_value::<
1049                                ::fidl_next::ServerEnd<
1050                                    ::fidl_next_fuchsia_io::Directory,
1051                                    ::fidl_next::wire::fuchsia::Channel,
1052                                >,
1053                                ___E,
1054                            >(
1055                                value, preallocated.encoder, &mut out, ()
1056                            )?;
1057                        } else {
1058                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1059                        }
1060                    }
1061
1062                    3 => {
1063                        if let Some(value) = self.ns.take() {
1064                            ::fidl_next::wire::Envelope::encode_value::<
1065                                ::fidl_next::wire::Vector<
1066                                    'static,
1067                                    crate::wire::ComponentNamespaceEntry<'static>,
1068                                >,
1069                                ___E,
1070                            >(
1071                                value, preallocated.encoder, &mut out, (32, ())
1072                            )?;
1073                        } else {
1074                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1075                        }
1076                    }
1077
1078                    2 => {
1079                        if let Some(value) = self.program.take() {
1080                            ::fidl_next::wire::Envelope::encode_value::<
1081                                ::fidl_next_fuchsia_data::wire::Dictionary<'static>,
1082                                ___E,
1083                            >(
1084                                value, preallocated.encoder, &mut out, ()
1085                            )?;
1086                        } else {
1087                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1088                        }
1089                    }
1090
1091                    1 => {
1092                        if let Some(value) = self.resolved_url.take() {
1093                            ::fidl_next::wire::Envelope::encode_value::<
1094                                ::fidl_next::wire::String<'static>,
1095                                ___E,
1096                            >(
1097                                value, preallocated.encoder, &mut out, 4096
1098                            )?;
1099                        } else {
1100                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1101                        }
1102                    }
1103
1104                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1105                }
1106                unsafe {
1107                    preallocated.write_next(out.assume_init_ref());
1108                }
1109            }
1110
1111            ::fidl_next::wire::Table::encode_len(table, max_ord);
1112
1113            Ok(())
1114        }
1115    }
1116
1117    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentStartInfo<'de>> for ComponentStartInfo {
1118        #[inline]
1119        fn from_wire(wire_: crate::wire::ComponentStartInfo<'de>) -> Self {
1120            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1121
1122            let resolved_url = wire_.table.get(1);
1123
1124            let program = wire_.table.get(2);
1125
1126            let ns = wire_.table.get(3);
1127
1128            let outgoing_dir = wire_.table.get(4);
1129
1130            let runtime_dir = wire_.table.get(5);
1131
1132            let numbered_handles = wire_.table.get(6);
1133
1134            let encoded_config = wire_.table.get(7);
1135
1136            let break_on_start = wire_.table.get(8);
1137
1138            let component_instance = wire_.table.get(9);
1139
1140            let escrowed_dictionary = wire_.table.get(10);
1141
1142            let escrowed_dictionary_handle = wire_.table.get(11);
1143
1144            Self {
1145
1146
1147                resolved_url: resolved_url.map(|envelope| ::fidl_next::FromWire::from_wire(
1148                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
1149                )),
1150
1151
1152                program: program.map(|envelope| ::fidl_next::FromWire::from_wire(
1153                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>() }
1154                )),
1155
1156
1157                ns: ns.map(|envelope| ::fidl_next::FromWire::from_wire(
1158                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ComponentNamespaceEntry<'de>>>() }
1159                )),
1160
1161
1162                outgoing_dir: outgoing_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
1163                    unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::wire::fuchsia::Channel>>() }
1164                )),
1165
1166
1167                runtime_dir: runtime_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
1168                    unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::wire::fuchsia::Channel>>() }
1169                )),
1170
1171
1172                numbered_handles: numbered_handles.map(|envelope| ::fidl_next::FromWire::from_wire(
1173                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>() }
1174                )),
1175
1176
1177                encoded_config: encoded_config.map(|envelope| ::fidl_next::FromWire::from_wire(
1178                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_mem::wire::Data<'de>>() }
1179                )),
1180
1181
1182                break_on_start: break_on_start.map(|envelope| ::fidl_next::FromWire::from_wire(
1183                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>() }
1184                )),
1185
1186
1187                component_instance: component_instance.map(|envelope| ::fidl_next::FromWire::from_wire(
1188                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>() }
1189                )),
1190
1191
1192                escrowed_dictionary: escrowed_dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1193                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
1194                )),
1195
1196
1197                escrowed_dictionary_handle: escrowed_dictionary_handle.map(|envelope| ::fidl_next::FromWire::from_wire(
1198                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>() }
1199                )),
1200
1201        }
1202        }
1203    }
1204
1205    #[derive(Debug, PartialEq)]
1206    pub struct ComponentRunnerStartRequest {
1207        pub start_info: crate::natural::ComponentStartInfo,
1208
1209        pub controller:
1210            ::fidl_next::ServerEnd<crate::ComponentController, ::fidl_next::fuchsia::zx::Channel>,
1211    }
1212
1213    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>
1214        for ComponentRunnerStartRequest
1215    where
1216        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1217        ___E: ::fidl_next::Encoder,
1218        ___E: ::fidl_next::fuchsia::HandleEncoder,
1219    {
1220        #[inline]
1221        fn encode(
1222            self,
1223            encoder_: &mut ___E,
1224            out_: &mut ::core::mem::MaybeUninit<crate::wire::ComponentRunnerStartRequest<'static>>,
1225            _: (),
1226        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1227            ::fidl_next::munge! {
1228                let crate::wire::ComponentRunnerStartRequest {
1229                    start_info,
1230                    controller,
1231
1232                } = out_;
1233            }
1234
1235            ::fidl_next::Encode::encode(self.start_info, encoder_, start_info, ())?;
1236
1237            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_info.as_mut_ptr()) };
1238
1239            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1240
1241            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1242
1243            Ok(())
1244        }
1245    }
1246
1247    unsafe impl<___E>
1248        ::fidl_next::EncodeOption<
1249            ::fidl_next::wire::Box<'static, crate::wire::ComponentRunnerStartRequest<'static>>,
1250            ___E,
1251        > for ComponentRunnerStartRequest
1252    where
1253        ___E: ::fidl_next::Encoder + ?Sized,
1254        ComponentRunnerStartRequest:
1255            ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>,
1256    {
1257        #[inline]
1258        fn encode_option(
1259            this: ::core::option::Option<Self>,
1260            encoder: &mut ___E,
1261            out: &mut ::core::mem::MaybeUninit<
1262                ::fidl_next::wire::Box<'static, crate::wire::ComponentRunnerStartRequest<'static>>,
1263            >,
1264            _: (),
1265        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1266            if let Some(inner) = this {
1267                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1268                ::fidl_next::wire::Box::encode_present(out);
1269            } else {
1270                ::fidl_next::wire::Box::encode_absent(out);
1271            }
1272
1273            Ok(())
1274        }
1275    }
1276
1277    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentRunnerStartRequest<'de>>
1278        for ComponentRunnerStartRequest
1279    {
1280        #[inline]
1281        fn from_wire(wire: crate::wire::ComponentRunnerStartRequest<'de>) -> Self {
1282            Self {
1283                start_info: ::fidl_next::FromWire::from_wire(wire.start_info),
1284
1285                controller: ::fidl_next::FromWire::from_wire(wire.controller),
1286            }
1287        }
1288    }
1289
1290    #[derive(Debug, PartialEq)]
1291    #[repr(C)]
1292    pub struct TaskProviderGetJobResponse {
1293        pub job: ::fidl_next::fuchsia::zx::Job,
1294    }
1295
1296    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>
1297        for TaskProviderGetJobResponse
1298    where
1299        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1300        ___E: ::fidl_next::fuchsia::HandleEncoder,
1301    {
1302        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1303            Self,
1304            crate::wire::TaskProviderGetJobResponse,
1305        > = unsafe {
1306            ::fidl_next::CopyOptimization::enable_if(
1307                true && <::fidl_next::fuchsia::zx::Job as ::fidl_next::Encode<
1308                    ::fidl_next::wire::fuchsia::Job,
1309                    ___E,
1310                >>::COPY_OPTIMIZATION
1311                    .is_enabled(),
1312            )
1313        };
1314
1315        #[inline]
1316        fn encode(
1317            self,
1318            encoder_: &mut ___E,
1319            out_: &mut ::core::mem::MaybeUninit<crate::wire::TaskProviderGetJobResponse>,
1320            _: (),
1321        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1322            ::fidl_next::munge! {
1323                let crate::wire::TaskProviderGetJobResponse {
1324                    job,
1325
1326                } = out_;
1327            }
1328
1329            ::fidl_next::Encode::encode(self.job, encoder_, job, ())?;
1330
1331            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(job.as_mut_ptr()) };
1332
1333            Ok(())
1334        }
1335    }
1336
1337    unsafe impl<___E>
1338        ::fidl_next::EncodeOption<
1339            ::fidl_next::wire::Box<'static, crate::wire::TaskProviderGetJobResponse>,
1340            ___E,
1341        > for TaskProviderGetJobResponse
1342    where
1343        ___E: ::fidl_next::Encoder + ?Sized,
1344        TaskProviderGetJobResponse:
1345            ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>,
1346    {
1347        #[inline]
1348        fn encode_option(
1349            this: ::core::option::Option<Self>,
1350            encoder: &mut ___E,
1351            out: &mut ::core::mem::MaybeUninit<
1352                ::fidl_next::wire::Box<'static, crate::wire::TaskProviderGetJobResponse>,
1353            >,
1354            _: (),
1355        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1356            if let Some(inner) = this {
1357                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1358                ::fidl_next::wire::Box::encode_present(out);
1359            } else {
1360                ::fidl_next::wire::Box::encode_absent(out);
1361            }
1362
1363            Ok(())
1364        }
1365    }
1366
1367    impl ::fidl_next::FromWire<crate::wire::TaskProviderGetJobResponse> for TaskProviderGetJobResponse {
1368        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1369            crate::wire::TaskProviderGetJobResponse,
1370            Self,
1371        > = unsafe {
1372            ::fidl_next::CopyOptimization::enable_if(
1373                true && <::fidl_next::fuchsia::zx::Job as ::fidl_next::FromWire<
1374                    ::fidl_next::wire::fuchsia::Job,
1375                >>::COPY_OPTIMIZATION
1376                    .is_enabled(),
1377            )
1378        };
1379
1380        #[inline]
1381        fn from_wire(wire: crate::wire::TaskProviderGetJobResponse) -> Self {
1382            Self { job: ::fidl_next::FromWire::from_wire(wire.job) }
1383        }
1384    }
1385}
1386
1387pub mod wire {
1388
1389    pub use fidl_next_common_fuchsia_component_runner::wire::*;
1390
1391    /// The wire type corresponding to [`Task`].
1392    #[repr(transparent)]
1393    pub struct Task<'de> {
1394        pub(crate) raw: ::fidl_next::wire::Union,
1395        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
1396    }
1397
1398    impl<'de> Drop for Task<'de> {
1399        fn drop(&mut self) {
1400            match self.raw.ordinal() {
1401                1 => {
1402                    let _ = unsafe {
1403                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Job>()
1404                    };
1405                }
1406
1407                2 => {
1408                    let _ = unsafe {
1409                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Process>()
1410                    };
1411                }
1412
1413                3 => {
1414                    let _ = unsafe {
1415                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Thread>()
1416                    };
1417                }
1418
1419                _ => (),
1420            }
1421        }
1422    }
1423
1424    impl ::fidl_next::Constrained for Task<'_> {
1425        type Constraint = ();
1426
1427        fn validate(
1428            _: ::fidl_next::Slot<'_, Self>,
1429            _: Self::Constraint,
1430        ) -> Result<(), ::fidl_next::ValidationError> {
1431            Ok(())
1432        }
1433    }
1434
1435    unsafe impl ::fidl_next::Wire for Task<'static> {
1436        type Narrowed<'de> = Task<'de>;
1437
1438        #[inline]
1439        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1440            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
1441            ::fidl_next::wire::Union::zero_padding(raw);
1442        }
1443    }
1444
1445    pub mod task {
1446        pub enum Ref<'de> {
1447            Job(&'de ::fidl_next::wire::fuchsia::Job),
1448
1449            Process(&'de ::fidl_next::wire::fuchsia::Process),
1450
1451            Thread(&'de ::fidl_next::wire::fuchsia::Thread),
1452
1453            UnknownOrdinal_(u64),
1454        }
1455
1456        pub enum Value {
1457            Job(::fidl_next::wire::fuchsia::Job),
1458
1459            Process(::fidl_next::wire::fuchsia::Process),
1460
1461            Thread(::fidl_next::wire::fuchsia::Thread),
1462
1463            UnknownOrdinal_(u64),
1464        }
1465    }
1466
1467    impl<'de> Task<'de> {
1468        pub fn as_ref(&self) -> crate::wire::task::Ref<'_> {
1469            match self.raw.ordinal() {
1470                1 => crate::wire::task::Ref::Job(unsafe {
1471                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Job>()
1472                }),
1473
1474                2 => crate::wire::task::Ref::Process(unsafe {
1475                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Process>()
1476                }),
1477
1478                3 => crate::wire::task::Ref::Thread(unsafe {
1479                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Thread>()
1480                }),
1481
1482                unknown => crate::wire::task::Ref::UnknownOrdinal_(unknown),
1483            }
1484        }
1485
1486        pub fn into_inner(self) -> crate::wire::task::Value {
1487            let this = ::core::mem::ManuallyDrop::new(self);
1488
1489            match this.raw.ordinal() {
1490                1 => crate::wire::task::Value::Job(unsafe {
1491                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Job>()
1492                }),
1493
1494                2 => crate::wire::task::Value::Process(unsafe {
1495                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Process>()
1496                }),
1497
1498                3 => crate::wire::task::Value::Thread(unsafe {
1499                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Thread>()
1500                }),
1501
1502                unknown => crate::wire::task::Value::UnknownOrdinal_(unknown),
1503            }
1504        }
1505    }
1506
1507    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Task<'de>
1508    where
1509        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1510        ___D: ::fidl_next::Decoder<'de>,
1511        ___D: ::fidl_next::fuchsia::HandleDecoder,
1512    {
1513        fn decode(
1514            mut slot: ::fidl_next::Slot<'_, Self>,
1515            decoder: &mut ___D,
1516            _: (),
1517        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1518            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
1519            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
1520                1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Job>(
1521                    raw,
1522                    decoder,
1523                    (),
1524                )?,
1525
1526                2 => ::fidl_next::wire::Union::decode_as::<
1527                    ___D,
1528                    ::fidl_next::wire::fuchsia::Process,
1529                >(raw, decoder, ())?,
1530
1531                3 => {
1532                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Thread>(
1533                        raw,
1534                        decoder,
1535                        (),
1536                    )?
1537                }
1538
1539                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
1540            }
1541
1542            Ok(())
1543        }
1544    }
1545
1546    impl<'de> ::core::fmt::Debug for Task<'de> {
1547        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1548            match self.raw.ordinal() {
1549                1 => unsafe {
1550                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Job>().fmt(f)
1551                },
1552                2 => unsafe {
1553                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Process>().fmt(f)
1554                },
1555                3 => unsafe {
1556                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Thread>().fmt(f)
1557                },
1558                _ => unsafe { ::core::hint::unreachable_unchecked() },
1559            }
1560        }
1561    }
1562
1563    impl<'de> ::fidl_next::IntoNatural for Task<'de> {
1564        type Natural = crate::natural::Task;
1565    }
1566
1567    /// The wire type corresponding to [`ComponentTasks`].
1568    #[repr(C)]
1569    pub struct ComponentTasks<'de> {
1570        pub(crate) table: ::fidl_next::wire::Table<'de>,
1571    }
1572
1573    impl<'de> Drop for ComponentTasks<'de> {
1574        fn drop(&mut self) {
1575            let _ = self
1576                .table
1577                .get(1)
1578                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Task<'de>>() });
1579
1580            let _ = self
1581                .table
1582                .get(2)
1583                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Task<'de>>() });
1584        }
1585    }
1586
1587    impl ::fidl_next::Constrained for ComponentTasks<'_> {
1588        type Constraint = ();
1589
1590        fn validate(
1591            _: ::fidl_next::Slot<'_, Self>,
1592            _: Self::Constraint,
1593        ) -> Result<(), ::fidl_next::ValidationError> {
1594            Ok(())
1595        }
1596    }
1597
1598    unsafe impl ::fidl_next::Wire for ComponentTasks<'static> {
1599        type Narrowed<'de> = ComponentTasks<'de>;
1600
1601        #[inline]
1602        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1603            ::fidl_next::munge!(let Self { table } = out);
1604            ::fidl_next::wire::Table::zero_padding(table);
1605        }
1606    }
1607
1608    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ComponentTasks<'de>
1609    where
1610        ___D: ::fidl_next::Decoder<'de> + ?Sized,
1611        ___D: ::fidl_next::fuchsia::HandleDecoder,
1612    {
1613        fn decode(
1614            slot: ::fidl_next::Slot<'_, Self>,
1615            decoder: &mut ___D,
1616            _: (),
1617        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1618            ::fidl_next::munge!(let Self { table } = slot);
1619
1620            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1621                match ordinal {
1622                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1623
1624                    1 => {
1625                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Task<'de>>(
1626                            slot.as_mut(),
1627                            decoder,
1628                            (),
1629                        )?;
1630
1631                        Ok(())
1632                    }
1633
1634                    2 => {
1635                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Task<'de>>(
1636                            slot.as_mut(),
1637                            decoder,
1638                            (),
1639                        )?;
1640
1641                        Ok(())
1642                    }
1643
1644                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1645                }
1646            })
1647        }
1648    }
1649
1650    impl<'de> ComponentTasks<'de> {
1651        pub fn component_task(&self) -> ::core::option::Option<&crate::wire::Task<'de>> {
1652            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1653        }
1654
1655        pub fn take_component_task(&mut self) -> ::core::option::Option<crate::wire::Task<'de>> {
1656            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1657        }
1658
1659        pub fn parent_task(&self) -> ::core::option::Option<&crate::wire::Task<'de>> {
1660            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1661        }
1662
1663        pub fn take_parent_task(&mut self) -> ::core::option::Option<crate::wire::Task<'de>> {
1664            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
1665        }
1666    }
1667
1668    impl<'de> ::core::fmt::Debug for ComponentTasks<'de> {
1669        fn fmt(
1670            &self,
1671            f: &mut ::core::fmt::Formatter<'_>,
1672        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1673            f.debug_struct("ComponentTasks")
1674                .field("component_task", &self.component_task())
1675                .field("parent_task", &self.parent_task())
1676                .finish()
1677        }
1678    }
1679
1680    impl<'de> ::fidl_next::IntoNatural for ComponentTasks<'de> {
1681        type Natural = crate::natural::ComponentTasks;
1682    }
1683
1684    /// The wire type corresponding to [`ComponentDiagnostics`].
1685    #[repr(C)]
1686    pub struct ComponentDiagnostics<'de> {
1687        pub(crate) table: ::fidl_next::wire::Table<'de>,
1688    }
1689
1690    impl<'de> Drop for ComponentDiagnostics<'de> {
1691        fn drop(&mut self) {
1692            let _ = self.table.get(1).map(|envelope| unsafe {
1693                envelope.read_unchecked::<crate::wire::ComponentTasks<'de>>()
1694            });
1695        }
1696    }
1697
1698    impl ::fidl_next::Constrained for ComponentDiagnostics<'_> {
1699        type Constraint = ();
1700
1701        fn validate(
1702            _: ::fidl_next::Slot<'_, Self>,
1703            _: Self::Constraint,
1704        ) -> Result<(), ::fidl_next::ValidationError> {
1705            Ok(())
1706        }
1707    }
1708
1709    unsafe impl ::fidl_next::Wire for ComponentDiagnostics<'static> {
1710        type Narrowed<'de> = ComponentDiagnostics<'de>;
1711
1712        #[inline]
1713        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1714            ::fidl_next::munge!(let Self { table } = out);
1715            ::fidl_next::wire::Table::zero_padding(table);
1716        }
1717    }
1718
1719    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ComponentDiagnostics<'de>
1720    where
1721        ___D: ::fidl_next::Decoder<'de> + ?Sized,
1722        ___D: ::fidl_next::fuchsia::HandleDecoder,
1723    {
1724        fn decode(
1725            slot: ::fidl_next::Slot<'_, Self>,
1726            decoder: &mut ___D,
1727            _: (),
1728        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1729            ::fidl_next::munge!(let Self { table } = slot);
1730
1731            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1732                match ordinal {
1733                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1734
1735                    1 => {
1736                        ::fidl_next::wire::Envelope::decode_as::<
1737                            ___D,
1738                            crate::wire::ComponentTasks<'de>,
1739                        >(slot.as_mut(), decoder, ())?;
1740
1741                        Ok(())
1742                    }
1743
1744                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1745                }
1746            })
1747        }
1748    }
1749
1750    impl<'de> ComponentDiagnostics<'de> {
1751        pub fn tasks(&self) -> ::core::option::Option<&crate::wire::ComponentTasks<'de>> {
1752            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1753        }
1754
1755        pub fn take_tasks(&mut self) -> ::core::option::Option<crate::wire::ComponentTasks<'de>> {
1756            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1757        }
1758    }
1759
1760    impl<'de> ::core::fmt::Debug for ComponentDiagnostics<'de> {
1761        fn fmt(
1762            &self,
1763            f: &mut ::core::fmt::Formatter<'_>,
1764        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1765            f.debug_struct("ComponentDiagnostics").field("tasks", &self.tasks()).finish()
1766        }
1767    }
1768
1769    impl<'de> ::fidl_next::IntoNatural for ComponentDiagnostics<'de> {
1770        type Natural = crate::natural::ComponentDiagnostics;
1771    }
1772
1773    /// The wire type corresponding to [`ComponentControllerOnPublishDiagnosticsRequest`].
1774    #[derive(Debug)]
1775    #[repr(C)]
1776    pub struct ComponentControllerOnPublishDiagnosticsRequest<'de> {
1777        pub payload: crate::wire::ComponentDiagnostics<'de>,
1778    }
1779
1780    static_assertions::const_assert_eq!(
1781        std::mem::size_of::<ComponentControllerOnPublishDiagnosticsRequest<'_>>(),
1782        16
1783    );
1784    static_assertions::const_assert_eq!(
1785        std::mem::align_of::<ComponentControllerOnPublishDiagnosticsRequest<'_>>(),
1786        8
1787    );
1788
1789    static_assertions::const_assert_eq!(
1790        std::mem::offset_of!(ComponentControllerOnPublishDiagnosticsRequest<'_>, payload),
1791        0
1792    );
1793
1794    impl ::fidl_next::Constrained for ComponentControllerOnPublishDiagnosticsRequest<'_> {
1795        type Constraint = ();
1796
1797        fn validate(
1798            _: ::fidl_next::Slot<'_, Self>,
1799            _: Self::Constraint,
1800        ) -> Result<(), ::fidl_next::ValidationError> {
1801            Ok(())
1802        }
1803    }
1804
1805    unsafe impl ::fidl_next::Wire for ComponentControllerOnPublishDiagnosticsRequest<'static> {
1806        type Narrowed<'de> = ComponentControllerOnPublishDiagnosticsRequest<'de>;
1807
1808        #[inline]
1809        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1810            ::fidl_next::munge! {
1811                let Self {
1812                    payload,
1813
1814                } = &mut *out_;
1815            }
1816
1817            ::fidl_next::Wire::zero_padding(payload);
1818        }
1819    }
1820
1821    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
1822        for ComponentControllerOnPublishDiagnosticsRequest<'de>
1823    where
1824        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1825        ___D: ::fidl_next::Decoder<'de>,
1826        ___D: ::fidl_next::fuchsia::HandleDecoder,
1827    {
1828        fn decode(
1829            slot_: ::fidl_next::Slot<'_, Self>,
1830            decoder_: &mut ___D,
1831            _: (),
1832        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1833            ::fidl_next::munge! {
1834                let Self {
1835                    mut payload,
1836
1837                } = slot_;
1838            }
1839
1840            let _field = payload.as_mut();
1841
1842            ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
1843
1844            Ok(())
1845        }
1846    }
1847
1848    impl<'de> ::fidl_next::IntoNatural for ComponentControllerOnPublishDiagnosticsRequest<'de> {
1849        type Natural = crate::natural::ComponentControllerOnPublishDiagnosticsRequest;
1850    }
1851
1852    /// The wire type corresponding to [`ComponentStopInfo`].
1853    #[repr(C)]
1854    pub struct ComponentStopInfo<'de> {
1855        pub(crate) table: ::fidl_next::wire::Table<'de>,
1856    }
1857
1858    impl<'de> Drop for ComponentStopInfo<'de> {
1859        fn drop(&mut self) {
1860            let _ = self.table.get(1).map(|envelope| unsafe {
1861                envelope.read_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
1862            });
1863
1864            let _ = self
1865                .table
1866                .get(2)
1867                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
1868        }
1869    }
1870
1871    impl ::fidl_next::Constrained for ComponentStopInfo<'_> {
1872        type Constraint = ();
1873
1874        fn validate(
1875            _: ::fidl_next::Slot<'_, Self>,
1876            _: Self::Constraint,
1877        ) -> Result<(), ::fidl_next::ValidationError> {
1878            Ok(())
1879        }
1880    }
1881
1882    unsafe impl ::fidl_next::Wire for ComponentStopInfo<'static> {
1883        type Narrowed<'de> = ComponentStopInfo<'de>;
1884
1885        #[inline]
1886        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1887            ::fidl_next::munge!(let Self { table } = out);
1888            ::fidl_next::wire::Table::zero_padding(table);
1889        }
1890    }
1891
1892    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ComponentStopInfo<'de>
1893    where
1894        ___D: ::fidl_next::Decoder<'de> + ?Sized,
1895        ___D: ::fidl_next::fuchsia::HandleDecoder,
1896    {
1897        fn decode(
1898            slot: ::fidl_next::Slot<'_, Self>,
1899            decoder: &mut ___D,
1900            _: (),
1901        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1902            ::fidl_next::munge!(let Self { table } = slot);
1903
1904            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1905                match ordinal {
1906                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1907
1908                    1 => {
1909                        ::fidl_next::wire::Envelope::decode_as::<
1910                            ___D,
1911                            ::fidl_next::wire::fuchsia::StatusResult,
1912                        >(slot.as_mut(), decoder, ())?;
1913
1914                        Ok(())
1915                    }
1916
1917                    2 => {
1918                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
1919                            slot.as_mut(),
1920                            decoder,
1921                            (),
1922                        )?;
1923
1924                        Ok(())
1925                    }
1926
1927                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1928                }
1929            })
1930        }
1931    }
1932
1933    impl<'de> ComponentStopInfo<'de> {
1934        pub fn termination_status(
1935            &self,
1936        ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::StatusResult> {
1937            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1938        }
1939
1940        pub fn take_termination_status(
1941            &mut self,
1942        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::StatusResult> {
1943            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1944        }
1945
1946        pub fn exit_code(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
1947            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1948        }
1949
1950        pub fn take_exit_code(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
1951            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
1952        }
1953    }
1954
1955    impl<'de> ::core::fmt::Debug for ComponentStopInfo<'de> {
1956        fn fmt(
1957            &self,
1958            f: &mut ::core::fmt::Formatter<'_>,
1959        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1960            f.debug_struct("ComponentStopInfo")
1961                .field("termination_status", &self.termination_status())
1962                .field("exit_code", &self.exit_code())
1963                .finish()
1964        }
1965    }
1966
1967    impl<'de> ::fidl_next::IntoNatural for ComponentStopInfo<'de> {
1968        type Natural = crate::natural::ComponentStopInfo;
1969    }
1970
1971    /// The wire type corresponding to [`ComponentControllerOnEscrowRequest`].
1972    #[repr(C)]
1973    pub struct ComponentControllerOnEscrowRequest<'de> {
1974        pub(crate) table: ::fidl_next::wire::Table<'de>,
1975    }
1976
1977    impl<'de> Drop for ComponentControllerOnEscrowRequest<'de> {
1978        fn drop(&mut self) {
1979            let _ = self.table.get(1).map(|envelope| unsafe {
1980                envelope.read_unchecked::<::fidl_next::ServerEnd<
1981                    ::fidl_next_fuchsia_io::Directory,
1982                    ::fidl_next::wire::fuchsia::Channel,
1983                >>()
1984            });
1985
1986            let _ = self.table.get(2)
1987                .map(|envelope| unsafe {
1988                    envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
1989                });
1990
1991            let _ = self.table.get(3).map(|envelope| unsafe {
1992                envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
1993            });
1994
1995            let _ = self
1996                .table
1997                .get(4)
1998                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
1999        }
2000    }
2001
2002    impl ::fidl_next::Constrained for ComponentControllerOnEscrowRequest<'_> {
2003        type Constraint = ();
2004
2005        fn validate(
2006            _: ::fidl_next::Slot<'_, Self>,
2007            _: Self::Constraint,
2008        ) -> Result<(), ::fidl_next::ValidationError> {
2009            Ok(())
2010        }
2011    }
2012
2013    unsafe impl ::fidl_next::Wire for ComponentControllerOnEscrowRequest<'static> {
2014        type Narrowed<'de> = ComponentControllerOnEscrowRequest<'de>;
2015
2016        #[inline]
2017        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2018            ::fidl_next::munge!(let Self { table } = out);
2019            ::fidl_next::wire::Table::zero_padding(table);
2020        }
2021    }
2022
2023    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ComponentControllerOnEscrowRequest<'de>
2024    where
2025        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2026        ___D: ::fidl_next::fuchsia::HandleDecoder,
2027    {
2028        fn decode(
2029            slot: ::fidl_next::Slot<'_, Self>,
2030            decoder: &mut ___D,
2031            _: (),
2032        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2033            ::fidl_next::munge!(let Self { table } = slot);
2034
2035            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2036                match ordinal {
2037                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2038
2039                    1 => {
2040                        ::fidl_next::wire::Envelope::decode_as::<
2041                            ___D,
2042                            ::fidl_next::ServerEnd<
2043                                ::fidl_next_fuchsia_io::Directory,
2044                                ::fidl_next::wire::fuchsia::Channel,
2045                            >,
2046                        >(slot.as_mut(), decoder, ())?;
2047
2048                        Ok(())
2049                    }
2050
2051                    2 => {
2052                        ::fidl_next::wire::Envelope::decode_as::<
2053                            ___D,
2054                            ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
2055                        >(slot.as_mut(), decoder, ())?;
2056
2057                        Ok(())
2058                    }
2059
2060                    3 => {
2061                        ::fidl_next::wire::Envelope::decode_as::<
2062                            ___D,
2063                            ::fidl_next::wire::fuchsia::EventPair,
2064                        >(slot.as_mut(), decoder, ())?;
2065
2066                        Ok(())
2067                    }
2068
2069                    4 => {
2070                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
2071                            slot.as_mut(),
2072                            decoder,
2073                            (),
2074                        )?;
2075
2076                        Ok(())
2077                    }
2078
2079                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2080                }
2081            })
2082        }
2083    }
2084
2085    impl<'de> ComponentControllerOnEscrowRequest<'de> {
2086        pub fn outgoing_dir(
2087            &self,
2088        ) -> ::core::option::Option<
2089            &::fidl_next::ServerEnd<
2090                ::fidl_next_fuchsia_io::Directory,
2091                ::fidl_next::wire::fuchsia::Channel,
2092            >,
2093        > {
2094            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2095        }
2096
2097        pub fn take_outgoing_dir(
2098            &mut self,
2099        ) -> ::core::option::Option<
2100            ::fidl_next::ServerEnd<
2101                ::fidl_next_fuchsia_io::Directory,
2102                ::fidl_next::wire::fuchsia::Channel,
2103            >,
2104        > {
2105            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2106        }
2107
2108        pub fn escrowed_dictionary(
2109            &self,
2110        ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
2111        {
2112            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2113        }
2114
2115        pub fn take_escrowed_dictionary(
2116            &mut self,
2117        ) -> ::core::option::Option<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
2118        {
2119            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2120        }
2121
2122        pub fn escrowed_dictionary_handle(
2123            &self,
2124        ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::EventPair> {
2125            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2126        }
2127
2128        pub fn take_escrowed_dictionary_handle(
2129            &mut self,
2130        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::EventPair> {
2131            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2132        }
2133
2134        pub fn recoverable_bytes(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
2135            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2136        }
2137
2138        pub fn take_recoverable_bytes(
2139            &mut self,
2140        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
2141            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2142        }
2143    }
2144
2145    impl<'de> ::core::fmt::Debug for ComponentControllerOnEscrowRequest<'de> {
2146        fn fmt(
2147            &self,
2148            f: &mut ::core::fmt::Formatter<'_>,
2149        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2150            f.debug_struct("ComponentControllerOnEscrowRequest")
2151                .field("outgoing_dir", &self.outgoing_dir())
2152                .field("escrowed_dictionary", &self.escrowed_dictionary())
2153                .field("escrowed_dictionary_handle", &self.escrowed_dictionary_handle())
2154                .field("recoverable_bytes", &self.recoverable_bytes())
2155                .finish()
2156        }
2157    }
2158
2159    impl<'de> ::fidl_next::IntoNatural for ComponentControllerOnEscrowRequest<'de> {
2160        type Natural = crate::natural::ComponentControllerOnEscrowRequest;
2161    }
2162
2163    /// The wire type corresponding to [`ComponentNamespaceEntry`].
2164    #[repr(C)]
2165    pub struct ComponentNamespaceEntry<'de> {
2166        pub(crate) table: ::fidl_next::wire::Table<'de>,
2167    }
2168
2169    impl<'de> Drop for ComponentNamespaceEntry<'de> {
2170        fn drop(&mut self) {
2171            let _ = self.table.get(1).map(|envelope| unsafe {
2172                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2173            });
2174
2175            let _ = self.table.get(2).map(|envelope| unsafe {
2176                envelope.read_unchecked::<::fidl_next::ClientEnd<
2177                    ::fidl_next_fuchsia_io::Directory,
2178                    ::fidl_next::wire::fuchsia::Channel,
2179                >>()
2180            });
2181        }
2182    }
2183
2184    impl ::fidl_next::Constrained for ComponentNamespaceEntry<'_> {
2185        type Constraint = ();
2186
2187        fn validate(
2188            _: ::fidl_next::Slot<'_, Self>,
2189            _: Self::Constraint,
2190        ) -> Result<(), ::fidl_next::ValidationError> {
2191            Ok(())
2192        }
2193    }
2194
2195    unsafe impl ::fidl_next::Wire for ComponentNamespaceEntry<'static> {
2196        type Narrowed<'de> = ComponentNamespaceEntry<'de>;
2197
2198        #[inline]
2199        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2200            ::fidl_next::munge!(let Self { table } = out);
2201            ::fidl_next::wire::Table::zero_padding(table);
2202        }
2203    }
2204
2205    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ComponentNamespaceEntry<'de>
2206    where
2207        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2208        ___D: ::fidl_next::fuchsia::HandleDecoder,
2209    {
2210        fn decode(
2211            slot: ::fidl_next::Slot<'_, Self>,
2212            decoder: &mut ___D,
2213            _: (),
2214        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2215            ::fidl_next::munge!(let Self { table } = slot);
2216
2217            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2218                match ordinal {
2219                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2220
2221                    1 => {
2222                        ::fidl_next::wire::Envelope::decode_as::<
2223                            ___D,
2224                            ::fidl_next::wire::String<'de>,
2225                        >(slot.as_mut(), decoder, 4095)?;
2226
2227                        let value = unsafe {
2228                            slot.deref_unchecked()
2229                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
2230                        };
2231
2232                        if value.len() > 4095 {
2233                            return Err(::fidl_next::DecodeError::VectorTooLong {
2234                                size: value.len() as u64,
2235                                limit: 4095,
2236                            });
2237                        }
2238
2239                        Ok(())
2240                    }
2241
2242                    2 => {
2243                        ::fidl_next::wire::Envelope::decode_as::<
2244                            ___D,
2245                            ::fidl_next::ClientEnd<
2246                                ::fidl_next_fuchsia_io::Directory,
2247                                ::fidl_next::wire::fuchsia::Channel,
2248                            >,
2249                        >(slot.as_mut(), decoder, ())?;
2250
2251                        Ok(())
2252                    }
2253
2254                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2255                }
2256            })
2257        }
2258    }
2259
2260    impl<'de> ComponentNamespaceEntry<'de> {
2261        pub fn path(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
2262            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2263        }
2264
2265        pub fn take_path(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
2266            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2267        }
2268
2269        pub fn directory(
2270            &self,
2271        ) -> ::core::option::Option<
2272            &::fidl_next::ClientEnd<
2273                ::fidl_next_fuchsia_io::Directory,
2274                ::fidl_next::wire::fuchsia::Channel,
2275            >,
2276        > {
2277            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2278        }
2279
2280        pub fn take_directory(
2281            &mut self,
2282        ) -> ::core::option::Option<
2283            ::fidl_next::ClientEnd<
2284                ::fidl_next_fuchsia_io::Directory,
2285                ::fidl_next::wire::fuchsia::Channel,
2286            >,
2287        > {
2288            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2289        }
2290    }
2291
2292    impl<'de> ::core::fmt::Debug for ComponentNamespaceEntry<'de> {
2293        fn fmt(
2294            &self,
2295            f: &mut ::core::fmt::Formatter<'_>,
2296        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2297            f.debug_struct("ComponentNamespaceEntry")
2298                .field("path", &self.path())
2299                .field("directory", &self.directory())
2300                .finish()
2301        }
2302    }
2303
2304    impl<'de> ::fidl_next::IntoNatural for ComponentNamespaceEntry<'de> {
2305        type Natural = crate::natural::ComponentNamespaceEntry;
2306    }
2307
2308    /// The wire type corresponding to [`ComponentStartInfo`].
2309    #[repr(C)]
2310    pub struct ComponentStartInfo<'de> {
2311        pub(crate) table: ::fidl_next::wire::Table<'de>,
2312    }
2313
2314    impl<'de> Drop for ComponentStartInfo<'de> {
2315        fn drop(&mut self) {
2316            let _ = self.table.get(1).map(|envelope| unsafe {
2317                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2318            });
2319
2320            let _ = self.table.get(2).map(|envelope| unsafe {
2321                envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>()
2322            });
2323
2324            let _ = self.table.get(3)
2325                .map(|envelope| unsafe {
2326                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ComponentNamespaceEntry<'de>>>()
2327                });
2328
2329            let _ = self.table.get(4).map(|envelope| unsafe {
2330                envelope.read_unchecked::<::fidl_next::ServerEnd<
2331                    ::fidl_next_fuchsia_io::Directory,
2332                    ::fidl_next::wire::fuchsia::Channel,
2333                >>()
2334            });
2335
2336            let _ = self.table.get(5).map(|envelope| unsafe {
2337                envelope.read_unchecked::<::fidl_next::ServerEnd<
2338                    ::fidl_next_fuchsia_io::Directory,
2339                    ::fidl_next::wire::fuchsia::Channel,
2340                >>()
2341            });
2342
2343            let _ = self.table.get(6).map(|envelope| unsafe {
2344                envelope.read_unchecked::<::fidl_next::wire::Vector<
2345                        'de,
2346                        ::fidl_next_fuchsia_process::wire::HandleInfo,
2347                    >>()
2348            });
2349
2350            let _ = self.table.get(7).map(|envelope| unsafe {
2351                envelope.read_unchecked::<::fidl_next_fuchsia_mem::wire::Data<'de>>()
2352            });
2353
2354            let _ = self.table.get(8).map(|envelope| unsafe {
2355                envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
2356            });
2357
2358            let _ = self.table.get(9).map(|envelope| unsafe {
2359                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
2360            });
2361
2362            let _ = self.table.get(10)
2363                .map(|envelope| unsafe {
2364                    envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
2365                });
2366
2367            let _ = self.table.get(11).map(|envelope| unsafe {
2368                envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
2369            });
2370        }
2371    }
2372
2373    impl ::fidl_next::Constrained for ComponentStartInfo<'_> {
2374        type Constraint = ();
2375
2376        fn validate(
2377            _: ::fidl_next::Slot<'_, Self>,
2378            _: Self::Constraint,
2379        ) -> Result<(), ::fidl_next::ValidationError> {
2380            Ok(())
2381        }
2382    }
2383
2384    unsafe impl ::fidl_next::Wire for ComponentStartInfo<'static> {
2385        type Narrowed<'de> = ComponentStartInfo<'de>;
2386
2387        #[inline]
2388        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2389            ::fidl_next::munge!(let Self { table } = out);
2390            ::fidl_next::wire::Table::zero_padding(table);
2391        }
2392    }
2393
2394    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ComponentStartInfo<'de>
2395    where
2396        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2397        ___D: ::fidl_next::fuchsia::HandleDecoder,
2398    {
2399        fn decode(
2400            slot: ::fidl_next::Slot<'_, Self>,
2401            decoder: &mut ___D,
2402            _: (),
2403        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2404            ::fidl_next::munge!(let Self { table } = slot);
2405
2406            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2407                match ordinal {
2408                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2409
2410                    1 => {
2411                        ::fidl_next::wire::Envelope::decode_as::<
2412                            ___D,
2413                            ::fidl_next::wire::String<'de>,
2414                        >(slot.as_mut(), decoder, 4096)?;
2415
2416                        let value = unsafe {
2417                            slot.deref_unchecked()
2418                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
2419                        };
2420
2421                        if value.len() > 4096 {
2422                            return Err(::fidl_next::DecodeError::VectorTooLong {
2423                                size: value.len() as u64,
2424                                limit: 4096,
2425                            });
2426                        }
2427
2428                        Ok(())
2429                    }
2430
2431                    2 => {
2432                        ::fidl_next::wire::Envelope::decode_as::<
2433                            ___D,
2434                            ::fidl_next_fuchsia_data::wire::Dictionary<'de>,
2435                        >(slot.as_mut(), decoder, ())?;
2436
2437                        Ok(())
2438                    }
2439
2440                    3 => {
2441                        ::fidl_next::wire::Envelope::decode_as::<
2442                            ___D,
2443                            ::fidl_next::wire::Vector<
2444                                'de,
2445                                crate::wire::ComponentNamespaceEntry<'de>,
2446                            >,
2447                        >(slot.as_mut(), decoder, (32, ()))?;
2448
2449                        let value = unsafe {
2450                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
2451                                '_,
2452                                crate::wire::ComponentNamespaceEntry<'_>,
2453                            >>()
2454                        };
2455
2456                        if value.len() > 32 {
2457                            return Err(::fidl_next::DecodeError::VectorTooLong {
2458                                size: value.len() as u64,
2459                                limit: 32,
2460                            });
2461                        }
2462
2463                        Ok(())
2464                    }
2465
2466                    4 => {
2467                        ::fidl_next::wire::Envelope::decode_as::<
2468                            ___D,
2469                            ::fidl_next::ServerEnd<
2470                                ::fidl_next_fuchsia_io::Directory,
2471                                ::fidl_next::wire::fuchsia::Channel,
2472                            >,
2473                        >(slot.as_mut(), decoder, ())?;
2474
2475                        Ok(())
2476                    }
2477
2478                    5 => {
2479                        ::fidl_next::wire::Envelope::decode_as::<
2480                            ___D,
2481                            ::fidl_next::ServerEnd<
2482                                ::fidl_next_fuchsia_io::Directory,
2483                                ::fidl_next::wire::fuchsia::Channel,
2484                            >,
2485                        >(slot.as_mut(), decoder, ())?;
2486
2487                        Ok(())
2488                    }
2489
2490                    6 => {
2491                        ::fidl_next::wire::Envelope::decode_as::<
2492                            ___D,
2493                            ::fidl_next::wire::Vector<
2494                                'de,
2495                                ::fidl_next_fuchsia_process::wire::HandleInfo,
2496                            >,
2497                        >(slot.as_mut(), decoder, (128, ()))?;
2498
2499                        let value = unsafe {
2500                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
2501                                '_,
2502                                ::fidl_next_fuchsia_process::wire::HandleInfo,
2503                            >>()
2504                        };
2505
2506                        if value.len() > 128 {
2507                            return Err(::fidl_next::DecodeError::VectorTooLong {
2508                                size: value.len() as u64,
2509                                limit: 128,
2510                            });
2511                        }
2512
2513                        Ok(())
2514                    }
2515
2516                    7 => {
2517                        ::fidl_next::wire::Envelope::decode_as::<
2518                            ___D,
2519                            ::fidl_next_fuchsia_mem::wire::Data<'de>,
2520                        >(slot.as_mut(), decoder, ())?;
2521
2522                        Ok(())
2523                    }
2524
2525                    8 => {
2526                        ::fidl_next::wire::Envelope::decode_as::<
2527                            ___D,
2528                            ::fidl_next::wire::fuchsia::EventPair,
2529                        >(slot.as_mut(), decoder, ())?;
2530
2531                        Ok(())
2532                    }
2533
2534                    9 => {
2535                        ::fidl_next::wire::Envelope::decode_as::<
2536                            ___D,
2537                            ::fidl_next::wire::fuchsia::Event,
2538                        >(slot.as_mut(), decoder, ())?;
2539
2540                        Ok(())
2541                    }
2542
2543                    10 => {
2544                        ::fidl_next::wire::Envelope::decode_as::<
2545                            ___D,
2546                            ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
2547                        >(slot.as_mut(), decoder, ())?;
2548
2549                        Ok(())
2550                    }
2551
2552                    11 => {
2553                        ::fidl_next::wire::Envelope::decode_as::<
2554                            ___D,
2555                            ::fidl_next::wire::fuchsia::EventPair,
2556                        >(slot.as_mut(), decoder, ())?;
2557
2558                        Ok(())
2559                    }
2560
2561                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2562                }
2563            })
2564        }
2565    }
2566
2567    impl<'de> ComponentStartInfo<'de> {
2568        pub fn resolved_url(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
2569            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2570        }
2571
2572        pub fn take_resolved_url(
2573            &mut self,
2574        ) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
2575            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2576        }
2577
2578        pub fn program(
2579            &self,
2580        ) -> ::core::option::Option<&::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2581            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2582        }
2583
2584        pub fn take_program(
2585            &mut self,
2586        ) -> ::core::option::Option<::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2587            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2588        }
2589
2590        pub fn ns(
2591            &self,
2592        ) -> ::core::option::Option<
2593            &::fidl_next::wire::Vector<'de, crate::wire::ComponentNamespaceEntry<'de>>,
2594        > {
2595            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2596        }
2597
2598        pub fn take_ns(
2599            &mut self,
2600        ) -> ::core::option::Option<
2601            ::fidl_next::wire::Vector<'de, crate::wire::ComponentNamespaceEntry<'de>>,
2602        > {
2603            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2604        }
2605
2606        pub fn outgoing_dir(
2607            &self,
2608        ) -> ::core::option::Option<
2609            &::fidl_next::ServerEnd<
2610                ::fidl_next_fuchsia_io::Directory,
2611                ::fidl_next::wire::fuchsia::Channel,
2612            >,
2613        > {
2614            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2615        }
2616
2617        pub fn take_outgoing_dir(
2618            &mut self,
2619        ) -> ::core::option::Option<
2620            ::fidl_next::ServerEnd<
2621                ::fidl_next_fuchsia_io::Directory,
2622                ::fidl_next::wire::fuchsia::Channel,
2623            >,
2624        > {
2625            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2626        }
2627
2628        pub fn runtime_dir(
2629            &self,
2630        ) -> ::core::option::Option<
2631            &::fidl_next::ServerEnd<
2632                ::fidl_next_fuchsia_io::Directory,
2633                ::fidl_next::wire::fuchsia::Channel,
2634            >,
2635        > {
2636            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2637        }
2638
2639        pub fn take_runtime_dir(
2640            &mut self,
2641        ) -> ::core::option::Option<
2642            ::fidl_next::ServerEnd<
2643                ::fidl_next_fuchsia_io::Directory,
2644                ::fidl_next::wire::fuchsia::Channel,
2645            >,
2646        > {
2647            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
2648        }
2649
2650        pub fn numbered_handles(
2651            &self,
2652        ) -> ::core::option::Option<
2653            &::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
2654        > {
2655            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2656        }
2657
2658        pub fn take_numbered_handles(
2659            &mut self,
2660        ) -> ::core::option::Option<
2661            ::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
2662        > {
2663            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
2664        }
2665
2666        pub fn encoded_config(
2667            &self,
2668        ) -> ::core::option::Option<&::fidl_next_fuchsia_mem::wire::Data<'de>> {
2669            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
2670        }
2671
2672        pub fn take_encoded_config(
2673            &mut self,
2674        ) -> ::core::option::Option<::fidl_next_fuchsia_mem::wire::Data<'de>> {
2675            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
2676        }
2677
2678        pub fn break_on_start(
2679            &self,
2680        ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::EventPair> {
2681            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
2682        }
2683
2684        pub fn take_break_on_start(
2685            &mut self,
2686        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::EventPair> {
2687            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
2688        }
2689
2690        pub fn component_instance(
2691            &self,
2692        ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
2693            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
2694        }
2695
2696        pub fn take_component_instance(
2697            &mut self,
2698        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
2699            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
2700        }
2701
2702        pub fn escrowed_dictionary(
2703            &self,
2704        ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
2705        {
2706            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
2707        }
2708
2709        pub fn take_escrowed_dictionary(
2710            &mut self,
2711        ) -> ::core::option::Option<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
2712        {
2713            unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
2714        }
2715
2716        pub fn escrowed_dictionary_handle(
2717            &self,
2718        ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::EventPair> {
2719            unsafe { Some(self.table.get(11)?.deref_unchecked()) }
2720        }
2721
2722        pub fn take_escrowed_dictionary_handle(
2723            &mut self,
2724        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::EventPair> {
2725            unsafe { Some(self.table.get_mut(11)?.take_unchecked()) }
2726        }
2727    }
2728
2729    impl<'de> ::core::fmt::Debug for ComponentStartInfo<'de> {
2730        fn fmt(
2731            &self,
2732            f: &mut ::core::fmt::Formatter<'_>,
2733        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2734            f.debug_struct("ComponentStartInfo")
2735                .field("resolved_url", &self.resolved_url())
2736                .field("program", &self.program())
2737                .field("ns", &self.ns())
2738                .field("outgoing_dir", &self.outgoing_dir())
2739                .field("runtime_dir", &self.runtime_dir())
2740                .field("numbered_handles", &self.numbered_handles())
2741                .field("encoded_config", &self.encoded_config())
2742                .field("break_on_start", &self.break_on_start())
2743                .field("component_instance", &self.component_instance())
2744                .field("escrowed_dictionary", &self.escrowed_dictionary())
2745                .field("escrowed_dictionary_handle", &self.escrowed_dictionary_handle())
2746                .finish()
2747        }
2748    }
2749
2750    impl<'de> ::fidl_next::IntoNatural for ComponentStartInfo<'de> {
2751        type Natural = crate::natural::ComponentStartInfo;
2752    }
2753
2754    /// The wire type corresponding to [`ComponentRunnerStartRequest`].
2755    #[derive(Debug)]
2756    #[repr(C)]
2757    pub struct ComponentRunnerStartRequest<'de> {
2758        pub start_info: crate::wire::ComponentStartInfo<'de>,
2759
2760        pub controller:
2761            ::fidl_next::ServerEnd<crate::ComponentController, ::fidl_next::wire::fuchsia::Channel>,
2762    }
2763
2764    static_assertions::const_assert_eq!(std::mem::size_of::<ComponentRunnerStartRequest<'_>>(), 24);
2765    static_assertions::const_assert_eq!(std::mem::align_of::<ComponentRunnerStartRequest<'_>>(), 8);
2766
2767    static_assertions::const_assert_eq!(
2768        std::mem::offset_of!(ComponentRunnerStartRequest<'_>, start_info),
2769        0
2770    );
2771
2772    static_assertions::const_assert_eq!(
2773        std::mem::offset_of!(ComponentRunnerStartRequest<'_>, controller),
2774        16
2775    );
2776
2777    impl ::fidl_next::Constrained for ComponentRunnerStartRequest<'_> {
2778        type Constraint = ();
2779
2780        fn validate(
2781            _: ::fidl_next::Slot<'_, Self>,
2782            _: Self::Constraint,
2783        ) -> Result<(), ::fidl_next::ValidationError> {
2784            Ok(())
2785        }
2786    }
2787
2788    unsafe impl ::fidl_next::Wire for ComponentRunnerStartRequest<'static> {
2789        type Narrowed<'de> = ComponentRunnerStartRequest<'de>;
2790
2791        #[inline]
2792        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2793            ::fidl_next::munge! {
2794                let Self {
2795                    start_info,
2796                    controller,
2797
2798                } = &mut *out_;
2799            }
2800
2801            ::fidl_next::Wire::zero_padding(start_info);
2802
2803            ::fidl_next::Wire::zero_padding(controller);
2804
2805            unsafe {
2806                out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2807            }
2808        }
2809    }
2810
2811    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ComponentRunnerStartRequest<'de>
2812    where
2813        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2814        ___D: ::fidl_next::Decoder<'de>,
2815        ___D: ::fidl_next::fuchsia::HandleDecoder,
2816    {
2817        fn decode(
2818            slot_: ::fidl_next::Slot<'_, Self>,
2819            decoder_: &mut ___D,
2820            _: (),
2821        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2822            if slot_.as_bytes()[20..24] != [0u8; 4] {
2823                return Err(::fidl_next::DecodeError::InvalidPadding);
2824            }
2825
2826            ::fidl_next::munge! {
2827                let Self {
2828                    mut start_info,
2829                    mut controller,
2830
2831                } = slot_;
2832            }
2833
2834            let _field = start_info.as_mut();
2835
2836            ::fidl_next::Decode::decode(start_info.as_mut(), decoder_, ())?;
2837
2838            let _field = controller.as_mut();
2839
2840            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
2841
2842            Ok(())
2843        }
2844    }
2845
2846    impl<'de> ::fidl_next::IntoNatural for ComponentRunnerStartRequest<'de> {
2847        type Natural = crate::natural::ComponentRunnerStartRequest;
2848    }
2849
2850    /// The wire type corresponding to [`TaskProviderGetJobResponse`].
2851    #[derive(Debug)]
2852    #[repr(C)]
2853    pub struct TaskProviderGetJobResponse {
2854        pub job: ::fidl_next::wire::fuchsia::Job,
2855    }
2856
2857    static_assertions::const_assert_eq!(std::mem::size_of::<TaskProviderGetJobResponse>(), 4);
2858    static_assertions::const_assert_eq!(std::mem::align_of::<TaskProviderGetJobResponse>(), 4);
2859
2860    static_assertions::const_assert_eq!(std::mem::offset_of!(TaskProviderGetJobResponse, job), 0);
2861
2862    impl ::fidl_next::Constrained for TaskProviderGetJobResponse {
2863        type Constraint = ();
2864
2865        fn validate(
2866            _: ::fidl_next::Slot<'_, Self>,
2867            _: Self::Constraint,
2868        ) -> Result<(), ::fidl_next::ValidationError> {
2869            Ok(())
2870        }
2871    }
2872
2873    unsafe impl ::fidl_next::Wire for TaskProviderGetJobResponse {
2874        type Narrowed<'de> = TaskProviderGetJobResponse;
2875
2876        #[inline]
2877        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2878            ::fidl_next::munge! {
2879                let Self {
2880                    job,
2881
2882                } = &mut *out_;
2883            }
2884
2885            ::fidl_next::Wire::zero_padding(job);
2886        }
2887    }
2888
2889    unsafe impl<___D> ::fidl_next::Decode<___D> for TaskProviderGetJobResponse
2890    where
2891        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2892        ___D: ::fidl_next::fuchsia::HandleDecoder,
2893    {
2894        fn decode(
2895            slot_: ::fidl_next::Slot<'_, Self>,
2896            decoder_: &mut ___D,
2897            _: (),
2898        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2899            ::fidl_next::munge! {
2900                let Self {
2901                    mut job,
2902
2903                } = slot_;
2904            }
2905
2906            let _field = job.as_mut();
2907
2908            ::fidl_next::Decode::decode(job.as_mut(), decoder_, ())?;
2909
2910            Ok(())
2911        }
2912    }
2913
2914    impl ::fidl_next::IntoNatural for TaskProviderGetJobResponse {
2915        type Natural = crate::natural::TaskProviderGetJobResponse;
2916    }
2917}
2918
2919pub mod wire_optional {
2920
2921    pub use fidl_next_common_fuchsia_component_runner::wire_optional::*;
2922
2923    #[repr(transparent)]
2924    pub struct Task<'de> {
2925        pub(crate) raw: ::fidl_next::wire::Union,
2926        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2927    }
2928
2929    impl ::fidl_next::Constrained for Task<'_> {
2930        type Constraint = ();
2931
2932        fn validate(
2933            _: ::fidl_next::Slot<'_, Self>,
2934            _: Self::Constraint,
2935        ) -> Result<(), ::fidl_next::ValidationError> {
2936            Ok(())
2937        }
2938    }
2939
2940    unsafe impl ::fidl_next::Wire for Task<'static> {
2941        type Narrowed<'de> = Task<'de>;
2942
2943        #[inline]
2944        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2945            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2946            ::fidl_next::wire::Union::zero_padding(raw);
2947        }
2948    }
2949
2950    impl<'de> Task<'de> {
2951        pub fn is_some(&self) -> bool {
2952            self.raw.is_some()
2953        }
2954
2955        pub fn is_none(&self) -> bool {
2956            self.raw.is_none()
2957        }
2958
2959        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Task<'de>> {
2960            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
2961        }
2962
2963        pub fn into_option(self) -> ::core::option::Option<crate::wire::Task<'de>> {
2964            if self.is_some() {
2965                Some(crate::wire::Task { raw: self.raw, _phantom: ::core::marker::PhantomData })
2966            } else {
2967                None
2968            }
2969        }
2970    }
2971
2972    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Task<'de>
2973    where
2974        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2975        ___D: ::fidl_next::Decoder<'de>,
2976        ___D: ::fidl_next::fuchsia::HandleDecoder,
2977    {
2978        fn decode(
2979            mut slot: ::fidl_next::Slot<'_, Self>,
2980            decoder: &mut ___D,
2981            _: (),
2982        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2983            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2984            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
2985                1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Job>(
2986                    raw,
2987                    decoder,
2988                    (),
2989                )?,
2990
2991                2 => ::fidl_next::wire::Union::decode_as::<
2992                    ___D,
2993                    ::fidl_next::wire::fuchsia::Process,
2994                >(raw, decoder, ())?,
2995
2996                3 => {
2997                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Thread>(
2998                        raw,
2999                        decoder,
3000                        (),
3001                    )?
3002                }
3003
3004                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
3005                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3006            }
3007
3008            Ok(())
3009        }
3010    }
3011
3012    impl<'de> ::core::fmt::Debug for Task<'de> {
3013        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3014            self.as_ref().fmt(f)
3015        }
3016    }
3017
3018    impl<'de> ::fidl_next::IntoNatural for Task<'de> {
3019        type Natural = ::core::option::Option<crate::natural::Task>;
3020    }
3021}
3022
3023pub mod generic {
3024
3025    pub use fidl_next_common_fuchsia_component_runner::generic::*;
3026
3027    /// The generic type corresponding to [`ComponentControllerOnPublishDiagnosticsRequest`].
3028    pub struct ComponentControllerOnPublishDiagnosticsRequest<T0> {
3029        pub payload: T0,
3030    }
3031
3032    unsafe impl<___E, T0>
3033        ::fidl_next::Encode<
3034            crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
3035            ___E,
3036        > for ComponentControllerOnPublishDiagnosticsRequest<T0>
3037    where
3038        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3039        ___E: ::fidl_next::Encoder,
3040        ___E: ::fidl_next::fuchsia::HandleEncoder,
3041        T0: ::fidl_next::Encode<crate::wire::ComponentDiagnostics<'static>, ___E>,
3042    {
3043        #[inline]
3044        fn encode(
3045            self,
3046            encoder_: &mut ___E,
3047            out_: &mut ::core::mem::MaybeUninit<
3048                crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
3049            >,
3050            _: (),
3051        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3052            ::fidl_next::munge! {
3053                let crate::wire::ComponentControllerOnPublishDiagnosticsRequest {
3054                    payload,
3055
3056                } = out_;
3057            }
3058
3059            ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3060
3061            Ok(())
3062        }
3063    }
3064
3065    unsafe impl<'a, ___E, T0>
3066        ::fidl_next::Encode<
3067            crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
3068            ___E,
3069        > for &'a ComponentControllerOnPublishDiagnosticsRequest<T0>
3070    where
3071        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3072        ___E: ::fidl_next::Encoder,
3073        ___E: ::fidl_next::fuchsia::HandleEncoder,
3074        &'a T0: ::fidl_next::Encode<crate::wire::ComponentDiagnostics<'static>, ___E>,
3075    {
3076        #[inline]
3077        fn encode(
3078            self,
3079            encoder_: &mut ___E,
3080            out_: &mut ::core::mem::MaybeUninit<
3081                crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
3082            >,
3083            _: (),
3084        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3085            ::fidl_next::munge! {
3086                let crate::wire::ComponentControllerOnPublishDiagnosticsRequest {
3087                    payload,
3088
3089                } = out_;
3090            }
3091
3092            ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
3093
3094            Ok(())
3095        }
3096    }
3097
3098    /// The generic type corresponding to [`ComponentRunnerStartRequest`].
3099    pub struct ComponentRunnerStartRequest<T0, T1> {
3100        pub start_info: T0,
3101
3102        pub controller: T1,
3103    }
3104
3105    unsafe impl<___E, T0, T1>
3106        ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>
3107        for ComponentRunnerStartRequest<T0, T1>
3108    where
3109        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3110        ___E: ::fidl_next::Encoder,
3111        ___E: ::fidl_next::fuchsia::HandleEncoder,
3112        T0: ::fidl_next::Encode<crate::wire::ComponentStartInfo<'static>, ___E>,
3113        T1: ::fidl_next::Encode<
3114                ::fidl_next::ServerEnd<
3115                    crate::ComponentController,
3116                    ::fidl_next::wire::fuchsia::Channel,
3117                >,
3118                ___E,
3119            >,
3120    {
3121        #[inline]
3122        fn encode(
3123            self,
3124            encoder_: &mut ___E,
3125            out_: &mut ::core::mem::MaybeUninit<crate::wire::ComponentRunnerStartRequest<'static>>,
3126            _: (),
3127        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3128            ::fidl_next::munge! {
3129                let crate::wire::ComponentRunnerStartRequest {
3130                    start_info,
3131                    controller,
3132
3133                } = out_;
3134            }
3135
3136            ::fidl_next::Encode::encode(self.start_info, encoder_, start_info, ())?;
3137
3138            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
3139
3140            Ok(())
3141        }
3142    }
3143
3144    unsafe impl<'a, ___E, T0, T1>
3145        ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>
3146        for &'a ComponentRunnerStartRequest<T0, T1>
3147    where
3148        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3149        ___E: ::fidl_next::Encoder,
3150        ___E: ::fidl_next::fuchsia::HandleEncoder,
3151        &'a T0: ::fidl_next::Encode<crate::wire::ComponentStartInfo<'static>, ___E>,
3152        &'a T1: ::fidl_next::Encode<
3153                ::fidl_next::ServerEnd<
3154                    crate::ComponentController,
3155                    ::fidl_next::wire::fuchsia::Channel,
3156                >,
3157                ___E,
3158            >,
3159    {
3160        #[inline]
3161        fn encode(
3162            self,
3163            encoder_: &mut ___E,
3164            out_: &mut ::core::mem::MaybeUninit<crate::wire::ComponentRunnerStartRequest<'static>>,
3165            _: (),
3166        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3167            ::fidl_next::munge! {
3168                let crate::wire::ComponentRunnerStartRequest {
3169                    start_info,
3170                    controller,
3171
3172                } = out_;
3173            }
3174
3175            ::fidl_next::Encode::encode(&self.start_info, encoder_, start_info, ())?;
3176
3177            ::fidl_next::Encode::encode(&self.controller, encoder_, controller, ())?;
3178
3179            Ok(())
3180        }
3181    }
3182
3183    /// The generic type corresponding to [`TaskProviderGetJobResponse`].
3184    pub struct TaskProviderGetJobResponse<T0> {
3185        pub job: T0,
3186    }
3187
3188    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>
3189        for TaskProviderGetJobResponse<T0>
3190    where
3191        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3192        ___E: ::fidl_next::fuchsia::HandleEncoder,
3193        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Job, ___E>,
3194    {
3195        #[inline]
3196        fn encode(
3197            self,
3198            encoder_: &mut ___E,
3199            out_: &mut ::core::mem::MaybeUninit<crate::wire::TaskProviderGetJobResponse>,
3200            _: (),
3201        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3202            ::fidl_next::munge! {
3203                let crate::wire::TaskProviderGetJobResponse {
3204                    job,
3205
3206                } = out_;
3207            }
3208
3209            ::fidl_next::Encode::encode(self.job, encoder_, job, ())?;
3210
3211            Ok(())
3212        }
3213    }
3214
3215    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>
3216        for &'a TaskProviderGetJobResponse<T0>
3217    where
3218        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3219        ___E: ::fidl_next::fuchsia::HandleEncoder,
3220        &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Job, ___E>,
3221    {
3222        #[inline]
3223        fn encode(
3224            self,
3225            encoder_: &mut ___E,
3226            out_: &mut ::core::mem::MaybeUninit<crate::wire::TaskProviderGetJobResponse>,
3227            _: (),
3228        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3229            ::fidl_next::munge! {
3230                let crate::wire::TaskProviderGetJobResponse {
3231                    job,
3232
3233                } = out_;
3234            }
3235
3236            ::fidl_next::Encode::encode(&self.job, encoder_, job, ())?;
3237
3238            Ok(())
3239        }
3240    }
3241}
3242
3243pub use self::natural::*;
3244
3245/// The type corresponding to the ComponentController protocol.
3246#[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"]
3247#[derive(PartialEq, Debug)]
3248pub struct ComponentController;
3249
3250#[cfg(target_os = "fuchsia")]
3251impl ::fidl_next::HasTransport for ComponentController {
3252    type Transport = ::fidl_next::fuchsia::zx::Channel;
3253}
3254
3255pub mod component_controller {
3256    pub mod prelude {
3257        pub use crate::{
3258            ComponentController, ComponentControllerClientHandler,
3259            ComponentControllerLocalClientHandler, ComponentControllerLocalServerHandler,
3260            ComponentControllerServerHandler, component_controller,
3261        };
3262
3263        pub use crate::natural::ComponentControllerOnEscrowRequest;
3264
3265        pub use crate::natural::ComponentControllerOnPublishDiagnosticsRequest;
3266
3267        pub use crate::natural::ComponentStopInfo;
3268    }
3269
3270    pub struct Stop;
3271
3272    impl ::fidl_next::Method for Stop {
3273        const ORDINAL: u64 = 4804506821232171874;
3274        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3275            ::fidl_next::protocol::Flexibility::Strict;
3276
3277        type Protocol = crate::ComponentController;
3278
3279        type Request = ::fidl_next::wire::EmptyMessageBody;
3280    }
3281
3282    pub struct Kill;
3283
3284    impl ::fidl_next::Method for Kill {
3285        const ORDINAL: u64 = 4514346391631670964;
3286        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3287            ::fidl_next::protocol::Flexibility::Strict;
3288
3289        type Protocol = crate::ComponentController;
3290
3291        type Request = ::fidl_next::wire::EmptyMessageBody;
3292    }
3293
3294    pub struct OnPublishDiagnostics;
3295
3296    impl ::fidl_next::Method for OnPublishDiagnostics {
3297        const ORDINAL: u64 = 2240216199992207687;
3298        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3299            ::fidl_next::protocol::Flexibility::Strict;
3300
3301        type Protocol = crate::ComponentController;
3302
3303        type Request = crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>;
3304    }
3305
3306    pub struct OnEscrow;
3307
3308    impl ::fidl_next::Method for OnEscrow {
3309        const ORDINAL: u64 = 730448769712342012;
3310        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3311            ::fidl_next::protocol::Flexibility::Flexible;
3312
3313        type Protocol = crate::ComponentController;
3314
3315        type Request = crate::wire::ComponentControllerOnEscrowRequest<'static>;
3316    }
3317
3318    pub struct OnStop;
3319
3320    impl ::fidl_next::Method for OnStop {
3321        const ORDINAL: u64 = 4322651556509354674;
3322        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3323            ::fidl_next::protocol::Flexibility::Flexible;
3324
3325        type Protocol = crate::ComponentController;
3326
3327        type Request = crate::wire::ComponentStopInfo<'static>;
3328    }
3329
3330    mod ___detail {
3331        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ComponentController
3332        where
3333            ___T: ::fidl_next::Transport,
3334        {
3335            type Client = ComponentControllerClient<___T>;
3336            type Server = ComponentControllerServer<___T>;
3337        }
3338
3339        /// The client for the `ComponentController` protocol.
3340        #[repr(transparent)]
3341        pub struct ComponentControllerClient<___T: ::fidl_next::Transport> {
3342            #[allow(dead_code)]
3343            client: ::fidl_next::protocol::Client<___T>,
3344        }
3345
3346        impl<___T> ComponentControllerClient<___T>
3347        where
3348            ___T: ::fidl_next::Transport,
3349        {
3350            #[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"]
3351            pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3352                ::fidl_next::SendFuture::from_untyped(
3353                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
3354                        4804506821232171874,
3355                        <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
3356                        (),
3357                    ),
3358                )
3359            }
3360
3361            #[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"]
3362            pub fn kill(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3363                ::fidl_next::SendFuture::from_untyped(
3364                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
3365                        4514346391631670964,
3366                        <super::Kill as ::fidl_next::Method>::FLEXIBILITY,
3367                        (),
3368                    ),
3369                )
3370            }
3371        }
3372
3373        /// The server for the `ComponentController` protocol.
3374        #[repr(transparent)]
3375        pub struct ComponentControllerServer<___T: ::fidl_next::Transport> {
3376            server: ::fidl_next::protocol::Server<___T>,
3377        }
3378
3379        impl<___T> ComponentControllerServer<___T>
3380        where
3381            ___T: ::fidl_next::Transport,
3382        {
3383            #[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"]
3384            pub fn on_publish_diagnostics(
3385                &self,
3386
3387                payload: impl ::fidl_next::Encode<
3388                    crate::wire::ComponentDiagnostics<'static>,
3389                    <___T as ::fidl_next::Transport>::SendBuffer,
3390                >,
3391            ) -> ::fidl_next::SendFuture<'_, ___T>
3392            where
3393                <___T as ::fidl_next::Transport>::SendBuffer:
3394                    ::fidl_next::encoder::InternalHandleEncoder,
3395                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3396                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3397            {
3398                self.on_publish_diagnostics_with(
3399                    crate::generic::ComponentControllerOnPublishDiagnosticsRequest { payload },
3400                )
3401            }
3402
3403            #[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"]
3404
3405            pub fn on_publish_diagnostics_with<___R>(
3406                &self,
3407                request: ___R,
3408            ) -> ::fidl_next::SendFuture<'_, ___T>
3409            where
3410                ___R: ::fidl_next::Encode<
3411                        <super::OnPublishDiagnostics as ::fidl_next::Method>::Request,
3412                        <___T as ::fidl_next::Transport>::SendBuffer,
3413                    >,
3414            {
3415                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3416                    2240216199992207687,
3417                    <super::OnPublishDiagnostics as ::fidl_next::Method>::FLEXIBILITY,
3418                    request,
3419                ))
3420            }
3421
3422            #[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"]
3423
3424            pub fn on_escrow_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3425            where
3426                ___R: ::fidl_next::Encode<
3427                        <super::OnEscrow as ::fidl_next::Method>::Request,
3428                        <___T as ::fidl_next::Transport>::SendBuffer,
3429                    >,
3430            {
3431                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3432                    730448769712342012,
3433                    <super::OnEscrow as ::fidl_next::Method>::FLEXIBILITY,
3434                    request,
3435                ))
3436            }
3437
3438            #[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"]
3439
3440            pub fn on_stop_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3441            where
3442                ___R: ::fidl_next::Encode<
3443                        <super::OnStop as ::fidl_next::Method>::Request,
3444                        <___T as ::fidl_next::Transport>::SendBuffer,
3445                    >,
3446            {
3447                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3448                    4322651556509354674,
3449                    <super::OnStop as ::fidl_next::Method>::FLEXIBILITY,
3450                    request,
3451                ))
3452            }
3453        }
3454    }
3455}
3456
3457#[diagnostic::on_unimplemented(
3458    note = "If {Self} implements the non-local ComponentControllerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3459)]
3460
3461/// A client handler for the ComponentController protocol.
3462///
3463/// See [`ComponentController`] for more details.
3464pub trait ComponentControllerLocalClientHandler<
3465    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3466    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3467>
3468{
3469    #[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"]
3470    fn on_publish_diagnostics(
3471        &mut self,
3472
3473        request: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3474    ) -> impl ::core::future::Future<Output = ()>;
3475
3476    #[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"]
3477    fn on_escrow(
3478        &mut self,
3479
3480        request: ::fidl_next::Request<component_controller::OnEscrow, ___T>,
3481    ) -> impl ::core::future::Future<Output = ()>;
3482
3483    #[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"]
3484    fn on_stop(
3485        &mut self,
3486
3487        request: ::fidl_next::Request<component_controller::OnStop, ___T>,
3488    ) -> impl ::core::future::Future<Output = ()>;
3489
3490    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
3491        ::core::future::ready(())
3492    }
3493}
3494
3495impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ComponentController
3496where
3497    ___H: ComponentControllerLocalClientHandler<___T>,
3498    ___T: ::fidl_next::Transport,
3499    for<'de> crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>: ::fidl_next::Decode<
3500            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3501            Constraint = (),
3502        >,
3503    for<'de> crate::wire::ComponentControllerOnEscrowRequest<'de>: ::fidl_next::Decode<
3504            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3505            Constraint = (),
3506        >,
3507    for<'de> crate::wire::ComponentStopInfo<'de>: ::fidl_next::Decode<
3508            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3509            Constraint = (),
3510        >,
3511{
3512    async fn on_event(
3513        handler: &mut ___H,
3514        mut message: ::fidl_next::Message<___T>,
3515    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3516        match *message.header().ordinal {
3517            2240216199992207687 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3518                Ok(decoded) => {
3519                    handler
3520                        .on_publish_diagnostics(::fidl_next::Request::from_decoded(decoded))
3521                        .await;
3522                    Ok(())
3523                }
3524                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3525                    ordinal: 2240216199992207687,
3526                    error,
3527                }),
3528            },
3529
3530            730448769712342012 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3531                Ok(decoded) => {
3532                    handler.on_escrow(::fidl_next::Request::from_decoded(decoded)).await;
3533                    Ok(())
3534                }
3535                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3536                    ordinal: 730448769712342012,
3537                    error,
3538                }),
3539            },
3540
3541            4322651556509354674 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3542                Ok(decoded) => {
3543                    handler.on_stop(::fidl_next::Request::from_decoded(decoded)).await;
3544                    Ok(())
3545                }
3546                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3547                    ordinal: 4322651556509354674,
3548                    error,
3549                }),
3550            },
3551
3552            ordinal => {
3553                handler.on_unknown_interaction(ordinal).await;
3554                if ::core::matches!(
3555                    message.header().flexibility(),
3556                    ::fidl_next::protocol::Flexibility::Strict
3557                ) {
3558                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3559                } else {
3560                    Ok(())
3561                }
3562            }
3563        }
3564    }
3565}
3566
3567#[diagnostic::on_unimplemented(
3568    note = "If {Self} implements the non-local ComponentControllerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3569)]
3570
3571/// A server handler for the ComponentController protocol.
3572///
3573/// See [`ComponentController`] for more details.
3574pub trait ComponentControllerLocalServerHandler<
3575    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3576    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3577>
3578{
3579    #[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"]
3580    fn stop(&mut self) -> impl ::core::future::Future<Output = ()>;
3581
3582    #[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"]
3583    fn kill(&mut self) -> impl ::core::future::Future<Output = ()>;
3584
3585    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
3586        ::core::future::ready(())
3587    }
3588}
3589
3590impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ComponentController
3591where
3592    ___H: ComponentControllerLocalServerHandler<___T>,
3593    ___T: ::fidl_next::Transport,
3594{
3595    async fn on_one_way(
3596        handler: &mut ___H,
3597        mut message: ::fidl_next::Message<___T>,
3598    ) -> ::core::result::Result<
3599        (),
3600        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3601    > {
3602        match *message.header().ordinal {
3603            4804506821232171874 => {
3604                handler.stop().await;
3605                Ok(())
3606            }
3607
3608            4514346391631670964 => {
3609                handler.kill().await;
3610                Ok(())
3611            }
3612
3613            ordinal => {
3614                handler.on_unknown_interaction(ordinal).await;
3615                if ::core::matches!(
3616                    message.header().flexibility(),
3617                    ::fidl_next::protocol::Flexibility::Strict
3618                ) {
3619                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3620                } else {
3621                    Ok(())
3622                }
3623            }
3624        }
3625    }
3626
3627    async fn on_two_way(
3628        handler: &mut ___H,
3629        mut message: ::fidl_next::Message<___T>,
3630        responder: ::fidl_next::protocol::Responder<___T>,
3631    ) -> ::core::result::Result<
3632        (),
3633        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3634    > {
3635        match *message.header().ordinal {
3636            ordinal => {
3637                handler.on_unknown_interaction(ordinal).await;
3638                if ::core::matches!(
3639                    message.header().flexibility(),
3640                    ::fidl_next::protocol::Flexibility::Strict
3641                ) {
3642                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3643                } else {
3644                    responder
3645                        .respond_framework_error(
3646                            ordinal,
3647                            ::fidl_next::FrameworkError::UnknownMethod,
3648                        )
3649                        .expect("encoding a framework error should never fail")
3650                        .await?;
3651                    Ok(())
3652                }
3653            }
3654        }
3655    }
3656}
3657
3658/// A client handler for the ComponentController protocol.
3659///
3660/// See [`ComponentController`] for more details.
3661pub trait ComponentControllerClientHandler<
3662    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3663    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3664>
3665{
3666    #[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"]
3667    fn on_publish_diagnostics(
3668        &mut self,
3669
3670        request: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3671    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3672
3673    #[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"]
3674    fn on_escrow(
3675        &mut self,
3676
3677        request: ::fidl_next::Request<component_controller::OnEscrow, ___T>,
3678    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3679
3680    #[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"]
3681    fn on_stop(
3682        &mut self,
3683
3684        request: ::fidl_next::Request<component_controller::OnStop, ___T>,
3685    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3686
3687    fn on_unknown_interaction(
3688        &mut self,
3689        ordinal: u64,
3690    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3691        ::core::future::ready(())
3692    }
3693}
3694
3695impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ComponentController
3696where
3697    ___H: ComponentControllerClientHandler<___T> + ::core::marker::Send,
3698    ___T: ::fidl_next::Transport,
3699    for<'de> crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>: ::fidl_next::Decode<
3700            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3701            Constraint = (),
3702        >,
3703    for<'de> crate::wire::ComponentControllerOnEscrowRequest<'de>: ::fidl_next::Decode<
3704            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3705            Constraint = (),
3706        >,
3707    for<'de> crate::wire::ComponentStopInfo<'de>: ::fidl_next::Decode<
3708            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3709            Constraint = (),
3710        >,
3711{
3712    async fn on_event(
3713        handler: &mut ___H,
3714        mut message: ::fidl_next::Message<___T>,
3715    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3716        match *message.header().ordinal {
3717            2240216199992207687 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3718                Ok(decoded) => {
3719                    handler
3720                        .on_publish_diagnostics(::fidl_next::Request::from_decoded(decoded))
3721                        .await;
3722                    Ok(())
3723                }
3724                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3725                    ordinal: 2240216199992207687,
3726                    error,
3727                }),
3728            },
3729
3730            730448769712342012 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3731                Ok(decoded) => {
3732                    handler.on_escrow(::fidl_next::Request::from_decoded(decoded)).await;
3733                    Ok(())
3734                }
3735                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3736                    ordinal: 730448769712342012,
3737                    error,
3738                }),
3739            },
3740
3741            4322651556509354674 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3742                Ok(decoded) => {
3743                    handler.on_stop(::fidl_next::Request::from_decoded(decoded)).await;
3744                    Ok(())
3745                }
3746                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3747                    ordinal: 4322651556509354674,
3748                    error,
3749                }),
3750            },
3751
3752            ordinal => {
3753                handler.on_unknown_interaction(ordinal).await;
3754                if ::core::matches!(
3755                    message.header().flexibility(),
3756                    ::fidl_next::protocol::Flexibility::Strict
3757                ) {
3758                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3759                } else {
3760                    Ok(())
3761                }
3762            }
3763        }
3764    }
3765}
3766
3767/// A server handler for the ComponentController protocol.
3768///
3769/// See [`ComponentController`] for more details.
3770pub trait ComponentControllerServerHandler<
3771    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3772    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3773>
3774{
3775    #[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"]
3776    fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3777
3778    #[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"]
3779    fn kill(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3780
3781    fn on_unknown_interaction(
3782        &mut self,
3783        ordinal: u64,
3784    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3785        ::core::future::ready(())
3786    }
3787}
3788
3789impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ComponentController
3790where
3791    ___H: ComponentControllerServerHandler<___T> + ::core::marker::Send,
3792    ___T: ::fidl_next::Transport,
3793{
3794    async fn on_one_way(
3795        handler: &mut ___H,
3796        mut message: ::fidl_next::Message<___T>,
3797    ) -> ::core::result::Result<
3798        (),
3799        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3800    > {
3801        match *message.header().ordinal {
3802            4804506821232171874 => {
3803                handler.stop().await;
3804                Ok(())
3805            }
3806
3807            4514346391631670964 => {
3808                handler.kill().await;
3809                Ok(())
3810            }
3811
3812            ordinal => {
3813                handler.on_unknown_interaction(ordinal).await;
3814                if ::core::matches!(
3815                    message.header().flexibility(),
3816                    ::fidl_next::protocol::Flexibility::Strict
3817                ) {
3818                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3819                } else {
3820                    Ok(())
3821                }
3822            }
3823        }
3824    }
3825
3826    async fn on_two_way(
3827        handler: &mut ___H,
3828        mut message: ::fidl_next::Message<___T>,
3829        responder: ::fidl_next::protocol::Responder<___T>,
3830    ) -> ::core::result::Result<
3831        (),
3832        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3833    > {
3834        match *message.header().ordinal {
3835            ordinal => {
3836                handler.on_unknown_interaction(ordinal).await;
3837                if ::core::matches!(
3838                    message.header().flexibility(),
3839                    ::fidl_next::protocol::Flexibility::Strict
3840                ) {
3841                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3842                } else {
3843                    responder
3844                        .respond_framework_error(
3845                            ordinal,
3846                            ::fidl_next::FrameworkError::UnknownMethod,
3847                        )
3848                        .expect("encoding a framework error should never fail")
3849                        .await?;
3850                    Ok(())
3851                }
3852            }
3853        }
3854    }
3855}
3856
3857impl<___T> ComponentControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
3858where
3859    ___T: ::fidl_next::Transport,
3860{
3861    async fn on_publish_diagnostics(
3862        &mut self,
3863
3864        _: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3865    ) {
3866    }
3867
3868    async fn on_escrow(&mut self, _: ::fidl_next::Request<component_controller::OnEscrow, ___T>) {}
3869
3870    async fn on_stop(&mut self, _: ::fidl_next::Request<component_controller::OnStop, ___T>) {}
3871
3872    async fn on_unknown_interaction(&mut self, _: u64) {}
3873}
3874
3875impl<___H, ___T> ComponentControllerLocalClientHandler<___T> for ::fidl_next::Local<___H>
3876where
3877    ___H: ComponentControllerClientHandler<___T>,
3878    ___T: ::fidl_next::Transport,
3879{
3880    async fn on_publish_diagnostics(
3881        &mut self,
3882
3883        request: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3884    ) {
3885        ___H::on_publish_diagnostics(&mut self.0, request).await
3886    }
3887
3888    async fn on_escrow(
3889        &mut self,
3890
3891        request: ::fidl_next::Request<component_controller::OnEscrow, ___T>,
3892    ) {
3893        ___H::on_escrow(&mut self.0, request).await
3894    }
3895
3896    async fn on_stop(&mut self, request: ::fidl_next::Request<component_controller::OnStop, ___T>) {
3897        ___H::on_stop(&mut self.0, request).await
3898    }
3899
3900    async fn on_unknown_interaction(&mut self, ordinal: u64) {
3901        ___H::on_unknown_interaction(&mut self.0, ordinal).await
3902    }
3903}
3904
3905impl<___H, ___T> ComponentControllerLocalServerHandler<___T> for ::fidl_next::Local<___H>
3906where
3907    ___H: ComponentControllerServerHandler<___T>,
3908    ___T: ::fidl_next::Transport,
3909{
3910    async fn stop(&mut self) {
3911        ___H::stop(&mut self.0).await
3912    }
3913
3914    async fn kill(&mut self) {
3915        ___H::kill(&mut self.0).await
3916    }
3917
3918    async fn on_unknown_interaction(&mut self, ordinal: u64) {
3919        ___H::on_unknown_interaction(&mut self.0, ordinal).await
3920    }
3921}
3922
3923/// The type corresponding to the ComponentRunner protocol.
3924#[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"]
3925#[derive(PartialEq, Debug)]
3926pub struct ComponentRunner;
3927
3928impl ::fidl_next::Discoverable for ComponentRunner {
3929    const PROTOCOL_NAME: &'static str = "fuchsia.component.runner.ComponentRunner";
3930}
3931
3932#[cfg(target_os = "fuchsia")]
3933impl ::fidl_next::HasTransport for ComponentRunner {
3934    type Transport = ::fidl_next::fuchsia::zx::Channel;
3935}
3936
3937pub mod component_runner {
3938    pub mod prelude {
3939        pub use crate::{
3940            ComponentRunner, ComponentRunnerClientHandler, ComponentRunnerLocalClientHandler,
3941            ComponentRunnerLocalServerHandler, ComponentRunnerServerHandler, component_runner,
3942        };
3943
3944        pub use crate::natural::ComponentRunnerStartRequest;
3945    }
3946
3947    pub struct Start;
3948
3949    impl ::fidl_next::Method for Start {
3950        const ORDINAL: u64 = 780715659970866697;
3951        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3952            ::fidl_next::protocol::Flexibility::Strict;
3953
3954        type Protocol = crate::ComponentRunner;
3955
3956        type Request = crate::wire::ComponentRunnerStartRequest<'static>;
3957    }
3958
3959    mod ___detail {
3960        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ComponentRunner
3961        where
3962            ___T: ::fidl_next::Transport,
3963        {
3964            type Client = ComponentRunnerClient<___T>;
3965            type Server = ComponentRunnerServer<___T>;
3966        }
3967
3968        /// The client for the `ComponentRunner` protocol.
3969        #[repr(transparent)]
3970        pub struct ComponentRunnerClient<___T: ::fidl_next::Transport> {
3971            #[allow(dead_code)]
3972            client: ::fidl_next::protocol::Client<___T>,
3973        }
3974
3975        impl<___T> ComponentRunnerClient<___T>
3976        where
3977            ___T: ::fidl_next::Transport,
3978        {
3979            #[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"]
3980            pub fn start(
3981                &self,
3982
3983                start_info: impl ::fidl_next::Encode<
3984                    crate::wire::ComponentStartInfo<'static>,
3985                    <___T as ::fidl_next::Transport>::SendBuffer,
3986                >,
3987
3988                controller: impl ::fidl_next::Encode<
3989                    ::fidl_next::ServerEnd<
3990                        crate::ComponentController,
3991                        ::fidl_next::wire::fuchsia::Channel,
3992                    >,
3993                    <___T as ::fidl_next::Transport>::SendBuffer,
3994                >,
3995            ) -> ::fidl_next::SendFuture<'_, ___T>
3996            where
3997                <___T as ::fidl_next::Transport>::SendBuffer:
3998                    ::fidl_next::encoder::InternalHandleEncoder,
3999                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4000                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4001            {
4002                self.start_with(crate::generic::ComponentRunnerStartRequest {
4003                    start_info,
4004
4005                    controller,
4006                })
4007            }
4008
4009            #[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"]
4010            pub fn start_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
4011            where
4012                ___R: ::fidl_next::Encode<
4013                        crate::wire::ComponentRunnerStartRequest<'static>,
4014                        <___T as ::fidl_next::Transport>::SendBuffer,
4015                    >,
4016            {
4017                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
4018                    780715659970866697,
4019                    <super::Start as ::fidl_next::Method>::FLEXIBILITY,
4020                    request,
4021                ))
4022            }
4023        }
4024
4025        /// The server for the `ComponentRunner` protocol.
4026        #[repr(transparent)]
4027        pub struct ComponentRunnerServer<___T: ::fidl_next::Transport> {
4028            server: ::fidl_next::protocol::Server<___T>,
4029        }
4030
4031        impl<___T> ComponentRunnerServer<___T> where ___T: ::fidl_next::Transport {}
4032    }
4033}
4034
4035#[diagnostic::on_unimplemented(
4036    note = "If {Self} implements the non-local ComponentRunnerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4037)]
4038
4039/// A client handler for the ComponentRunner protocol.
4040///
4041/// See [`ComponentRunner`] for more details.
4042pub trait ComponentRunnerLocalClientHandler<
4043    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4044    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4045>
4046{
4047    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
4048        ::core::future::ready(())
4049    }
4050}
4051
4052impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ComponentRunner
4053where
4054    ___H: ComponentRunnerLocalClientHandler<___T>,
4055    ___T: ::fidl_next::Transport,
4056{
4057    async fn on_event(
4058        handler: &mut ___H,
4059        mut message: ::fidl_next::Message<___T>,
4060    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4061        match *message.header().ordinal {
4062            ordinal => {
4063                handler.on_unknown_interaction(ordinal).await;
4064                if ::core::matches!(
4065                    message.header().flexibility(),
4066                    ::fidl_next::protocol::Flexibility::Strict
4067                ) {
4068                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4069                } else {
4070                    Ok(())
4071                }
4072            }
4073        }
4074    }
4075}
4076
4077#[diagnostic::on_unimplemented(
4078    note = "If {Self} implements the non-local ComponentRunnerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4079)]
4080
4081/// A server handler for the ComponentRunner protocol.
4082///
4083/// See [`ComponentRunner`] for more details.
4084pub trait ComponentRunnerLocalServerHandler<
4085    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4086    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4087>
4088{
4089    #[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"]
4090    fn start(
4091        &mut self,
4092
4093        request: ::fidl_next::Request<component_runner::Start, ___T>,
4094    ) -> impl ::core::future::Future<Output = ()>;
4095
4096    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
4097        ::core::future::ready(())
4098    }
4099}
4100
4101impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ComponentRunner
4102where
4103    ___H: ComponentRunnerLocalServerHandler<___T>,
4104    ___T: ::fidl_next::Transport,
4105    for<'de> crate::wire::ComponentRunnerStartRequest<'de>: ::fidl_next::Decode<
4106            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4107            Constraint = (),
4108        >,
4109{
4110    async fn on_one_way(
4111        handler: &mut ___H,
4112        mut message: ::fidl_next::Message<___T>,
4113    ) -> ::core::result::Result<
4114        (),
4115        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4116    > {
4117        match *message.header().ordinal {
4118            780715659970866697 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
4119                Ok(decoded) => {
4120                    handler.start(::fidl_next::Request::from_decoded(decoded)).await;
4121                    Ok(())
4122                }
4123                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4124                    ordinal: 780715659970866697,
4125                    error,
4126                }),
4127            },
4128
4129            ordinal => {
4130                handler.on_unknown_interaction(ordinal).await;
4131                if ::core::matches!(
4132                    message.header().flexibility(),
4133                    ::fidl_next::protocol::Flexibility::Strict
4134                ) {
4135                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4136                } else {
4137                    Ok(())
4138                }
4139            }
4140        }
4141    }
4142
4143    async fn on_two_way(
4144        handler: &mut ___H,
4145        mut message: ::fidl_next::Message<___T>,
4146        responder: ::fidl_next::protocol::Responder<___T>,
4147    ) -> ::core::result::Result<
4148        (),
4149        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4150    > {
4151        match *message.header().ordinal {
4152            ordinal => {
4153                handler.on_unknown_interaction(ordinal).await;
4154                if ::core::matches!(
4155                    message.header().flexibility(),
4156                    ::fidl_next::protocol::Flexibility::Strict
4157                ) {
4158                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4159                } else {
4160                    responder
4161                        .respond_framework_error(
4162                            ordinal,
4163                            ::fidl_next::FrameworkError::UnknownMethod,
4164                        )
4165                        .expect("encoding a framework error should never fail")
4166                        .await?;
4167                    Ok(())
4168                }
4169            }
4170        }
4171    }
4172}
4173
4174/// A client handler for the ComponentRunner protocol.
4175///
4176/// See [`ComponentRunner`] for more details.
4177pub trait ComponentRunnerClientHandler<
4178    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4179    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4180>
4181{
4182    fn on_unknown_interaction(
4183        &mut self,
4184        ordinal: u64,
4185    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4186        ::core::future::ready(())
4187    }
4188}
4189
4190impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ComponentRunner
4191where
4192    ___H: ComponentRunnerClientHandler<___T> + ::core::marker::Send,
4193    ___T: ::fidl_next::Transport,
4194{
4195    async fn on_event(
4196        handler: &mut ___H,
4197        mut message: ::fidl_next::Message<___T>,
4198    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4199        match *message.header().ordinal {
4200            ordinal => {
4201                handler.on_unknown_interaction(ordinal).await;
4202                if ::core::matches!(
4203                    message.header().flexibility(),
4204                    ::fidl_next::protocol::Flexibility::Strict
4205                ) {
4206                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4207                } else {
4208                    Ok(())
4209                }
4210            }
4211        }
4212    }
4213}
4214
4215/// A server handler for the ComponentRunner protocol.
4216///
4217/// See [`ComponentRunner`] for more details.
4218pub trait ComponentRunnerServerHandler<
4219    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4220    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4221>
4222{
4223    #[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"]
4224    fn start(
4225        &mut self,
4226
4227        request: ::fidl_next::Request<component_runner::Start, ___T>,
4228    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4229
4230    fn on_unknown_interaction(
4231        &mut self,
4232        ordinal: u64,
4233    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4234        ::core::future::ready(())
4235    }
4236}
4237
4238impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ComponentRunner
4239where
4240    ___H: ComponentRunnerServerHandler<___T> + ::core::marker::Send,
4241    ___T: ::fidl_next::Transport,
4242    for<'de> crate::wire::ComponentRunnerStartRequest<'de>: ::fidl_next::Decode<
4243            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4244            Constraint = (),
4245        >,
4246{
4247    async fn on_one_way(
4248        handler: &mut ___H,
4249        mut message: ::fidl_next::Message<___T>,
4250    ) -> ::core::result::Result<
4251        (),
4252        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4253    > {
4254        match *message.header().ordinal {
4255            780715659970866697 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
4256                Ok(decoded) => {
4257                    handler.start(::fidl_next::Request::from_decoded(decoded)).await;
4258                    Ok(())
4259                }
4260                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4261                    ordinal: 780715659970866697,
4262                    error,
4263                }),
4264            },
4265
4266            ordinal => {
4267                handler.on_unknown_interaction(ordinal).await;
4268                if ::core::matches!(
4269                    message.header().flexibility(),
4270                    ::fidl_next::protocol::Flexibility::Strict
4271                ) {
4272                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4273                } else {
4274                    Ok(())
4275                }
4276            }
4277        }
4278    }
4279
4280    async fn on_two_way(
4281        handler: &mut ___H,
4282        mut message: ::fidl_next::Message<___T>,
4283        responder: ::fidl_next::protocol::Responder<___T>,
4284    ) -> ::core::result::Result<
4285        (),
4286        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4287    > {
4288        match *message.header().ordinal {
4289            ordinal => {
4290                handler.on_unknown_interaction(ordinal).await;
4291                if ::core::matches!(
4292                    message.header().flexibility(),
4293                    ::fidl_next::protocol::Flexibility::Strict
4294                ) {
4295                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4296                } else {
4297                    responder
4298                        .respond_framework_error(
4299                            ordinal,
4300                            ::fidl_next::FrameworkError::UnknownMethod,
4301                        )
4302                        .expect("encoding a framework error should never fail")
4303                        .await?;
4304                    Ok(())
4305                }
4306            }
4307        }
4308    }
4309}
4310
4311impl<___T> ComponentRunnerClientHandler<___T> for ::fidl_next::IgnoreEvents
4312where
4313    ___T: ::fidl_next::Transport,
4314{
4315    async fn on_unknown_interaction(&mut self, _: u64) {}
4316}
4317
4318impl<___H, ___T> ComponentRunnerLocalClientHandler<___T> for ::fidl_next::Local<___H>
4319where
4320    ___H: ComponentRunnerClientHandler<___T>,
4321    ___T: ::fidl_next::Transport,
4322{
4323    async fn on_unknown_interaction(&mut self, ordinal: u64) {
4324        ___H::on_unknown_interaction(&mut self.0, ordinal).await
4325    }
4326}
4327
4328impl<___H, ___T> ComponentRunnerLocalServerHandler<___T> for ::fidl_next::Local<___H>
4329where
4330    ___H: ComponentRunnerServerHandler<___T>,
4331    ___T: ::fidl_next::Transport,
4332{
4333    async fn start(&mut self, request: ::fidl_next::Request<component_runner::Start, ___T>) {
4334        ___H::start(&mut self.0, request).await
4335    }
4336
4337    async fn on_unknown_interaction(&mut self, ordinal: u64) {
4338        ___H::on_unknown_interaction(&mut self.0, ordinal).await
4339    }
4340}
4341
4342/// The type corresponding to the TaskProvider protocol.
4343#[doc = " Served by runners that want to make a zircon job available through their runtime directory.\n"]
4344#[derive(PartialEq, Debug)]
4345pub struct TaskProvider;
4346
4347impl ::fidl_next::Discoverable for TaskProvider {
4348    const PROTOCOL_NAME: &'static str = "fuchsia.component.runner.TaskProvider";
4349}
4350
4351#[cfg(target_os = "fuchsia")]
4352impl ::fidl_next::HasTransport for TaskProvider {
4353    type Transport = ::fidl_next::fuchsia::zx::Channel;
4354}
4355
4356pub mod task_provider {
4357    pub mod prelude {
4358        pub use crate::{
4359            TaskProvider, TaskProviderClientHandler, TaskProviderLocalClientHandler,
4360            TaskProviderLocalServerHandler, TaskProviderServerHandler, task_provider,
4361        };
4362
4363        pub use crate::natural::TaskProviderGetJobResponse;
4364    }
4365
4366    pub struct GetJob;
4367
4368    impl ::fidl_next::Method for GetJob {
4369        const ORDINAL: u64 = 5520468615388521389;
4370        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4371            ::fidl_next::protocol::Flexibility::Strict;
4372
4373        type Protocol = crate::TaskProvider;
4374
4375        type Request = ::fidl_next::wire::EmptyMessageBody;
4376    }
4377
4378    impl ::fidl_next::TwoWayMethod for GetJob {
4379        type Response = ::fidl_next::wire::Result<
4380            'static,
4381            crate::wire::TaskProviderGetJobResponse,
4382            ::fidl_next::wire::fuchsia::Status,
4383        >;
4384    }
4385
4386    impl<___R> ::fidl_next::Respond<___R> for GetJob {
4387        type Output = ::core::result::Result<
4388            crate::generic::TaskProviderGetJobResponse<___R>,
4389            ::fidl_next::never::Never,
4390        >;
4391
4392        fn respond(response: ___R) -> Self::Output {
4393            ::core::result::Result::Ok(crate::generic::TaskProviderGetJobResponse { job: response })
4394        }
4395    }
4396
4397    impl<___R> ::fidl_next::RespondErr<___R> for GetJob {
4398        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4399
4400        fn respond_err(response: ___R) -> Self::Output {
4401            ::core::result::Result::Err(response)
4402        }
4403    }
4404
4405    mod ___detail {
4406        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::TaskProvider
4407        where
4408            ___T: ::fidl_next::Transport,
4409        {
4410            type Client = TaskProviderClient<___T>;
4411            type Server = TaskProviderServer<___T>;
4412        }
4413
4414        /// The client for the `TaskProvider` protocol.
4415        #[repr(transparent)]
4416        pub struct TaskProviderClient<___T: ::fidl_next::Transport> {
4417            #[allow(dead_code)]
4418            client: ::fidl_next::protocol::Client<___T>,
4419        }
4420
4421        impl<___T> TaskProviderClient<___T>
4422        where
4423            ___T: ::fidl_next::Transport,
4424        {
4425            #[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"]
4426            pub fn get_job(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetJob, ___T> {
4427                ::fidl_next::TwoWayFuture::from_untyped(
4428                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
4429                        5520468615388521389,
4430                        <super::GetJob as ::fidl_next::Method>::FLEXIBILITY,
4431                        (),
4432                    ),
4433                )
4434            }
4435        }
4436
4437        /// The server for the `TaskProvider` protocol.
4438        #[repr(transparent)]
4439        pub struct TaskProviderServer<___T: ::fidl_next::Transport> {
4440            server: ::fidl_next::protocol::Server<___T>,
4441        }
4442
4443        impl<___T> TaskProviderServer<___T> where ___T: ::fidl_next::Transport {}
4444    }
4445}
4446
4447#[diagnostic::on_unimplemented(
4448    note = "If {Self} implements the non-local TaskProviderClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4449)]
4450
4451/// A client handler for the TaskProvider protocol.
4452///
4453/// See [`TaskProvider`] for more details.
4454pub trait TaskProviderLocalClientHandler<
4455    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4456    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4457>
4458{
4459    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
4460        ::core::future::ready(())
4461    }
4462}
4463
4464impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for TaskProvider
4465where
4466    ___H: TaskProviderLocalClientHandler<___T>,
4467    ___T: ::fidl_next::Transport,
4468{
4469    async fn on_event(
4470        handler: &mut ___H,
4471        mut message: ::fidl_next::Message<___T>,
4472    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4473        match *message.header().ordinal {
4474            ordinal => {
4475                handler.on_unknown_interaction(ordinal).await;
4476                if ::core::matches!(
4477                    message.header().flexibility(),
4478                    ::fidl_next::protocol::Flexibility::Strict
4479                ) {
4480                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4481                } else {
4482                    Ok(())
4483                }
4484            }
4485        }
4486    }
4487}
4488
4489#[diagnostic::on_unimplemented(
4490    note = "If {Self} implements the non-local TaskProviderServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4491)]
4492
4493/// A server handler for the TaskProvider protocol.
4494///
4495/// See [`TaskProvider`] for more details.
4496pub trait TaskProviderLocalServerHandler<
4497    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4498    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4499>
4500{
4501    #[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"]
4502    fn get_job(
4503        &mut self,
4504
4505        responder: ::fidl_next::Responder<task_provider::GetJob, ___T>,
4506    ) -> impl ::core::future::Future<Output = ()>;
4507
4508    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
4509        ::core::future::ready(())
4510    }
4511}
4512
4513impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for TaskProvider
4514where
4515    ___H: TaskProviderLocalServerHandler<___T>,
4516    ___T: ::fidl_next::Transport,
4517{
4518    async fn on_one_way(
4519        handler: &mut ___H,
4520        mut message: ::fidl_next::Message<___T>,
4521    ) -> ::core::result::Result<
4522        (),
4523        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4524    > {
4525        match *message.header().ordinal {
4526            ordinal => {
4527                handler.on_unknown_interaction(ordinal).await;
4528                if ::core::matches!(
4529                    message.header().flexibility(),
4530                    ::fidl_next::protocol::Flexibility::Strict
4531                ) {
4532                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4533                } else {
4534                    Ok(())
4535                }
4536            }
4537        }
4538    }
4539
4540    async fn on_two_way(
4541        handler: &mut ___H,
4542        mut message: ::fidl_next::Message<___T>,
4543        responder: ::fidl_next::protocol::Responder<___T>,
4544    ) -> ::core::result::Result<
4545        (),
4546        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4547    > {
4548        match *message.header().ordinal {
4549            5520468615388521389 => {
4550                let responder = ::fidl_next::Responder::from_untyped(responder);
4551
4552                handler.get_job(responder).await;
4553                Ok(())
4554            }
4555
4556            ordinal => {
4557                handler.on_unknown_interaction(ordinal).await;
4558                if ::core::matches!(
4559                    message.header().flexibility(),
4560                    ::fidl_next::protocol::Flexibility::Strict
4561                ) {
4562                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4563                } else {
4564                    responder
4565                        .respond_framework_error(
4566                            ordinal,
4567                            ::fidl_next::FrameworkError::UnknownMethod,
4568                        )
4569                        .expect("encoding a framework error should never fail")
4570                        .await?;
4571                    Ok(())
4572                }
4573            }
4574        }
4575    }
4576}
4577
4578/// A client handler for the TaskProvider protocol.
4579///
4580/// See [`TaskProvider`] for more details.
4581pub trait TaskProviderClientHandler<
4582    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4583    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4584>
4585{
4586    fn on_unknown_interaction(
4587        &mut self,
4588        ordinal: u64,
4589    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4590        ::core::future::ready(())
4591    }
4592}
4593
4594impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for TaskProvider
4595where
4596    ___H: TaskProviderClientHandler<___T> + ::core::marker::Send,
4597    ___T: ::fidl_next::Transport,
4598{
4599    async fn on_event(
4600        handler: &mut ___H,
4601        mut message: ::fidl_next::Message<___T>,
4602    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4603        match *message.header().ordinal {
4604            ordinal => {
4605                handler.on_unknown_interaction(ordinal).await;
4606                if ::core::matches!(
4607                    message.header().flexibility(),
4608                    ::fidl_next::protocol::Flexibility::Strict
4609                ) {
4610                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4611                } else {
4612                    Ok(())
4613                }
4614            }
4615        }
4616    }
4617}
4618
4619/// A server handler for the TaskProvider protocol.
4620///
4621/// See [`TaskProvider`] for more details.
4622pub trait TaskProviderServerHandler<
4623    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4624    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4625>
4626{
4627    #[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"]
4628    fn get_job(
4629        &mut self,
4630
4631        responder: ::fidl_next::Responder<task_provider::GetJob, ___T>,
4632    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4633
4634    fn on_unknown_interaction(
4635        &mut self,
4636        ordinal: u64,
4637    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4638        ::core::future::ready(())
4639    }
4640}
4641
4642impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for TaskProvider
4643where
4644    ___H: TaskProviderServerHandler<___T> + ::core::marker::Send,
4645    ___T: ::fidl_next::Transport,
4646{
4647    async fn on_one_way(
4648        handler: &mut ___H,
4649        mut message: ::fidl_next::Message<___T>,
4650    ) -> ::core::result::Result<
4651        (),
4652        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4653    > {
4654        match *message.header().ordinal {
4655            ordinal => {
4656                handler.on_unknown_interaction(ordinal).await;
4657                if ::core::matches!(
4658                    message.header().flexibility(),
4659                    ::fidl_next::protocol::Flexibility::Strict
4660                ) {
4661                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4662                } else {
4663                    Ok(())
4664                }
4665            }
4666        }
4667    }
4668
4669    async fn on_two_way(
4670        handler: &mut ___H,
4671        mut message: ::fidl_next::Message<___T>,
4672        responder: ::fidl_next::protocol::Responder<___T>,
4673    ) -> ::core::result::Result<
4674        (),
4675        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4676    > {
4677        match *message.header().ordinal {
4678            5520468615388521389 => {
4679                let responder = ::fidl_next::Responder::from_untyped(responder);
4680
4681                handler.get_job(responder).await;
4682                Ok(())
4683            }
4684
4685            ordinal => {
4686                handler.on_unknown_interaction(ordinal).await;
4687                if ::core::matches!(
4688                    message.header().flexibility(),
4689                    ::fidl_next::protocol::Flexibility::Strict
4690                ) {
4691                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4692                } else {
4693                    responder
4694                        .respond_framework_error(
4695                            ordinal,
4696                            ::fidl_next::FrameworkError::UnknownMethod,
4697                        )
4698                        .expect("encoding a framework error should never fail")
4699                        .await?;
4700                    Ok(())
4701                }
4702            }
4703        }
4704    }
4705}
4706
4707impl<___T> TaskProviderClientHandler<___T> for ::fidl_next::IgnoreEvents
4708where
4709    ___T: ::fidl_next::Transport,
4710{
4711    async fn on_unknown_interaction(&mut self, _: u64) {}
4712}
4713
4714impl<___H, ___T> TaskProviderLocalClientHandler<___T> for ::fidl_next::Local<___H>
4715where
4716    ___H: TaskProviderClientHandler<___T>,
4717    ___T: ::fidl_next::Transport,
4718{
4719    async fn on_unknown_interaction(&mut self, ordinal: u64) {
4720        ___H::on_unknown_interaction(&mut self.0, ordinal).await
4721    }
4722}
4723
4724impl<___H, ___T> TaskProviderLocalServerHandler<___T> for ::fidl_next::Local<___H>
4725where
4726    ___H: TaskProviderServerHandler<___T>,
4727    ___T: ::fidl_next::Transport,
4728{
4729    async fn get_job(&mut self, responder: ::fidl_next::Responder<task_provider::GetJob, ___T>) {
4730        ___H::get_job(&mut self.0, responder).await
4731    }
4732
4733    async fn on_unknown_interaction(&mut self, ordinal: u64) {
4734        ___H::on_unknown_interaction(&mut self.0, ordinal).await
4735    }
4736}
4737
4738pub use fidl_next_common_fuchsia_component_runner::*;