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