Skip to main content

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