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