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