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> = 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
30    ___E: ::fidl_next::fuchsia::HandleEncoder,
31{
32    #[inline]
33    fn encode(
34        &mut self,
35        encoder: &mut ___E,
36        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
37    ) -> Result<(), ::fidl_next::EncodeError> {
38        ::fidl_next::munge! {
39            let Self::Encoded {
40                handle,
41                id,
42
43            } = out;
44        }
45
46        ::fidl_next::Encode::encode(&mut self.handle, encoder, handle)?;
47
48        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
49
50        Ok(())
51    }
52}
53
54impl ::fidl_next::EncodableOption for Box<HandleInfo> {
55    type EncodedOption = ::fidl_next::WireBox<WireHandleInfo>;
56}
57
58unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<HandleInfo>
59where
60    ___E: ::fidl_next::Encoder + ?Sized,
61    HandleInfo: ::fidl_next::Encode<___E>,
62{
63    #[inline]
64    fn encode_option(
65        this: Option<&mut Self>,
66        encoder: &mut ___E,
67        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
68    ) -> Result<(), ::fidl_next::EncodeError> {
69        if let Some(inner) = this {
70            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
71            ::fidl_next::WireBox::encode_present(out);
72        } else {
73            ::fidl_next::WireBox::encode_absent(out);
74        }
75
76        Ok(())
77    }
78}
79
80impl ::fidl_next::TakeFrom<WireHandleInfo> for HandleInfo {
81    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
82        ::fidl_next::CopyOptimization::enable_if(
83            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
84                .is_enabled()
85                && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
86        )
87    };
88
89    #[inline]
90    fn take_from(from: &WireHandleInfo) -> Self {
91        Self {
92            handle: ::fidl_next::TakeFrom::take_from(&from.handle),
93
94            id: ::fidl_next::TakeFrom::take_from(&from.id),
95        }
96    }
97}
98
99/// The wire type corresponding to [`HandleInfo`].
100#[derive(Debug)]
101#[repr(C)]
102pub struct WireHandleInfo {
103    pub handle: ::fidl_next::fuchsia::WireHandle,
104
105    pub id: ::fidl_next::WireU32,
106}
107
108unsafe impl ::fidl_next::ZeroPadding for WireHandleInfo {
109    #[inline]
110    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
111}
112
113unsafe impl<___D> ::fidl_next::Decode<___D> for WireHandleInfo
114where
115    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
116
117    ___D: ::fidl_next::fuchsia::HandleDecoder,
118{
119    fn decode(
120        slot: ::fidl_next::Slot<'_, Self>,
121        decoder: &mut ___D,
122    ) -> Result<(), ::fidl_next::DecodeError> {
123        ::fidl_next::munge! {
124            let Self {
125                mut handle,
126                mut id,
127
128            } = slot;
129        }
130
131        ::fidl_next::Decode::decode(handle.as_mut(), decoder)?;
132
133        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
134
135        Ok(())
136    }
137}
138
139#[doc = " The information needed to launch a process.\n"]
140#[derive(Debug)]
141pub struct LaunchInfo {
142    pub executable: ::fidl_next::fuchsia::zx::Handle,
143
144    pub job: ::fidl_next::fuchsia::zx::Handle,
145
146    pub name: String,
147}
148
149impl ::fidl_next::Encodable for LaunchInfo {
150    type Encoded = WireLaunchInfo;
151}
152
153unsafe impl<___E> ::fidl_next::Encode<___E> for LaunchInfo
154where
155    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
156
157    ___E: ::fidl_next::Encoder,
158
159    ___E: ::fidl_next::fuchsia::HandleEncoder,
160{
161    #[inline]
162    fn encode(
163        &mut self,
164        encoder: &mut ___E,
165        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
166    ) -> Result<(), ::fidl_next::EncodeError> {
167        ::fidl_next::munge! {
168            let Self::Encoded {
169                executable,
170                job,
171                name,
172
173            } = out;
174        }
175
176        ::fidl_next::Encode::encode(&mut self.executable, encoder, executable)?;
177
178        ::fidl_next::Encode::encode(&mut self.job, encoder, job)?;
179
180        ::fidl_next::Encode::encode(&mut self.name, encoder, name)?;
181
182        Ok(())
183    }
184}
185
186impl ::fidl_next::EncodableOption for Box<LaunchInfo> {
187    type EncodedOption = ::fidl_next::WireBox<WireLaunchInfo>;
188}
189
190unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<LaunchInfo>
191where
192    ___E: ::fidl_next::Encoder + ?Sized,
193    LaunchInfo: ::fidl_next::Encode<___E>,
194{
195    #[inline]
196    fn encode_option(
197        this: Option<&mut Self>,
198        encoder: &mut ___E,
199        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
200    ) -> Result<(), ::fidl_next::EncodeError> {
201        if let Some(inner) = this {
202            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
203            ::fidl_next::WireBox::encode_present(out);
204        } else {
205            ::fidl_next::WireBox::encode_absent(out);
206        }
207
208        Ok(())
209    }
210}
211
212impl ::fidl_next::TakeFrom<WireLaunchInfo> for LaunchInfo {
213    #[inline]
214    fn take_from(from: &WireLaunchInfo) -> Self {
215        Self {
216            executable: ::fidl_next::TakeFrom::take_from(&from.executable),
217
218            job: ::fidl_next::TakeFrom::take_from(&from.job),
219
220            name: ::fidl_next::TakeFrom::take_from(&from.name),
221        }
222    }
223}
224
225/// The wire type corresponding to [`LaunchInfo`].
226#[derive(Debug)]
227#[repr(C)]
228pub struct WireLaunchInfo {
229    pub executable: ::fidl_next::fuchsia::WireHandle,
230
231    pub job: ::fidl_next::fuchsia::WireHandle,
232
233    pub name: ::fidl_next::WireString,
234}
235
236unsafe impl ::fidl_next::ZeroPadding for WireLaunchInfo {
237    #[inline]
238    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
239}
240
241unsafe impl<___D> ::fidl_next::Decode<___D> for WireLaunchInfo
242where
243    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
244
245    ___D: ::fidl_next::Decoder,
246
247    ___D: ::fidl_next::fuchsia::HandleDecoder,
248{
249    fn decode(
250        slot: ::fidl_next::Slot<'_, Self>,
251        decoder: &mut ___D,
252    ) -> Result<(), ::fidl_next::DecodeError> {
253        ::fidl_next::munge! {
254            let Self {
255                mut executable,
256                mut job,
257                mut name,
258
259            } = slot;
260        }
261
262        ::fidl_next::Decode::decode(executable.as_mut(), decoder)?;
263
264        ::fidl_next::Decode::decode(job.as_mut(), decoder)?;
265
266        ::fidl_next::Decode::decode(name.as_mut(), decoder)?;
267
268        let name = unsafe { name.deref_unchecked() };
269
270        if name.len() > 32 {
271            return Err(::fidl_next::DecodeError::VectorTooLong {
272                size: name.len() as u64,
273                limit: 32,
274            });
275        }
276
277        Ok(())
278    }
279}
280
281#[derive(Debug)]
282pub struct LauncherLaunchRequest {
283    pub info: crate::LaunchInfo,
284}
285
286impl ::fidl_next::Encodable for LauncherLaunchRequest {
287    type Encoded = WireLauncherLaunchRequest;
288}
289
290unsafe impl<___E> ::fidl_next::Encode<___E> for LauncherLaunchRequest
291where
292    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
293
294    ___E: ::fidl_next::Encoder,
295
296    ___E: ::fidl_next::fuchsia::HandleEncoder,
297{
298    #[inline]
299    fn encode(
300        &mut self,
301        encoder: &mut ___E,
302        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
303    ) -> Result<(), ::fidl_next::EncodeError> {
304        ::fidl_next::munge! {
305            let Self::Encoded {
306                info,
307
308            } = out;
309        }
310
311        ::fidl_next::Encode::encode(&mut self.info, encoder, info)?;
312
313        Ok(())
314    }
315}
316
317impl ::fidl_next::EncodableOption for Box<LauncherLaunchRequest> {
318    type EncodedOption = ::fidl_next::WireBox<WireLauncherLaunchRequest>;
319}
320
321unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<LauncherLaunchRequest>
322where
323    ___E: ::fidl_next::Encoder + ?Sized,
324    LauncherLaunchRequest: ::fidl_next::Encode<___E>,
325{
326    #[inline]
327    fn encode_option(
328        this: Option<&mut Self>,
329        encoder: &mut ___E,
330        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
331    ) -> Result<(), ::fidl_next::EncodeError> {
332        if let Some(inner) = this {
333            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
334            ::fidl_next::WireBox::encode_present(out);
335        } else {
336            ::fidl_next::WireBox::encode_absent(out);
337        }
338
339        Ok(())
340    }
341}
342
343impl ::fidl_next::TakeFrom<WireLauncherLaunchRequest> for LauncherLaunchRequest {
344    #[inline]
345    fn take_from(from: &WireLauncherLaunchRequest) -> Self {
346        Self { info: ::fidl_next::TakeFrom::take_from(&from.info) }
347    }
348}
349
350/// The wire type corresponding to [`LauncherLaunchRequest`].
351#[derive(Debug)]
352#[repr(C)]
353pub struct WireLauncherLaunchRequest {
354    pub info: crate::WireLaunchInfo,
355}
356
357unsafe impl ::fidl_next::ZeroPadding for WireLauncherLaunchRequest {
358    #[inline]
359    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
360}
361
362unsafe impl<___D> ::fidl_next::Decode<___D> for WireLauncherLaunchRequest
363where
364    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
365
366    ___D: ::fidl_next::Decoder,
367
368    ___D: ::fidl_next::fuchsia::HandleDecoder,
369{
370    fn decode(
371        slot: ::fidl_next::Slot<'_, Self>,
372        decoder: &mut ___D,
373    ) -> Result<(), ::fidl_next::DecodeError> {
374        ::fidl_next::munge! {
375            let Self {
376                mut info,
377
378            } = slot;
379        }
380
381        ::fidl_next::Decode::decode(info.as_mut(), decoder)?;
382
383        Ok(())
384    }
385}
386
387#[derive(Debug)]
388#[repr(C)]
389pub struct LauncherLaunchResponse {
390    pub status: i32,
391
392    pub process: Option<::fidl_next::fuchsia::zx::Handle>,
393}
394
395impl ::fidl_next::Encodable for LauncherLaunchResponse {
396    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
397        ::fidl_next::CopyOptimization::enable_if(
398            true
399
400                && <
401                    i32 as ::fidl_next::Encodable
402                >::COPY_OPTIMIZATION.is_enabled()
403
404                && <
405                    Option<::fidl_next::fuchsia::zx::Handle> as ::fidl_next::Encodable
406                >::COPY_OPTIMIZATION.is_enabled()
407
408        )
409    };
410
411    type Encoded = WireLauncherLaunchResponse;
412}
413
414unsafe impl<___E> ::fidl_next::Encode<___E> for LauncherLaunchResponse
415where
416    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
417
418    ___E: ::fidl_next::fuchsia::HandleEncoder,
419{
420    #[inline]
421    fn encode(
422        &mut self,
423        encoder: &mut ___E,
424        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
425    ) -> Result<(), ::fidl_next::EncodeError> {
426        ::fidl_next::munge! {
427            let Self::Encoded {
428                status,
429                process,
430
431            } = out;
432        }
433
434        ::fidl_next::Encode::encode(&mut self.status, encoder, status)?;
435
436        ::fidl_next::Encode::encode(&mut self.process, encoder, process)?;
437
438        Ok(())
439    }
440}
441
442impl ::fidl_next::EncodableOption for Box<LauncherLaunchResponse> {
443    type EncodedOption = ::fidl_next::WireBox<WireLauncherLaunchResponse>;
444}
445
446unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<LauncherLaunchResponse>
447where
448    ___E: ::fidl_next::Encoder + ?Sized,
449    LauncherLaunchResponse: ::fidl_next::Encode<___E>,
450{
451    #[inline]
452    fn encode_option(
453        this: Option<&mut Self>,
454        encoder: &mut ___E,
455        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
456    ) -> Result<(), ::fidl_next::EncodeError> {
457        if let Some(inner) = this {
458            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
459            ::fidl_next::WireBox::encode_present(out);
460        } else {
461            ::fidl_next::WireBox::encode_absent(out);
462        }
463
464        Ok(())
465    }
466}
467
468impl ::fidl_next::TakeFrom<WireLauncherLaunchResponse> for LauncherLaunchResponse {
469    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
470        ::fidl_next::CopyOptimization::enable_if(
471            true
472
473                && <
474                    i32 as ::fidl_next::Encodable
475                >::COPY_OPTIMIZATION.is_enabled()
476
477                && <
478                    Option<::fidl_next::fuchsia::zx::Handle> as ::fidl_next::Encodable
479                >::COPY_OPTIMIZATION.is_enabled()
480
481        )
482    };
483
484    #[inline]
485    fn take_from(from: &WireLauncherLaunchResponse) -> Self {
486        Self {
487            status: ::fidl_next::TakeFrom::take_from(&from.status),
488
489            process: ::fidl_next::TakeFrom::take_from(&from.process),
490        }
491    }
492}
493
494/// The wire type corresponding to [`LauncherLaunchResponse`].
495#[derive(Debug)]
496#[repr(C)]
497pub struct WireLauncherLaunchResponse {
498    pub status: ::fidl_next::WireI32,
499
500    pub process: ::fidl_next::fuchsia::WireOptionalHandle,
501}
502
503unsafe impl ::fidl_next::ZeroPadding for WireLauncherLaunchResponse {
504    #[inline]
505    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
506}
507
508unsafe impl<___D> ::fidl_next::Decode<___D> for WireLauncherLaunchResponse
509where
510    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
511
512    ___D: ::fidl_next::fuchsia::HandleDecoder,
513{
514    fn decode(
515        slot: ::fidl_next::Slot<'_, Self>,
516        decoder: &mut ___D,
517    ) -> Result<(), ::fidl_next::DecodeError> {
518        ::fidl_next::munge! {
519            let Self {
520                mut status,
521                mut process,
522
523            } = slot;
524        }
525
526        ::fidl_next::Decode::decode(status.as_mut(), decoder)?;
527
528        ::fidl_next::Decode::decode(process.as_mut(), decoder)?;
529
530        Ok(())
531    }
532}
533
534#[derive(Debug)]
535pub struct LauncherCreateWithoutStartingRequest {
536    pub info: crate::LaunchInfo,
537}
538
539impl ::fidl_next::Encodable for LauncherCreateWithoutStartingRequest {
540    type Encoded = WireLauncherCreateWithoutStartingRequest;
541}
542
543unsafe impl<___E> ::fidl_next::Encode<___E> for LauncherCreateWithoutStartingRequest
544where
545    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
546
547    ___E: ::fidl_next::Encoder,
548
549    ___E: ::fidl_next::fuchsia::HandleEncoder,
550{
551    #[inline]
552    fn encode(
553        &mut self,
554        encoder: &mut ___E,
555        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
556    ) -> Result<(), ::fidl_next::EncodeError> {
557        ::fidl_next::munge! {
558            let Self::Encoded {
559                info,
560
561            } = out;
562        }
563
564        ::fidl_next::Encode::encode(&mut self.info, encoder, info)?;
565
566        Ok(())
567    }
568}
569
570impl ::fidl_next::EncodableOption for Box<LauncherCreateWithoutStartingRequest> {
571    type EncodedOption = ::fidl_next::WireBox<WireLauncherCreateWithoutStartingRequest>;
572}
573
574unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<LauncherCreateWithoutStartingRequest>
575where
576    ___E: ::fidl_next::Encoder + ?Sized,
577    LauncherCreateWithoutStartingRequest: ::fidl_next::Encode<___E>,
578{
579    #[inline]
580    fn encode_option(
581        this: Option<&mut Self>,
582        encoder: &mut ___E,
583        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
584    ) -> Result<(), ::fidl_next::EncodeError> {
585        if let Some(inner) = this {
586            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
587            ::fidl_next::WireBox::encode_present(out);
588        } else {
589            ::fidl_next::WireBox::encode_absent(out);
590        }
591
592        Ok(())
593    }
594}
595
596impl ::fidl_next::TakeFrom<WireLauncherCreateWithoutStartingRequest>
597    for LauncherCreateWithoutStartingRequest
598{
599    #[inline]
600    fn take_from(from: &WireLauncherCreateWithoutStartingRequest) -> Self {
601        Self { info: ::fidl_next::TakeFrom::take_from(&from.info) }
602    }
603}
604
605/// The wire type corresponding to [`LauncherCreateWithoutStartingRequest`].
606#[derive(Debug)]
607#[repr(C)]
608pub struct WireLauncherCreateWithoutStartingRequest {
609    pub info: crate::WireLaunchInfo,
610}
611
612unsafe impl ::fidl_next::ZeroPadding for WireLauncherCreateWithoutStartingRequest {
613    #[inline]
614    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
615}
616
617unsafe impl<___D> ::fidl_next::Decode<___D> for WireLauncherCreateWithoutStartingRequest
618where
619    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
620
621    ___D: ::fidl_next::Decoder,
622
623    ___D: ::fidl_next::fuchsia::HandleDecoder,
624{
625    fn decode(
626        slot: ::fidl_next::Slot<'_, Self>,
627        decoder: &mut ___D,
628    ) -> Result<(), ::fidl_next::DecodeError> {
629        ::fidl_next::munge! {
630            let Self {
631                mut info,
632
633            } = slot;
634        }
635
636        ::fidl_next::Decode::decode(info.as_mut(), decoder)?;
637
638        Ok(())
639    }
640}
641
642#[derive(Debug)]
643pub struct LauncherCreateWithoutStartingResponse {
644    pub status: i32,
645
646    pub data: Option<Box<crate::ProcessStartData>>,
647}
648
649impl ::fidl_next::Encodable for LauncherCreateWithoutStartingResponse {
650    type Encoded = WireLauncherCreateWithoutStartingResponse;
651}
652
653unsafe impl<___E> ::fidl_next::Encode<___E> for LauncherCreateWithoutStartingResponse
654where
655    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
656
657    ___E: ::fidl_next::Encoder,
658
659    ___E: ::fidl_next::fuchsia::HandleEncoder,
660{
661    #[inline]
662    fn encode(
663        &mut self,
664        encoder: &mut ___E,
665        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
666    ) -> Result<(), ::fidl_next::EncodeError> {
667        ::fidl_next::munge! {
668            let Self::Encoded {
669                status,
670                data,
671
672            } = out;
673        }
674
675        ::fidl_next::Encode::encode(&mut self.status, encoder, status)?;
676
677        ::fidl_next::Encode::encode(&mut self.data, encoder, data)?;
678
679        Ok(())
680    }
681}
682
683impl ::fidl_next::EncodableOption for Box<LauncherCreateWithoutStartingResponse> {
684    type EncodedOption = ::fidl_next::WireBox<WireLauncherCreateWithoutStartingResponse>;
685}
686
687unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<LauncherCreateWithoutStartingResponse>
688where
689    ___E: ::fidl_next::Encoder + ?Sized,
690    LauncherCreateWithoutStartingResponse: ::fidl_next::Encode<___E>,
691{
692    #[inline]
693    fn encode_option(
694        this: Option<&mut Self>,
695        encoder: &mut ___E,
696        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
697    ) -> Result<(), ::fidl_next::EncodeError> {
698        if let Some(inner) = this {
699            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
700            ::fidl_next::WireBox::encode_present(out);
701        } else {
702            ::fidl_next::WireBox::encode_absent(out);
703        }
704
705        Ok(())
706    }
707}
708
709impl ::fidl_next::TakeFrom<WireLauncherCreateWithoutStartingResponse>
710    for LauncherCreateWithoutStartingResponse
711{
712    #[inline]
713    fn take_from(from: &WireLauncherCreateWithoutStartingResponse) -> Self {
714        Self {
715            status: ::fidl_next::TakeFrom::take_from(&from.status),
716
717            data: ::fidl_next::TakeFrom::take_from(&from.data),
718        }
719    }
720}
721
722/// The wire type corresponding to [`LauncherCreateWithoutStartingResponse`].
723#[derive(Debug)]
724#[repr(C)]
725pub struct WireLauncherCreateWithoutStartingResponse {
726    pub status: ::fidl_next::WireI32,
727
728    pub data: ::fidl_next::WireBox<crate::WireProcessStartData>,
729}
730
731unsafe impl ::fidl_next::ZeroPadding for WireLauncherCreateWithoutStartingResponse {
732    #[inline]
733    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
734        unsafe {
735            out.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
736        }
737    }
738}
739
740unsafe impl<___D> ::fidl_next::Decode<___D> for WireLauncherCreateWithoutStartingResponse
741where
742    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
743
744    ___D: ::fidl_next::Decoder,
745
746    ___D: ::fidl_next::fuchsia::HandleDecoder,
747{
748    fn decode(
749        slot: ::fidl_next::Slot<'_, Self>,
750        decoder: &mut ___D,
751    ) -> Result<(), ::fidl_next::DecodeError> {
752        ::fidl_next::munge! {
753            let Self {
754                mut status,
755                mut data,
756
757            } = slot;
758        }
759
760        ::fidl_next::Decode::decode(status.as_mut(), decoder)?;
761
762        ::fidl_next::Decode::decode(data.as_mut(), decoder)?;
763
764        Ok(())
765    }
766}
767
768#[derive(Clone, Debug)]
769pub struct LauncherAddArgsRequest {
770    pub args: Vec<Vec<u8>>,
771}
772
773impl ::fidl_next::Encodable for LauncherAddArgsRequest {
774    type Encoded = WireLauncherAddArgsRequest;
775}
776
777unsafe impl<___E> ::fidl_next::Encode<___E> for LauncherAddArgsRequest
778where
779    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
780
781    ___E: ::fidl_next::Encoder,
782{
783    #[inline]
784    fn encode(
785        &mut self,
786        encoder: &mut ___E,
787        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
788    ) -> Result<(), ::fidl_next::EncodeError> {
789        ::fidl_next::munge! {
790            let Self::Encoded {
791                args,
792
793            } = out;
794        }
795
796        ::fidl_next::Encode::encode(&mut self.args, encoder, args)?;
797
798        Ok(())
799    }
800}
801
802impl ::fidl_next::EncodableOption for Box<LauncherAddArgsRequest> {
803    type EncodedOption = ::fidl_next::WireBox<WireLauncherAddArgsRequest>;
804}
805
806unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<LauncherAddArgsRequest>
807where
808    ___E: ::fidl_next::Encoder + ?Sized,
809    LauncherAddArgsRequest: ::fidl_next::Encode<___E>,
810{
811    #[inline]
812    fn encode_option(
813        this: Option<&mut Self>,
814        encoder: &mut ___E,
815        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
816    ) -> Result<(), ::fidl_next::EncodeError> {
817        if let Some(inner) = this {
818            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
819            ::fidl_next::WireBox::encode_present(out);
820        } else {
821            ::fidl_next::WireBox::encode_absent(out);
822        }
823
824        Ok(())
825    }
826}
827
828impl ::fidl_next::TakeFrom<WireLauncherAddArgsRequest> for LauncherAddArgsRequest {
829    #[inline]
830    fn take_from(from: &WireLauncherAddArgsRequest) -> Self {
831        Self { args: ::fidl_next::TakeFrom::take_from(&from.args) }
832    }
833}
834
835/// The wire type corresponding to [`LauncherAddArgsRequest`].
836#[derive(Debug)]
837#[repr(C)]
838pub struct WireLauncherAddArgsRequest {
839    pub args: ::fidl_next::WireVector<::fidl_next::WireVector<u8>>,
840}
841
842unsafe impl ::fidl_next::ZeroPadding for WireLauncherAddArgsRequest {
843    #[inline]
844    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
845}
846
847unsafe impl<___D> ::fidl_next::Decode<___D> for WireLauncherAddArgsRequest
848where
849    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
850
851    ___D: ::fidl_next::Decoder,
852{
853    fn decode(
854        slot: ::fidl_next::Slot<'_, Self>,
855        decoder: &mut ___D,
856    ) -> Result<(), ::fidl_next::DecodeError> {
857        ::fidl_next::munge! {
858            let Self {
859                mut args,
860
861            } = slot;
862        }
863
864        ::fidl_next::Decode::decode(args.as_mut(), decoder)?;
865
866        Ok(())
867    }
868}
869
870#[derive(Clone, Debug)]
871pub struct LauncherAddEnvironsRequest {
872    pub environ: Vec<Vec<u8>>,
873}
874
875impl ::fidl_next::Encodable for LauncherAddEnvironsRequest {
876    type Encoded = WireLauncherAddEnvironsRequest;
877}
878
879unsafe impl<___E> ::fidl_next::Encode<___E> for LauncherAddEnvironsRequest
880where
881    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
882
883    ___E: ::fidl_next::Encoder,
884{
885    #[inline]
886    fn encode(
887        &mut self,
888        encoder: &mut ___E,
889        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
890    ) -> Result<(), ::fidl_next::EncodeError> {
891        ::fidl_next::munge! {
892            let Self::Encoded {
893                environ,
894
895            } = out;
896        }
897
898        ::fidl_next::Encode::encode(&mut self.environ, encoder, environ)?;
899
900        Ok(())
901    }
902}
903
904impl ::fidl_next::EncodableOption for Box<LauncherAddEnvironsRequest> {
905    type EncodedOption = ::fidl_next::WireBox<WireLauncherAddEnvironsRequest>;
906}
907
908unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<LauncherAddEnvironsRequest>
909where
910    ___E: ::fidl_next::Encoder + ?Sized,
911    LauncherAddEnvironsRequest: ::fidl_next::Encode<___E>,
912{
913    #[inline]
914    fn encode_option(
915        this: Option<&mut Self>,
916        encoder: &mut ___E,
917        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
918    ) -> Result<(), ::fidl_next::EncodeError> {
919        if let Some(inner) = this {
920            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
921            ::fidl_next::WireBox::encode_present(out);
922        } else {
923            ::fidl_next::WireBox::encode_absent(out);
924        }
925
926        Ok(())
927    }
928}
929
930impl ::fidl_next::TakeFrom<WireLauncherAddEnvironsRequest> for LauncherAddEnvironsRequest {
931    #[inline]
932    fn take_from(from: &WireLauncherAddEnvironsRequest) -> Self {
933        Self { environ: ::fidl_next::TakeFrom::take_from(&from.environ) }
934    }
935}
936
937/// The wire type corresponding to [`LauncherAddEnvironsRequest`].
938#[derive(Debug)]
939#[repr(C)]
940pub struct WireLauncherAddEnvironsRequest {
941    pub environ: ::fidl_next::WireVector<::fidl_next::WireVector<u8>>,
942}
943
944unsafe impl ::fidl_next::ZeroPadding for WireLauncherAddEnvironsRequest {
945    #[inline]
946    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
947}
948
949unsafe impl<___D> ::fidl_next::Decode<___D> for WireLauncherAddEnvironsRequest
950where
951    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
952
953    ___D: ::fidl_next::Decoder,
954{
955    fn decode(
956        slot: ::fidl_next::Slot<'_, Self>,
957        decoder: &mut ___D,
958    ) -> Result<(), ::fidl_next::DecodeError> {
959        ::fidl_next::munge! {
960            let Self {
961                mut environ,
962
963            } = slot;
964        }
965
966        ::fidl_next::Decode::decode(environ.as_mut(), decoder)?;
967
968        Ok(())
969    }
970}
971
972#[derive(Debug)]
973pub struct LauncherAddHandlesRequest {
974    pub handles: Vec<crate::HandleInfo>,
975}
976
977impl ::fidl_next::Encodable for LauncherAddHandlesRequest {
978    type Encoded = WireLauncherAddHandlesRequest;
979}
980
981unsafe impl<___E> ::fidl_next::Encode<___E> for LauncherAddHandlesRequest
982where
983    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
984
985    ___E: ::fidl_next::Encoder,
986
987    ___E: ::fidl_next::fuchsia::HandleEncoder,
988{
989    #[inline]
990    fn encode(
991        &mut self,
992        encoder: &mut ___E,
993        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
994    ) -> Result<(), ::fidl_next::EncodeError> {
995        ::fidl_next::munge! {
996            let Self::Encoded {
997                handles,
998
999            } = out;
1000        }
1001
1002        ::fidl_next::Encode::encode(&mut self.handles, encoder, handles)?;
1003
1004        Ok(())
1005    }
1006}
1007
1008impl ::fidl_next::EncodableOption for Box<LauncherAddHandlesRequest> {
1009    type EncodedOption = ::fidl_next::WireBox<WireLauncherAddHandlesRequest>;
1010}
1011
1012unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<LauncherAddHandlesRequest>
1013where
1014    ___E: ::fidl_next::Encoder + ?Sized,
1015    LauncherAddHandlesRequest: ::fidl_next::Encode<___E>,
1016{
1017    #[inline]
1018    fn encode_option(
1019        this: Option<&mut Self>,
1020        encoder: &mut ___E,
1021        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1022    ) -> Result<(), ::fidl_next::EncodeError> {
1023        if let Some(inner) = this {
1024            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1025            ::fidl_next::WireBox::encode_present(out);
1026        } else {
1027            ::fidl_next::WireBox::encode_absent(out);
1028        }
1029
1030        Ok(())
1031    }
1032}
1033
1034impl ::fidl_next::TakeFrom<WireLauncherAddHandlesRequest> for LauncherAddHandlesRequest {
1035    #[inline]
1036    fn take_from(from: &WireLauncherAddHandlesRequest) -> Self {
1037        Self { handles: ::fidl_next::TakeFrom::take_from(&from.handles) }
1038    }
1039}
1040
1041/// The wire type corresponding to [`LauncherAddHandlesRequest`].
1042#[derive(Debug)]
1043#[repr(C)]
1044pub struct WireLauncherAddHandlesRequest {
1045    pub handles: ::fidl_next::WireVector<crate::WireHandleInfo>,
1046}
1047
1048unsafe impl ::fidl_next::ZeroPadding for WireLauncherAddHandlesRequest {
1049    #[inline]
1050    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
1051}
1052
1053unsafe impl<___D> ::fidl_next::Decode<___D> for WireLauncherAddHandlesRequest
1054where
1055    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1056
1057    ___D: ::fidl_next::Decoder,
1058
1059    ___D: ::fidl_next::fuchsia::HandleDecoder,
1060{
1061    fn decode(
1062        slot: ::fidl_next::Slot<'_, Self>,
1063        decoder: &mut ___D,
1064    ) -> Result<(), ::fidl_next::DecodeError> {
1065        ::fidl_next::munge! {
1066            let Self {
1067                mut handles,
1068
1069            } = slot;
1070        }
1071
1072        ::fidl_next::Decode::decode(handles.as_mut(), decoder)?;
1073
1074        Ok(())
1075    }
1076}
1077
1078#[derive(Clone, Debug)]
1079#[repr(C)]
1080pub struct LauncherSetOptionsRequest {
1081    pub options: u32,
1082}
1083
1084impl ::fidl_next::Encodable for LauncherSetOptionsRequest {
1085    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
1086        ::fidl_next::CopyOptimization::enable_if(
1087            true && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
1088        )
1089    };
1090
1091    type Encoded = WireLauncherSetOptionsRequest;
1092}
1093
1094unsafe impl<___E> ::fidl_next::Encode<___E> for LauncherSetOptionsRequest
1095where
1096    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1097{
1098    #[inline]
1099    fn encode(
1100        &mut self,
1101        encoder: &mut ___E,
1102        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1103    ) -> Result<(), ::fidl_next::EncodeError> {
1104        ::fidl_next::munge! {
1105            let Self::Encoded {
1106                options,
1107
1108            } = out;
1109        }
1110
1111        ::fidl_next::Encode::encode(&mut self.options, encoder, options)?;
1112
1113        Ok(())
1114    }
1115}
1116
1117impl ::fidl_next::EncodableOption for Box<LauncherSetOptionsRequest> {
1118    type EncodedOption = ::fidl_next::WireBox<WireLauncherSetOptionsRequest>;
1119}
1120
1121unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<LauncherSetOptionsRequest>
1122where
1123    ___E: ::fidl_next::Encoder + ?Sized,
1124    LauncherSetOptionsRequest: ::fidl_next::Encode<___E>,
1125{
1126    #[inline]
1127    fn encode_option(
1128        this: Option<&mut Self>,
1129        encoder: &mut ___E,
1130        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1131    ) -> Result<(), ::fidl_next::EncodeError> {
1132        if let Some(inner) = this {
1133            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1134            ::fidl_next::WireBox::encode_present(out);
1135        } else {
1136            ::fidl_next::WireBox::encode_absent(out);
1137        }
1138
1139        Ok(())
1140    }
1141}
1142
1143impl ::fidl_next::TakeFrom<WireLauncherSetOptionsRequest> for LauncherSetOptionsRequest {
1144    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
1145        ::fidl_next::CopyOptimization::enable_if(
1146            true && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
1147        )
1148    };
1149
1150    #[inline]
1151    fn take_from(from: &WireLauncherSetOptionsRequest) -> Self {
1152        Self { options: ::fidl_next::TakeFrom::take_from(&from.options) }
1153    }
1154}
1155
1156/// The wire type corresponding to [`LauncherSetOptionsRequest`].
1157#[derive(Clone, Debug)]
1158#[repr(C)]
1159pub struct WireLauncherSetOptionsRequest {
1160    pub options: ::fidl_next::WireU32,
1161}
1162
1163unsafe impl ::fidl_next::ZeroPadding for WireLauncherSetOptionsRequest {
1164    #[inline]
1165    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
1166}
1167
1168unsafe impl<___D> ::fidl_next::Decode<___D> for WireLauncherSetOptionsRequest
1169where
1170    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1171{
1172    fn decode(
1173        slot: ::fidl_next::Slot<'_, Self>,
1174        decoder: &mut ___D,
1175    ) -> Result<(), ::fidl_next::DecodeError> {
1176        ::fidl_next::munge! {
1177            let Self {
1178                mut options,
1179
1180            } = slot;
1181        }
1182
1183        ::fidl_next::Decode::decode(options.as_mut(), decoder)?;
1184
1185        Ok(())
1186    }
1187}
1188
1189#[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"]
1190#[derive(Debug)]
1191pub struct NameInfo {
1192    pub path: String,
1193
1194    pub directory: ::fidl_next::ClientEnd<
1195        ::fidl_next::fuchsia::zx::Channel,
1196        ::fidl_next_fuchsia_io::Directory,
1197    >,
1198}
1199
1200impl ::fidl_next::Encodable for NameInfo {
1201    type Encoded = WireNameInfo;
1202}
1203
1204unsafe impl<___E> ::fidl_next::Encode<___E> for NameInfo
1205where
1206    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1207
1208    ___E: ::fidl_next::Encoder,
1209
1210    ___E: ::fidl_next::fuchsia::HandleEncoder,
1211{
1212    #[inline]
1213    fn encode(
1214        &mut self,
1215        encoder: &mut ___E,
1216        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1217    ) -> Result<(), ::fidl_next::EncodeError> {
1218        ::fidl_next::munge! {
1219            let Self::Encoded {
1220                path,
1221                directory,
1222
1223            } = out;
1224        }
1225
1226        ::fidl_next::Encode::encode(&mut self.path, encoder, path)?;
1227
1228        ::fidl_next::Encode::encode(&mut self.directory, encoder, directory)?;
1229
1230        Ok(())
1231    }
1232}
1233
1234impl ::fidl_next::EncodableOption for Box<NameInfo> {
1235    type EncodedOption = ::fidl_next::WireBox<WireNameInfo>;
1236}
1237
1238unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<NameInfo>
1239where
1240    ___E: ::fidl_next::Encoder + ?Sized,
1241    NameInfo: ::fidl_next::Encode<___E>,
1242{
1243    #[inline]
1244    fn encode_option(
1245        this: Option<&mut Self>,
1246        encoder: &mut ___E,
1247        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1248    ) -> Result<(), ::fidl_next::EncodeError> {
1249        if let Some(inner) = this {
1250            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1251            ::fidl_next::WireBox::encode_present(out);
1252        } else {
1253            ::fidl_next::WireBox::encode_absent(out);
1254        }
1255
1256        Ok(())
1257    }
1258}
1259
1260impl ::fidl_next::TakeFrom<WireNameInfo> for NameInfo {
1261    #[inline]
1262    fn take_from(from: &WireNameInfo) -> Self {
1263        Self {
1264            path: ::fidl_next::TakeFrom::take_from(&from.path),
1265
1266            directory: ::fidl_next::TakeFrom::take_from(&from.directory),
1267        }
1268    }
1269}
1270
1271/// The wire type corresponding to [`NameInfo`].
1272#[derive(Debug)]
1273#[repr(C)]
1274pub struct WireNameInfo {
1275    pub path: ::fidl_next::WireString,
1276
1277    pub directory: ::fidl_next::ClientEnd<
1278        ::fidl_next::fuchsia::WireChannel,
1279        ::fidl_next_fuchsia_io::Directory,
1280    >,
1281}
1282
1283unsafe impl ::fidl_next::ZeroPadding for WireNameInfo {
1284    #[inline]
1285    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1286        unsafe {
1287            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
1288        }
1289    }
1290}
1291
1292unsafe impl<___D> ::fidl_next::Decode<___D> for WireNameInfo
1293where
1294    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1295
1296    ___D: ::fidl_next::Decoder,
1297
1298    ___D: ::fidl_next::fuchsia::HandleDecoder,
1299{
1300    fn decode(
1301        slot: ::fidl_next::Slot<'_, Self>,
1302        decoder: &mut ___D,
1303    ) -> Result<(), ::fidl_next::DecodeError> {
1304        ::fidl_next::munge! {
1305            let Self {
1306                mut path,
1307                mut directory,
1308
1309            } = slot;
1310        }
1311
1312        ::fidl_next::Decode::decode(path.as_mut(), decoder)?;
1313
1314        let path = unsafe { path.deref_unchecked() };
1315
1316        if path.len() > 4095 {
1317            return Err(::fidl_next::DecodeError::VectorTooLong {
1318                size: path.len() as u64,
1319                limit: 4095,
1320            });
1321        }
1322
1323        ::fidl_next::Decode::decode(directory.as_mut(), decoder)?;
1324
1325        Ok(())
1326    }
1327}
1328
1329#[derive(Debug)]
1330pub struct LauncherAddNamesRequest {
1331    pub names: Vec<crate::NameInfo>,
1332}
1333
1334impl ::fidl_next::Encodable for LauncherAddNamesRequest {
1335    type Encoded = WireLauncherAddNamesRequest;
1336}
1337
1338unsafe impl<___E> ::fidl_next::Encode<___E> for LauncherAddNamesRequest
1339where
1340    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1341
1342    ___E: ::fidl_next::Encoder,
1343
1344    ___E: ::fidl_next::fuchsia::HandleEncoder,
1345{
1346    #[inline]
1347    fn encode(
1348        &mut self,
1349        encoder: &mut ___E,
1350        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1351    ) -> Result<(), ::fidl_next::EncodeError> {
1352        ::fidl_next::munge! {
1353            let Self::Encoded {
1354                names,
1355
1356            } = out;
1357        }
1358
1359        ::fidl_next::Encode::encode(&mut self.names, encoder, names)?;
1360
1361        Ok(())
1362    }
1363}
1364
1365impl ::fidl_next::EncodableOption for Box<LauncherAddNamesRequest> {
1366    type EncodedOption = ::fidl_next::WireBox<WireLauncherAddNamesRequest>;
1367}
1368
1369unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<LauncherAddNamesRequest>
1370where
1371    ___E: ::fidl_next::Encoder + ?Sized,
1372    LauncherAddNamesRequest: ::fidl_next::Encode<___E>,
1373{
1374    #[inline]
1375    fn encode_option(
1376        this: Option<&mut Self>,
1377        encoder: &mut ___E,
1378        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1379    ) -> Result<(), ::fidl_next::EncodeError> {
1380        if let Some(inner) = this {
1381            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1382            ::fidl_next::WireBox::encode_present(out);
1383        } else {
1384            ::fidl_next::WireBox::encode_absent(out);
1385        }
1386
1387        Ok(())
1388    }
1389}
1390
1391impl ::fidl_next::TakeFrom<WireLauncherAddNamesRequest> for LauncherAddNamesRequest {
1392    #[inline]
1393    fn take_from(from: &WireLauncherAddNamesRequest) -> Self {
1394        Self { names: ::fidl_next::TakeFrom::take_from(&from.names) }
1395    }
1396}
1397
1398/// The wire type corresponding to [`LauncherAddNamesRequest`].
1399#[derive(Debug)]
1400#[repr(C)]
1401pub struct WireLauncherAddNamesRequest {
1402    pub names: ::fidl_next::WireVector<crate::WireNameInfo>,
1403}
1404
1405unsafe impl ::fidl_next::ZeroPadding for WireLauncherAddNamesRequest {
1406    #[inline]
1407    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
1408}
1409
1410unsafe impl<___D> ::fidl_next::Decode<___D> for WireLauncherAddNamesRequest
1411where
1412    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1413
1414    ___D: ::fidl_next::Decoder,
1415
1416    ___D: ::fidl_next::fuchsia::HandleDecoder,
1417{
1418    fn decode(
1419        slot: ::fidl_next::Slot<'_, Self>,
1420        decoder: &mut ___D,
1421    ) -> Result<(), ::fidl_next::DecodeError> {
1422        ::fidl_next::munge! {
1423            let Self {
1424                mut names,
1425
1426            } = slot;
1427        }
1428
1429        ::fidl_next::Decode::decode(names.as_mut(), decoder)?;
1430
1431        Ok(())
1432    }
1433}
1434
1435/// The type corresponding to the Launcher protocol.
1436#[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"]
1437#[derive(Debug)]
1438pub struct Launcher;
1439
1440impl ::fidl_next::Discoverable for Launcher {
1441    const PROTOCOL_NAME: &'static str = "launcher";
1442}
1443
1444pub mod launcher {
1445    pub mod prelude {
1446        pub use crate::{
1447            launcher, Launcher, LauncherClientHandler, LauncherClientSender, LauncherServerHandler,
1448            LauncherServerSender,
1449        };
1450
1451        pub use crate::LauncherAddArgsRequest;
1452
1453        pub use crate::LauncherAddEnvironsRequest;
1454
1455        pub use crate::LauncherAddHandlesRequest;
1456
1457        pub use crate::LauncherAddNamesRequest;
1458
1459        pub use crate::LauncherCreateWithoutStartingRequest;
1460
1461        pub use crate::LauncherCreateWithoutStartingResponse;
1462
1463        pub use crate::LauncherLaunchRequest;
1464
1465        pub use crate::LauncherLaunchResponse;
1466
1467        pub use crate::LauncherSetOptionsRequest;
1468    }
1469
1470    pub struct Launch;
1471
1472    impl ::fidl_next::Method for Launch {
1473        const ORDINAL: u64 = 1239433936316120996;
1474
1475        type Protocol = crate::Launcher;
1476
1477        type Request = crate::WireLauncherLaunchRequest;
1478
1479        type Response = crate::WireLauncherLaunchResponse;
1480    }
1481
1482    pub struct CreateWithoutStarting;
1483
1484    impl ::fidl_next::Method for CreateWithoutStarting {
1485        const ORDINAL: u64 = 8457621991205227361;
1486
1487        type Protocol = crate::Launcher;
1488
1489        type Request = crate::WireLauncherCreateWithoutStartingRequest;
1490
1491        type Response = crate::WireLauncherCreateWithoutStartingResponse;
1492    }
1493
1494    pub struct AddArgs;
1495
1496    impl ::fidl_next::Method for AddArgs {
1497        const ORDINAL: u64 = 4315651119310005522;
1498
1499        type Protocol = crate::Launcher;
1500
1501        type Request = crate::WireLauncherAddArgsRequest;
1502
1503        type Response = ::fidl_next::Never;
1504    }
1505
1506    pub struct AddEnvirons;
1507
1508    impl ::fidl_next::Method for AddEnvirons {
1509        const ORDINAL: u64 = 8332725285682026361;
1510
1511        type Protocol = crate::Launcher;
1512
1513        type Request = crate::WireLauncherAddEnvironsRequest;
1514
1515        type Response = ::fidl_next::Never;
1516    }
1517
1518    pub struct AddNames;
1519
1520    impl ::fidl_next::Method for AddNames {
1521        const ORDINAL: u64 = 2700451326409737826;
1522
1523        type Protocol = crate::Launcher;
1524
1525        type Request = crate::WireLauncherAddNamesRequest;
1526
1527        type Response = ::fidl_next::Never;
1528    }
1529
1530    pub struct AddHandles;
1531
1532    impl ::fidl_next::Method for AddHandles {
1533        const ORDINAL: u64 = 5837318672132580885;
1534
1535        type Protocol = crate::Launcher;
1536
1537        type Request = crate::WireLauncherAddHandlesRequest;
1538
1539        type Response = ::fidl_next::Never;
1540    }
1541
1542    pub struct SetOptions;
1543
1544    impl ::fidl_next::Method for SetOptions {
1545        const ORDINAL: u64 = 6598432479381290375;
1546
1547        type Protocol = crate::Launcher;
1548
1549        type Request = crate::WireLauncherSetOptionsRequest;
1550
1551        type Response = ::fidl_next::Never;
1552    }
1553}
1554
1555/// A helper trait for the `Launcher` client sender.
1556pub trait LauncherClientSender {
1557    type Transport: ::fidl_next::Transport;
1558
1559    #[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"]
1560    fn launch<___R>(
1561        &self,
1562        request: &mut ___R,
1563    ) -> Result<
1564        ::fidl_next::ResponseFuture<'_, Self::Transport, launcher::Launch>,
1565        ::fidl_next::EncodeError,
1566    >
1567    where
1568        ___R: ::fidl_next::Encode<
1569            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1570            Encoded = crate::WireLauncherLaunchRequest,
1571        >;
1572
1573    #[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"]
1574    fn create_without_starting<___R>(
1575        &self,
1576        request: &mut ___R,
1577    ) -> Result<
1578        ::fidl_next::ResponseFuture<'_, Self::Transport, launcher::CreateWithoutStarting>,
1579        ::fidl_next::EncodeError,
1580    >
1581    where
1582        ___R: ::fidl_next::Encode<
1583            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1584            Encoded = crate::WireLauncherCreateWithoutStartingRequest,
1585        >;
1586
1587    #[doc = " Adds the given arguments to the command-line for the process.\n\n Calling this method multiple times concatenates the arguments.\n"]
1588    fn add_args<___R>(
1589        &self,
1590        request: &mut ___R,
1591    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
1592    where
1593        ___R: ::fidl_next::Encode<
1594            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1595            Encoded = crate::WireLauncherAddArgsRequest,
1596        >;
1597
1598    #[doc = " Adds the given variables to the environment variables for the process.\n\n Calling this method multiple times concatenates the variables.\n"]
1599    fn add_environs<___R>(
1600        &self,
1601        request: &mut ___R,
1602    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
1603    where
1604        ___R: ::fidl_next::Encode<
1605            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1606            Encoded = crate::WireLauncherAddEnvironsRequest,
1607        >;
1608
1609    #[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"]
1610    fn add_names<___R>(
1611        &self,
1612        request: &mut ___R,
1613    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
1614    where
1615        ___R: ::fidl_next::Encode<
1616            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1617            Encoded = crate::WireLauncherAddNamesRequest,
1618        >;
1619
1620    #[doc = " Adds the given handles to the startup handles for the process.\n\n Calling this method multiple times concatenates the handles.\n"]
1621    fn add_handles<___R>(
1622        &self,
1623        request: &mut ___R,
1624    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
1625    where
1626        ___R: ::fidl_next::Encode<
1627            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1628            Encoded = crate::WireLauncherAddHandlesRequest,
1629        >;
1630
1631    #[doc = " Sets the options with which the process is created.\n\n Calling this method multiple times will overwrite the current options.\n"]
1632    fn set_options<___R>(
1633        &self,
1634        request: &mut ___R,
1635    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
1636    where
1637        ___R: ::fidl_next::Encode<
1638            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1639            Encoded = crate::WireLauncherSetOptionsRequest,
1640        >;
1641}
1642
1643impl<___T> LauncherClientSender for ::fidl_next::ClientSender<___T, Launcher>
1644where
1645    ___T: ::fidl_next::Transport,
1646{
1647    type Transport = ___T;
1648
1649    #[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"]
1650    fn launch<___R>(
1651        &self,
1652        request: &mut ___R,
1653    ) -> Result<
1654        ::fidl_next::ResponseFuture<'_, Self::Transport, launcher::Launch>,
1655        ::fidl_next::EncodeError,
1656    >
1657    where
1658        ___R: ::fidl_next::Encode<
1659            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1660            Encoded = crate::WireLauncherLaunchRequest,
1661        >,
1662    {
1663        self.as_untyped()
1664            .send_two_way(1239433936316120996, request)
1665            .map(::fidl_next::ResponseFuture::from_untyped)
1666    }
1667
1668    #[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"]
1669    fn create_without_starting<___R>(
1670        &self,
1671        request: &mut ___R,
1672    ) -> Result<
1673        ::fidl_next::ResponseFuture<'_, Self::Transport, launcher::CreateWithoutStarting>,
1674        ::fidl_next::EncodeError,
1675    >
1676    where
1677        ___R: ::fidl_next::Encode<
1678            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1679            Encoded = crate::WireLauncherCreateWithoutStartingRequest,
1680        >,
1681    {
1682        self.as_untyped()
1683            .send_two_way(8457621991205227361, request)
1684            .map(::fidl_next::ResponseFuture::from_untyped)
1685    }
1686
1687    #[doc = " Adds the given arguments to the command-line for the process.\n\n Calling this method multiple times concatenates the arguments.\n"]
1688    fn add_args<___R>(
1689        &self,
1690        request: &mut ___R,
1691    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
1692    where
1693        ___R: ::fidl_next::Encode<
1694            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1695            Encoded = crate::WireLauncherAddArgsRequest,
1696        >,
1697    {
1698        self.as_untyped().send_one_way(4315651119310005522, request)
1699    }
1700
1701    #[doc = " Adds the given variables to the environment variables for the process.\n\n Calling this method multiple times concatenates the variables.\n"]
1702    fn add_environs<___R>(
1703        &self,
1704        request: &mut ___R,
1705    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
1706    where
1707        ___R: ::fidl_next::Encode<
1708            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1709            Encoded = crate::WireLauncherAddEnvironsRequest,
1710        >,
1711    {
1712        self.as_untyped().send_one_way(8332725285682026361, request)
1713    }
1714
1715    #[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"]
1716    fn add_names<___R>(
1717        &self,
1718        request: &mut ___R,
1719    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
1720    where
1721        ___R: ::fidl_next::Encode<
1722            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1723            Encoded = crate::WireLauncherAddNamesRequest,
1724        >,
1725    {
1726        self.as_untyped().send_one_way(2700451326409737826, request)
1727    }
1728
1729    #[doc = " Adds the given handles to the startup handles for the process.\n\n Calling this method multiple times concatenates the handles.\n"]
1730    fn add_handles<___R>(
1731        &self,
1732        request: &mut ___R,
1733    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
1734    where
1735        ___R: ::fidl_next::Encode<
1736            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1737            Encoded = crate::WireLauncherAddHandlesRequest,
1738        >,
1739    {
1740        self.as_untyped().send_one_way(5837318672132580885, request)
1741    }
1742
1743    #[doc = " Sets the options with which the process is created.\n\n Calling this method multiple times will overwrite the current options.\n"]
1744    fn set_options<___R>(
1745        &self,
1746        request: &mut ___R,
1747    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
1748    where
1749        ___R: ::fidl_next::Encode<
1750            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1751            Encoded = crate::WireLauncherSetOptionsRequest,
1752        >,
1753    {
1754        self.as_untyped().send_one_way(6598432479381290375, request)
1755    }
1756}
1757
1758/// A client handler for the Launcher protocol.
1759///
1760/// See [`Launcher`] for more details.
1761pub trait LauncherClientHandler<___T: ::fidl_next::Transport> {}
1762
1763impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Launcher
1764where
1765    ___T: ::fidl_next::Transport,
1766    ___H: LauncherClientHandler<___T>,
1767
1768    <launcher::Launch as ::fidl_next::Method>::Response:
1769        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1770
1771    <launcher::CreateWithoutStarting as ::fidl_next::Method>::Response:
1772        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1773{
1774    fn on_event(
1775        handler: &mut ___H,
1776        sender: &::fidl_next::ClientSender<___T, Self>,
1777        ordinal: u64,
1778        buffer: ___T::RecvBuffer,
1779    ) {
1780        match ordinal {
1781            ordinal => {
1782                sender.close();
1783            }
1784        }
1785    }
1786}
1787
1788/// A helper trait for the `Launcher` server sender.
1789pub trait LauncherServerSender {
1790    type Transport: ::fidl_next::Transport;
1791}
1792
1793impl<___T> LauncherServerSender for ::fidl_next::ServerSender<___T, Launcher>
1794where
1795    ___T: ::fidl_next::Transport,
1796{
1797    type Transport = ___T;
1798}
1799
1800/// A server handler for the Launcher protocol.
1801///
1802/// See [`Launcher`] for more details.
1803pub trait LauncherServerHandler<___T: ::fidl_next::Transport> {
1804    #[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"]
1805    fn launch(
1806        &mut self,
1807        sender: &::fidl_next::ServerSender<___T, Launcher>,
1808
1809        request: ::fidl_next::RequestBuffer<___T, launcher::Launch>,
1810
1811        responder: ::fidl_next::Responder<launcher::Launch>,
1812    );
1813
1814    #[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"]
1815    fn create_without_starting(
1816        &mut self,
1817        sender: &::fidl_next::ServerSender<___T, Launcher>,
1818
1819        request: ::fidl_next::RequestBuffer<___T, launcher::CreateWithoutStarting>,
1820
1821        responder: ::fidl_next::Responder<launcher::CreateWithoutStarting>,
1822    );
1823
1824    #[doc = " Adds the given arguments to the command-line for the process.\n\n Calling this method multiple times concatenates the arguments.\n"]
1825    fn add_args(
1826        &mut self,
1827        sender: &::fidl_next::ServerSender<___T, Launcher>,
1828
1829        request: ::fidl_next::RequestBuffer<___T, launcher::AddArgs>,
1830    );
1831
1832    #[doc = " Adds the given variables to the environment variables for the process.\n\n Calling this method multiple times concatenates the variables.\n"]
1833    fn add_environs(
1834        &mut self,
1835        sender: &::fidl_next::ServerSender<___T, Launcher>,
1836
1837        request: ::fidl_next::RequestBuffer<___T, launcher::AddEnvirons>,
1838    );
1839
1840    #[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"]
1841    fn add_names(
1842        &mut self,
1843        sender: &::fidl_next::ServerSender<___T, Launcher>,
1844
1845        request: ::fidl_next::RequestBuffer<___T, launcher::AddNames>,
1846    );
1847
1848    #[doc = " Adds the given handles to the startup handles for the process.\n\n Calling this method multiple times concatenates the handles.\n"]
1849    fn add_handles(
1850        &mut self,
1851        sender: &::fidl_next::ServerSender<___T, Launcher>,
1852
1853        request: ::fidl_next::RequestBuffer<___T, launcher::AddHandles>,
1854    );
1855
1856    #[doc = " Sets the options with which the process is created.\n\n Calling this method multiple times will overwrite the current options.\n"]
1857    fn set_options(
1858        &mut self,
1859        sender: &::fidl_next::ServerSender<___T, Launcher>,
1860
1861        request: ::fidl_next::RequestBuffer<___T, launcher::SetOptions>,
1862    );
1863}
1864
1865impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Launcher
1866where
1867    ___T: ::fidl_next::Transport,
1868    ___H: LauncherServerHandler<___T>,
1869
1870    crate::WireLauncherLaunchRequest:
1871        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1872
1873    crate::WireLauncherCreateWithoutStartingRequest:
1874        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1875
1876    crate::WireLauncherAddArgsRequest:
1877        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1878
1879    crate::WireLauncherAddEnvironsRequest:
1880        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1881
1882    crate::WireLauncherAddNamesRequest:
1883        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1884
1885    crate::WireLauncherAddHandlesRequest:
1886        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1887
1888    crate::WireLauncherSetOptionsRequest:
1889        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1890{
1891    fn on_one_way(
1892        handler: &mut ___H,
1893        sender: &::fidl_next::ServerSender<___T, Self>,
1894        ordinal: u64,
1895        buffer: ___T::RecvBuffer,
1896    ) {
1897        match ordinal {
1898            4315651119310005522 => {
1899                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
1900                handler.add_args(sender, buffer);
1901            }
1902
1903            8332725285682026361 => {
1904                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
1905                handler.add_environs(sender, buffer);
1906            }
1907
1908            2700451326409737826 => {
1909                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
1910                handler.add_names(sender, buffer);
1911            }
1912
1913            5837318672132580885 => {
1914                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
1915                handler.add_handles(sender, buffer);
1916            }
1917
1918            6598432479381290375 => {
1919                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
1920                handler.set_options(sender, buffer);
1921            }
1922
1923            ordinal => {
1924                sender.close();
1925            }
1926        }
1927    }
1928
1929    fn on_two_way(
1930        handler: &mut ___H,
1931        sender: &::fidl_next::ServerSender<___T, Self>,
1932        ordinal: u64,
1933        buffer: ___T::RecvBuffer,
1934        responder: ::fidl_next::protocol::Responder,
1935    ) {
1936        match ordinal {
1937            1239433936316120996 => {
1938                let responder = ::fidl_next::Responder::from_untyped(responder);
1939
1940                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
1941                handler.launch(sender, buffer, responder);
1942            }
1943
1944            8457621991205227361 => {
1945                let responder = ::fidl_next::Responder::from_untyped(responder);
1946
1947                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
1948                handler.create_without_starting(sender, buffer, responder);
1949            }
1950
1951            ordinal => {
1952                sender.close();
1953            }
1954        }
1955    }
1956}
1957
1958#[doc = " The maximum size for a name used by `Resolver`.\n"]
1959pub const MAX_RESOLVE_NAME_SIZE: u32 = 2048;
1960
1961#[doc = " The information required to start a process.\n\n To start the process, call `zx_process_start` with the arguments provided.\n"]
1962#[derive(Debug)]
1963pub struct ProcessStartData {
1964    pub process: ::fidl_next::fuchsia::zx::Handle,
1965
1966    pub root_vmar: ::fidl_next::fuchsia::zx::Handle,
1967
1968    pub thread: ::fidl_next::fuchsia::zx::Handle,
1969
1970    pub entry: u64,
1971
1972    pub stack: u64,
1973
1974    pub bootstrap: ::fidl_next::fuchsia::zx::Handle,
1975
1976    pub vdso_base: u64,
1977
1978    pub base: u64,
1979}
1980
1981impl ::fidl_next::Encodable for ProcessStartData {
1982    type Encoded = WireProcessStartData;
1983}
1984
1985unsafe impl<___E> ::fidl_next::Encode<___E> for ProcessStartData
1986where
1987    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1988
1989    ___E: ::fidl_next::fuchsia::HandleEncoder,
1990{
1991    #[inline]
1992    fn encode(
1993        &mut self,
1994        encoder: &mut ___E,
1995        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1996    ) -> Result<(), ::fidl_next::EncodeError> {
1997        ::fidl_next::munge! {
1998            let Self::Encoded {
1999                process,
2000                root_vmar,
2001                thread,
2002                entry,
2003                stack,
2004                bootstrap,
2005                vdso_base,
2006                base,
2007
2008            } = out;
2009        }
2010
2011        ::fidl_next::Encode::encode(&mut self.process, encoder, process)?;
2012
2013        ::fidl_next::Encode::encode(&mut self.root_vmar, encoder, root_vmar)?;
2014
2015        ::fidl_next::Encode::encode(&mut self.thread, encoder, thread)?;
2016
2017        ::fidl_next::Encode::encode(&mut self.entry, encoder, entry)?;
2018
2019        ::fidl_next::Encode::encode(&mut self.stack, encoder, stack)?;
2020
2021        ::fidl_next::Encode::encode(&mut self.bootstrap, encoder, bootstrap)?;
2022
2023        ::fidl_next::Encode::encode(&mut self.vdso_base, encoder, vdso_base)?;
2024
2025        ::fidl_next::Encode::encode(&mut self.base, encoder, base)?;
2026
2027        Ok(())
2028    }
2029}
2030
2031impl ::fidl_next::EncodableOption for Box<ProcessStartData> {
2032    type EncodedOption = ::fidl_next::WireBox<WireProcessStartData>;
2033}
2034
2035unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<ProcessStartData>
2036where
2037    ___E: ::fidl_next::Encoder + ?Sized,
2038    ProcessStartData: ::fidl_next::Encode<___E>,
2039{
2040    #[inline]
2041    fn encode_option(
2042        this: Option<&mut Self>,
2043        encoder: &mut ___E,
2044        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2045    ) -> Result<(), ::fidl_next::EncodeError> {
2046        if let Some(inner) = this {
2047            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2048            ::fidl_next::WireBox::encode_present(out);
2049        } else {
2050            ::fidl_next::WireBox::encode_absent(out);
2051        }
2052
2053        Ok(())
2054    }
2055}
2056
2057impl ::fidl_next::TakeFrom<WireProcessStartData> for ProcessStartData {
2058    #[inline]
2059    fn take_from(from: &WireProcessStartData) -> Self {
2060        Self {
2061            process: ::fidl_next::TakeFrom::take_from(&from.process),
2062
2063            root_vmar: ::fidl_next::TakeFrom::take_from(&from.root_vmar),
2064
2065            thread: ::fidl_next::TakeFrom::take_from(&from.thread),
2066
2067            entry: ::fidl_next::TakeFrom::take_from(&from.entry),
2068
2069            stack: ::fidl_next::TakeFrom::take_from(&from.stack),
2070
2071            bootstrap: ::fidl_next::TakeFrom::take_from(&from.bootstrap),
2072
2073            vdso_base: ::fidl_next::TakeFrom::take_from(&from.vdso_base),
2074
2075            base: ::fidl_next::TakeFrom::take_from(&from.base),
2076        }
2077    }
2078}
2079
2080/// The wire type corresponding to [`ProcessStartData`].
2081#[derive(Debug)]
2082#[repr(C)]
2083pub struct WireProcessStartData {
2084    pub process: ::fidl_next::fuchsia::WireHandle,
2085
2086    pub root_vmar: ::fidl_next::fuchsia::WireHandle,
2087
2088    pub thread: ::fidl_next::fuchsia::WireHandle,
2089
2090    pub entry: ::fidl_next::WireU64,
2091
2092    pub stack: ::fidl_next::WireU64,
2093
2094    pub bootstrap: ::fidl_next::fuchsia::WireHandle,
2095
2096    pub vdso_base: ::fidl_next::WireU64,
2097
2098    pub base: ::fidl_next::WireU64,
2099}
2100
2101unsafe impl ::fidl_next::ZeroPadding for WireProcessStartData {
2102    #[inline]
2103    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2104        unsafe {
2105            out.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
2106        }
2107
2108        unsafe {
2109            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
2110        }
2111    }
2112}
2113
2114unsafe impl<___D> ::fidl_next::Decode<___D> for WireProcessStartData
2115where
2116    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2117
2118    ___D: ::fidl_next::fuchsia::HandleDecoder,
2119{
2120    fn decode(
2121        slot: ::fidl_next::Slot<'_, Self>,
2122        decoder: &mut ___D,
2123    ) -> Result<(), ::fidl_next::DecodeError> {
2124        ::fidl_next::munge! {
2125            let Self {
2126                mut process,
2127                mut root_vmar,
2128                mut thread,
2129                mut entry,
2130                mut stack,
2131                mut bootstrap,
2132                mut vdso_base,
2133                mut base,
2134
2135            } = slot;
2136        }
2137
2138        ::fidl_next::Decode::decode(process.as_mut(), decoder)?;
2139
2140        ::fidl_next::Decode::decode(root_vmar.as_mut(), decoder)?;
2141
2142        ::fidl_next::Decode::decode(thread.as_mut(), decoder)?;
2143
2144        ::fidl_next::Decode::decode(entry.as_mut(), decoder)?;
2145
2146        ::fidl_next::Decode::decode(stack.as_mut(), decoder)?;
2147
2148        ::fidl_next::Decode::decode(bootstrap.as_mut(), decoder)?;
2149
2150        ::fidl_next::Decode::decode(vdso_base.as_mut(), decoder)?;
2151
2152        ::fidl_next::Decode::decode(base.as_mut(), decoder)?;
2153
2154        Ok(())
2155    }
2156}
2157
2158#[derive(Clone, Debug)]
2159pub struct ResolverResolveRequest {
2160    pub name: String,
2161}
2162
2163impl ::fidl_next::Encodable for ResolverResolveRequest {
2164    type Encoded = WireResolverResolveRequest;
2165}
2166
2167unsafe impl<___E> ::fidl_next::Encode<___E> for ResolverResolveRequest
2168where
2169    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2170
2171    ___E: ::fidl_next::Encoder,
2172{
2173    #[inline]
2174    fn encode(
2175        &mut self,
2176        encoder: &mut ___E,
2177        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2178    ) -> Result<(), ::fidl_next::EncodeError> {
2179        ::fidl_next::munge! {
2180            let Self::Encoded {
2181                name,
2182
2183            } = out;
2184        }
2185
2186        ::fidl_next::Encode::encode(&mut self.name, encoder, name)?;
2187
2188        Ok(())
2189    }
2190}
2191
2192impl ::fidl_next::EncodableOption for Box<ResolverResolveRequest> {
2193    type EncodedOption = ::fidl_next::WireBox<WireResolverResolveRequest>;
2194}
2195
2196unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<ResolverResolveRequest>
2197where
2198    ___E: ::fidl_next::Encoder + ?Sized,
2199    ResolverResolveRequest: ::fidl_next::Encode<___E>,
2200{
2201    #[inline]
2202    fn encode_option(
2203        this: Option<&mut Self>,
2204        encoder: &mut ___E,
2205        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2206    ) -> Result<(), ::fidl_next::EncodeError> {
2207        if let Some(inner) = this {
2208            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2209            ::fidl_next::WireBox::encode_present(out);
2210        } else {
2211            ::fidl_next::WireBox::encode_absent(out);
2212        }
2213
2214        Ok(())
2215    }
2216}
2217
2218impl ::fidl_next::TakeFrom<WireResolverResolveRequest> for ResolverResolveRequest {
2219    #[inline]
2220    fn take_from(from: &WireResolverResolveRequest) -> Self {
2221        Self { name: ::fidl_next::TakeFrom::take_from(&from.name) }
2222    }
2223}
2224
2225/// The wire type corresponding to [`ResolverResolveRequest`].
2226#[derive(Debug)]
2227#[repr(C)]
2228pub struct WireResolverResolveRequest {
2229    pub name: ::fidl_next::WireString,
2230}
2231
2232unsafe impl ::fidl_next::ZeroPadding for WireResolverResolveRequest {
2233    #[inline]
2234    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2235}
2236
2237unsafe impl<___D> ::fidl_next::Decode<___D> for WireResolverResolveRequest
2238where
2239    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2240
2241    ___D: ::fidl_next::Decoder,
2242{
2243    fn decode(
2244        slot: ::fidl_next::Slot<'_, Self>,
2245        decoder: &mut ___D,
2246    ) -> Result<(), ::fidl_next::DecodeError> {
2247        ::fidl_next::munge! {
2248            let Self {
2249                mut name,
2250
2251            } = slot;
2252        }
2253
2254        ::fidl_next::Decode::decode(name.as_mut(), decoder)?;
2255
2256        let name = unsafe { name.deref_unchecked() };
2257
2258        if name.len() > 2048 {
2259            return Err(::fidl_next::DecodeError::VectorTooLong {
2260                size: name.len() as u64,
2261                limit: 2048,
2262            });
2263        }
2264
2265        Ok(())
2266    }
2267}
2268
2269#[derive(Debug)]
2270#[repr(C)]
2271pub struct ResolverResolveResponse {
2272    pub status: i32,
2273
2274    pub executable: Option<::fidl_next::fuchsia::zx::Handle>,
2275
2276    pub ldsvc: ::fidl_next::ClientEnd<
2277        Option<::fidl_next::fuchsia::zx::Channel>,
2278        ::fidl_next_fuchsia_ldsvc::Loader,
2279    >,
2280}
2281
2282impl ::fidl_next::Encodable for ResolverResolveResponse {
2283    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
2284        ::fidl_next::CopyOptimization::enable_if(
2285            true
2286
2287                && <
2288                    i32 as ::fidl_next::Encodable
2289                >::COPY_OPTIMIZATION.is_enabled()
2290
2291                && <
2292                    Option<::fidl_next::fuchsia::zx::Handle> as ::fidl_next::Encodable
2293                >::COPY_OPTIMIZATION.is_enabled()
2294
2295                && <
2296                    ::fidl_next::ClientEnd<Option<::fidl_next::fuchsia::zx::Channel>,::fidl_next_fuchsia_ldsvc::Loader,
2297        > as ::fidl_next::Encodable
2298                >::COPY_OPTIMIZATION.is_enabled()
2299
2300        )
2301    };
2302
2303    type Encoded = WireResolverResolveResponse;
2304}
2305
2306unsafe impl<___E> ::fidl_next::Encode<___E> for ResolverResolveResponse
2307where
2308    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2309
2310    ___E: ::fidl_next::fuchsia::HandleEncoder,
2311{
2312    #[inline]
2313    fn encode(
2314        &mut self,
2315        encoder: &mut ___E,
2316        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2317    ) -> Result<(), ::fidl_next::EncodeError> {
2318        ::fidl_next::munge! {
2319            let Self::Encoded {
2320                status,
2321                executable,
2322                ldsvc,
2323
2324            } = out;
2325        }
2326
2327        ::fidl_next::Encode::encode(&mut self.status, encoder, status)?;
2328
2329        ::fidl_next::Encode::encode(&mut self.executable, encoder, executable)?;
2330
2331        ::fidl_next::Encode::encode(&mut self.ldsvc, encoder, ldsvc)?;
2332
2333        Ok(())
2334    }
2335}
2336
2337impl ::fidl_next::EncodableOption for Box<ResolverResolveResponse> {
2338    type EncodedOption = ::fidl_next::WireBox<WireResolverResolveResponse>;
2339}
2340
2341unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<ResolverResolveResponse>
2342where
2343    ___E: ::fidl_next::Encoder + ?Sized,
2344    ResolverResolveResponse: ::fidl_next::Encode<___E>,
2345{
2346    #[inline]
2347    fn encode_option(
2348        this: Option<&mut Self>,
2349        encoder: &mut ___E,
2350        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2351    ) -> Result<(), ::fidl_next::EncodeError> {
2352        if let Some(inner) = this {
2353            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2354            ::fidl_next::WireBox::encode_present(out);
2355        } else {
2356            ::fidl_next::WireBox::encode_absent(out);
2357        }
2358
2359        Ok(())
2360    }
2361}
2362
2363impl ::fidl_next::TakeFrom<WireResolverResolveResponse> for ResolverResolveResponse {
2364    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
2365        ::fidl_next::CopyOptimization::enable_if(
2366            true
2367
2368                && <
2369                    i32 as ::fidl_next::Encodable
2370                >::COPY_OPTIMIZATION.is_enabled()
2371
2372                && <
2373                    Option<::fidl_next::fuchsia::zx::Handle> as ::fidl_next::Encodable
2374                >::COPY_OPTIMIZATION.is_enabled()
2375
2376                && <
2377                    ::fidl_next::ClientEnd<Option<::fidl_next::fuchsia::zx::Channel>,::fidl_next_fuchsia_ldsvc::Loader,
2378        > as ::fidl_next::Encodable
2379                >::COPY_OPTIMIZATION.is_enabled()
2380
2381        )
2382    };
2383
2384    #[inline]
2385    fn take_from(from: &WireResolverResolveResponse) -> Self {
2386        Self {
2387            status: ::fidl_next::TakeFrom::take_from(&from.status),
2388
2389            executable: ::fidl_next::TakeFrom::take_from(&from.executable),
2390
2391            ldsvc: ::fidl_next::TakeFrom::take_from(&from.ldsvc),
2392        }
2393    }
2394}
2395
2396/// The wire type corresponding to [`ResolverResolveResponse`].
2397#[derive(Debug)]
2398#[repr(C)]
2399pub struct WireResolverResolveResponse {
2400    pub status: ::fidl_next::WireI32,
2401
2402    pub executable: ::fidl_next::fuchsia::WireOptionalHandle,
2403
2404    pub ldsvc: ::fidl_next::ClientEnd<
2405        ::fidl_next::fuchsia::WireOptionalChannel,
2406        ::fidl_next_fuchsia_ldsvc::Loader,
2407    >,
2408}
2409
2410unsafe impl ::fidl_next::ZeroPadding for WireResolverResolveResponse {
2411    #[inline]
2412    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2413}
2414
2415unsafe impl<___D> ::fidl_next::Decode<___D> for WireResolverResolveResponse
2416where
2417    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2418
2419    ___D: ::fidl_next::fuchsia::HandleDecoder,
2420{
2421    fn decode(
2422        slot: ::fidl_next::Slot<'_, Self>,
2423        decoder: &mut ___D,
2424    ) -> Result<(), ::fidl_next::DecodeError> {
2425        ::fidl_next::munge! {
2426            let Self {
2427                mut status,
2428                mut executable,
2429                mut ldsvc,
2430
2431            } = slot;
2432        }
2433
2434        ::fidl_next::Decode::decode(status.as_mut(), decoder)?;
2435
2436        ::fidl_next::Decode::decode(executable.as_mut(), decoder)?;
2437
2438        ::fidl_next::Decode::decode(ldsvc.as_mut(), decoder)?;
2439
2440        Ok(())
2441    }
2442}
2443
2444/// The type corresponding to the Resolver protocol.
2445#[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"]
2446#[derive(Debug)]
2447pub struct Resolver;
2448
2449impl ::fidl_next::Discoverable for Resolver {
2450    const PROTOCOL_NAME: &'static str = "resolver";
2451}
2452
2453pub mod resolver {
2454    pub mod prelude {
2455        pub use crate::{
2456            resolver, Resolver, ResolverClientHandler, ResolverClientSender, ResolverServerHandler,
2457            ResolverServerSender,
2458        };
2459
2460        pub use crate::ResolverResolveRequest;
2461
2462        pub use crate::ResolverResolveResponse;
2463    }
2464
2465    pub struct Resolve;
2466
2467    impl ::fidl_next::Method for Resolve {
2468        const ORDINAL: u64 = 4329530577128037520;
2469
2470        type Protocol = crate::Resolver;
2471
2472        type Request = crate::WireResolverResolveRequest;
2473
2474        type Response = crate::WireResolverResolveResponse;
2475    }
2476}
2477
2478/// A helper trait for the `Resolver` client sender.
2479pub trait ResolverClientSender {
2480    type Transport: ::fidl_next::Transport;
2481
2482    #[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"]
2483    fn resolve<___R>(
2484        &self,
2485        request: &mut ___R,
2486    ) -> Result<
2487        ::fidl_next::ResponseFuture<'_, Self::Transport, resolver::Resolve>,
2488        ::fidl_next::EncodeError,
2489    >
2490    where
2491        ___R: ::fidl_next::Encode<
2492            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
2493            Encoded = crate::WireResolverResolveRequest,
2494        >;
2495}
2496
2497impl<___T> ResolverClientSender for ::fidl_next::ClientSender<___T, Resolver>
2498where
2499    ___T: ::fidl_next::Transport,
2500{
2501    type Transport = ___T;
2502
2503    #[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"]
2504    fn resolve<___R>(
2505        &self,
2506        request: &mut ___R,
2507    ) -> Result<
2508        ::fidl_next::ResponseFuture<'_, Self::Transport, resolver::Resolve>,
2509        ::fidl_next::EncodeError,
2510    >
2511    where
2512        ___R: ::fidl_next::Encode<
2513            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
2514            Encoded = crate::WireResolverResolveRequest,
2515        >,
2516    {
2517        self.as_untyped()
2518            .send_two_way(4329530577128037520, request)
2519            .map(::fidl_next::ResponseFuture::from_untyped)
2520    }
2521}
2522
2523/// A client handler for the Resolver protocol.
2524///
2525/// See [`Resolver`] for more details.
2526pub trait ResolverClientHandler<___T: ::fidl_next::Transport> {}
2527
2528impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Resolver
2529where
2530    ___T: ::fidl_next::Transport,
2531    ___H: ResolverClientHandler<___T>,
2532
2533    <resolver::Resolve as ::fidl_next::Method>::Response:
2534        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2535{
2536    fn on_event(
2537        handler: &mut ___H,
2538        sender: &::fidl_next::ClientSender<___T, Self>,
2539        ordinal: u64,
2540        buffer: ___T::RecvBuffer,
2541    ) {
2542        match ordinal {
2543            ordinal => {
2544                sender.close();
2545            }
2546        }
2547    }
2548}
2549
2550/// A helper trait for the `Resolver` server sender.
2551pub trait ResolverServerSender {
2552    type Transport: ::fidl_next::Transport;
2553}
2554
2555impl<___T> ResolverServerSender for ::fidl_next::ServerSender<___T, Resolver>
2556where
2557    ___T: ::fidl_next::Transport,
2558{
2559    type Transport = ___T;
2560}
2561
2562/// A server handler for the Resolver protocol.
2563///
2564/// See [`Resolver`] for more details.
2565pub trait ResolverServerHandler<___T: ::fidl_next::Transport> {
2566    #[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"]
2567    fn resolve(
2568        &mut self,
2569        sender: &::fidl_next::ServerSender<___T, Resolver>,
2570
2571        request: ::fidl_next::RequestBuffer<___T, resolver::Resolve>,
2572
2573        responder: ::fidl_next::Responder<resolver::Resolve>,
2574    );
2575}
2576
2577impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Resolver
2578where
2579    ___T: ::fidl_next::Transport,
2580    ___H: ResolverServerHandler<___T>,
2581
2582    crate::WireResolverResolveRequest:
2583        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2584{
2585    fn on_one_way(
2586        handler: &mut ___H,
2587        sender: &::fidl_next::ServerSender<___T, Self>,
2588        ordinal: u64,
2589        buffer: ___T::RecvBuffer,
2590    ) {
2591        match ordinal {
2592            ordinal => {
2593                sender.close();
2594            }
2595        }
2596    }
2597
2598    fn on_two_way(
2599        handler: &mut ___H,
2600        sender: &::fidl_next::ServerSender<___T, Self>,
2601        ordinal: u64,
2602        buffer: ___T::RecvBuffer,
2603        responder: ::fidl_next::protocol::Responder,
2604    ) {
2605        match ordinal {
2606            4329530577128037520 => {
2607                let responder = ::fidl_next::Responder::from_untyped(responder);
2608
2609                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
2610                handler.resolve(sender, buffer, responder);
2611            }
2612
2613            ordinal => {
2614                sender.close();
2615            }
2616        }
2617    }
2618}
2619
2620/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
2621pub mod compat {
2622
2623    impl ::fidl_next::TakeFrom<crate::WireHandleInfo> for ::fidl_fuchsia_process::HandleInfo {
2624        #[inline]
2625        fn take_from(from: &crate::WireHandleInfo) -> Self {
2626            Self {
2627                handle: ::fidl_next::TakeFrom::take_from(&from.handle),
2628
2629                id: ::fidl_next::TakeFrom::take_from(&from.id),
2630            }
2631        }
2632    }
2633
2634    impl ::fidl_next::TakeFrom<crate::WireLaunchInfo> for ::fidl_fuchsia_process::LaunchInfo {
2635        #[inline]
2636        fn take_from(from: &crate::WireLaunchInfo) -> Self {
2637            Self {
2638                executable: ::fidl_next::TakeFrom::take_from(&from.executable),
2639
2640                job: ::fidl_next::TakeFrom::take_from(&from.job),
2641
2642                name: ::fidl_next::TakeFrom::take_from(&from.name),
2643            }
2644        }
2645    }
2646
2647    impl ::fidl_next::TakeFrom<crate::WireLauncherLaunchRequest>
2648        for ::fidl_fuchsia_process::LauncherLaunchRequest
2649    {
2650        #[inline]
2651        fn take_from(from: &crate::WireLauncherLaunchRequest) -> Self {
2652            Self { info: ::fidl_next::TakeFrom::take_from(&from.info) }
2653        }
2654    }
2655
2656    impl ::fidl_next::TakeFrom<crate::WireLauncherLaunchResponse>
2657        for ::fidl_fuchsia_process::LauncherLaunchResponse
2658    {
2659        #[inline]
2660        fn take_from(from: &crate::WireLauncherLaunchResponse) -> Self {
2661            Self {
2662                status: ::fidl_next::TakeFrom::take_from(&from.status),
2663
2664                process: ::fidl_next::TakeFrom::take_from(&from.process),
2665            }
2666        }
2667    }
2668
2669    impl ::fidl_next::TakeFrom<crate::WireLauncherCreateWithoutStartingRequest>
2670        for ::fidl_fuchsia_process::LauncherCreateWithoutStartingRequest
2671    {
2672        #[inline]
2673        fn take_from(from: &crate::WireLauncherCreateWithoutStartingRequest) -> Self {
2674            Self { info: ::fidl_next::TakeFrom::take_from(&from.info) }
2675        }
2676    }
2677
2678    impl ::fidl_next::TakeFrom<crate::WireLauncherCreateWithoutStartingResponse>
2679        for ::fidl_fuchsia_process::LauncherCreateWithoutStartingResponse
2680    {
2681        #[inline]
2682        fn take_from(from: &crate::WireLauncherCreateWithoutStartingResponse) -> Self {
2683            Self {
2684                status: ::fidl_next::TakeFrom::take_from(&from.status),
2685
2686                data: ::fidl_next::TakeFrom::take_from(&from.data),
2687            }
2688        }
2689    }
2690
2691    impl ::fidl_next::TakeFrom<crate::WireLauncherAddArgsRequest>
2692        for ::fidl_fuchsia_process::LauncherAddArgsRequest
2693    {
2694        #[inline]
2695        fn take_from(from: &crate::WireLauncherAddArgsRequest) -> Self {
2696            Self { args: ::fidl_next::TakeFrom::take_from(&from.args) }
2697        }
2698    }
2699
2700    impl ::fidl_next::TakeFrom<crate::WireLauncherAddEnvironsRequest>
2701        for ::fidl_fuchsia_process::LauncherAddEnvironsRequest
2702    {
2703        #[inline]
2704        fn take_from(from: &crate::WireLauncherAddEnvironsRequest) -> Self {
2705            Self { environ: ::fidl_next::TakeFrom::take_from(&from.environ) }
2706        }
2707    }
2708
2709    impl ::fidl_next::TakeFrom<crate::WireLauncherAddHandlesRequest>
2710        for ::fidl_fuchsia_process::LauncherAddHandlesRequest
2711    {
2712        #[inline]
2713        fn take_from(from: &crate::WireLauncherAddHandlesRequest) -> Self {
2714            Self { handles: ::fidl_next::TakeFrom::take_from(&from.handles) }
2715        }
2716    }
2717
2718    impl ::fidl_next::TakeFrom<crate::WireLauncherSetOptionsRequest>
2719        for ::fidl_fuchsia_process::LauncherSetOptionsRequest
2720    {
2721        #[inline]
2722        fn take_from(from: &crate::WireLauncherSetOptionsRequest) -> Self {
2723            Self { options: ::fidl_next::TakeFrom::take_from(&from.options) }
2724        }
2725    }
2726
2727    impl ::fidl_next::TakeFrom<crate::WireNameInfo> for ::fidl_fuchsia_process::NameInfo {
2728        #[inline]
2729        fn take_from(from: &crate::WireNameInfo) -> Self {
2730            Self {
2731                path: ::fidl_next::TakeFrom::take_from(&from.path),
2732
2733                directory: ::fidl_next::TakeFrom::take_from(&from.directory),
2734            }
2735        }
2736    }
2737
2738    impl ::fidl_next::TakeFrom<crate::WireLauncherAddNamesRequest>
2739        for ::fidl_fuchsia_process::LauncherAddNamesRequest
2740    {
2741        #[inline]
2742        fn take_from(from: &crate::WireLauncherAddNamesRequest) -> Self {
2743            Self { names: ::fidl_next::TakeFrom::take_from(&from.names) }
2744        }
2745    }
2746
2747    #[cfg(target_os = "fuchsia")]
2748    /// An alias for a client sender over `zx::Channel` for the `Launcher`
2749    /// protocol.
2750    pub type LauncherProxy =
2751        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Launcher>;
2752
2753    impl ::fidl_next::TakeFrom<crate::Launcher> for ::fidl_fuchsia_process::LauncherMarker {
2754        #[inline]
2755        fn take_from(from: &crate::Launcher) -> Self {
2756            Self
2757        }
2758    }
2759
2760    impl ::fidl_next::TakeFrom<crate::WireProcessStartData>
2761        for ::fidl_fuchsia_process::ProcessStartData
2762    {
2763        #[inline]
2764        fn take_from(from: &crate::WireProcessStartData) -> Self {
2765            Self {
2766                process: ::fidl_next::TakeFrom::take_from(&from.process),
2767
2768                root_vmar: ::fidl_next::TakeFrom::take_from(&from.root_vmar),
2769
2770                thread: ::fidl_next::TakeFrom::take_from(&from.thread),
2771
2772                entry: ::fidl_next::TakeFrom::take_from(&from.entry),
2773
2774                stack: ::fidl_next::TakeFrom::take_from(&from.stack),
2775
2776                bootstrap: ::fidl_next::TakeFrom::take_from(&from.bootstrap),
2777
2778                vdso_base: ::fidl_next::TakeFrom::take_from(&from.vdso_base),
2779
2780                base: ::fidl_next::TakeFrom::take_from(&from.base),
2781            }
2782        }
2783    }
2784
2785    impl ::fidl_next::TakeFrom<crate::WireResolverResolveRequest>
2786        for ::fidl_fuchsia_process::ResolverResolveRequest
2787    {
2788        #[inline]
2789        fn take_from(from: &crate::WireResolverResolveRequest) -> Self {
2790            Self { name: ::fidl_next::TakeFrom::take_from(&from.name) }
2791        }
2792    }
2793
2794    impl ::fidl_next::TakeFrom<crate::WireResolverResolveResponse>
2795        for ::fidl_fuchsia_process::ResolverResolveResponse
2796    {
2797        #[inline]
2798        fn take_from(from: &crate::WireResolverResolveResponse) -> Self {
2799            Self {
2800                status: ::fidl_next::TakeFrom::take_from(&from.status),
2801
2802                executable: ::fidl_next::TakeFrom::take_from(&from.executable),
2803
2804                ldsvc: ::fidl_next::TakeFrom::take_from(&from.ldsvc),
2805            }
2806        }
2807    }
2808
2809    #[cfg(target_os = "fuchsia")]
2810    /// An alias for a client sender over `zx::Channel` for the `Resolver`
2811    /// protocol.
2812    pub type ResolverProxy =
2813        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Resolver>;
2814
2815    impl ::fidl_next::TakeFrom<crate::Resolver> for ::fidl_fuchsia_process::ResolverMarker {
2816        #[inline]
2817        fn take_from(from: &crate::Resolver) -> Self {
2818            Self
2819        }
2820    }
2821}