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            ComponentControllerServerHandler, component_controller,
2937        };
2938
2939        pub use crate::natural::ComponentControllerOnEscrowRequest;
2940
2941        pub use crate::natural::ComponentControllerOnPublishDiagnosticsRequest;
2942
2943        pub use crate::natural::ComponentStopInfo;
2944    }
2945
2946    pub struct Stop;
2947
2948    impl ::fidl_next::Method for Stop {
2949        const ORDINAL: u64 = 4804506821232171874;
2950        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2951            ::fidl_next::protocol::Flexibility::Strict;
2952
2953        type Protocol = crate::ComponentController;
2954
2955        type Request = ::fidl_next::wire::EmptyMessageBody;
2956    }
2957
2958    pub struct Kill;
2959
2960    impl ::fidl_next::Method for Kill {
2961        const ORDINAL: u64 = 4514346391631670964;
2962        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2963            ::fidl_next::protocol::Flexibility::Strict;
2964
2965        type Protocol = crate::ComponentController;
2966
2967        type Request = ::fidl_next::wire::EmptyMessageBody;
2968    }
2969
2970    pub struct OnPublishDiagnostics;
2971
2972    impl ::fidl_next::Method for OnPublishDiagnostics {
2973        const ORDINAL: u64 = 2240216199992207687;
2974        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2975            ::fidl_next::protocol::Flexibility::Strict;
2976
2977        type Protocol = crate::ComponentController;
2978
2979        type Request = crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>;
2980    }
2981
2982    pub struct OnEscrow;
2983
2984    impl ::fidl_next::Method for OnEscrow {
2985        const ORDINAL: u64 = 730448769712342012;
2986        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2987            ::fidl_next::protocol::Flexibility::Flexible;
2988
2989        type Protocol = crate::ComponentController;
2990
2991        type Request = crate::wire::ComponentControllerOnEscrowRequest<'static>;
2992    }
2993
2994    pub struct OnStop;
2995
2996    impl ::fidl_next::Method for OnStop {
2997        const ORDINAL: u64 = 4322651556509354674;
2998        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2999            ::fidl_next::protocol::Flexibility::Flexible;
3000
3001        type Protocol = crate::ComponentController;
3002
3003        type Request = crate::wire::ComponentStopInfo<'static>;
3004    }
3005
3006    mod ___detail {
3007        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ComponentController
3008        where
3009            ___T: ::fidl_next::Transport,
3010        {
3011            type Client = ComponentControllerClient<___T>;
3012            type Server = ComponentControllerServer<___T>;
3013        }
3014
3015        /// The client for the `ComponentController` protocol.
3016        #[repr(transparent)]
3017        pub struct ComponentControllerClient<___T: ::fidl_next::Transport> {
3018            #[allow(dead_code)]
3019            client: ::fidl_next::protocol::Client<___T>,
3020        }
3021
3022        impl<___T> ComponentControllerClient<___T>
3023        where
3024            ___T: ::fidl_next::Transport,
3025        {
3026            #[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"]
3027            pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3028                ::fidl_next::SendFuture::from_untyped(
3029                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
3030                        4804506821232171874,
3031                        <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
3032                        (),
3033                    ),
3034                )
3035            }
3036
3037            #[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"]
3038            pub fn kill(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3039                ::fidl_next::SendFuture::from_untyped(
3040                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
3041                        4514346391631670964,
3042                        <super::Kill as ::fidl_next::Method>::FLEXIBILITY,
3043                        (),
3044                    ),
3045                )
3046            }
3047        }
3048
3049        /// The server for the `ComponentController` protocol.
3050        #[repr(transparent)]
3051        pub struct ComponentControllerServer<___T: ::fidl_next::Transport> {
3052            server: ::fidl_next::protocol::Server<___T>,
3053        }
3054
3055        impl<___T> ComponentControllerServer<___T>
3056        where
3057            ___T: ::fidl_next::Transport,
3058        {
3059            #[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"]
3060            pub fn on_publish_diagnostics(
3061                &self,
3062
3063                payload: impl ::fidl_next::Encode<
3064                    crate::wire::ComponentDiagnostics<'static>,
3065                    <___T as ::fidl_next::Transport>::SendBuffer,
3066                >,
3067            ) -> ::fidl_next::SendFuture<'_, ___T>
3068            where
3069                <___T as ::fidl_next::Transport>::SendBuffer:
3070                    ::fidl_next::encoder::InternalHandleEncoder,
3071                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3072                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3073            {
3074                self.on_publish_diagnostics_with(
3075                    crate::generic::ComponentControllerOnPublishDiagnosticsRequest { payload },
3076                )
3077            }
3078
3079            #[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"]
3080
3081            pub fn on_publish_diagnostics_with<___R>(
3082                &self,
3083                request: ___R,
3084            ) -> ::fidl_next::SendFuture<'_, ___T>
3085            where
3086                ___R: ::fidl_next::Encode<
3087                        <super::OnPublishDiagnostics as ::fidl_next::Method>::Request,
3088                        <___T as ::fidl_next::Transport>::SendBuffer,
3089                    >,
3090            {
3091                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3092                    2240216199992207687,
3093                    <super::OnPublishDiagnostics as ::fidl_next::Method>::FLEXIBILITY,
3094                    request,
3095                ))
3096            }
3097
3098            #[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"]
3099
3100            pub fn on_escrow_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3101            where
3102                ___R: ::fidl_next::Encode<
3103                        <super::OnEscrow as ::fidl_next::Method>::Request,
3104                        <___T as ::fidl_next::Transport>::SendBuffer,
3105                    >,
3106            {
3107                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3108                    730448769712342012,
3109                    <super::OnEscrow as ::fidl_next::Method>::FLEXIBILITY,
3110                    request,
3111                ))
3112            }
3113
3114            #[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"]
3115
3116            pub fn on_stop_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3117            where
3118                ___R: ::fidl_next::Encode<
3119                        <super::OnStop as ::fidl_next::Method>::Request,
3120                        <___T as ::fidl_next::Transport>::SendBuffer,
3121                    >,
3122            {
3123                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3124                    4322651556509354674,
3125                    <super::OnStop as ::fidl_next::Method>::FLEXIBILITY,
3126                    request,
3127                ))
3128            }
3129        }
3130    }
3131}
3132
3133/// A client handler for the ComponentController protocol.
3134///
3135/// See [`ComponentController`] for more details.
3136pub trait ComponentControllerClientHandler<
3137    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3138    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3139>
3140{
3141    #[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"]
3142    fn on_publish_diagnostics(
3143        &mut self,
3144
3145        request: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3146    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3147
3148    #[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"]
3149    fn on_escrow(
3150        &mut self,
3151
3152        request: ::fidl_next::Request<component_controller::OnEscrow, ___T>,
3153    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3154
3155    #[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"]
3156    fn on_stop(
3157        &mut self,
3158
3159        request: ::fidl_next::Request<component_controller::OnStop, ___T>,
3160    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3161
3162    fn on_unknown_interaction(
3163        &mut self,
3164        ordinal: u64,
3165    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3166        ::core::future::ready(())
3167    }
3168}
3169
3170impl<___T> ComponentControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
3171where
3172    ___T: ::fidl_next::Transport,
3173{
3174    async fn on_publish_diagnostics(
3175        &mut self,
3176
3177        _: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
3178    ) {
3179    }
3180
3181    async fn on_escrow(&mut self, _: ::fidl_next::Request<component_controller::OnEscrow, ___T>) {}
3182
3183    async fn on_stop(&mut self, _: ::fidl_next::Request<component_controller::OnStop, ___T>) {}
3184
3185    async fn on_unknown_interaction(&mut self, _: u64) {}
3186}
3187
3188impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ComponentController
3189where
3190    ___H: ComponentControllerClientHandler<___T> + ::core::marker::Send,
3191    ___T: ::fidl_next::Transport,
3192    for<'de> crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>: ::fidl_next::Decode<
3193            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3194            Constraint = (),
3195        >,
3196    for<'de> crate::wire::ComponentControllerOnEscrowRequest<'de>: ::fidl_next::Decode<
3197            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3198            Constraint = (),
3199        >,
3200    for<'de> crate::wire::ComponentStopInfo<'de>: ::fidl_next::Decode<
3201            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3202            Constraint = (),
3203        >,
3204{
3205    async fn on_event(
3206        handler: &mut ___H,
3207        ordinal: u64,
3208        flexibility: ::fidl_next::protocol::Flexibility,
3209        body: ::fidl_next::Body<___T>,
3210    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3211        match ordinal {
3212            2240216199992207687 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
3213                Ok(decoded) => {
3214                    handler
3215                        .on_publish_diagnostics(::fidl_next::Request::from_decoded(decoded))
3216                        .await;
3217                    Ok(())
3218                }
3219                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3220                    ordinal: 2240216199992207687,
3221                    error,
3222                }),
3223            },
3224
3225            730448769712342012 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
3226                Ok(decoded) => {
3227                    handler.on_escrow(::fidl_next::Request::from_decoded(decoded)).await;
3228                    Ok(())
3229                }
3230                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3231                    ordinal: 730448769712342012,
3232                    error,
3233                }),
3234            },
3235
3236            4322651556509354674 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
3237                Ok(decoded) => {
3238                    handler.on_stop(::fidl_next::Request::from_decoded(decoded)).await;
3239                    Ok(())
3240                }
3241                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3242                    ordinal: 4322651556509354674,
3243                    error,
3244                }),
3245            },
3246
3247            ordinal => {
3248                handler.on_unknown_interaction(ordinal).await;
3249                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3250                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3251                } else {
3252                    Ok(())
3253                }
3254            }
3255        }
3256    }
3257}
3258
3259/// A server handler for the ComponentController protocol.
3260///
3261/// See [`ComponentController`] for more details.
3262pub trait ComponentControllerServerHandler<
3263    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3264    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3265>
3266{
3267    #[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"]
3268    fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3269
3270    #[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"]
3271    fn kill(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3272
3273    fn on_unknown_interaction(
3274        &mut self,
3275        ordinal: u64,
3276    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3277        ::core::future::ready(())
3278    }
3279}
3280
3281impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ComponentController
3282where
3283    ___H: ComponentControllerServerHandler<___T> + ::core::marker::Send,
3284    ___T: ::fidl_next::Transport,
3285{
3286    async fn on_one_way(
3287        handler: &mut ___H,
3288        ordinal: u64,
3289        flexibility: ::fidl_next::protocol::Flexibility,
3290        body: ::fidl_next::Body<___T>,
3291    ) -> ::core::result::Result<
3292        (),
3293        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3294    > {
3295        match ordinal {
3296            4804506821232171874 => {
3297                handler.stop().await;
3298                Ok(())
3299            }
3300
3301            4514346391631670964 => {
3302                handler.kill().await;
3303                Ok(())
3304            }
3305
3306            ordinal => {
3307                handler.on_unknown_interaction(ordinal).await;
3308                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3309                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3310                } else {
3311                    Ok(())
3312                }
3313            }
3314        }
3315    }
3316
3317    async fn on_two_way(
3318        handler: &mut ___H,
3319        ordinal: u64,
3320        flexibility: ::fidl_next::protocol::Flexibility,
3321        body: ::fidl_next::Body<___T>,
3322        responder: ::fidl_next::protocol::Responder<___T>,
3323    ) -> ::core::result::Result<
3324        (),
3325        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3326    > {
3327        match ordinal {
3328            ordinal => {
3329                handler.on_unknown_interaction(ordinal).await;
3330                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3331                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3332                } else {
3333                    responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
3334                                ordinal,
3335                                flexibility,
3336                                ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
3337                            )
3338                            .expect("encoding a framework error should never fail")
3339                            .await?;
3340                    Ok(())
3341                }
3342            }
3343        }
3344    }
3345}
3346
3347/// The type corresponding to the ComponentRunner protocol.
3348#[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"]
3349#[derive(PartialEq, Debug)]
3350pub struct ComponentRunner;
3351
3352impl ::fidl_next::Discoverable for ComponentRunner {
3353    const PROTOCOL_NAME: &'static str = "fuchsia.component.runner.ComponentRunner";
3354}
3355
3356#[cfg(target_os = "fuchsia")]
3357impl ::fidl_next::HasTransport for ComponentRunner {
3358    type Transport = ::fidl_next::fuchsia::zx::Channel;
3359}
3360
3361pub mod component_runner {
3362    pub mod prelude {
3363        pub use crate::{
3364            ComponentRunner, ComponentRunnerClientHandler, ComponentRunnerServerHandler,
3365            component_runner,
3366        };
3367
3368        pub use crate::natural::ComponentRunnerStartRequest;
3369    }
3370
3371    pub struct Start;
3372
3373    impl ::fidl_next::Method for Start {
3374        const ORDINAL: u64 = 780715659970866697;
3375        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3376            ::fidl_next::protocol::Flexibility::Strict;
3377
3378        type Protocol = crate::ComponentRunner;
3379
3380        type Request = crate::wire::ComponentRunnerStartRequest<'static>;
3381    }
3382
3383    mod ___detail {
3384        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ComponentRunner
3385        where
3386            ___T: ::fidl_next::Transport,
3387        {
3388            type Client = ComponentRunnerClient<___T>;
3389            type Server = ComponentRunnerServer<___T>;
3390        }
3391
3392        /// The client for the `ComponentRunner` protocol.
3393        #[repr(transparent)]
3394        pub struct ComponentRunnerClient<___T: ::fidl_next::Transport> {
3395            #[allow(dead_code)]
3396            client: ::fidl_next::protocol::Client<___T>,
3397        }
3398
3399        impl<___T> ComponentRunnerClient<___T>
3400        where
3401            ___T: ::fidl_next::Transport,
3402        {
3403            #[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"]
3404            pub fn start(
3405                &self,
3406
3407                start_info: impl ::fidl_next::Encode<
3408                    crate::wire::ComponentStartInfo<'static>,
3409                    <___T as ::fidl_next::Transport>::SendBuffer,
3410                >,
3411
3412                controller: impl ::fidl_next::Encode<
3413                    ::fidl_next::ServerEnd<
3414                        crate::ComponentController,
3415                        ::fidl_next::wire::fuchsia::Channel,
3416                    >,
3417                    <___T as ::fidl_next::Transport>::SendBuffer,
3418                >,
3419            ) -> ::fidl_next::SendFuture<'_, ___T>
3420            where
3421                <___T as ::fidl_next::Transport>::SendBuffer:
3422                    ::fidl_next::encoder::InternalHandleEncoder,
3423                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3424                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3425            {
3426                self.start_with(crate::generic::ComponentRunnerStartRequest {
3427                    start_info,
3428
3429                    controller,
3430                })
3431            }
3432
3433            #[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"]
3434            pub fn start_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3435            where
3436                ___R: ::fidl_next::Encode<
3437                        crate::wire::ComponentRunnerStartRequest<'static>,
3438                        <___T as ::fidl_next::Transport>::SendBuffer,
3439                    >,
3440            {
3441                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3442                    780715659970866697,
3443                    <super::Start as ::fidl_next::Method>::FLEXIBILITY,
3444                    request,
3445                ))
3446            }
3447        }
3448
3449        /// The server for the `ComponentRunner` protocol.
3450        #[repr(transparent)]
3451        pub struct ComponentRunnerServer<___T: ::fidl_next::Transport> {
3452            server: ::fidl_next::protocol::Server<___T>,
3453        }
3454
3455        impl<___T> ComponentRunnerServer<___T> where ___T: ::fidl_next::Transport {}
3456    }
3457}
3458
3459/// A client handler for the ComponentRunner protocol.
3460///
3461/// See [`ComponentRunner`] for more details.
3462pub trait ComponentRunnerClientHandler<
3463    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3464    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3465>
3466{
3467    fn on_unknown_interaction(
3468        &mut self,
3469        ordinal: u64,
3470    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3471        ::core::future::ready(())
3472    }
3473}
3474
3475impl<___T> ComponentRunnerClientHandler<___T> for ::fidl_next::IgnoreEvents
3476where
3477    ___T: ::fidl_next::Transport,
3478{
3479    async fn on_unknown_interaction(&mut self, _: u64) {}
3480}
3481
3482impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ComponentRunner
3483where
3484    ___H: ComponentRunnerClientHandler<___T> + ::core::marker::Send,
3485    ___T: ::fidl_next::Transport,
3486{
3487    async fn on_event(
3488        handler: &mut ___H,
3489        ordinal: u64,
3490        flexibility: ::fidl_next::protocol::Flexibility,
3491        body: ::fidl_next::Body<___T>,
3492    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3493        match ordinal {
3494            ordinal => {
3495                handler.on_unknown_interaction(ordinal).await;
3496                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3497                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3498                } else {
3499                    Ok(())
3500                }
3501            }
3502        }
3503    }
3504}
3505
3506/// A server handler for the ComponentRunner protocol.
3507///
3508/// See [`ComponentRunner`] for more details.
3509pub trait ComponentRunnerServerHandler<
3510    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3511    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3512>
3513{
3514    #[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"]
3515    fn start(
3516        &mut self,
3517
3518        request: ::fidl_next::Request<component_runner::Start, ___T>,
3519    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3520
3521    fn on_unknown_interaction(
3522        &mut self,
3523        ordinal: u64,
3524    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3525        ::core::future::ready(())
3526    }
3527}
3528
3529impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ComponentRunner
3530where
3531    ___H: ComponentRunnerServerHandler<___T> + ::core::marker::Send,
3532    ___T: ::fidl_next::Transport,
3533    for<'de> crate::wire::ComponentRunnerStartRequest<'de>: ::fidl_next::Decode<
3534            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3535            Constraint = (),
3536        >,
3537{
3538    async fn on_one_way(
3539        handler: &mut ___H,
3540        ordinal: u64,
3541        flexibility: ::fidl_next::protocol::Flexibility,
3542        body: ::fidl_next::Body<___T>,
3543    ) -> ::core::result::Result<
3544        (),
3545        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3546    > {
3547        match ordinal {
3548            780715659970866697 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
3549                Ok(decoded) => {
3550                    handler.start(::fidl_next::Request::from_decoded(decoded)).await;
3551                    Ok(())
3552                }
3553                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3554                    ordinal: 780715659970866697,
3555                    error,
3556                }),
3557            },
3558
3559            ordinal => {
3560                handler.on_unknown_interaction(ordinal).await;
3561                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3562                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3563                } else {
3564                    Ok(())
3565                }
3566            }
3567        }
3568    }
3569
3570    async fn on_two_way(
3571        handler: &mut ___H,
3572        ordinal: u64,
3573        flexibility: ::fidl_next::protocol::Flexibility,
3574        body: ::fidl_next::Body<___T>,
3575        responder: ::fidl_next::protocol::Responder<___T>,
3576    ) -> ::core::result::Result<
3577        (),
3578        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3579    > {
3580        match ordinal {
3581            ordinal => {
3582                handler.on_unknown_interaction(ordinal).await;
3583                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3584                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3585                } else {
3586                    responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
3587                                ordinal,
3588                                flexibility,
3589                                ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
3590                            )
3591                            .expect("encoding a framework error should never fail")
3592                            .await?;
3593                    Ok(())
3594                }
3595            }
3596        }
3597    }
3598}
3599
3600/// The type corresponding to the TaskProvider protocol.
3601#[doc = " Served by runners that want to make a zircon job available through their runtime directory.\n"]
3602#[derive(PartialEq, Debug)]
3603pub struct TaskProvider;
3604
3605impl ::fidl_next::Discoverable for TaskProvider {
3606    const PROTOCOL_NAME: &'static str = "fuchsia.component.runner.TaskProvider";
3607}
3608
3609#[cfg(target_os = "fuchsia")]
3610impl ::fidl_next::HasTransport for TaskProvider {
3611    type Transport = ::fidl_next::fuchsia::zx::Channel;
3612}
3613
3614pub mod task_provider {
3615    pub mod prelude {
3616        pub use crate::{
3617            TaskProvider, TaskProviderClientHandler, TaskProviderServerHandler, task_provider,
3618        };
3619
3620        pub use crate::natural::TaskProviderGetJobResponse;
3621    }
3622
3623    pub struct GetJob;
3624
3625    impl ::fidl_next::Method for GetJob {
3626        const ORDINAL: u64 = 5520468615388521389;
3627        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3628            ::fidl_next::protocol::Flexibility::Strict;
3629
3630        type Protocol = crate::TaskProvider;
3631
3632        type Request = ::fidl_next::wire::EmptyMessageBody;
3633    }
3634
3635    impl ::fidl_next::TwoWayMethod for GetJob {
3636        type Response = ::fidl_next::wire::Result<
3637            'static,
3638            crate::wire::TaskProviderGetJobResponse,
3639            ::fidl_next::wire::Int32,
3640        >;
3641    }
3642
3643    impl<___R> ::fidl_next::Respond<___R> for GetJob {
3644        type Output = ::core::result::Result<
3645            crate::generic::TaskProviderGetJobResponse<___R>,
3646            ::fidl_next::util::Never,
3647        >;
3648
3649        fn respond(response: ___R) -> Self::Output {
3650            ::core::result::Result::Ok(crate::generic::TaskProviderGetJobResponse { job: response })
3651        }
3652    }
3653
3654    impl<___R> ::fidl_next::RespondErr<___R> for GetJob {
3655        type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3656
3657        fn respond_err(response: ___R) -> Self::Output {
3658            ::core::result::Result::Err(response)
3659        }
3660    }
3661
3662    mod ___detail {
3663        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::TaskProvider
3664        where
3665            ___T: ::fidl_next::Transport,
3666        {
3667            type Client = TaskProviderClient<___T>;
3668            type Server = TaskProviderServer<___T>;
3669        }
3670
3671        /// The client for the `TaskProvider` protocol.
3672        #[repr(transparent)]
3673        pub struct TaskProviderClient<___T: ::fidl_next::Transport> {
3674            #[allow(dead_code)]
3675            client: ::fidl_next::protocol::Client<___T>,
3676        }
3677
3678        impl<___T> TaskProviderClient<___T>
3679        where
3680            ___T: ::fidl_next::Transport,
3681        {
3682            #[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"]
3683            pub fn get_job(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetJob, ___T> {
3684                ::fidl_next::TwoWayFuture::from_untyped(
3685                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
3686                        5520468615388521389,
3687                        <super::GetJob as ::fidl_next::Method>::FLEXIBILITY,
3688                        (),
3689                    ),
3690                )
3691            }
3692        }
3693
3694        /// The server for the `TaskProvider` protocol.
3695        #[repr(transparent)]
3696        pub struct TaskProviderServer<___T: ::fidl_next::Transport> {
3697            server: ::fidl_next::protocol::Server<___T>,
3698        }
3699
3700        impl<___T> TaskProviderServer<___T> where ___T: ::fidl_next::Transport {}
3701    }
3702}
3703
3704/// A client handler for the TaskProvider protocol.
3705///
3706/// See [`TaskProvider`] for more details.
3707pub trait TaskProviderClientHandler<
3708    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3709    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3710>
3711{
3712    fn on_unknown_interaction(
3713        &mut self,
3714        ordinal: u64,
3715    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3716        ::core::future::ready(())
3717    }
3718}
3719
3720impl<___T> TaskProviderClientHandler<___T> for ::fidl_next::IgnoreEvents
3721where
3722    ___T: ::fidl_next::Transport,
3723{
3724    async fn on_unknown_interaction(&mut self, _: u64) {}
3725}
3726
3727impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for TaskProvider
3728where
3729    ___H: TaskProviderClientHandler<___T> + ::core::marker::Send,
3730    ___T: ::fidl_next::Transport,
3731{
3732    async fn on_event(
3733        handler: &mut ___H,
3734        ordinal: u64,
3735        flexibility: ::fidl_next::protocol::Flexibility,
3736        body: ::fidl_next::Body<___T>,
3737    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3738        match ordinal {
3739            ordinal => {
3740                handler.on_unknown_interaction(ordinal).await;
3741                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3742                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3743                } else {
3744                    Ok(())
3745                }
3746            }
3747        }
3748    }
3749}
3750
3751/// A server handler for the TaskProvider protocol.
3752///
3753/// See [`TaskProvider`] for more details.
3754pub trait TaskProviderServerHandler<
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 = " Returns a job handle for the component requested.\n\n On success, returns a handle with the same rights as the runner\'s.\n"]
3760    fn get_job(
3761        &mut self,
3762
3763        responder: ::fidl_next::Responder<task_provider::GetJob, ___T>,
3764    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3765
3766    fn on_unknown_interaction(
3767        &mut self,
3768        ordinal: u64,
3769    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3770        ::core::future::ready(())
3771    }
3772}
3773
3774impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for TaskProvider
3775where
3776    ___H: TaskProviderServerHandler<___T> + ::core::marker::Send,
3777    ___T: ::fidl_next::Transport,
3778{
3779    async fn on_one_way(
3780        handler: &mut ___H,
3781        ordinal: u64,
3782        flexibility: ::fidl_next::protocol::Flexibility,
3783        body: ::fidl_next::Body<___T>,
3784    ) -> ::core::result::Result<
3785        (),
3786        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3787    > {
3788        match ordinal {
3789            ordinal => {
3790                handler.on_unknown_interaction(ordinal).await;
3791                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3792                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3793                } else {
3794                    Ok(())
3795                }
3796            }
3797        }
3798    }
3799
3800    async fn on_two_way(
3801        handler: &mut ___H,
3802        ordinal: u64,
3803        flexibility: ::fidl_next::protocol::Flexibility,
3804        body: ::fidl_next::Body<___T>,
3805        responder: ::fidl_next::protocol::Responder<___T>,
3806    ) -> ::core::result::Result<
3807        (),
3808        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3809    > {
3810        match ordinal {
3811            5520468615388521389 => {
3812                let responder = ::fidl_next::Responder::from_untyped(responder);
3813
3814                handler.get_job(responder).await;
3815                Ok(())
3816            }
3817
3818            ordinal => {
3819                handler.on_unknown_interaction(ordinal).await;
3820                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3821                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3822                } else {
3823                    responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
3824                                ordinal,
3825                                flexibility,
3826                                ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
3827                            )
3828                            .expect("encoding a framework error should never fail")
3829                            .await?;
3830                    Ok(())
3831                }
3832            }
3833        }
3834    }
3835}
3836
3837pub use fidl_next_common_fuchsia_component_runner::*;