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