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    /// The generic type corresponding to [`ComponentRunnerStartRequest`].
3066    pub struct ComponentRunnerStartRequest<T0, T1> {
3067        pub start_info: T0,
3068
3069        pub controller: T1,
3070    }
3071
3072    unsafe impl<___E, T0, T1>
3073        ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>
3074        for ComponentRunnerStartRequest<T0, T1>
3075    where
3076        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3077        ___E: ::fidl_next::Encoder,
3078        ___E: ::fidl_next::fuchsia::HandleEncoder,
3079        T0: ::fidl_next::Encode<crate::wire::ComponentStartInfo<'static>, ___E>,
3080        T1: ::fidl_next::Encode<
3081                ::fidl_next::ServerEnd<
3082                    crate::ComponentController,
3083                    ::fidl_next::wire::fuchsia::Channel,
3084                >,
3085                ___E,
3086            >,
3087    {
3088        #[inline]
3089        fn encode(
3090            self,
3091            encoder_: &mut ___E,
3092            out_: &mut ::core::mem::MaybeUninit<crate::wire::ComponentRunnerStartRequest<'static>>,
3093            _: (),
3094        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3095            ::fidl_next::munge! {
3096                let crate::wire::ComponentRunnerStartRequest {
3097                    start_info,
3098                    controller,
3099
3100                } = out_;
3101            }
3102
3103            ::fidl_next::Encode::encode(self.start_info, encoder_, start_info, ())?;
3104
3105            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
3106
3107            Ok(())
3108        }
3109    }
3110
3111    /// The generic type corresponding to [`TaskProviderGetJobResponse`].
3112    pub struct TaskProviderGetJobResponse<T0> {
3113        pub job: T0,
3114    }
3115
3116    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>
3117        for TaskProviderGetJobResponse<T0>
3118    where
3119        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3120        ___E: ::fidl_next::fuchsia::HandleEncoder,
3121        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Job, ___E>,
3122    {
3123        #[inline]
3124        fn encode(
3125            self,
3126            encoder_: &mut ___E,
3127            out_: &mut ::core::mem::MaybeUninit<crate::wire::TaskProviderGetJobResponse>,
3128            _: (),
3129        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3130            ::fidl_next::munge! {
3131                let crate::wire::TaskProviderGetJobResponse {
3132                    job,
3133
3134                } = out_;
3135            }
3136
3137            ::fidl_next::Encode::encode(self.job, encoder_, job, ())?;
3138
3139            Ok(())
3140        }
3141    }
3142}
3143
3144pub use self::natural::*;
3145
3146/// The type corresponding to the ComponentController protocol.
3147#[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"]
3148#[derive(PartialEq, Debug)]
3149pub struct ComponentController;
3150
3151#[cfg(target_os = "fuchsia")]
3152impl ::fidl_next::HasTransport for ComponentController {
3153    type Transport = ::fidl_next::fuchsia::zx::Channel;
3154}
3155
3156pub mod component_controller {
3157    pub mod prelude {
3158        pub use crate::{
3159            ComponentController, ComponentControllerClientHandler,
3160            ComponentControllerLocalClientHandler, ComponentControllerLocalServerHandler,
3161            ComponentControllerServerHandler, component_controller,
3162        };
3163
3164        pub use crate::natural::ComponentControllerOnEscrowRequest;
3165
3166        pub use crate::natural::ComponentControllerOnPublishDiagnosticsRequest;
3167
3168        pub use crate::natural::ComponentStopInfo;
3169    }
3170
3171    pub struct Stop;
3172
3173    impl ::fidl_next::Method for Stop {
3174        const ORDINAL: u64 = 4804506821232171874;
3175        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3176            ::fidl_next::protocol::Flexibility::Strict;
3177
3178        type Protocol = crate::ComponentController;
3179
3180        type Request = ::fidl_next::wire::EmptyMessageBody;
3181    }
3182
3183    pub struct Kill;
3184
3185    impl ::fidl_next::Method for Kill {
3186        const ORDINAL: u64 = 4514346391631670964;
3187        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3188            ::fidl_next::protocol::Flexibility::Strict;
3189
3190        type Protocol = crate::ComponentController;
3191
3192        type Request = ::fidl_next::wire::EmptyMessageBody;
3193    }
3194
3195    pub struct OnPublishDiagnostics;
3196
3197    impl ::fidl_next::Method for OnPublishDiagnostics {
3198        const ORDINAL: u64 = 2240216199992207687;
3199        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3200            ::fidl_next::protocol::Flexibility::Strict;
3201
3202        type Protocol = crate::ComponentController;
3203
3204        type Request = crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>;
3205    }
3206
3207    pub struct OnEscrow;
3208
3209    impl ::fidl_next::Method for OnEscrow {
3210        const ORDINAL: u64 = 730448769712342012;
3211        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3212            ::fidl_next::protocol::Flexibility::Flexible;
3213
3214        type Protocol = crate::ComponentController;
3215
3216        type Request = crate::wire::ComponentControllerOnEscrowRequest<'static>;
3217    }
3218
3219    pub struct OnStop;
3220
3221    impl ::fidl_next::Method for OnStop {
3222        const ORDINAL: u64 = 4322651556509354674;
3223        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3224            ::fidl_next::protocol::Flexibility::Flexible;
3225
3226        type Protocol = crate::ComponentController;
3227
3228        type Request = crate::wire::ComponentStopInfo<'static>;
3229    }
3230
3231    mod ___detail {
3232        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ComponentController
3233        where
3234            ___T: ::fidl_next::Transport,
3235        {
3236            type Client = ComponentControllerClient<___T>;
3237            type Server = ComponentControllerServer<___T>;
3238        }
3239
3240        /// The client for the `ComponentController` protocol.
3241        #[repr(transparent)]
3242        pub struct ComponentControllerClient<___T: ::fidl_next::Transport> {
3243            #[allow(dead_code)]
3244            client: ::fidl_next::protocol::Client<___T>,
3245        }
3246
3247        impl<___T> ComponentControllerClient<___T>
3248        where
3249            ___T: ::fidl_next::Transport,
3250        {
3251            #[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"]
3252            pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3253                ::fidl_next::SendFuture::from_untyped(
3254                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
3255                        4804506821232171874,
3256                        <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
3257                        (),
3258                    ),
3259                )
3260            }
3261
3262            #[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"]
3263            pub fn kill(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3264                ::fidl_next::SendFuture::from_untyped(
3265                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
3266                        4514346391631670964,
3267                        <super::Kill as ::fidl_next::Method>::FLEXIBILITY,
3268                        (),
3269                    ),
3270                )
3271            }
3272        }
3273
3274        /// The server for the `ComponentController` protocol.
3275        #[repr(transparent)]
3276        pub struct ComponentControllerServer<___T: ::fidl_next::Transport> {
3277            server: ::fidl_next::protocol::Server<___T>,
3278        }
3279
3280        impl<___T> ComponentControllerServer<___T>
3281        where
3282            ___T: ::fidl_next::Transport,
3283        {
3284            #[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"]
3285            pub fn on_publish_diagnostics(
3286                &self,
3287
3288                payload: impl ::fidl_next::Encode<
3289                    crate::wire::ComponentDiagnostics<'static>,
3290                    <___T as ::fidl_next::Transport>::SendBuffer,
3291                >,
3292            ) -> ::fidl_next::SendFuture<'_, ___T>
3293            where
3294                <___T as ::fidl_next::Transport>::SendBuffer:
3295                    ::fidl_next::encoder::InternalHandleEncoder,
3296                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3297                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3298            {
3299                self.on_publish_diagnostics_with(
3300                    crate::generic::ComponentControllerOnPublishDiagnosticsRequest { payload },
3301                )
3302            }
3303
3304            #[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"]
3305
3306            pub fn on_publish_diagnostics_with<___R>(
3307                &self,
3308                request: ___R,
3309            ) -> ::fidl_next::SendFuture<'_, ___T>
3310            where
3311                ___R: ::fidl_next::Encode<
3312                        <super::OnPublishDiagnostics as ::fidl_next::Method>::Request,
3313                        <___T as ::fidl_next::Transport>::SendBuffer,
3314                    >,
3315            {
3316                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3317                    2240216199992207687,
3318                    <super::OnPublishDiagnostics as ::fidl_next::Method>::FLEXIBILITY,
3319                    request,
3320                ))
3321            }
3322
3323            #[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"]
3324
3325            pub fn on_escrow_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3326            where
3327                ___R: ::fidl_next::Encode<
3328                        <super::OnEscrow as ::fidl_next::Method>::Request,
3329                        <___T as ::fidl_next::Transport>::SendBuffer,
3330                    >,
3331            {
3332                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3333                    730448769712342012,
3334                    <super::OnEscrow as ::fidl_next::Method>::FLEXIBILITY,
3335                    request,
3336                ))
3337            }
3338
3339            #[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"]
3340
3341            pub fn on_stop_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3342            where
3343                ___R: ::fidl_next::Encode<
3344                        <super::OnStop as ::fidl_next::Method>::Request,
3345                        <___T as ::fidl_next::Transport>::SendBuffer,
3346                    >,
3347            {
3348                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3349                    4322651556509354674,
3350                    <super::OnStop as ::fidl_next::Method>::FLEXIBILITY,
3351                    request,
3352                ))
3353            }
3354        }
3355    }
3356}
3357
3358#[diagnostic::on_unimplemented(
3359    note = "If {Self} implements the non-local ComponentControllerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3360)]
3361
3362/// A client handler for the ComponentController protocol.
3363///
3364/// See [`ComponentController`] for more details.
3365pub trait ComponentControllerLocalClientHandler<
3366    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3367    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3368>
3369{
3370    #[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"]
3371    fn on_publish_diagnostics(
3372        &mut self,
3373
3374        request: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3375    ) -> impl ::core::future::Future<Output = ()>;
3376
3377    #[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"]
3378    fn on_escrow(
3379        &mut self,
3380
3381        request: ::fidl_next::Request<component_controller::OnEscrow, ___T>,
3382    ) -> impl ::core::future::Future<Output = ()>;
3383
3384    #[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"]
3385    fn on_stop(
3386        &mut self,
3387
3388        request: ::fidl_next::Request<component_controller::OnStop, ___T>,
3389    ) -> impl ::core::future::Future<Output = ()>;
3390
3391    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
3392        ::core::future::ready(())
3393    }
3394}
3395
3396impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ComponentController
3397where
3398    ___H: ComponentControllerLocalClientHandler<___T>,
3399    ___T: ::fidl_next::Transport,
3400    for<'de> crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>: ::fidl_next::Decode<
3401            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3402            Constraint = (),
3403        >,
3404    for<'de> crate::wire::ComponentControllerOnEscrowRequest<'de>: ::fidl_next::Decode<
3405            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3406            Constraint = (),
3407        >,
3408    for<'de> crate::wire::ComponentStopInfo<'de>: ::fidl_next::Decode<
3409            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3410            Constraint = (),
3411        >,
3412{
3413    async fn on_event(
3414        handler: &mut ___H,
3415        mut message: ::fidl_next::Message<___T>,
3416    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3417        match *message.header().ordinal {
3418            2240216199992207687 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3419                Ok(decoded) => {
3420                    handler
3421                        .on_publish_diagnostics(::fidl_next::Request::from_decoded(decoded))
3422                        .await;
3423                    Ok(())
3424                }
3425                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3426                    ordinal: 2240216199992207687,
3427                    error,
3428                }),
3429            },
3430
3431            730448769712342012 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3432                Ok(decoded) => {
3433                    handler.on_escrow(::fidl_next::Request::from_decoded(decoded)).await;
3434                    Ok(())
3435                }
3436                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3437                    ordinal: 730448769712342012,
3438                    error,
3439                }),
3440            },
3441
3442            4322651556509354674 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3443                Ok(decoded) => {
3444                    handler.on_stop(::fidl_next::Request::from_decoded(decoded)).await;
3445                    Ok(())
3446                }
3447                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3448                    ordinal: 4322651556509354674,
3449                    error,
3450                }),
3451            },
3452
3453            ordinal => {
3454                handler.on_unknown_interaction(ordinal).await;
3455                if ::core::matches!(
3456                    message.header().flexibility(),
3457                    ::fidl_next::protocol::Flexibility::Strict
3458                ) {
3459                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3460                } else {
3461                    Ok(())
3462                }
3463            }
3464        }
3465    }
3466}
3467
3468#[diagnostic::on_unimplemented(
3469    note = "If {Self} implements the non-local ComponentControllerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3470)]
3471
3472/// A server handler for the ComponentController protocol.
3473///
3474/// See [`ComponentController`] for more details.
3475pub trait ComponentControllerLocalServerHandler<
3476    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3477    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3478>
3479{
3480    #[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"]
3481    fn stop(&mut self) -> impl ::core::future::Future<Output = ()>;
3482
3483    #[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"]
3484    fn kill(&mut self) -> impl ::core::future::Future<Output = ()>;
3485
3486    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
3487        ::core::future::ready(())
3488    }
3489}
3490
3491impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ComponentController
3492where
3493    ___H: ComponentControllerLocalServerHandler<___T>,
3494    ___T: ::fidl_next::Transport,
3495{
3496    async fn on_one_way(
3497        handler: &mut ___H,
3498        mut message: ::fidl_next::Message<___T>,
3499    ) -> ::core::result::Result<
3500        (),
3501        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3502    > {
3503        match *message.header().ordinal {
3504            4804506821232171874 => {
3505                handler.stop().await;
3506                Ok(())
3507            }
3508
3509            4514346391631670964 => {
3510                handler.kill().await;
3511                Ok(())
3512            }
3513
3514            ordinal => {
3515                handler.on_unknown_interaction(ordinal).await;
3516                if ::core::matches!(
3517                    message.header().flexibility(),
3518                    ::fidl_next::protocol::Flexibility::Strict
3519                ) {
3520                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3521                } else {
3522                    Ok(())
3523                }
3524            }
3525        }
3526    }
3527
3528    async fn on_two_way(
3529        handler: &mut ___H,
3530        mut message: ::fidl_next::Message<___T>,
3531        responder: ::fidl_next::protocol::Responder<___T>,
3532    ) -> ::core::result::Result<
3533        (),
3534        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3535    > {
3536        match *message.header().ordinal {
3537            ordinal => {
3538                handler.on_unknown_interaction(ordinal).await;
3539                if ::core::matches!(
3540                    message.header().flexibility(),
3541                    ::fidl_next::protocol::Flexibility::Strict
3542                ) {
3543                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3544                } else {
3545                    responder
3546                        .respond_framework_error(
3547                            ordinal,
3548                            ::fidl_next::FrameworkError::UnknownMethod,
3549                        )
3550                        .expect("encoding a framework error should never fail")
3551                        .await?;
3552                    Ok(())
3553                }
3554            }
3555        }
3556    }
3557}
3558
3559/// A client handler for the ComponentController protocol.
3560///
3561/// See [`ComponentController`] for more details.
3562pub trait ComponentControllerClientHandler<
3563    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3564    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3565>
3566{
3567    #[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"]
3568    fn on_publish_diagnostics(
3569        &mut self,
3570
3571        request: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3572    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3573
3574    #[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"]
3575    fn on_escrow(
3576        &mut self,
3577
3578        request: ::fidl_next::Request<component_controller::OnEscrow, ___T>,
3579    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3580
3581    #[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"]
3582    fn on_stop(
3583        &mut self,
3584
3585        request: ::fidl_next::Request<component_controller::OnStop, ___T>,
3586    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3587
3588    fn on_unknown_interaction(
3589        &mut self,
3590        ordinal: u64,
3591    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3592        ::core::future::ready(())
3593    }
3594}
3595
3596impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ComponentController
3597where
3598    ___H: ComponentControllerClientHandler<___T> + ::core::marker::Send,
3599    ___T: ::fidl_next::Transport,
3600    for<'de> crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>: ::fidl_next::Decode<
3601            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3602            Constraint = (),
3603        >,
3604    for<'de> crate::wire::ComponentControllerOnEscrowRequest<'de>: ::fidl_next::Decode<
3605            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3606            Constraint = (),
3607        >,
3608    for<'de> crate::wire::ComponentStopInfo<'de>: ::fidl_next::Decode<
3609            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3610            Constraint = (),
3611        >,
3612{
3613    async fn on_event(
3614        handler: &mut ___H,
3615        mut message: ::fidl_next::Message<___T>,
3616    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3617        match *message.header().ordinal {
3618            2240216199992207687 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3619                Ok(decoded) => {
3620                    handler
3621                        .on_publish_diagnostics(::fidl_next::Request::from_decoded(decoded))
3622                        .await;
3623                    Ok(())
3624                }
3625                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3626                    ordinal: 2240216199992207687,
3627                    error,
3628                }),
3629            },
3630
3631            730448769712342012 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3632                Ok(decoded) => {
3633                    handler.on_escrow(::fidl_next::Request::from_decoded(decoded)).await;
3634                    Ok(())
3635                }
3636                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3637                    ordinal: 730448769712342012,
3638                    error,
3639                }),
3640            },
3641
3642            4322651556509354674 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3643                Ok(decoded) => {
3644                    handler.on_stop(::fidl_next::Request::from_decoded(decoded)).await;
3645                    Ok(())
3646                }
3647                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3648                    ordinal: 4322651556509354674,
3649                    error,
3650                }),
3651            },
3652
3653            ordinal => {
3654                handler.on_unknown_interaction(ordinal).await;
3655                if ::core::matches!(
3656                    message.header().flexibility(),
3657                    ::fidl_next::protocol::Flexibility::Strict
3658                ) {
3659                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3660                } else {
3661                    Ok(())
3662                }
3663            }
3664        }
3665    }
3666}
3667
3668/// A server handler for the ComponentController protocol.
3669///
3670/// See [`ComponentController`] for more details.
3671pub trait ComponentControllerServerHandler<
3672    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3673    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3674>
3675{
3676    #[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"]
3677    fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3678
3679    #[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"]
3680    fn kill(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3681
3682    fn on_unknown_interaction(
3683        &mut self,
3684        ordinal: u64,
3685    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3686        ::core::future::ready(())
3687    }
3688}
3689
3690impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ComponentController
3691where
3692    ___H: ComponentControllerServerHandler<___T> + ::core::marker::Send,
3693    ___T: ::fidl_next::Transport,
3694{
3695    async fn on_one_way(
3696        handler: &mut ___H,
3697        mut message: ::fidl_next::Message<___T>,
3698    ) -> ::core::result::Result<
3699        (),
3700        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3701    > {
3702        match *message.header().ordinal {
3703            4804506821232171874 => {
3704                handler.stop().await;
3705                Ok(())
3706            }
3707
3708            4514346391631670964 => {
3709                handler.kill().await;
3710                Ok(())
3711            }
3712
3713            ordinal => {
3714                handler.on_unknown_interaction(ordinal).await;
3715                if ::core::matches!(
3716                    message.header().flexibility(),
3717                    ::fidl_next::protocol::Flexibility::Strict
3718                ) {
3719                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3720                } else {
3721                    Ok(())
3722                }
3723            }
3724        }
3725    }
3726
3727    async fn on_two_way(
3728        handler: &mut ___H,
3729        mut message: ::fidl_next::Message<___T>,
3730        responder: ::fidl_next::protocol::Responder<___T>,
3731    ) -> ::core::result::Result<
3732        (),
3733        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3734    > {
3735        match *message.header().ordinal {
3736            ordinal => {
3737                handler.on_unknown_interaction(ordinal).await;
3738                if ::core::matches!(
3739                    message.header().flexibility(),
3740                    ::fidl_next::protocol::Flexibility::Strict
3741                ) {
3742                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3743                } else {
3744                    responder
3745                        .respond_framework_error(
3746                            ordinal,
3747                            ::fidl_next::FrameworkError::UnknownMethod,
3748                        )
3749                        .expect("encoding a framework error should never fail")
3750                        .await?;
3751                    Ok(())
3752                }
3753            }
3754        }
3755    }
3756}
3757
3758impl<___T> ComponentControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
3759where
3760    ___T: ::fidl_next::Transport,
3761{
3762    async fn on_publish_diagnostics(
3763        &mut self,
3764
3765        _: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3766    ) {
3767    }
3768
3769    async fn on_escrow(&mut self, _: ::fidl_next::Request<component_controller::OnEscrow, ___T>) {}
3770
3771    async fn on_stop(&mut self, _: ::fidl_next::Request<component_controller::OnStop, ___T>) {}
3772
3773    async fn on_unknown_interaction(&mut self, _: u64) {}
3774}
3775
3776impl<___H, ___T> ComponentControllerLocalClientHandler<___T> for ::fidl_next::Local<___H>
3777where
3778    ___H: ComponentControllerClientHandler<___T>,
3779    ___T: ::fidl_next::Transport,
3780{
3781    async fn on_publish_diagnostics(
3782        &mut self,
3783
3784        request: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3785    ) {
3786        ___H::on_publish_diagnostics(&mut self.0, request).await
3787    }
3788
3789    async fn on_escrow(
3790        &mut self,
3791
3792        request: ::fidl_next::Request<component_controller::OnEscrow, ___T>,
3793    ) {
3794        ___H::on_escrow(&mut self.0, request).await
3795    }
3796
3797    async fn on_stop(&mut self, request: ::fidl_next::Request<component_controller::OnStop, ___T>) {
3798        ___H::on_stop(&mut self.0, request).await
3799    }
3800
3801    async fn on_unknown_interaction(&mut self, ordinal: u64) {
3802        ___H::on_unknown_interaction(&mut self.0, ordinal).await
3803    }
3804}
3805
3806impl<___H, ___T> ComponentControllerLocalServerHandler<___T> for ::fidl_next::Local<___H>
3807where
3808    ___H: ComponentControllerServerHandler<___T>,
3809    ___T: ::fidl_next::Transport,
3810{
3811    async fn stop(&mut self) {
3812        ___H::stop(&mut self.0).await
3813    }
3814
3815    async fn kill(&mut self) {
3816        ___H::kill(&mut self.0).await
3817    }
3818
3819    async fn on_unknown_interaction(&mut self, ordinal: u64) {
3820        ___H::on_unknown_interaction(&mut self.0, ordinal).await
3821    }
3822}
3823
3824/// The type corresponding to the ComponentRunner protocol.
3825#[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"]
3826#[derive(PartialEq, Debug)]
3827pub struct ComponentRunner;
3828
3829impl ::fidl_next::Discoverable for ComponentRunner {
3830    const PROTOCOL_NAME: &'static str = "fuchsia.component.runner.ComponentRunner";
3831}
3832
3833#[cfg(target_os = "fuchsia")]
3834impl ::fidl_next::HasTransport for ComponentRunner {
3835    type Transport = ::fidl_next::fuchsia::zx::Channel;
3836}
3837
3838pub mod component_runner {
3839    pub mod prelude {
3840        pub use crate::{
3841            ComponentRunner, ComponentRunnerClientHandler, ComponentRunnerLocalClientHandler,
3842            ComponentRunnerLocalServerHandler, ComponentRunnerServerHandler, component_runner,
3843        };
3844
3845        pub use crate::natural::ComponentRunnerStartRequest;
3846    }
3847
3848    pub struct Start;
3849
3850    impl ::fidl_next::Method for Start {
3851        const ORDINAL: u64 = 780715659970866697;
3852        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3853            ::fidl_next::protocol::Flexibility::Strict;
3854
3855        type Protocol = crate::ComponentRunner;
3856
3857        type Request = crate::wire::ComponentRunnerStartRequest<'static>;
3858    }
3859
3860    mod ___detail {
3861        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ComponentRunner
3862        where
3863            ___T: ::fidl_next::Transport,
3864        {
3865            type Client = ComponentRunnerClient<___T>;
3866            type Server = ComponentRunnerServer<___T>;
3867        }
3868
3869        /// The client for the `ComponentRunner` protocol.
3870        #[repr(transparent)]
3871        pub struct ComponentRunnerClient<___T: ::fidl_next::Transport> {
3872            #[allow(dead_code)]
3873            client: ::fidl_next::protocol::Client<___T>,
3874        }
3875
3876        impl<___T> ComponentRunnerClient<___T>
3877        where
3878            ___T: ::fidl_next::Transport,
3879        {
3880            #[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"]
3881            pub fn start(
3882                &self,
3883
3884                start_info: impl ::fidl_next::Encode<
3885                    crate::wire::ComponentStartInfo<'static>,
3886                    <___T as ::fidl_next::Transport>::SendBuffer,
3887                >,
3888
3889                controller: impl ::fidl_next::Encode<
3890                    ::fidl_next::ServerEnd<
3891                        crate::ComponentController,
3892                        ::fidl_next::wire::fuchsia::Channel,
3893                    >,
3894                    <___T as ::fidl_next::Transport>::SendBuffer,
3895                >,
3896            ) -> ::fidl_next::SendFuture<'_, ___T>
3897            where
3898                <___T as ::fidl_next::Transport>::SendBuffer:
3899                    ::fidl_next::encoder::InternalHandleEncoder,
3900                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3901                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3902            {
3903                self.start_with(crate::generic::ComponentRunnerStartRequest {
3904                    start_info,
3905
3906                    controller,
3907                })
3908            }
3909
3910            #[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"]
3911            pub fn start_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3912            where
3913                ___R: ::fidl_next::Encode<
3914                        crate::wire::ComponentRunnerStartRequest<'static>,
3915                        <___T as ::fidl_next::Transport>::SendBuffer,
3916                    >,
3917            {
3918                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3919                    780715659970866697,
3920                    <super::Start as ::fidl_next::Method>::FLEXIBILITY,
3921                    request,
3922                ))
3923            }
3924        }
3925
3926        /// The server for the `ComponentRunner` protocol.
3927        #[repr(transparent)]
3928        pub struct ComponentRunnerServer<___T: ::fidl_next::Transport> {
3929            server: ::fidl_next::protocol::Server<___T>,
3930        }
3931
3932        impl<___T> ComponentRunnerServer<___T> where ___T: ::fidl_next::Transport {}
3933    }
3934}
3935
3936#[diagnostic::on_unimplemented(
3937    note = "If {Self} implements the non-local ComponentRunnerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3938)]
3939
3940/// A client handler for the ComponentRunner protocol.
3941///
3942/// See [`ComponentRunner`] for more details.
3943pub trait ComponentRunnerLocalClientHandler<
3944    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3945    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3946>
3947{
3948    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
3949        ::core::future::ready(())
3950    }
3951}
3952
3953impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ComponentRunner
3954where
3955    ___H: ComponentRunnerLocalClientHandler<___T>,
3956    ___T: ::fidl_next::Transport,
3957{
3958    async fn on_event(
3959        handler: &mut ___H,
3960        mut message: ::fidl_next::Message<___T>,
3961    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3962        match *message.header().ordinal {
3963            ordinal => {
3964                handler.on_unknown_interaction(ordinal).await;
3965                if ::core::matches!(
3966                    message.header().flexibility(),
3967                    ::fidl_next::protocol::Flexibility::Strict
3968                ) {
3969                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3970                } else {
3971                    Ok(())
3972                }
3973            }
3974        }
3975    }
3976}
3977
3978#[diagnostic::on_unimplemented(
3979    note = "If {Self} implements the non-local ComponentRunnerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3980)]
3981
3982/// A server handler for the ComponentRunner protocol.
3983///
3984/// See [`ComponentRunner`] for more details.
3985pub trait ComponentRunnerLocalServerHandler<
3986    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3987    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3988>
3989{
3990    #[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"]
3991    fn start(
3992        &mut self,
3993
3994        request: ::fidl_next::Request<component_runner::Start, ___T>,
3995    ) -> impl ::core::future::Future<Output = ()>;
3996
3997    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
3998        ::core::future::ready(())
3999    }
4000}
4001
4002impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ComponentRunner
4003where
4004    ___H: ComponentRunnerLocalServerHandler<___T>,
4005    ___T: ::fidl_next::Transport,
4006    for<'de> crate::wire::ComponentRunnerStartRequest<'de>: ::fidl_next::Decode<
4007            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4008            Constraint = (),
4009        >,
4010{
4011    async fn on_one_way(
4012        handler: &mut ___H,
4013        mut message: ::fidl_next::Message<___T>,
4014    ) -> ::core::result::Result<
4015        (),
4016        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4017    > {
4018        match *message.header().ordinal {
4019            780715659970866697 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
4020                Ok(decoded) => {
4021                    handler.start(::fidl_next::Request::from_decoded(decoded)).await;
4022                    Ok(())
4023                }
4024                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4025                    ordinal: 780715659970866697,
4026                    error,
4027                }),
4028            },
4029
4030            ordinal => {
4031                handler.on_unknown_interaction(ordinal).await;
4032                if ::core::matches!(
4033                    message.header().flexibility(),
4034                    ::fidl_next::protocol::Flexibility::Strict
4035                ) {
4036                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4037                } else {
4038                    Ok(())
4039                }
4040            }
4041        }
4042    }
4043
4044    async fn on_two_way(
4045        handler: &mut ___H,
4046        mut message: ::fidl_next::Message<___T>,
4047        responder: ::fidl_next::protocol::Responder<___T>,
4048    ) -> ::core::result::Result<
4049        (),
4050        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4051    > {
4052        match *message.header().ordinal {
4053            ordinal => {
4054                handler.on_unknown_interaction(ordinal).await;
4055                if ::core::matches!(
4056                    message.header().flexibility(),
4057                    ::fidl_next::protocol::Flexibility::Strict
4058                ) {
4059                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4060                } else {
4061                    responder
4062                        .respond_framework_error(
4063                            ordinal,
4064                            ::fidl_next::FrameworkError::UnknownMethod,
4065                        )
4066                        .expect("encoding a framework error should never fail")
4067                        .await?;
4068                    Ok(())
4069                }
4070            }
4071        }
4072    }
4073}
4074
4075/// A client handler for the ComponentRunner protocol.
4076///
4077/// See [`ComponentRunner`] for more details.
4078pub trait ComponentRunnerClientHandler<
4079    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4080    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4081>
4082{
4083    fn on_unknown_interaction(
4084        &mut self,
4085        ordinal: u64,
4086    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4087        ::core::future::ready(())
4088    }
4089}
4090
4091impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ComponentRunner
4092where
4093    ___H: ComponentRunnerClientHandler<___T> + ::core::marker::Send,
4094    ___T: ::fidl_next::Transport,
4095{
4096    async fn on_event(
4097        handler: &mut ___H,
4098        mut message: ::fidl_next::Message<___T>,
4099    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4100        match *message.header().ordinal {
4101            ordinal => {
4102                handler.on_unknown_interaction(ordinal).await;
4103                if ::core::matches!(
4104                    message.header().flexibility(),
4105                    ::fidl_next::protocol::Flexibility::Strict
4106                ) {
4107                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4108                } else {
4109                    Ok(())
4110                }
4111            }
4112        }
4113    }
4114}
4115
4116/// A server handler for the ComponentRunner protocol.
4117///
4118/// See [`ComponentRunner`] for more details.
4119pub trait ComponentRunnerServerHandler<
4120    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4121    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4122>
4123{
4124    #[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"]
4125    fn start(
4126        &mut self,
4127
4128        request: ::fidl_next::Request<component_runner::Start, ___T>,
4129    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4130
4131    fn on_unknown_interaction(
4132        &mut self,
4133        ordinal: u64,
4134    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4135        ::core::future::ready(())
4136    }
4137}
4138
4139impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ComponentRunner
4140where
4141    ___H: ComponentRunnerServerHandler<___T> + ::core::marker::Send,
4142    ___T: ::fidl_next::Transport,
4143    for<'de> crate::wire::ComponentRunnerStartRequest<'de>: ::fidl_next::Decode<
4144            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4145            Constraint = (),
4146        >,
4147{
4148    async fn on_one_way(
4149        handler: &mut ___H,
4150        mut message: ::fidl_next::Message<___T>,
4151    ) -> ::core::result::Result<
4152        (),
4153        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4154    > {
4155        match *message.header().ordinal {
4156            780715659970866697 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
4157                Ok(decoded) => {
4158                    handler.start(::fidl_next::Request::from_decoded(decoded)).await;
4159                    Ok(())
4160                }
4161                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4162                    ordinal: 780715659970866697,
4163                    error,
4164                }),
4165            },
4166
4167            ordinal => {
4168                handler.on_unknown_interaction(ordinal).await;
4169                if ::core::matches!(
4170                    message.header().flexibility(),
4171                    ::fidl_next::protocol::Flexibility::Strict
4172                ) {
4173                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4174                } else {
4175                    Ok(())
4176                }
4177            }
4178        }
4179    }
4180
4181    async fn on_two_way(
4182        handler: &mut ___H,
4183        mut message: ::fidl_next::Message<___T>,
4184        responder: ::fidl_next::protocol::Responder<___T>,
4185    ) -> ::core::result::Result<
4186        (),
4187        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4188    > {
4189        match *message.header().ordinal {
4190            ordinal => {
4191                handler.on_unknown_interaction(ordinal).await;
4192                if ::core::matches!(
4193                    message.header().flexibility(),
4194                    ::fidl_next::protocol::Flexibility::Strict
4195                ) {
4196                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4197                } else {
4198                    responder
4199                        .respond_framework_error(
4200                            ordinal,
4201                            ::fidl_next::FrameworkError::UnknownMethod,
4202                        )
4203                        .expect("encoding a framework error should never fail")
4204                        .await?;
4205                    Ok(())
4206                }
4207            }
4208        }
4209    }
4210}
4211
4212impl<___T> ComponentRunnerClientHandler<___T> for ::fidl_next::IgnoreEvents
4213where
4214    ___T: ::fidl_next::Transport,
4215{
4216    async fn on_unknown_interaction(&mut self, _: u64) {}
4217}
4218
4219impl<___H, ___T> ComponentRunnerLocalClientHandler<___T> for ::fidl_next::Local<___H>
4220where
4221    ___H: ComponentRunnerClientHandler<___T>,
4222    ___T: ::fidl_next::Transport,
4223{
4224    async fn on_unknown_interaction(&mut self, ordinal: u64) {
4225        ___H::on_unknown_interaction(&mut self.0, ordinal).await
4226    }
4227}
4228
4229impl<___H, ___T> ComponentRunnerLocalServerHandler<___T> for ::fidl_next::Local<___H>
4230where
4231    ___H: ComponentRunnerServerHandler<___T>,
4232    ___T: ::fidl_next::Transport,
4233{
4234    async fn start(&mut self, request: ::fidl_next::Request<component_runner::Start, ___T>) {
4235        ___H::start(&mut self.0, request).await
4236    }
4237
4238    async fn on_unknown_interaction(&mut self, ordinal: u64) {
4239        ___H::on_unknown_interaction(&mut self.0, ordinal).await
4240    }
4241}
4242
4243/// The type corresponding to the TaskProvider protocol.
4244#[doc = " Served by runners that want to make a zircon job available through their runtime directory.\n"]
4245#[derive(PartialEq, Debug)]
4246pub struct TaskProvider;
4247
4248impl ::fidl_next::Discoverable for TaskProvider {
4249    const PROTOCOL_NAME: &'static str = "fuchsia.component.runner.TaskProvider";
4250}
4251
4252#[cfg(target_os = "fuchsia")]
4253impl ::fidl_next::HasTransport for TaskProvider {
4254    type Transport = ::fidl_next::fuchsia::zx::Channel;
4255}
4256
4257pub mod task_provider {
4258    pub mod prelude {
4259        pub use crate::{
4260            TaskProvider, TaskProviderClientHandler, TaskProviderLocalClientHandler,
4261            TaskProviderLocalServerHandler, TaskProviderServerHandler, task_provider,
4262        };
4263
4264        pub use crate::natural::TaskProviderGetJobResponse;
4265    }
4266
4267    pub struct GetJob;
4268
4269    impl ::fidl_next::Method for GetJob {
4270        const ORDINAL: u64 = 5520468615388521389;
4271        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4272            ::fidl_next::protocol::Flexibility::Strict;
4273
4274        type Protocol = crate::TaskProvider;
4275
4276        type Request = ::fidl_next::wire::EmptyMessageBody;
4277    }
4278
4279    impl ::fidl_next::TwoWayMethod for GetJob {
4280        type Response = ::fidl_next::wire::Result<
4281            'static,
4282            crate::wire::TaskProviderGetJobResponse,
4283            ::fidl_next::wire::fuchsia::StatusResult,
4284        >;
4285    }
4286
4287    impl<___R> ::fidl_next::Respond<___R> for GetJob {
4288        type Output = ::core::result::Result<
4289            crate::generic::TaskProviderGetJobResponse<___R>,
4290            ::fidl_next::never::Never,
4291        >;
4292
4293        fn respond(response: ___R) -> Self::Output {
4294            ::core::result::Result::Ok(crate::generic::TaskProviderGetJobResponse { job: response })
4295        }
4296    }
4297
4298    impl<___R> ::fidl_next::RespondErr<___R> for GetJob {
4299        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4300
4301        fn respond_err(response: ___R) -> Self::Output {
4302            ::core::result::Result::Err(response)
4303        }
4304    }
4305
4306    mod ___detail {
4307        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::TaskProvider
4308        where
4309            ___T: ::fidl_next::Transport,
4310        {
4311            type Client = TaskProviderClient<___T>;
4312            type Server = TaskProviderServer<___T>;
4313        }
4314
4315        /// The client for the `TaskProvider` protocol.
4316        #[repr(transparent)]
4317        pub struct TaskProviderClient<___T: ::fidl_next::Transport> {
4318            #[allow(dead_code)]
4319            client: ::fidl_next::protocol::Client<___T>,
4320        }
4321
4322        impl<___T> TaskProviderClient<___T>
4323        where
4324            ___T: ::fidl_next::Transport,
4325        {
4326            #[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"]
4327            pub fn get_job(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetJob, ___T> {
4328                ::fidl_next::TwoWayFuture::from_untyped(
4329                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
4330                        5520468615388521389,
4331                        <super::GetJob as ::fidl_next::Method>::FLEXIBILITY,
4332                        (),
4333                    ),
4334                )
4335            }
4336        }
4337
4338        /// The server for the `TaskProvider` protocol.
4339        #[repr(transparent)]
4340        pub struct TaskProviderServer<___T: ::fidl_next::Transport> {
4341            server: ::fidl_next::protocol::Server<___T>,
4342        }
4343
4344        impl<___T> TaskProviderServer<___T> where ___T: ::fidl_next::Transport {}
4345    }
4346}
4347
4348#[diagnostic::on_unimplemented(
4349    note = "If {Self} implements the non-local TaskProviderClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4350)]
4351
4352/// A client handler for the TaskProvider protocol.
4353///
4354/// See [`TaskProvider`] for more details.
4355pub trait TaskProviderLocalClientHandler<
4356    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4357    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4358>
4359{
4360    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
4361        ::core::future::ready(())
4362    }
4363}
4364
4365impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for TaskProvider
4366where
4367    ___H: TaskProviderLocalClientHandler<___T>,
4368    ___T: ::fidl_next::Transport,
4369{
4370    async fn on_event(
4371        handler: &mut ___H,
4372        mut message: ::fidl_next::Message<___T>,
4373    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4374        match *message.header().ordinal {
4375            ordinal => {
4376                handler.on_unknown_interaction(ordinal).await;
4377                if ::core::matches!(
4378                    message.header().flexibility(),
4379                    ::fidl_next::protocol::Flexibility::Strict
4380                ) {
4381                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4382                } else {
4383                    Ok(())
4384                }
4385            }
4386        }
4387    }
4388}
4389
4390#[diagnostic::on_unimplemented(
4391    note = "If {Self} implements the non-local TaskProviderServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4392)]
4393
4394/// A server handler for the TaskProvider protocol.
4395///
4396/// See [`TaskProvider`] for more details.
4397pub trait TaskProviderLocalServerHandler<
4398    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4399    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4400>
4401{
4402    #[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"]
4403    fn get_job(
4404        &mut self,
4405
4406        responder: ::fidl_next::Responder<task_provider::GetJob, ___T>,
4407    ) -> impl ::core::future::Future<Output = ()>;
4408
4409    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
4410        ::core::future::ready(())
4411    }
4412}
4413
4414impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for TaskProvider
4415where
4416    ___H: TaskProviderLocalServerHandler<___T>,
4417    ___T: ::fidl_next::Transport,
4418{
4419    async fn on_one_way(
4420        handler: &mut ___H,
4421        mut message: ::fidl_next::Message<___T>,
4422    ) -> ::core::result::Result<
4423        (),
4424        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4425    > {
4426        match *message.header().ordinal {
4427            ordinal => {
4428                handler.on_unknown_interaction(ordinal).await;
4429                if ::core::matches!(
4430                    message.header().flexibility(),
4431                    ::fidl_next::protocol::Flexibility::Strict
4432                ) {
4433                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4434                } else {
4435                    Ok(())
4436                }
4437            }
4438        }
4439    }
4440
4441    async fn on_two_way(
4442        handler: &mut ___H,
4443        mut message: ::fidl_next::Message<___T>,
4444        responder: ::fidl_next::protocol::Responder<___T>,
4445    ) -> ::core::result::Result<
4446        (),
4447        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4448    > {
4449        match *message.header().ordinal {
4450            5520468615388521389 => {
4451                let responder = ::fidl_next::Responder::from_untyped(responder);
4452
4453                handler.get_job(responder).await;
4454                Ok(())
4455            }
4456
4457            ordinal => {
4458                handler.on_unknown_interaction(ordinal).await;
4459                if ::core::matches!(
4460                    message.header().flexibility(),
4461                    ::fidl_next::protocol::Flexibility::Strict
4462                ) {
4463                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4464                } else {
4465                    responder
4466                        .respond_framework_error(
4467                            ordinal,
4468                            ::fidl_next::FrameworkError::UnknownMethod,
4469                        )
4470                        .expect("encoding a framework error should never fail")
4471                        .await?;
4472                    Ok(())
4473                }
4474            }
4475        }
4476    }
4477}
4478
4479/// A client handler for the TaskProvider protocol.
4480///
4481/// See [`TaskProvider`] for more details.
4482pub trait TaskProviderClientHandler<
4483    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4484    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4485>
4486{
4487    fn on_unknown_interaction(
4488        &mut self,
4489        ordinal: u64,
4490    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4491        ::core::future::ready(())
4492    }
4493}
4494
4495impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for TaskProvider
4496where
4497    ___H: TaskProviderClientHandler<___T> + ::core::marker::Send,
4498    ___T: ::fidl_next::Transport,
4499{
4500    async fn on_event(
4501        handler: &mut ___H,
4502        mut message: ::fidl_next::Message<___T>,
4503    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4504        match *message.header().ordinal {
4505            ordinal => {
4506                handler.on_unknown_interaction(ordinal).await;
4507                if ::core::matches!(
4508                    message.header().flexibility(),
4509                    ::fidl_next::protocol::Flexibility::Strict
4510                ) {
4511                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4512                } else {
4513                    Ok(())
4514                }
4515            }
4516        }
4517    }
4518}
4519
4520/// A server handler for the TaskProvider protocol.
4521///
4522/// See [`TaskProvider`] for more details.
4523pub trait TaskProviderServerHandler<
4524    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4525    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4526>
4527{
4528    #[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"]
4529    fn get_job(
4530        &mut self,
4531
4532        responder: ::fidl_next::Responder<task_provider::GetJob, ___T>,
4533    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4534
4535    fn on_unknown_interaction(
4536        &mut self,
4537        ordinal: u64,
4538    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4539        ::core::future::ready(())
4540    }
4541}
4542
4543impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for TaskProvider
4544where
4545    ___H: TaskProviderServerHandler<___T> + ::core::marker::Send,
4546    ___T: ::fidl_next::Transport,
4547{
4548    async fn on_one_way(
4549        handler: &mut ___H,
4550        mut message: ::fidl_next::Message<___T>,
4551    ) -> ::core::result::Result<
4552        (),
4553        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4554    > {
4555        match *message.header().ordinal {
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                    Ok(())
4565                }
4566            }
4567        }
4568    }
4569
4570    async fn on_two_way(
4571        handler: &mut ___H,
4572        mut message: ::fidl_next::Message<___T>,
4573        responder: ::fidl_next::protocol::Responder<___T>,
4574    ) -> ::core::result::Result<
4575        (),
4576        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4577    > {
4578        match *message.header().ordinal {
4579            5520468615388521389 => {
4580                let responder = ::fidl_next::Responder::from_untyped(responder);
4581
4582                handler.get_job(responder).await;
4583                Ok(())
4584            }
4585
4586            ordinal => {
4587                handler.on_unknown_interaction(ordinal).await;
4588                if ::core::matches!(
4589                    message.header().flexibility(),
4590                    ::fidl_next::protocol::Flexibility::Strict
4591                ) {
4592                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4593                } else {
4594                    responder
4595                        .respond_framework_error(
4596                            ordinal,
4597                            ::fidl_next::FrameworkError::UnknownMethod,
4598                        )
4599                        .expect("encoding a framework error should never fail")
4600                        .await?;
4601                    Ok(())
4602                }
4603            }
4604        }
4605    }
4606}
4607
4608impl<___T> TaskProviderClientHandler<___T> for ::fidl_next::IgnoreEvents
4609where
4610    ___T: ::fidl_next::Transport,
4611{
4612    async fn on_unknown_interaction(&mut self, _: u64) {}
4613}
4614
4615impl<___H, ___T> TaskProviderLocalClientHandler<___T> for ::fidl_next::Local<___H>
4616where
4617    ___H: TaskProviderClientHandler<___T>,
4618    ___T: ::fidl_next::Transport,
4619{
4620    async fn on_unknown_interaction(&mut self, ordinal: u64) {
4621        ___H::on_unknown_interaction(&mut self.0, ordinal).await
4622    }
4623}
4624
4625impl<___H, ___T> TaskProviderLocalServerHandler<___T> for ::fidl_next::Local<___H>
4626where
4627    ___H: TaskProviderServerHandler<___T>,
4628    ___T: ::fidl_next::Transport,
4629{
4630    async fn get_job(&mut self, responder: ::fidl_next::Responder<task_provider::GetJob, ___T>) {
4631        ___H::get_job(&mut self.0, responder).await
4632    }
4633
4634    async fn on_unknown_interaction(&mut self, ordinal: u64) {
4635        ___H::on_unknown_interaction(&mut self.0, ordinal).await
4636    }
4637}
4638
4639pub use fidl_next_common_fuchsia_component_runner::*;