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: ::fidl_next::fuchsia::zx::Status,
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 ::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___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 ::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::Status>
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: ::fidl_next::fuchsia::zx::Status,
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: ::fidl_next::fuchsia::zx::Status,
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 ::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___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 ::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::Status>
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::fuchsia::Status,
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::fuchsia::Status,
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::fuchsia::Status,
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::fuchsia::Status, ___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::fuchsia::Status, ___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::fuchsia::Status, ___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::{
2603 Launcher, LauncherClientHandler, LauncherLocalClientHandler,
2604 LauncherLocalServerHandler, LauncherServerHandler, launcher,
2605 };
2606
2607 pub use crate::natural::LauncherAddArgsRequest;
2608
2609 pub use crate::natural::LauncherAddEnvironsRequest;
2610
2611 pub use crate::natural::LauncherAddHandlesRequest;
2612
2613 pub use crate::natural::LauncherAddNamesRequest;
2614
2615 pub use crate::natural::LauncherCreateWithoutStartingRequest;
2616
2617 pub use crate::natural::LauncherCreateWithoutStartingResponse;
2618
2619 pub use crate::natural::LauncherLaunchRequest;
2620
2621 pub use crate::natural::LauncherLaunchResponse;
2622
2623 pub use crate::natural::LauncherSetOptionsRequest;
2624 }
2625
2626 pub struct Launch;
2627
2628 impl ::fidl_next::Method for Launch {
2629 const ORDINAL: u64 = 1239433936316120996;
2630 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2631 ::fidl_next::protocol::Flexibility::Strict;
2632
2633 type Protocol = crate::Launcher;
2634
2635 type Request = crate::wire::LauncherLaunchRequest<'static>;
2636 }
2637
2638 impl ::fidl_next::TwoWayMethod for Launch {
2639 type Response = ::fidl_next::wire::Strict<crate::wire::LauncherLaunchResponse>;
2640 }
2641
2642 impl<___R> ::fidl_next::Respond<___R> for Launch {
2643 type Output = ::fidl_next::Strict<___R>;
2644
2645 fn respond(response: ___R) -> Self::Output {
2646 ::fidl_next::Strict(response)
2647 }
2648 }
2649
2650 pub struct CreateWithoutStarting;
2651
2652 impl ::fidl_next::Method for CreateWithoutStarting {
2653 const ORDINAL: u64 = 8457621991205227361;
2654 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2655 ::fidl_next::protocol::Flexibility::Strict;
2656
2657 type Protocol = crate::Launcher;
2658
2659 type Request = crate::wire::LauncherCreateWithoutStartingRequest<'static>;
2660 }
2661
2662 impl ::fidl_next::TwoWayMethod for CreateWithoutStarting {
2663 type Response =
2664 ::fidl_next::wire::Strict<crate::wire::LauncherCreateWithoutStartingResponse<'static>>;
2665 }
2666
2667 impl<___R> ::fidl_next::Respond<___R> for CreateWithoutStarting {
2668 type Output = ::fidl_next::Strict<___R>;
2669
2670 fn respond(response: ___R) -> Self::Output {
2671 ::fidl_next::Strict(response)
2672 }
2673 }
2674
2675 pub struct AddArgs;
2676
2677 impl ::fidl_next::Method for AddArgs {
2678 const ORDINAL: u64 = 4315651119310005522;
2679 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2680 ::fidl_next::protocol::Flexibility::Strict;
2681
2682 type Protocol = crate::Launcher;
2683
2684 type Request = crate::wire::LauncherAddArgsRequest<'static>;
2685 }
2686
2687 pub struct AddEnvirons;
2688
2689 impl ::fidl_next::Method for AddEnvirons {
2690 const ORDINAL: u64 = 8332725285682026361;
2691 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2692 ::fidl_next::protocol::Flexibility::Strict;
2693
2694 type Protocol = crate::Launcher;
2695
2696 type Request = crate::wire::LauncherAddEnvironsRequest<'static>;
2697 }
2698
2699 pub struct AddNames;
2700
2701 impl ::fidl_next::Method for AddNames {
2702 const ORDINAL: u64 = 2700451326409737826;
2703 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2704 ::fidl_next::protocol::Flexibility::Strict;
2705
2706 type Protocol = crate::Launcher;
2707
2708 type Request = crate::wire::LauncherAddNamesRequest<'static>;
2709 }
2710
2711 pub struct AddHandles;
2712
2713 impl ::fidl_next::Method for AddHandles {
2714 const ORDINAL: u64 = 5837318672132580885;
2715 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2716 ::fidl_next::protocol::Flexibility::Strict;
2717
2718 type Protocol = crate::Launcher;
2719
2720 type Request = crate::wire::LauncherAddHandlesRequest<'static>;
2721 }
2722
2723 pub struct SetOptions;
2724
2725 impl ::fidl_next::Method for SetOptions {
2726 const ORDINAL: u64 = 6598432479381290375;
2727 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2728 ::fidl_next::protocol::Flexibility::Strict;
2729
2730 type Protocol = crate::Launcher;
2731
2732 type Request = crate::wire::LauncherSetOptionsRequest;
2733 }
2734
2735 mod ___detail {
2736 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Launcher
2737 where
2738 ___T: ::fidl_next::Transport,
2739 {
2740 type Client = LauncherClient<___T>;
2741 type Server = LauncherServer<___T>;
2742 }
2743
2744 #[repr(transparent)]
2746 pub struct LauncherClient<___T: ::fidl_next::Transport> {
2747 #[allow(dead_code)]
2748 client: ::fidl_next::protocol::Client<___T>,
2749 }
2750
2751 impl<___T> LauncherClient<___T>
2752 where
2753 ___T: ::fidl_next::Transport,
2754 {
2755 #[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"]
2756 pub fn launch(
2757 &self,
2758
2759 info: impl ::fidl_next::Encode<
2760 crate::wire::LaunchInfo<'static>,
2761 <___T as ::fidl_next::Transport>::SendBuffer,
2762 >,
2763 ) -> ::fidl_next::TwoWayFuture<'_, super::Launch, ___T>
2764 where
2765 <___T as ::fidl_next::Transport>::SendBuffer:
2766 ::fidl_next::encoder::InternalHandleEncoder,
2767 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2768 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2769 {
2770 self.launch_with(crate::generic::LauncherLaunchRequest { info })
2771 }
2772
2773 #[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"]
2774 pub fn launch_with<___R>(
2775 &self,
2776 request: ___R,
2777 ) -> ::fidl_next::TwoWayFuture<'_, super::Launch, ___T>
2778 where
2779 ___R: ::fidl_next::Encode<
2780 crate::wire::LauncherLaunchRequest<'static>,
2781 <___T as ::fidl_next::Transport>::SendBuffer,
2782 >,
2783 {
2784 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2785 1239433936316120996,
2786 <super::Launch as ::fidl_next::Method>::FLEXIBILITY,
2787 request,
2788 ))
2789 }
2790
2791 #[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"]
2792 pub fn create_without_starting(
2793 &self,
2794
2795 info: impl ::fidl_next::Encode<
2796 crate::wire::LaunchInfo<'static>,
2797 <___T as ::fidl_next::Transport>::SendBuffer,
2798 >,
2799 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateWithoutStarting, ___T>
2800 where
2801 <___T as ::fidl_next::Transport>::SendBuffer:
2802 ::fidl_next::encoder::InternalHandleEncoder,
2803 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2804 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2805 {
2806 self.create_without_starting_with(
2807 crate::generic::LauncherCreateWithoutStartingRequest { info },
2808 )
2809 }
2810
2811 #[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"]
2812 pub fn create_without_starting_with<___R>(
2813 &self,
2814 request: ___R,
2815 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateWithoutStarting, ___T>
2816 where
2817 ___R: ::fidl_next::Encode<
2818 crate::wire::LauncherCreateWithoutStartingRequest<'static>,
2819 <___T as ::fidl_next::Transport>::SendBuffer,
2820 >,
2821 {
2822 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2823 8457621991205227361,
2824 <super::CreateWithoutStarting as ::fidl_next::Method>::FLEXIBILITY,
2825 request,
2826 ))
2827 }
2828
2829 #[doc = " Adds the given arguments to the command-line for the process.\n\n Calling this method multiple times concatenates the arguments.\n"]
2830 pub fn add_args(
2831 &self,
2832
2833 args: impl ::fidl_next::Encode<
2834 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Vector<'static, u8>>,
2835 <___T as ::fidl_next::Transport>::SendBuffer,
2836 >,
2837 ) -> ::fidl_next::SendFuture<'_, ___T>
2838 where
2839 <___T as ::fidl_next::Transport>::SendBuffer:
2840 ::fidl_next::encoder::InternalHandleEncoder,
2841 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2842 {
2843 self.add_args_with(crate::generic::LauncherAddArgsRequest { args })
2844 }
2845
2846 #[doc = " Adds the given arguments to the command-line for the process.\n\n Calling this method multiple times concatenates the arguments.\n"]
2847 pub fn add_args_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
2848 where
2849 ___R: ::fidl_next::Encode<
2850 crate::wire::LauncherAddArgsRequest<'static>,
2851 <___T as ::fidl_next::Transport>::SendBuffer,
2852 >,
2853 {
2854 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2855 4315651119310005522,
2856 <super::AddArgs as ::fidl_next::Method>::FLEXIBILITY,
2857 request,
2858 ))
2859 }
2860
2861 #[doc = " Adds the given variables to the environment variables for the process.\n\n Calling this method multiple times concatenates the variables.\n"]
2862 pub fn add_environs(
2863 &self,
2864
2865 environ: impl ::fidl_next::Encode<
2866 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Vector<'static, u8>>,
2867 <___T as ::fidl_next::Transport>::SendBuffer,
2868 >,
2869 ) -> ::fidl_next::SendFuture<'_, ___T>
2870 where
2871 <___T as ::fidl_next::Transport>::SendBuffer:
2872 ::fidl_next::encoder::InternalHandleEncoder,
2873 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2874 {
2875 self.add_environs_with(crate::generic::LauncherAddEnvironsRequest { environ })
2876 }
2877
2878 #[doc = " Adds the given variables to the environment variables for the process.\n\n Calling this method multiple times concatenates the variables.\n"]
2879 pub fn add_environs_with<___R>(
2880 &self,
2881 request: ___R,
2882 ) -> ::fidl_next::SendFuture<'_, ___T>
2883 where
2884 ___R: ::fidl_next::Encode<
2885 crate::wire::LauncherAddEnvironsRequest<'static>,
2886 <___T as ::fidl_next::Transport>::SendBuffer,
2887 >,
2888 {
2889 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2890 8332725285682026361,
2891 <super::AddEnvirons as ::fidl_next::Method>::FLEXIBILITY,
2892 request,
2893 ))
2894 }
2895
2896 #[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"]
2897 pub fn add_names(
2898 &self,
2899
2900 names: impl ::fidl_next::Encode<
2901 ::fidl_next::wire::Vector<'static, crate::wire::NameInfo<'static>>,
2902 <___T as ::fidl_next::Transport>::SendBuffer,
2903 >,
2904 ) -> ::fidl_next::SendFuture<'_, ___T>
2905 where
2906 <___T as ::fidl_next::Transport>::SendBuffer:
2907 ::fidl_next::encoder::InternalHandleEncoder,
2908 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2909 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2910 {
2911 self.add_names_with(crate::generic::LauncherAddNamesRequest { names })
2912 }
2913
2914 #[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"]
2915 pub fn add_names_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
2916 where
2917 ___R: ::fidl_next::Encode<
2918 crate::wire::LauncherAddNamesRequest<'static>,
2919 <___T as ::fidl_next::Transport>::SendBuffer,
2920 >,
2921 {
2922 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2923 2700451326409737826,
2924 <super::AddNames as ::fidl_next::Method>::FLEXIBILITY,
2925 request,
2926 ))
2927 }
2928
2929 #[doc = " Adds the given handles to the startup handles for the process.\n\n Calling this method multiple times concatenates the handles.\n"]
2930 pub fn add_handles(
2931 &self,
2932
2933 handles: impl ::fidl_next::Encode<
2934 ::fidl_next::wire::Vector<'static, crate::wire::HandleInfo>,
2935 <___T as ::fidl_next::Transport>::SendBuffer,
2936 >,
2937 ) -> ::fidl_next::SendFuture<'_, ___T>
2938 where
2939 <___T as ::fidl_next::Transport>::SendBuffer:
2940 ::fidl_next::encoder::InternalHandleEncoder,
2941 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2942 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2943 {
2944 self.add_handles_with(crate::generic::LauncherAddHandlesRequest { handles })
2945 }
2946
2947 #[doc = " Adds the given handles to the startup handles for the process.\n\n Calling this method multiple times concatenates the handles.\n"]
2948 pub fn add_handles_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
2949 where
2950 ___R: ::fidl_next::Encode<
2951 crate::wire::LauncherAddHandlesRequest<'static>,
2952 <___T as ::fidl_next::Transport>::SendBuffer,
2953 >,
2954 {
2955 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2956 5837318672132580885,
2957 <super::AddHandles as ::fidl_next::Method>::FLEXIBILITY,
2958 request,
2959 ))
2960 }
2961
2962 #[doc = " Sets the options with which the process is created.\n\n Calling this method multiple times will overwrite the current options.\n"]
2963 pub fn set_options(
2964 &self,
2965
2966 options: impl ::fidl_next::Encode<
2967 ::fidl_next::wire::Uint32,
2968 <___T as ::fidl_next::Transport>::SendBuffer,
2969 >,
2970 ) -> ::fidl_next::SendFuture<'_, ___T>
2971 where
2972 <___T as ::fidl_next::Transport>::SendBuffer:
2973 ::fidl_next::encoder::InternalHandleEncoder,
2974 {
2975 self.set_options_with(crate::generic::LauncherSetOptionsRequest { options })
2976 }
2977
2978 #[doc = " Sets the options with which the process is created.\n\n Calling this method multiple times will overwrite the current options.\n"]
2979 pub fn set_options_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
2980 where
2981 ___R: ::fidl_next::Encode<
2982 crate::wire::LauncherSetOptionsRequest,
2983 <___T as ::fidl_next::Transport>::SendBuffer,
2984 >,
2985 {
2986 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2987 6598432479381290375,
2988 <super::SetOptions as ::fidl_next::Method>::FLEXIBILITY,
2989 request,
2990 ))
2991 }
2992 }
2993
2994 #[repr(transparent)]
2996 pub struct LauncherServer<___T: ::fidl_next::Transport> {
2997 server: ::fidl_next::protocol::Server<___T>,
2998 }
2999
3000 impl<___T> LauncherServer<___T> where ___T: ::fidl_next::Transport {}
3001 }
3002}
3003
3004#[diagnostic::on_unimplemented(
3005 note = "If {Self} implements the non-local LauncherClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3006)]
3007
3008pub trait LauncherLocalClientHandler<
3012 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3013 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3014>
3015{
3016}
3017
3018impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Launcher
3019where
3020 ___H: LauncherLocalClientHandler<___T>,
3021 ___T: ::fidl_next::Transport,
3022{
3023 async fn on_event(
3024 handler: &mut ___H,
3025 mut message: ::fidl_next::Message<___T>,
3026 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3027 match *message.header().ordinal {
3028 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3029 }
3030 }
3031}
3032
3033#[diagnostic::on_unimplemented(
3034 note = "If {Self} implements the non-local LauncherServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3035)]
3036
3037pub trait LauncherLocalServerHandler<
3041 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3042 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3043>
3044{
3045 #[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"]
3046 fn launch(
3047 &mut self,
3048
3049 request: ::fidl_next::Request<launcher::Launch, ___T>,
3050
3051 responder: ::fidl_next::Responder<launcher::Launch, ___T>,
3052 ) -> impl ::core::future::Future<Output = ()>;
3053
3054 #[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"]
3055 fn create_without_starting(
3056 &mut self,
3057
3058 request: ::fidl_next::Request<launcher::CreateWithoutStarting, ___T>,
3059
3060 responder: ::fidl_next::Responder<launcher::CreateWithoutStarting, ___T>,
3061 ) -> impl ::core::future::Future<Output = ()>;
3062
3063 #[doc = " Adds the given arguments to the command-line for the process.\n\n Calling this method multiple times concatenates the arguments.\n"]
3064 fn add_args(
3065 &mut self,
3066
3067 request: ::fidl_next::Request<launcher::AddArgs, ___T>,
3068 ) -> impl ::core::future::Future<Output = ()>;
3069
3070 #[doc = " Adds the given variables to the environment variables for the process.\n\n Calling this method multiple times concatenates the variables.\n"]
3071 fn add_environs(
3072 &mut self,
3073
3074 request: ::fidl_next::Request<launcher::AddEnvirons, ___T>,
3075 ) -> impl ::core::future::Future<Output = ()>;
3076
3077 #[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"]
3078 fn add_names(
3079 &mut self,
3080
3081 request: ::fidl_next::Request<launcher::AddNames, ___T>,
3082 ) -> impl ::core::future::Future<Output = ()>;
3083
3084 #[doc = " Adds the given handles to the startup handles for the process.\n\n Calling this method multiple times concatenates the handles.\n"]
3085 fn add_handles(
3086 &mut self,
3087
3088 request: ::fidl_next::Request<launcher::AddHandles, ___T>,
3089 ) -> impl ::core::future::Future<Output = ()>;
3090
3091 #[doc = " Sets the options with which the process is created.\n\n Calling this method multiple times will overwrite the current options.\n"]
3092 fn set_options(
3093 &mut self,
3094
3095 request: ::fidl_next::Request<launcher::SetOptions, ___T>,
3096 ) -> impl ::core::future::Future<Output = ()>;
3097}
3098
3099impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Launcher
3100where
3101 ___H: LauncherLocalServerHandler<___T>,
3102 ___T: ::fidl_next::Transport,
3103 for<'de> crate::wire::LauncherLaunchRequest<'de>: ::fidl_next::Decode<
3104 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3105 Constraint = (),
3106 >,
3107 for<'de> crate::wire::LauncherCreateWithoutStartingRequest<'de>: ::fidl_next::Decode<
3108 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3109 Constraint = (),
3110 >,
3111 for<'de> crate::wire::LauncherAddArgsRequest<'de>: ::fidl_next::Decode<
3112 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3113 Constraint = (),
3114 >,
3115 for<'de> crate::wire::LauncherAddEnvironsRequest<'de>: ::fidl_next::Decode<
3116 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3117 Constraint = (),
3118 >,
3119 for<'de> crate::wire::LauncherAddNamesRequest<'de>: ::fidl_next::Decode<
3120 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3121 Constraint = (),
3122 >,
3123 for<'de> crate::wire::LauncherAddHandlesRequest<'de>: ::fidl_next::Decode<
3124 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3125 Constraint = (),
3126 >,
3127 for<'de> crate::wire::LauncherSetOptionsRequest: ::fidl_next::Decode<
3128 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3129 Constraint = (),
3130 >,
3131{
3132 async fn on_one_way(
3133 handler: &mut ___H,
3134 mut message: ::fidl_next::Message<___T>,
3135 ) -> ::core::result::Result<
3136 (),
3137 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3138 > {
3139 match *message.header().ordinal {
3140 4315651119310005522 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3141 Ok(decoded) => {
3142 handler.add_args(::fidl_next::Request::from_decoded(decoded)).await;
3143 Ok(())
3144 }
3145 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3146 ordinal: 4315651119310005522,
3147 error,
3148 }),
3149 },
3150
3151 8332725285682026361 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3152 Ok(decoded) => {
3153 handler.add_environs(::fidl_next::Request::from_decoded(decoded)).await;
3154 Ok(())
3155 }
3156 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3157 ordinal: 8332725285682026361,
3158 error,
3159 }),
3160 },
3161
3162 2700451326409737826 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3163 Ok(decoded) => {
3164 handler.add_names(::fidl_next::Request::from_decoded(decoded)).await;
3165 Ok(())
3166 }
3167 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3168 ordinal: 2700451326409737826,
3169 error,
3170 }),
3171 },
3172
3173 5837318672132580885 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3174 Ok(decoded) => {
3175 handler.add_handles(::fidl_next::Request::from_decoded(decoded)).await;
3176 Ok(())
3177 }
3178 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3179 ordinal: 5837318672132580885,
3180 error,
3181 }),
3182 },
3183
3184 6598432479381290375 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3185 Ok(decoded) => {
3186 handler.set_options(::fidl_next::Request::from_decoded(decoded)).await;
3187 Ok(())
3188 }
3189 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3190 ordinal: 6598432479381290375,
3191 error,
3192 }),
3193 },
3194
3195 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3196 }
3197 }
3198
3199 async fn on_two_way(
3200 handler: &mut ___H,
3201 mut message: ::fidl_next::Message<___T>,
3202 responder: ::fidl_next::protocol::Responder<___T>,
3203 ) -> ::core::result::Result<
3204 (),
3205 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3206 > {
3207 match *message.header().ordinal {
3208 1239433936316120996 => {
3209 let responder = ::fidl_next::Responder::from_untyped(responder);
3210
3211 match ::fidl_next::AsDecoderExt::into_decoded(message) {
3212 Ok(decoded) => {
3213 handler
3214 .launch(::fidl_next::Request::from_decoded(decoded), responder)
3215 .await;
3216 Ok(())
3217 }
3218 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3219 ordinal: 1239433936316120996,
3220 error,
3221 }),
3222 }
3223 }
3224
3225 8457621991205227361 => {
3226 let responder = ::fidl_next::Responder::from_untyped(responder);
3227
3228 match ::fidl_next::AsDecoderExt::into_decoded(message) {
3229 Ok(decoded) => {
3230 handler
3231 .create_without_starting(
3232 ::fidl_next::Request::from_decoded(decoded),
3233 responder,
3234 )
3235 .await;
3236 Ok(())
3237 }
3238 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3239 ordinal: 8457621991205227361,
3240 error,
3241 }),
3242 }
3243 }
3244
3245 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3246 }
3247 }
3248}
3249
3250pub trait LauncherClientHandler<
3254 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3255 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3256>
3257{
3258}
3259
3260impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Launcher
3261where
3262 ___H: LauncherClientHandler<___T> + ::core::marker::Send,
3263 ___T: ::fidl_next::Transport,
3264{
3265 async fn on_event(
3266 handler: &mut ___H,
3267 mut message: ::fidl_next::Message<___T>,
3268 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3269 match *message.header().ordinal {
3270 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3271 }
3272 }
3273}
3274
3275pub trait LauncherServerHandler<
3279 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3280 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3281>
3282{
3283 #[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"]
3284 fn launch(
3285 &mut self,
3286
3287 request: ::fidl_next::Request<launcher::Launch, ___T>,
3288
3289 responder: ::fidl_next::Responder<launcher::Launch, ___T>,
3290 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3291
3292 #[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"]
3293 fn create_without_starting(
3294 &mut self,
3295
3296 request: ::fidl_next::Request<launcher::CreateWithoutStarting, ___T>,
3297
3298 responder: ::fidl_next::Responder<launcher::CreateWithoutStarting, ___T>,
3299 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3300
3301 #[doc = " Adds the given arguments to the command-line for the process.\n\n Calling this method multiple times concatenates the arguments.\n"]
3302 fn add_args(
3303 &mut self,
3304
3305 request: ::fidl_next::Request<launcher::AddArgs, ___T>,
3306 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3307
3308 #[doc = " Adds the given variables to the environment variables for the process.\n\n Calling this method multiple times concatenates the variables.\n"]
3309 fn add_environs(
3310 &mut self,
3311
3312 request: ::fidl_next::Request<launcher::AddEnvirons, ___T>,
3313 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3314
3315 #[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"]
3316 fn add_names(
3317 &mut self,
3318
3319 request: ::fidl_next::Request<launcher::AddNames, ___T>,
3320 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3321
3322 #[doc = " Adds the given handles to the startup handles for the process.\n\n Calling this method multiple times concatenates the handles.\n"]
3323 fn add_handles(
3324 &mut self,
3325
3326 request: ::fidl_next::Request<launcher::AddHandles, ___T>,
3327 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3328
3329 #[doc = " Sets the options with which the process is created.\n\n Calling this method multiple times will overwrite the current options.\n"]
3330 fn set_options(
3331 &mut self,
3332
3333 request: ::fidl_next::Request<launcher::SetOptions, ___T>,
3334 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3335}
3336
3337impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Launcher
3338where
3339 ___H: LauncherServerHandler<___T> + ::core::marker::Send,
3340 ___T: ::fidl_next::Transport,
3341 for<'de> crate::wire::LauncherLaunchRequest<'de>: ::fidl_next::Decode<
3342 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3343 Constraint = (),
3344 >,
3345 for<'de> crate::wire::LauncherCreateWithoutStartingRequest<'de>: ::fidl_next::Decode<
3346 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3347 Constraint = (),
3348 >,
3349 for<'de> crate::wire::LauncherAddArgsRequest<'de>: ::fidl_next::Decode<
3350 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3351 Constraint = (),
3352 >,
3353 for<'de> crate::wire::LauncherAddEnvironsRequest<'de>: ::fidl_next::Decode<
3354 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3355 Constraint = (),
3356 >,
3357 for<'de> crate::wire::LauncherAddNamesRequest<'de>: ::fidl_next::Decode<
3358 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3359 Constraint = (),
3360 >,
3361 for<'de> crate::wire::LauncherAddHandlesRequest<'de>: ::fidl_next::Decode<
3362 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3363 Constraint = (),
3364 >,
3365 for<'de> crate::wire::LauncherSetOptionsRequest: ::fidl_next::Decode<
3366 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3367 Constraint = (),
3368 >,
3369{
3370 async fn on_one_way(
3371 handler: &mut ___H,
3372 mut message: ::fidl_next::Message<___T>,
3373 ) -> ::core::result::Result<
3374 (),
3375 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3376 > {
3377 match *message.header().ordinal {
3378 4315651119310005522 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3379 Ok(decoded) => {
3380 handler.add_args(::fidl_next::Request::from_decoded(decoded)).await;
3381 Ok(())
3382 }
3383 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3384 ordinal: 4315651119310005522,
3385 error,
3386 }),
3387 },
3388
3389 8332725285682026361 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3390 Ok(decoded) => {
3391 handler.add_environs(::fidl_next::Request::from_decoded(decoded)).await;
3392 Ok(())
3393 }
3394 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3395 ordinal: 8332725285682026361,
3396 error,
3397 }),
3398 },
3399
3400 2700451326409737826 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3401 Ok(decoded) => {
3402 handler.add_names(::fidl_next::Request::from_decoded(decoded)).await;
3403 Ok(())
3404 }
3405 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3406 ordinal: 2700451326409737826,
3407 error,
3408 }),
3409 },
3410
3411 5837318672132580885 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3412 Ok(decoded) => {
3413 handler.add_handles(::fidl_next::Request::from_decoded(decoded)).await;
3414 Ok(())
3415 }
3416 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3417 ordinal: 5837318672132580885,
3418 error,
3419 }),
3420 },
3421
3422 6598432479381290375 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3423 Ok(decoded) => {
3424 handler.set_options(::fidl_next::Request::from_decoded(decoded)).await;
3425 Ok(())
3426 }
3427 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3428 ordinal: 6598432479381290375,
3429 error,
3430 }),
3431 },
3432
3433 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3434 }
3435 }
3436
3437 async fn on_two_way(
3438 handler: &mut ___H,
3439 mut message: ::fidl_next::Message<___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 *message.header().ordinal {
3446 1239433936316120996 => {
3447 let responder = ::fidl_next::Responder::from_untyped(responder);
3448
3449 match ::fidl_next::AsDecoderExt::into_decoded(message) {
3450 Ok(decoded) => {
3451 handler
3452 .launch(::fidl_next::Request::from_decoded(decoded), responder)
3453 .await;
3454 Ok(())
3455 }
3456 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3457 ordinal: 1239433936316120996,
3458 error,
3459 }),
3460 }
3461 }
3462
3463 8457621991205227361 => {
3464 let responder = ::fidl_next::Responder::from_untyped(responder);
3465
3466 match ::fidl_next::AsDecoderExt::into_decoded(message) {
3467 Ok(decoded) => {
3468 handler
3469 .create_without_starting(
3470 ::fidl_next::Request::from_decoded(decoded),
3471 responder,
3472 )
3473 .await;
3474 Ok(())
3475 }
3476 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3477 ordinal: 8457621991205227361,
3478 error,
3479 }),
3480 }
3481 }
3482
3483 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3484 }
3485 }
3486}
3487
3488impl<___T> LauncherClientHandler<___T> for ::fidl_next::IgnoreEvents where
3489 ___T: ::fidl_next::Transport
3490{
3491}
3492
3493impl<___H, ___T> LauncherLocalClientHandler<___T> for ::fidl_next::Local<___H>
3494where
3495 ___H: LauncherClientHandler<___T>,
3496 ___T: ::fidl_next::Transport,
3497{
3498}
3499
3500impl<___H, ___T> LauncherLocalServerHandler<___T> for ::fidl_next::Local<___H>
3501where
3502 ___H: LauncherServerHandler<___T>,
3503 ___T: ::fidl_next::Transport,
3504{
3505 async fn launch(
3506 &mut self,
3507
3508 request: ::fidl_next::Request<launcher::Launch, ___T>,
3509
3510 responder: ::fidl_next::Responder<launcher::Launch, ___T>,
3511 ) {
3512 ___H::launch(&mut self.0, request, responder).await
3513 }
3514
3515 async fn create_without_starting(
3516 &mut self,
3517
3518 request: ::fidl_next::Request<launcher::CreateWithoutStarting, ___T>,
3519
3520 responder: ::fidl_next::Responder<launcher::CreateWithoutStarting, ___T>,
3521 ) {
3522 ___H::create_without_starting(&mut self.0, request, responder).await
3523 }
3524
3525 async fn add_args(&mut self, request: ::fidl_next::Request<launcher::AddArgs, ___T>) {
3526 ___H::add_args(&mut self.0, request).await
3527 }
3528
3529 async fn add_environs(&mut self, request: ::fidl_next::Request<launcher::AddEnvirons, ___T>) {
3530 ___H::add_environs(&mut self.0, request).await
3531 }
3532
3533 async fn add_names(&mut self, request: ::fidl_next::Request<launcher::AddNames, ___T>) {
3534 ___H::add_names(&mut self.0, request).await
3535 }
3536
3537 async fn add_handles(&mut self, request: ::fidl_next::Request<launcher::AddHandles, ___T>) {
3538 ___H::add_handles(&mut self.0, request).await
3539 }
3540
3541 async fn set_options(&mut self, request: ::fidl_next::Request<launcher::SetOptions, ___T>) {
3542 ___H::set_options(&mut self.0, request).await
3543 }
3544}
3545
3546#[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"]
3548#[derive(PartialEq, Debug)]
3549pub struct Resolver;
3550
3551impl ::fidl_next::Discoverable for Resolver {
3552 const PROTOCOL_NAME: &'static str = "fuchsia.process.Resolver";
3553}
3554
3555#[cfg(target_os = "fuchsia")]
3556impl ::fidl_next::HasTransport for Resolver {
3557 type Transport = ::fidl_next::fuchsia::zx::Channel;
3558}
3559
3560pub mod resolver {
3561 pub mod prelude {
3562 pub use crate::{
3563 Resolver, ResolverClientHandler, ResolverLocalClientHandler,
3564 ResolverLocalServerHandler, ResolverServerHandler, resolver,
3565 };
3566
3567 pub use crate::natural::ResolverResolveRequest;
3568
3569 pub use crate::natural::ResolverResolveResponse;
3570 }
3571
3572 pub struct Resolve;
3573
3574 impl ::fidl_next::Method for Resolve {
3575 const ORDINAL: u64 = 4329530577128037520;
3576 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3577 ::fidl_next::protocol::Flexibility::Strict;
3578
3579 type Protocol = crate::Resolver;
3580
3581 type Request = crate::wire::ResolverResolveRequest<'static>;
3582 }
3583
3584 impl ::fidl_next::TwoWayMethod for Resolve {
3585 type Response = ::fidl_next::wire::Strict<crate::wire::ResolverResolveResponse>;
3586 }
3587
3588 impl<___R> ::fidl_next::Respond<___R> for Resolve {
3589 type Output = ::fidl_next::Strict<___R>;
3590
3591 fn respond(response: ___R) -> Self::Output {
3592 ::fidl_next::Strict(response)
3593 }
3594 }
3595
3596 mod ___detail {
3597 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Resolver
3598 where
3599 ___T: ::fidl_next::Transport,
3600 {
3601 type Client = ResolverClient<___T>;
3602 type Server = ResolverServer<___T>;
3603 }
3604
3605 #[repr(transparent)]
3607 pub struct ResolverClient<___T: ::fidl_next::Transport> {
3608 #[allow(dead_code)]
3609 client: ::fidl_next::protocol::Client<___T>,
3610 }
3611
3612 impl<___T> ResolverClient<___T>
3613 where
3614 ___T: ::fidl_next::Transport,
3615 {
3616 #[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"]
3617 pub fn resolve(
3618 &self,
3619
3620 name: impl ::fidl_next::Encode<
3621 ::fidl_next::wire::String<'static>,
3622 <___T as ::fidl_next::Transport>::SendBuffer,
3623 >,
3624 ) -> ::fidl_next::TwoWayFuture<'_, super::Resolve, ___T>
3625 where
3626 <___T as ::fidl_next::Transport>::SendBuffer:
3627 ::fidl_next::encoder::InternalHandleEncoder,
3628 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3629 {
3630 self.resolve_with(crate::generic::ResolverResolveRequest { name })
3631 }
3632
3633 #[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"]
3634 pub fn resolve_with<___R>(
3635 &self,
3636 request: ___R,
3637 ) -> ::fidl_next::TwoWayFuture<'_, super::Resolve, ___T>
3638 where
3639 ___R: ::fidl_next::Encode<
3640 crate::wire::ResolverResolveRequest<'static>,
3641 <___T as ::fidl_next::Transport>::SendBuffer,
3642 >,
3643 {
3644 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3645 4329530577128037520,
3646 <super::Resolve as ::fidl_next::Method>::FLEXIBILITY,
3647 request,
3648 ))
3649 }
3650 }
3651
3652 #[repr(transparent)]
3654 pub struct ResolverServer<___T: ::fidl_next::Transport> {
3655 server: ::fidl_next::protocol::Server<___T>,
3656 }
3657
3658 impl<___T> ResolverServer<___T> where ___T: ::fidl_next::Transport {}
3659 }
3660}
3661
3662#[diagnostic::on_unimplemented(
3663 note = "If {Self} implements the non-local ResolverClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3664)]
3665
3666pub trait ResolverLocalClientHandler<
3670 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3671 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3672>
3673{
3674}
3675
3676impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Resolver
3677where
3678 ___H: ResolverLocalClientHandler<___T>,
3679 ___T: ::fidl_next::Transport,
3680{
3681 async fn on_event(
3682 handler: &mut ___H,
3683 mut message: ::fidl_next::Message<___T>,
3684 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3685 match *message.header().ordinal {
3686 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3687 }
3688 }
3689}
3690
3691#[diagnostic::on_unimplemented(
3692 note = "If {Self} implements the non-local ResolverServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3693)]
3694
3695pub trait ResolverLocalServerHandler<
3699 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3700 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3701>
3702{
3703 #[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"]
3704 fn resolve(
3705 &mut self,
3706
3707 request: ::fidl_next::Request<resolver::Resolve, ___T>,
3708
3709 responder: ::fidl_next::Responder<resolver::Resolve, ___T>,
3710 ) -> impl ::core::future::Future<Output = ()>;
3711}
3712
3713impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Resolver
3714where
3715 ___H: ResolverLocalServerHandler<___T>,
3716 ___T: ::fidl_next::Transport,
3717 for<'de> crate::wire::ResolverResolveRequest<'de>: ::fidl_next::Decode<
3718 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3719 Constraint = (),
3720 >,
3721{
3722 async fn on_one_way(
3723 handler: &mut ___H,
3724 mut message: ::fidl_next::Message<___T>,
3725 ) -> ::core::result::Result<
3726 (),
3727 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3728 > {
3729 match *message.header().ordinal {
3730 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3731 }
3732 }
3733
3734 async fn on_two_way(
3735 handler: &mut ___H,
3736 mut message: ::fidl_next::Message<___T>,
3737 responder: ::fidl_next::protocol::Responder<___T>,
3738 ) -> ::core::result::Result<
3739 (),
3740 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3741 > {
3742 match *message.header().ordinal {
3743 4329530577128037520 => {
3744 let responder = ::fidl_next::Responder::from_untyped(responder);
3745
3746 match ::fidl_next::AsDecoderExt::into_decoded(message) {
3747 Ok(decoded) => {
3748 handler
3749 .resolve(::fidl_next::Request::from_decoded(decoded), responder)
3750 .await;
3751 Ok(())
3752 }
3753 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3754 ordinal: 4329530577128037520,
3755 error,
3756 }),
3757 }
3758 }
3759
3760 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3761 }
3762 }
3763}
3764
3765pub trait ResolverClientHandler<
3769 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3770 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3771>
3772{
3773}
3774
3775impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Resolver
3776where
3777 ___H: ResolverClientHandler<___T> + ::core::marker::Send,
3778 ___T: ::fidl_next::Transport,
3779{
3780 async fn on_event(
3781 handler: &mut ___H,
3782 mut message: ::fidl_next::Message<___T>,
3783 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3784 match *message.header().ordinal {
3785 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3786 }
3787 }
3788}
3789
3790pub trait ResolverServerHandler<
3794 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3795 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3796>
3797{
3798 #[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"]
3799 fn resolve(
3800 &mut self,
3801
3802 request: ::fidl_next::Request<resolver::Resolve, ___T>,
3803
3804 responder: ::fidl_next::Responder<resolver::Resolve, ___T>,
3805 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3806}
3807
3808impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Resolver
3809where
3810 ___H: ResolverServerHandler<___T> + ::core::marker::Send,
3811 ___T: ::fidl_next::Transport,
3812 for<'de> crate::wire::ResolverResolveRequest<'de>: ::fidl_next::Decode<
3813 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3814 Constraint = (),
3815 >,
3816{
3817 async fn on_one_way(
3818 handler: &mut ___H,
3819 mut message: ::fidl_next::Message<___T>,
3820 ) -> ::core::result::Result<
3821 (),
3822 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3823 > {
3824 match *message.header().ordinal {
3825 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3826 }
3827 }
3828
3829 async fn on_two_way(
3830 handler: &mut ___H,
3831 mut message: ::fidl_next::Message<___T>,
3832 responder: ::fidl_next::protocol::Responder<___T>,
3833 ) -> ::core::result::Result<
3834 (),
3835 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3836 > {
3837 match *message.header().ordinal {
3838 4329530577128037520 => {
3839 let responder = ::fidl_next::Responder::from_untyped(responder);
3840
3841 match ::fidl_next::AsDecoderExt::into_decoded(message) {
3842 Ok(decoded) => {
3843 handler
3844 .resolve(::fidl_next::Request::from_decoded(decoded), responder)
3845 .await;
3846 Ok(())
3847 }
3848 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3849 ordinal: 4329530577128037520,
3850 error,
3851 }),
3852 }
3853 }
3854
3855 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3856 }
3857 }
3858}
3859
3860impl<___T> ResolverClientHandler<___T> for ::fidl_next::IgnoreEvents where
3861 ___T: ::fidl_next::Transport
3862{
3863}
3864
3865impl<___H, ___T> ResolverLocalClientHandler<___T> for ::fidl_next::Local<___H>
3866where
3867 ___H: ResolverClientHandler<___T>,
3868 ___T: ::fidl_next::Transport,
3869{
3870}
3871
3872impl<___H, ___T> ResolverLocalServerHandler<___T> for ::fidl_next::Local<___H>
3873where
3874 ___H: ResolverServerHandler<___T>,
3875 ___T: ::fidl_next::Transport,
3876{
3877 async fn resolve(
3878 &mut self,
3879
3880 request: ::fidl_next::Request<resolver::Resolve, ___T>,
3881
3882 responder: ::fidl_next::Responder<resolver::Resolve, ___T>,
3883 ) {
3884 ___H::resolve(&mut self.0, request, responder).await
3885 }
3886}
3887
3888pub use fidl_next_common_fuchsia_process::*;