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