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