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_component_runner::natural::*;
8
9 #[derive(PartialEq, Debug)]
10 pub enum Task {
11 Job(::fidl_next::fuchsia::zx::Job),
12
13 Process(::fidl_next::fuchsia::zx::Process),
14
15 Thread(::fidl_next::fuchsia::zx::Thread),
16
17 UnknownOrdinal_(u64),
18 }
19
20 impl Task {
21 pub fn is_unknown(&self) -> bool {
22 #[allow(unreachable_patterns)]
23 match self {
24 Self::UnknownOrdinal_(_) => true,
25 _ => false,
26 }
27 }
28 }
29
30 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Task<'static>, ___E> for Task
31 where
32 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
33 ___E: ::fidl_next::Encoder,
34 ___E: ::fidl_next::fuchsia::HandleEncoder,
35 {
36 #[inline]
37 fn encode(
38 self,
39 encoder: &mut ___E,
40 out: &mut ::core::mem::MaybeUninit<crate::wire::Task<'static>>,
41 _: (),
42 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
43 ::fidl_next::munge!(let crate::wire::Task { raw, _phantom: _ } = out);
44
45 match self {
46 Self::Job(value) => ::fidl_next::RawWireUnion::encode_as::<
47 ___E,
48 ::fidl_next::fuchsia::WireJob,
49 >(value, 1, encoder, raw, ())?,
50
51 Self::Process(value) => ::fidl_next::RawWireUnion::encode_as::<
52 ___E,
53 ::fidl_next::fuchsia::WireProcess,
54 >(value, 2, encoder, raw, ())?,
55
56 Self::Thread(value) => ::fidl_next::RawWireUnion::encode_as::<
57 ___E,
58 ::fidl_next::fuchsia::WireThread,
59 >(value, 3, encoder, raw, ())?,
60
61 Self::UnknownOrdinal_(ordinal) => {
62 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
63 }
64 }
65
66 Ok(())
67 }
68 }
69
70 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Task<'static>, ___E> for Task
71 where
72 ___E: ?Sized,
73 Task: ::fidl_next::Encode<crate::wire::Task<'static>, ___E>,
74 {
75 #[inline]
76 fn encode_option(
77 this: ::core::option::Option<Self>,
78 encoder: &mut ___E,
79 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Task<'static>>,
80 _: (),
81 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
82 ::fidl_next::munge!(let crate::wire_optional::Task { raw, _phantom: _ } = &mut *out);
83
84 if let Some(inner) = this {
85 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
86 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
87 } else {
88 ::fidl_next::RawWireUnion::encode_absent(raw);
89 }
90
91 Ok(())
92 }
93 }
94
95 impl<'de> ::fidl_next::FromWire<crate::wire::Task<'de>> for Task {
96 #[inline]
97 fn from_wire(wire: crate::wire::Task<'de>) -> Self {
98 let wire = ::core::mem::ManuallyDrop::new(wire);
99 match wire.raw.ordinal() {
100 1 => Self::Job(::fidl_next::FromWire::from_wire(unsafe {
101 wire.raw.get().read_unchecked::<::fidl_next::fuchsia::WireJob>()
102 })),
103
104 2 => Self::Process(::fidl_next::FromWire::from_wire(unsafe {
105 wire.raw.get().read_unchecked::<::fidl_next::fuchsia::WireProcess>()
106 })),
107
108 3 => Self::Thread(::fidl_next::FromWire::from_wire(unsafe {
109 wire.raw.get().read_unchecked::<::fidl_next::fuchsia::WireThread>()
110 })),
111
112 ord => return Self::UnknownOrdinal_(ord as u64),
113 }
114 }
115 }
116
117 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Task<'de>> for Task {
118 #[inline]
119 fn from_wire_option(wire: crate::wire_optional::Task<'de>) -> ::core::option::Option<Self> {
120 if let Some(inner) = wire.into_option() {
121 Some(::fidl_next::FromWire::from_wire(inner))
122 } else {
123 None
124 }
125 }
126 }
127
128 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Task<'de>> for Box<Task> {
129 #[inline]
130 fn from_wire_option(wire: crate::wire_optional::Task<'de>) -> ::core::option::Option<Self> {
131 <
132 Task as ::fidl_next::FromWireOption<crate::wire_optional::Task<'de>>
133 >::from_wire_option(wire).map(Box::new)
134 }
135 }
136
137 #[derive(PartialEq, Debug, Default)]
138 pub struct ComponentTasks {
139 pub component_task: ::core::option::Option<crate::natural::Task>,
140
141 pub parent_task: ::core::option::Option<crate::natural::Task>,
142 }
143
144 impl ComponentTasks {
145 fn __max_ordinal(&self) -> usize {
146 if self.parent_task.is_some() {
147 return 2;
148 }
149
150 if self.component_task.is_some() {
151 return 1;
152 }
153
154 0
155 }
156 }
157
158 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentTasks<'static>, ___E> for ComponentTasks
159 where
160 ___E: ::fidl_next::Encoder + ?Sized,
161 ___E: ::fidl_next::fuchsia::HandleEncoder,
162 {
163 #[inline]
164 fn encode(
165 mut self,
166 encoder: &mut ___E,
167 out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentTasks<'static>>,
168 _: (),
169 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
170 ::fidl_next::munge!(let crate::wire::ComponentTasks { table } = out);
171
172 let max_ord = self.__max_ordinal();
173
174 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
175 ::fidl_next::Wire::zero_padding(&mut out);
176
177 let mut preallocated =
178 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
179
180 for i in 1..=max_ord {
181 match i {
182 2 => {
183 if let Some(value) = self.parent_task.take() {
184 ::fidl_next::WireEnvelope::encode_value::<
185 crate::wire::Task<'static>,
186 ___E,
187 >(
188 value, preallocated.encoder, &mut out, ()
189 )?;
190 } else {
191 ::fidl_next::WireEnvelope::encode_zero(&mut out)
192 }
193 }
194
195 1 => {
196 if let Some(value) = self.component_task.take() {
197 ::fidl_next::WireEnvelope::encode_value::<
198 crate::wire::Task<'static>,
199 ___E,
200 >(
201 value, preallocated.encoder, &mut out, ()
202 )?;
203 } else {
204 ::fidl_next::WireEnvelope::encode_zero(&mut out)
205 }
206 }
207
208 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
209 }
210 unsafe {
211 preallocated.write_next(out.assume_init_ref());
212 }
213 }
214
215 ::fidl_next::WireTable::encode_len(table, max_ord);
216
217 Ok(())
218 }
219 }
220
221 impl<'de> ::fidl_next::FromWire<crate::wire::ComponentTasks<'de>> for ComponentTasks {
222 #[inline]
223 fn from_wire(wire_: crate::wire::ComponentTasks<'de>) -> Self {
224 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
225
226 let component_task = wire_.table.get(1);
227
228 let parent_task = wire_.table.get(2);
229
230 Self {
231 component_task: component_task.map(|envelope| {
232 ::fidl_next::FromWire::from_wire(unsafe {
233 envelope.read_unchecked::<crate::wire::Task<'de>>()
234 })
235 }),
236
237 parent_task: parent_task.map(|envelope| {
238 ::fidl_next::FromWire::from_wire(unsafe {
239 envelope.read_unchecked::<crate::wire::Task<'de>>()
240 })
241 }),
242 }
243 }
244 }
245
246 #[derive(PartialEq, Debug, Default)]
247 pub struct ComponentDiagnostics {
248 pub tasks: ::core::option::Option<crate::natural::ComponentTasks>,
249 }
250
251 impl ComponentDiagnostics {
252 fn __max_ordinal(&self) -> usize {
253 if self.tasks.is_some() {
254 return 1;
255 }
256
257 0
258 }
259 }
260
261 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentDiagnostics<'static>, ___E>
262 for ComponentDiagnostics
263 where
264 ___E: ::fidl_next::Encoder + ?Sized,
265 ___E: ::fidl_next::fuchsia::HandleEncoder,
266 {
267 #[inline]
268 fn encode(
269 mut self,
270 encoder: &mut ___E,
271 out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentDiagnostics<'static>>,
272 _: (),
273 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
274 ::fidl_next::munge!(let crate::wire::ComponentDiagnostics { table } = out);
275
276 let max_ord = self.__max_ordinal();
277
278 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
279 ::fidl_next::Wire::zero_padding(&mut out);
280
281 let mut preallocated =
282 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
283
284 for i in 1..=max_ord {
285 match i {
286 1 => {
287 if let Some(value) = self.tasks.take() {
288 ::fidl_next::WireEnvelope::encode_value::<
289 crate::wire::ComponentTasks<'static>,
290 ___E,
291 >(
292 value, preallocated.encoder, &mut out, ()
293 )?;
294 } else {
295 ::fidl_next::WireEnvelope::encode_zero(&mut out)
296 }
297 }
298
299 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
300 }
301 unsafe {
302 preallocated.write_next(out.assume_init_ref());
303 }
304 }
305
306 ::fidl_next::WireTable::encode_len(table, max_ord);
307
308 Ok(())
309 }
310 }
311
312 impl<'de> ::fidl_next::FromWire<crate::wire::ComponentDiagnostics<'de>> for ComponentDiagnostics {
313 #[inline]
314 fn from_wire(wire_: crate::wire::ComponentDiagnostics<'de>) -> Self {
315 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
316
317 let tasks = wire_.table.get(1);
318
319 Self {
320 tasks: tasks.map(|envelope| {
321 ::fidl_next::FromWire::from_wire(unsafe {
322 envelope.read_unchecked::<crate::wire::ComponentTasks<'de>>()
323 })
324 }),
325 }
326 }
327 }
328
329 #[derive(PartialEq, Debug)]
330 pub struct ComponentControllerOnPublishDiagnosticsRequest {
331 pub payload: crate::natural::ComponentDiagnostics,
332 }
333
334 unsafe impl<___E>
335 ::fidl_next::Encode<
336 crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
337 ___E,
338 > for ComponentControllerOnPublishDiagnosticsRequest
339 where
340 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
341 ___E: ::fidl_next::Encoder,
342 ___E: ::fidl_next::fuchsia::HandleEncoder,
343 {
344 #[inline]
345 fn encode(
346 self,
347 encoder_: &mut ___E,
348 out_: &mut ::core::mem::MaybeUninit<
349 crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
350 >,
351 _: (),
352 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
353 ::fidl_next::munge! {
354 let crate::wire::ComponentControllerOnPublishDiagnosticsRequest {
355 payload,
356
357 } = out_;
358 }
359
360 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
361
362 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
363
364 Ok(())
365 }
366 }
367
368 unsafe impl<___E>
369 ::fidl_next::EncodeOption<
370 ::fidl_next::WireBox<
371 'static,
372 crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
373 >,
374 ___E,
375 > for ComponentControllerOnPublishDiagnosticsRequest
376 where
377 ___E: ::fidl_next::Encoder + ?Sized,
378 ComponentControllerOnPublishDiagnosticsRequest: ::fidl_next::Encode<
379 crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
380 ___E,
381 >,
382 {
383 #[inline]
384 fn encode_option(
385 this: ::core::option::Option<Self>,
386 encoder: &mut ___E,
387 out: &mut ::core::mem::MaybeUninit<
388 ::fidl_next::WireBox<
389 'static,
390 crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
391 >,
392 >,
393 _: (),
394 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
395 if let Some(inner) = this {
396 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
397 ::fidl_next::WireBox::encode_present(out);
398 } else {
399 ::fidl_next::WireBox::encode_absent(out);
400 }
401
402 Ok(())
403 }
404 }
405
406 impl<'de>
407 ::fidl_next::FromWire<crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>>
408 for ComponentControllerOnPublishDiagnosticsRequest
409 {
410 #[inline]
411 fn from_wire(
412 wire: crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'de>,
413 ) -> Self {
414 Self { payload: ::fidl_next::FromWire::from_wire(wire.payload) }
415 }
416 }
417
418 #[derive(PartialEq, Debug, Default)]
419 pub struct ComponentStopInfo {
420 pub termination_status: ::core::option::Option<i32>,
421
422 pub exit_code: ::core::option::Option<i64>,
423 }
424
425 impl ComponentStopInfo {
426 fn __max_ordinal(&self) -> usize {
427 if self.exit_code.is_some() {
428 return 2;
429 }
430
431 if self.termination_status.is_some() {
432 return 1;
433 }
434
435 0
436 }
437 }
438
439 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentStopInfo<'static>, ___E>
440 for ComponentStopInfo
441 where
442 ___E: ::fidl_next::Encoder + ?Sized,
443 ___E: ::fidl_next::fuchsia::HandleEncoder,
444 {
445 #[inline]
446 fn encode(
447 mut self,
448 encoder: &mut ___E,
449 out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentStopInfo<'static>>,
450 _: (),
451 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
452 ::fidl_next::munge!(let crate::wire::ComponentStopInfo { table } = out);
453
454 let max_ord = self.__max_ordinal();
455
456 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
457 ::fidl_next::Wire::zero_padding(&mut out);
458
459 let mut preallocated =
460 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
461
462 for i in 1..=max_ord {
463 match i {
464 2 => {
465 if let Some(value) = self.exit_code.take() {
466 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireI64, ___E>(
467 value,
468 preallocated.encoder,
469 &mut out,
470 (),
471 )?;
472 } else {
473 ::fidl_next::WireEnvelope::encode_zero(&mut out)
474 }
475 }
476
477 1 => {
478 if let Some(value) = self.termination_status.take() {
479 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireI32, ___E>(
480 value,
481 preallocated.encoder,
482 &mut out,
483 (),
484 )?;
485 } else {
486 ::fidl_next::WireEnvelope::encode_zero(&mut out)
487 }
488 }
489
490 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
491 }
492 unsafe {
493 preallocated.write_next(out.assume_init_ref());
494 }
495 }
496
497 ::fidl_next::WireTable::encode_len(table, max_ord);
498
499 Ok(())
500 }
501 }
502
503 impl<'de> ::fidl_next::FromWire<crate::wire::ComponentStopInfo<'de>> for ComponentStopInfo {
504 #[inline]
505 fn from_wire(wire_: crate::wire::ComponentStopInfo<'de>) -> Self {
506 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
507
508 let termination_status = wire_.table.get(1);
509
510 let exit_code = wire_.table.get(2);
511
512 Self {
513 termination_status: termination_status.map(|envelope| {
514 ::fidl_next::FromWire::from_wire(unsafe {
515 envelope.read_unchecked::<::fidl_next::WireI32>()
516 })
517 }),
518
519 exit_code: exit_code.map(|envelope| {
520 ::fidl_next::FromWire::from_wire(unsafe {
521 envelope.read_unchecked::<::fidl_next::WireI64>()
522 })
523 }),
524 }
525 }
526 }
527
528 #[derive(PartialEq, Debug, Default)]
529 pub struct ComponentControllerOnEscrowRequest {
530 pub outgoing_dir: ::core::option::Option<
531 ::fidl_next::ServerEnd<
532 ::fidl_next_fuchsia_io::Directory,
533 ::fidl_next::fuchsia::zx::Channel,
534 >,
535 >,
536
537 pub escrowed_dictionary:
538 ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
539 }
540
541 impl ComponentControllerOnEscrowRequest {
542 fn __max_ordinal(&self) -> usize {
543 if self.escrowed_dictionary.is_some() {
544 return 2;
545 }
546
547 if self.outgoing_dir.is_some() {
548 return 1;
549 }
550
551 0
552 }
553 }
554
555 unsafe impl<___E>
556 ::fidl_next::Encode<crate::wire::ComponentControllerOnEscrowRequest<'static>, ___E>
557 for ComponentControllerOnEscrowRequest
558 where
559 ___E: ::fidl_next::Encoder + ?Sized,
560 ___E: ::fidl_next::fuchsia::HandleEncoder,
561 {
562 #[inline]
563 fn encode(
564 mut self,
565 encoder: &mut ___E,
566 out: &mut ::core::mem::MaybeUninit<
567 crate::wire::ComponentControllerOnEscrowRequest<'static>,
568 >,
569 _: (),
570 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
571 ::fidl_next::munge!(let crate::wire::ComponentControllerOnEscrowRequest { table } = out);
572
573 let max_ord = self.__max_ordinal();
574
575 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
576 ::fidl_next::Wire::zero_padding(&mut out);
577
578 let mut preallocated =
579 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
580
581 for i in 1..=max_ord {
582 match i {
583 2 => {
584 if let Some(value) = self.escrowed_dictionary.take() {
585 ::fidl_next::WireEnvelope::encode_value::<
586 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
587 ___E,
588 >(
589 value, preallocated.encoder, &mut out, ()
590 )?;
591 } else {
592 ::fidl_next::WireEnvelope::encode_zero(&mut out)
593 }
594 }
595
596 1 => {
597 if let Some(value) = self.outgoing_dir.take() {
598 ::fidl_next::WireEnvelope::encode_value::<
599 ::fidl_next::ServerEnd<
600 ::fidl_next_fuchsia_io::Directory,
601 ::fidl_next::fuchsia::WireChannel,
602 >,
603 ___E,
604 >(
605 value, preallocated.encoder, &mut out, ()
606 )?;
607 } else {
608 ::fidl_next::WireEnvelope::encode_zero(&mut out)
609 }
610 }
611
612 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
613 }
614 unsafe {
615 preallocated.write_next(out.assume_init_ref());
616 }
617 }
618
619 ::fidl_next::WireTable::encode_len(table, max_ord);
620
621 Ok(())
622 }
623 }
624
625 impl<'de> ::fidl_next::FromWire<crate::wire::ComponentControllerOnEscrowRequest<'de>>
626 for ComponentControllerOnEscrowRequest
627 {
628 #[inline]
629 fn from_wire(wire_: crate::wire::ComponentControllerOnEscrowRequest<'de>) -> Self {
630 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
631
632 let outgoing_dir = wire_.table.get(1);
633
634 let escrowed_dictionary = wire_.table.get(2);
635
636 Self {
637
638
639 outgoing_dir: outgoing_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
640 unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::fuchsia::WireChannel>>() }
641 )),
642
643
644 escrowed_dictionary: escrowed_dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
645 unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
646 )),
647
648 }
649 }
650 }
651
652 #[doc = " A single component namespace entry, which describes a namespace mount point\n (`path`) and the directory backing it (`directory`). This type is usually\n composed inside a vector. See `ComponentStartInfo.ns` for more details.\n"]
653 #[derive(PartialEq, Debug, Default)]
654 pub struct ComponentNamespaceEntry {
655 pub path: ::core::option::Option<::std::string::String>,
656
657 pub directory: ::core::option::Option<
658 ::fidl_next::ClientEnd<
659 ::fidl_next_fuchsia_io::Directory,
660 ::fidl_next::fuchsia::zx::Channel,
661 >,
662 >,
663 }
664
665 impl ComponentNamespaceEntry {
666 fn __max_ordinal(&self) -> usize {
667 if self.directory.is_some() {
668 return 2;
669 }
670
671 if self.path.is_some() {
672 return 1;
673 }
674
675 0
676 }
677 }
678
679 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentNamespaceEntry<'static>, ___E>
680 for ComponentNamespaceEntry
681 where
682 ___E: ::fidl_next::Encoder + ?Sized,
683 ___E: ::fidl_next::fuchsia::HandleEncoder,
684 {
685 #[inline]
686 fn encode(
687 mut self,
688 encoder: &mut ___E,
689 out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentNamespaceEntry<'static>>,
690 _: (),
691 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
692 ::fidl_next::munge!(let crate::wire::ComponentNamespaceEntry { table } = out);
693
694 let max_ord = self.__max_ordinal();
695
696 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
697 ::fidl_next::Wire::zero_padding(&mut out);
698
699 let mut preallocated =
700 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
701
702 for i in 1..=max_ord {
703 match i {
704 2 => {
705 if let Some(value) = self.directory.take() {
706 ::fidl_next::WireEnvelope::encode_value::<
707 ::fidl_next::ClientEnd<
708 ::fidl_next_fuchsia_io::Directory,
709 ::fidl_next::fuchsia::WireChannel,
710 >,
711 ___E,
712 >(
713 value, preallocated.encoder, &mut out, ()
714 )?;
715 } else {
716 ::fidl_next::WireEnvelope::encode_zero(&mut out)
717 }
718 }
719
720 1 => {
721 if let Some(value) = self.path.take() {
722 ::fidl_next::WireEnvelope::encode_value::<
723 ::fidl_next::WireString<'static>,
724 ___E,
725 >(
726 value, preallocated.encoder, &mut out, 4095
727 )?;
728 } else {
729 ::fidl_next::WireEnvelope::encode_zero(&mut out)
730 }
731 }
732
733 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
734 }
735 unsafe {
736 preallocated.write_next(out.assume_init_ref());
737 }
738 }
739
740 ::fidl_next::WireTable::encode_len(table, max_ord);
741
742 Ok(())
743 }
744 }
745
746 impl<'de> ::fidl_next::FromWire<crate::wire::ComponentNamespaceEntry<'de>>
747 for ComponentNamespaceEntry
748 {
749 #[inline]
750 fn from_wire(wire_: crate::wire::ComponentNamespaceEntry<'de>) -> Self {
751 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
752
753 let path = wire_.table.get(1);
754
755 let directory = wire_.table.get(2);
756
757 Self {
758 path: path.map(|envelope| {
759 ::fidl_next::FromWire::from_wire(unsafe {
760 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
761 })
762 }),
763
764 directory: directory.map(|envelope| {
765 ::fidl_next::FromWire::from_wire(unsafe {
766 envelope.read_unchecked::<::fidl_next::ClientEnd<
767 ::fidl_next_fuchsia_io::Directory,
768 ::fidl_next::fuchsia::WireChannel,
769 >>()
770 })
771 }),
772 }
773 }
774 }
775
776 #[doc = " Parameters for starting a new component instance.\n"]
777 #[derive(PartialEq, Debug, Default)]
778 pub struct ComponentStartInfo {
779 pub resolved_url: ::core::option::Option<::std::string::String>,
780
781 pub program: ::core::option::Option<::fidl_next_fuchsia_data::natural::Dictionary>,
782
783 pub ns: ::core::option::Option<::std::vec::Vec<crate::natural::ComponentNamespaceEntry>>,
784
785 pub outgoing_dir: ::core::option::Option<
786 ::fidl_next::ServerEnd<
787 ::fidl_next_fuchsia_io::Directory,
788 ::fidl_next::fuchsia::zx::Channel,
789 >,
790 >,
791
792 pub runtime_dir: ::core::option::Option<
793 ::fidl_next::ServerEnd<
794 ::fidl_next_fuchsia_io::Directory,
795 ::fidl_next::fuchsia::zx::Channel,
796 >,
797 >,
798
799 pub numbered_handles: ::core::option::Option<
800 ::std::vec::Vec<::fidl_next_fuchsia_process::natural::HandleInfo>,
801 >,
802
803 pub encoded_config: ::core::option::Option<::fidl_next_fuchsia_mem::natural::Data>,
804
805 pub break_on_start: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
806
807 pub component_instance: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
808
809 pub escrowed_dictionary:
810 ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
811 }
812
813 impl ComponentStartInfo {
814 fn __max_ordinal(&self) -> usize {
815 if self.escrowed_dictionary.is_some() {
816 return 10;
817 }
818
819 if self.component_instance.is_some() {
820 return 9;
821 }
822
823 if self.break_on_start.is_some() {
824 return 8;
825 }
826
827 if self.encoded_config.is_some() {
828 return 7;
829 }
830
831 if self.numbered_handles.is_some() {
832 return 6;
833 }
834
835 if self.runtime_dir.is_some() {
836 return 5;
837 }
838
839 if self.outgoing_dir.is_some() {
840 return 4;
841 }
842
843 if self.ns.is_some() {
844 return 3;
845 }
846
847 if self.program.is_some() {
848 return 2;
849 }
850
851 if self.resolved_url.is_some() {
852 return 1;
853 }
854
855 0
856 }
857 }
858
859 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentStartInfo<'static>, ___E>
860 for ComponentStartInfo
861 where
862 ___E: ::fidl_next::Encoder + ?Sized,
863 ___E: ::fidl_next::fuchsia::HandleEncoder,
864 {
865 #[inline]
866 fn encode(
867 mut self,
868 encoder: &mut ___E,
869 out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentStartInfo<'static>>,
870 _: (),
871 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
872 ::fidl_next::munge!(let crate::wire::ComponentStartInfo { table } = out);
873
874 let max_ord = self.__max_ordinal();
875
876 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
877 ::fidl_next::Wire::zero_padding(&mut out);
878
879 let mut preallocated =
880 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
881
882 for i in 1..=max_ord {
883 match i {
884 10 => {
885 if let Some(value) = self.escrowed_dictionary.take() {
886 ::fidl_next::WireEnvelope::encode_value::<
887 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
888 ___E,
889 >(
890 value, preallocated.encoder, &mut out, ()
891 )?;
892 } else {
893 ::fidl_next::WireEnvelope::encode_zero(&mut out)
894 }
895 }
896
897 9 => {
898 if let Some(value) = self.component_instance.take() {
899 ::fidl_next::WireEnvelope::encode_value::<
900 ::fidl_next::fuchsia::WireEvent,
901 ___E,
902 >(
903 value, preallocated.encoder, &mut out, ()
904 )?;
905 } else {
906 ::fidl_next::WireEnvelope::encode_zero(&mut out)
907 }
908 }
909
910 8 => {
911 if let Some(value) = self.break_on_start.take() {
912 ::fidl_next::WireEnvelope::encode_value::<
913 ::fidl_next::fuchsia::WireEventPair,
914 ___E,
915 >(
916 value, preallocated.encoder, &mut out, ()
917 )?;
918 } else {
919 ::fidl_next::WireEnvelope::encode_zero(&mut out)
920 }
921 }
922
923 7 => {
924 if let Some(value) = self.encoded_config.take() {
925 ::fidl_next::WireEnvelope::encode_value::<
926 ::fidl_next_fuchsia_mem::wire::Data<'static>,
927 ___E,
928 >(
929 value, preallocated.encoder, &mut out, ()
930 )?;
931 } else {
932 ::fidl_next::WireEnvelope::encode_zero(&mut out)
933 }
934 }
935
936 6 => {
937 if let Some(value) = self.numbered_handles.take() {
938 ::fidl_next::WireEnvelope::encode_value::<
939 ::fidl_next::WireVector<
940 'static,
941 ::fidl_next_fuchsia_process::wire::HandleInfo,
942 >,
943 ___E,
944 >(
945 value, preallocated.encoder, &mut out, (128, ())
946 )?;
947 } else {
948 ::fidl_next::WireEnvelope::encode_zero(&mut out)
949 }
950 }
951
952 5 => {
953 if let Some(value) = self.runtime_dir.take() {
954 ::fidl_next::WireEnvelope::encode_value::<
955 ::fidl_next::ServerEnd<
956 ::fidl_next_fuchsia_io::Directory,
957 ::fidl_next::fuchsia::WireChannel,
958 >,
959 ___E,
960 >(
961 value, preallocated.encoder, &mut out, ()
962 )?;
963 } else {
964 ::fidl_next::WireEnvelope::encode_zero(&mut out)
965 }
966 }
967
968 4 => {
969 if let Some(value) = self.outgoing_dir.take() {
970 ::fidl_next::WireEnvelope::encode_value::<
971 ::fidl_next::ServerEnd<
972 ::fidl_next_fuchsia_io::Directory,
973 ::fidl_next::fuchsia::WireChannel,
974 >,
975 ___E,
976 >(
977 value, preallocated.encoder, &mut out, ()
978 )?;
979 } else {
980 ::fidl_next::WireEnvelope::encode_zero(&mut out)
981 }
982 }
983
984 3 => {
985 if let Some(value) = self.ns.take() {
986 ::fidl_next::WireEnvelope::encode_value::<
987 ::fidl_next::WireVector<
988 'static,
989 crate::wire::ComponentNamespaceEntry<'static>,
990 >,
991 ___E,
992 >(
993 value, preallocated.encoder, &mut out, (32, ())
994 )?;
995 } else {
996 ::fidl_next::WireEnvelope::encode_zero(&mut out)
997 }
998 }
999
1000 2 => {
1001 if let Some(value) = self.program.take() {
1002 ::fidl_next::WireEnvelope::encode_value::<
1003 ::fidl_next_fuchsia_data::wire::Dictionary<'static>,
1004 ___E,
1005 >(
1006 value, preallocated.encoder, &mut out, ()
1007 )?;
1008 } else {
1009 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1010 }
1011 }
1012
1013 1 => {
1014 if let Some(value) = self.resolved_url.take() {
1015 ::fidl_next::WireEnvelope::encode_value::<
1016 ::fidl_next::WireString<'static>,
1017 ___E,
1018 >(
1019 value, preallocated.encoder, &mut out, 4096
1020 )?;
1021 } else {
1022 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1023 }
1024 }
1025
1026 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1027 }
1028 unsafe {
1029 preallocated.write_next(out.assume_init_ref());
1030 }
1031 }
1032
1033 ::fidl_next::WireTable::encode_len(table, max_ord);
1034
1035 Ok(())
1036 }
1037 }
1038
1039 impl<'de> ::fidl_next::FromWire<crate::wire::ComponentStartInfo<'de>> for ComponentStartInfo {
1040 #[inline]
1041 fn from_wire(wire_: crate::wire::ComponentStartInfo<'de>) -> Self {
1042 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1043
1044 let resolved_url = wire_.table.get(1);
1045
1046 let program = wire_.table.get(2);
1047
1048 let ns = wire_.table.get(3);
1049
1050 let outgoing_dir = wire_.table.get(4);
1051
1052 let runtime_dir = wire_.table.get(5);
1053
1054 let numbered_handles = wire_.table.get(6);
1055
1056 let encoded_config = wire_.table.get(7);
1057
1058 let break_on_start = wire_.table.get(8);
1059
1060 let component_instance = wire_.table.get(9);
1061
1062 let escrowed_dictionary = wire_.table.get(10);
1063
1064 Self {
1065
1066
1067 resolved_url: resolved_url.map(|envelope| ::fidl_next::FromWire::from_wire(
1068 unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() }
1069 )),
1070
1071
1072 program: program.map(|envelope| ::fidl_next::FromWire::from_wire(
1073 unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>() }
1074 )),
1075
1076
1077 ns: ns.map(|envelope| ::fidl_next::FromWire::from_wire(
1078 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::ComponentNamespaceEntry<'de>>>() }
1079 )),
1080
1081
1082 outgoing_dir: outgoing_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
1083 unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::fuchsia::WireChannel>>() }
1084 )),
1085
1086
1087 runtime_dir: runtime_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
1088 unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::fuchsia::WireChannel>>() }
1089 )),
1090
1091
1092 numbered_handles: numbered_handles.map(|envelope| ::fidl_next::FromWire::from_wire(
1093 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>() }
1094 )),
1095
1096
1097 encoded_config: encoded_config.map(|envelope| ::fidl_next::FromWire::from_wire(
1098 unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_mem::wire::Data<'de>>() }
1099 )),
1100
1101
1102 break_on_start: break_on_start.map(|envelope| ::fidl_next::FromWire::from_wire(
1103 unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>() }
1104 )),
1105
1106
1107 component_instance: component_instance.map(|envelope| ::fidl_next::FromWire::from_wire(
1108 unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>() }
1109 )),
1110
1111
1112 escrowed_dictionary: escrowed_dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1113 unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
1114 )),
1115
1116 }
1117 }
1118 }
1119
1120 #[derive(PartialEq, Debug)]
1121 pub struct ComponentRunnerStartRequest {
1122 pub start_info: crate::natural::ComponentStartInfo,
1123
1124 pub controller:
1125 ::fidl_next::ServerEnd<crate::ComponentController, ::fidl_next::fuchsia::zx::Channel>,
1126 }
1127
1128 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>
1129 for ComponentRunnerStartRequest
1130 where
1131 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1132 ___E: ::fidl_next::Encoder,
1133 ___E: ::fidl_next::fuchsia::HandleEncoder,
1134 {
1135 #[inline]
1136 fn encode(
1137 self,
1138 encoder_: &mut ___E,
1139 out_: &mut ::core::mem::MaybeUninit<crate::wire::ComponentRunnerStartRequest<'static>>,
1140 _: (),
1141 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1142 ::fidl_next::munge! {
1143 let crate::wire::ComponentRunnerStartRequest {
1144 start_info,
1145 controller,
1146
1147 } = out_;
1148 }
1149
1150 ::fidl_next::Encode::encode(self.start_info, encoder_, start_info, ())?;
1151
1152 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_info.as_mut_ptr()) };
1153
1154 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1155
1156 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1157
1158 Ok(())
1159 }
1160 }
1161
1162 unsafe impl<___E>
1163 ::fidl_next::EncodeOption<
1164 ::fidl_next::WireBox<'static, crate::wire::ComponentRunnerStartRequest<'static>>,
1165 ___E,
1166 > for ComponentRunnerStartRequest
1167 where
1168 ___E: ::fidl_next::Encoder + ?Sized,
1169 ComponentRunnerStartRequest:
1170 ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>,
1171 {
1172 #[inline]
1173 fn encode_option(
1174 this: ::core::option::Option<Self>,
1175 encoder: &mut ___E,
1176 out: &mut ::core::mem::MaybeUninit<
1177 ::fidl_next::WireBox<'static, crate::wire::ComponentRunnerStartRequest<'static>>,
1178 >,
1179 _: (),
1180 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1181 if let Some(inner) = this {
1182 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1183 ::fidl_next::WireBox::encode_present(out);
1184 } else {
1185 ::fidl_next::WireBox::encode_absent(out);
1186 }
1187
1188 Ok(())
1189 }
1190 }
1191
1192 impl<'de> ::fidl_next::FromWire<crate::wire::ComponentRunnerStartRequest<'de>>
1193 for ComponentRunnerStartRequest
1194 {
1195 #[inline]
1196 fn from_wire(wire: crate::wire::ComponentRunnerStartRequest<'de>) -> Self {
1197 Self {
1198 start_info: ::fidl_next::FromWire::from_wire(wire.start_info),
1199
1200 controller: ::fidl_next::FromWire::from_wire(wire.controller),
1201 }
1202 }
1203 }
1204
1205 #[derive(PartialEq, Debug)]
1206 #[repr(C)]
1207 pub struct TaskProviderGetJobResponse {
1208 pub job: ::fidl_next::fuchsia::zx::Job,
1209 }
1210
1211 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>
1212 for TaskProviderGetJobResponse
1213 where
1214 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1215 ___E: ::fidl_next::fuchsia::HandleEncoder,
1216 {
1217 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1218 Self,
1219 crate::wire::TaskProviderGetJobResponse,
1220 > = unsafe {
1221 ::fidl_next::CopyOptimization::enable_if(
1222 true && <::fidl_next::fuchsia::zx::Job as ::fidl_next::Encode<
1223 ::fidl_next::fuchsia::WireJob,
1224 ___E,
1225 >>::COPY_OPTIMIZATION
1226 .is_enabled(),
1227 )
1228 };
1229
1230 #[inline]
1231 fn encode(
1232 self,
1233 encoder_: &mut ___E,
1234 out_: &mut ::core::mem::MaybeUninit<crate::wire::TaskProviderGetJobResponse>,
1235 _: (),
1236 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1237 ::fidl_next::munge! {
1238 let crate::wire::TaskProviderGetJobResponse {
1239 job,
1240
1241 } = out_;
1242 }
1243
1244 ::fidl_next::Encode::encode(self.job, encoder_, job, ())?;
1245
1246 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(job.as_mut_ptr()) };
1247
1248 Ok(())
1249 }
1250 }
1251
1252 unsafe impl<___E>
1253 ::fidl_next::EncodeOption<
1254 ::fidl_next::WireBox<'static, crate::wire::TaskProviderGetJobResponse>,
1255 ___E,
1256 > for TaskProviderGetJobResponse
1257 where
1258 ___E: ::fidl_next::Encoder + ?Sized,
1259 TaskProviderGetJobResponse:
1260 ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>,
1261 {
1262 #[inline]
1263 fn encode_option(
1264 this: ::core::option::Option<Self>,
1265 encoder: &mut ___E,
1266 out: &mut ::core::mem::MaybeUninit<
1267 ::fidl_next::WireBox<'static, crate::wire::TaskProviderGetJobResponse>,
1268 >,
1269 _: (),
1270 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1271 if let Some(inner) = this {
1272 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1273 ::fidl_next::WireBox::encode_present(out);
1274 } else {
1275 ::fidl_next::WireBox::encode_absent(out);
1276 }
1277
1278 Ok(())
1279 }
1280 }
1281
1282 impl ::fidl_next::FromWire<crate::wire::TaskProviderGetJobResponse> for TaskProviderGetJobResponse {
1283 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1284 crate::wire::TaskProviderGetJobResponse,
1285 Self,
1286 > = unsafe {
1287 ::fidl_next::CopyOptimization::enable_if(
1288 true && <::fidl_next::fuchsia::zx::Job as ::fidl_next::FromWire<
1289 ::fidl_next::fuchsia::WireJob,
1290 >>::COPY_OPTIMIZATION
1291 .is_enabled(),
1292 )
1293 };
1294
1295 #[inline]
1296 fn from_wire(wire: crate::wire::TaskProviderGetJobResponse) -> Self {
1297 Self { job: ::fidl_next::FromWire::from_wire(wire.job) }
1298 }
1299 }
1300}
1301
1302pub mod wire {
1303
1304 pub use fidl_next_common_fuchsia_component_runner::wire::*;
1305
1306 #[repr(transparent)]
1308 pub struct Task<'de> {
1309 pub(crate) raw: ::fidl_next::RawWireUnion,
1310 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
1311 }
1312
1313 impl<'de> Drop for Task<'de> {
1314 fn drop(&mut self) {
1315 match self.raw.ordinal() {
1316 1 => {
1317 let _ =
1318 unsafe { self.raw.get().read_unchecked::<::fidl_next::fuchsia::WireJob>() };
1319 }
1320
1321 2 => {
1322 let _ = unsafe {
1323 self.raw.get().read_unchecked::<::fidl_next::fuchsia::WireProcess>()
1324 };
1325 }
1326
1327 3 => {
1328 let _ = unsafe {
1329 self.raw.get().read_unchecked::<::fidl_next::fuchsia::WireThread>()
1330 };
1331 }
1332
1333 _ => (),
1334 }
1335 }
1336 }
1337
1338 unsafe impl ::fidl_next::Wire for Task<'static> {
1339 type Owned<'de> = Task<'de>;
1340
1341 #[inline]
1342 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1343 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
1344 ::fidl_next::RawWireUnion::zero_padding(raw);
1345 }
1346 }
1347
1348 pub mod task {
1349 pub enum Ref<'de> {
1350 Job(&'de ::fidl_next::fuchsia::WireJob),
1351
1352 Process(&'de ::fidl_next::fuchsia::WireProcess),
1353
1354 Thread(&'de ::fidl_next::fuchsia::WireThread),
1355
1356 UnknownOrdinal_(u64),
1357 }
1358 }
1359
1360 impl<'de> Task<'de> {
1361 pub fn as_ref(&self) -> crate::wire::task::Ref<'_> {
1362 match self.raw.ordinal() {
1363 1 => crate::wire::task::Ref::Job(unsafe {
1364 self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireJob>()
1365 }),
1366
1367 2 => crate::wire::task::Ref::Process(unsafe {
1368 self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireProcess>()
1369 }),
1370
1371 3 => crate::wire::task::Ref::Thread(unsafe {
1372 self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireThread>()
1373 }),
1374
1375 unknown => crate::wire::task::Ref::UnknownOrdinal_(unknown),
1376 }
1377 }
1378 }
1379
1380 unsafe impl<___D> ::fidl_next::Decode<___D> for Task<'static>
1381 where
1382 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1383 ___D: ::fidl_next::Decoder,
1384 ___D: ::fidl_next::fuchsia::HandleDecoder,
1385 {
1386 fn decode(
1387 mut slot: ::fidl_next::Slot<'_, Self>,
1388 decoder: &mut ___D,
1389 _: (),
1390 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1391 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
1392 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1393 1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireJob>(
1394 raw,
1395 decoder,
1396 (),
1397 )?,
1398
1399 2 => {
1400 ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireProcess>(
1401 raw,
1402 decoder,
1403 (),
1404 )?
1405 }
1406
1407 3 => {
1408 ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireThread>(
1409 raw,
1410 decoder,
1411 (),
1412 )?
1413 }
1414
1415 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
1416 }
1417
1418 Ok(())
1419 }
1420 }
1421
1422 impl<'de> ::core::fmt::Debug for Task<'de> {
1423 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1424 match self.raw.ordinal() {
1425 1 => unsafe {
1426 self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireJob>().fmt(f)
1427 },
1428 2 => unsafe {
1429 self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireProcess>().fmt(f)
1430 },
1431 3 => unsafe {
1432 self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireThread>().fmt(f)
1433 },
1434 _ => unsafe { ::core::hint::unreachable_unchecked() },
1435 }
1436 }
1437 }
1438
1439 impl<'de> ::fidl_next::IntoNatural for Task<'de> {
1440 type Natural = crate::natural::Task;
1441 }
1442
1443 impl ::fidl_next::Unconstrained for Task<'static> {}
1444
1445 #[repr(C)]
1447 pub struct ComponentTasks<'de> {
1448 pub(crate) table: ::fidl_next::WireTable<'de>,
1449 }
1450
1451 impl<'de> Drop for ComponentTasks<'de> {
1452 fn drop(&mut self) {
1453 let _ = self
1454 .table
1455 .get(1)
1456 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Task<'de>>() });
1457
1458 let _ = self
1459 .table
1460 .get(2)
1461 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Task<'de>>() });
1462 }
1463 }
1464
1465 unsafe impl ::fidl_next::Wire for ComponentTasks<'static> {
1466 type Owned<'de> = ComponentTasks<'de>;
1467
1468 #[inline]
1469 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1470 ::fidl_next::munge!(let Self { table } = out);
1471 ::fidl_next::WireTable::zero_padding(table);
1472 }
1473 }
1474
1475 unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentTasks<'static>
1476 where
1477 ___D: ::fidl_next::Decoder + ?Sized,
1478 ___D: ::fidl_next::fuchsia::HandleDecoder,
1479 {
1480 fn decode(
1481 slot: ::fidl_next::Slot<'_, Self>,
1482 decoder: &mut ___D,
1483 _: (),
1484 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1485 ::fidl_next::munge!(let Self { table } = slot);
1486
1487 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1488 match ordinal {
1489 0 => unsafe { ::core::hint::unreachable_unchecked() },
1490
1491 1 => {
1492 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::Task<'static>>(
1493 slot.as_mut(),
1494 decoder,
1495 (),
1496 )?;
1497
1498 Ok(())
1499 }
1500
1501 2 => {
1502 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::Task<'static>>(
1503 slot.as_mut(),
1504 decoder,
1505 (),
1506 )?;
1507
1508 Ok(())
1509 }
1510
1511 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1512 }
1513 })
1514 }
1515 }
1516
1517 impl<'de> ComponentTasks<'de> {
1518 pub fn component_task(&self) -> ::core::option::Option<&crate::wire::Task<'de>> {
1519 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1520 }
1521
1522 pub fn parent_task(&self) -> ::core::option::Option<&crate::wire::Task<'de>> {
1523 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1524 }
1525 }
1526
1527 impl<'de> ::core::fmt::Debug for ComponentTasks<'de> {
1528 fn fmt(
1529 &self,
1530 f: &mut ::core::fmt::Formatter<'_>,
1531 ) -> ::core::result::Result<(), ::core::fmt::Error> {
1532 f.debug_struct("ComponentTasks")
1533 .field("component_task", &self.component_task())
1534 .field("parent_task", &self.parent_task())
1535 .finish()
1536 }
1537 }
1538
1539 impl<'de> ::fidl_next::IntoNatural for ComponentTasks<'de> {
1540 type Natural = crate::natural::ComponentTasks;
1541 }
1542
1543 impl ::fidl_next::Unconstrained for ComponentTasks<'_> {}
1544
1545 #[repr(C)]
1547 pub struct ComponentDiagnostics<'de> {
1548 pub(crate) table: ::fidl_next::WireTable<'de>,
1549 }
1550
1551 impl<'de> Drop for ComponentDiagnostics<'de> {
1552 fn drop(&mut self) {
1553 let _ = self.table.get(1).map(|envelope| unsafe {
1554 envelope.read_unchecked::<crate::wire::ComponentTasks<'de>>()
1555 });
1556 }
1557 }
1558
1559 unsafe impl ::fidl_next::Wire for ComponentDiagnostics<'static> {
1560 type Owned<'de> = ComponentDiagnostics<'de>;
1561
1562 #[inline]
1563 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1564 ::fidl_next::munge!(let Self { table } = out);
1565 ::fidl_next::WireTable::zero_padding(table);
1566 }
1567 }
1568
1569 unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentDiagnostics<'static>
1570 where
1571 ___D: ::fidl_next::Decoder + ?Sized,
1572 ___D: ::fidl_next::fuchsia::HandleDecoder,
1573 {
1574 fn decode(
1575 slot: ::fidl_next::Slot<'_, Self>,
1576 decoder: &mut ___D,
1577 _: (),
1578 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1579 ::fidl_next::munge!(let Self { table } = slot);
1580
1581 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1582 match ordinal {
1583 0 => unsafe { ::core::hint::unreachable_unchecked() },
1584
1585 1 => {
1586 ::fidl_next::WireEnvelope::decode_as::<
1587 ___D,
1588 crate::wire::ComponentTasks<'static>,
1589 >(slot.as_mut(), decoder, ())?;
1590
1591 Ok(())
1592 }
1593
1594 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1595 }
1596 })
1597 }
1598 }
1599
1600 impl<'de> ComponentDiagnostics<'de> {
1601 pub fn tasks(&self) -> ::core::option::Option<&crate::wire::ComponentTasks<'de>> {
1602 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1603 }
1604 }
1605
1606 impl<'de> ::core::fmt::Debug for ComponentDiagnostics<'de> {
1607 fn fmt(
1608 &self,
1609 f: &mut ::core::fmt::Formatter<'_>,
1610 ) -> ::core::result::Result<(), ::core::fmt::Error> {
1611 f.debug_struct("ComponentDiagnostics").field("tasks", &self.tasks()).finish()
1612 }
1613 }
1614
1615 impl<'de> ::fidl_next::IntoNatural for ComponentDiagnostics<'de> {
1616 type Natural = crate::natural::ComponentDiagnostics;
1617 }
1618
1619 impl ::fidl_next::Unconstrained for ComponentDiagnostics<'_> {}
1620
1621 #[derive(Debug)]
1623 #[repr(C)]
1624 pub struct ComponentControllerOnPublishDiagnosticsRequest<'de> {
1625 pub payload: crate::wire::ComponentDiagnostics<'de>,
1626 }
1627
1628 static_assertions::const_assert_eq!(
1629 std::mem::size_of::<ComponentControllerOnPublishDiagnosticsRequest<'_>>(),
1630 16
1631 );
1632 static_assertions::const_assert_eq!(
1633 std::mem::align_of::<ComponentControllerOnPublishDiagnosticsRequest<'_>>(),
1634 8
1635 );
1636
1637 static_assertions::const_assert_eq!(
1638 std::mem::offset_of!(ComponentControllerOnPublishDiagnosticsRequest<'_>, payload),
1639 0
1640 );
1641
1642 unsafe impl ::fidl_next::Wire for ComponentControllerOnPublishDiagnosticsRequest<'static> {
1643 type Owned<'de> = ComponentControllerOnPublishDiagnosticsRequest<'de>;
1644
1645 #[inline]
1646 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1647 ::fidl_next::munge! {
1648 let Self {
1649
1650 payload,
1651
1652 } = &mut *out_;
1653 }
1654
1655 ::fidl_next::Wire::zero_padding(payload);
1656 }
1657 }
1658
1659 unsafe impl<___D> ::fidl_next::Decode<___D>
1660 for ComponentControllerOnPublishDiagnosticsRequest<'static>
1661 where
1662 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1663 ___D: ::fidl_next::Decoder,
1664 ___D: ::fidl_next::fuchsia::HandleDecoder,
1665 {
1666 fn decode(
1667 slot_: ::fidl_next::Slot<'_, Self>,
1668 decoder_: &mut ___D,
1669 _: (),
1670 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1671 ::fidl_next::munge! {
1672 let Self {
1673
1674 mut payload,
1675
1676 } = slot_;
1677 }
1678
1679 let _field = payload.as_mut();
1680
1681 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
1682
1683 Ok(())
1684 }
1685 }
1686
1687 impl<'de> ::fidl_next::IntoNatural for ComponentControllerOnPublishDiagnosticsRequest<'de> {
1688 type Natural = crate::natural::ComponentControllerOnPublishDiagnosticsRequest;
1689 }
1690
1691 impl ::fidl_next::Unconstrained for ComponentControllerOnPublishDiagnosticsRequest<'static> {}
1692
1693 #[repr(C)]
1695 pub struct ComponentStopInfo<'de> {
1696 pub(crate) table: ::fidl_next::WireTable<'de>,
1697 }
1698
1699 impl<'de> Drop for ComponentStopInfo<'de> {
1700 fn drop(&mut self) {
1701 let _ = self
1702 .table
1703 .get(1)
1704 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
1705
1706 let _ = self
1707 .table
1708 .get(2)
1709 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI64>() });
1710 }
1711 }
1712
1713 unsafe impl ::fidl_next::Wire for ComponentStopInfo<'static> {
1714 type Owned<'de> = ComponentStopInfo<'de>;
1715
1716 #[inline]
1717 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1718 ::fidl_next::munge!(let Self { table } = out);
1719 ::fidl_next::WireTable::zero_padding(table);
1720 }
1721 }
1722
1723 unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentStopInfo<'static>
1724 where
1725 ___D: ::fidl_next::Decoder + ?Sized,
1726 ___D: ::fidl_next::fuchsia::HandleDecoder,
1727 {
1728 fn decode(
1729 slot: ::fidl_next::Slot<'_, Self>,
1730 decoder: &mut ___D,
1731 _: (),
1732 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1733 ::fidl_next::munge!(let Self { table } = slot);
1734
1735 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1736 match ordinal {
1737 0 => unsafe { ::core::hint::unreachable_unchecked() },
1738
1739 1 => {
1740 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
1741 slot.as_mut(),
1742 decoder,
1743 (),
1744 )?;
1745
1746 Ok(())
1747 }
1748
1749 2 => {
1750 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI64>(
1751 slot.as_mut(),
1752 decoder,
1753 (),
1754 )?;
1755
1756 Ok(())
1757 }
1758
1759 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1760 }
1761 })
1762 }
1763 }
1764
1765 impl<'de> ComponentStopInfo<'de> {
1766 pub fn termination_status(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
1767 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1768 }
1769
1770 pub fn exit_code(&self) -> ::core::option::Option<&::fidl_next::WireI64> {
1771 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1772 }
1773 }
1774
1775 impl<'de> ::core::fmt::Debug for ComponentStopInfo<'de> {
1776 fn fmt(
1777 &self,
1778 f: &mut ::core::fmt::Formatter<'_>,
1779 ) -> ::core::result::Result<(), ::core::fmt::Error> {
1780 f.debug_struct("ComponentStopInfo")
1781 .field("termination_status", &self.termination_status())
1782 .field("exit_code", &self.exit_code())
1783 .finish()
1784 }
1785 }
1786
1787 impl<'de> ::fidl_next::IntoNatural for ComponentStopInfo<'de> {
1788 type Natural = crate::natural::ComponentStopInfo;
1789 }
1790
1791 impl ::fidl_next::Unconstrained for ComponentStopInfo<'_> {}
1792
1793 #[repr(C)]
1795 pub struct ComponentControllerOnEscrowRequest<'de> {
1796 pub(crate) table: ::fidl_next::WireTable<'de>,
1797 }
1798
1799 impl<'de> Drop for ComponentControllerOnEscrowRequest<'de> {
1800 fn drop(&mut self) {
1801 let _ = self.table.get(1).map(|envelope| unsafe {
1802 envelope.read_unchecked::<::fidl_next::ServerEnd<
1803 ::fidl_next_fuchsia_io::Directory,
1804 ::fidl_next::fuchsia::WireChannel,
1805 >>()
1806 });
1807
1808 let _ = self.table.get(2)
1809 .map(|envelope| unsafe {
1810 envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
1811 });
1812 }
1813 }
1814
1815 unsafe impl ::fidl_next::Wire for ComponentControllerOnEscrowRequest<'static> {
1816 type Owned<'de> = ComponentControllerOnEscrowRequest<'de>;
1817
1818 #[inline]
1819 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1820 ::fidl_next::munge!(let Self { table } = out);
1821 ::fidl_next::WireTable::zero_padding(table);
1822 }
1823 }
1824
1825 unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentControllerOnEscrowRequest<'static>
1826 where
1827 ___D: ::fidl_next::Decoder + ?Sized,
1828 ___D: ::fidl_next::fuchsia::HandleDecoder,
1829 {
1830 fn decode(
1831 slot: ::fidl_next::Slot<'_, Self>,
1832 decoder: &mut ___D,
1833 _: (),
1834 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1835 ::fidl_next::munge!(let Self { table } = slot);
1836
1837 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1838 match ordinal {
1839 0 => unsafe { ::core::hint::unreachable_unchecked() },
1840
1841 1 => {
1842 ::fidl_next::WireEnvelope::decode_as::<
1843 ___D,
1844 ::fidl_next::ServerEnd<
1845 ::fidl_next_fuchsia_io::Directory,
1846 ::fidl_next::fuchsia::WireChannel,
1847 >,
1848 >(slot.as_mut(), decoder, ())?;
1849
1850 Ok(())
1851 }
1852
1853 2 => {
1854 ::fidl_next::WireEnvelope::decode_as::<
1855 ___D,
1856 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
1857 >(slot.as_mut(), decoder, ())?;
1858
1859 Ok(())
1860 }
1861
1862 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1863 }
1864 })
1865 }
1866 }
1867
1868 impl<'de> ComponentControllerOnEscrowRequest<'de> {
1869 pub fn outgoing_dir(
1870 &self,
1871 ) -> ::core::option::Option<
1872 &::fidl_next::ServerEnd<
1873 ::fidl_next_fuchsia_io::Directory,
1874 ::fidl_next::fuchsia::WireChannel,
1875 >,
1876 > {
1877 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1878 }
1879
1880 pub fn escrowed_dictionary(
1881 &self,
1882 ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
1883 {
1884 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1885 }
1886 }
1887
1888 impl<'de> ::core::fmt::Debug for ComponentControllerOnEscrowRequest<'de> {
1889 fn fmt(
1890 &self,
1891 f: &mut ::core::fmt::Formatter<'_>,
1892 ) -> ::core::result::Result<(), ::core::fmt::Error> {
1893 f.debug_struct("ComponentControllerOnEscrowRequest")
1894 .field("outgoing_dir", &self.outgoing_dir())
1895 .field("escrowed_dictionary", &self.escrowed_dictionary())
1896 .finish()
1897 }
1898 }
1899
1900 impl<'de> ::fidl_next::IntoNatural for ComponentControllerOnEscrowRequest<'de> {
1901 type Natural = crate::natural::ComponentControllerOnEscrowRequest;
1902 }
1903
1904 impl ::fidl_next::Unconstrained for ComponentControllerOnEscrowRequest<'_> {}
1905
1906 #[repr(C)]
1908 pub struct ComponentNamespaceEntry<'de> {
1909 pub(crate) table: ::fidl_next::WireTable<'de>,
1910 }
1911
1912 impl<'de> Drop for ComponentNamespaceEntry<'de> {
1913 fn drop(&mut self) {
1914 let _ = self.table.get(1).map(|envelope| unsafe {
1915 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1916 });
1917
1918 let _ = self.table.get(2).map(|envelope| unsafe {
1919 envelope.read_unchecked::<::fidl_next::ClientEnd<
1920 ::fidl_next_fuchsia_io::Directory,
1921 ::fidl_next::fuchsia::WireChannel,
1922 >>()
1923 });
1924 }
1925 }
1926
1927 unsafe impl ::fidl_next::Wire for ComponentNamespaceEntry<'static> {
1928 type Owned<'de> = ComponentNamespaceEntry<'de>;
1929
1930 #[inline]
1931 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1932 ::fidl_next::munge!(let Self { table } = out);
1933 ::fidl_next::WireTable::zero_padding(table);
1934 }
1935 }
1936
1937 unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentNamespaceEntry<'static>
1938 where
1939 ___D: ::fidl_next::Decoder + ?Sized,
1940 ___D: ::fidl_next::fuchsia::HandleDecoder,
1941 {
1942 fn decode(
1943 slot: ::fidl_next::Slot<'_, Self>,
1944 decoder: &mut ___D,
1945 _: (),
1946 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1947 ::fidl_next::munge!(let Self { table } = slot);
1948
1949 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1950 match ordinal {
1951 0 => unsafe { ::core::hint::unreachable_unchecked() },
1952
1953 1 => {
1954 ::fidl_next::WireEnvelope::decode_as::<
1955 ___D,
1956 ::fidl_next::WireString<'static>,
1957 >(slot.as_mut(), decoder, 4095)?;
1958
1959 let value = unsafe {
1960 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
1961 };
1962
1963 if value.len() > 4095 {
1964 return Err(::fidl_next::DecodeError::VectorTooLong {
1965 size: value.len() as u64,
1966 limit: 4095,
1967 });
1968 }
1969
1970 Ok(())
1971 }
1972
1973 2 => {
1974 ::fidl_next::WireEnvelope::decode_as::<
1975 ___D,
1976 ::fidl_next::ClientEnd<
1977 ::fidl_next_fuchsia_io::Directory,
1978 ::fidl_next::fuchsia::WireChannel,
1979 >,
1980 >(slot.as_mut(), decoder, ())?;
1981
1982 Ok(())
1983 }
1984
1985 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1986 }
1987 })
1988 }
1989 }
1990
1991 impl<'de> ComponentNamespaceEntry<'de> {
1992 pub fn path(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
1993 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1994 }
1995
1996 pub fn directory(
1997 &self,
1998 ) -> ::core::option::Option<
1999 &::fidl_next::ClientEnd<
2000 ::fidl_next_fuchsia_io::Directory,
2001 ::fidl_next::fuchsia::WireChannel,
2002 >,
2003 > {
2004 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2005 }
2006 }
2007
2008 impl<'de> ::core::fmt::Debug for ComponentNamespaceEntry<'de> {
2009 fn fmt(
2010 &self,
2011 f: &mut ::core::fmt::Formatter<'_>,
2012 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2013 f.debug_struct("ComponentNamespaceEntry")
2014 .field("path", &self.path())
2015 .field("directory", &self.directory())
2016 .finish()
2017 }
2018 }
2019
2020 impl<'de> ::fidl_next::IntoNatural for ComponentNamespaceEntry<'de> {
2021 type Natural = crate::natural::ComponentNamespaceEntry;
2022 }
2023
2024 impl ::fidl_next::Unconstrained for ComponentNamespaceEntry<'_> {}
2025
2026 #[repr(C)]
2028 pub struct ComponentStartInfo<'de> {
2029 pub(crate) table: ::fidl_next::WireTable<'de>,
2030 }
2031
2032 impl<'de> Drop for ComponentStartInfo<'de> {
2033 fn drop(&mut self) {
2034 let _ = self.table.get(1).map(|envelope| unsafe {
2035 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
2036 });
2037
2038 let _ = self.table.get(2).map(|envelope| unsafe {
2039 envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>()
2040 });
2041
2042 let _ = self.table.get(3)
2043 .map(|envelope| unsafe {
2044 envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::ComponentNamespaceEntry<'de>>>()
2045 });
2046
2047 let _ = self.table.get(4).map(|envelope| unsafe {
2048 envelope.read_unchecked::<::fidl_next::ServerEnd<
2049 ::fidl_next_fuchsia_io::Directory,
2050 ::fidl_next::fuchsia::WireChannel,
2051 >>()
2052 });
2053
2054 let _ = self.table.get(5).map(|envelope| unsafe {
2055 envelope.read_unchecked::<::fidl_next::ServerEnd<
2056 ::fidl_next_fuchsia_io::Directory,
2057 ::fidl_next::fuchsia::WireChannel,
2058 >>()
2059 });
2060
2061 let _ = self.table.get(6)
2062 .map(|envelope| unsafe {
2063 envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>()
2064 });
2065
2066 let _ = self.table.get(7).map(|envelope| unsafe {
2067 envelope.read_unchecked::<::fidl_next_fuchsia_mem::wire::Data<'de>>()
2068 });
2069
2070 let _ = self.table.get(8).map(|envelope| unsafe {
2071 envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
2072 });
2073
2074 let _ = self.table.get(9).map(|envelope| unsafe {
2075 envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
2076 });
2077
2078 let _ = self.table.get(10)
2079 .map(|envelope| unsafe {
2080 envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
2081 });
2082 }
2083 }
2084
2085 unsafe impl ::fidl_next::Wire for ComponentStartInfo<'static> {
2086 type Owned<'de> = ComponentStartInfo<'de>;
2087
2088 #[inline]
2089 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2090 ::fidl_next::munge!(let Self { table } = out);
2091 ::fidl_next::WireTable::zero_padding(table);
2092 }
2093 }
2094
2095 unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentStartInfo<'static>
2096 where
2097 ___D: ::fidl_next::Decoder + ?Sized,
2098 ___D: ::fidl_next::fuchsia::HandleDecoder,
2099 {
2100 fn decode(
2101 slot: ::fidl_next::Slot<'_, Self>,
2102 decoder: &mut ___D,
2103 _: (),
2104 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2105 ::fidl_next::munge!(let Self { table } = slot);
2106
2107 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2108 match ordinal {
2109 0 => unsafe { ::core::hint::unreachable_unchecked() },
2110
2111 1 => {
2112 ::fidl_next::WireEnvelope::decode_as::<
2113 ___D,
2114 ::fidl_next::WireString<'static>,
2115 >(slot.as_mut(), decoder, 4096)?;
2116
2117 let value = unsafe {
2118 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
2119 };
2120
2121 if value.len() > 4096 {
2122 return Err(::fidl_next::DecodeError::VectorTooLong {
2123 size: value.len() as u64,
2124 limit: 4096,
2125 });
2126 }
2127
2128 Ok(())
2129 }
2130
2131 2 => {
2132 ::fidl_next::WireEnvelope::decode_as::<
2133 ___D,
2134 ::fidl_next_fuchsia_data::wire::Dictionary<'static>,
2135 >(slot.as_mut(), decoder, ())?;
2136
2137 Ok(())
2138 }
2139
2140 3 => {
2141 ::fidl_next::WireEnvelope::decode_as::<
2142 ___D,
2143 ::fidl_next::WireVector<
2144 'static,
2145 crate::wire::ComponentNamespaceEntry<'static>,
2146 >,
2147 >(slot.as_mut(), decoder, (32, ()))?;
2148
2149 let value = unsafe {
2150 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
2151 '_,
2152 crate::wire::ComponentNamespaceEntry<'_>,
2153 >>()
2154 };
2155
2156 if value.len() > 32 {
2157 return Err(::fidl_next::DecodeError::VectorTooLong {
2158 size: value.len() as u64,
2159 limit: 32,
2160 });
2161 }
2162
2163 Ok(())
2164 }
2165
2166 4 => {
2167 ::fidl_next::WireEnvelope::decode_as::<
2168 ___D,
2169 ::fidl_next::ServerEnd<
2170 ::fidl_next_fuchsia_io::Directory,
2171 ::fidl_next::fuchsia::WireChannel,
2172 >,
2173 >(slot.as_mut(), decoder, ())?;
2174
2175 Ok(())
2176 }
2177
2178 5 => {
2179 ::fidl_next::WireEnvelope::decode_as::<
2180 ___D,
2181 ::fidl_next::ServerEnd<
2182 ::fidl_next_fuchsia_io::Directory,
2183 ::fidl_next::fuchsia::WireChannel,
2184 >,
2185 >(slot.as_mut(), decoder, ())?;
2186
2187 Ok(())
2188 }
2189
2190 6 => {
2191 ::fidl_next::WireEnvelope::decode_as::<
2192 ___D,
2193 ::fidl_next::WireVector<
2194 'static,
2195 ::fidl_next_fuchsia_process::wire::HandleInfo,
2196 >,
2197 >(slot.as_mut(), decoder, (128, ()))?;
2198
2199 let value = unsafe {
2200 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
2201 '_,
2202 ::fidl_next_fuchsia_process::wire::HandleInfo,
2203 >>()
2204 };
2205
2206 if value.len() > 128 {
2207 return Err(::fidl_next::DecodeError::VectorTooLong {
2208 size: value.len() as u64,
2209 limit: 128,
2210 });
2211 }
2212
2213 Ok(())
2214 }
2215
2216 7 => {
2217 ::fidl_next::WireEnvelope::decode_as::<
2218 ___D,
2219 ::fidl_next_fuchsia_mem::wire::Data<'static>,
2220 >(slot.as_mut(), decoder, ())?;
2221
2222 Ok(())
2223 }
2224
2225 8 => {
2226 ::fidl_next::WireEnvelope::decode_as::<
2227 ___D,
2228 ::fidl_next::fuchsia::WireEventPair,
2229 >(slot.as_mut(), decoder, ())?;
2230
2231 Ok(())
2232 }
2233
2234 9 => {
2235 ::fidl_next::WireEnvelope::decode_as::<
2236 ___D,
2237 ::fidl_next::fuchsia::WireEvent,
2238 >(slot.as_mut(), decoder, ())?;
2239
2240 Ok(())
2241 }
2242
2243 10 => {
2244 ::fidl_next::WireEnvelope::decode_as::<
2245 ___D,
2246 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
2247 >(slot.as_mut(), decoder, ())?;
2248
2249 Ok(())
2250 }
2251
2252 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2253 }
2254 })
2255 }
2256 }
2257
2258 impl<'de> ComponentStartInfo<'de> {
2259 pub fn resolved_url(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
2260 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2261 }
2262
2263 pub fn program(
2264 &self,
2265 ) -> ::core::option::Option<&::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2266 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2267 }
2268
2269 pub fn ns(
2270 &self,
2271 ) -> ::core::option::Option<
2272 &::fidl_next::WireVector<'de, crate::wire::ComponentNamespaceEntry<'de>>,
2273 > {
2274 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2275 }
2276
2277 pub fn outgoing_dir(
2278 &self,
2279 ) -> ::core::option::Option<
2280 &::fidl_next::ServerEnd<
2281 ::fidl_next_fuchsia_io::Directory,
2282 ::fidl_next::fuchsia::WireChannel,
2283 >,
2284 > {
2285 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2286 }
2287
2288 pub fn runtime_dir(
2289 &self,
2290 ) -> ::core::option::Option<
2291 &::fidl_next::ServerEnd<
2292 ::fidl_next_fuchsia_io::Directory,
2293 ::fidl_next::fuchsia::WireChannel,
2294 >,
2295 > {
2296 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2297 }
2298
2299 pub fn numbered_handles(
2300 &self,
2301 ) -> ::core::option::Option<
2302 &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
2303 > {
2304 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2305 }
2306
2307 pub fn encoded_config(
2308 &self,
2309 ) -> ::core::option::Option<&::fidl_next_fuchsia_mem::wire::Data<'de>> {
2310 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
2311 }
2312
2313 pub fn break_on_start(
2314 &self,
2315 ) -> ::core::option::Option<&::fidl_next::fuchsia::WireEventPair> {
2316 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
2317 }
2318
2319 pub fn component_instance(
2320 &self,
2321 ) -> ::core::option::Option<&::fidl_next::fuchsia::WireEvent> {
2322 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
2323 }
2324
2325 pub fn escrowed_dictionary(
2326 &self,
2327 ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
2328 {
2329 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
2330 }
2331 }
2332
2333 impl<'de> ::core::fmt::Debug for ComponentStartInfo<'de> {
2334 fn fmt(
2335 &self,
2336 f: &mut ::core::fmt::Formatter<'_>,
2337 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2338 f.debug_struct("ComponentStartInfo")
2339 .field("resolved_url", &self.resolved_url())
2340 .field("program", &self.program())
2341 .field("ns", &self.ns())
2342 .field("outgoing_dir", &self.outgoing_dir())
2343 .field("runtime_dir", &self.runtime_dir())
2344 .field("numbered_handles", &self.numbered_handles())
2345 .field("encoded_config", &self.encoded_config())
2346 .field("break_on_start", &self.break_on_start())
2347 .field("component_instance", &self.component_instance())
2348 .field("escrowed_dictionary", &self.escrowed_dictionary())
2349 .finish()
2350 }
2351 }
2352
2353 impl<'de> ::fidl_next::IntoNatural for ComponentStartInfo<'de> {
2354 type Natural = crate::natural::ComponentStartInfo;
2355 }
2356
2357 impl ::fidl_next::Unconstrained for ComponentStartInfo<'_> {}
2358
2359 #[derive(Debug)]
2361 #[repr(C)]
2362 pub struct ComponentRunnerStartRequest<'de> {
2363 pub start_info: crate::wire::ComponentStartInfo<'de>,
2364
2365 pub controller:
2366 ::fidl_next::ServerEnd<crate::ComponentController, ::fidl_next::fuchsia::WireChannel>,
2367 }
2368
2369 static_assertions::const_assert_eq!(std::mem::size_of::<ComponentRunnerStartRequest<'_>>(), 24);
2370 static_assertions::const_assert_eq!(std::mem::align_of::<ComponentRunnerStartRequest<'_>>(), 8);
2371
2372 static_assertions::const_assert_eq!(
2373 std::mem::offset_of!(ComponentRunnerStartRequest<'_>, start_info),
2374 0
2375 );
2376
2377 static_assertions::const_assert_eq!(
2378 std::mem::offset_of!(ComponentRunnerStartRequest<'_>, controller),
2379 16
2380 );
2381
2382 unsafe impl ::fidl_next::Wire for ComponentRunnerStartRequest<'static> {
2383 type Owned<'de> = ComponentRunnerStartRequest<'de>;
2384
2385 #[inline]
2386 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2387 ::fidl_next::munge! {
2388 let Self {
2389
2390 start_info,
2391 controller,
2392
2393 } = &mut *out_;
2394 }
2395
2396 ::fidl_next::Wire::zero_padding(start_info);
2397
2398 ::fidl_next::Wire::zero_padding(controller);
2399
2400 unsafe {
2401 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2402 }
2403 }
2404 }
2405
2406 unsafe impl<___D> ::fidl_next::Decode<___D> for ComponentRunnerStartRequest<'static>
2407 where
2408 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2409 ___D: ::fidl_next::Decoder,
2410 ___D: ::fidl_next::fuchsia::HandleDecoder,
2411 {
2412 fn decode(
2413 slot_: ::fidl_next::Slot<'_, Self>,
2414 decoder_: &mut ___D,
2415 _: (),
2416 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2417 if slot_.as_bytes()[20..24] != [0u8; 4] {
2418 return Err(::fidl_next::DecodeError::InvalidPadding);
2419 }
2420
2421 ::fidl_next::munge! {
2422 let Self {
2423
2424 mut start_info,
2425 mut controller,
2426
2427 } = slot_;
2428 }
2429
2430 let _field = start_info.as_mut();
2431
2432 ::fidl_next::Decode::decode(start_info.as_mut(), decoder_, ())?;
2433
2434 let _field = controller.as_mut();
2435
2436 ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
2437
2438 Ok(())
2439 }
2440 }
2441
2442 impl<'de> ::fidl_next::IntoNatural for ComponentRunnerStartRequest<'de> {
2443 type Natural = crate::natural::ComponentRunnerStartRequest;
2444 }
2445
2446 impl ::fidl_next::Unconstrained for ComponentRunnerStartRequest<'static> {}
2447
2448 #[derive(Debug)]
2450 #[repr(C)]
2451 pub struct TaskProviderGetJobResponse {
2452 pub job: ::fidl_next::fuchsia::WireJob,
2453 }
2454
2455 static_assertions::const_assert_eq!(std::mem::size_of::<TaskProviderGetJobResponse>(), 4);
2456 static_assertions::const_assert_eq!(std::mem::align_of::<TaskProviderGetJobResponse>(), 4);
2457
2458 static_assertions::const_assert_eq!(std::mem::offset_of!(TaskProviderGetJobResponse, job), 0);
2459
2460 unsafe impl ::fidl_next::Wire for TaskProviderGetJobResponse {
2461 type Owned<'de> = TaskProviderGetJobResponse;
2462
2463 #[inline]
2464 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2465 ::fidl_next::munge! {
2466 let Self {
2467
2468 job,
2469
2470 } = &mut *out_;
2471 }
2472
2473 ::fidl_next::Wire::zero_padding(job);
2474 }
2475 }
2476
2477 unsafe impl<___D> ::fidl_next::Decode<___D> for TaskProviderGetJobResponse
2478 where
2479 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2480 ___D: ::fidl_next::fuchsia::HandleDecoder,
2481 {
2482 fn decode(
2483 slot_: ::fidl_next::Slot<'_, Self>,
2484 decoder_: &mut ___D,
2485 _: (),
2486 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2487 ::fidl_next::munge! {
2488 let Self {
2489
2490 mut job,
2491
2492 } = slot_;
2493 }
2494
2495 let _field = job.as_mut();
2496
2497 ::fidl_next::Decode::decode(job.as_mut(), decoder_, ())?;
2498
2499 Ok(())
2500 }
2501 }
2502
2503 impl ::fidl_next::IntoNatural for TaskProviderGetJobResponse {
2504 type Natural = crate::natural::TaskProviderGetJobResponse;
2505 }
2506
2507 impl ::fidl_next::Unconstrained for TaskProviderGetJobResponse {}
2508}
2509
2510pub mod wire_optional {
2511
2512 pub use fidl_next_common_fuchsia_component_runner::wire_optional::*;
2513
2514 #[repr(transparent)]
2515 pub struct Task<'de> {
2516 pub(crate) raw: ::fidl_next::RawWireUnion,
2517 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2518 }
2519
2520 unsafe impl ::fidl_next::Wire for Task<'static> {
2521 type Owned<'de> = Task<'de>;
2522
2523 #[inline]
2524 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2525 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2526 ::fidl_next::RawWireUnion::zero_padding(raw);
2527 }
2528 }
2529
2530 impl<'de> Task<'de> {
2531 pub fn is_some(&self) -> bool {
2532 self.raw.is_some()
2533 }
2534
2535 pub fn is_none(&self) -> bool {
2536 self.raw.is_none()
2537 }
2538
2539 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Task<'de>> {
2540 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
2541 }
2542
2543 pub fn into_option(self) -> ::core::option::Option<crate::wire::Task<'de>> {
2544 if self.is_some() {
2545 Some(crate::wire::Task { raw: self.raw, _phantom: ::core::marker::PhantomData })
2546 } else {
2547 None
2548 }
2549 }
2550 }
2551
2552 unsafe impl<___D> ::fidl_next::Decode<___D> for Task<'static>
2553 where
2554 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2555 ___D: ::fidl_next::Decoder,
2556 ___D: ::fidl_next::fuchsia::HandleDecoder,
2557 {
2558 fn decode(
2559 mut slot: ::fidl_next::Slot<'_, Self>,
2560 decoder: &mut ___D,
2561 _: (),
2562 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2563 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2564 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
2565 1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireJob>(
2566 raw,
2567 decoder,
2568 (),
2569 )?,
2570
2571 2 => {
2572 ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireProcess>(
2573 raw,
2574 decoder,
2575 (),
2576 )?
2577 }
2578
2579 3 => {
2580 ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireThread>(
2581 raw,
2582 decoder,
2583 (),
2584 )?
2585 }
2586
2587 0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
2588 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
2589 }
2590
2591 Ok(())
2592 }
2593 }
2594
2595 impl<'de> ::core::fmt::Debug for Task<'de> {
2596 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2597 self.as_ref().fmt(f)
2598 }
2599 }
2600
2601 impl<'de> ::fidl_next::IntoNatural for Task<'de> {
2602 type Natural = ::core::option::Option<crate::natural::Task>;
2603 }
2604
2605 impl ::fidl_next::Unconstrained for Task<'static> {}
2606}
2607
2608pub mod generic {
2609
2610 pub use fidl_next_common_fuchsia_component_runner::generic::*;
2611
2612 pub struct ComponentControllerOnPublishDiagnosticsRequest<T0> {
2613 pub payload: T0,
2614 }
2615
2616 unsafe impl<___E, T0>
2617 ::fidl_next::Encode<
2618 crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
2619 ___E,
2620 > for ComponentControllerOnPublishDiagnosticsRequest<T0>
2621 where
2622 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2623 ___E: ::fidl_next::Encoder,
2624 ___E: ::fidl_next::fuchsia::HandleEncoder,
2625 T0: ::fidl_next::Encode<crate::wire::ComponentDiagnostics<'static>, ___E>,
2626 {
2627 #[inline]
2628 fn encode(
2629 self,
2630 encoder_: &mut ___E,
2631 out_: &mut ::core::mem::MaybeUninit<
2632 crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>,
2633 >,
2634 _: (),
2635 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2636 ::fidl_next::munge! {
2637 let crate::wire::ComponentControllerOnPublishDiagnosticsRequest {
2638
2639 payload,
2640
2641 } = out_;
2642 }
2643
2644 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
2645
2646 Ok(())
2647 }
2648 }
2649
2650 pub struct ComponentRunnerStartRequest<T0, T1> {
2651 pub start_info: T0,
2652
2653 pub controller: T1,
2654 }
2655
2656 unsafe impl<___E, T0, T1>
2657 ::fidl_next::Encode<crate::wire::ComponentRunnerStartRequest<'static>, ___E>
2658 for ComponentRunnerStartRequest<T0, T1>
2659 where
2660 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2661 ___E: ::fidl_next::Encoder,
2662 ___E: ::fidl_next::fuchsia::HandleEncoder,
2663 T0: ::fidl_next::Encode<crate::wire::ComponentStartInfo<'static>, ___E>,
2664 T1: ::fidl_next::Encode<
2665 ::fidl_next::ServerEnd<
2666 crate::ComponentController,
2667 ::fidl_next::fuchsia::WireChannel,
2668 >,
2669 ___E,
2670 >,
2671 {
2672 #[inline]
2673 fn encode(
2674 self,
2675 encoder_: &mut ___E,
2676 out_: &mut ::core::mem::MaybeUninit<crate::wire::ComponentRunnerStartRequest<'static>>,
2677 _: (),
2678 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2679 ::fidl_next::munge! {
2680 let crate::wire::ComponentRunnerStartRequest {
2681
2682 start_info,
2683 controller,
2684
2685 } = out_;
2686 }
2687
2688 ::fidl_next::Encode::encode(self.start_info, encoder_, start_info, ())?;
2689
2690 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
2691
2692 Ok(())
2693 }
2694 }
2695
2696 pub struct TaskProviderGetJobResponse<T0> {
2697 pub job: T0,
2698 }
2699
2700 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::TaskProviderGetJobResponse, ___E>
2701 for TaskProviderGetJobResponse<T0>
2702 where
2703 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2704 ___E: ::fidl_next::fuchsia::HandleEncoder,
2705 T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireJob, ___E>,
2706 {
2707 #[inline]
2708 fn encode(
2709 self,
2710 encoder_: &mut ___E,
2711 out_: &mut ::core::mem::MaybeUninit<crate::wire::TaskProviderGetJobResponse>,
2712 _: (),
2713 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2714 ::fidl_next::munge! {
2715 let crate::wire::TaskProviderGetJobResponse {
2716
2717 job,
2718
2719 } = out_;
2720 }
2721
2722 ::fidl_next::Encode::encode(self.job, encoder_, job, ())?;
2723
2724 Ok(())
2725 }
2726 }
2727}
2728
2729pub use self::natural::*;
2730
2731#[doc = " A protocol for binding and controlling the lifetime of a component instance\n started using `ComponentRunner.Start()`. The component manager is the\n intended direct client of this protocol.\n\n When the controlled component instance terminates or becomes inaccessible\n for any reason, the server closes the connection with an epitaph.\n\n # Lifecycle\n\n A component may exist in one of two states: `Started`, or `Stopped`. The\n component is `Started` from the time `ComponentRunner.Start()` is called\n until the ComponentRunner closes the ComponentController handle. The\n component then transitions to `Stopped`.\n\n Component manager uses ComponentController to terminate a component in two\n steps:\n\n 1. Component manager calls `Stop()` to indicate that the ComponentRunner\n should stop a component\'s execution and send the `OnStop` event.\n 2. If after some time the ComponentController is not closed, component\n manager calls `Kill()` to indicate that the ComponentRunner must halt a\n component\'s execution immediately, and then send the `OnStop` event.\n The component manager may wait some period of time after calling `Kill()`\n before sending `OnStop`, but makes no guarantees it will wait or for how long.\n\n Component manager first waits for the ComponentController to close, and\n then tears down the namespace it hosts for the stopped component. Component\n manager may call `Kill()` without first having called `Stop()`.\n\n Before stopping, a component can optionally use `OnEscrow` to store some\n state in the framework, to receive those state again the next time it is\n started.\n\n When the component stops, the runner should send an `OnStop` event\n instead of just closing the channel, to report the component\'s termination status\n (see below) and (optionally) an exit code. Once the runner has sent `OnStop`\n it is free to close [ComponentRunner]; the component framework will close\n its end of the channel when it receives this event.\n\n ## Legacy\n\n Instead of sending `OnStop`, it is also legal for a runner to close the channel\n with with an epitaph equal to the termination status, but this is a legacy method\n for backward compatibility that\'s no longer recommended.\n\n # Termination status\n\n The termination status indicates the component\'s final disposition in the eyes of\n the runner.\n\n Note that termination status is _not_ synonymous with a component\'s exit code.\n A component\'s exit code, which is optional for a runner to report, is an\n integer that represents the program\'s own return code. For example, for ELF\n components, it is the value returned by main(). The termination status is\n the _runner_\'s status code for the component\'s termination, which may capture\n failure modes that occur in the context of the runner itself rather than the\n program.\n\n The following termination statuses may be sent by the server on error:\n\n - `ZX_OK`: The component exited successfully, typically because the\n component was asked to stop or it decided independently to exit.\n - `INVALID_ARGUMENTS`:\n * `start_info.resolved_url` is not supported by this\n runner;\n * `start_info` contains missing or invalid arguments.\n - `INSTANCE_CANNOT_START`: The runner could not start the component.\n For example, a critical part of the program could not be found or\n loaded, or the referenced binary was invalid for this runner.\n - `RESOURCE_UNAVAILABLE`: The component could not be launched due to\n lack of resources.\n - `INTERNAL`: An unexpected internal runner error was encountered.\n - `INSTANCE_DIED`: The component instance was started but\n subsequently terminated with an error.\n - Other status codes (e.g. `ZX_ERR_PEER_CLOSED`) may indicate a failure\n of the component runner itself. The component manager may respond to such\n failures by terminating the component runner\'s job to ensure system\n stability.\n"]
2733#[derive(PartialEq, Debug)]
2734pub struct ComponentController;
2735
2736#[cfg(target_os = "fuchsia")]
2737impl ::fidl_next::HasTransport for ComponentController {
2738 type Transport = ::fidl_next::fuchsia::zx::Channel;
2739}
2740
2741pub mod component_controller {
2742 pub mod prelude {
2743 pub use crate::{
2744 ComponentController, ComponentControllerClientHandler,
2745 ComponentControllerServerHandler, component_controller,
2746 };
2747
2748 pub use crate::natural::ComponentControllerOnEscrowRequest;
2749
2750 pub use crate::natural::ComponentControllerOnPublishDiagnosticsRequest;
2751
2752 pub use crate::natural::ComponentStopInfo;
2753 }
2754
2755 pub struct Stop;
2756
2757 impl ::fidl_next::Method for Stop {
2758 const ORDINAL: u64 = 4804506821232171874;
2759 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2760 ::fidl_next::protocol::Flexibility::Strict;
2761
2762 type Protocol = crate::ComponentController;
2763
2764 type Request = ();
2765 }
2766
2767 pub struct Kill;
2768
2769 impl ::fidl_next::Method for Kill {
2770 const ORDINAL: u64 = 4514346391631670964;
2771 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2772 ::fidl_next::protocol::Flexibility::Strict;
2773
2774 type Protocol = crate::ComponentController;
2775
2776 type Request = ();
2777 }
2778
2779 pub struct OnPublishDiagnostics;
2780
2781 impl ::fidl_next::Method for OnPublishDiagnostics {
2782 const ORDINAL: u64 = 2240216199992207687;
2783 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2784 ::fidl_next::protocol::Flexibility::Strict;
2785
2786 type Protocol = crate::ComponentController;
2787
2788 type Request = crate::wire::ComponentControllerOnPublishDiagnosticsRequest<'static>;
2789 }
2790
2791 pub struct OnEscrow;
2792
2793 impl ::fidl_next::Method for OnEscrow {
2794 const ORDINAL: u64 = 730448769712342012;
2795 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2796 ::fidl_next::protocol::Flexibility::Flexible;
2797
2798 type Protocol = crate::ComponentController;
2799
2800 type Request = crate::wire::ComponentControllerOnEscrowRequest<'static>;
2801 }
2802
2803 pub struct OnStop;
2804
2805 impl ::fidl_next::Method for OnStop {
2806 const ORDINAL: u64 = 4322651556509354674;
2807 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2808 ::fidl_next::protocol::Flexibility::Flexible;
2809
2810 type Protocol = crate::ComponentController;
2811
2812 type Request = crate::wire::ComponentStopInfo<'static>;
2813 }
2814
2815 mod ___detail {
2816 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ComponentController
2817 where
2818 ___T: ::fidl_next::Transport,
2819 {
2820 type Client = ComponentControllerClient<___T>;
2821 type Server = ComponentControllerServer<___T>;
2822 }
2823
2824 #[repr(transparent)]
2826 pub struct ComponentControllerClient<___T: ::fidl_next::Transport> {
2827 #[allow(dead_code)]
2828 client: ::fidl_next::protocol::Client<___T>,
2829 }
2830
2831 impl<___T> ComponentControllerClient<___T>
2832 where
2833 ___T: ::fidl_next::Transport,
2834 {
2835 #[doc = " Request to stop the component instance.\n\n After stopping the component instance, the server should close this\n connection with an epitaph. After the connection\n closes, component manager considers this component instance to be\n Stopped and the component\'s namespace will be torn down.\n"]
2836 pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
2837 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2838 4804506821232171874,
2839 <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
2840 (),
2841 ))
2842 }
2843
2844 #[doc = " Stop this component instance immediately.\n\n The ComponentRunner must immediately kill the component instance, and\n then close this connection with an epitaph. After the connection\n closes, component manager considers this component instance to be\n Stopped and the component\'s namespace will be torn down.\n\n In some cases Kill() may be issued before Stop(), but that is not\n guaranteed.\n"]
2845 pub fn kill(&self) -> ::fidl_next::SendFuture<'_, ___T> {
2846 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
2847 4514346391631670964,
2848 <super::Kill as ::fidl_next::Method>::FLEXIBILITY,
2849 (),
2850 ))
2851 }
2852 }
2853
2854 #[repr(transparent)]
2856 pub struct ComponentControllerServer<___T: ::fidl_next::Transport> {
2857 server: ::fidl_next::protocol::Server<___T>,
2858 }
2859
2860 impl<___T> ComponentControllerServer<___T>
2861 where
2862 ___T: ::fidl_next::Transport,
2863 {
2864 #[doc = " Event for runners to publish diagnostics to the platform.\n\n This event signals to the platform that the runner for this\n component is publishing diagnostics about the runtime of the\n component. The component manager may optionally expose this data\n to clients.\n"]
2865 pub fn on_publish_diagnostics(
2866 &self,
2867
2868 payload: impl ::fidl_next::Encode<
2869 crate::wire::ComponentDiagnostics<'static>,
2870 <___T as ::fidl_next::Transport>::SendBuffer,
2871 >,
2872 ) -> ::fidl_next::SendFuture<'_, ___T>
2873 where
2874 <___T as ::fidl_next::Transport>::SendBuffer:
2875 ::fidl_next::encoder::InternalHandleEncoder,
2876 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2877 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2878 {
2879 self.on_publish_diagnostics_with(
2880 crate::generic::ComponentControllerOnPublishDiagnosticsRequest { payload },
2881 )
2882 }
2883
2884 #[doc = " Event for runners to publish diagnostics to the platform.\n\n This event signals to the platform that the runner for this\n component is publishing diagnostics about the runtime of the\n component. The component manager may optionally expose this data\n to clients.\n"]
2885
2886 pub fn on_publish_diagnostics_with<___R>(
2887 &self,
2888 request: ___R,
2889 ) -> ::fidl_next::SendFuture<'_, ___T>
2890 where
2891 ___R: ::fidl_next::Encode<
2892 <super::OnPublishDiagnostics as ::fidl_next::Method>::Request,
2893 <___T as ::fidl_next::Transport>::SendBuffer,
2894 >,
2895 {
2896 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
2897 2240216199992207687,
2898 <super::OnPublishDiagnostics as ::fidl_next::Method>::FLEXIBILITY,
2899 request,
2900 ))
2901 }
2902
2903 #[doc = " Store some of the component\'s state in the framework, to be redelivered\n to the component the next time it\'s started (a practice called\n \"escrowing\").\n\n When the framework receives this event, it will wait until the current\n execution of the component has finished, then start the component again\n when the `ZX_CHANNEL_READABLE` signal is observed on `outgoing_dir`.\n\n Repeated calls will replace the old escrowed value. This is discouraged.\n\n Handles escrowed via `OnEscrow` are always delivered to the next\n execution of the component.\n"]
2904
2905 pub fn on_escrow_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
2906 where
2907 ___R: ::fidl_next::Encode<
2908 <super::OnEscrow as ::fidl_next::Method>::Request,
2909 <___T as ::fidl_next::Transport>::SendBuffer,
2910 >,
2911 {
2912 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
2913 730448769712342012,
2914 <super::OnEscrow as ::fidl_next::Method>::FLEXIBILITY,
2915 request,
2916 ))
2917 }
2918
2919 #[doc = " Report that the component has stopped, with data about its termination. This will\n cause the component to make a lifecycle transition to `Stopped`.\n\n Once the runner has sent `OnStop` it is free to close this [ComponentRunner]; the\n component framework will close its end of the channel when it receives this event.\n\n Alternatively, a runner may close the controller channel without this event to signal\n component stop, but this method is legacy and no longer recommended.\n"]
2920
2921 pub fn on_stop_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
2922 where
2923 ___R: ::fidl_next::Encode<
2924 <super::OnStop as ::fidl_next::Method>::Request,
2925 <___T as ::fidl_next::Transport>::SendBuffer,
2926 >,
2927 {
2928 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
2929 4322651556509354674,
2930 <super::OnStop as ::fidl_next::Method>::FLEXIBILITY,
2931 request,
2932 ))
2933 }
2934 }
2935 }
2936}
2937
2938pub trait ComponentControllerClientHandler<
2942 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2943 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2944>
2945{
2946 #[doc = " Event for runners to publish diagnostics to the platform.\n\n This event signals to the platform that the runner for this\n component is publishing diagnostics about the runtime of the\n component. The component manager may optionally expose this data\n to clients.\n"]
2947 fn on_publish_diagnostics(
2948 &mut self,
2949
2950 request: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
2951 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2952
2953 #[doc = " Store some of the component\'s state in the framework, to be redelivered\n to the component the next time it\'s started (a practice called\n \"escrowing\").\n\n When the framework receives this event, it will wait until the current\n execution of the component has finished, then start the component again\n when the `ZX_CHANNEL_READABLE` signal is observed on `outgoing_dir`.\n\n Repeated calls will replace the old escrowed value. This is discouraged.\n\n Handles escrowed via `OnEscrow` are always delivered to the next\n execution of the component.\n"]
2954 fn on_escrow(
2955 &mut self,
2956
2957 request: ::fidl_next::Request<component_controller::OnEscrow, ___T>,
2958 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2959
2960 #[doc = " Report that the component has stopped, with data about its termination. This will\n cause the component to make a lifecycle transition to `Stopped`.\n\n Once the runner has sent `OnStop` it is free to close this [ComponentRunner]; the\n component framework will close its end of the channel when it receives this event.\n\n Alternatively, a runner may close the controller channel without this event to signal\n component stop, but this method is legacy and no longer recommended.\n"]
2961 fn on_stop(
2962 &mut self,
2963
2964 request: ::fidl_next::Request<component_controller::OnStop, ___T>,
2965 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2966
2967 fn on_unknown_interaction(
2968 &mut self,
2969 ordinal: u64,
2970 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2971 ::core::future::ready(())
2972 }
2973}
2974
2975impl<___T> ComponentControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
2976where
2977 ___T: ::fidl_next::Transport,
2978{
2979 async fn on_publish_diagnostics(
2980 &mut self,
2981
2982 _: ::fidl_next::Request<component_controller::OnPublishDiagnostics, ___T>,
2983 ) {
2984 }
2985
2986 async fn on_escrow(&mut self, _: ::fidl_next::Request<component_controller::OnEscrow, ___T>) {}
2987
2988 async fn on_stop(&mut self, _: ::fidl_next::Request<component_controller::OnStop, ___T>) {}
2989
2990 async fn on_unknown_interaction(&mut self, _: u64) {}
2991}
2992
2993impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ComponentController
2994where
2995 ___H: ComponentControllerClientHandler<___T> + ::core::marker::Send,
2996 ___T: ::fidl_next::Transport,
2997 <component_controller::OnPublishDiagnostics as ::fidl_next::Method>::Request:
2998 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2999 <component_controller::OnEscrow as ::fidl_next::Method>::Request:
3000 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3001 <component_controller::OnStop as ::fidl_next::Method>::Request:
3002 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3003{
3004 async fn on_event(
3005 handler: &mut ___H,
3006 ordinal: u64,
3007 flexibility: ::fidl_next::protocol::Flexibility,
3008 buffer: ___T::RecvBuffer,
3009 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3010 match ordinal {
3011 2240216199992207687 => match ::fidl_next::DecoderExt::decode(buffer) {
3012 Ok(decoded) => {
3013 handler
3014 .on_publish_diagnostics(::fidl_next::Request::from_decoded(decoded))
3015 .await;
3016 Ok(())
3017 }
3018 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3019 ordinal: 2240216199992207687,
3020 error,
3021 }),
3022 },
3023
3024 730448769712342012 => match ::fidl_next::DecoderExt::decode(buffer) {
3025 Ok(decoded) => {
3026 handler.on_escrow(::fidl_next::Request::from_decoded(decoded)).await;
3027 Ok(())
3028 }
3029 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3030 ordinal: 730448769712342012,
3031 error,
3032 }),
3033 },
3034
3035 4322651556509354674 => match ::fidl_next::DecoderExt::decode(buffer) {
3036 Ok(decoded) => {
3037 handler.on_stop(::fidl_next::Request::from_decoded(decoded)).await;
3038 Ok(())
3039 }
3040 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3041 ordinal: 4322651556509354674,
3042 error,
3043 }),
3044 },
3045
3046 ordinal => {
3047 handler.on_unknown_interaction(ordinal).await;
3048 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3049 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3050 } else {
3051 Ok(())
3052 }
3053 }
3054 }
3055 }
3056}
3057
3058pub trait ComponentControllerServerHandler<
3062 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3063 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3064>
3065{
3066 #[doc = " Request to stop the component instance.\n\n After stopping the component instance, the server should close this\n connection with an epitaph. After the connection\n closes, component manager considers this component instance to be\n Stopped and the component\'s namespace will be torn down.\n"]
3067 fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3068
3069 #[doc = " Stop this component instance immediately.\n\n The ComponentRunner must immediately kill the component instance, and\n then close this connection with an epitaph. After the connection\n closes, component manager considers this component instance to be\n Stopped and the component\'s namespace will be torn down.\n\n In some cases Kill() may be issued before Stop(), but that is not\n guaranteed.\n"]
3070 fn kill(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3071
3072 fn on_unknown_interaction(
3073 &mut self,
3074 ordinal: u64,
3075 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3076 ::core::future::ready(())
3077 }
3078}
3079
3080impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ComponentController
3081where
3082 ___H: ComponentControllerServerHandler<___T> + ::core::marker::Send,
3083 ___T: ::fidl_next::Transport,
3084{
3085 async fn on_one_way(
3086 handler: &mut ___H,
3087 ordinal: u64,
3088 flexibility: ::fidl_next::protocol::Flexibility,
3089 buffer: ___T::RecvBuffer,
3090 ) -> ::core::result::Result<
3091 (),
3092 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3093 > {
3094 match ordinal {
3095 4804506821232171874 => {
3096 handler.stop().await;
3097 Ok(())
3098 }
3099
3100 4514346391631670964 => {
3101 handler.kill().await;
3102 Ok(())
3103 }
3104
3105 ordinal => {
3106 handler.on_unknown_interaction(ordinal).await;
3107 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3108 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3109 } else {
3110 Ok(())
3111 }
3112 }
3113 }
3114 }
3115
3116 async fn on_two_way(
3117 handler: &mut ___H,
3118 ordinal: u64,
3119 flexibility: ::fidl_next::protocol::Flexibility,
3120 buffer: ___T::RecvBuffer,
3121 responder: ::fidl_next::protocol::Responder<___T>,
3122 ) -> ::core::result::Result<
3123 (),
3124 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3125 > {
3126 match ordinal {
3127 ordinal => {
3128 handler.on_unknown_interaction(ordinal).await;
3129 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3130 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3131 } else {
3132 responder
3133 .respond(
3134 ordinal,
3135 flexibility,
3136 ::fidl_next::Flexible::<()>::FrameworkErr(
3137 ::fidl_next::FrameworkError::UnknownMethod,
3138 ),
3139 )
3140 .expect("encoding a framework error should never fail")
3141 .await?;
3142 Ok(())
3143 }
3144 }
3145 }
3146 }
3147}
3148
3149#[doc = " A protocol used for running components.\n\n This protocol is implemented by components which provide a runtime\n environment for other components.\n\n Note: The component manager is the only intended direct client of this\n interface.\n"]
3151#[derive(PartialEq, Debug)]
3152pub struct ComponentRunner;
3153
3154impl ::fidl_next::Discoverable for ComponentRunner {
3155 const PROTOCOL_NAME: &'static str = "fuchsia.component.runner.ComponentRunner";
3156}
3157
3158#[cfg(target_os = "fuchsia")]
3159impl ::fidl_next::HasTransport for ComponentRunner {
3160 type Transport = ::fidl_next::fuchsia::zx::Channel;
3161}
3162
3163pub mod component_runner {
3164 pub mod prelude {
3165 pub use crate::{
3166 ComponentRunner, ComponentRunnerClientHandler, ComponentRunnerServerHandler,
3167 component_runner,
3168 };
3169
3170 pub use crate::natural::ComponentRunnerStartRequest;
3171 }
3172
3173 pub struct Start;
3174
3175 impl ::fidl_next::Method for Start {
3176 const ORDINAL: u64 = 780715659970866697;
3177 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3178 ::fidl_next::protocol::Flexibility::Strict;
3179
3180 type Protocol = crate::ComponentRunner;
3181
3182 type Request = crate::wire::ComponentRunnerStartRequest<'static>;
3183 }
3184
3185 mod ___detail {
3186 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ComponentRunner
3187 where
3188 ___T: ::fidl_next::Transport,
3189 {
3190 type Client = ComponentRunnerClient<___T>;
3191 type Server = ComponentRunnerServer<___T>;
3192 }
3193
3194 #[repr(transparent)]
3196 pub struct ComponentRunnerClient<___T: ::fidl_next::Transport> {
3197 #[allow(dead_code)]
3198 client: ::fidl_next::protocol::Client<___T>,
3199 }
3200
3201 impl<___T> ComponentRunnerClient<___T>
3202 where
3203 ___T: ::fidl_next::Transport,
3204 {
3205 #[doc = " Start running a component instance described by `start_info`.\n\n Component manager binds and uses `controller` to control the\n lifetime of the newly started component instance.\n\n Errors are delivered as epitaphs over the `ComponentController`\n protocol. In the event of an error, the runner must ensure that\n resources are cleaned up.\n"]
3206 pub fn start(
3207 &self,
3208
3209 start_info: impl ::fidl_next::Encode<
3210 crate::wire::ComponentStartInfo<'static>,
3211 <___T as ::fidl_next::Transport>::SendBuffer,
3212 >,
3213
3214 controller: impl ::fidl_next::Encode<
3215 ::fidl_next::ServerEnd<
3216 crate::ComponentController,
3217 ::fidl_next::fuchsia::WireChannel,
3218 >,
3219 <___T as ::fidl_next::Transport>::SendBuffer,
3220 >,
3221 ) -> ::fidl_next::SendFuture<'_, ___T>
3222 where
3223 <___T as ::fidl_next::Transport>::SendBuffer:
3224 ::fidl_next::encoder::InternalHandleEncoder,
3225 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3226 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3227 {
3228 self.start_with(crate::generic::ComponentRunnerStartRequest {
3229 start_info,
3230
3231 controller,
3232 })
3233 }
3234
3235 #[doc = " Start running a component instance described by `start_info`.\n\n Component manager binds and uses `controller` to control the\n lifetime of the newly started component instance.\n\n Errors are delivered as epitaphs over the `ComponentController`\n protocol. In the event of an error, the runner must ensure that\n resources are cleaned up.\n"]
3236 pub fn start_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3237 where
3238 ___R: ::fidl_next::Encode<
3239 crate::wire::ComponentRunnerStartRequest<'static>,
3240 <___T as ::fidl_next::Transport>::SendBuffer,
3241 >,
3242 {
3243 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3244 780715659970866697,
3245 <super::Start as ::fidl_next::Method>::FLEXIBILITY,
3246 request,
3247 ))
3248 }
3249 }
3250
3251 #[repr(transparent)]
3253 pub struct ComponentRunnerServer<___T: ::fidl_next::Transport> {
3254 server: ::fidl_next::protocol::Server<___T>,
3255 }
3256
3257 impl<___T> ComponentRunnerServer<___T> where ___T: ::fidl_next::Transport {}
3258 }
3259}
3260
3261pub trait ComponentRunnerClientHandler<
3265 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3266 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3267>
3268{
3269 fn on_unknown_interaction(
3270 &mut self,
3271 ordinal: u64,
3272 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3273 ::core::future::ready(())
3274 }
3275}
3276
3277impl<___T> ComponentRunnerClientHandler<___T> for ::fidl_next::IgnoreEvents
3278where
3279 ___T: ::fidl_next::Transport,
3280{
3281 async fn on_unknown_interaction(&mut self, _: u64) {}
3282}
3283
3284impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ComponentRunner
3285where
3286 ___H: ComponentRunnerClientHandler<___T> + ::core::marker::Send,
3287 ___T: ::fidl_next::Transport,
3288{
3289 async fn on_event(
3290 handler: &mut ___H,
3291 ordinal: u64,
3292 flexibility: ::fidl_next::protocol::Flexibility,
3293 buffer: ___T::RecvBuffer,
3294 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3295 match ordinal {
3296 ordinal => {
3297 handler.on_unknown_interaction(ordinal).await;
3298 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3299 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3300 } else {
3301 Ok(())
3302 }
3303 }
3304 }
3305 }
3306}
3307
3308pub trait ComponentRunnerServerHandler<
3312 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3313 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3314>
3315{
3316 #[doc = " Start running a component instance described by `start_info`.\n\n Component manager binds and uses `controller` to control the\n lifetime of the newly started component instance.\n\n Errors are delivered as epitaphs over the `ComponentController`\n protocol. In the event of an error, the runner must ensure that\n resources are cleaned up.\n"]
3317 fn start(
3318 &mut self,
3319
3320 request: ::fidl_next::Request<component_runner::Start, ___T>,
3321 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3322
3323 fn on_unknown_interaction(
3324 &mut self,
3325 ordinal: u64,
3326 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3327 ::core::future::ready(())
3328 }
3329}
3330
3331impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ComponentRunner
3332where
3333 ___H: ComponentRunnerServerHandler<___T> + ::core::marker::Send,
3334 ___T: ::fidl_next::Transport,
3335 <component_runner::Start as ::fidl_next::Method>::Request:
3336 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3337{
3338 async fn on_one_way(
3339 handler: &mut ___H,
3340 ordinal: u64,
3341 flexibility: ::fidl_next::protocol::Flexibility,
3342 buffer: ___T::RecvBuffer,
3343 ) -> ::core::result::Result<
3344 (),
3345 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3346 > {
3347 match ordinal {
3348 780715659970866697 => match ::fidl_next::DecoderExt::decode(buffer) {
3349 Ok(decoded) => {
3350 handler.start(::fidl_next::Request::from_decoded(decoded)).await;
3351 Ok(())
3352 }
3353 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3354 ordinal: 780715659970866697,
3355 error,
3356 }),
3357 },
3358
3359 ordinal => {
3360 handler.on_unknown_interaction(ordinal).await;
3361 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3362 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3363 } else {
3364 Ok(())
3365 }
3366 }
3367 }
3368 }
3369
3370 async fn on_two_way(
3371 handler: &mut ___H,
3372 ordinal: u64,
3373 flexibility: ::fidl_next::protocol::Flexibility,
3374 buffer: ___T::RecvBuffer,
3375 responder: ::fidl_next::protocol::Responder<___T>,
3376 ) -> ::core::result::Result<
3377 (),
3378 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3379 > {
3380 match ordinal {
3381 ordinal => {
3382 handler.on_unknown_interaction(ordinal).await;
3383 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3384 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3385 } else {
3386 responder
3387 .respond(
3388 ordinal,
3389 flexibility,
3390 ::fidl_next::Flexible::<()>::FrameworkErr(
3391 ::fidl_next::FrameworkError::UnknownMethod,
3392 ),
3393 )
3394 .expect("encoding a framework error should never fail")
3395 .await?;
3396 Ok(())
3397 }
3398 }
3399 }
3400 }
3401}
3402
3403#[doc = " Served by runners that want to make a zircon job available through their runtime directory.\n"]
3405#[derive(PartialEq, Debug)]
3406pub struct TaskProvider;
3407
3408impl ::fidl_next::Discoverable for TaskProvider {
3409 const PROTOCOL_NAME: &'static str = "fuchsia.component.runner.TaskProvider";
3410}
3411
3412#[cfg(target_os = "fuchsia")]
3413impl ::fidl_next::HasTransport for TaskProvider {
3414 type Transport = ::fidl_next::fuchsia::zx::Channel;
3415}
3416
3417pub mod task_provider {
3418 pub mod prelude {
3419 pub use crate::{
3420 TaskProvider, TaskProviderClientHandler, TaskProviderServerHandler, task_provider,
3421 };
3422
3423 pub use crate::natural::TaskProviderGetJobResponse;
3424 }
3425
3426 pub struct GetJob;
3427
3428 impl ::fidl_next::Method for GetJob {
3429 const ORDINAL: u64 = 5520468615388521389;
3430 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3431 ::fidl_next::protocol::Flexibility::Strict;
3432
3433 type Protocol = crate::TaskProvider;
3434
3435 type Request = ();
3436 }
3437
3438 impl ::fidl_next::TwoWayMethod for GetJob {
3439 type Response = ::fidl_next::WireResult<
3440 'static,
3441 crate::wire::TaskProviderGetJobResponse,
3442 ::fidl_next::WireI32,
3443 >;
3444 }
3445
3446 impl<___R> ::fidl_next::Respond<___R> for GetJob {
3447 type Output = ::core::result::Result<
3448 crate::generic::TaskProviderGetJobResponse<___R>,
3449 ::fidl_next::util::Never,
3450 >;
3451
3452 fn respond(response: ___R) -> Self::Output {
3453 ::core::result::Result::Ok(crate::generic::TaskProviderGetJobResponse { job: response })
3454 }
3455 }
3456
3457 impl<___R> ::fidl_next::RespondErr<___R> for GetJob {
3458 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3459
3460 fn respond_err(response: ___R) -> Self::Output {
3461 ::core::result::Result::Err(response)
3462 }
3463 }
3464
3465 mod ___detail {
3466 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::TaskProvider
3467 where
3468 ___T: ::fidl_next::Transport,
3469 {
3470 type Client = TaskProviderClient<___T>;
3471 type Server = TaskProviderServer<___T>;
3472 }
3473
3474 #[repr(transparent)]
3476 pub struct TaskProviderClient<___T: ::fidl_next::Transport> {
3477 #[allow(dead_code)]
3478 client: ::fidl_next::protocol::Client<___T>,
3479 }
3480
3481 impl<___T> TaskProviderClient<___T>
3482 where
3483 ___T: ::fidl_next::Transport,
3484 {
3485 #[doc = " Returns a job handle for the component requested.\n\n On success, returns a handle with the same rights as the runner\'s.\n"]
3486 pub fn get_job(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetJob, ___T> {
3487 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3488 5520468615388521389,
3489 <super::GetJob as ::fidl_next::Method>::FLEXIBILITY,
3490 (),
3491 ))
3492 }
3493 }
3494
3495 #[repr(transparent)]
3497 pub struct TaskProviderServer<___T: ::fidl_next::Transport> {
3498 server: ::fidl_next::protocol::Server<___T>,
3499 }
3500
3501 impl<___T> TaskProviderServer<___T> where ___T: ::fidl_next::Transport {}
3502 }
3503}
3504
3505pub trait TaskProviderClientHandler<
3509 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3510 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3511>
3512{
3513 fn on_unknown_interaction(
3514 &mut self,
3515 ordinal: u64,
3516 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3517 ::core::future::ready(())
3518 }
3519}
3520
3521impl<___T> TaskProviderClientHandler<___T> for ::fidl_next::IgnoreEvents
3522where
3523 ___T: ::fidl_next::Transport,
3524{
3525 async fn on_unknown_interaction(&mut self, _: u64) {}
3526}
3527
3528impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for TaskProvider
3529where
3530 ___H: TaskProviderClientHandler<___T> + ::core::marker::Send,
3531 ___T: ::fidl_next::Transport,
3532{
3533 async fn on_event(
3534 handler: &mut ___H,
3535 ordinal: u64,
3536 flexibility: ::fidl_next::protocol::Flexibility,
3537 buffer: ___T::RecvBuffer,
3538 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3539 match ordinal {
3540 ordinal => {
3541 handler.on_unknown_interaction(ordinal).await;
3542 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3543 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3544 } else {
3545 Ok(())
3546 }
3547 }
3548 }
3549 }
3550}
3551
3552pub trait TaskProviderServerHandler<
3556 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3557 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3558>
3559{
3560 #[doc = " Returns a job handle for the component requested.\n\n On success, returns a handle with the same rights as the runner\'s.\n"]
3561 fn get_job(
3562 &mut self,
3563
3564 responder: ::fidl_next::Responder<task_provider::GetJob, ___T>,
3565 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3566
3567 fn on_unknown_interaction(
3568 &mut self,
3569 ordinal: u64,
3570 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3571 ::core::future::ready(())
3572 }
3573}
3574
3575impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for TaskProvider
3576where
3577 ___H: TaskProviderServerHandler<___T> + ::core::marker::Send,
3578 ___T: ::fidl_next::Transport,
3579{
3580 async fn on_one_way(
3581 handler: &mut ___H,
3582 ordinal: u64,
3583 flexibility: ::fidl_next::protocol::Flexibility,
3584 buffer: ___T::RecvBuffer,
3585 ) -> ::core::result::Result<
3586 (),
3587 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3588 > {
3589 match ordinal {
3590 ordinal => {
3591 handler.on_unknown_interaction(ordinal).await;
3592 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3593 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3594 } else {
3595 Ok(())
3596 }
3597 }
3598 }
3599 }
3600
3601 async fn on_two_way(
3602 handler: &mut ___H,
3603 ordinal: u64,
3604 flexibility: ::fidl_next::protocol::Flexibility,
3605 buffer: ___T::RecvBuffer,
3606 responder: ::fidl_next::protocol::Responder<___T>,
3607 ) -> ::core::result::Result<
3608 (),
3609 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3610 > {
3611 match ordinal {
3612 5520468615388521389 => {
3613 let responder = ::fidl_next::Responder::from_untyped(responder);
3614
3615 handler.get_job(responder).await;
3616 Ok(())
3617 }
3618
3619 ordinal => {
3620 handler.on_unknown_interaction(ordinal).await;
3621 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3622 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3623 } else {
3624 responder
3625 .respond(
3626 ordinal,
3627 flexibility,
3628 ::fidl_next::Flexible::<()>::FrameworkErr(
3629 ::fidl_next::FrameworkError::UnknownMethod,
3630 ),
3631 )
3632 .expect("encoding a framework error should never fail")
3633 .await?;
3634 Ok(())
3635 }
3636 }
3637 }
3638 }
3639}
3640
3641pub use fidl_next_common_fuchsia_component_runner::*;
3642
3643pub mod compat {
3645
3646 pub use fidl_next_common_fuchsia_component_runner::compat::*;
3647
3648 impl ::fidl_next::CompatFrom<crate::Task> for ::fidl_fuchsia_component_runner::Task {
3649 fn compat_from(value: crate::Task) -> Self {
3650 match value {
3651 crate::Task::Job(value) => Self::Job(::fidl_next::CompatFrom::compat_from(value)),
3652
3653 crate::Task::Process(value) => {
3654 Self::Process(::fidl_next::CompatFrom::compat_from(value))
3655 }
3656
3657 crate::Task::Thread(value) => {
3658 Self::Thread(::fidl_next::CompatFrom::compat_from(value))
3659 }
3660
3661 crate::Task::UnknownOrdinal_(unknown_ordinal) => {
3662 Self::__SourceBreaking { unknown_ordinal }
3663 }
3664 }
3665 }
3666 }
3667
3668 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::Task> for crate::Task {
3669 fn compat_from(value: ::fidl_fuchsia_component_runner::Task) -> Self {
3670 match value {
3671 ::fidl_fuchsia_component_runner::Task::Job(value) => {
3672 Self::Job(::fidl_next::CompatFrom::compat_from(value))
3673 }
3674
3675 ::fidl_fuchsia_component_runner::Task::Process(value) => {
3676 Self::Process(::fidl_next::CompatFrom::compat_from(value))
3677 }
3678
3679 ::fidl_fuchsia_component_runner::Task::Thread(value) => {
3680 Self::Thread(::fidl_next::CompatFrom::compat_from(value))
3681 }
3682
3683 ::fidl_fuchsia_component_runner::Task::__SourceBreaking { unknown_ordinal } => {
3684 Self::UnknownOrdinal_(unknown_ordinal)
3685 }
3686 }
3687 }
3688 }
3689
3690 impl ::fidl_next::CompatFrom<crate::ComponentTasks>
3691 for ::fidl_fuchsia_component_runner::ComponentTasks
3692 {
3693 fn compat_from(value: crate::ComponentTasks) -> Self {
3694 Self {
3695 component_task: ::fidl_next::CompatFrom::compat_from(value.component_task),
3696
3697 parent_task: ::fidl_next::CompatFrom::compat_from(value.parent_task),
3698
3699 __source_breaking: ::fidl::marker::SourceBreaking,
3700 }
3701 }
3702 }
3703
3704 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentTasks>
3705 for crate::ComponentTasks
3706 {
3707 fn compat_from(value: ::fidl_fuchsia_component_runner::ComponentTasks) -> Self {
3708 Self {
3709 component_task: ::fidl_next::CompatFrom::compat_from(value.component_task),
3710
3711 parent_task: ::fidl_next::CompatFrom::compat_from(value.parent_task),
3712 }
3713 }
3714 }
3715
3716 impl ::fidl_next::CompatFrom<crate::ComponentDiagnostics>
3717 for ::fidl_fuchsia_component_runner::ComponentDiagnostics
3718 {
3719 fn compat_from(value: crate::ComponentDiagnostics) -> Self {
3720 Self {
3721 tasks: ::fidl_next::CompatFrom::compat_from(value.tasks),
3722
3723 __source_breaking: ::fidl::marker::SourceBreaking,
3724 }
3725 }
3726 }
3727
3728 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentDiagnostics>
3729 for crate::ComponentDiagnostics
3730 {
3731 fn compat_from(value: ::fidl_fuchsia_component_runner::ComponentDiagnostics) -> Self {
3732 Self { tasks: ::fidl_next::CompatFrom::compat_from(value.tasks) }
3733 }
3734 }
3735
3736 impl ::fidl_next::CompatFrom<crate::ComponentControllerOnPublishDiagnosticsRequest>
3737 for ::fidl_fuchsia_component_runner::ComponentControllerOnPublishDiagnosticsRequest
3738 {
3739 #[inline]
3740 fn compat_from(value: crate::ComponentControllerOnPublishDiagnosticsRequest) -> Self {
3741 Self { payload: ::fidl_next::CompatFrom::compat_from(value.payload) }
3742 }
3743 }
3744
3745 impl
3746 ::fidl_next::CompatFrom<
3747 ::fidl_fuchsia_component_runner::ComponentControllerOnPublishDiagnosticsRequest,
3748 > for crate::ComponentControllerOnPublishDiagnosticsRequest
3749 {
3750 #[inline]
3751 fn compat_from(
3752 value: ::fidl_fuchsia_component_runner::ComponentControllerOnPublishDiagnosticsRequest,
3753 ) -> Self {
3754 Self { payload: ::fidl_next::CompatFrom::compat_from(value.payload) }
3755 }
3756 }
3757
3758 impl ::fidl_next::CompatFrom<crate::ComponentStopInfo>
3759 for ::fidl_fuchsia_component_runner::ComponentStopInfo
3760 {
3761 fn compat_from(value: crate::ComponentStopInfo) -> Self {
3762 Self {
3763 termination_status: ::fidl_next::CompatFrom::compat_from(value.termination_status),
3764
3765 exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
3766
3767 __source_breaking: ::fidl::marker::SourceBreaking,
3768 }
3769 }
3770 }
3771
3772 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentStopInfo>
3773 for crate::ComponentStopInfo
3774 {
3775 fn compat_from(value: ::fidl_fuchsia_component_runner::ComponentStopInfo) -> Self {
3776 Self {
3777 termination_status: ::fidl_next::CompatFrom::compat_from(value.termination_status),
3778
3779 exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
3780 }
3781 }
3782 }
3783
3784 impl ::fidl_next::CompatFrom<crate::ComponentControllerOnEscrowRequest>
3785 for ::fidl_fuchsia_component_runner::ComponentControllerOnEscrowRequest
3786 {
3787 fn compat_from(value: crate::ComponentControllerOnEscrowRequest) -> Self {
3788 Self {
3789 outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
3790
3791 escrowed_dictionary: ::fidl_next::CompatFrom::compat_from(
3792 value.escrowed_dictionary,
3793 ),
3794
3795 __source_breaking: ::fidl::marker::SourceBreaking,
3796 }
3797 }
3798 }
3799
3800 impl
3801 ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentControllerOnEscrowRequest>
3802 for crate::ComponentControllerOnEscrowRequest
3803 {
3804 fn compat_from(
3805 value: ::fidl_fuchsia_component_runner::ComponentControllerOnEscrowRequest,
3806 ) -> Self {
3807 Self {
3808 outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
3809
3810 escrowed_dictionary: ::fidl_next::CompatFrom::compat_from(
3811 value.escrowed_dictionary,
3812 ),
3813 }
3814 }
3815 }
3816
3817 #[cfg(target_os = "fuchsia")]
3818 pub type ComponentControllerProxy = ::fidl_next::Client<crate::ComponentController>;
3821
3822 impl ::fidl_next::CompatFrom<crate::ComponentController>
3823 for ::fidl_fuchsia_component_runner::ComponentControllerMarker
3824 {
3825 fn compat_from(_: crate::ComponentController) -> Self {
3826 Self
3827 }
3828 }
3829
3830 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentControllerMarker>
3831 for crate::ComponentController
3832 {
3833 fn compat_from(_: ::fidl_fuchsia_component_runner::ComponentControllerMarker) -> Self {
3834 Self
3835 }
3836 }
3837
3838 #[cfg(target_os = "fuchsia")]
3839
3840 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_runner::ComponentControllerProxy>
3841 for crate::ComponentController
3842 {
3843 fn client_compat_from(
3844 proxy: ::fidl_fuchsia_component_runner::ComponentControllerProxy,
3845 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
3846 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
3847 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
3848 ::fidl_next::ClientDispatcher::new(client_end)
3849 }
3850 }
3851
3852 impl ::fidl_next::CompatFrom<crate::ComponentNamespaceEntry>
3853 for ::fidl_fuchsia_component_runner::ComponentNamespaceEntry
3854 {
3855 fn compat_from(value: crate::ComponentNamespaceEntry) -> Self {
3856 Self {
3857 path: ::fidl_next::CompatFrom::compat_from(value.path),
3858
3859 directory: ::fidl_next::CompatFrom::compat_from(value.directory),
3860
3861 __source_breaking: ::fidl::marker::SourceBreaking,
3862 }
3863 }
3864 }
3865
3866 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentNamespaceEntry>
3867 for crate::ComponentNamespaceEntry
3868 {
3869 fn compat_from(value: ::fidl_fuchsia_component_runner::ComponentNamespaceEntry) -> Self {
3870 Self {
3871 path: ::fidl_next::CompatFrom::compat_from(value.path),
3872
3873 directory: ::fidl_next::CompatFrom::compat_from(value.directory),
3874 }
3875 }
3876 }
3877
3878 impl ::fidl_next::CompatFrom<crate::ComponentStartInfo>
3879 for ::fidl_fuchsia_component_runner::ComponentStartInfo
3880 {
3881 fn compat_from(value: crate::ComponentStartInfo) -> Self {
3882 Self {
3883 resolved_url: ::fidl_next::CompatFrom::compat_from(value.resolved_url),
3884
3885 program: ::fidl_next::CompatFrom::compat_from(value.program),
3886
3887 ns: ::fidl_next::CompatFrom::compat_from(value.ns),
3888
3889 outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
3890
3891 runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
3892
3893 numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
3894
3895 encoded_config: ::fidl_next::CompatFrom::compat_from(value.encoded_config),
3896
3897 break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
3898
3899 component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
3900
3901 escrowed_dictionary: ::fidl_next::CompatFrom::compat_from(
3902 value.escrowed_dictionary,
3903 ),
3904
3905 __source_breaking: ::fidl::marker::SourceBreaking,
3906 }
3907 }
3908 }
3909
3910 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentStartInfo>
3911 for crate::ComponentStartInfo
3912 {
3913 fn compat_from(value: ::fidl_fuchsia_component_runner::ComponentStartInfo) -> Self {
3914 Self {
3915 resolved_url: ::fidl_next::CompatFrom::compat_from(value.resolved_url),
3916
3917 program: ::fidl_next::CompatFrom::compat_from(value.program),
3918
3919 ns: ::fidl_next::CompatFrom::compat_from(value.ns),
3920
3921 outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
3922
3923 runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
3924
3925 numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
3926
3927 encoded_config: ::fidl_next::CompatFrom::compat_from(value.encoded_config),
3928
3929 break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
3930
3931 component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
3932
3933 escrowed_dictionary: ::fidl_next::CompatFrom::compat_from(
3934 value.escrowed_dictionary,
3935 ),
3936 }
3937 }
3938 }
3939
3940 impl ::fidl_next::CompatFrom<crate::ComponentRunnerStartRequest>
3941 for ::fidl_fuchsia_component_runner::ComponentRunnerStartRequest
3942 {
3943 #[inline]
3944 fn compat_from(value: crate::ComponentRunnerStartRequest) -> Self {
3945 Self {
3946 start_info: ::fidl_next::CompatFrom::compat_from(value.start_info),
3947
3948 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
3949 }
3950 }
3951 }
3952
3953 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentRunnerStartRequest>
3954 for crate::ComponentRunnerStartRequest
3955 {
3956 #[inline]
3957 fn compat_from(
3958 value: ::fidl_fuchsia_component_runner::ComponentRunnerStartRequest,
3959 ) -> Self {
3960 Self {
3961 start_info: ::fidl_next::CompatFrom::compat_from(value.start_info),
3962
3963 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
3964 }
3965 }
3966 }
3967
3968 #[cfg(target_os = "fuchsia")]
3969 pub type ComponentRunnerProxy = ::fidl_next::Client<crate::ComponentRunner>;
3972
3973 impl ::fidl_next::CompatFrom<crate::ComponentRunner>
3974 for ::fidl_fuchsia_component_runner::ComponentRunnerMarker
3975 {
3976 fn compat_from(_: crate::ComponentRunner) -> Self {
3977 Self
3978 }
3979 }
3980
3981 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::ComponentRunnerMarker>
3982 for crate::ComponentRunner
3983 {
3984 fn compat_from(_: ::fidl_fuchsia_component_runner::ComponentRunnerMarker) -> Self {
3985 Self
3986 }
3987 }
3988
3989 #[cfg(target_os = "fuchsia")]
3990
3991 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_runner::ComponentRunnerProxy>
3992 for crate::ComponentRunner
3993 {
3994 fn client_compat_from(
3995 proxy: ::fidl_fuchsia_component_runner::ComponentRunnerProxy,
3996 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
3997 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
3998 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
3999 ::fidl_next::ClientDispatcher::new(client_end)
4000 }
4001 }
4002
4003 impl ::fidl_next::CompatFrom<crate::TaskProviderGetJobResponse>
4004 for ::fidl_fuchsia_component_runner::TaskProviderGetJobResponse
4005 {
4006 #[inline]
4007 fn compat_from(value: crate::TaskProviderGetJobResponse) -> Self {
4008 Self { job: ::fidl_next::CompatFrom::compat_from(value.job) }
4009 }
4010 }
4011
4012 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::TaskProviderGetJobResponse>
4013 for crate::TaskProviderGetJobResponse
4014 {
4015 #[inline]
4016 fn compat_from(value: ::fidl_fuchsia_component_runner::TaskProviderGetJobResponse) -> Self {
4017 Self { job: ::fidl_next::CompatFrom::compat_from(value.job) }
4018 }
4019 }
4020
4021 #[cfg(target_os = "fuchsia")]
4022 pub type TaskProviderProxy = ::fidl_next::Client<crate::TaskProvider>;
4025
4026 impl ::fidl_next::CompatFrom<crate::TaskProvider>
4027 for ::fidl_fuchsia_component_runner::TaskProviderMarker
4028 {
4029 fn compat_from(_: crate::TaskProvider) -> Self {
4030 Self
4031 }
4032 }
4033
4034 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_runner::TaskProviderMarker>
4035 for crate::TaskProvider
4036 {
4037 fn compat_from(_: ::fidl_fuchsia_component_runner::TaskProviderMarker) -> Self {
4038 Self
4039 }
4040 }
4041
4042 #[cfg(target_os = "fuchsia")]
4043
4044 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_runner::TaskProviderProxy>
4045 for crate::TaskProvider
4046 {
4047 fn client_compat_from(
4048 proxy: ::fidl_fuchsia_component_runner::TaskProviderProxy,
4049 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
4050 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
4051 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
4052 ::fidl_next::ClientDispatcher::new(client_end)
4053 }
4054 }
4055}