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::natural::*;
8
9 #[doc = " Payload for CapabilityRequested events\n"]
10 #[derive(Debug, Default, PartialEq)]
11 pub struct CapabilityRequestedPayload {
12 pub name: ::core::option::Option<::std::string::String>,
13
14 pub capability: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
15 }
16
17 impl CapabilityRequestedPayload {
18 fn __max_ordinal(&self) -> usize {
19 if self.capability.is_some() {
20 return 2;
21 }
22
23 if self.name.is_some() {
24 return 1;
25 }
26
27 0
28 }
29 }
30
31 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityRequestedPayload<'static>, ___E>
32 for CapabilityRequestedPayload
33 where
34 ___E: ::fidl_next::Encoder + ?Sized,
35 ___E: ::fidl_next::fuchsia::HandleEncoder,
36 {
37 #[inline]
38 fn encode(
39 mut self,
40 encoder: &mut ___E,
41 out: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityRequestedPayload<'static>>,
42 _: (),
43 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
44 ::fidl_next::munge!(let crate::wire::CapabilityRequestedPayload { table } = out);
45
46 let max_ord = self.__max_ordinal();
47
48 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
49 ::fidl_next::Wire::zero_padding(&mut out);
50
51 let mut preallocated =
52 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
53
54 for i in 1..=max_ord {
55 match i {
56 2 => {
57 if let Some(value) = self.capability.take() {
58 ::fidl_next::WireEnvelope::encode_value::<
59 ::fidl_next::fuchsia::WireChannel,
60 ___E,
61 >(
62 value, preallocated.encoder, &mut out, ()
63 )?;
64 } else {
65 ::fidl_next::WireEnvelope::encode_zero(&mut out)
66 }
67 }
68
69 1 => {
70 if let Some(value) = self.name.take() {
71 ::fidl_next::WireEnvelope::encode_value::<
72 ::fidl_next::WireString<'static>,
73 ___E,
74 >(
75 value, preallocated.encoder, &mut out, 255
76 )?;
77 } else {
78 ::fidl_next::WireEnvelope::encode_zero(&mut out)
79 }
80 }
81
82 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
83 }
84 unsafe {
85 preallocated.write_next(out.assume_init_ref());
86 }
87 }
88
89 ::fidl_next::WireTable::encode_len(table, max_ord);
90
91 Ok(())
92 }
93 }
94
95 impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityRequestedPayload<'de>>
96 for CapabilityRequestedPayload
97 {
98 #[inline]
99 fn from_wire(wire_: crate::wire::CapabilityRequestedPayload<'de>) -> Self {
100 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
101
102 let name = wire_.table.get(1);
103
104 let capability = wire_.table.get(2);
105
106 Self {
107 name: name.map(|envelope| {
108 ::fidl_next::FromWire::from_wire(unsafe {
109 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
110 })
111 }),
112
113 capability: capability.map(|envelope| {
114 ::fidl_next::FromWire::from_wire(unsafe {
115 envelope.read_unchecked::<::fidl_next::fuchsia::WireChannel>()
116 })
117 }),
118 }
119 }
120 }
121
122 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
123 #[repr(C)]
124 pub struct ControllerIsStartedResponse {
125 pub is_started: bool,
126 }
127
128 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ControllerIsStartedResponse, ___E>
129 for ControllerIsStartedResponse
130 where
131 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
132 ___E: ::fidl_next::fuchsia::HandleEncoder,
133 {
134 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
135 Self,
136 crate::wire::ControllerIsStartedResponse,
137 > = unsafe {
138 ::fidl_next::CopyOptimization::enable_if(
139 true && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled(),
140 )
141 };
142
143 #[inline]
144 fn encode(
145 self,
146 encoder_: &mut ___E,
147 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerIsStartedResponse>,
148 _: (),
149 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
150 ::fidl_next::munge! {
151 let crate::wire::ControllerIsStartedResponse {
152 is_started,
153
154 } = out_;
155 }
156
157 ::fidl_next::Encode::encode(self.is_started, encoder_, is_started, ())?;
158
159 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(is_started.as_mut_ptr()) };
160
161 Ok(())
162 }
163 }
164
165 unsafe impl<___E>
166 ::fidl_next::EncodeOption<
167 ::fidl_next::WireBox<'static, crate::wire::ControllerIsStartedResponse>,
168 ___E,
169 > for ControllerIsStartedResponse
170 where
171 ___E: ::fidl_next::Encoder + ?Sized,
172 ControllerIsStartedResponse:
173 ::fidl_next::Encode<crate::wire::ControllerIsStartedResponse, ___E>,
174 {
175 #[inline]
176 fn encode_option(
177 this: ::core::option::Option<Self>,
178 encoder: &mut ___E,
179 out: &mut ::core::mem::MaybeUninit<
180 ::fidl_next::WireBox<'static, crate::wire::ControllerIsStartedResponse>,
181 >,
182 _: (),
183 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
184 if let Some(inner) = this {
185 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
186 ::fidl_next::WireBox::encode_present(out);
187 } else {
188 ::fidl_next::WireBox::encode_absent(out);
189 }
190
191 Ok(())
192 }
193 }
194
195 impl ::fidl_next::FromWire<crate::wire::ControllerIsStartedResponse>
196 for ControllerIsStartedResponse
197 {
198 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
199 crate::wire::ControllerIsStartedResponse,
200 Self,
201 > = unsafe {
202 ::fidl_next::CopyOptimization::enable_if(
203 true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
204 )
205 };
206
207 #[inline]
208 fn from_wire(wire: crate::wire::ControllerIsStartedResponse) -> Self {
209 Self { is_started: ::fidl_next::FromWire::from_wire(wire.is_started) }
210 }
211 }
212
213 #[derive(Debug, PartialEq)]
214 #[repr(C)]
215 pub struct ControllerGetExposedDictionaryResponse {
216 pub dictionary: ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef,
217 }
218
219 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ControllerGetExposedDictionaryResponse, ___E>
220 for ControllerGetExposedDictionaryResponse
221 where
222 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
223 ___E: ::fidl_next::fuchsia::HandleEncoder,
224 {
225 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
226 Self,
227 crate::wire::ControllerGetExposedDictionaryResponse,
228 > = unsafe {
229 ::fidl_next::CopyOptimization::enable_if(
230 true
231
232 && <
233 ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef as ::fidl_next::Encode<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef, ___E>
234 >::COPY_OPTIMIZATION.is_enabled()
235
236 )
237 };
238
239 #[inline]
240 fn encode(
241 self,
242 encoder_: &mut ___E,
243 out_: &mut ::core::mem::MaybeUninit<
244 crate::wire::ControllerGetExposedDictionaryResponse,
245 >,
246 _: (),
247 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
248 ::fidl_next::munge! {
249 let crate::wire::ControllerGetExposedDictionaryResponse {
250 dictionary,
251
252 } = out_;
253 }
254
255 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
256
257 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dictionary.as_mut_ptr()) };
258
259 Ok(())
260 }
261 }
262
263 unsafe impl<___E>
264 ::fidl_next::EncodeOption<
265 ::fidl_next::WireBox<'static, crate::wire::ControllerGetExposedDictionaryResponse>,
266 ___E,
267 > for ControllerGetExposedDictionaryResponse
268 where
269 ___E: ::fidl_next::Encoder + ?Sized,
270 ControllerGetExposedDictionaryResponse:
271 ::fidl_next::Encode<crate::wire::ControllerGetExposedDictionaryResponse, ___E>,
272 {
273 #[inline]
274 fn encode_option(
275 this: ::core::option::Option<Self>,
276 encoder: &mut ___E,
277 out: &mut ::core::mem::MaybeUninit<
278 ::fidl_next::WireBox<'static, crate::wire::ControllerGetExposedDictionaryResponse>,
279 >,
280 _: (),
281 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
282 if let Some(inner) = this {
283 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
284 ::fidl_next::WireBox::encode_present(out);
285 } else {
286 ::fidl_next::WireBox::encode_absent(out);
287 }
288
289 Ok(())
290 }
291 }
292
293 impl ::fidl_next::FromWire<crate::wire::ControllerGetExposedDictionaryResponse>
294 for ControllerGetExposedDictionaryResponse
295 {
296 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
297 crate::wire::ControllerGetExposedDictionaryResponse,
298 Self,
299 > = unsafe {
300 ::fidl_next::CopyOptimization::enable_if(
301 true
302
303 && <
304 ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef as ::fidl_next::FromWire<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
305 >::COPY_OPTIMIZATION.is_enabled()
306
307 )
308 };
309
310 #[inline]
311 fn from_wire(wire: crate::wire::ControllerGetExposedDictionaryResponse) -> Self {
312 Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
313 }
314 }
315
316 #[derive(Debug, PartialEq)]
317 #[repr(C)]
318 pub struct ControllerGetOutputDictionaryResponse {
319 pub dictionary: ::fidl_next::fuchsia::zx::EventPair,
320 }
321
322 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ControllerGetOutputDictionaryResponse, ___E>
323 for ControllerGetOutputDictionaryResponse
324 where
325 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
326 ___E: ::fidl_next::fuchsia::HandleEncoder,
327 {
328 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
329 Self,
330 crate::wire::ControllerGetOutputDictionaryResponse,
331 > = unsafe {
332 ::fidl_next::CopyOptimization::enable_if(
333 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
334 ::fidl_next::fuchsia::WireEventPair,
335 ___E,
336 >>::COPY_OPTIMIZATION
337 .is_enabled(),
338 )
339 };
340
341 #[inline]
342 fn encode(
343 self,
344 encoder_: &mut ___E,
345 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerGetOutputDictionaryResponse>,
346 _: (),
347 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
348 ::fidl_next::munge! {
349 let crate::wire::ControllerGetOutputDictionaryResponse {
350 dictionary,
351
352 } = out_;
353 }
354
355 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
356
357 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dictionary.as_mut_ptr()) };
358
359 Ok(())
360 }
361 }
362
363 unsafe impl<___E>
364 ::fidl_next::EncodeOption<
365 ::fidl_next::WireBox<'static, crate::wire::ControllerGetOutputDictionaryResponse>,
366 ___E,
367 > for ControllerGetOutputDictionaryResponse
368 where
369 ___E: ::fidl_next::Encoder + ?Sized,
370 ControllerGetOutputDictionaryResponse:
371 ::fidl_next::Encode<crate::wire::ControllerGetOutputDictionaryResponse, ___E>,
372 {
373 #[inline]
374 fn encode_option(
375 this: ::core::option::Option<Self>,
376 encoder: &mut ___E,
377 out: &mut ::core::mem::MaybeUninit<
378 ::fidl_next::WireBox<'static, crate::wire::ControllerGetOutputDictionaryResponse>,
379 >,
380 _: (),
381 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
382 if let Some(inner) = this {
383 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
384 ::fidl_next::WireBox::encode_present(out);
385 } else {
386 ::fidl_next::WireBox::encode_absent(out);
387 }
388
389 Ok(())
390 }
391 }
392
393 impl ::fidl_next::FromWire<crate::wire::ControllerGetOutputDictionaryResponse>
394 for ControllerGetOutputDictionaryResponse
395 {
396 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
397 crate::wire::ControllerGetOutputDictionaryResponse,
398 Self,
399 > = unsafe {
400 ::fidl_next::CopyOptimization::enable_if(
401 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
402 ::fidl_next::fuchsia::WireEventPair,
403 >>::COPY_OPTIMIZATION
404 .is_enabled(),
405 )
406 };
407
408 #[inline]
409 fn from_wire(wire: crate::wire::ControllerGetOutputDictionaryResponse) -> Self {
410 Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
411 }
412 }
413
414 #[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"]
415 #[derive(Debug, Default, PartialEq)]
416 pub struct NamespaceEntry {
417 pub path: ::core::option::Option<::std::string::String>,
418
419 pub directory: ::core::option::Option<
420 ::fidl_next::ClientEnd<
421 ::fidl_next_fuchsia_io::Directory,
422 ::fidl_next::fuchsia::zx::Channel,
423 >,
424 >,
425 }
426
427 impl NamespaceEntry {
428 fn __max_ordinal(&self) -> usize {
429 if self.directory.is_some() {
430 return 2;
431 }
432
433 if self.path.is_some() {
434 return 1;
435 }
436
437 0
438 }
439 }
440
441 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NamespaceEntry<'static>, ___E> for NamespaceEntry
442 where
443 ___E: ::fidl_next::Encoder + ?Sized,
444 ___E: ::fidl_next::fuchsia::HandleEncoder,
445 {
446 #[inline]
447 fn encode(
448 mut self,
449 encoder: &mut ___E,
450 out: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceEntry<'static>>,
451 _: (),
452 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
453 ::fidl_next::munge!(let crate::wire::NamespaceEntry { table } = out);
454
455 let max_ord = self.__max_ordinal();
456
457 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
458 ::fidl_next::Wire::zero_padding(&mut out);
459
460 let mut preallocated =
461 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
462
463 for i in 1..=max_ord {
464 match i {
465 2 => {
466 if let Some(value) = self.directory.take() {
467 ::fidl_next::WireEnvelope::encode_value::<
468 ::fidl_next::ClientEnd<
469 ::fidl_next_fuchsia_io::Directory,
470 ::fidl_next::fuchsia::WireChannel,
471 >,
472 ___E,
473 >(
474 value, preallocated.encoder, &mut out, ()
475 )?;
476 } else {
477 ::fidl_next::WireEnvelope::encode_zero(&mut out)
478 }
479 }
480
481 1 => {
482 if let Some(value) = self.path.take() {
483 ::fidl_next::WireEnvelope::encode_value::<
484 ::fidl_next::WireString<'static>,
485 ___E,
486 >(
487 value, preallocated.encoder, &mut out, 4095
488 )?;
489 } else {
490 ::fidl_next::WireEnvelope::encode_zero(&mut out)
491 }
492 }
493
494 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
495 }
496 unsafe {
497 preallocated.write_next(out.assume_init_ref());
498 }
499 }
500
501 ::fidl_next::WireTable::encode_len(table, max_ord);
502
503 Ok(())
504 }
505 }
506
507 impl<'de> ::fidl_next::FromWire<crate::wire::NamespaceEntry<'de>> for NamespaceEntry {
508 #[inline]
509 fn from_wire(wire_: crate::wire::NamespaceEntry<'de>) -> Self {
510 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
511
512 let path = wire_.table.get(1);
513
514 let directory = wire_.table.get(2);
515
516 Self {
517 path: path.map(|envelope| {
518 ::fidl_next::FromWire::from_wire(unsafe {
519 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
520 })
521 }),
522
523 directory: directory.map(|envelope| {
524 ::fidl_next::FromWire::from_wire(unsafe {
525 envelope.read_unchecked::<::fidl_next::ClientEnd<
526 ::fidl_next_fuchsia_io::Directory,
527 ::fidl_next::fuchsia::WireChannel,
528 >>()
529 })
530 }),
531 }
532 }
533 }
534
535 #[derive(Debug, Default, PartialEq)]
536 pub struct StartChildArgs {
537 pub numbered_handles: ::core::option::Option<
538 ::std::vec::Vec<::fidl_next_fuchsia_process::natural::HandleInfo>,
539 >,
540
541 pub namespace_entries:
542 ::core::option::Option<::std::vec::Vec<crate::natural::NamespaceEntry>>,
543
544 pub dictionary:
545 ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
546
547 pub additional_inputs: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
548 }
549
550 impl StartChildArgs {
551 fn __max_ordinal(&self) -> usize {
552 if self.additional_inputs.is_some() {
553 return 4;
554 }
555
556 if self.dictionary.is_some() {
557 return 3;
558 }
559
560 if self.namespace_entries.is_some() {
561 return 2;
562 }
563
564 if self.numbered_handles.is_some() {
565 return 1;
566 }
567
568 0
569 }
570 }
571
572 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StartChildArgs<'static>, ___E> for StartChildArgs
573 where
574 ___E: ::fidl_next::Encoder + ?Sized,
575 ___E: ::fidl_next::fuchsia::HandleEncoder,
576 {
577 #[inline]
578 fn encode(
579 mut self,
580 encoder: &mut ___E,
581 out: &mut ::core::mem::MaybeUninit<crate::wire::StartChildArgs<'static>>,
582 _: (),
583 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
584 ::fidl_next::munge!(let crate::wire::StartChildArgs { table } = out);
585
586 let max_ord = self.__max_ordinal();
587
588 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
589 ::fidl_next::Wire::zero_padding(&mut out);
590
591 let mut preallocated =
592 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
593
594 for i in 1..=max_ord {
595 match i {
596 4 => {
597 if let Some(value) = self.additional_inputs.take() {
598 ::fidl_next::WireEnvelope::encode_value::<
599 ::fidl_next::fuchsia::WireEventPair,
600 ___E,
601 >(
602 value, preallocated.encoder, &mut out, ()
603 )?;
604 } else {
605 ::fidl_next::WireEnvelope::encode_zero(&mut out)
606 }
607 }
608
609 3 => {
610 if let Some(value) = self.dictionary.take() {
611 ::fidl_next::WireEnvelope::encode_value::<
612 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
613 ___E,
614 >(
615 value, preallocated.encoder, &mut out, ()
616 )?;
617 } else {
618 ::fidl_next::WireEnvelope::encode_zero(&mut out)
619 }
620 }
621
622 2 => {
623 if let Some(value) = self.namespace_entries.take() {
624 ::fidl_next::WireEnvelope::encode_value::<
625 ::fidl_next::WireVector<
626 'static,
627 crate::wire::NamespaceEntry<'static>,
628 >,
629 ___E,
630 >(
631 value, preallocated.encoder, &mut out, (32, ())
632 )?;
633 } else {
634 ::fidl_next::WireEnvelope::encode_zero(&mut out)
635 }
636 }
637
638 1 => {
639 if let Some(value) = self.numbered_handles.take() {
640 ::fidl_next::WireEnvelope::encode_value::<
641 ::fidl_next::WireVector<
642 'static,
643 ::fidl_next_fuchsia_process::wire::HandleInfo,
644 >,
645 ___E,
646 >(
647 value, preallocated.encoder, &mut out, (128, ())
648 )?;
649 } else {
650 ::fidl_next::WireEnvelope::encode_zero(&mut out)
651 }
652 }
653
654 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
655 }
656 unsafe {
657 preallocated.write_next(out.assume_init_ref());
658 }
659 }
660
661 ::fidl_next::WireTable::encode_len(table, max_ord);
662
663 Ok(())
664 }
665 }
666
667 impl<'de> ::fidl_next::FromWire<crate::wire::StartChildArgs<'de>> for StartChildArgs {
668 #[inline]
669 fn from_wire(wire_: crate::wire::StartChildArgs<'de>) -> Self {
670 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
671
672 let numbered_handles = wire_.table.get(1);
673
674 let namespace_entries = wire_.table.get(2);
675
676 let dictionary = wire_.table.get(3);
677
678 let additional_inputs = wire_.table.get(4);
679
680 Self {
681
682
683 numbered_handles: numbered_handles.map(|envelope| ::fidl_next::FromWire::from_wire(
684 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>() }
685 )),
686
687
688 namespace_entries: namespace_entries.map(|envelope| ::fidl_next::FromWire::from_wire(
689 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NamespaceEntry<'de>>>() }
690 )),
691
692
693 dictionary: dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
694 unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
695 )),
696
697
698 additional_inputs: additional_inputs.map(|envelope| ::fidl_next::FromWire::from_wire(
699 unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>() }
700 )),
701
702 }
703 }
704 }
705
706 #[derive(Debug, PartialEq)]
707 pub struct ControllerStartRequest {
708 pub args: crate::natural::StartChildArgs,
709
710 pub execution_controller:
711 ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::fuchsia::zx::Channel>,
712 }
713
714 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ControllerStartRequest<'static>, ___E>
715 for ControllerStartRequest
716 where
717 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
718 ___E: ::fidl_next::Encoder,
719 ___E: ::fidl_next::fuchsia::HandleEncoder,
720 {
721 #[inline]
722 fn encode(
723 self,
724 encoder_: &mut ___E,
725 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerStartRequest<'static>>,
726 _: (),
727 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
728 ::fidl_next::munge! {
729 let crate::wire::ControllerStartRequest {
730 args,
731 execution_controller,
732
733 } = out_;
734 }
735
736 ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
737
738 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(args.as_mut_ptr()) };
739
740 ::fidl_next::Encode::encode(
741 self.execution_controller,
742 encoder_,
743 execution_controller,
744 (),
745 )?;
746
747 let mut _field =
748 unsafe { ::fidl_next::Slot::new_unchecked(execution_controller.as_mut_ptr()) };
749
750 Ok(())
751 }
752 }
753
754 unsafe impl<___E>
755 ::fidl_next::EncodeOption<
756 ::fidl_next::WireBox<'static, crate::wire::ControllerStartRequest<'static>>,
757 ___E,
758 > for ControllerStartRequest
759 where
760 ___E: ::fidl_next::Encoder + ?Sized,
761 ControllerStartRequest:
762 ::fidl_next::Encode<crate::wire::ControllerStartRequest<'static>, ___E>,
763 {
764 #[inline]
765 fn encode_option(
766 this: ::core::option::Option<Self>,
767 encoder: &mut ___E,
768 out: &mut ::core::mem::MaybeUninit<
769 ::fidl_next::WireBox<'static, crate::wire::ControllerStartRequest<'static>>,
770 >,
771 _: (),
772 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
773 if let Some(inner) = this {
774 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
775 ::fidl_next::WireBox::encode_present(out);
776 } else {
777 ::fidl_next::WireBox::encode_absent(out);
778 }
779
780 Ok(())
781 }
782 }
783
784 impl<'de> ::fidl_next::FromWire<crate::wire::ControllerStartRequest<'de>>
785 for ControllerStartRequest
786 {
787 #[inline]
788 fn from_wire(wire: crate::wire::ControllerStartRequest<'de>) -> Self {
789 Self {
790 args: ::fidl_next::FromWire::from_wire(wire.args),
791
792 execution_controller: ::fidl_next::FromWire::from_wire(wire.execution_controller),
793 }
794 }
795 }
796
797 #[derive(Debug, PartialEq)]
798 #[repr(C)]
799 pub struct ControllerOpenExposedDirRequest {
800 pub exposed_dir: ::fidl_next::ServerEnd<
801 ::fidl_next_fuchsia_io::Directory,
802 ::fidl_next::fuchsia::zx::Channel,
803 >,
804 }
805
806 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ControllerOpenExposedDirRequest, ___E>
807 for ControllerOpenExposedDirRequest
808 where
809 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
810 ___E: ::fidl_next::fuchsia::HandleEncoder,
811 {
812 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
813 Self,
814 crate::wire::ControllerOpenExposedDirRequest,
815 > = unsafe {
816 ::fidl_next::CopyOptimization::enable_if(
817 true && <::fidl_next::ServerEnd<
818 ::fidl_next_fuchsia_io::Directory,
819 ::fidl_next::fuchsia::zx::Channel,
820 > as ::fidl_next::Encode<
821 ::fidl_next::ServerEnd<
822 ::fidl_next_fuchsia_io::Directory,
823 ::fidl_next::fuchsia::WireChannel,
824 >,
825 ___E,
826 >>::COPY_OPTIMIZATION
827 .is_enabled(),
828 )
829 };
830
831 #[inline]
832 fn encode(
833 self,
834 encoder_: &mut ___E,
835 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerOpenExposedDirRequest>,
836 _: (),
837 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
838 ::fidl_next::munge! {
839 let crate::wire::ControllerOpenExposedDirRequest {
840 exposed_dir,
841
842 } = out_;
843 }
844
845 ::fidl_next::Encode::encode(self.exposed_dir, encoder_, exposed_dir, ())?;
846
847 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(exposed_dir.as_mut_ptr()) };
848
849 Ok(())
850 }
851 }
852
853 unsafe impl<___E>
854 ::fidl_next::EncodeOption<
855 ::fidl_next::WireBox<'static, crate::wire::ControllerOpenExposedDirRequest>,
856 ___E,
857 > for ControllerOpenExposedDirRequest
858 where
859 ___E: ::fidl_next::Encoder + ?Sized,
860 ControllerOpenExposedDirRequest:
861 ::fidl_next::Encode<crate::wire::ControllerOpenExposedDirRequest, ___E>,
862 {
863 #[inline]
864 fn encode_option(
865 this: ::core::option::Option<Self>,
866 encoder: &mut ___E,
867 out: &mut ::core::mem::MaybeUninit<
868 ::fidl_next::WireBox<'static, crate::wire::ControllerOpenExposedDirRequest>,
869 >,
870 _: (),
871 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
872 if let Some(inner) = this {
873 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
874 ::fidl_next::WireBox::encode_present(out);
875 } else {
876 ::fidl_next::WireBox::encode_absent(out);
877 }
878
879 Ok(())
880 }
881 }
882
883 impl ::fidl_next::FromWire<crate::wire::ControllerOpenExposedDirRequest>
884 for ControllerOpenExposedDirRequest
885 {
886 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
887 crate::wire::ControllerOpenExposedDirRequest,
888 Self,
889 > = unsafe {
890 ::fidl_next::CopyOptimization::enable_if(
891 true && <::fidl_next::ServerEnd<
892 ::fidl_next_fuchsia_io::Directory,
893 ::fidl_next::fuchsia::zx::Channel,
894 > as ::fidl_next::FromWire<
895 ::fidl_next::ServerEnd<
896 ::fidl_next_fuchsia_io::Directory,
897 ::fidl_next::fuchsia::WireChannel,
898 >,
899 >>::COPY_OPTIMIZATION
900 .is_enabled(),
901 )
902 };
903
904 #[inline]
905 fn from_wire(wire: crate::wire::ControllerOpenExposedDirRequest) -> Self {
906 Self { exposed_dir: ::fidl_next::FromWire::from_wire(wire.exposed_dir) }
907 }
908 }
909
910 #[derive(Debug, Default, PartialEq)]
911 pub struct CreateChildArgs {
912 pub numbered_handles: ::core::option::Option<
913 ::std::vec::Vec<::fidl_next_fuchsia_process::natural::HandleInfo>,
914 >,
915
916 pub dynamic_offers: ::core::option::Option<
917 ::std::vec::Vec<::fidl_next_fuchsia_component_decl::natural::Offer>,
918 >,
919
920 pub controller: ::core::option::Option<
921 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::zx::Channel>,
922 >,
923
924 pub dictionary:
925 ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
926
927 pub additional_inputs: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
928 }
929
930 impl CreateChildArgs {
931 fn __max_ordinal(&self) -> usize {
932 if self.additional_inputs.is_some() {
933 return 5;
934 }
935
936 if self.dictionary.is_some() {
937 return 4;
938 }
939
940 if self.controller.is_some() {
941 return 3;
942 }
943
944 if self.dynamic_offers.is_some() {
945 return 2;
946 }
947
948 if self.numbered_handles.is_some() {
949 return 1;
950 }
951
952 0
953 }
954 }
955
956 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CreateChildArgs<'static>, ___E>
957 for CreateChildArgs
958 where
959 ___E: ::fidl_next::Encoder + ?Sized,
960 ___E: ::fidl_next::fuchsia::HandleEncoder,
961 {
962 #[inline]
963 fn encode(
964 mut self,
965 encoder: &mut ___E,
966 out: &mut ::core::mem::MaybeUninit<crate::wire::CreateChildArgs<'static>>,
967 _: (),
968 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
969 ::fidl_next::munge!(let crate::wire::CreateChildArgs { table } = out);
970
971 let max_ord = self.__max_ordinal();
972
973 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
974 ::fidl_next::Wire::zero_padding(&mut out);
975
976 let mut preallocated =
977 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
978
979 for i in 1..=max_ord {
980 match i {
981 5 => {
982 if let Some(value) = self.additional_inputs.take() {
983 ::fidl_next::WireEnvelope::encode_value::<
984 ::fidl_next::fuchsia::WireEventPair,
985 ___E,
986 >(
987 value, preallocated.encoder, &mut out, ()
988 )?;
989 } else {
990 ::fidl_next::WireEnvelope::encode_zero(&mut out)
991 }
992 }
993
994 4 => {
995 if let Some(value) = self.dictionary.take() {
996 ::fidl_next::WireEnvelope::encode_value::<
997 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
998 ___E,
999 >(
1000 value, preallocated.encoder, &mut out, ()
1001 )?;
1002 } else {
1003 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1004 }
1005 }
1006
1007 3 => {
1008 if let Some(value) = self.controller.take() {
1009 ::fidl_next::WireEnvelope::encode_value::<
1010 ::fidl_next::ServerEnd<
1011 crate::Controller,
1012 ::fidl_next::fuchsia::WireChannel,
1013 >,
1014 ___E,
1015 >(
1016 value, preallocated.encoder, &mut out, ()
1017 )?;
1018 } else {
1019 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1020 }
1021 }
1022
1023 2 => {
1024 if let Some(value) = self.dynamic_offers.take() {
1025 ::fidl_next::WireEnvelope::encode_value::<
1026 ::fidl_next::WireVector<
1027 'static,
1028 ::fidl_next_fuchsia_component_decl::wire::Offer<'static>,
1029 >,
1030 ___E,
1031 >(
1032 value, preallocated.encoder, &mut out, (128, ())
1033 )?;
1034 } else {
1035 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1036 }
1037 }
1038
1039 1 => {
1040 if let Some(value) = self.numbered_handles.take() {
1041 ::fidl_next::WireEnvelope::encode_value::<
1042 ::fidl_next::WireVector<
1043 'static,
1044 ::fidl_next_fuchsia_process::wire::HandleInfo,
1045 >,
1046 ___E,
1047 >(
1048 value, preallocated.encoder, &mut out, (128, ())
1049 )?;
1050 } else {
1051 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1052 }
1053 }
1054
1055 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1056 }
1057 unsafe {
1058 preallocated.write_next(out.assume_init_ref());
1059 }
1060 }
1061
1062 ::fidl_next::WireTable::encode_len(table, max_ord);
1063
1064 Ok(())
1065 }
1066 }
1067
1068 impl<'de> ::fidl_next::FromWire<crate::wire::CreateChildArgs<'de>> for CreateChildArgs {
1069 #[inline]
1070 fn from_wire(wire_: crate::wire::CreateChildArgs<'de>) -> Self {
1071 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1072
1073 let numbered_handles = wire_.table.get(1);
1074
1075 let dynamic_offers = wire_.table.get(2);
1076
1077 let controller = wire_.table.get(3);
1078
1079 let dictionary = wire_.table.get(4);
1080
1081 let additional_inputs = wire_.table.get(5);
1082
1083 Self {
1084
1085
1086 numbered_handles: numbered_handles.map(|envelope| ::fidl_next::FromWire::from_wire(
1087 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>() }
1088 )),
1089
1090
1091 dynamic_offers: dynamic_offers.map(|envelope| ::fidl_next::FromWire::from_wire(
1092 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::wire::Offer<'de>>>() }
1093 )),
1094
1095
1096 controller: controller.map(|envelope| ::fidl_next::FromWire::from_wire(
1097 unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>>() }
1098 )),
1099
1100
1101 dictionary: dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1102 unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
1103 )),
1104
1105
1106 additional_inputs: additional_inputs.map(|envelope| ::fidl_next::FromWire::from_wire(
1107 unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>() }
1108 )),
1109
1110 }
1111 }
1112 }
1113
1114 #[doc = " Payload for DebugStarted events.\n"]
1115 #[derive(Debug, Default, PartialEq)]
1116 pub struct DebugStartedPayload {
1117 pub runtime_dir: ::core::option::Option<
1118 ::fidl_next::ClientEnd<
1119 ::fidl_next_fuchsia_io::Directory,
1120 ::fidl_next::fuchsia::zx::Channel,
1121 >,
1122 >,
1123
1124 pub break_on_start: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
1125 }
1126
1127 impl DebugStartedPayload {
1128 fn __max_ordinal(&self) -> usize {
1129 if self.break_on_start.is_some() {
1130 return 2;
1131 }
1132
1133 if self.runtime_dir.is_some() {
1134 return 1;
1135 }
1136
1137 0
1138 }
1139 }
1140
1141 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DebugStartedPayload<'static>, ___E>
1142 for DebugStartedPayload
1143 where
1144 ___E: ::fidl_next::Encoder + ?Sized,
1145 ___E: ::fidl_next::fuchsia::HandleEncoder,
1146 {
1147 #[inline]
1148 fn encode(
1149 mut self,
1150 encoder: &mut ___E,
1151 out: &mut ::core::mem::MaybeUninit<crate::wire::DebugStartedPayload<'static>>,
1152 _: (),
1153 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1154 ::fidl_next::munge!(let crate::wire::DebugStartedPayload { table } = out);
1155
1156 let max_ord = self.__max_ordinal();
1157
1158 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1159 ::fidl_next::Wire::zero_padding(&mut out);
1160
1161 let mut preallocated =
1162 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1163
1164 for i in 1..=max_ord {
1165 match i {
1166 2 => {
1167 if let Some(value) = self.break_on_start.take() {
1168 ::fidl_next::WireEnvelope::encode_value::<
1169 ::fidl_next::fuchsia::WireEventPair,
1170 ___E,
1171 >(
1172 value, preallocated.encoder, &mut out, ()
1173 )?;
1174 } else {
1175 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1176 }
1177 }
1178
1179 1 => {
1180 if let Some(value) = self.runtime_dir.take() {
1181 ::fidl_next::WireEnvelope::encode_value::<
1182 ::fidl_next::ClientEnd<
1183 ::fidl_next_fuchsia_io::Directory,
1184 ::fidl_next::fuchsia::WireChannel,
1185 >,
1186 ___E,
1187 >(
1188 value, preallocated.encoder, &mut out, ()
1189 )?;
1190 } else {
1191 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1192 }
1193 }
1194
1195 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1196 }
1197 unsafe {
1198 preallocated.write_next(out.assume_init_ref());
1199 }
1200 }
1201
1202 ::fidl_next::WireTable::encode_len(table, max_ord);
1203
1204 Ok(())
1205 }
1206 }
1207
1208 impl<'de> ::fidl_next::FromWire<crate::wire::DebugStartedPayload<'de>> for DebugStartedPayload {
1209 #[inline]
1210 fn from_wire(wire_: crate::wire::DebugStartedPayload<'de>) -> Self {
1211 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1212
1213 let runtime_dir = wire_.table.get(1);
1214
1215 let break_on_start = wire_.table.get(2);
1216
1217 Self {
1218 runtime_dir: runtime_dir.map(|envelope| {
1219 ::fidl_next::FromWire::from_wire(unsafe {
1220 envelope.read_unchecked::<::fidl_next::ClientEnd<
1221 ::fidl_next_fuchsia_io::Directory,
1222 ::fidl_next::fuchsia::WireChannel,
1223 >>()
1224 })
1225 }),
1226
1227 break_on_start: break_on_start.map(|envelope| {
1228 ::fidl_next::FromWire::from_wire(unsafe {
1229 envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
1230 })
1231 }),
1232 }
1233 }
1234 }
1235
1236 #[doc = " Encapsulates additional data/protocols for some event types.\n"]
1237 #[derive(Debug, PartialEq)]
1238 pub enum EventPayload {
1239 CapabilityRequested(crate::natural::CapabilityRequestedPayload),
1240
1241 Purged(crate::natural::PurgedPayload),
1242
1243 Discovered(crate::natural::DiscoveredPayload),
1244
1245 Destroyed(crate::natural::DestroyedPayload),
1246
1247 Resolved(crate::natural::ResolvedPayload),
1248
1249 Started(crate::natural::StartedPayload),
1250
1251 Stopped(crate::natural::StoppedPayload),
1252
1253 DebugStarted(crate::natural::DebugStartedPayload),
1254
1255 Unresolved(crate::natural::UnresolvedPayload),
1256
1257 UnknownOrdinal_(u64),
1258 }
1259
1260 impl EventPayload {
1261 pub fn is_unknown(&self) -> bool {
1262 #[allow(unreachable_patterns)]
1263 match self {
1264 Self::UnknownOrdinal_(_) => true,
1265 _ => false,
1266 }
1267 }
1268 }
1269
1270 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EventPayload<'static>, ___E> for EventPayload
1271 where
1272 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1273 ___E: ::fidl_next::Encoder,
1274 ___E: ::fidl_next::fuchsia::HandleEncoder,
1275 {
1276 #[inline]
1277 fn encode(
1278 self,
1279 encoder: &mut ___E,
1280 out: &mut ::core::mem::MaybeUninit<crate::wire::EventPayload<'static>>,
1281 _: (),
1282 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1283 ::fidl_next::munge!(let crate::wire::EventPayload { raw, _phantom: _ } = out);
1284
1285 match self {
1286 Self::CapabilityRequested(value) => ::fidl_next::RawWireUnion::encode_as::<
1287 ___E,
1288 crate::wire::CapabilityRequestedPayload<'static>,
1289 >(value, 1, encoder, raw, ())?,
1290
1291 Self::Purged(value) => ::fidl_next::RawWireUnion::encode_as::<
1292 ___E,
1293 crate::wire::PurgedPayload<'static>,
1294 >(value, 2, encoder, raw, ())?,
1295
1296 Self::Discovered(value) => ::fidl_next::RawWireUnion::encode_as::<
1297 ___E,
1298 crate::wire::DiscoveredPayload<'static>,
1299 >(value, 4, encoder, raw, ())?,
1300
1301 Self::Destroyed(value) => ::fidl_next::RawWireUnion::encode_as::<
1302 ___E,
1303 crate::wire::DestroyedPayload<'static>,
1304 >(value, 5, encoder, raw, ())?,
1305
1306 Self::Resolved(value) => ::fidl_next::RawWireUnion::encode_as::<
1307 ___E,
1308 crate::wire::ResolvedPayload<'static>,
1309 >(value, 6, encoder, raw, ())?,
1310
1311 Self::Started(value) => ::fidl_next::RawWireUnion::encode_as::<
1312 ___E,
1313 crate::wire::StartedPayload<'static>,
1314 >(value, 7, encoder, raw, ())?,
1315
1316 Self::Stopped(value) => ::fidl_next::RawWireUnion::encode_as::<
1317 ___E,
1318 crate::wire::StoppedPayload<'static>,
1319 >(value, 8, encoder, raw, ())?,
1320
1321 Self::DebugStarted(value) => ::fidl_next::RawWireUnion::encode_as::<
1322 ___E,
1323 crate::wire::DebugStartedPayload<'static>,
1324 >(value, 9, encoder, raw, ())?,
1325
1326 Self::Unresolved(value) => ::fidl_next::RawWireUnion::encode_as::<
1327 ___E,
1328 crate::wire::UnresolvedPayload<'static>,
1329 >(value, 10, encoder, raw, ())?,
1330
1331 Self::UnknownOrdinal_(ordinal) => {
1332 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1333 }
1334 }
1335
1336 Ok(())
1337 }
1338 }
1339
1340 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::EventPayload<'static>, ___E>
1341 for EventPayload
1342 where
1343 ___E: ?Sized,
1344 EventPayload: ::fidl_next::Encode<crate::wire::EventPayload<'static>, ___E>,
1345 {
1346 #[inline]
1347 fn encode_option(
1348 this: ::core::option::Option<Self>,
1349 encoder: &mut ___E,
1350 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::EventPayload<'static>>,
1351 _: (),
1352 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1353 ::fidl_next::munge!(let crate::wire_optional::EventPayload { raw, _phantom: _ } = &mut *out);
1354
1355 if let Some(inner) = this {
1356 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1357 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1358 } else {
1359 ::fidl_next::RawWireUnion::encode_absent(raw);
1360 }
1361
1362 Ok(())
1363 }
1364 }
1365
1366 impl<'de> ::fidl_next::FromWire<crate::wire::EventPayload<'de>> for EventPayload {
1367 #[inline]
1368 fn from_wire(wire: crate::wire::EventPayload<'de>) -> Self {
1369 let wire = ::core::mem::ManuallyDrop::new(wire);
1370 match wire.raw.ordinal() {
1371 1 => Self::CapabilityRequested(::fidl_next::FromWire::from_wire(unsafe {
1372 wire.raw.get().read_unchecked::<crate::wire::CapabilityRequestedPayload<'de>>()
1373 })),
1374
1375 2 => Self::Purged(::fidl_next::FromWire::from_wire(unsafe {
1376 wire.raw.get().read_unchecked::<crate::wire::PurgedPayload<'de>>()
1377 })),
1378
1379 4 => Self::Discovered(::fidl_next::FromWire::from_wire(unsafe {
1380 wire.raw.get().read_unchecked::<crate::wire::DiscoveredPayload<'de>>()
1381 })),
1382
1383 5 => Self::Destroyed(::fidl_next::FromWire::from_wire(unsafe {
1384 wire.raw.get().read_unchecked::<crate::wire::DestroyedPayload<'de>>()
1385 })),
1386
1387 6 => Self::Resolved(::fidl_next::FromWire::from_wire(unsafe {
1388 wire.raw.get().read_unchecked::<crate::wire::ResolvedPayload<'de>>()
1389 })),
1390
1391 7 => Self::Started(::fidl_next::FromWire::from_wire(unsafe {
1392 wire.raw.get().read_unchecked::<crate::wire::StartedPayload<'de>>()
1393 })),
1394
1395 8 => Self::Stopped(::fidl_next::FromWire::from_wire(unsafe {
1396 wire.raw.get().read_unchecked::<crate::wire::StoppedPayload<'de>>()
1397 })),
1398
1399 9 => Self::DebugStarted(::fidl_next::FromWire::from_wire(unsafe {
1400 wire.raw.get().read_unchecked::<crate::wire::DebugStartedPayload<'de>>()
1401 })),
1402
1403 10 => Self::Unresolved(::fidl_next::FromWire::from_wire(unsafe {
1404 wire.raw.get().read_unchecked::<crate::wire::UnresolvedPayload<'de>>()
1405 })),
1406
1407 ord => return Self::UnknownOrdinal_(ord as u64),
1408 }
1409 }
1410 }
1411
1412 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::EventPayload<'de>> for EventPayload {
1413 #[inline]
1414 fn from_wire_option(
1415 wire: crate::wire_optional::EventPayload<'de>,
1416 ) -> ::core::option::Option<Self> {
1417 if let Some(inner) = wire.into_option() {
1418 Some(::fidl_next::FromWire::from_wire(inner))
1419 } else {
1420 None
1421 }
1422 }
1423 }
1424
1425 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::EventPayload<'de>>
1426 for Box<EventPayload>
1427 {
1428 #[inline]
1429 fn from_wire_option(
1430 wire: crate::wire_optional::EventPayload<'de>,
1431 ) -> ::core::option::Option<Self> {
1432 <
1433 EventPayload as ::fidl_next::FromWireOption<crate::wire_optional::EventPayload<'de>>
1434 >::from_wire_option(wire).map(Box::new)
1435 }
1436 }
1437
1438 #[doc = " Contains all information about a single event\n"]
1439 #[derive(Debug, Default, PartialEq)]
1440 pub struct Event {
1441 pub header: ::core::option::Option<crate::natural::EventHeader>,
1442
1443 pub payload: ::core::option::Option<crate::natural::EventPayload>,
1444 }
1445
1446 impl Event {
1447 fn __max_ordinal(&self) -> usize {
1448 if self.payload.is_some() {
1449 return 2;
1450 }
1451
1452 if self.header.is_some() {
1453 return 1;
1454 }
1455
1456 0
1457 }
1458 }
1459
1460 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Event<'static>, ___E> for Event
1461 where
1462 ___E: ::fidl_next::Encoder + ?Sized,
1463 ___E: ::fidl_next::fuchsia::HandleEncoder,
1464 {
1465 #[inline]
1466 fn encode(
1467 mut self,
1468 encoder: &mut ___E,
1469 out: &mut ::core::mem::MaybeUninit<crate::wire::Event<'static>>,
1470 _: (),
1471 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1472 ::fidl_next::munge!(let crate::wire::Event { table } = out);
1473
1474 let max_ord = self.__max_ordinal();
1475
1476 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1477 ::fidl_next::Wire::zero_padding(&mut out);
1478
1479 let mut preallocated =
1480 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1481
1482 for i in 1..=max_ord {
1483 match i {
1484 2 => {
1485 if let Some(value) = self.payload.take() {
1486 ::fidl_next::WireEnvelope::encode_value::<
1487 crate::wire::EventPayload<'static>,
1488 ___E,
1489 >(
1490 value, preallocated.encoder, &mut out, ()
1491 )?;
1492 } else {
1493 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1494 }
1495 }
1496
1497 1 => {
1498 if let Some(value) = self.header.take() {
1499 ::fidl_next::WireEnvelope::encode_value::<
1500 crate::wire::EventHeader<'static>,
1501 ___E,
1502 >(
1503 value, preallocated.encoder, &mut out, ()
1504 )?;
1505 } else {
1506 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1507 }
1508 }
1509
1510 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1511 }
1512 unsafe {
1513 preallocated.write_next(out.assume_init_ref());
1514 }
1515 }
1516
1517 ::fidl_next::WireTable::encode_len(table, max_ord);
1518
1519 Ok(())
1520 }
1521 }
1522
1523 impl<'de> ::fidl_next::FromWire<crate::wire::Event<'de>> for Event {
1524 #[inline]
1525 fn from_wire(wire_: crate::wire::Event<'de>) -> Self {
1526 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1527
1528 let header = wire_.table.get(1);
1529
1530 let payload = wire_.table.get(2);
1531
1532 Self {
1533 header: header.map(|envelope| {
1534 ::fidl_next::FromWire::from_wire(unsafe {
1535 envelope.read_unchecked::<crate::wire::EventHeader<'de>>()
1536 })
1537 }),
1538
1539 payload: payload.map(|envelope| {
1540 ::fidl_next::FromWire::from_wire(unsafe {
1541 envelope.read_unchecked::<crate::wire::EventPayload<'de>>()
1542 })
1543 }),
1544 }
1545 }
1546 }
1547
1548 #[derive(Debug, PartialEq)]
1549 pub struct EventStreamGetNextResponse {
1550 pub events: ::std::vec::Vec<crate::natural::Event>,
1551 }
1552
1553 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EventStreamGetNextResponse<'static>, ___E>
1554 for EventStreamGetNextResponse
1555 where
1556 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1557 ___E: ::fidl_next::Encoder,
1558 ___E: ::fidl_next::fuchsia::HandleEncoder,
1559 {
1560 #[inline]
1561 fn encode(
1562 self,
1563 encoder_: &mut ___E,
1564 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventStreamGetNextResponse<'static>>,
1565 _: (),
1566 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1567 ::fidl_next::munge! {
1568 let crate::wire::EventStreamGetNextResponse {
1569 events,
1570
1571 } = out_;
1572 }
1573
1574 ::fidl_next::Encode::encode(self.events, encoder_, events, (4294967295, ()))?;
1575
1576 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(events.as_mut_ptr()) };
1577 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1578
1579 Ok(())
1580 }
1581 }
1582
1583 unsafe impl<___E>
1584 ::fidl_next::EncodeOption<
1585 ::fidl_next::WireBox<'static, crate::wire::EventStreamGetNextResponse<'static>>,
1586 ___E,
1587 > for EventStreamGetNextResponse
1588 where
1589 ___E: ::fidl_next::Encoder + ?Sized,
1590 EventStreamGetNextResponse:
1591 ::fidl_next::Encode<crate::wire::EventStreamGetNextResponse<'static>, ___E>,
1592 {
1593 #[inline]
1594 fn encode_option(
1595 this: ::core::option::Option<Self>,
1596 encoder: &mut ___E,
1597 out: &mut ::core::mem::MaybeUninit<
1598 ::fidl_next::WireBox<'static, crate::wire::EventStreamGetNextResponse<'static>>,
1599 >,
1600 _: (),
1601 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1602 if let Some(inner) = this {
1603 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1604 ::fidl_next::WireBox::encode_present(out);
1605 } else {
1606 ::fidl_next::WireBox::encode_absent(out);
1607 }
1608
1609 Ok(())
1610 }
1611 }
1612
1613 impl<'de> ::fidl_next::FromWire<crate::wire::EventStreamGetNextResponse<'de>>
1614 for EventStreamGetNextResponse
1615 {
1616 #[inline]
1617 fn from_wire(wire: crate::wire::EventStreamGetNextResponse<'de>) -> Self {
1618 Self { events: ::fidl_next::FromWire::from_wire(wire.events) }
1619 }
1620 }
1621
1622 #[derive(Debug, PartialEq)]
1623 #[repr(C)]
1624 pub struct IntrospectorGetMonikerRequest {
1625 pub component_instance: ::fidl_next::fuchsia::zx::Event,
1626 }
1627
1628 unsafe impl<___E> ::fidl_next::Encode<crate::wire::IntrospectorGetMonikerRequest, ___E>
1629 for IntrospectorGetMonikerRequest
1630 where
1631 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1632 ___E: ::fidl_next::fuchsia::HandleEncoder,
1633 {
1634 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1635 Self,
1636 crate::wire::IntrospectorGetMonikerRequest,
1637 > = unsafe {
1638 ::fidl_next::CopyOptimization::enable_if(
1639 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
1640 ::fidl_next::fuchsia::WireEvent,
1641 ___E,
1642 >>::COPY_OPTIMIZATION
1643 .is_enabled(),
1644 )
1645 };
1646
1647 #[inline]
1648 fn encode(
1649 self,
1650 encoder_: &mut ___E,
1651 out_: &mut ::core::mem::MaybeUninit<crate::wire::IntrospectorGetMonikerRequest>,
1652 _: (),
1653 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1654 ::fidl_next::munge! {
1655 let crate::wire::IntrospectorGetMonikerRequest {
1656 component_instance,
1657
1658 } = out_;
1659 }
1660
1661 ::fidl_next::Encode::encode(self.component_instance, encoder_, component_instance, ())?;
1662
1663 let mut _field =
1664 unsafe { ::fidl_next::Slot::new_unchecked(component_instance.as_mut_ptr()) };
1665
1666 Ok(())
1667 }
1668 }
1669
1670 unsafe impl<___E>
1671 ::fidl_next::EncodeOption<
1672 ::fidl_next::WireBox<'static, crate::wire::IntrospectorGetMonikerRequest>,
1673 ___E,
1674 > for IntrospectorGetMonikerRequest
1675 where
1676 ___E: ::fidl_next::Encoder + ?Sized,
1677 IntrospectorGetMonikerRequest:
1678 ::fidl_next::Encode<crate::wire::IntrospectorGetMonikerRequest, ___E>,
1679 {
1680 #[inline]
1681 fn encode_option(
1682 this: ::core::option::Option<Self>,
1683 encoder: &mut ___E,
1684 out: &mut ::core::mem::MaybeUninit<
1685 ::fidl_next::WireBox<'static, crate::wire::IntrospectorGetMonikerRequest>,
1686 >,
1687 _: (),
1688 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1689 if let Some(inner) = this {
1690 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1691 ::fidl_next::WireBox::encode_present(out);
1692 } else {
1693 ::fidl_next::WireBox::encode_absent(out);
1694 }
1695
1696 Ok(())
1697 }
1698 }
1699
1700 impl ::fidl_next::FromWire<crate::wire::IntrospectorGetMonikerRequest>
1701 for IntrospectorGetMonikerRequest
1702 {
1703 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1704 crate::wire::IntrospectorGetMonikerRequest,
1705 Self,
1706 > = unsafe {
1707 ::fidl_next::CopyOptimization::enable_if(
1708 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
1709 ::fidl_next::fuchsia::WireEvent,
1710 >>::COPY_OPTIMIZATION
1711 .is_enabled(),
1712 )
1713 };
1714
1715 #[inline]
1716 fn from_wire(wire: crate::wire::IntrospectorGetMonikerRequest) -> Self {
1717 Self { component_instance: ::fidl_next::FromWire::from_wire(wire.component_instance) }
1718 }
1719 }
1720
1721 #[derive(Debug, PartialEq)]
1722 pub struct NamespaceInputEntry {
1723 pub path: ::std::string::String,
1724
1725 pub dictionary: ::fidl_next::ClientEnd<
1726 ::fidl_next_fuchsia_component_sandbox::Dictionary,
1727 ::fidl_next::fuchsia::zx::Channel,
1728 >,
1729 }
1730
1731 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NamespaceInputEntry<'static>, ___E>
1732 for NamespaceInputEntry
1733 where
1734 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1735 ___E: ::fidl_next::Encoder,
1736 ___E: ::fidl_next::fuchsia::HandleEncoder,
1737 {
1738 #[inline]
1739 fn encode(
1740 self,
1741 encoder_: &mut ___E,
1742 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceInputEntry<'static>>,
1743 _: (),
1744 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1745 ::fidl_next::munge! {
1746 let crate::wire::NamespaceInputEntry {
1747 path,
1748 dictionary,
1749
1750 } = out_;
1751 }
1752
1753 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1754
1755 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1756 ::fidl_next::Constrained::validate(_field, 4095)?;
1757
1758 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
1759
1760 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dictionary.as_mut_ptr()) };
1761
1762 Ok(())
1763 }
1764 }
1765
1766 unsafe impl<___E>
1767 ::fidl_next::EncodeOption<
1768 ::fidl_next::WireBox<'static, crate::wire::NamespaceInputEntry<'static>>,
1769 ___E,
1770 > for NamespaceInputEntry
1771 where
1772 ___E: ::fidl_next::Encoder + ?Sized,
1773 NamespaceInputEntry: ::fidl_next::Encode<crate::wire::NamespaceInputEntry<'static>, ___E>,
1774 {
1775 #[inline]
1776 fn encode_option(
1777 this: ::core::option::Option<Self>,
1778 encoder: &mut ___E,
1779 out: &mut ::core::mem::MaybeUninit<
1780 ::fidl_next::WireBox<'static, crate::wire::NamespaceInputEntry<'static>>,
1781 >,
1782 _: (),
1783 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1784 if let Some(inner) = this {
1785 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1786 ::fidl_next::WireBox::encode_present(out);
1787 } else {
1788 ::fidl_next::WireBox::encode_absent(out);
1789 }
1790
1791 Ok(())
1792 }
1793 }
1794
1795 impl<'de> ::fidl_next::FromWire<crate::wire::NamespaceInputEntry<'de>> for NamespaceInputEntry {
1796 #[inline]
1797 fn from_wire(wire: crate::wire::NamespaceInputEntry<'de>) -> Self {
1798 Self {
1799 path: ::fidl_next::FromWire::from_wire(wire.path),
1800
1801 dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary),
1802 }
1803 }
1804 }
1805
1806 #[derive(Debug, PartialEq)]
1807 pub struct NamespaceCreateRequest {
1808 pub entries: ::std::vec::Vec<crate::natural::NamespaceInputEntry>,
1809 }
1810
1811 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NamespaceCreateRequest<'static>, ___E>
1812 for NamespaceCreateRequest
1813 where
1814 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1815 ___E: ::fidl_next::Encoder,
1816 ___E: ::fidl_next::fuchsia::HandleEncoder,
1817 {
1818 #[inline]
1819 fn encode(
1820 self,
1821 encoder_: &mut ___E,
1822 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceCreateRequest<'static>>,
1823 _: (),
1824 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1825 ::fidl_next::munge! {
1826 let crate::wire::NamespaceCreateRequest {
1827 entries,
1828
1829 } = out_;
1830 }
1831
1832 ::fidl_next::Encode::encode(self.entries, encoder_, entries, (4294967295, ()))?;
1833
1834 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(entries.as_mut_ptr()) };
1835 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1836
1837 Ok(())
1838 }
1839 }
1840
1841 unsafe impl<___E>
1842 ::fidl_next::EncodeOption<
1843 ::fidl_next::WireBox<'static, crate::wire::NamespaceCreateRequest<'static>>,
1844 ___E,
1845 > for NamespaceCreateRequest
1846 where
1847 ___E: ::fidl_next::Encoder + ?Sized,
1848 NamespaceCreateRequest:
1849 ::fidl_next::Encode<crate::wire::NamespaceCreateRequest<'static>, ___E>,
1850 {
1851 #[inline]
1852 fn encode_option(
1853 this: ::core::option::Option<Self>,
1854 encoder: &mut ___E,
1855 out: &mut ::core::mem::MaybeUninit<
1856 ::fidl_next::WireBox<'static, crate::wire::NamespaceCreateRequest<'static>>,
1857 >,
1858 _: (),
1859 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1860 if let Some(inner) = this {
1861 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1862 ::fidl_next::WireBox::encode_present(out);
1863 } else {
1864 ::fidl_next::WireBox::encode_absent(out);
1865 }
1866
1867 Ok(())
1868 }
1869 }
1870
1871 impl<'de> ::fidl_next::FromWire<crate::wire::NamespaceCreateRequest<'de>>
1872 for NamespaceCreateRequest
1873 {
1874 #[inline]
1875 fn from_wire(wire: crate::wire::NamespaceCreateRequest<'de>) -> Self {
1876 Self { entries: ::fidl_next::FromWire::from_wire(wire.entries) }
1877 }
1878 }
1879
1880 #[derive(Debug, PartialEq)]
1881 pub struct NamespaceCreateResponse {
1882 pub entries: ::std::vec::Vec<crate::natural::NamespaceEntry>,
1883 }
1884
1885 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NamespaceCreateResponse<'static>, ___E>
1886 for NamespaceCreateResponse
1887 where
1888 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1889 ___E: ::fidl_next::Encoder,
1890 ___E: ::fidl_next::fuchsia::HandleEncoder,
1891 {
1892 #[inline]
1893 fn encode(
1894 self,
1895 encoder_: &mut ___E,
1896 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceCreateResponse<'static>>,
1897 _: (),
1898 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1899 ::fidl_next::munge! {
1900 let crate::wire::NamespaceCreateResponse {
1901 entries,
1902
1903 } = out_;
1904 }
1905
1906 ::fidl_next::Encode::encode(self.entries, encoder_, entries, (4294967295, ()))?;
1907
1908 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(entries.as_mut_ptr()) };
1909 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1910
1911 Ok(())
1912 }
1913 }
1914
1915 unsafe impl<___E>
1916 ::fidl_next::EncodeOption<
1917 ::fidl_next::WireBox<'static, crate::wire::NamespaceCreateResponse<'static>>,
1918 ___E,
1919 > for NamespaceCreateResponse
1920 where
1921 ___E: ::fidl_next::Encoder + ?Sized,
1922 NamespaceCreateResponse:
1923 ::fidl_next::Encode<crate::wire::NamespaceCreateResponse<'static>, ___E>,
1924 {
1925 #[inline]
1926 fn encode_option(
1927 this: ::core::option::Option<Self>,
1928 encoder: &mut ___E,
1929 out: &mut ::core::mem::MaybeUninit<
1930 ::fidl_next::WireBox<'static, crate::wire::NamespaceCreateResponse<'static>>,
1931 >,
1932 _: (),
1933 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1934 if let Some(inner) = this {
1935 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1936 ::fidl_next::WireBox::encode_present(out);
1937 } else {
1938 ::fidl_next::WireBox::encode_absent(out);
1939 }
1940
1941 Ok(())
1942 }
1943 }
1944
1945 impl<'de> ::fidl_next::FromWire<crate::wire::NamespaceCreateResponse<'de>>
1946 for NamespaceCreateResponse
1947 {
1948 #[inline]
1949 fn from_wire(wire: crate::wire::NamespaceCreateResponse<'de>) -> Self {
1950 Self { entries: ::fidl_next::FromWire::from_wire(wire.entries) }
1951 }
1952 }
1953
1954 #[derive(Debug, PartialEq)]
1955 pub struct RealmListChildrenRequest {
1956 pub collection: ::fidl_next_fuchsia_component_decl::natural::CollectionRef,
1957
1958 pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::zx::Channel>,
1959 }
1960
1961 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmListChildrenRequest<'static>, ___E>
1962 for RealmListChildrenRequest
1963 where
1964 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1965 ___E: ::fidl_next::Encoder,
1966 ___E: ::fidl_next::fuchsia::HandleEncoder,
1967 {
1968 #[inline]
1969 fn encode(
1970 self,
1971 encoder_: &mut ___E,
1972 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmListChildrenRequest<'static>>,
1973 _: (),
1974 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1975 ::fidl_next::munge! {
1976 let crate::wire::RealmListChildrenRequest {
1977 collection,
1978 iter,
1979
1980 } = out_;
1981 }
1982
1983 ::fidl_next::Encode::encode(self.collection, encoder_, collection, ())?;
1984
1985 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(collection.as_mut_ptr()) };
1986
1987 ::fidl_next::Encode::encode(self.iter, encoder_, iter, ())?;
1988
1989 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iter.as_mut_ptr()) };
1990
1991 Ok(())
1992 }
1993 }
1994
1995 unsafe impl<___E>
1996 ::fidl_next::EncodeOption<
1997 ::fidl_next::WireBox<'static, crate::wire::RealmListChildrenRequest<'static>>,
1998 ___E,
1999 > for RealmListChildrenRequest
2000 where
2001 ___E: ::fidl_next::Encoder + ?Sized,
2002 RealmListChildrenRequest:
2003 ::fidl_next::Encode<crate::wire::RealmListChildrenRequest<'static>, ___E>,
2004 {
2005 #[inline]
2006 fn encode_option(
2007 this: ::core::option::Option<Self>,
2008 encoder: &mut ___E,
2009 out: &mut ::core::mem::MaybeUninit<
2010 ::fidl_next::WireBox<'static, crate::wire::RealmListChildrenRequest<'static>>,
2011 >,
2012 _: (),
2013 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2014 if let Some(inner) = this {
2015 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2016 ::fidl_next::WireBox::encode_present(out);
2017 } else {
2018 ::fidl_next::WireBox::encode_absent(out);
2019 }
2020
2021 Ok(())
2022 }
2023 }
2024
2025 impl<'de> ::fidl_next::FromWire<crate::wire::RealmListChildrenRequest<'de>>
2026 for RealmListChildrenRequest
2027 {
2028 #[inline]
2029 fn from_wire(wire: crate::wire::RealmListChildrenRequest<'de>) -> Self {
2030 Self {
2031 collection: ::fidl_next::FromWire::from_wire(wire.collection),
2032
2033 iter: ::fidl_next::FromWire::from_wire(wire.iter),
2034 }
2035 }
2036 }
2037
2038 #[derive(Debug, PartialEq)]
2039 pub struct RealmGetChildOutputDictionaryDeprecatedRequest {
2040 pub child: ::fidl_next_fuchsia_component_decl::natural::ChildRef,
2041 }
2042
2043 unsafe impl<___E>
2044 ::fidl_next::Encode<
2045 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
2046 ___E,
2047 > for RealmGetChildOutputDictionaryDeprecatedRequest
2048 where
2049 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2050 ___E: ::fidl_next::Encoder,
2051 ___E: ::fidl_next::fuchsia::HandleEncoder,
2052 {
2053 #[inline]
2054 fn encode(
2055 self,
2056 encoder_: &mut ___E,
2057 out_: &mut ::core::mem::MaybeUninit<
2058 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
2059 >,
2060 _: (),
2061 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2062 ::fidl_next::munge! {
2063 let crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest {
2064 child,
2065
2066 } = out_;
2067 }
2068
2069 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
2070
2071 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(child.as_mut_ptr()) };
2072
2073 Ok(())
2074 }
2075 }
2076
2077 unsafe impl<___E>
2078 ::fidl_next::EncodeOption<
2079 ::fidl_next::WireBox<
2080 'static,
2081 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
2082 >,
2083 ___E,
2084 > for RealmGetChildOutputDictionaryDeprecatedRequest
2085 where
2086 ___E: ::fidl_next::Encoder + ?Sized,
2087 RealmGetChildOutputDictionaryDeprecatedRequest: ::fidl_next::Encode<
2088 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
2089 ___E,
2090 >,
2091 {
2092 #[inline]
2093 fn encode_option(
2094 this: ::core::option::Option<Self>,
2095 encoder: &mut ___E,
2096 out: &mut ::core::mem::MaybeUninit<
2097 ::fidl_next::WireBox<
2098 'static,
2099 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
2100 >,
2101 >,
2102 _: (),
2103 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2104 if let Some(inner) = this {
2105 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2106 ::fidl_next::WireBox::encode_present(out);
2107 } else {
2108 ::fidl_next::WireBox::encode_absent(out);
2109 }
2110
2111 Ok(())
2112 }
2113 }
2114
2115 impl<'de>
2116 ::fidl_next::FromWire<crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'de>>
2117 for RealmGetChildOutputDictionaryDeprecatedRequest
2118 {
2119 #[inline]
2120 fn from_wire(
2121 wire: crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'de>,
2122 ) -> Self {
2123 Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
2124 }
2125 }
2126
2127 #[derive(Debug, PartialEq)]
2128 #[repr(C)]
2129 pub struct RealmGetChildOutputDictionaryDeprecatedResponse {
2130 pub dictionary: ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef,
2131 }
2132
2133 unsafe impl<___E>
2134 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse, ___E>
2135 for RealmGetChildOutputDictionaryDeprecatedResponse
2136 where
2137 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2138 ___E: ::fidl_next::fuchsia::HandleEncoder,
2139 {
2140 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2141 Self,
2142 crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse,
2143 > = unsafe {
2144 ::fidl_next::CopyOptimization::enable_if(
2145 true
2146
2147 && <
2148 ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef as ::fidl_next::Encode<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef, ___E>
2149 >::COPY_OPTIMIZATION.is_enabled()
2150
2151 )
2152 };
2153
2154 #[inline]
2155 fn encode(
2156 self,
2157 encoder_: &mut ___E,
2158 out_: &mut ::core::mem::MaybeUninit<
2159 crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse,
2160 >,
2161 _: (),
2162 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2163 ::fidl_next::munge! {
2164 let crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse {
2165 dictionary,
2166
2167 } = out_;
2168 }
2169
2170 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
2171
2172 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dictionary.as_mut_ptr()) };
2173
2174 Ok(())
2175 }
2176 }
2177
2178 unsafe impl<___E>
2179 ::fidl_next::EncodeOption<
2180 ::fidl_next::WireBox<
2181 'static,
2182 crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse,
2183 >,
2184 ___E,
2185 > for RealmGetChildOutputDictionaryDeprecatedResponse
2186 where
2187 ___E: ::fidl_next::Encoder + ?Sized,
2188 RealmGetChildOutputDictionaryDeprecatedResponse:
2189 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse, ___E>,
2190 {
2191 #[inline]
2192 fn encode_option(
2193 this: ::core::option::Option<Self>,
2194 encoder: &mut ___E,
2195 out: &mut ::core::mem::MaybeUninit<
2196 ::fidl_next::WireBox<
2197 'static,
2198 crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse,
2199 >,
2200 >,
2201 _: (),
2202 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2203 if let Some(inner) = this {
2204 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2205 ::fidl_next::WireBox::encode_present(out);
2206 } else {
2207 ::fidl_next::WireBox::encode_absent(out);
2208 }
2209
2210 Ok(())
2211 }
2212 }
2213
2214 impl ::fidl_next::FromWire<crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse>
2215 for RealmGetChildOutputDictionaryDeprecatedResponse
2216 {
2217 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2218 crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse,
2219 Self,
2220 > = unsafe {
2221 ::fidl_next::CopyOptimization::enable_if(
2222 true
2223
2224 && <
2225 ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef as ::fidl_next::FromWire<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
2226 >::COPY_OPTIMIZATION.is_enabled()
2227
2228 )
2229 };
2230
2231 #[inline]
2232 fn from_wire(wire: crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse) -> Self {
2233 Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
2234 }
2235 }
2236
2237 #[derive(Debug, PartialEq)]
2238 pub struct RealmGetChildOutputDictionaryRequest {
2239 pub child: ::fidl_next_fuchsia_component_decl::natural::ChildRef,
2240 }
2241
2242 unsafe impl<___E>
2243 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryRequest<'static>, ___E>
2244 for RealmGetChildOutputDictionaryRequest
2245 where
2246 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2247 ___E: ::fidl_next::Encoder,
2248 ___E: ::fidl_next::fuchsia::HandleEncoder,
2249 {
2250 #[inline]
2251 fn encode(
2252 self,
2253 encoder_: &mut ___E,
2254 out_: &mut ::core::mem::MaybeUninit<
2255 crate::wire::RealmGetChildOutputDictionaryRequest<'static>,
2256 >,
2257 _: (),
2258 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2259 ::fidl_next::munge! {
2260 let crate::wire::RealmGetChildOutputDictionaryRequest {
2261 child,
2262
2263 } = out_;
2264 }
2265
2266 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
2267
2268 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(child.as_mut_ptr()) };
2269
2270 Ok(())
2271 }
2272 }
2273
2274 unsafe impl<___E>
2275 ::fidl_next::EncodeOption<
2276 ::fidl_next::WireBox<
2277 'static,
2278 crate::wire::RealmGetChildOutputDictionaryRequest<'static>,
2279 >,
2280 ___E,
2281 > for RealmGetChildOutputDictionaryRequest
2282 where
2283 ___E: ::fidl_next::Encoder + ?Sized,
2284 RealmGetChildOutputDictionaryRequest:
2285 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryRequest<'static>, ___E>,
2286 {
2287 #[inline]
2288 fn encode_option(
2289 this: ::core::option::Option<Self>,
2290 encoder: &mut ___E,
2291 out: &mut ::core::mem::MaybeUninit<
2292 ::fidl_next::WireBox<
2293 'static,
2294 crate::wire::RealmGetChildOutputDictionaryRequest<'static>,
2295 >,
2296 >,
2297 _: (),
2298 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2299 if let Some(inner) = this {
2300 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2301 ::fidl_next::WireBox::encode_present(out);
2302 } else {
2303 ::fidl_next::WireBox::encode_absent(out);
2304 }
2305
2306 Ok(())
2307 }
2308 }
2309
2310 impl<'de> ::fidl_next::FromWire<crate::wire::RealmGetChildOutputDictionaryRequest<'de>>
2311 for RealmGetChildOutputDictionaryRequest
2312 {
2313 #[inline]
2314 fn from_wire(wire: crate::wire::RealmGetChildOutputDictionaryRequest<'de>) -> Self {
2315 Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
2316 }
2317 }
2318
2319 #[derive(Debug, PartialEq)]
2320 #[repr(C)]
2321 pub struct RealmGetChildOutputDictionaryResponse {
2322 pub dictionary: ::fidl_next::fuchsia::zx::EventPair,
2323 }
2324
2325 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryResponse, ___E>
2326 for RealmGetChildOutputDictionaryResponse
2327 where
2328 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2329 ___E: ::fidl_next::fuchsia::HandleEncoder,
2330 {
2331 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2332 Self,
2333 crate::wire::RealmGetChildOutputDictionaryResponse,
2334 > = unsafe {
2335 ::fidl_next::CopyOptimization::enable_if(
2336 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
2337 ::fidl_next::fuchsia::WireEventPair,
2338 ___E,
2339 >>::COPY_OPTIMIZATION
2340 .is_enabled(),
2341 )
2342 };
2343
2344 #[inline]
2345 fn encode(
2346 self,
2347 encoder_: &mut ___E,
2348 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmGetChildOutputDictionaryResponse>,
2349 _: (),
2350 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2351 ::fidl_next::munge! {
2352 let crate::wire::RealmGetChildOutputDictionaryResponse {
2353 dictionary,
2354
2355 } = out_;
2356 }
2357
2358 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
2359
2360 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dictionary.as_mut_ptr()) };
2361
2362 Ok(())
2363 }
2364 }
2365
2366 unsafe impl<___E>
2367 ::fidl_next::EncodeOption<
2368 ::fidl_next::WireBox<'static, crate::wire::RealmGetChildOutputDictionaryResponse>,
2369 ___E,
2370 > for RealmGetChildOutputDictionaryResponse
2371 where
2372 ___E: ::fidl_next::Encoder + ?Sized,
2373 RealmGetChildOutputDictionaryResponse:
2374 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryResponse, ___E>,
2375 {
2376 #[inline]
2377 fn encode_option(
2378 this: ::core::option::Option<Self>,
2379 encoder: &mut ___E,
2380 out: &mut ::core::mem::MaybeUninit<
2381 ::fidl_next::WireBox<'static, crate::wire::RealmGetChildOutputDictionaryResponse>,
2382 >,
2383 _: (),
2384 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2385 if let Some(inner) = this {
2386 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2387 ::fidl_next::WireBox::encode_present(out);
2388 } else {
2389 ::fidl_next::WireBox::encode_absent(out);
2390 }
2391
2392 Ok(())
2393 }
2394 }
2395
2396 impl ::fidl_next::FromWire<crate::wire::RealmGetChildOutputDictionaryResponse>
2397 for RealmGetChildOutputDictionaryResponse
2398 {
2399 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2400 crate::wire::RealmGetChildOutputDictionaryResponse,
2401 Self,
2402 > = unsafe {
2403 ::fidl_next::CopyOptimization::enable_if(
2404 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
2405 ::fidl_next::fuchsia::WireEventPair,
2406 >>::COPY_OPTIMIZATION
2407 .is_enabled(),
2408 )
2409 };
2410
2411 #[inline]
2412 fn from_wire(wire: crate::wire::RealmGetChildOutputDictionaryResponse) -> Self {
2413 Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
2414 }
2415 }
2416
2417 #[derive(Debug, PartialEq)]
2418 pub struct RealmOpenControllerRequest {
2419 pub child: ::fidl_next_fuchsia_component_decl::natural::ChildRef,
2420
2421 pub controller:
2422 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::zx::Channel>,
2423 }
2424
2425 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmOpenControllerRequest<'static>, ___E>
2426 for RealmOpenControllerRequest
2427 where
2428 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2429 ___E: ::fidl_next::Encoder,
2430 ___E: ::fidl_next::fuchsia::HandleEncoder,
2431 {
2432 #[inline]
2433 fn encode(
2434 self,
2435 encoder_: &mut ___E,
2436 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmOpenControllerRequest<'static>>,
2437 _: (),
2438 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2439 ::fidl_next::munge! {
2440 let crate::wire::RealmOpenControllerRequest {
2441 child,
2442 controller,
2443
2444 } = out_;
2445 }
2446
2447 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
2448
2449 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(child.as_mut_ptr()) };
2450
2451 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
2452
2453 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
2454
2455 Ok(())
2456 }
2457 }
2458
2459 unsafe impl<___E>
2460 ::fidl_next::EncodeOption<
2461 ::fidl_next::WireBox<'static, crate::wire::RealmOpenControllerRequest<'static>>,
2462 ___E,
2463 > for RealmOpenControllerRequest
2464 where
2465 ___E: ::fidl_next::Encoder + ?Sized,
2466 RealmOpenControllerRequest:
2467 ::fidl_next::Encode<crate::wire::RealmOpenControllerRequest<'static>, ___E>,
2468 {
2469 #[inline]
2470 fn encode_option(
2471 this: ::core::option::Option<Self>,
2472 encoder: &mut ___E,
2473 out: &mut ::core::mem::MaybeUninit<
2474 ::fidl_next::WireBox<'static, crate::wire::RealmOpenControllerRequest<'static>>,
2475 >,
2476 _: (),
2477 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2478 if let Some(inner) = this {
2479 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2480 ::fidl_next::WireBox::encode_present(out);
2481 } else {
2482 ::fidl_next::WireBox::encode_absent(out);
2483 }
2484
2485 Ok(())
2486 }
2487 }
2488
2489 impl<'de> ::fidl_next::FromWire<crate::wire::RealmOpenControllerRequest<'de>>
2490 for RealmOpenControllerRequest
2491 {
2492 #[inline]
2493 fn from_wire(wire: crate::wire::RealmOpenControllerRequest<'de>) -> Self {
2494 Self {
2495 child: ::fidl_next::FromWire::from_wire(wire.child),
2496
2497 controller: ::fidl_next::FromWire::from_wire(wire.controller),
2498 }
2499 }
2500 }
2501
2502 #[derive(Debug, PartialEq)]
2503 pub struct RealmOpenExposedDirRequest {
2504 pub child: ::fidl_next_fuchsia_component_decl::natural::ChildRef,
2505
2506 pub exposed_dir: ::fidl_next::ServerEnd<
2507 ::fidl_next_fuchsia_io::Directory,
2508 ::fidl_next::fuchsia::zx::Channel,
2509 >,
2510 }
2511
2512 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmOpenExposedDirRequest<'static>, ___E>
2513 for RealmOpenExposedDirRequest
2514 where
2515 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2516 ___E: ::fidl_next::Encoder,
2517 ___E: ::fidl_next::fuchsia::HandleEncoder,
2518 {
2519 #[inline]
2520 fn encode(
2521 self,
2522 encoder_: &mut ___E,
2523 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmOpenExposedDirRequest<'static>>,
2524 _: (),
2525 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2526 ::fidl_next::munge! {
2527 let crate::wire::RealmOpenExposedDirRequest {
2528 child,
2529 exposed_dir,
2530
2531 } = out_;
2532 }
2533
2534 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
2535
2536 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(child.as_mut_ptr()) };
2537
2538 ::fidl_next::Encode::encode(self.exposed_dir, encoder_, exposed_dir, ())?;
2539
2540 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(exposed_dir.as_mut_ptr()) };
2541
2542 Ok(())
2543 }
2544 }
2545
2546 unsafe impl<___E>
2547 ::fidl_next::EncodeOption<
2548 ::fidl_next::WireBox<'static, crate::wire::RealmOpenExposedDirRequest<'static>>,
2549 ___E,
2550 > for RealmOpenExposedDirRequest
2551 where
2552 ___E: ::fidl_next::Encoder + ?Sized,
2553 RealmOpenExposedDirRequest:
2554 ::fidl_next::Encode<crate::wire::RealmOpenExposedDirRequest<'static>, ___E>,
2555 {
2556 #[inline]
2557 fn encode_option(
2558 this: ::core::option::Option<Self>,
2559 encoder: &mut ___E,
2560 out: &mut ::core::mem::MaybeUninit<
2561 ::fidl_next::WireBox<'static, crate::wire::RealmOpenExposedDirRequest<'static>>,
2562 >,
2563 _: (),
2564 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2565 if let Some(inner) = this {
2566 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2567 ::fidl_next::WireBox::encode_present(out);
2568 } else {
2569 ::fidl_next::WireBox::encode_absent(out);
2570 }
2571
2572 Ok(())
2573 }
2574 }
2575
2576 impl<'de> ::fidl_next::FromWire<crate::wire::RealmOpenExposedDirRequest<'de>>
2577 for RealmOpenExposedDirRequest
2578 {
2579 #[inline]
2580 fn from_wire(wire: crate::wire::RealmOpenExposedDirRequest<'de>) -> Self {
2581 Self {
2582 child: ::fidl_next::FromWire::from_wire(wire.child),
2583
2584 exposed_dir: ::fidl_next::FromWire::from_wire(wire.exposed_dir),
2585 }
2586 }
2587 }
2588
2589 #[derive(Debug, PartialEq)]
2590 pub struct RealmCreateChildRequest {
2591 pub collection: ::fidl_next_fuchsia_component_decl::natural::CollectionRef,
2592
2593 pub decl: ::fidl_next_fuchsia_component_decl::natural::Child,
2594
2595 pub args: crate::natural::CreateChildArgs,
2596 }
2597
2598 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmCreateChildRequest<'static>, ___E>
2599 for RealmCreateChildRequest
2600 where
2601 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2602 ___E: ::fidl_next::Encoder,
2603 ___E: ::fidl_next::fuchsia::HandleEncoder,
2604 {
2605 #[inline]
2606 fn encode(
2607 self,
2608 encoder_: &mut ___E,
2609 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmCreateChildRequest<'static>>,
2610 _: (),
2611 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2612 ::fidl_next::munge! {
2613 let crate::wire::RealmCreateChildRequest {
2614 collection,
2615 decl,
2616 args,
2617
2618 } = out_;
2619 }
2620
2621 ::fidl_next::Encode::encode(self.collection, encoder_, collection, ())?;
2622
2623 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(collection.as_mut_ptr()) };
2624
2625 ::fidl_next::Encode::encode(self.decl, encoder_, decl, ())?;
2626
2627 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(decl.as_mut_ptr()) };
2628
2629 ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
2630
2631 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(args.as_mut_ptr()) };
2632
2633 Ok(())
2634 }
2635 }
2636
2637 unsafe impl<___E>
2638 ::fidl_next::EncodeOption<
2639 ::fidl_next::WireBox<'static, crate::wire::RealmCreateChildRequest<'static>>,
2640 ___E,
2641 > for RealmCreateChildRequest
2642 where
2643 ___E: ::fidl_next::Encoder + ?Sized,
2644 RealmCreateChildRequest:
2645 ::fidl_next::Encode<crate::wire::RealmCreateChildRequest<'static>, ___E>,
2646 {
2647 #[inline]
2648 fn encode_option(
2649 this: ::core::option::Option<Self>,
2650 encoder: &mut ___E,
2651 out: &mut ::core::mem::MaybeUninit<
2652 ::fidl_next::WireBox<'static, crate::wire::RealmCreateChildRequest<'static>>,
2653 >,
2654 _: (),
2655 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2656 if let Some(inner) = this {
2657 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2658 ::fidl_next::WireBox::encode_present(out);
2659 } else {
2660 ::fidl_next::WireBox::encode_absent(out);
2661 }
2662
2663 Ok(())
2664 }
2665 }
2666
2667 impl<'de> ::fidl_next::FromWire<crate::wire::RealmCreateChildRequest<'de>>
2668 for RealmCreateChildRequest
2669 {
2670 #[inline]
2671 fn from_wire(wire: crate::wire::RealmCreateChildRequest<'de>) -> Self {
2672 Self {
2673 collection: ::fidl_next::FromWire::from_wire(wire.collection),
2674
2675 decl: ::fidl_next::FromWire::from_wire(wire.decl),
2676
2677 args: ::fidl_next::FromWire::from_wire(wire.args),
2678 }
2679 }
2680 }
2681
2682 #[derive(Debug, PartialEq)]
2683 pub struct RealmGetResolvedInfoResponse {
2684 pub resolved_info: ::fidl_next_fuchsia_component_resolution::natural::Component,
2685 }
2686
2687 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmGetResolvedInfoResponse<'static>, ___E>
2688 for RealmGetResolvedInfoResponse
2689 where
2690 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2691 ___E: ::fidl_next::Encoder,
2692 ___E: ::fidl_next::fuchsia::HandleEncoder,
2693 {
2694 #[inline]
2695 fn encode(
2696 self,
2697 encoder_: &mut ___E,
2698 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmGetResolvedInfoResponse<'static>>,
2699 _: (),
2700 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2701 ::fidl_next::munge! {
2702 let crate::wire::RealmGetResolvedInfoResponse {
2703 resolved_info,
2704
2705 } = out_;
2706 }
2707
2708 ::fidl_next::Encode::encode(self.resolved_info, encoder_, resolved_info, ())?;
2709
2710 let mut _field =
2711 unsafe { ::fidl_next::Slot::new_unchecked(resolved_info.as_mut_ptr()) };
2712
2713 Ok(())
2714 }
2715 }
2716
2717 unsafe impl<___E>
2718 ::fidl_next::EncodeOption<
2719 ::fidl_next::WireBox<'static, crate::wire::RealmGetResolvedInfoResponse<'static>>,
2720 ___E,
2721 > for RealmGetResolvedInfoResponse
2722 where
2723 ___E: ::fidl_next::Encoder + ?Sized,
2724 RealmGetResolvedInfoResponse:
2725 ::fidl_next::Encode<crate::wire::RealmGetResolvedInfoResponse<'static>, ___E>,
2726 {
2727 #[inline]
2728 fn encode_option(
2729 this: ::core::option::Option<Self>,
2730 encoder: &mut ___E,
2731 out: &mut ::core::mem::MaybeUninit<
2732 ::fidl_next::WireBox<'static, crate::wire::RealmGetResolvedInfoResponse<'static>>,
2733 >,
2734 _: (),
2735 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2736 if let Some(inner) = this {
2737 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2738 ::fidl_next::WireBox::encode_present(out);
2739 } else {
2740 ::fidl_next::WireBox::encode_absent(out);
2741 }
2742
2743 Ok(())
2744 }
2745 }
2746
2747 impl<'de> ::fidl_next::FromWire<crate::wire::RealmGetResolvedInfoResponse<'de>>
2748 for RealmGetResolvedInfoResponse
2749 {
2750 #[inline]
2751 fn from_wire(wire: crate::wire::RealmGetResolvedInfoResponse<'de>) -> Self {
2752 Self { resolved_info: ::fidl_next::FromWire::from_wire(wire.resolved_info) }
2753 }
2754 }
2755
2756 #[derive(Debug, PartialEq)]
2757 pub struct StorageAdminListStorageInRealmRequest {
2758 pub relative_moniker: ::std::string::String,
2759
2760 pub iterator:
2761 ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::fuchsia::zx::Channel>,
2762 }
2763
2764 unsafe impl<___E>
2765 ::fidl_next::Encode<crate::wire::StorageAdminListStorageInRealmRequest<'static>, ___E>
2766 for StorageAdminListStorageInRealmRequest
2767 where
2768 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2769 ___E: ::fidl_next::Encoder,
2770 ___E: ::fidl_next::fuchsia::HandleEncoder,
2771 {
2772 #[inline]
2773 fn encode(
2774 self,
2775 encoder_: &mut ___E,
2776 out_: &mut ::core::mem::MaybeUninit<
2777 crate::wire::StorageAdminListStorageInRealmRequest<'static>,
2778 >,
2779 _: (),
2780 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2781 ::fidl_next::munge! {
2782 let crate::wire::StorageAdminListStorageInRealmRequest {
2783 relative_moniker,
2784 iterator,
2785
2786 } = out_;
2787 }
2788
2789 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker, 4096)?;
2790
2791 let mut _field =
2792 unsafe { ::fidl_next::Slot::new_unchecked(relative_moniker.as_mut_ptr()) };
2793 ::fidl_next::Constrained::validate(_field, 4096)?;
2794
2795 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
2796
2797 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
2798
2799 Ok(())
2800 }
2801 }
2802
2803 unsafe impl<___E>
2804 ::fidl_next::EncodeOption<
2805 ::fidl_next::WireBox<
2806 'static,
2807 crate::wire::StorageAdminListStorageInRealmRequest<'static>,
2808 >,
2809 ___E,
2810 > for StorageAdminListStorageInRealmRequest
2811 where
2812 ___E: ::fidl_next::Encoder + ?Sized,
2813 StorageAdminListStorageInRealmRequest:
2814 ::fidl_next::Encode<crate::wire::StorageAdminListStorageInRealmRequest<'static>, ___E>,
2815 {
2816 #[inline]
2817 fn encode_option(
2818 this: ::core::option::Option<Self>,
2819 encoder: &mut ___E,
2820 out: &mut ::core::mem::MaybeUninit<
2821 ::fidl_next::WireBox<
2822 'static,
2823 crate::wire::StorageAdminListStorageInRealmRequest<'static>,
2824 >,
2825 >,
2826 _: (),
2827 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2828 if let Some(inner) = this {
2829 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2830 ::fidl_next::WireBox::encode_present(out);
2831 } else {
2832 ::fidl_next::WireBox::encode_absent(out);
2833 }
2834
2835 Ok(())
2836 }
2837 }
2838
2839 impl<'de> ::fidl_next::FromWire<crate::wire::StorageAdminListStorageInRealmRequest<'de>>
2840 for StorageAdminListStorageInRealmRequest
2841 {
2842 #[inline]
2843 fn from_wire(wire: crate::wire::StorageAdminListStorageInRealmRequest<'de>) -> Self {
2844 Self {
2845 relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker),
2846
2847 iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
2848 }
2849 }
2850 }
2851
2852 #[derive(Debug, PartialEq)]
2853 pub struct StorageAdminOpenStorageRequest {
2854 pub relative_moniker: ::std::string::String,
2855
2856 pub object:
2857 ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::zx::Channel>,
2858 }
2859
2860 unsafe impl<___E>
2861 ::fidl_next::Encode<crate::wire::StorageAdminOpenStorageRequest<'static>, ___E>
2862 for StorageAdminOpenStorageRequest
2863 where
2864 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2865 ___E: ::fidl_next::Encoder,
2866 ___E: ::fidl_next::fuchsia::HandleEncoder,
2867 {
2868 #[inline]
2869 fn encode(
2870 self,
2871 encoder_: &mut ___E,
2872 out_: &mut ::core::mem::MaybeUninit<
2873 crate::wire::StorageAdminOpenStorageRequest<'static>,
2874 >,
2875 _: (),
2876 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2877 ::fidl_next::munge! {
2878 let crate::wire::StorageAdminOpenStorageRequest {
2879 relative_moniker,
2880 object,
2881
2882 } = out_;
2883 }
2884
2885 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker, 4096)?;
2886
2887 let mut _field =
2888 unsafe { ::fidl_next::Slot::new_unchecked(relative_moniker.as_mut_ptr()) };
2889 ::fidl_next::Constrained::validate(_field, 4096)?;
2890
2891 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
2892
2893 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
2894
2895 Ok(())
2896 }
2897 }
2898
2899 unsafe impl<___E>
2900 ::fidl_next::EncodeOption<
2901 ::fidl_next::WireBox<'static, crate::wire::StorageAdminOpenStorageRequest<'static>>,
2902 ___E,
2903 > for StorageAdminOpenStorageRequest
2904 where
2905 ___E: ::fidl_next::Encoder + ?Sized,
2906 StorageAdminOpenStorageRequest:
2907 ::fidl_next::Encode<crate::wire::StorageAdminOpenStorageRequest<'static>, ___E>,
2908 {
2909 #[inline]
2910 fn encode_option(
2911 this: ::core::option::Option<Self>,
2912 encoder: &mut ___E,
2913 out: &mut ::core::mem::MaybeUninit<
2914 ::fidl_next::WireBox<'static, crate::wire::StorageAdminOpenStorageRequest<'static>>,
2915 >,
2916 _: (),
2917 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2918 if let Some(inner) = this {
2919 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2920 ::fidl_next::WireBox::encode_present(out);
2921 } else {
2922 ::fidl_next::WireBox::encode_absent(out);
2923 }
2924
2925 Ok(())
2926 }
2927 }
2928
2929 impl<'de> ::fidl_next::FromWire<crate::wire::StorageAdminOpenStorageRequest<'de>>
2930 for StorageAdminOpenStorageRequest
2931 {
2932 #[inline]
2933 fn from_wire(wire: crate::wire::StorageAdminOpenStorageRequest<'de>) -> Self {
2934 Self {
2935 relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker),
2936
2937 object: ::fidl_next::FromWire::from_wire(wire.object),
2938 }
2939 }
2940 }
2941
2942 #[derive(Debug, PartialEq)]
2943 pub struct StorageAdminOpenComponentStorageByIdRequest {
2944 pub id: ::std::string::String,
2945
2946 pub object:
2947 ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::zx::Channel>,
2948 }
2949
2950 unsafe impl<___E>
2951 ::fidl_next::Encode<crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>, ___E>
2952 for StorageAdminOpenComponentStorageByIdRequest
2953 where
2954 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2955 ___E: ::fidl_next::Encoder,
2956 ___E: ::fidl_next::fuchsia::HandleEncoder,
2957 {
2958 #[inline]
2959 fn encode(
2960 self,
2961 encoder_: &mut ___E,
2962 out_: &mut ::core::mem::MaybeUninit<
2963 crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>,
2964 >,
2965 _: (),
2966 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2967 ::fidl_next::munge! {
2968 let crate::wire::StorageAdminOpenComponentStorageByIdRequest {
2969 id,
2970 object,
2971
2972 } = out_;
2973 }
2974
2975 ::fidl_next::Encode::encode(self.id, encoder_, id, 64)?;
2976
2977 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
2978 ::fidl_next::Constrained::validate(_field, 64)?;
2979
2980 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
2981
2982 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
2983
2984 Ok(())
2985 }
2986 }
2987
2988 unsafe impl<___E>
2989 ::fidl_next::EncodeOption<
2990 ::fidl_next::WireBox<
2991 'static,
2992 crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>,
2993 >,
2994 ___E,
2995 > for StorageAdminOpenComponentStorageByIdRequest
2996 where
2997 ___E: ::fidl_next::Encoder + ?Sized,
2998 StorageAdminOpenComponentStorageByIdRequest: ::fidl_next::Encode<
2999 crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>,
3000 ___E,
3001 >,
3002 {
3003 #[inline]
3004 fn encode_option(
3005 this: ::core::option::Option<Self>,
3006 encoder: &mut ___E,
3007 out: &mut ::core::mem::MaybeUninit<
3008 ::fidl_next::WireBox<
3009 'static,
3010 crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>,
3011 >,
3012 >,
3013 _: (),
3014 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3015 if let Some(inner) = this {
3016 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3017 ::fidl_next::WireBox::encode_present(out);
3018 } else {
3019 ::fidl_next::WireBox::encode_absent(out);
3020 }
3021
3022 Ok(())
3023 }
3024 }
3025
3026 impl<'de> ::fidl_next::FromWire<crate::wire::StorageAdminOpenComponentStorageByIdRequest<'de>>
3027 for StorageAdminOpenComponentStorageByIdRequest
3028 {
3029 #[inline]
3030 fn from_wire(wire: crate::wire::StorageAdminOpenComponentStorageByIdRequest<'de>) -> Self {
3031 Self {
3032 id: ::fidl_next::FromWire::from_wire(wire.id),
3033
3034 object: ::fidl_next::FromWire::from_wire(wire.object),
3035 }
3036 }
3037 }
3038}
3039
3040pub mod wire {
3041
3042 pub use fidl_next_common_fuchsia_component::wire::*;
3043
3044 #[repr(C)]
3046 pub struct CapabilityRequestedPayload<'de> {
3047 pub(crate) table: ::fidl_next::WireTable<'de>,
3048 }
3049
3050 impl<'de> Drop for CapabilityRequestedPayload<'de> {
3051 fn drop(&mut self) {
3052 let _ = self.table.get(1).map(|envelope| unsafe {
3053 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
3054 });
3055
3056 let _ = self.table.get(2).map(|envelope| unsafe {
3057 envelope.read_unchecked::<::fidl_next::fuchsia::WireChannel>()
3058 });
3059 }
3060 }
3061
3062 unsafe impl ::fidl_next::Wire for CapabilityRequestedPayload<'static> {
3063 type Owned<'de> = CapabilityRequestedPayload<'de>;
3064
3065 #[inline]
3066 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3067 ::fidl_next::munge!(let Self { table } = out);
3068 ::fidl_next::WireTable::zero_padding(table);
3069 }
3070 }
3071
3072 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityRequestedPayload<'static>
3073 where
3074 ___D: ::fidl_next::Decoder + ?Sized,
3075 ___D: ::fidl_next::fuchsia::HandleDecoder,
3076 {
3077 fn decode(
3078 slot: ::fidl_next::Slot<'_, Self>,
3079 decoder: &mut ___D,
3080 _: (),
3081 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3082 ::fidl_next::munge!(let Self { table } = slot);
3083
3084 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3085 match ordinal {
3086 0 => unsafe { ::core::hint::unreachable_unchecked() },
3087
3088 1 => {
3089 ::fidl_next::WireEnvelope::decode_as::<
3090 ___D,
3091 ::fidl_next::WireString<'static>,
3092 >(slot.as_mut(), decoder, 255)?;
3093
3094 let value = unsafe {
3095 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
3096 };
3097
3098 if value.len() > 255 {
3099 return Err(::fidl_next::DecodeError::VectorTooLong {
3100 size: value.len() as u64,
3101 limit: 255,
3102 });
3103 }
3104
3105 Ok(())
3106 }
3107
3108 2 => {
3109 ::fidl_next::WireEnvelope::decode_as::<
3110 ___D,
3111 ::fidl_next::fuchsia::WireChannel,
3112 >(slot.as_mut(), decoder, ())?;
3113
3114 Ok(())
3115 }
3116
3117 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3118 }
3119 })
3120 }
3121 }
3122
3123 impl<'de> CapabilityRequestedPayload<'de> {
3124 pub fn name(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
3125 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3126 }
3127
3128 pub fn capability(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireChannel> {
3129 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3130 }
3131 }
3132
3133 impl<'de> ::core::fmt::Debug for CapabilityRequestedPayload<'de> {
3134 fn fmt(
3135 &self,
3136 f: &mut ::core::fmt::Formatter<'_>,
3137 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3138 f.debug_struct("CapabilityRequestedPayload")
3139 .field("name", &self.name())
3140 .field("capability", &self.capability())
3141 .finish()
3142 }
3143 }
3144
3145 impl<'de> ::fidl_next::IntoNatural for CapabilityRequestedPayload<'de> {
3146 type Natural = crate::natural::CapabilityRequestedPayload;
3147 }
3148
3149 impl ::fidl_next::Unconstrained for CapabilityRequestedPayload<'_> {}
3150
3151 #[derive(Debug)]
3153 #[repr(C)]
3154 pub struct ControllerIsStartedResponse {
3155 pub is_started: bool,
3156 }
3157
3158 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerIsStartedResponse>(), 1);
3159 static_assertions::const_assert_eq!(std::mem::align_of::<ControllerIsStartedResponse>(), 1);
3160
3161 static_assertions::const_assert_eq!(
3162 std::mem::offset_of!(ControllerIsStartedResponse, is_started),
3163 0
3164 );
3165
3166 unsafe impl ::fidl_next::Wire for ControllerIsStartedResponse {
3167 type Owned<'de> = ControllerIsStartedResponse;
3168
3169 #[inline]
3170 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3171 ::fidl_next::munge! {
3172 let Self {
3173
3174 is_started,
3175
3176 } = &mut *out_;
3177 }
3178
3179 ::fidl_next::Wire::zero_padding(is_started);
3180 }
3181 }
3182
3183 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerIsStartedResponse
3184 where
3185 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3186 ___D: ::fidl_next::fuchsia::HandleDecoder,
3187 {
3188 fn decode(
3189 slot_: ::fidl_next::Slot<'_, Self>,
3190 decoder_: &mut ___D,
3191 _: (),
3192 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3193 ::fidl_next::munge! {
3194 let Self {
3195
3196 mut is_started,
3197
3198 } = slot_;
3199 }
3200
3201 let _field = is_started.as_mut();
3202
3203 ::fidl_next::Decode::decode(is_started.as_mut(), decoder_, ())?;
3204
3205 Ok(())
3206 }
3207 }
3208
3209 impl ::fidl_next::IntoNatural for ControllerIsStartedResponse {
3210 type Natural = crate::natural::ControllerIsStartedResponse;
3211 }
3212
3213 impl ::fidl_next::Unconstrained for ControllerIsStartedResponse {}
3214
3215 #[derive(Debug)]
3217 #[repr(C)]
3218 pub struct ControllerGetExposedDictionaryResponse {
3219 pub dictionary: ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
3220 }
3221
3222 static_assertions::const_assert_eq!(
3223 std::mem::size_of::<ControllerGetExposedDictionaryResponse>(),
3224 4
3225 );
3226 static_assertions::const_assert_eq!(
3227 std::mem::align_of::<ControllerGetExposedDictionaryResponse>(),
3228 4
3229 );
3230
3231 static_assertions::const_assert_eq!(
3232 std::mem::offset_of!(ControllerGetExposedDictionaryResponse, dictionary),
3233 0
3234 );
3235
3236 unsafe impl ::fidl_next::Wire for ControllerGetExposedDictionaryResponse {
3237 type Owned<'de> = ControllerGetExposedDictionaryResponse;
3238
3239 #[inline]
3240 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3241 ::fidl_next::munge! {
3242 let Self {
3243
3244 dictionary,
3245
3246 } = &mut *out_;
3247 }
3248
3249 ::fidl_next::Wire::zero_padding(dictionary);
3250 }
3251 }
3252
3253 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerGetExposedDictionaryResponse
3254 where
3255 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3256 ___D: ::fidl_next::fuchsia::HandleDecoder,
3257 {
3258 fn decode(
3259 slot_: ::fidl_next::Slot<'_, Self>,
3260 decoder_: &mut ___D,
3261 _: (),
3262 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3263 ::fidl_next::munge! {
3264 let Self {
3265
3266 mut dictionary,
3267
3268 } = slot_;
3269 }
3270
3271 let _field = dictionary.as_mut();
3272
3273 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_, ())?;
3274
3275 Ok(())
3276 }
3277 }
3278
3279 impl ::fidl_next::IntoNatural for ControllerGetExposedDictionaryResponse {
3280 type Natural = crate::natural::ControllerGetExposedDictionaryResponse;
3281 }
3282
3283 impl ::fidl_next::Unconstrained for ControllerGetExposedDictionaryResponse {}
3284
3285 #[derive(Debug)]
3287 #[repr(C)]
3288 pub struct ControllerGetOutputDictionaryResponse {
3289 pub dictionary: ::fidl_next::fuchsia::WireEventPair,
3290 }
3291
3292 static_assertions::const_assert_eq!(
3293 std::mem::size_of::<ControllerGetOutputDictionaryResponse>(),
3294 4
3295 );
3296 static_assertions::const_assert_eq!(
3297 std::mem::align_of::<ControllerGetOutputDictionaryResponse>(),
3298 4
3299 );
3300
3301 static_assertions::const_assert_eq!(
3302 std::mem::offset_of!(ControllerGetOutputDictionaryResponse, dictionary),
3303 0
3304 );
3305
3306 unsafe impl ::fidl_next::Wire for ControllerGetOutputDictionaryResponse {
3307 type Owned<'de> = ControllerGetOutputDictionaryResponse;
3308
3309 #[inline]
3310 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3311 ::fidl_next::munge! {
3312 let Self {
3313
3314 dictionary,
3315
3316 } = &mut *out_;
3317 }
3318
3319 ::fidl_next::Wire::zero_padding(dictionary);
3320 }
3321 }
3322
3323 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerGetOutputDictionaryResponse
3324 where
3325 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3326 ___D: ::fidl_next::fuchsia::HandleDecoder,
3327 {
3328 fn decode(
3329 slot_: ::fidl_next::Slot<'_, Self>,
3330 decoder_: &mut ___D,
3331 _: (),
3332 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3333 ::fidl_next::munge! {
3334 let Self {
3335
3336 mut dictionary,
3337
3338 } = slot_;
3339 }
3340
3341 let _field = dictionary.as_mut();
3342
3343 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_, ())?;
3344
3345 Ok(())
3346 }
3347 }
3348
3349 impl ::fidl_next::IntoNatural for ControllerGetOutputDictionaryResponse {
3350 type Natural = crate::natural::ControllerGetOutputDictionaryResponse;
3351 }
3352
3353 impl ::fidl_next::Unconstrained for ControllerGetOutputDictionaryResponse {}
3354
3355 #[repr(C)]
3357 pub struct NamespaceEntry<'de> {
3358 pub(crate) table: ::fidl_next::WireTable<'de>,
3359 }
3360
3361 impl<'de> Drop for NamespaceEntry<'de> {
3362 fn drop(&mut self) {
3363 let _ = self.table.get(1).map(|envelope| unsafe {
3364 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
3365 });
3366
3367 let _ = self.table.get(2).map(|envelope| unsafe {
3368 envelope.read_unchecked::<::fidl_next::ClientEnd<
3369 ::fidl_next_fuchsia_io::Directory,
3370 ::fidl_next::fuchsia::WireChannel,
3371 >>()
3372 });
3373 }
3374 }
3375
3376 unsafe impl ::fidl_next::Wire for NamespaceEntry<'static> {
3377 type Owned<'de> = NamespaceEntry<'de>;
3378
3379 #[inline]
3380 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3381 ::fidl_next::munge!(let Self { table } = out);
3382 ::fidl_next::WireTable::zero_padding(table);
3383 }
3384 }
3385
3386 unsafe impl<___D> ::fidl_next::Decode<___D> for NamespaceEntry<'static>
3387 where
3388 ___D: ::fidl_next::Decoder + ?Sized,
3389 ___D: ::fidl_next::fuchsia::HandleDecoder,
3390 {
3391 fn decode(
3392 slot: ::fidl_next::Slot<'_, Self>,
3393 decoder: &mut ___D,
3394 _: (),
3395 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3396 ::fidl_next::munge!(let Self { table } = slot);
3397
3398 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3399 match ordinal {
3400 0 => unsafe { ::core::hint::unreachable_unchecked() },
3401
3402 1 => {
3403 ::fidl_next::WireEnvelope::decode_as::<
3404 ___D,
3405 ::fidl_next::WireString<'static>,
3406 >(slot.as_mut(), decoder, 4095)?;
3407
3408 let value = unsafe {
3409 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
3410 };
3411
3412 if value.len() > 4095 {
3413 return Err(::fidl_next::DecodeError::VectorTooLong {
3414 size: value.len() as u64,
3415 limit: 4095,
3416 });
3417 }
3418
3419 Ok(())
3420 }
3421
3422 2 => {
3423 ::fidl_next::WireEnvelope::decode_as::<
3424 ___D,
3425 ::fidl_next::ClientEnd<
3426 ::fidl_next_fuchsia_io::Directory,
3427 ::fidl_next::fuchsia::WireChannel,
3428 >,
3429 >(slot.as_mut(), decoder, ())?;
3430
3431 Ok(())
3432 }
3433
3434 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3435 }
3436 })
3437 }
3438 }
3439
3440 impl<'de> NamespaceEntry<'de> {
3441 pub fn path(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
3442 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3443 }
3444
3445 pub fn directory(
3446 &self,
3447 ) -> ::core::option::Option<
3448 &::fidl_next::ClientEnd<
3449 ::fidl_next_fuchsia_io::Directory,
3450 ::fidl_next::fuchsia::WireChannel,
3451 >,
3452 > {
3453 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3454 }
3455 }
3456
3457 impl<'de> ::core::fmt::Debug for NamespaceEntry<'de> {
3458 fn fmt(
3459 &self,
3460 f: &mut ::core::fmt::Formatter<'_>,
3461 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3462 f.debug_struct("NamespaceEntry")
3463 .field("path", &self.path())
3464 .field("directory", &self.directory())
3465 .finish()
3466 }
3467 }
3468
3469 impl<'de> ::fidl_next::IntoNatural for NamespaceEntry<'de> {
3470 type Natural = crate::natural::NamespaceEntry;
3471 }
3472
3473 impl ::fidl_next::Unconstrained for NamespaceEntry<'_> {}
3474
3475 #[repr(C)]
3477 pub struct StartChildArgs<'de> {
3478 pub(crate) table: ::fidl_next::WireTable<'de>,
3479 }
3480
3481 impl<'de> Drop for StartChildArgs<'de> {
3482 fn drop(&mut self) {
3483 let _ = self.table.get(1)
3484 .map(|envelope| unsafe {
3485 envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>()
3486 });
3487
3488 let _ = self.table.get(2)
3489 .map(|envelope| unsafe {
3490 envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NamespaceEntry<'de>>>()
3491 });
3492
3493 let _ = self.table.get(3)
3494 .map(|envelope| unsafe {
3495 envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
3496 });
3497
3498 let _ = self.table.get(4).map(|envelope| unsafe {
3499 envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
3500 });
3501 }
3502 }
3503
3504 unsafe impl ::fidl_next::Wire for StartChildArgs<'static> {
3505 type Owned<'de> = StartChildArgs<'de>;
3506
3507 #[inline]
3508 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3509 ::fidl_next::munge!(let Self { table } = out);
3510 ::fidl_next::WireTable::zero_padding(table);
3511 }
3512 }
3513
3514 unsafe impl<___D> ::fidl_next::Decode<___D> for StartChildArgs<'static>
3515 where
3516 ___D: ::fidl_next::Decoder + ?Sized,
3517 ___D: ::fidl_next::fuchsia::HandleDecoder,
3518 {
3519 fn decode(
3520 slot: ::fidl_next::Slot<'_, Self>,
3521 decoder: &mut ___D,
3522 _: (),
3523 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3524 ::fidl_next::munge!(let Self { table } = slot);
3525
3526 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3527 match ordinal {
3528 0 => unsafe { ::core::hint::unreachable_unchecked() },
3529
3530 1 => {
3531 ::fidl_next::WireEnvelope::decode_as::<
3532 ___D,
3533 ::fidl_next::WireVector<
3534 'static,
3535 ::fidl_next_fuchsia_process::wire::HandleInfo,
3536 >,
3537 >(slot.as_mut(), decoder, (128, ()))?;
3538
3539 let value = unsafe {
3540 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
3541 '_,
3542 ::fidl_next_fuchsia_process::wire::HandleInfo,
3543 >>()
3544 };
3545
3546 if value.len() > 128 {
3547 return Err(::fidl_next::DecodeError::VectorTooLong {
3548 size: value.len() as u64,
3549 limit: 128,
3550 });
3551 }
3552
3553 Ok(())
3554 }
3555
3556 2 => {
3557 ::fidl_next::WireEnvelope::decode_as::<
3558 ___D,
3559 ::fidl_next::WireVector<'static, crate::wire::NamespaceEntry<'static>>,
3560 >(slot.as_mut(), decoder, (32, ()))?;
3561
3562 let value = unsafe {
3563 slot
3564 .deref_unchecked()
3565 .deref_unchecked::<
3566 ::fidl_next::WireVector<'_, crate::wire::NamespaceEntry<'_>>
3567 >()
3568 };
3569
3570 if value.len() > 32 {
3571 return Err(::fidl_next::DecodeError::VectorTooLong {
3572 size: value.len() as u64,
3573 limit: 32,
3574 });
3575 }
3576
3577 Ok(())
3578 }
3579
3580 3 => {
3581 ::fidl_next::WireEnvelope::decode_as::<
3582 ___D,
3583 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
3584 >(slot.as_mut(), decoder, ())?;
3585
3586 Ok(())
3587 }
3588
3589 4 => {
3590 ::fidl_next::WireEnvelope::decode_as::<
3591 ___D,
3592 ::fidl_next::fuchsia::WireEventPair,
3593 >(slot.as_mut(), decoder, ())?;
3594
3595 Ok(())
3596 }
3597
3598 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3599 }
3600 })
3601 }
3602 }
3603
3604 impl<'de> StartChildArgs<'de> {
3605 pub fn numbered_handles(
3606 &self,
3607 ) -> ::core::option::Option<
3608 &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
3609 > {
3610 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3611 }
3612
3613 pub fn namespace_entries(
3614 &self,
3615 ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::NamespaceEntry<'de>>>
3616 {
3617 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3618 }
3619
3620 pub fn dictionary(
3621 &self,
3622 ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3623 {
3624 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3625 }
3626
3627 pub fn additional_inputs(
3628 &self,
3629 ) -> ::core::option::Option<&::fidl_next::fuchsia::WireEventPair> {
3630 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3631 }
3632 }
3633
3634 impl<'de> ::core::fmt::Debug for StartChildArgs<'de> {
3635 fn fmt(
3636 &self,
3637 f: &mut ::core::fmt::Formatter<'_>,
3638 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3639 f.debug_struct("StartChildArgs")
3640 .field("numbered_handles", &self.numbered_handles())
3641 .field("namespace_entries", &self.namespace_entries())
3642 .field("dictionary", &self.dictionary())
3643 .field("additional_inputs", &self.additional_inputs())
3644 .finish()
3645 }
3646 }
3647
3648 impl<'de> ::fidl_next::IntoNatural for StartChildArgs<'de> {
3649 type Natural = crate::natural::StartChildArgs;
3650 }
3651
3652 impl ::fidl_next::Unconstrained for StartChildArgs<'_> {}
3653
3654 #[derive(Debug)]
3656 #[repr(C)]
3657 pub struct ControllerStartRequest<'de> {
3658 pub args: crate::wire::StartChildArgs<'de>,
3659
3660 pub execution_controller:
3661 ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::fuchsia::WireChannel>,
3662 }
3663
3664 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerStartRequest<'_>>(), 24);
3665 static_assertions::const_assert_eq!(std::mem::align_of::<ControllerStartRequest<'_>>(), 8);
3666
3667 static_assertions::const_assert_eq!(std::mem::offset_of!(ControllerStartRequest<'_>, args), 0);
3668
3669 static_assertions::const_assert_eq!(
3670 std::mem::offset_of!(ControllerStartRequest<'_>, execution_controller),
3671 16
3672 );
3673
3674 unsafe impl ::fidl_next::Wire for ControllerStartRequest<'static> {
3675 type Owned<'de> = ControllerStartRequest<'de>;
3676
3677 #[inline]
3678 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3679 ::fidl_next::munge! {
3680 let Self {
3681
3682 args,
3683 execution_controller,
3684
3685 } = &mut *out_;
3686 }
3687
3688 ::fidl_next::Wire::zero_padding(args);
3689
3690 ::fidl_next::Wire::zero_padding(execution_controller);
3691
3692 unsafe {
3693 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
3694 }
3695 }
3696 }
3697
3698 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerStartRequest<'static>
3699 where
3700 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3701 ___D: ::fidl_next::Decoder,
3702 ___D: ::fidl_next::fuchsia::HandleDecoder,
3703 {
3704 fn decode(
3705 slot_: ::fidl_next::Slot<'_, Self>,
3706 decoder_: &mut ___D,
3707 _: (),
3708 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3709 if slot_.as_bytes()[20..24] != [0u8; 4] {
3710 return Err(::fidl_next::DecodeError::InvalidPadding);
3711 }
3712
3713 ::fidl_next::munge! {
3714 let Self {
3715
3716 mut args,
3717 mut execution_controller,
3718
3719 } = slot_;
3720 }
3721
3722 let _field = args.as_mut();
3723
3724 ::fidl_next::Decode::decode(args.as_mut(), decoder_, ())?;
3725
3726 let _field = execution_controller.as_mut();
3727
3728 ::fidl_next::Decode::decode(execution_controller.as_mut(), decoder_, ())?;
3729
3730 Ok(())
3731 }
3732 }
3733
3734 impl<'de> ::fidl_next::IntoNatural for ControllerStartRequest<'de> {
3735 type Natural = crate::natural::ControllerStartRequest;
3736 }
3737
3738 impl ::fidl_next::Unconstrained for ControllerStartRequest<'static> {}
3739
3740 #[derive(Debug)]
3742 #[repr(C)]
3743 pub struct ControllerOpenExposedDirRequest {
3744 pub exposed_dir: ::fidl_next::ServerEnd<
3745 ::fidl_next_fuchsia_io::Directory,
3746 ::fidl_next::fuchsia::WireChannel,
3747 >,
3748 }
3749
3750 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerOpenExposedDirRequest>(), 4);
3751 static_assertions::const_assert_eq!(std::mem::align_of::<ControllerOpenExposedDirRequest>(), 4);
3752
3753 static_assertions::const_assert_eq!(
3754 std::mem::offset_of!(ControllerOpenExposedDirRequest, exposed_dir),
3755 0
3756 );
3757
3758 unsafe impl ::fidl_next::Wire for ControllerOpenExposedDirRequest {
3759 type Owned<'de> = ControllerOpenExposedDirRequest;
3760
3761 #[inline]
3762 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3763 ::fidl_next::munge! {
3764 let Self {
3765
3766 exposed_dir,
3767
3768 } = &mut *out_;
3769 }
3770
3771 ::fidl_next::Wire::zero_padding(exposed_dir);
3772 }
3773 }
3774
3775 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerOpenExposedDirRequest
3776 where
3777 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3778 ___D: ::fidl_next::fuchsia::HandleDecoder,
3779 {
3780 fn decode(
3781 slot_: ::fidl_next::Slot<'_, Self>,
3782 decoder_: &mut ___D,
3783 _: (),
3784 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3785 ::fidl_next::munge! {
3786 let Self {
3787
3788 mut exposed_dir,
3789
3790 } = slot_;
3791 }
3792
3793 let _field = exposed_dir.as_mut();
3794
3795 ::fidl_next::Decode::decode(exposed_dir.as_mut(), decoder_, ())?;
3796
3797 Ok(())
3798 }
3799 }
3800
3801 impl ::fidl_next::IntoNatural for ControllerOpenExposedDirRequest {
3802 type Natural = crate::natural::ControllerOpenExposedDirRequest;
3803 }
3804
3805 impl ::fidl_next::Unconstrained for ControllerOpenExposedDirRequest {}
3806
3807 #[repr(C)]
3809 pub struct CreateChildArgs<'de> {
3810 pub(crate) table: ::fidl_next::WireTable<'de>,
3811 }
3812
3813 impl<'de> Drop for CreateChildArgs<'de> {
3814 fn drop(&mut self) {
3815 let _ = self.table.get(1)
3816 .map(|envelope| unsafe {
3817 envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>()
3818 });
3819
3820 let _ = self.table.get(2).map(|envelope| unsafe {
3821 envelope.read_unchecked::<::fidl_next::WireVector<
3822 'de,
3823 ::fidl_next_fuchsia_component_decl::wire::Offer<'de>,
3824 >>()
3825 });
3826
3827 let _ = self.table.get(3)
3828 .map(|envelope| unsafe {
3829 envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>>()
3830 });
3831
3832 let _ = self.table.get(4)
3833 .map(|envelope| unsafe {
3834 envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
3835 });
3836
3837 let _ = self.table.get(5).map(|envelope| unsafe {
3838 envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
3839 });
3840 }
3841 }
3842
3843 unsafe impl ::fidl_next::Wire for CreateChildArgs<'static> {
3844 type Owned<'de> = CreateChildArgs<'de>;
3845
3846 #[inline]
3847 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3848 ::fidl_next::munge!(let Self { table } = out);
3849 ::fidl_next::WireTable::zero_padding(table);
3850 }
3851 }
3852
3853 unsafe impl<___D> ::fidl_next::Decode<___D> for CreateChildArgs<'static>
3854 where
3855 ___D: ::fidl_next::Decoder + ?Sized,
3856 ___D: ::fidl_next::fuchsia::HandleDecoder,
3857 {
3858 fn decode(
3859 slot: ::fidl_next::Slot<'_, Self>,
3860 decoder: &mut ___D,
3861 _: (),
3862 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3863 ::fidl_next::munge!(let Self { table } = slot);
3864
3865 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3866 match ordinal {
3867 0 => unsafe { ::core::hint::unreachable_unchecked() },
3868
3869 1 => {
3870 ::fidl_next::WireEnvelope::decode_as::<
3871 ___D,
3872 ::fidl_next::WireVector<
3873 'static,
3874 ::fidl_next_fuchsia_process::wire::HandleInfo,
3875 >,
3876 >(slot.as_mut(), decoder, (128, ()))?;
3877
3878 let value = unsafe {
3879 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
3880 '_,
3881 ::fidl_next_fuchsia_process::wire::HandleInfo,
3882 >>()
3883 };
3884
3885 if value.len() > 128 {
3886 return Err(::fidl_next::DecodeError::VectorTooLong {
3887 size: value.len() as u64,
3888 limit: 128,
3889 });
3890 }
3891
3892 Ok(())
3893 }
3894
3895 2 => {
3896 ::fidl_next::WireEnvelope::decode_as::<
3897 ___D,
3898 ::fidl_next::WireVector<
3899 'static,
3900 ::fidl_next_fuchsia_component_decl::wire::Offer<'static>,
3901 >,
3902 >(slot.as_mut(), decoder, (128, ()))?;
3903
3904 let value = unsafe {
3905 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
3906 '_,
3907 ::fidl_next_fuchsia_component_decl::wire::Offer<'_>,
3908 >>()
3909 };
3910
3911 if value.len() > 128 {
3912 return Err(::fidl_next::DecodeError::VectorTooLong {
3913 size: value.len() as u64,
3914 limit: 128,
3915 });
3916 }
3917
3918 Ok(())
3919 }
3920
3921 3 => {
3922 ::fidl_next::WireEnvelope::decode_as::<
3923 ___D,
3924 ::fidl_next::ServerEnd<
3925 crate::Controller,
3926 ::fidl_next::fuchsia::WireChannel,
3927 >,
3928 >(slot.as_mut(), decoder, ())?;
3929
3930 Ok(())
3931 }
3932
3933 4 => {
3934 ::fidl_next::WireEnvelope::decode_as::<
3935 ___D,
3936 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
3937 >(slot.as_mut(), decoder, ())?;
3938
3939 Ok(())
3940 }
3941
3942 5 => {
3943 ::fidl_next::WireEnvelope::decode_as::<
3944 ___D,
3945 ::fidl_next::fuchsia::WireEventPair,
3946 >(slot.as_mut(), decoder, ())?;
3947
3948 Ok(())
3949 }
3950
3951 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3952 }
3953 })
3954 }
3955 }
3956
3957 impl<'de> CreateChildArgs<'de> {
3958 pub fn numbered_handles(
3959 &self,
3960 ) -> ::core::option::Option<
3961 &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
3962 > {
3963 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3964 }
3965
3966 pub fn dynamic_offers(
3967 &self,
3968 ) -> ::core::option::Option<
3969 &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::wire::Offer<'de>>,
3970 > {
3971 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3972 }
3973
3974 pub fn controller(
3975 &self,
3976 ) -> ::core::option::Option<
3977 &::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>,
3978 > {
3979 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3980 }
3981
3982 pub fn dictionary(
3983 &self,
3984 ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3985 {
3986 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3987 }
3988
3989 pub fn additional_inputs(
3990 &self,
3991 ) -> ::core::option::Option<&::fidl_next::fuchsia::WireEventPair> {
3992 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
3993 }
3994 }
3995
3996 impl<'de> ::core::fmt::Debug for CreateChildArgs<'de> {
3997 fn fmt(
3998 &self,
3999 f: &mut ::core::fmt::Formatter<'_>,
4000 ) -> ::core::result::Result<(), ::core::fmt::Error> {
4001 f.debug_struct("CreateChildArgs")
4002 .field("numbered_handles", &self.numbered_handles())
4003 .field("dynamic_offers", &self.dynamic_offers())
4004 .field("controller", &self.controller())
4005 .field("dictionary", &self.dictionary())
4006 .field("additional_inputs", &self.additional_inputs())
4007 .finish()
4008 }
4009 }
4010
4011 impl<'de> ::fidl_next::IntoNatural for CreateChildArgs<'de> {
4012 type Natural = crate::natural::CreateChildArgs;
4013 }
4014
4015 impl ::fidl_next::Unconstrained for CreateChildArgs<'_> {}
4016
4017 #[repr(C)]
4019 pub struct DebugStartedPayload<'de> {
4020 pub(crate) table: ::fidl_next::WireTable<'de>,
4021 }
4022
4023 impl<'de> Drop for DebugStartedPayload<'de> {
4024 fn drop(&mut self) {
4025 let _ = self.table.get(1).map(|envelope| unsafe {
4026 envelope.read_unchecked::<::fidl_next::ClientEnd<
4027 ::fidl_next_fuchsia_io::Directory,
4028 ::fidl_next::fuchsia::WireChannel,
4029 >>()
4030 });
4031
4032 let _ = self.table.get(2).map(|envelope| unsafe {
4033 envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
4034 });
4035 }
4036 }
4037
4038 unsafe impl ::fidl_next::Wire for DebugStartedPayload<'static> {
4039 type Owned<'de> = DebugStartedPayload<'de>;
4040
4041 #[inline]
4042 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4043 ::fidl_next::munge!(let Self { table } = out);
4044 ::fidl_next::WireTable::zero_padding(table);
4045 }
4046 }
4047
4048 unsafe impl<___D> ::fidl_next::Decode<___D> for DebugStartedPayload<'static>
4049 where
4050 ___D: ::fidl_next::Decoder + ?Sized,
4051 ___D: ::fidl_next::fuchsia::HandleDecoder,
4052 {
4053 fn decode(
4054 slot: ::fidl_next::Slot<'_, Self>,
4055 decoder: &mut ___D,
4056 _: (),
4057 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4058 ::fidl_next::munge!(let Self { table } = slot);
4059
4060 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4061 match ordinal {
4062 0 => unsafe { ::core::hint::unreachable_unchecked() },
4063
4064 1 => {
4065 ::fidl_next::WireEnvelope::decode_as::<
4066 ___D,
4067 ::fidl_next::ClientEnd<
4068 ::fidl_next_fuchsia_io::Directory,
4069 ::fidl_next::fuchsia::WireChannel,
4070 >,
4071 >(slot.as_mut(), decoder, ())?;
4072
4073 Ok(())
4074 }
4075
4076 2 => {
4077 ::fidl_next::WireEnvelope::decode_as::<
4078 ___D,
4079 ::fidl_next::fuchsia::WireEventPair,
4080 >(slot.as_mut(), decoder, ())?;
4081
4082 Ok(())
4083 }
4084
4085 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
4086 }
4087 })
4088 }
4089 }
4090
4091 impl<'de> DebugStartedPayload<'de> {
4092 pub fn runtime_dir(
4093 &self,
4094 ) -> ::core::option::Option<
4095 &::fidl_next::ClientEnd<
4096 ::fidl_next_fuchsia_io::Directory,
4097 ::fidl_next::fuchsia::WireChannel,
4098 >,
4099 > {
4100 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4101 }
4102
4103 pub fn break_on_start(
4104 &self,
4105 ) -> ::core::option::Option<&::fidl_next::fuchsia::WireEventPair> {
4106 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4107 }
4108 }
4109
4110 impl<'de> ::core::fmt::Debug for DebugStartedPayload<'de> {
4111 fn fmt(
4112 &self,
4113 f: &mut ::core::fmt::Formatter<'_>,
4114 ) -> ::core::result::Result<(), ::core::fmt::Error> {
4115 f.debug_struct("DebugStartedPayload")
4116 .field("runtime_dir", &self.runtime_dir())
4117 .field("break_on_start", &self.break_on_start())
4118 .finish()
4119 }
4120 }
4121
4122 impl<'de> ::fidl_next::IntoNatural for DebugStartedPayload<'de> {
4123 type Natural = crate::natural::DebugStartedPayload;
4124 }
4125
4126 impl ::fidl_next::Unconstrained for DebugStartedPayload<'_> {}
4127
4128 #[repr(transparent)]
4130 pub struct EventPayload<'de> {
4131 pub(crate) raw: ::fidl_next::RawWireUnion,
4132 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4133 }
4134
4135 impl<'de> Drop for EventPayload<'de> {
4136 fn drop(&mut self) {
4137 match self.raw.ordinal() {
4138 1 => {
4139 let _ = unsafe {
4140 self.raw
4141 .get()
4142 .read_unchecked::<crate::wire::CapabilityRequestedPayload<'de>>()
4143 };
4144 }
4145
4146 2 => {
4147 let _ = unsafe {
4148 self.raw.get().read_unchecked::<crate::wire::PurgedPayload<'de>>()
4149 };
4150 }
4151
4152 4 => {
4153 let _ = unsafe {
4154 self.raw.get().read_unchecked::<crate::wire::DiscoveredPayload<'de>>()
4155 };
4156 }
4157
4158 5 => {
4159 let _ = unsafe {
4160 self.raw.get().read_unchecked::<crate::wire::DestroyedPayload<'de>>()
4161 };
4162 }
4163
4164 6 => {
4165 let _ = unsafe {
4166 self.raw.get().read_unchecked::<crate::wire::ResolvedPayload<'de>>()
4167 };
4168 }
4169
4170 7 => {
4171 let _ = unsafe {
4172 self.raw.get().read_unchecked::<crate::wire::StartedPayload<'de>>()
4173 };
4174 }
4175
4176 8 => {
4177 let _ = unsafe {
4178 self.raw.get().read_unchecked::<crate::wire::StoppedPayload<'de>>()
4179 };
4180 }
4181
4182 9 => {
4183 let _ = unsafe {
4184 self.raw.get().read_unchecked::<crate::wire::DebugStartedPayload<'de>>()
4185 };
4186 }
4187
4188 10 => {
4189 let _ = unsafe {
4190 self.raw.get().read_unchecked::<crate::wire::UnresolvedPayload<'de>>()
4191 };
4192 }
4193
4194 _ => (),
4195 }
4196 }
4197 }
4198
4199 unsafe impl ::fidl_next::Wire for EventPayload<'static> {
4200 type Owned<'de> = EventPayload<'de>;
4201
4202 #[inline]
4203 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4204 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4205 ::fidl_next::RawWireUnion::zero_padding(raw);
4206 }
4207 }
4208
4209 pub mod event_payload {
4210 pub enum Ref<'de> {
4211 CapabilityRequested(&'de crate::wire::CapabilityRequestedPayload<'de>),
4212
4213 Purged(&'de crate::wire::PurgedPayload<'de>),
4214
4215 Discovered(&'de crate::wire::DiscoveredPayload<'de>),
4216
4217 Destroyed(&'de crate::wire::DestroyedPayload<'de>),
4218
4219 Resolved(&'de crate::wire::ResolvedPayload<'de>),
4220
4221 Started(&'de crate::wire::StartedPayload<'de>),
4222
4223 Stopped(&'de crate::wire::StoppedPayload<'de>),
4224
4225 DebugStarted(&'de crate::wire::DebugStartedPayload<'de>),
4226
4227 Unresolved(&'de crate::wire::UnresolvedPayload<'de>),
4228
4229 UnknownOrdinal_(u64),
4230 }
4231 }
4232
4233 impl<'de> EventPayload<'de> {
4234 pub fn as_ref(&self) -> crate::wire::event_payload::Ref<'_> {
4235 match self.raw.ordinal() {
4236 1 => crate::wire::event_payload::Ref::CapabilityRequested(unsafe {
4237 self.raw.get().deref_unchecked::<crate::wire::CapabilityRequestedPayload<'_>>()
4238 }),
4239
4240 2 => crate::wire::event_payload::Ref::Purged(unsafe {
4241 self.raw.get().deref_unchecked::<crate::wire::PurgedPayload<'_>>()
4242 }),
4243
4244 4 => crate::wire::event_payload::Ref::Discovered(unsafe {
4245 self.raw.get().deref_unchecked::<crate::wire::DiscoveredPayload<'_>>()
4246 }),
4247
4248 5 => crate::wire::event_payload::Ref::Destroyed(unsafe {
4249 self.raw.get().deref_unchecked::<crate::wire::DestroyedPayload<'_>>()
4250 }),
4251
4252 6 => crate::wire::event_payload::Ref::Resolved(unsafe {
4253 self.raw.get().deref_unchecked::<crate::wire::ResolvedPayload<'_>>()
4254 }),
4255
4256 7 => crate::wire::event_payload::Ref::Started(unsafe {
4257 self.raw.get().deref_unchecked::<crate::wire::StartedPayload<'_>>()
4258 }),
4259
4260 8 => crate::wire::event_payload::Ref::Stopped(unsafe {
4261 self.raw.get().deref_unchecked::<crate::wire::StoppedPayload<'_>>()
4262 }),
4263
4264 9 => crate::wire::event_payload::Ref::DebugStarted(unsafe {
4265 self.raw.get().deref_unchecked::<crate::wire::DebugStartedPayload<'_>>()
4266 }),
4267
4268 10 => crate::wire::event_payload::Ref::Unresolved(unsafe {
4269 self.raw.get().deref_unchecked::<crate::wire::UnresolvedPayload<'_>>()
4270 }),
4271
4272 unknown => crate::wire::event_payload::Ref::UnknownOrdinal_(unknown),
4273 }
4274 }
4275 }
4276
4277 unsafe impl<___D> ::fidl_next::Decode<___D> for EventPayload<'static>
4278 where
4279 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4280 ___D: ::fidl_next::Decoder,
4281 ___D: ::fidl_next::fuchsia::HandleDecoder,
4282 {
4283 fn decode(
4284 mut slot: ::fidl_next::Slot<'_, Self>,
4285 decoder: &mut ___D,
4286 _: (),
4287 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4288 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4289 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
4290 1 => ::fidl_next::RawWireUnion::decode_as::<
4291 ___D,
4292 crate::wire::CapabilityRequestedPayload<'static>,
4293 >(raw, decoder, ())?,
4294
4295 2 => ::fidl_next::RawWireUnion::decode_as::<
4296 ___D,
4297 crate::wire::PurgedPayload<'static>,
4298 >(raw, decoder, ())?,
4299
4300 4 => ::fidl_next::RawWireUnion::decode_as::<
4301 ___D,
4302 crate::wire::DiscoveredPayload<'static>,
4303 >(raw, decoder, ())?,
4304
4305 5 => ::fidl_next::RawWireUnion::decode_as::<
4306 ___D,
4307 crate::wire::DestroyedPayload<'static>,
4308 >(raw, decoder, ())?,
4309
4310 6 => ::fidl_next::RawWireUnion::decode_as::<
4311 ___D,
4312 crate::wire::ResolvedPayload<'static>,
4313 >(raw, decoder, ())?,
4314
4315 7 => ::fidl_next::RawWireUnion::decode_as::<
4316 ___D,
4317 crate::wire::StartedPayload<'static>,
4318 >(raw, decoder, ())?,
4319
4320 8 => ::fidl_next::RawWireUnion::decode_as::<
4321 ___D,
4322 crate::wire::StoppedPayload<'static>,
4323 >(raw, decoder, ())?,
4324
4325 9 => ::fidl_next::RawWireUnion::decode_as::<
4326 ___D,
4327 crate::wire::DebugStartedPayload<'static>,
4328 >(raw, decoder, ())?,
4329
4330 10 => ::fidl_next::RawWireUnion::decode_as::<
4331 ___D,
4332 crate::wire::UnresolvedPayload<'static>,
4333 >(raw, decoder, ())?,
4334
4335 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
4336 }
4337
4338 Ok(())
4339 }
4340 }
4341
4342 impl<'de> ::core::fmt::Debug for EventPayload<'de> {
4343 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4344 match self.raw.ordinal() {
4345 1 => unsafe {
4346 self.raw
4347 .get()
4348 .deref_unchecked::<crate::wire::CapabilityRequestedPayload<'_>>()
4349 .fmt(f)
4350 },
4351 2 => unsafe {
4352 self.raw.get().deref_unchecked::<crate::wire::PurgedPayload<'_>>().fmt(f)
4353 },
4354 4 => unsafe {
4355 self.raw.get().deref_unchecked::<crate::wire::DiscoveredPayload<'_>>().fmt(f)
4356 },
4357 5 => unsafe {
4358 self.raw.get().deref_unchecked::<crate::wire::DestroyedPayload<'_>>().fmt(f)
4359 },
4360 6 => unsafe {
4361 self.raw.get().deref_unchecked::<crate::wire::ResolvedPayload<'_>>().fmt(f)
4362 },
4363 7 => unsafe {
4364 self.raw.get().deref_unchecked::<crate::wire::StartedPayload<'_>>().fmt(f)
4365 },
4366 8 => unsafe {
4367 self.raw.get().deref_unchecked::<crate::wire::StoppedPayload<'_>>().fmt(f)
4368 },
4369 9 => unsafe {
4370 self.raw.get().deref_unchecked::<crate::wire::DebugStartedPayload<'_>>().fmt(f)
4371 },
4372 10 => unsafe {
4373 self.raw.get().deref_unchecked::<crate::wire::UnresolvedPayload<'_>>().fmt(f)
4374 },
4375 _ => unsafe { ::core::hint::unreachable_unchecked() },
4376 }
4377 }
4378 }
4379
4380 impl<'de> ::fidl_next::IntoNatural for EventPayload<'de> {
4381 type Natural = crate::natural::EventPayload;
4382 }
4383
4384 impl ::fidl_next::Unconstrained for EventPayload<'static> {}
4385
4386 #[repr(C)]
4388 pub struct Event<'de> {
4389 pub(crate) table: ::fidl_next::WireTable<'de>,
4390 }
4391
4392 impl<'de> Drop for Event<'de> {
4393 fn drop(&mut self) {
4394 let _ = self.table.get(1).map(|envelope| unsafe {
4395 envelope.read_unchecked::<crate::wire::EventHeader<'de>>()
4396 });
4397
4398 let _ = self.table.get(2).map(|envelope| unsafe {
4399 envelope.read_unchecked::<crate::wire::EventPayload<'de>>()
4400 });
4401 }
4402 }
4403
4404 unsafe impl ::fidl_next::Wire for Event<'static> {
4405 type Owned<'de> = Event<'de>;
4406
4407 #[inline]
4408 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4409 ::fidl_next::munge!(let Self { table } = out);
4410 ::fidl_next::WireTable::zero_padding(table);
4411 }
4412 }
4413
4414 unsafe impl<___D> ::fidl_next::Decode<___D> for Event<'static>
4415 where
4416 ___D: ::fidl_next::Decoder + ?Sized,
4417 ___D: ::fidl_next::fuchsia::HandleDecoder,
4418 {
4419 fn decode(
4420 slot: ::fidl_next::Slot<'_, Self>,
4421 decoder: &mut ___D,
4422 _: (),
4423 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4424 ::fidl_next::munge!(let Self { table } = slot);
4425
4426 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4427 match ordinal {
4428 0 => unsafe { ::core::hint::unreachable_unchecked() },
4429
4430 1 => {
4431 ::fidl_next::WireEnvelope::decode_as::<
4432 ___D,
4433 crate::wire::EventHeader<'static>,
4434 >(slot.as_mut(), decoder, ())?;
4435
4436 Ok(())
4437 }
4438
4439 2 => {
4440 ::fidl_next::WireEnvelope::decode_as::<
4441 ___D,
4442 crate::wire::EventPayload<'static>,
4443 >(slot.as_mut(), decoder, ())?;
4444
4445 Ok(())
4446 }
4447
4448 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
4449 }
4450 })
4451 }
4452 }
4453
4454 impl<'de> Event<'de> {
4455 pub fn header(&self) -> ::core::option::Option<&crate::wire::EventHeader<'de>> {
4456 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4457 }
4458
4459 pub fn payload(&self) -> ::core::option::Option<&crate::wire::EventPayload<'de>> {
4460 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4461 }
4462 }
4463
4464 impl<'de> ::core::fmt::Debug for Event<'de> {
4465 fn fmt(
4466 &self,
4467 f: &mut ::core::fmt::Formatter<'_>,
4468 ) -> ::core::result::Result<(), ::core::fmt::Error> {
4469 f.debug_struct("Event")
4470 .field("header", &self.header())
4471 .field("payload", &self.payload())
4472 .finish()
4473 }
4474 }
4475
4476 impl<'de> ::fidl_next::IntoNatural for Event<'de> {
4477 type Natural = crate::natural::Event;
4478 }
4479
4480 impl ::fidl_next::Unconstrained for Event<'_> {}
4481
4482 #[derive(Debug)]
4484 #[repr(C)]
4485 pub struct EventStreamGetNextResponse<'de> {
4486 pub events: ::fidl_next::WireVector<'de, crate::wire::Event<'de>>,
4487 }
4488
4489 static_assertions::const_assert_eq!(std::mem::size_of::<EventStreamGetNextResponse<'_>>(), 16);
4490 static_assertions::const_assert_eq!(std::mem::align_of::<EventStreamGetNextResponse<'_>>(), 8);
4491
4492 static_assertions::const_assert_eq!(
4493 std::mem::offset_of!(EventStreamGetNextResponse<'_>, events),
4494 0
4495 );
4496
4497 unsafe impl ::fidl_next::Wire for EventStreamGetNextResponse<'static> {
4498 type Owned<'de> = EventStreamGetNextResponse<'de>;
4499
4500 #[inline]
4501 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4502 ::fidl_next::munge! {
4503 let Self {
4504
4505 events,
4506
4507 } = &mut *out_;
4508 }
4509
4510 ::fidl_next::Wire::zero_padding(events);
4511 }
4512 }
4513
4514 unsafe impl<___D> ::fidl_next::Decode<___D> for EventStreamGetNextResponse<'static>
4515 where
4516 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4517 ___D: ::fidl_next::Decoder,
4518 ___D: ::fidl_next::fuchsia::HandleDecoder,
4519 {
4520 fn decode(
4521 slot_: ::fidl_next::Slot<'_, Self>,
4522 decoder_: &mut ___D,
4523 _: (),
4524 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4525 ::fidl_next::munge! {
4526 let Self {
4527
4528 mut events,
4529
4530 } = slot_;
4531 }
4532
4533 let _field = events.as_mut();
4534 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
4535 ::fidl_next::Decode::decode(events.as_mut(), decoder_, (4294967295, ()))?;
4536
4537 Ok(())
4538 }
4539 }
4540
4541 impl<'de> ::fidl_next::IntoNatural for EventStreamGetNextResponse<'de> {
4542 type Natural = crate::natural::EventStreamGetNextResponse;
4543 }
4544
4545 impl ::fidl_next::Unconstrained for EventStreamGetNextResponse<'static> {}
4546
4547 #[derive(Debug)]
4549 #[repr(C)]
4550 pub struct IntrospectorGetMonikerRequest {
4551 pub component_instance: ::fidl_next::fuchsia::WireEvent,
4552 }
4553
4554 static_assertions::const_assert_eq!(std::mem::size_of::<IntrospectorGetMonikerRequest>(), 4);
4555 static_assertions::const_assert_eq!(std::mem::align_of::<IntrospectorGetMonikerRequest>(), 4);
4556
4557 static_assertions::const_assert_eq!(
4558 std::mem::offset_of!(IntrospectorGetMonikerRequest, component_instance),
4559 0
4560 );
4561
4562 unsafe impl ::fidl_next::Wire for IntrospectorGetMonikerRequest {
4563 type Owned<'de> = IntrospectorGetMonikerRequest;
4564
4565 #[inline]
4566 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4567 ::fidl_next::munge! {
4568 let Self {
4569
4570 component_instance,
4571
4572 } = &mut *out_;
4573 }
4574
4575 ::fidl_next::Wire::zero_padding(component_instance);
4576 }
4577 }
4578
4579 unsafe impl<___D> ::fidl_next::Decode<___D> for IntrospectorGetMonikerRequest
4580 where
4581 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4582 ___D: ::fidl_next::fuchsia::HandleDecoder,
4583 {
4584 fn decode(
4585 slot_: ::fidl_next::Slot<'_, Self>,
4586 decoder_: &mut ___D,
4587 _: (),
4588 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4589 ::fidl_next::munge! {
4590 let Self {
4591
4592 mut component_instance,
4593
4594 } = slot_;
4595 }
4596
4597 let _field = component_instance.as_mut();
4598
4599 ::fidl_next::Decode::decode(component_instance.as_mut(), decoder_, ())?;
4600
4601 Ok(())
4602 }
4603 }
4604
4605 impl ::fidl_next::IntoNatural for IntrospectorGetMonikerRequest {
4606 type Natural = crate::natural::IntrospectorGetMonikerRequest;
4607 }
4608
4609 impl ::fidl_next::Unconstrained for IntrospectorGetMonikerRequest {}
4610
4611 #[derive(Debug)]
4613 #[repr(C)]
4614 pub struct NamespaceInputEntry<'de> {
4615 pub path: ::fidl_next::WireString<'de>,
4616
4617 pub dictionary: ::fidl_next::ClientEnd<
4618 ::fidl_next_fuchsia_component_sandbox::Dictionary,
4619 ::fidl_next::fuchsia::WireChannel,
4620 >,
4621 }
4622
4623 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceInputEntry<'_>>(), 24);
4624 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceInputEntry<'_>>(), 8);
4625
4626 static_assertions::const_assert_eq!(std::mem::offset_of!(NamespaceInputEntry<'_>, path), 0);
4627
4628 static_assertions::const_assert_eq!(
4629 std::mem::offset_of!(NamespaceInputEntry<'_>, dictionary),
4630 16
4631 );
4632
4633 unsafe impl ::fidl_next::Wire for NamespaceInputEntry<'static> {
4634 type Owned<'de> = NamespaceInputEntry<'de>;
4635
4636 #[inline]
4637 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4638 ::fidl_next::munge! {
4639 let Self {
4640
4641 path,
4642 dictionary,
4643
4644 } = &mut *out_;
4645 }
4646
4647 ::fidl_next::Wire::zero_padding(path);
4648
4649 ::fidl_next::Wire::zero_padding(dictionary);
4650
4651 unsafe {
4652 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4653 }
4654 }
4655 }
4656
4657 unsafe impl<___D> ::fidl_next::Decode<___D> for NamespaceInputEntry<'static>
4658 where
4659 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4660 ___D: ::fidl_next::Decoder,
4661 ___D: ::fidl_next::fuchsia::HandleDecoder,
4662 {
4663 fn decode(
4664 slot_: ::fidl_next::Slot<'_, Self>,
4665 decoder_: &mut ___D,
4666 _: (),
4667 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4668 if slot_.as_bytes()[20..24] != [0u8; 4] {
4669 return Err(::fidl_next::DecodeError::InvalidPadding);
4670 }
4671
4672 ::fidl_next::munge! {
4673 let Self {
4674
4675 mut path,
4676 mut dictionary,
4677
4678 } = slot_;
4679 }
4680
4681 let _field = path.as_mut();
4682 ::fidl_next::Constrained::validate(_field, 4095)?;
4683 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
4684
4685 let path = unsafe { path.deref_unchecked() };
4686
4687 if path.len() > 4095 {
4688 return Err(::fidl_next::DecodeError::VectorTooLong {
4689 size: path.len() as u64,
4690 limit: 4095,
4691 });
4692 }
4693
4694 let _field = dictionary.as_mut();
4695
4696 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_, ())?;
4697
4698 Ok(())
4699 }
4700 }
4701
4702 impl<'de> ::fidl_next::IntoNatural for NamespaceInputEntry<'de> {
4703 type Natural = crate::natural::NamespaceInputEntry;
4704 }
4705
4706 impl ::fidl_next::Unconstrained for NamespaceInputEntry<'static> {}
4707
4708 #[derive(Debug)]
4710 #[repr(C)]
4711 pub struct NamespaceCreateRequest<'de> {
4712 pub entries: ::fidl_next::WireVector<'de, crate::wire::NamespaceInputEntry<'de>>,
4713 }
4714
4715 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceCreateRequest<'_>>(), 16);
4716 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceCreateRequest<'_>>(), 8);
4717
4718 static_assertions::const_assert_eq!(
4719 std::mem::offset_of!(NamespaceCreateRequest<'_>, entries),
4720 0
4721 );
4722
4723 unsafe impl ::fidl_next::Wire for NamespaceCreateRequest<'static> {
4724 type Owned<'de> = NamespaceCreateRequest<'de>;
4725
4726 #[inline]
4727 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4728 ::fidl_next::munge! {
4729 let Self {
4730
4731 entries,
4732
4733 } = &mut *out_;
4734 }
4735
4736 ::fidl_next::Wire::zero_padding(entries);
4737 }
4738 }
4739
4740 unsafe impl<___D> ::fidl_next::Decode<___D> for NamespaceCreateRequest<'static>
4741 where
4742 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4743 ___D: ::fidl_next::Decoder,
4744 ___D: ::fidl_next::fuchsia::HandleDecoder,
4745 {
4746 fn decode(
4747 slot_: ::fidl_next::Slot<'_, Self>,
4748 decoder_: &mut ___D,
4749 _: (),
4750 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4751 ::fidl_next::munge! {
4752 let Self {
4753
4754 mut entries,
4755
4756 } = slot_;
4757 }
4758
4759 let _field = entries.as_mut();
4760 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
4761 ::fidl_next::Decode::decode(entries.as_mut(), decoder_, (4294967295, ()))?;
4762
4763 Ok(())
4764 }
4765 }
4766
4767 impl<'de> ::fidl_next::IntoNatural for NamespaceCreateRequest<'de> {
4768 type Natural = crate::natural::NamespaceCreateRequest;
4769 }
4770
4771 impl ::fidl_next::Unconstrained for NamespaceCreateRequest<'static> {}
4772
4773 #[derive(Debug)]
4775 #[repr(C)]
4776 pub struct NamespaceCreateResponse<'de> {
4777 pub entries: ::fidl_next::WireVector<'de, crate::wire::NamespaceEntry<'de>>,
4778 }
4779
4780 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceCreateResponse<'_>>(), 16);
4781 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceCreateResponse<'_>>(), 8);
4782
4783 static_assertions::const_assert_eq!(
4784 std::mem::offset_of!(NamespaceCreateResponse<'_>, entries),
4785 0
4786 );
4787
4788 unsafe impl ::fidl_next::Wire for NamespaceCreateResponse<'static> {
4789 type Owned<'de> = NamespaceCreateResponse<'de>;
4790
4791 #[inline]
4792 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4793 ::fidl_next::munge! {
4794 let Self {
4795
4796 entries,
4797
4798 } = &mut *out_;
4799 }
4800
4801 ::fidl_next::Wire::zero_padding(entries);
4802 }
4803 }
4804
4805 unsafe impl<___D> ::fidl_next::Decode<___D> for NamespaceCreateResponse<'static>
4806 where
4807 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4808 ___D: ::fidl_next::Decoder,
4809 ___D: ::fidl_next::fuchsia::HandleDecoder,
4810 {
4811 fn decode(
4812 slot_: ::fidl_next::Slot<'_, Self>,
4813 decoder_: &mut ___D,
4814 _: (),
4815 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4816 ::fidl_next::munge! {
4817 let Self {
4818
4819 mut entries,
4820
4821 } = slot_;
4822 }
4823
4824 let _field = entries.as_mut();
4825 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
4826 ::fidl_next::Decode::decode(entries.as_mut(), decoder_, (4294967295, ()))?;
4827
4828 Ok(())
4829 }
4830 }
4831
4832 impl<'de> ::fidl_next::IntoNatural for NamespaceCreateResponse<'de> {
4833 type Natural = crate::natural::NamespaceCreateResponse;
4834 }
4835
4836 impl ::fidl_next::Unconstrained for NamespaceCreateResponse<'static> {}
4837
4838 #[derive(Debug)]
4840 #[repr(C)]
4841 pub struct RealmListChildrenRequest<'de> {
4842 pub collection: ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'de>,
4843
4844 pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::WireChannel>,
4845 }
4846
4847 static_assertions::const_assert_eq!(std::mem::size_of::<RealmListChildrenRequest<'_>>(), 24);
4848 static_assertions::const_assert_eq!(std::mem::align_of::<RealmListChildrenRequest<'_>>(), 8);
4849
4850 static_assertions::const_assert_eq!(
4851 std::mem::offset_of!(RealmListChildrenRequest<'_>, collection),
4852 0
4853 );
4854
4855 static_assertions::const_assert_eq!(
4856 std::mem::offset_of!(RealmListChildrenRequest<'_>, iter),
4857 16
4858 );
4859
4860 unsafe impl ::fidl_next::Wire for RealmListChildrenRequest<'static> {
4861 type Owned<'de> = RealmListChildrenRequest<'de>;
4862
4863 #[inline]
4864 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4865 ::fidl_next::munge! {
4866 let Self {
4867
4868 collection,
4869 iter,
4870
4871 } = &mut *out_;
4872 }
4873
4874 ::fidl_next::Wire::zero_padding(collection);
4875
4876 ::fidl_next::Wire::zero_padding(iter);
4877
4878 unsafe {
4879 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4880 }
4881 }
4882 }
4883
4884 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmListChildrenRequest<'static>
4885 where
4886 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4887 ___D: ::fidl_next::Decoder,
4888 ___D: ::fidl_next::fuchsia::HandleDecoder,
4889 {
4890 fn decode(
4891 slot_: ::fidl_next::Slot<'_, Self>,
4892 decoder_: &mut ___D,
4893 _: (),
4894 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4895 if slot_.as_bytes()[20..24] != [0u8; 4] {
4896 return Err(::fidl_next::DecodeError::InvalidPadding);
4897 }
4898
4899 ::fidl_next::munge! {
4900 let Self {
4901
4902 mut collection,
4903 mut iter,
4904
4905 } = slot_;
4906 }
4907
4908 let _field = collection.as_mut();
4909
4910 ::fidl_next::Decode::decode(collection.as_mut(), decoder_, ())?;
4911
4912 let _field = iter.as_mut();
4913
4914 ::fidl_next::Decode::decode(iter.as_mut(), decoder_, ())?;
4915
4916 Ok(())
4917 }
4918 }
4919
4920 impl<'de> ::fidl_next::IntoNatural for RealmListChildrenRequest<'de> {
4921 type Natural = crate::natural::RealmListChildrenRequest;
4922 }
4923
4924 impl ::fidl_next::Unconstrained for RealmListChildrenRequest<'static> {}
4925
4926 #[derive(Debug)]
4928 #[repr(C)]
4929 pub struct RealmGetChildOutputDictionaryDeprecatedRequest<'de> {
4930 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
4931 }
4932
4933 static_assertions::const_assert_eq!(
4934 std::mem::size_of::<RealmGetChildOutputDictionaryDeprecatedRequest<'_>>(),
4935 32
4936 );
4937 static_assertions::const_assert_eq!(
4938 std::mem::align_of::<RealmGetChildOutputDictionaryDeprecatedRequest<'_>>(),
4939 8
4940 );
4941
4942 static_assertions::const_assert_eq!(
4943 std::mem::offset_of!(RealmGetChildOutputDictionaryDeprecatedRequest<'_>, child),
4944 0
4945 );
4946
4947 unsafe impl ::fidl_next::Wire for RealmGetChildOutputDictionaryDeprecatedRequest<'static> {
4948 type Owned<'de> = RealmGetChildOutputDictionaryDeprecatedRequest<'de>;
4949
4950 #[inline]
4951 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4952 ::fidl_next::munge! {
4953 let Self {
4954
4955 child,
4956
4957 } = &mut *out_;
4958 }
4959
4960 ::fidl_next::Wire::zero_padding(child);
4961 }
4962 }
4963
4964 unsafe impl<___D> ::fidl_next::Decode<___D>
4965 for RealmGetChildOutputDictionaryDeprecatedRequest<'static>
4966 where
4967 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4968 ___D: ::fidl_next::Decoder,
4969 ___D: ::fidl_next::fuchsia::HandleDecoder,
4970 {
4971 fn decode(
4972 slot_: ::fidl_next::Slot<'_, Self>,
4973 decoder_: &mut ___D,
4974 _: (),
4975 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4976 ::fidl_next::munge! {
4977 let Self {
4978
4979 mut child,
4980
4981 } = slot_;
4982 }
4983
4984 let _field = child.as_mut();
4985
4986 ::fidl_next::Decode::decode(child.as_mut(), decoder_, ())?;
4987
4988 Ok(())
4989 }
4990 }
4991
4992 impl<'de> ::fidl_next::IntoNatural for RealmGetChildOutputDictionaryDeprecatedRequest<'de> {
4993 type Natural = crate::natural::RealmGetChildOutputDictionaryDeprecatedRequest;
4994 }
4995
4996 impl ::fidl_next::Unconstrained for RealmGetChildOutputDictionaryDeprecatedRequest<'static> {}
4997
4998 #[derive(Debug)]
5000 #[repr(C)]
5001 pub struct RealmGetChildOutputDictionaryDeprecatedResponse {
5002 pub dictionary: ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
5003 }
5004
5005 static_assertions::const_assert_eq!(
5006 std::mem::size_of::<RealmGetChildOutputDictionaryDeprecatedResponse>(),
5007 4
5008 );
5009 static_assertions::const_assert_eq!(
5010 std::mem::align_of::<RealmGetChildOutputDictionaryDeprecatedResponse>(),
5011 4
5012 );
5013
5014 static_assertions::const_assert_eq!(
5015 std::mem::offset_of!(RealmGetChildOutputDictionaryDeprecatedResponse, dictionary),
5016 0
5017 );
5018
5019 unsafe impl ::fidl_next::Wire for RealmGetChildOutputDictionaryDeprecatedResponse {
5020 type Owned<'de> = RealmGetChildOutputDictionaryDeprecatedResponse;
5021
5022 #[inline]
5023 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5024 ::fidl_next::munge! {
5025 let Self {
5026
5027 dictionary,
5028
5029 } = &mut *out_;
5030 }
5031
5032 ::fidl_next::Wire::zero_padding(dictionary);
5033 }
5034 }
5035
5036 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmGetChildOutputDictionaryDeprecatedResponse
5037 where
5038 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5039 ___D: ::fidl_next::fuchsia::HandleDecoder,
5040 {
5041 fn decode(
5042 slot_: ::fidl_next::Slot<'_, Self>,
5043 decoder_: &mut ___D,
5044 _: (),
5045 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5046 ::fidl_next::munge! {
5047 let Self {
5048
5049 mut dictionary,
5050
5051 } = slot_;
5052 }
5053
5054 let _field = dictionary.as_mut();
5055
5056 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_, ())?;
5057
5058 Ok(())
5059 }
5060 }
5061
5062 impl ::fidl_next::IntoNatural for RealmGetChildOutputDictionaryDeprecatedResponse {
5063 type Natural = crate::natural::RealmGetChildOutputDictionaryDeprecatedResponse;
5064 }
5065
5066 impl ::fidl_next::Unconstrained for RealmGetChildOutputDictionaryDeprecatedResponse {}
5067
5068 #[derive(Debug)]
5070 #[repr(C)]
5071 pub struct RealmGetChildOutputDictionaryRequest<'de> {
5072 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
5073 }
5074
5075 static_assertions::const_assert_eq!(
5076 std::mem::size_of::<RealmGetChildOutputDictionaryRequest<'_>>(),
5077 32
5078 );
5079 static_assertions::const_assert_eq!(
5080 std::mem::align_of::<RealmGetChildOutputDictionaryRequest<'_>>(),
5081 8
5082 );
5083
5084 static_assertions::const_assert_eq!(
5085 std::mem::offset_of!(RealmGetChildOutputDictionaryRequest<'_>, child),
5086 0
5087 );
5088
5089 unsafe impl ::fidl_next::Wire for RealmGetChildOutputDictionaryRequest<'static> {
5090 type Owned<'de> = RealmGetChildOutputDictionaryRequest<'de>;
5091
5092 #[inline]
5093 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5094 ::fidl_next::munge! {
5095 let Self {
5096
5097 child,
5098
5099 } = &mut *out_;
5100 }
5101
5102 ::fidl_next::Wire::zero_padding(child);
5103 }
5104 }
5105
5106 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmGetChildOutputDictionaryRequest<'static>
5107 where
5108 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5109 ___D: ::fidl_next::Decoder,
5110 ___D: ::fidl_next::fuchsia::HandleDecoder,
5111 {
5112 fn decode(
5113 slot_: ::fidl_next::Slot<'_, Self>,
5114 decoder_: &mut ___D,
5115 _: (),
5116 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5117 ::fidl_next::munge! {
5118 let Self {
5119
5120 mut child,
5121
5122 } = slot_;
5123 }
5124
5125 let _field = child.as_mut();
5126
5127 ::fidl_next::Decode::decode(child.as_mut(), decoder_, ())?;
5128
5129 Ok(())
5130 }
5131 }
5132
5133 impl<'de> ::fidl_next::IntoNatural for RealmGetChildOutputDictionaryRequest<'de> {
5134 type Natural = crate::natural::RealmGetChildOutputDictionaryRequest;
5135 }
5136
5137 impl ::fidl_next::Unconstrained for RealmGetChildOutputDictionaryRequest<'static> {}
5138
5139 #[derive(Debug)]
5141 #[repr(C)]
5142 pub struct RealmGetChildOutputDictionaryResponse {
5143 pub dictionary: ::fidl_next::fuchsia::WireEventPair,
5144 }
5145
5146 static_assertions::const_assert_eq!(
5147 std::mem::size_of::<RealmGetChildOutputDictionaryResponse>(),
5148 4
5149 );
5150 static_assertions::const_assert_eq!(
5151 std::mem::align_of::<RealmGetChildOutputDictionaryResponse>(),
5152 4
5153 );
5154
5155 static_assertions::const_assert_eq!(
5156 std::mem::offset_of!(RealmGetChildOutputDictionaryResponse, dictionary),
5157 0
5158 );
5159
5160 unsafe impl ::fidl_next::Wire for RealmGetChildOutputDictionaryResponse {
5161 type Owned<'de> = RealmGetChildOutputDictionaryResponse;
5162
5163 #[inline]
5164 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5165 ::fidl_next::munge! {
5166 let Self {
5167
5168 dictionary,
5169
5170 } = &mut *out_;
5171 }
5172
5173 ::fidl_next::Wire::zero_padding(dictionary);
5174 }
5175 }
5176
5177 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmGetChildOutputDictionaryResponse
5178 where
5179 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5180 ___D: ::fidl_next::fuchsia::HandleDecoder,
5181 {
5182 fn decode(
5183 slot_: ::fidl_next::Slot<'_, Self>,
5184 decoder_: &mut ___D,
5185 _: (),
5186 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5187 ::fidl_next::munge! {
5188 let Self {
5189
5190 mut dictionary,
5191
5192 } = slot_;
5193 }
5194
5195 let _field = dictionary.as_mut();
5196
5197 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_, ())?;
5198
5199 Ok(())
5200 }
5201 }
5202
5203 impl ::fidl_next::IntoNatural for RealmGetChildOutputDictionaryResponse {
5204 type Natural = crate::natural::RealmGetChildOutputDictionaryResponse;
5205 }
5206
5207 impl ::fidl_next::Unconstrained for RealmGetChildOutputDictionaryResponse {}
5208
5209 #[derive(Debug)]
5211 #[repr(C)]
5212 pub struct RealmOpenControllerRequest<'de> {
5213 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
5214
5215 pub controller:
5216 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>,
5217 }
5218
5219 static_assertions::const_assert_eq!(std::mem::size_of::<RealmOpenControllerRequest<'_>>(), 40);
5220 static_assertions::const_assert_eq!(std::mem::align_of::<RealmOpenControllerRequest<'_>>(), 8);
5221
5222 static_assertions::const_assert_eq!(
5223 std::mem::offset_of!(RealmOpenControllerRequest<'_>, child),
5224 0
5225 );
5226
5227 static_assertions::const_assert_eq!(
5228 std::mem::offset_of!(RealmOpenControllerRequest<'_>, controller),
5229 32
5230 );
5231
5232 unsafe impl ::fidl_next::Wire for RealmOpenControllerRequest<'static> {
5233 type Owned<'de> = RealmOpenControllerRequest<'de>;
5234
5235 #[inline]
5236 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5237 ::fidl_next::munge! {
5238 let Self {
5239
5240 child,
5241 controller,
5242
5243 } = &mut *out_;
5244 }
5245
5246 ::fidl_next::Wire::zero_padding(child);
5247
5248 ::fidl_next::Wire::zero_padding(controller);
5249
5250 unsafe {
5251 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
5252 }
5253 }
5254 }
5255
5256 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmOpenControllerRequest<'static>
5257 where
5258 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5259 ___D: ::fidl_next::Decoder,
5260 ___D: ::fidl_next::fuchsia::HandleDecoder,
5261 {
5262 fn decode(
5263 slot_: ::fidl_next::Slot<'_, Self>,
5264 decoder_: &mut ___D,
5265 _: (),
5266 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5267 if slot_.as_bytes()[36..40] != [0u8; 4] {
5268 return Err(::fidl_next::DecodeError::InvalidPadding);
5269 }
5270
5271 ::fidl_next::munge! {
5272 let Self {
5273
5274 mut child,
5275 mut controller,
5276
5277 } = slot_;
5278 }
5279
5280 let _field = child.as_mut();
5281
5282 ::fidl_next::Decode::decode(child.as_mut(), decoder_, ())?;
5283
5284 let _field = controller.as_mut();
5285
5286 ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
5287
5288 Ok(())
5289 }
5290 }
5291
5292 impl<'de> ::fidl_next::IntoNatural for RealmOpenControllerRequest<'de> {
5293 type Natural = crate::natural::RealmOpenControllerRequest;
5294 }
5295
5296 impl ::fidl_next::Unconstrained for RealmOpenControllerRequest<'static> {}
5297
5298 #[derive(Debug)]
5300 #[repr(C)]
5301 pub struct RealmOpenExposedDirRequest<'de> {
5302 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
5303
5304 pub exposed_dir: ::fidl_next::ServerEnd<
5305 ::fidl_next_fuchsia_io::Directory,
5306 ::fidl_next::fuchsia::WireChannel,
5307 >,
5308 }
5309
5310 static_assertions::const_assert_eq!(std::mem::size_of::<RealmOpenExposedDirRequest<'_>>(), 40);
5311 static_assertions::const_assert_eq!(std::mem::align_of::<RealmOpenExposedDirRequest<'_>>(), 8);
5312
5313 static_assertions::const_assert_eq!(
5314 std::mem::offset_of!(RealmOpenExposedDirRequest<'_>, child),
5315 0
5316 );
5317
5318 static_assertions::const_assert_eq!(
5319 std::mem::offset_of!(RealmOpenExposedDirRequest<'_>, exposed_dir),
5320 32
5321 );
5322
5323 unsafe impl ::fidl_next::Wire for RealmOpenExposedDirRequest<'static> {
5324 type Owned<'de> = RealmOpenExposedDirRequest<'de>;
5325
5326 #[inline]
5327 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5328 ::fidl_next::munge! {
5329 let Self {
5330
5331 child,
5332 exposed_dir,
5333
5334 } = &mut *out_;
5335 }
5336
5337 ::fidl_next::Wire::zero_padding(child);
5338
5339 ::fidl_next::Wire::zero_padding(exposed_dir);
5340
5341 unsafe {
5342 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
5343 }
5344 }
5345 }
5346
5347 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmOpenExposedDirRequest<'static>
5348 where
5349 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5350 ___D: ::fidl_next::Decoder,
5351 ___D: ::fidl_next::fuchsia::HandleDecoder,
5352 {
5353 fn decode(
5354 slot_: ::fidl_next::Slot<'_, Self>,
5355 decoder_: &mut ___D,
5356 _: (),
5357 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5358 if slot_.as_bytes()[36..40] != [0u8; 4] {
5359 return Err(::fidl_next::DecodeError::InvalidPadding);
5360 }
5361
5362 ::fidl_next::munge! {
5363 let Self {
5364
5365 mut child,
5366 mut exposed_dir,
5367
5368 } = slot_;
5369 }
5370
5371 let _field = child.as_mut();
5372
5373 ::fidl_next::Decode::decode(child.as_mut(), decoder_, ())?;
5374
5375 let _field = exposed_dir.as_mut();
5376
5377 ::fidl_next::Decode::decode(exposed_dir.as_mut(), decoder_, ())?;
5378
5379 Ok(())
5380 }
5381 }
5382
5383 impl<'de> ::fidl_next::IntoNatural for RealmOpenExposedDirRequest<'de> {
5384 type Natural = crate::natural::RealmOpenExposedDirRequest;
5385 }
5386
5387 impl ::fidl_next::Unconstrained for RealmOpenExposedDirRequest<'static> {}
5388
5389 #[derive(Debug)]
5391 #[repr(C)]
5392 pub struct RealmCreateChildRequest<'de> {
5393 pub collection: ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'de>,
5394
5395 pub decl: ::fidl_next_fuchsia_component_decl::wire::Child<'de>,
5396
5397 pub args: crate::wire::CreateChildArgs<'de>,
5398 }
5399
5400 static_assertions::const_assert_eq!(std::mem::size_of::<RealmCreateChildRequest<'_>>(), 48);
5401 static_assertions::const_assert_eq!(std::mem::align_of::<RealmCreateChildRequest<'_>>(), 8);
5402
5403 static_assertions::const_assert_eq!(
5404 std::mem::offset_of!(RealmCreateChildRequest<'_>, collection),
5405 0
5406 );
5407
5408 static_assertions::const_assert_eq!(
5409 std::mem::offset_of!(RealmCreateChildRequest<'_>, decl),
5410 16
5411 );
5412
5413 static_assertions::const_assert_eq!(
5414 std::mem::offset_of!(RealmCreateChildRequest<'_>, args),
5415 32
5416 );
5417
5418 unsafe impl ::fidl_next::Wire for RealmCreateChildRequest<'static> {
5419 type Owned<'de> = RealmCreateChildRequest<'de>;
5420
5421 #[inline]
5422 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5423 ::fidl_next::munge! {
5424 let Self {
5425
5426 collection,
5427 decl,
5428 args,
5429
5430 } = &mut *out_;
5431 }
5432
5433 ::fidl_next::Wire::zero_padding(collection);
5434
5435 ::fidl_next::Wire::zero_padding(decl);
5436
5437 ::fidl_next::Wire::zero_padding(args);
5438 }
5439 }
5440
5441 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmCreateChildRequest<'static>
5442 where
5443 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5444 ___D: ::fidl_next::Decoder,
5445 ___D: ::fidl_next::fuchsia::HandleDecoder,
5446 {
5447 fn decode(
5448 slot_: ::fidl_next::Slot<'_, Self>,
5449 decoder_: &mut ___D,
5450 _: (),
5451 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5452 ::fidl_next::munge! {
5453 let Self {
5454
5455 mut collection,
5456 mut decl,
5457 mut args,
5458
5459 } = slot_;
5460 }
5461
5462 let _field = collection.as_mut();
5463
5464 ::fidl_next::Decode::decode(collection.as_mut(), decoder_, ())?;
5465
5466 let _field = decl.as_mut();
5467
5468 ::fidl_next::Decode::decode(decl.as_mut(), decoder_, ())?;
5469
5470 let _field = args.as_mut();
5471
5472 ::fidl_next::Decode::decode(args.as_mut(), decoder_, ())?;
5473
5474 Ok(())
5475 }
5476 }
5477
5478 impl<'de> ::fidl_next::IntoNatural for RealmCreateChildRequest<'de> {
5479 type Natural = crate::natural::RealmCreateChildRequest;
5480 }
5481
5482 impl ::fidl_next::Unconstrained for RealmCreateChildRequest<'static> {}
5483
5484 #[derive(Debug)]
5486 #[repr(C)]
5487 pub struct RealmGetResolvedInfoResponse<'de> {
5488 pub resolved_info: ::fidl_next_fuchsia_component_resolution::wire::Component<'de>,
5489 }
5490
5491 static_assertions::const_assert_eq!(
5492 std::mem::size_of::<RealmGetResolvedInfoResponse<'_>>(),
5493 16
5494 );
5495 static_assertions::const_assert_eq!(
5496 std::mem::align_of::<RealmGetResolvedInfoResponse<'_>>(),
5497 8
5498 );
5499
5500 static_assertions::const_assert_eq!(
5501 std::mem::offset_of!(RealmGetResolvedInfoResponse<'_>, resolved_info),
5502 0
5503 );
5504
5505 unsafe impl ::fidl_next::Wire for RealmGetResolvedInfoResponse<'static> {
5506 type Owned<'de> = RealmGetResolvedInfoResponse<'de>;
5507
5508 #[inline]
5509 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5510 ::fidl_next::munge! {
5511 let Self {
5512
5513 resolved_info,
5514
5515 } = &mut *out_;
5516 }
5517
5518 ::fidl_next::Wire::zero_padding(resolved_info);
5519 }
5520 }
5521
5522 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmGetResolvedInfoResponse<'static>
5523 where
5524 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5525 ___D: ::fidl_next::Decoder,
5526 ___D: ::fidl_next::fuchsia::HandleDecoder,
5527 {
5528 fn decode(
5529 slot_: ::fidl_next::Slot<'_, Self>,
5530 decoder_: &mut ___D,
5531 _: (),
5532 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5533 ::fidl_next::munge! {
5534 let Self {
5535
5536 mut resolved_info,
5537
5538 } = slot_;
5539 }
5540
5541 let _field = resolved_info.as_mut();
5542
5543 ::fidl_next::Decode::decode(resolved_info.as_mut(), decoder_, ())?;
5544
5545 Ok(())
5546 }
5547 }
5548
5549 impl<'de> ::fidl_next::IntoNatural for RealmGetResolvedInfoResponse<'de> {
5550 type Natural = crate::natural::RealmGetResolvedInfoResponse;
5551 }
5552
5553 impl ::fidl_next::Unconstrained for RealmGetResolvedInfoResponse<'static> {}
5554
5555 #[derive(Debug)]
5557 #[repr(C)]
5558 pub struct StorageAdminListStorageInRealmRequest<'de> {
5559 pub relative_moniker: ::fidl_next::WireString<'de>,
5560
5561 pub iterator:
5562 ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::fuchsia::WireChannel>,
5563 }
5564
5565 static_assertions::const_assert_eq!(
5566 std::mem::size_of::<StorageAdminListStorageInRealmRequest<'_>>(),
5567 24
5568 );
5569 static_assertions::const_assert_eq!(
5570 std::mem::align_of::<StorageAdminListStorageInRealmRequest<'_>>(),
5571 8
5572 );
5573
5574 static_assertions::const_assert_eq!(
5575 std::mem::offset_of!(StorageAdminListStorageInRealmRequest<'_>, relative_moniker),
5576 0
5577 );
5578
5579 static_assertions::const_assert_eq!(
5580 std::mem::offset_of!(StorageAdminListStorageInRealmRequest<'_>, iterator),
5581 16
5582 );
5583
5584 unsafe impl ::fidl_next::Wire for StorageAdminListStorageInRealmRequest<'static> {
5585 type Owned<'de> = StorageAdminListStorageInRealmRequest<'de>;
5586
5587 #[inline]
5588 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5589 ::fidl_next::munge! {
5590 let Self {
5591
5592 relative_moniker,
5593 iterator,
5594
5595 } = &mut *out_;
5596 }
5597
5598 ::fidl_next::Wire::zero_padding(relative_moniker);
5599
5600 ::fidl_next::Wire::zero_padding(iterator);
5601
5602 unsafe {
5603 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
5604 }
5605 }
5606 }
5607
5608 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminListStorageInRealmRequest<'static>
5609 where
5610 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5611 ___D: ::fidl_next::Decoder,
5612 ___D: ::fidl_next::fuchsia::HandleDecoder,
5613 {
5614 fn decode(
5615 slot_: ::fidl_next::Slot<'_, Self>,
5616 decoder_: &mut ___D,
5617 _: (),
5618 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5619 if slot_.as_bytes()[20..24] != [0u8; 4] {
5620 return Err(::fidl_next::DecodeError::InvalidPadding);
5621 }
5622
5623 ::fidl_next::munge! {
5624 let Self {
5625
5626 mut relative_moniker,
5627 mut iterator,
5628
5629 } = slot_;
5630 }
5631
5632 let _field = relative_moniker.as_mut();
5633 ::fidl_next::Constrained::validate(_field, 4096)?;
5634 ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_, 4096)?;
5635
5636 let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
5637
5638 if relative_moniker.len() > 4096 {
5639 return Err(::fidl_next::DecodeError::VectorTooLong {
5640 size: relative_moniker.len() as u64,
5641 limit: 4096,
5642 });
5643 }
5644
5645 let _field = iterator.as_mut();
5646
5647 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
5648
5649 Ok(())
5650 }
5651 }
5652
5653 impl<'de> ::fidl_next::IntoNatural for StorageAdminListStorageInRealmRequest<'de> {
5654 type Natural = crate::natural::StorageAdminListStorageInRealmRequest;
5655 }
5656
5657 impl ::fidl_next::Unconstrained for StorageAdminListStorageInRealmRequest<'static> {}
5658
5659 #[derive(Debug)]
5661 #[repr(C)]
5662 pub struct StorageAdminOpenStorageRequest<'de> {
5663 pub relative_moniker: ::fidl_next::WireString<'de>,
5664
5665 pub object:
5666 ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::WireChannel>,
5667 }
5668
5669 static_assertions::const_assert_eq!(
5670 std::mem::size_of::<StorageAdminOpenStorageRequest<'_>>(),
5671 24
5672 );
5673 static_assertions::const_assert_eq!(
5674 std::mem::align_of::<StorageAdminOpenStorageRequest<'_>>(),
5675 8
5676 );
5677
5678 static_assertions::const_assert_eq!(
5679 std::mem::offset_of!(StorageAdminOpenStorageRequest<'_>, relative_moniker),
5680 0
5681 );
5682
5683 static_assertions::const_assert_eq!(
5684 std::mem::offset_of!(StorageAdminOpenStorageRequest<'_>, object),
5685 16
5686 );
5687
5688 unsafe impl ::fidl_next::Wire for StorageAdminOpenStorageRequest<'static> {
5689 type Owned<'de> = StorageAdminOpenStorageRequest<'de>;
5690
5691 #[inline]
5692 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5693 ::fidl_next::munge! {
5694 let Self {
5695
5696 relative_moniker,
5697 object,
5698
5699 } = &mut *out_;
5700 }
5701
5702 ::fidl_next::Wire::zero_padding(relative_moniker);
5703
5704 ::fidl_next::Wire::zero_padding(object);
5705
5706 unsafe {
5707 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
5708 }
5709 }
5710 }
5711
5712 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminOpenStorageRequest<'static>
5713 where
5714 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5715 ___D: ::fidl_next::Decoder,
5716 ___D: ::fidl_next::fuchsia::HandleDecoder,
5717 {
5718 fn decode(
5719 slot_: ::fidl_next::Slot<'_, Self>,
5720 decoder_: &mut ___D,
5721 _: (),
5722 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5723 if slot_.as_bytes()[20..24] != [0u8; 4] {
5724 return Err(::fidl_next::DecodeError::InvalidPadding);
5725 }
5726
5727 ::fidl_next::munge! {
5728 let Self {
5729
5730 mut relative_moniker,
5731 mut object,
5732
5733 } = slot_;
5734 }
5735
5736 let _field = relative_moniker.as_mut();
5737 ::fidl_next::Constrained::validate(_field, 4096)?;
5738 ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_, 4096)?;
5739
5740 let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
5741
5742 if relative_moniker.len() > 4096 {
5743 return Err(::fidl_next::DecodeError::VectorTooLong {
5744 size: relative_moniker.len() as u64,
5745 limit: 4096,
5746 });
5747 }
5748
5749 let _field = object.as_mut();
5750
5751 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
5752
5753 Ok(())
5754 }
5755 }
5756
5757 impl<'de> ::fidl_next::IntoNatural for StorageAdminOpenStorageRequest<'de> {
5758 type Natural = crate::natural::StorageAdminOpenStorageRequest;
5759 }
5760
5761 impl ::fidl_next::Unconstrained for StorageAdminOpenStorageRequest<'static> {}
5762
5763 #[derive(Debug)]
5765 #[repr(C)]
5766 pub struct StorageAdminOpenComponentStorageByIdRequest<'de> {
5767 pub id: ::fidl_next::WireString<'de>,
5768
5769 pub object:
5770 ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::WireChannel>,
5771 }
5772
5773 static_assertions::const_assert_eq!(
5774 std::mem::size_of::<StorageAdminOpenComponentStorageByIdRequest<'_>>(),
5775 24
5776 );
5777 static_assertions::const_assert_eq!(
5778 std::mem::align_of::<StorageAdminOpenComponentStorageByIdRequest<'_>>(),
5779 8
5780 );
5781
5782 static_assertions::const_assert_eq!(
5783 std::mem::offset_of!(StorageAdminOpenComponentStorageByIdRequest<'_>, id),
5784 0
5785 );
5786
5787 static_assertions::const_assert_eq!(
5788 std::mem::offset_of!(StorageAdminOpenComponentStorageByIdRequest<'_>, object),
5789 16
5790 );
5791
5792 unsafe impl ::fidl_next::Wire for StorageAdminOpenComponentStorageByIdRequest<'static> {
5793 type Owned<'de> = StorageAdminOpenComponentStorageByIdRequest<'de>;
5794
5795 #[inline]
5796 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5797 ::fidl_next::munge! {
5798 let Self {
5799
5800 id,
5801 object,
5802
5803 } = &mut *out_;
5804 }
5805
5806 ::fidl_next::Wire::zero_padding(id);
5807
5808 ::fidl_next::Wire::zero_padding(object);
5809
5810 unsafe {
5811 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
5812 }
5813 }
5814 }
5815
5816 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminOpenComponentStorageByIdRequest<'static>
5817 where
5818 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5819 ___D: ::fidl_next::Decoder,
5820 ___D: ::fidl_next::fuchsia::HandleDecoder,
5821 {
5822 fn decode(
5823 slot_: ::fidl_next::Slot<'_, Self>,
5824 decoder_: &mut ___D,
5825 _: (),
5826 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5827 if slot_.as_bytes()[20..24] != [0u8; 4] {
5828 return Err(::fidl_next::DecodeError::InvalidPadding);
5829 }
5830
5831 ::fidl_next::munge! {
5832 let Self {
5833
5834 mut id,
5835 mut object,
5836
5837 } = slot_;
5838 }
5839
5840 let _field = id.as_mut();
5841 ::fidl_next::Constrained::validate(_field, 64)?;
5842 ::fidl_next::Decode::decode(id.as_mut(), decoder_, 64)?;
5843
5844 let id = unsafe { id.deref_unchecked() };
5845
5846 if id.len() > 64 {
5847 return Err(::fidl_next::DecodeError::VectorTooLong {
5848 size: id.len() as u64,
5849 limit: 64,
5850 });
5851 }
5852
5853 let _field = object.as_mut();
5854
5855 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
5856
5857 Ok(())
5858 }
5859 }
5860
5861 impl<'de> ::fidl_next::IntoNatural for StorageAdminOpenComponentStorageByIdRequest<'de> {
5862 type Natural = crate::natural::StorageAdminOpenComponentStorageByIdRequest;
5863 }
5864
5865 impl ::fidl_next::Unconstrained for StorageAdminOpenComponentStorageByIdRequest<'static> {}
5866}
5867
5868pub mod wire_optional {
5869
5870 pub use fidl_next_common_fuchsia_component::wire_optional::*;
5871
5872 #[repr(transparent)]
5873 pub struct EventPayload<'de> {
5874 pub(crate) raw: ::fidl_next::RawWireUnion,
5875 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5876 }
5877
5878 unsafe impl ::fidl_next::Wire for EventPayload<'static> {
5879 type Owned<'de> = EventPayload<'de>;
5880
5881 #[inline]
5882 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5883 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5884 ::fidl_next::RawWireUnion::zero_padding(raw);
5885 }
5886 }
5887
5888 impl<'de> EventPayload<'de> {
5889 pub fn is_some(&self) -> bool {
5890 self.raw.is_some()
5891 }
5892
5893 pub fn is_none(&self) -> bool {
5894 self.raw.is_none()
5895 }
5896
5897 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::EventPayload<'de>> {
5898 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
5899 }
5900
5901 pub fn into_option(self) -> ::core::option::Option<crate::wire::EventPayload<'de>> {
5902 if self.is_some() {
5903 Some(crate::wire::EventPayload {
5904 raw: self.raw,
5905 _phantom: ::core::marker::PhantomData,
5906 })
5907 } else {
5908 None
5909 }
5910 }
5911 }
5912
5913 unsafe impl<___D> ::fidl_next::Decode<___D> for EventPayload<'static>
5914 where
5915 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5916 ___D: ::fidl_next::Decoder,
5917 ___D: ::fidl_next::fuchsia::HandleDecoder,
5918 {
5919 fn decode(
5920 mut slot: ::fidl_next::Slot<'_, Self>,
5921 decoder: &mut ___D,
5922 _: (),
5923 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5924 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5925 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
5926 1 => ::fidl_next::RawWireUnion::decode_as::<
5927 ___D,
5928 crate::wire::CapabilityRequestedPayload<'static>,
5929 >(raw, decoder, ())?,
5930
5931 2 => ::fidl_next::RawWireUnion::decode_as::<
5932 ___D,
5933 crate::wire::PurgedPayload<'static>,
5934 >(raw, decoder, ())?,
5935
5936 4 => ::fidl_next::RawWireUnion::decode_as::<
5937 ___D,
5938 crate::wire::DiscoveredPayload<'static>,
5939 >(raw, decoder, ())?,
5940
5941 5 => ::fidl_next::RawWireUnion::decode_as::<
5942 ___D,
5943 crate::wire::DestroyedPayload<'static>,
5944 >(raw, decoder, ())?,
5945
5946 6 => ::fidl_next::RawWireUnion::decode_as::<
5947 ___D,
5948 crate::wire::ResolvedPayload<'static>,
5949 >(raw, decoder, ())?,
5950
5951 7 => ::fidl_next::RawWireUnion::decode_as::<
5952 ___D,
5953 crate::wire::StartedPayload<'static>,
5954 >(raw, decoder, ())?,
5955
5956 8 => ::fidl_next::RawWireUnion::decode_as::<
5957 ___D,
5958 crate::wire::StoppedPayload<'static>,
5959 >(raw, decoder, ())?,
5960
5961 9 => ::fidl_next::RawWireUnion::decode_as::<
5962 ___D,
5963 crate::wire::DebugStartedPayload<'static>,
5964 >(raw, decoder, ())?,
5965
5966 10 => ::fidl_next::RawWireUnion::decode_as::<
5967 ___D,
5968 crate::wire::UnresolvedPayload<'static>,
5969 >(raw, decoder, ())?,
5970
5971 0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
5972 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
5973 }
5974
5975 Ok(())
5976 }
5977 }
5978
5979 impl<'de> ::core::fmt::Debug for EventPayload<'de> {
5980 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5981 self.as_ref().fmt(f)
5982 }
5983 }
5984
5985 impl<'de> ::fidl_next::IntoNatural for EventPayload<'de> {
5986 type Natural = ::core::option::Option<crate::natural::EventPayload>;
5987 }
5988
5989 impl ::fidl_next::Unconstrained for EventPayload<'static> {}
5990}
5991
5992pub mod generic {
5993
5994 pub use fidl_next_common_fuchsia_component::generic::*;
5995
5996 pub struct ControllerIsStartedResponse<T0> {
5997 pub is_started: T0,
5998 }
5999
6000 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ControllerIsStartedResponse, ___E>
6001 for ControllerIsStartedResponse<T0>
6002 where
6003 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6004 ___E: ::fidl_next::fuchsia::HandleEncoder,
6005 T0: ::fidl_next::Encode<bool, ___E>,
6006 {
6007 #[inline]
6008 fn encode(
6009 self,
6010 encoder_: &mut ___E,
6011 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerIsStartedResponse>,
6012 _: (),
6013 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6014 ::fidl_next::munge! {
6015 let crate::wire::ControllerIsStartedResponse {
6016
6017 is_started,
6018
6019 } = out_;
6020 }
6021
6022 ::fidl_next::Encode::encode(self.is_started, encoder_, is_started, ())?;
6023
6024 Ok(())
6025 }
6026 }
6027
6028 pub struct ControllerGetExposedDictionaryResponse<T0> {
6029 pub dictionary: T0,
6030 }
6031
6032 unsafe impl<___E, T0>
6033 ::fidl_next::Encode<crate::wire::ControllerGetExposedDictionaryResponse, ___E>
6034 for ControllerGetExposedDictionaryResponse<T0>
6035 where
6036 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6037 ___E: ::fidl_next::fuchsia::HandleEncoder,
6038 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef, ___E>,
6039 {
6040 #[inline]
6041 fn encode(
6042 self,
6043 encoder_: &mut ___E,
6044 out_: &mut ::core::mem::MaybeUninit<
6045 crate::wire::ControllerGetExposedDictionaryResponse,
6046 >,
6047 _: (),
6048 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6049 ::fidl_next::munge! {
6050 let crate::wire::ControllerGetExposedDictionaryResponse {
6051
6052 dictionary,
6053
6054 } = out_;
6055 }
6056
6057 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
6058
6059 Ok(())
6060 }
6061 }
6062
6063 pub struct ControllerGetOutputDictionaryResponse<T0> {
6064 pub dictionary: T0,
6065 }
6066
6067 unsafe impl<___E, T0>
6068 ::fidl_next::Encode<crate::wire::ControllerGetOutputDictionaryResponse, ___E>
6069 for ControllerGetOutputDictionaryResponse<T0>
6070 where
6071 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6072 ___E: ::fidl_next::fuchsia::HandleEncoder,
6073 T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireEventPair, ___E>,
6074 {
6075 #[inline]
6076 fn encode(
6077 self,
6078 encoder_: &mut ___E,
6079 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerGetOutputDictionaryResponse>,
6080 _: (),
6081 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6082 ::fidl_next::munge! {
6083 let crate::wire::ControllerGetOutputDictionaryResponse {
6084
6085 dictionary,
6086
6087 } = out_;
6088 }
6089
6090 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
6091
6092 Ok(())
6093 }
6094 }
6095
6096 pub struct ControllerStartRequest<T0, T1> {
6097 pub args: T0,
6098
6099 pub execution_controller: T1,
6100 }
6101
6102 unsafe impl<___E, T0, T1>
6103 ::fidl_next::Encode<crate::wire::ControllerStartRequest<'static>, ___E>
6104 for ControllerStartRequest<T0, T1>
6105 where
6106 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6107 ___E: ::fidl_next::Encoder,
6108 ___E: ::fidl_next::fuchsia::HandleEncoder,
6109 T0: ::fidl_next::Encode<crate::wire::StartChildArgs<'static>, ___E>,
6110 T1: ::fidl_next::Encode<
6111 ::fidl_next::ServerEnd<
6112 crate::ExecutionController,
6113 ::fidl_next::fuchsia::WireChannel,
6114 >,
6115 ___E,
6116 >,
6117 {
6118 #[inline]
6119 fn encode(
6120 self,
6121 encoder_: &mut ___E,
6122 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerStartRequest<'static>>,
6123 _: (),
6124 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6125 ::fidl_next::munge! {
6126 let crate::wire::ControllerStartRequest {
6127
6128 args,
6129 execution_controller,
6130
6131 } = out_;
6132 }
6133
6134 ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
6135
6136 ::fidl_next::Encode::encode(
6137 self.execution_controller,
6138 encoder_,
6139 execution_controller,
6140 (),
6141 )?;
6142
6143 Ok(())
6144 }
6145 }
6146
6147 pub struct ControllerOpenExposedDirRequest<T0> {
6148 pub exposed_dir: T0,
6149 }
6150
6151 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ControllerOpenExposedDirRequest, ___E>
6152 for ControllerOpenExposedDirRequest<T0>
6153 where
6154 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6155 ___E: ::fidl_next::fuchsia::HandleEncoder,
6156 T0: ::fidl_next::Encode<
6157 ::fidl_next::ServerEnd<
6158 ::fidl_next_fuchsia_io::Directory,
6159 ::fidl_next::fuchsia::WireChannel,
6160 >,
6161 ___E,
6162 >,
6163 {
6164 #[inline]
6165 fn encode(
6166 self,
6167 encoder_: &mut ___E,
6168 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerOpenExposedDirRequest>,
6169 _: (),
6170 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6171 ::fidl_next::munge! {
6172 let crate::wire::ControllerOpenExposedDirRequest {
6173
6174 exposed_dir,
6175
6176 } = out_;
6177 }
6178
6179 ::fidl_next::Encode::encode(self.exposed_dir, encoder_, exposed_dir, ())?;
6180
6181 Ok(())
6182 }
6183 }
6184
6185 pub struct EventStreamGetNextResponse<T0> {
6186 pub events: T0,
6187 }
6188
6189 unsafe impl<___E, T0>
6190 ::fidl_next::Encode<crate::wire::EventStreamGetNextResponse<'static>, ___E>
6191 for EventStreamGetNextResponse<T0>
6192 where
6193 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6194 ___E: ::fidl_next::Encoder,
6195 ___E: ::fidl_next::fuchsia::HandleEncoder,
6196 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, crate::wire::Event<'static>>, ___E>,
6197 {
6198 #[inline]
6199 fn encode(
6200 self,
6201 encoder_: &mut ___E,
6202 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventStreamGetNextResponse<'static>>,
6203 _: (),
6204 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6205 ::fidl_next::munge! {
6206 let crate::wire::EventStreamGetNextResponse {
6207
6208 events,
6209
6210 } = out_;
6211 }
6212
6213 ::fidl_next::Encode::encode(self.events, encoder_, events, (4294967295, ()))?;
6214
6215 Ok(())
6216 }
6217 }
6218
6219 pub struct IntrospectorGetMonikerRequest<T0> {
6220 pub component_instance: T0,
6221 }
6222
6223 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::IntrospectorGetMonikerRequest, ___E>
6224 for IntrospectorGetMonikerRequest<T0>
6225 where
6226 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6227 ___E: ::fidl_next::fuchsia::HandleEncoder,
6228 T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireEvent, ___E>,
6229 {
6230 #[inline]
6231 fn encode(
6232 self,
6233 encoder_: &mut ___E,
6234 out_: &mut ::core::mem::MaybeUninit<crate::wire::IntrospectorGetMonikerRequest>,
6235 _: (),
6236 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6237 ::fidl_next::munge! {
6238 let crate::wire::IntrospectorGetMonikerRequest {
6239
6240 component_instance,
6241
6242 } = out_;
6243 }
6244
6245 ::fidl_next::Encode::encode(self.component_instance, encoder_, component_instance, ())?;
6246
6247 Ok(())
6248 }
6249 }
6250
6251 pub struct NamespaceInputEntry<T0, T1> {
6252 pub path: T0,
6253
6254 pub dictionary: T1,
6255 }
6256
6257 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NamespaceInputEntry<'static>, ___E>
6258 for NamespaceInputEntry<T0, T1>
6259 where
6260 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6261 ___E: ::fidl_next::Encoder,
6262 ___E: ::fidl_next::fuchsia::HandleEncoder,
6263 T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>,
6264 T1: ::fidl_next::Encode<
6265 ::fidl_next::ClientEnd<
6266 ::fidl_next_fuchsia_component_sandbox::Dictionary,
6267 ::fidl_next::fuchsia::WireChannel,
6268 >,
6269 ___E,
6270 >,
6271 {
6272 #[inline]
6273 fn encode(
6274 self,
6275 encoder_: &mut ___E,
6276 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceInputEntry<'static>>,
6277 _: (),
6278 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6279 ::fidl_next::munge! {
6280 let crate::wire::NamespaceInputEntry {
6281
6282 path,
6283 dictionary,
6284
6285 } = out_;
6286 }
6287
6288 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
6289
6290 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
6291
6292 Ok(())
6293 }
6294 }
6295
6296 pub struct NamespaceCreateRequest<T0> {
6297 pub entries: T0,
6298 }
6299
6300 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NamespaceCreateRequest<'static>, ___E>
6301 for NamespaceCreateRequest<T0>
6302 where
6303 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6304 ___E: ::fidl_next::Encoder,
6305 ___E: ::fidl_next::fuchsia::HandleEncoder,
6306 T0: ::fidl_next::Encode<
6307 ::fidl_next::WireVector<'static, crate::wire::NamespaceInputEntry<'static>>,
6308 ___E,
6309 >,
6310 {
6311 #[inline]
6312 fn encode(
6313 self,
6314 encoder_: &mut ___E,
6315 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceCreateRequest<'static>>,
6316 _: (),
6317 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6318 ::fidl_next::munge! {
6319 let crate::wire::NamespaceCreateRequest {
6320
6321 entries,
6322
6323 } = out_;
6324 }
6325
6326 ::fidl_next::Encode::encode(self.entries, encoder_, entries, (4294967295, ()))?;
6327
6328 Ok(())
6329 }
6330 }
6331
6332 pub struct NamespaceCreateResponse<T0> {
6333 pub entries: T0,
6334 }
6335
6336 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NamespaceCreateResponse<'static>, ___E>
6337 for NamespaceCreateResponse<T0>
6338 where
6339 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6340 ___E: ::fidl_next::Encoder,
6341 ___E: ::fidl_next::fuchsia::HandleEncoder,
6342 T0: ::fidl_next::Encode<
6343 ::fidl_next::WireVector<'static, crate::wire::NamespaceEntry<'static>>,
6344 ___E,
6345 >,
6346 {
6347 #[inline]
6348 fn encode(
6349 self,
6350 encoder_: &mut ___E,
6351 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceCreateResponse<'static>>,
6352 _: (),
6353 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6354 ::fidl_next::munge! {
6355 let crate::wire::NamespaceCreateResponse {
6356
6357 entries,
6358
6359 } = out_;
6360 }
6361
6362 ::fidl_next::Encode::encode(self.entries, encoder_, entries, (4294967295, ()))?;
6363
6364 Ok(())
6365 }
6366 }
6367
6368 pub struct RealmListChildrenRequest<T0, T1> {
6369 pub collection: T0,
6370
6371 pub iter: T1,
6372 }
6373
6374 unsafe impl<___E, T0, T1>
6375 ::fidl_next::Encode<crate::wire::RealmListChildrenRequest<'static>, ___E>
6376 for RealmListChildrenRequest<T0, T1>
6377 where
6378 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6379 ___E: ::fidl_next::Encoder,
6380 ___E: ::fidl_next::fuchsia::HandleEncoder,
6381 T0: ::fidl_next::Encode<
6382 ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
6383 ___E,
6384 >,
6385 T1: ::fidl_next::Encode<
6386 ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::WireChannel>,
6387 ___E,
6388 >,
6389 {
6390 #[inline]
6391 fn encode(
6392 self,
6393 encoder_: &mut ___E,
6394 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmListChildrenRequest<'static>>,
6395 _: (),
6396 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6397 ::fidl_next::munge! {
6398 let crate::wire::RealmListChildrenRequest {
6399
6400 collection,
6401 iter,
6402
6403 } = out_;
6404 }
6405
6406 ::fidl_next::Encode::encode(self.collection, encoder_, collection, ())?;
6407
6408 ::fidl_next::Encode::encode(self.iter, encoder_, iter, ())?;
6409
6410 Ok(())
6411 }
6412 }
6413
6414 pub struct RealmGetChildOutputDictionaryDeprecatedRequest<T0> {
6415 pub child: T0,
6416 }
6417
6418 unsafe impl<___E, T0>
6419 ::fidl_next::Encode<
6420 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
6421 ___E,
6422 > for RealmGetChildOutputDictionaryDeprecatedRequest<T0>
6423 where
6424 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6425 ___E: ::fidl_next::Encoder,
6426 ___E: ::fidl_next::fuchsia::HandleEncoder,
6427 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>, ___E>,
6428 {
6429 #[inline]
6430 fn encode(
6431 self,
6432 encoder_: &mut ___E,
6433 out_: &mut ::core::mem::MaybeUninit<
6434 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
6435 >,
6436 _: (),
6437 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6438 ::fidl_next::munge! {
6439 let crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest {
6440
6441 child,
6442
6443 } = out_;
6444 }
6445
6446 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
6447
6448 Ok(())
6449 }
6450 }
6451
6452 pub struct RealmGetChildOutputDictionaryDeprecatedResponse<T0> {
6453 pub dictionary: T0,
6454 }
6455
6456 unsafe impl<___E, T0>
6457 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse, ___E>
6458 for RealmGetChildOutputDictionaryDeprecatedResponse<T0>
6459 where
6460 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6461 ___E: ::fidl_next::fuchsia::HandleEncoder,
6462 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef, ___E>,
6463 {
6464 #[inline]
6465 fn encode(
6466 self,
6467 encoder_: &mut ___E,
6468 out_: &mut ::core::mem::MaybeUninit<
6469 crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse,
6470 >,
6471 _: (),
6472 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6473 ::fidl_next::munge! {
6474 let crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse {
6475
6476 dictionary,
6477
6478 } = out_;
6479 }
6480
6481 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
6482
6483 Ok(())
6484 }
6485 }
6486
6487 pub struct RealmGetChildOutputDictionaryRequest<T0> {
6488 pub child: T0,
6489 }
6490
6491 unsafe impl<___E, T0>
6492 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryRequest<'static>, ___E>
6493 for RealmGetChildOutputDictionaryRequest<T0>
6494 where
6495 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6496 ___E: ::fidl_next::Encoder,
6497 ___E: ::fidl_next::fuchsia::HandleEncoder,
6498 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>, ___E>,
6499 {
6500 #[inline]
6501 fn encode(
6502 self,
6503 encoder_: &mut ___E,
6504 out_: &mut ::core::mem::MaybeUninit<
6505 crate::wire::RealmGetChildOutputDictionaryRequest<'static>,
6506 >,
6507 _: (),
6508 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6509 ::fidl_next::munge! {
6510 let crate::wire::RealmGetChildOutputDictionaryRequest {
6511
6512 child,
6513
6514 } = out_;
6515 }
6516
6517 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
6518
6519 Ok(())
6520 }
6521 }
6522
6523 pub struct RealmGetChildOutputDictionaryResponse<T0> {
6524 pub dictionary: T0,
6525 }
6526
6527 unsafe impl<___E, T0>
6528 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryResponse, ___E>
6529 for RealmGetChildOutputDictionaryResponse<T0>
6530 where
6531 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6532 ___E: ::fidl_next::fuchsia::HandleEncoder,
6533 T0: ::fidl_next::Encode<::fidl_next::fuchsia::WireEventPair, ___E>,
6534 {
6535 #[inline]
6536 fn encode(
6537 self,
6538 encoder_: &mut ___E,
6539 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmGetChildOutputDictionaryResponse>,
6540 _: (),
6541 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6542 ::fidl_next::munge! {
6543 let crate::wire::RealmGetChildOutputDictionaryResponse {
6544
6545 dictionary,
6546
6547 } = out_;
6548 }
6549
6550 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
6551
6552 Ok(())
6553 }
6554 }
6555
6556 pub struct RealmOpenControllerRequest<T0, T1> {
6557 pub child: T0,
6558
6559 pub controller: T1,
6560 }
6561
6562 unsafe impl<___E, T0, T1>
6563 ::fidl_next::Encode<crate::wire::RealmOpenControllerRequest<'static>, ___E>
6564 for RealmOpenControllerRequest<T0, T1>
6565 where
6566 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6567 ___E: ::fidl_next::Encoder,
6568 ___E: ::fidl_next::fuchsia::HandleEncoder,
6569 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>, ___E>,
6570 T1: ::fidl_next::Encode<
6571 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>,
6572 ___E,
6573 >,
6574 {
6575 #[inline]
6576 fn encode(
6577 self,
6578 encoder_: &mut ___E,
6579 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmOpenControllerRequest<'static>>,
6580 _: (),
6581 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6582 ::fidl_next::munge! {
6583 let crate::wire::RealmOpenControllerRequest {
6584
6585 child,
6586 controller,
6587
6588 } = out_;
6589 }
6590
6591 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
6592
6593 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
6594
6595 Ok(())
6596 }
6597 }
6598
6599 pub struct RealmOpenExposedDirRequest<T0, T1> {
6600 pub child: T0,
6601
6602 pub exposed_dir: T1,
6603 }
6604
6605 unsafe impl<___E, T0, T1>
6606 ::fidl_next::Encode<crate::wire::RealmOpenExposedDirRequest<'static>, ___E>
6607 for RealmOpenExposedDirRequest<T0, T1>
6608 where
6609 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6610 ___E: ::fidl_next::Encoder,
6611 ___E: ::fidl_next::fuchsia::HandleEncoder,
6612 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>, ___E>,
6613 T1: ::fidl_next::Encode<
6614 ::fidl_next::ServerEnd<
6615 ::fidl_next_fuchsia_io::Directory,
6616 ::fidl_next::fuchsia::WireChannel,
6617 >,
6618 ___E,
6619 >,
6620 {
6621 #[inline]
6622 fn encode(
6623 self,
6624 encoder_: &mut ___E,
6625 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmOpenExposedDirRequest<'static>>,
6626 _: (),
6627 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6628 ::fidl_next::munge! {
6629 let crate::wire::RealmOpenExposedDirRequest {
6630
6631 child,
6632 exposed_dir,
6633
6634 } = out_;
6635 }
6636
6637 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
6638
6639 ::fidl_next::Encode::encode(self.exposed_dir, encoder_, exposed_dir, ())?;
6640
6641 Ok(())
6642 }
6643 }
6644
6645 pub struct RealmCreateChildRequest<T0, T1, T2> {
6646 pub collection: T0,
6647
6648 pub decl: T1,
6649
6650 pub args: T2,
6651 }
6652
6653 unsafe impl<___E, T0, T1, T2>
6654 ::fidl_next::Encode<crate::wire::RealmCreateChildRequest<'static>, ___E>
6655 for RealmCreateChildRequest<T0, T1, T2>
6656 where
6657 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6658 ___E: ::fidl_next::Encoder,
6659 ___E: ::fidl_next::fuchsia::HandleEncoder,
6660 T0: ::fidl_next::Encode<
6661 ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
6662 ___E,
6663 >,
6664 T1: ::fidl_next::Encode<::fidl_next_fuchsia_component_decl::wire::Child<'static>, ___E>,
6665 T2: ::fidl_next::Encode<crate::wire::CreateChildArgs<'static>, ___E>,
6666 {
6667 #[inline]
6668 fn encode(
6669 self,
6670 encoder_: &mut ___E,
6671 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmCreateChildRequest<'static>>,
6672 _: (),
6673 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6674 ::fidl_next::munge! {
6675 let crate::wire::RealmCreateChildRequest {
6676
6677 collection,
6678 decl,
6679 args,
6680
6681 } = out_;
6682 }
6683
6684 ::fidl_next::Encode::encode(self.collection, encoder_, collection, ())?;
6685
6686 ::fidl_next::Encode::encode(self.decl, encoder_, decl, ())?;
6687
6688 ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
6689
6690 Ok(())
6691 }
6692 }
6693
6694 pub struct RealmGetResolvedInfoResponse<T0> {
6695 pub resolved_info: T0,
6696 }
6697
6698 unsafe impl<___E, T0>
6699 ::fidl_next::Encode<crate::wire::RealmGetResolvedInfoResponse<'static>, ___E>
6700 for RealmGetResolvedInfoResponse<T0>
6701 where
6702 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6703 ___E: ::fidl_next::Encoder,
6704 ___E: ::fidl_next::fuchsia::HandleEncoder,
6705 T0: ::fidl_next::Encode<
6706 ::fidl_next_fuchsia_component_resolution::wire::Component<'static>,
6707 ___E,
6708 >,
6709 {
6710 #[inline]
6711 fn encode(
6712 self,
6713 encoder_: &mut ___E,
6714 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmGetResolvedInfoResponse<'static>>,
6715 _: (),
6716 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6717 ::fidl_next::munge! {
6718 let crate::wire::RealmGetResolvedInfoResponse {
6719
6720 resolved_info,
6721
6722 } = out_;
6723 }
6724
6725 ::fidl_next::Encode::encode(self.resolved_info, encoder_, resolved_info, ())?;
6726
6727 Ok(())
6728 }
6729 }
6730
6731 pub struct StorageAdminListStorageInRealmRequest<T0, T1> {
6732 pub relative_moniker: T0,
6733
6734 pub iterator: T1,
6735 }
6736
6737 unsafe impl<___E, T0, T1>
6738 ::fidl_next::Encode<crate::wire::StorageAdminListStorageInRealmRequest<'static>, ___E>
6739 for StorageAdminListStorageInRealmRequest<T0, T1>
6740 where
6741 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6742 ___E: ::fidl_next::Encoder,
6743 ___E: ::fidl_next::fuchsia::HandleEncoder,
6744 T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>,
6745 T1: ::fidl_next::Encode<
6746 ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::fuchsia::WireChannel>,
6747 ___E,
6748 >,
6749 {
6750 #[inline]
6751 fn encode(
6752 self,
6753 encoder_: &mut ___E,
6754 out_: &mut ::core::mem::MaybeUninit<
6755 crate::wire::StorageAdminListStorageInRealmRequest<'static>,
6756 >,
6757 _: (),
6758 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6759 ::fidl_next::munge! {
6760 let crate::wire::StorageAdminListStorageInRealmRequest {
6761
6762 relative_moniker,
6763 iterator,
6764
6765 } = out_;
6766 }
6767
6768 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker, 4096)?;
6769
6770 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
6771
6772 Ok(())
6773 }
6774 }
6775
6776 pub struct StorageAdminOpenStorageRequest<T0, T1> {
6777 pub relative_moniker: T0,
6778
6779 pub object: T1,
6780 }
6781
6782 unsafe impl<___E, T0, T1>
6783 ::fidl_next::Encode<crate::wire::StorageAdminOpenStorageRequest<'static>, ___E>
6784 for StorageAdminOpenStorageRequest<T0, T1>
6785 where
6786 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6787 ___E: ::fidl_next::Encoder,
6788 ___E: ::fidl_next::fuchsia::HandleEncoder,
6789 T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>,
6790 T1: ::fidl_next::Encode<
6791 ::fidl_next::ServerEnd<
6792 ::fidl_next_fuchsia_io::Node,
6793 ::fidl_next::fuchsia::WireChannel,
6794 >,
6795 ___E,
6796 >,
6797 {
6798 #[inline]
6799 fn encode(
6800 self,
6801 encoder_: &mut ___E,
6802 out_: &mut ::core::mem::MaybeUninit<
6803 crate::wire::StorageAdminOpenStorageRequest<'static>,
6804 >,
6805 _: (),
6806 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6807 ::fidl_next::munge! {
6808 let crate::wire::StorageAdminOpenStorageRequest {
6809
6810 relative_moniker,
6811 object,
6812
6813 } = out_;
6814 }
6815
6816 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker, 4096)?;
6817
6818 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
6819
6820 Ok(())
6821 }
6822 }
6823
6824 pub struct StorageAdminOpenComponentStorageByIdRequest<T0, T1> {
6825 pub id: T0,
6826
6827 pub object: T1,
6828 }
6829
6830 unsafe impl<___E, T0, T1>
6831 ::fidl_next::Encode<crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>, ___E>
6832 for StorageAdminOpenComponentStorageByIdRequest<T0, T1>
6833 where
6834 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6835 ___E: ::fidl_next::Encoder,
6836 ___E: ::fidl_next::fuchsia::HandleEncoder,
6837 T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>,
6838 T1: ::fidl_next::Encode<
6839 ::fidl_next::ServerEnd<
6840 ::fidl_next_fuchsia_io::Node,
6841 ::fidl_next::fuchsia::WireChannel,
6842 >,
6843 ___E,
6844 >,
6845 {
6846 #[inline]
6847 fn encode(
6848 self,
6849 encoder_: &mut ___E,
6850 out_: &mut ::core::mem::MaybeUninit<
6851 crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>,
6852 >,
6853 _: (),
6854 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6855 ::fidl_next::munge! {
6856 let crate::wire::StorageAdminOpenComponentStorageByIdRequest {
6857
6858 id,
6859 object,
6860
6861 } = out_;
6862 }
6863
6864 ::fidl_next::Encode::encode(self.id, encoder_, id, 64)?;
6865
6866 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
6867
6868 Ok(())
6869 }
6870 }
6871}
6872
6873pub use self::natural::*;
6874
6875#[doc = " A protocol used to operate on a component.\n\n One may get access to a `Controller` when creating a component with the\n `Realm.CreateChild` method. You may also obtain a `Controller` for an\n existing child component with the `Realm.OpenController` method.\n"]
6877#[derive(PartialEq, Debug)]
6878pub struct Controller;
6879
6880#[cfg(target_os = "fuchsia")]
6881impl ::fidl_next::HasTransport for Controller {
6882 type Transport = ::fidl_next::fuchsia::zx::Channel;
6883}
6884
6885pub mod controller {
6886 pub mod prelude {
6887 pub use crate::{Controller, ControllerClientHandler, ControllerServerHandler, controller};
6888
6889 pub use crate::natural::ControllerOpenExposedDirRequest;
6890
6891 pub use crate::natural::ControllerStartRequest;
6892
6893 pub use crate::natural::ControllerDestroyResponse;
6894
6895 pub use crate::natural::ControllerGetExposedDictionaryResponse;
6896
6897 pub use crate::natural::ControllerGetOutputDictionaryResponse;
6898
6899 pub use crate::natural::ControllerIsStartedResponse;
6900
6901 pub use crate::natural::ControllerOpenExposedDirResponse;
6902
6903 pub use crate::natural::ControllerStartResponse;
6904
6905 pub use crate::natural::Error;
6906 }
6907
6908 pub struct Start;
6909
6910 impl ::fidl_next::Method for Start {
6911 const ORDINAL: u64 = 7532130149195770565;
6912 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6913 ::fidl_next::protocol::Flexibility::Flexible;
6914
6915 type Protocol = crate::Controller;
6916
6917 type Request = crate::wire::ControllerStartRequest<'static>;
6918 }
6919
6920 impl ::fidl_next::TwoWayMethod for Start {
6921 type Response = ::fidl_next::WireFlexibleResult<
6922 'static,
6923 crate::wire::ControllerStartResponse,
6924 crate::wire::Error,
6925 >;
6926 }
6927
6928 impl<___R> ::fidl_next::Respond<___R> for Start {
6929 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
6930
6931 fn respond(response: ___R) -> Self::Output {
6932 ::fidl_next::FlexibleResult::Ok(response)
6933 }
6934 }
6935
6936 impl<___R> ::fidl_next::RespondErr<___R> for Start {
6937 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
6938
6939 fn respond_err(response: ___R) -> Self::Output {
6940 ::fidl_next::FlexibleResult::Err(response)
6941 }
6942 }
6943
6944 pub struct IsStarted;
6945
6946 impl ::fidl_next::Method for IsStarted {
6947 const ORDINAL: u64 = 2402079833990398915;
6948 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6949 ::fidl_next::protocol::Flexibility::Flexible;
6950
6951 type Protocol = crate::Controller;
6952
6953 type Request = ();
6954 }
6955
6956 impl ::fidl_next::TwoWayMethod for IsStarted {
6957 type Response = ::fidl_next::WireFlexibleResult<
6958 'static,
6959 crate::wire::ControllerIsStartedResponse,
6960 crate::wire::Error,
6961 >;
6962 }
6963
6964 impl<___R> ::fidl_next::Respond<___R> for IsStarted {
6965 type Output = ::fidl_next::FlexibleResult<
6966 crate::generic::ControllerIsStartedResponse<___R>,
6967 ::fidl_next::util::Never,
6968 >;
6969
6970 fn respond(response: ___R) -> Self::Output {
6971 ::fidl_next::FlexibleResult::Ok(crate::generic::ControllerIsStartedResponse {
6972 is_started: response,
6973 })
6974 }
6975 }
6976
6977 impl<___R> ::fidl_next::RespondErr<___R> for IsStarted {
6978 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
6979
6980 fn respond_err(response: ___R) -> Self::Output {
6981 ::fidl_next::FlexibleResult::Err(response)
6982 }
6983 }
6984
6985 pub struct OpenExposedDir;
6986
6987 impl ::fidl_next::Method for OpenExposedDir {
6988 const ORDINAL: u64 = 2683208291886099860;
6989 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6990 ::fidl_next::protocol::Flexibility::Strict;
6991
6992 type Protocol = crate::Controller;
6993
6994 type Request = crate::wire::ControllerOpenExposedDirRequest;
6995 }
6996
6997 impl ::fidl_next::TwoWayMethod for OpenExposedDir {
6998 type Response = ::fidl_next::WireResult<
6999 'static,
7000 crate::wire::ControllerOpenExposedDirResponse,
7001 crate::wire::Error,
7002 >;
7003 }
7004
7005 impl<___R> ::fidl_next::Respond<___R> for OpenExposedDir {
7006 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7007
7008 fn respond(response: ___R) -> Self::Output {
7009 ::core::result::Result::Ok(response)
7010 }
7011 }
7012
7013 impl<___R> ::fidl_next::RespondErr<___R> for OpenExposedDir {
7014 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7015
7016 fn respond_err(response: ___R) -> Self::Output {
7017 ::core::result::Result::Err(response)
7018 }
7019 }
7020
7021 pub struct GetExposedDictionary;
7022
7023 impl ::fidl_next::Method for GetExposedDictionary {
7024 const ORDINAL: u64 = 9099583788120940443;
7025 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7026 ::fidl_next::protocol::Flexibility::Flexible;
7027
7028 type Protocol = crate::Controller;
7029
7030 type Request = ();
7031 }
7032
7033 impl ::fidl_next::TwoWayMethod for GetExposedDictionary {
7034 type Response = ::fidl_next::WireFlexibleResult<
7035 'static,
7036 crate::wire::ControllerGetExposedDictionaryResponse,
7037 crate::wire::Error,
7038 >;
7039 }
7040
7041 impl<___R> ::fidl_next::Respond<___R> for GetExposedDictionary {
7042 type Output = ::fidl_next::FlexibleResult<
7043 crate::generic::ControllerGetExposedDictionaryResponse<___R>,
7044 ::fidl_next::util::Never,
7045 >;
7046
7047 fn respond(response: ___R) -> Self::Output {
7048 ::fidl_next::FlexibleResult::Ok(
7049 crate::generic::ControllerGetExposedDictionaryResponse { dictionary: response },
7050 )
7051 }
7052 }
7053
7054 impl<___R> ::fidl_next::RespondErr<___R> for GetExposedDictionary {
7055 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
7056
7057 fn respond_err(response: ___R) -> Self::Output {
7058 ::fidl_next::FlexibleResult::Err(response)
7059 }
7060 }
7061
7062 pub struct GetOutputDictionary;
7063
7064 impl ::fidl_next::Method for GetOutputDictionary {
7065 const ORDINAL: u64 = 4182795765624263201;
7066 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7067 ::fidl_next::protocol::Flexibility::Flexible;
7068
7069 type Protocol = crate::Controller;
7070
7071 type Request = ();
7072 }
7073
7074 impl ::fidl_next::TwoWayMethod for GetOutputDictionary {
7075 type Response = ::fidl_next::WireFlexibleResult<
7076 'static,
7077 crate::wire::ControllerGetOutputDictionaryResponse,
7078 crate::wire::Error,
7079 >;
7080 }
7081
7082 impl<___R> ::fidl_next::Respond<___R> for GetOutputDictionary {
7083 type Output = ::fidl_next::FlexibleResult<
7084 crate::generic::ControllerGetOutputDictionaryResponse<___R>,
7085 ::fidl_next::util::Never,
7086 >;
7087
7088 fn respond(response: ___R) -> Self::Output {
7089 ::fidl_next::FlexibleResult::Ok(crate::generic::ControllerGetOutputDictionaryResponse {
7090 dictionary: response,
7091 })
7092 }
7093 }
7094
7095 impl<___R> ::fidl_next::RespondErr<___R> for GetOutputDictionary {
7096 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
7097
7098 fn respond_err(response: ___R) -> Self::Output {
7099 ::fidl_next::FlexibleResult::Err(response)
7100 }
7101 }
7102
7103 pub struct Destroy;
7104
7105 impl ::fidl_next::Method for Destroy {
7106 const ORDINAL: u64 = 8381937394141370177;
7107 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7108 ::fidl_next::protocol::Flexibility::Flexible;
7109
7110 type Protocol = crate::Controller;
7111
7112 type Request = ();
7113 }
7114
7115 impl ::fidl_next::TwoWayMethod for Destroy {
7116 type Response = ::fidl_next::WireFlexibleResult<
7117 'static,
7118 crate::wire::ControllerDestroyResponse,
7119 crate::wire::Error,
7120 >;
7121 }
7122
7123 impl<___R> ::fidl_next::Respond<___R> for Destroy {
7124 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
7125
7126 fn respond(response: ___R) -> Self::Output {
7127 ::fidl_next::FlexibleResult::Ok(response)
7128 }
7129 }
7130
7131 impl<___R> ::fidl_next::RespondErr<___R> for Destroy {
7132 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
7133
7134 fn respond_err(response: ___R) -> Self::Output {
7135 ::fidl_next::FlexibleResult::Err(response)
7136 }
7137 }
7138
7139 mod ___detail {
7140 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Controller
7141 where
7142 ___T: ::fidl_next::Transport,
7143 {
7144 type Client = ControllerClient<___T>;
7145 type Server = ControllerServer<___T>;
7146 }
7147
7148 #[repr(transparent)]
7150 pub struct ControllerClient<___T: ::fidl_next::Transport> {
7151 #[allow(dead_code)]
7152 client: ::fidl_next::protocol::Client<___T>,
7153 }
7154
7155 impl<___T> ControllerClient<___T>
7156 where
7157 ___T: ::fidl_next::Transport,
7158 {
7159 #[doc = " Start the component, optionally providing additional handles to be given\n to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is\n currently running.\n"]
7160 pub fn start(
7161 &self,
7162
7163 args: impl ::fidl_next::Encode<
7164 crate::wire::StartChildArgs<'static>,
7165 <___T as ::fidl_next::Transport>::SendBuffer,
7166 >,
7167
7168 execution_controller: impl ::fidl_next::Encode<
7169 ::fidl_next::ServerEnd<
7170 crate::ExecutionController,
7171 ::fidl_next::fuchsia::WireChannel,
7172 >,
7173 <___T as ::fidl_next::Transport>::SendBuffer,
7174 >,
7175 ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
7176 where
7177 <___T as ::fidl_next::Transport>::SendBuffer:
7178 ::fidl_next::encoder::InternalHandleEncoder,
7179 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7180 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7181 {
7182 self.start_with(crate::generic::ControllerStartRequest {
7183 args,
7184
7185 execution_controller,
7186 })
7187 }
7188
7189 #[doc = " Start the component, optionally providing additional handles to be given\n to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is\n currently running.\n"]
7190 pub fn start_with<___R>(
7191 &self,
7192 request: ___R,
7193 ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
7194 where
7195 ___R: ::fidl_next::Encode<
7196 crate::wire::ControllerStartRequest<'static>,
7197 <___T as ::fidl_next::Transport>::SendBuffer,
7198 >,
7199 {
7200 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7201 7532130149195770565,
7202 <super::Start as ::fidl_next::Method>::FLEXIBILITY,
7203 request,
7204 ))
7205 }
7206
7207 #[doc = " Returns true if this instance is currently running.\n"]
7208 pub fn is_started(&self) -> ::fidl_next::TwoWayFuture<'_, super::IsStarted, ___T> {
7209 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7210 2402079833990398915,
7211 <super::IsStarted as ::fidl_next::Method>::FLEXIBILITY,
7212 (),
7213 ))
7214 }
7215
7216 #[doc = " Opens the exposed directory of the controlled component, through which\n capabilities the component exposed via `ComponentDecl.exposes` are\n available, on success.\n\n Binding to the exposed directory requires that the component be\n resolved, but it will not be started until/unless some capability is\n requested that requires it to be.\n\n If this component is destroyed, any outstanding connections to\n `exposed_dir` will be closed.\n\n Errors:\n - `INSTANCE_CANNOT_RESOLVE`: This component failed to resolve.\n"]
7217 pub fn open_exposed_dir(
7218 &self,
7219
7220 exposed_dir: impl ::fidl_next::Encode<
7221 ::fidl_next::ServerEnd<
7222 ::fidl_next_fuchsia_io::Directory,
7223 ::fidl_next::fuchsia::WireChannel,
7224 >,
7225 <___T as ::fidl_next::Transport>::SendBuffer,
7226 >,
7227 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
7228 where
7229 <___T as ::fidl_next::Transport>::SendBuffer:
7230 ::fidl_next::encoder::InternalHandleEncoder,
7231 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7232 {
7233 self.open_exposed_dir_with(crate::generic::ControllerOpenExposedDirRequest {
7234 exposed_dir,
7235 })
7236 }
7237
7238 #[doc = " Opens the exposed directory of the controlled component, through which\n capabilities the component exposed via `ComponentDecl.exposes` are\n available, on success.\n\n Binding to the exposed directory requires that the component be\n resolved, but it will not be started until/unless some capability is\n requested that requires it to be.\n\n If this component is destroyed, any outstanding connections to\n `exposed_dir` will be closed.\n\n Errors:\n - `INSTANCE_CANNOT_RESOLVE`: This component failed to resolve.\n"]
7239 pub fn open_exposed_dir_with<___R>(
7240 &self,
7241 request: ___R,
7242 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
7243 where
7244 ___R: ::fidl_next::Encode<
7245 crate::wire::ControllerOpenExposedDirRequest,
7246 <___T as ::fidl_next::Transport>::SendBuffer,
7247 >,
7248 {
7249 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7250 2683208291886099860,
7251 <super::OpenExposedDir as ::fidl_next::Method>::FLEXIBILITY,
7252 request,
7253 ))
7254 }
7255
7256 #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
7257 pub fn get_exposed_dictionary(
7258 &self,
7259 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExposedDictionary, ___T> {
7260 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7261 9099583788120940443,
7262 <super::GetExposedDictionary as ::fidl_next::Method>::FLEXIBILITY,
7263 (),
7264 ))
7265 }
7266
7267 #[doc = " Returns a reference to the component\'s output dictionary, which may be\n interacted with by using the fuchsia.component.runtime.Capabilities API.\n"]
7268 pub fn get_output_dictionary(
7269 &self,
7270 ) -> ::fidl_next::TwoWayFuture<'_, super::GetOutputDictionary, ___T> {
7271 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7272 4182795765624263201,
7273 <super::GetOutputDictionary as ::fidl_next::Method>::FLEXIBILITY,
7274 (),
7275 ))
7276 }
7277
7278 #[doc = " Destroys this component. When this method returns, the component is\n either destroyed or in the case of an error no destruction happened.\n\n Errors:\n\n - `ACCESS_DENIED`: Destruction of this component is not allowed.\n Currently, this can happen if the component is a static child of its\n parent.\n - `INTERNAL`: Something prevented destruction from succeeding -- component\n manager\'s logs will contain more detail.\n"]
7279 pub fn destroy(&self) -> ::fidl_next::TwoWayFuture<'_, super::Destroy, ___T> {
7280 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7281 8381937394141370177,
7282 <super::Destroy as ::fidl_next::Method>::FLEXIBILITY,
7283 (),
7284 ))
7285 }
7286 }
7287
7288 #[repr(transparent)]
7290 pub struct ControllerServer<___T: ::fidl_next::Transport> {
7291 server: ::fidl_next::protocol::Server<___T>,
7292 }
7293
7294 impl<___T> ControllerServer<___T> where ___T: ::fidl_next::Transport {}
7295 }
7296}
7297
7298pub trait ControllerClientHandler<
7302 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7303 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7304>
7305{
7306 fn on_unknown_interaction(
7307 &mut self,
7308 ordinal: u64,
7309 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7310 ::core::future::ready(())
7311 }
7312}
7313
7314impl<___T> ControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
7315where
7316 ___T: ::fidl_next::Transport,
7317{
7318 async fn on_unknown_interaction(&mut self, _: u64) {}
7319}
7320
7321impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Controller
7322where
7323 ___H: ControllerClientHandler<___T> + ::core::marker::Send,
7324 ___T: ::fidl_next::Transport,
7325{
7326 async fn on_event(
7327 handler: &mut ___H,
7328 ordinal: u64,
7329 flexibility: ::fidl_next::protocol::Flexibility,
7330 buffer: ___T::RecvBuffer,
7331 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7332 match ordinal {
7333 ordinal => {
7334 handler.on_unknown_interaction(ordinal).await;
7335 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7336 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7337 } else {
7338 Ok(())
7339 }
7340 }
7341 }
7342 }
7343}
7344
7345pub trait ControllerServerHandler<
7349 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7350 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7351>
7352{
7353 #[doc = " Start the component, optionally providing additional handles to be given\n to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is\n currently running.\n"]
7354 fn start(
7355 &mut self,
7356
7357 request: ::fidl_next::Request<controller::Start, ___T>,
7358
7359 responder: ::fidl_next::Responder<controller::Start, ___T>,
7360 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7361
7362 #[doc = " Returns true if this instance is currently running.\n"]
7363 fn is_started(
7364 &mut self,
7365
7366 responder: ::fidl_next::Responder<controller::IsStarted, ___T>,
7367 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7368
7369 #[doc = " Opens the exposed directory of the controlled component, through which\n capabilities the component exposed via `ComponentDecl.exposes` are\n available, on success.\n\n Binding to the exposed directory requires that the component be\n resolved, but it will not be started until/unless some capability is\n requested that requires it to be.\n\n If this component is destroyed, any outstanding connections to\n `exposed_dir` will be closed.\n\n Errors:\n - `INSTANCE_CANNOT_RESOLVE`: This component failed to resolve.\n"]
7370 fn open_exposed_dir(
7371 &mut self,
7372
7373 request: ::fidl_next::Request<controller::OpenExposedDir, ___T>,
7374
7375 responder: ::fidl_next::Responder<controller::OpenExposedDir, ___T>,
7376 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7377
7378 #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
7379 fn get_exposed_dictionary(
7380 &mut self,
7381
7382 responder: ::fidl_next::Responder<controller::GetExposedDictionary, ___T>,
7383 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7384
7385 #[doc = " Returns a reference to the component\'s output dictionary, which may be\n interacted with by using the fuchsia.component.runtime.Capabilities API.\n"]
7386 fn get_output_dictionary(
7387 &mut self,
7388
7389 responder: ::fidl_next::Responder<controller::GetOutputDictionary, ___T>,
7390 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7391
7392 #[doc = " Destroys this component. When this method returns, the component is\n either destroyed or in the case of an error no destruction happened.\n\n Errors:\n\n - `ACCESS_DENIED`: Destruction of this component is not allowed.\n Currently, this can happen if the component is a static child of its\n parent.\n - `INTERNAL`: Something prevented destruction from succeeding -- component\n manager\'s logs will contain more detail.\n"]
7393 fn destroy(
7394 &mut self,
7395
7396 responder: ::fidl_next::Responder<controller::Destroy, ___T>,
7397 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7398
7399 fn on_unknown_interaction(
7400 &mut self,
7401 ordinal: u64,
7402 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7403 ::core::future::ready(())
7404 }
7405}
7406
7407impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Controller
7408where
7409 ___H: ControllerServerHandler<___T> + ::core::marker::Send,
7410 ___T: ::fidl_next::Transport,
7411 <controller::Start as ::fidl_next::Method>::Request:
7412 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7413 <controller::OpenExposedDir as ::fidl_next::Method>::Request:
7414 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7415{
7416 async fn on_one_way(
7417 handler: &mut ___H,
7418 ordinal: u64,
7419 flexibility: ::fidl_next::protocol::Flexibility,
7420 buffer: ___T::RecvBuffer,
7421 ) -> ::core::result::Result<
7422 (),
7423 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7424 > {
7425 match ordinal {
7426 ordinal => {
7427 handler.on_unknown_interaction(ordinal).await;
7428 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7429 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7430 } else {
7431 Ok(())
7432 }
7433 }
7434 }
7435 }
7436
7437 async fn on_two_way(
7438 handler: &mut ___H,
7439 ordinal: u64,
7440 flexibility: ::fidl_next::protocol::Flexibility,
7441 buffer: ___T::RecvBuffer,
7442 responder: ::fidl_next::protocol::Responder<___T>,
7443 ) -> ::core::result::Result<
7444 (),
7445 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7446 > {
7447 match ordinal {
7448 7532130149195770565 => {
7449 let responder = ::fidl_next::Responder::from_untyped(responder);
7450
7451 match ::fidl_next::DecoderExt::decode(buffer) {
7452 Ok(decoded) => {
7453 handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
7454 Ok(())
7455 }
7456 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7457 ordinal: 7532130149195770565,
7458 error,
7459 }),
7460 }
7461 }
7462
7463 2402079833990398915 => {
7464 let responder = ::fidl_next::Responder::from_untyped(responder);
7465
7466 handler.is_started(responder).await;
7467 Ok(())
7468 }
7469
7470 2683208291886099860 => {
7471 let responder = ::fidl_next::Responder::from_untyped(responder);
7472
7473 match ::fidl_next::DecoderExt::decode(buffer) {
7474 Ok(decoded) => {
7475 handler
7476 .open_exposed_dir(
7477 ::fidl_next::Request::from_decoded(decoded),
7478 responder,
7479 )
7480 .await;
7481 Ok(())
7482 }
7483 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7484 ordinal: 2683208291886099860,
7485 error,
7486 }),
7487 }
7488 }
7489
7490 9099583788120940443 => {
7491 let responder = ::fidl_next::Responder::from_untyped(responder);
7492
7493 handler.get_exposed_dictionary(responder).await;
7494 Ok(())
7495 }
7496
7497 4182795765624263201 => {
7498 let responder = ::fidl_next::Responder::from_untyped(responder);
7499
7500 handler.get_output_dictionary(responder).await;
7501 Ok(())
7502 }
7503
7504 8381937394141370177 => {
7505 let responder = ::fidl_next::Responder::from_untyped(responder);
7506
7507 handler.destroy(responder).await;
7508 Ok(())
7509 }
7510
7511 ordinal => {
7512 handler.on_unknown_interaction(ordinal).await;
7513 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7514 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7515 } else {
7516 responder
7517 .respond(
7518 ordinal,
7519 flexibility,
7520 ::fidl_next::Flexible::<()>::FrameworkErr(
7521 ::fidl_next::FrameworkError::UnknownMethod,
7522 ),
7523 )
7524 .expect("encoding a framework error should never fail")
7525 .await?;
7526 Ok(())
7527 }
7528 }
7529 }
7530 }
7531}
7532
7533#[doc = " Listener for events on the component hierarchy.\n Can\'t be used outside of the platform.\n"]
7535#[derive(PartialEq, Debug)]
7536pub struct EventStream;
7537
7538impl ::fidl_next::Discoverable for EventStream {
7539 const PROTOCOL_NAME: &'static str = "fuchsia.component.EventStream";
7540}
7541
7542#[cfg(target_os = "fuchsia")]
7543impl ::fidl_next::HasTransport for EventStream {
7544 type Transport = ::fidl_next::fuchsia::zx::Channel;
7545}
7546
7547pub mod event_stream {
7548 pub mod prelude {
7549 pub use crate::{
7550 EventStream, EventStreamClientHandler, EventStreamServerHandler, event_stream,
7551 };
7552
7553 pub use crate::natural::EventStreamGetNextResponse;
7554 }
7555
7556 pub struct GetNext;
7557
7558 impl ::fidl_next::Method for GetNext {
7559 const ORDINAL: u64 = 4549982840421936006;
7560 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7561 ::fidl_next::protocol::Flexibility::Strict;
7562
7563 type Protocol = crate::EventStream;
7564
7565 type Request = ();
7566 }
7567
7568 impl ::fidl_next::TwoWayMethod for GetNext {
7569 type Response = crate::wire::EventStreamGetNextResponse<'static>;
7570 }
7571
7572 impl<___R> ::fidl_next::Respond<___R> for GetNext {
7573 type Output = crate::generic::EventStreamGetNextResponse<___R>;
7574
7575 fn respond(response: ___R) -> Self::Output {
7576 crate::generic::EventStreamGetNextResponse { events: response }
7577 }
7578 }
7579
7580 pub struct WaitForReady;
7581
7582 impl ::fidl_next::Method for WaitForReady {
7583 const ORDINAL: u64 = 3545212058508387970;
7584 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7585 ::fidl_next::protocol::Flexibility::Strict;
7586
7587 type Protocol = crate::EventStream;
7588
7589 type Request = ();
7590 }
7591
7592 impl ::fidl_next::TwoWayMethod for WaitForReady {
7593 type Response = ();
7594 }
7595
7596 impl<___R> ::fidl_next::Respond<___R> for WaitForReady {
7597 type Output = ___R;
7598
7599 fn respond(response: ___R) -> Self::Output {
7600 response
7601 }
7602 }
7603
7604 mod ___detail {
7605 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::EventStream
7606 where
7607 ___T: ::fidl_next::Transport,
7608 {
7609 type Client = EventStreamClient<___T>;
7610 type Server = EventStreamServer<___T>;
7611 }
7612
7613 #[repr(transparent)]
7615 pub struct EventStreamClient<___T: ::fidl_next::Transport> {
7616 #[allow(dead_code)]
7617 client: ::fidl_next::protocol::Client<___T>,
7618 }
7619
7620 impl<___T> EventStreamClient<___T>
7621 where
7622 ___T: ::fidl_next::Transport,
7623 {
7624 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
7625 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7626 4549982840421936006,
7627 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
7628 (),
7629 ))
7630 }
7631
7632 #[doc = " Returns immediately. Used to indicate that the FIDL connection\n completed. This is needed for non-static streams to verify\n that subscribe has completed before components are started.\n"]
7633 pub fn wait_for_ready(
7634 &self,
7635 ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForReady, ___T> {
7636 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7637 3545212058508387970,
7638 <super::WaitForReady as ::fidl_next::Method>::FLEXIBILITY,
7639 (),
7640 ))
7641 }
7642 }
7643
7644 #[repr(transparent)]
7646 pub struct EventStreamServer<___T: ::fidl_next::Transport> {
7647 server: ::fidl_next::protocol::Server<___T>,
7648 }
7649
7650 impl<___T> EventStreamServer<___T> where ___T: ::fidl_next::Transport {}
7651 }
7652}
7653
7654pub trait EventStreamClientHandler<
7658 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7659 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7660>
7661{
7662}
7663
7664impl<___T> EventStreamClientHandler<___T> for ::fidl_next::IgnoreEvents where
7665 ___T: ::fidl_next::Transport
7666{
7667}
7668
7669impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for EventStream
7670where
7671 ___H: EventStreamClientHandler<___T> + ::core::marker::Send,
7672 ___T: ::fidl_next::Transport,
7673{
7674 async fn on_event(
7675 handler: &mut ___H,
7676 ordinal: u64,
7677 flexibility: ::fidl_next::protocol::Flexibility,
7678 buffer: ___T::RecvBuffer,
7679 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7680 match ordinal {
7681 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7682 }
7683 }
7684}
7685
7686pub trait EventStreamServerHandler<
7690 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7691 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7692>
7693{
7694 fn get_next(
7695 &mut self,
7696
7697 responder: ::fidl_next::Responder<event_stream::GetNext, ___T>,
7698 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7699
7700 #[doc = " Returns immediately. Used to indicate that the FIDL connection\n completed. This is needed for non-static streams to verify\n that subscribe has completed before components are started.\n"]
7701 fn wait_for_ready(
7702 &mut self,
7703
7704 responder: ::fidl_next::Responder<event_stream::WaitForReady, ___T>,
7705 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7706}
7707
7708impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for EventStream
7709where
7710 ___H: EventStreamServerHandler<___T> + ::core::marker::Send,
7711 ___T: ::fidl_next::Transport,
7712{
7713 async fn on_one_way(
7714 handler: &mut ___H,
7715 ordinal: u64,
7716 flexibility: ::fidl_next::protocol::Flexibility,
7717 buffer: ___T::RecvBuffer,
7718 ) -> ::core::result::Result<
7719 (),
7720 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7721 > {
7722 match ordinal {
7723 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7724 }
7725 }
7726
7727 async fn on_two_way(
7728 handler: &mut ___H,
7729 ordinal: u64,
7730 flexibility: ::fidl_next::protocol::Flexibility,
7731 buffer: ___T::RecvBuffer,
7732 responder: ::fidl_next::protocol::Responder<___T>,
7733 ) -> ::core::result::Result<
7734 (),
7735 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7736 > {
7737 match ordinal {
7738 4549982840421936006 => {
7739 let responder = ::fidl_next::Responder::from_untyped(responder);
7740
7741 handler.get_next(responder).await;
7742 Ok(())
7743 }
7744
7745 3545212058508387970 => {
7746 let responder = ::fidl_next::Responder::from_untyped(responder);
7747
7748 handler.wait_for_ready(responder).await;
7749 Ok(())
7750 }
7751
7752 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7753 }
7754 }
7755}
7756
7757#[doc = " A protocol used by a component instance to obtain information about\n components in its own realm.\n\n This protocol only supports getting the moniker at the moment but could\n expand to other privileged information such as the URL of a component.\n\n The component framework provides this capability to components that use\n `fuchsia.component.Introspector` from framework.\n"]
7759#[derive(PartialEq, Debug)]
7760pub struct Introspector;
7761
7762impl ::fidl_next::Discoverable for Introspector {
7763 const PROTOCOL_NAME: &'static str = "fuchsia.component.Introspector";
7764}
7765
7766#[cfg(target_os = "fuchsia")]
7767impl ::fidl_next::HasTransport for Introspector {
7768 type Transport = ::fidl_next::fuchsia::zx::Channel;
7769}
7770
7771pub mod introspector {
7772 pub mod prelude {
7773 pub use crate::{
7774 Introspector, IntrospectorClientHandler, IntrospectorServerHandler, introspector,
7775 };
7776
7777 pub use crate::natural::Error;
7778
7779 pub use crate::natural::IntrospectorGetMonikerRequest;
7780
7781 pub use crate::natural::IntrospectorGetMonikerResponse;
7782 }
7783
7784 pub struct GetMoniker;
7785
7786 impl ::fidl_next::Method for GetMoniker {
7787 const ORDINAL: u64 = 214344082539672664;
7788 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7789 ::fidl_next::protocol::Flexibility::Flexible;
7790
7791 type Protocol = crate::Introspector;
7792
7793 type Request = crate::wire::IntrospectorGetMonikerRequest;
7794 }
7795
7796 impl ::fidl_next::TwoWayMethod for GetMoniker {
7797 type Response = ::fidl_next::WireFlexibleResult<
7798 'static,
7799 crate::wire::IntrospectorGetMonikerResponse<'static>,
7800 crate::wire::Error,
7801 >;
7802 }
7803
7804 impl<___R> ::fidl_next::Respond<___R> for GetMoniker {
7805 type Output = ::fidl_next::FlexibleResult<
7806 crate::generic::IntrospectorGetMonikerResponse<___R>,
7807 ::fidl_next::util::Never,
7808 >;
7809
7810 fn respond(response: ___R) -> Self::Output {
7811 ::fidl_next::FlexibleResult::Ok(crate::generic::IntrospectorGetMonikerResponse {
7812 moniker: response,
7813 })
7814 }
7815 }
7816
7817 impl<___R> ::fidl_next::RespondErr<___R> for GetMoniker {
7818 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
7819
7820 fn respond_err(response: ___R) -> Self::Output {
7821 ::fidl_next::FlexibleResult::Err(response)
7822 }
7823 }
7824
7825 mod ___detail {
7826 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Introspector
7827 where
7828 ___T: ::fidl_next::Transport,
7829 {
7830 type Client = IntrospectorClient<___T>;
7831 type Server = IntrospectorServer<___T>;
7832 }
7833
7834 #[repr(transparent)]
7836 pub struct IntrospectorClient<___T: ::fidl_next::Transport> {
7837 #[allow(dead_code)]
7838 client: ::fidl_next::protocol::Client<___T>,
7839 }
7840
7841 impl<___T> IntrospectorClient<___T>
7842 where
7843 ___T: ::fidl_next::Transport,
7844 {
7845 #[doc = " Obtains the moniker relative to this realm of the component\n corresponding to the provided token. Runners may obtain the token via\n `fuchsia.component.runner/ComponentStartInfo.component_instance`.\n\n Returns `Error.INSTANCE_NOT_FOUND` if the token is invalid, or\n does not correspond to a component under this realm.\n"]
7846 pub fn get_moniker(
7847 &self,
7848
7849 component_instance: impl ::fidl_next::Encode<
7850 ::fidl_next::fuchsia::WireEvent,
7851 <___T as ::fidl_next::Transport>::SendBuffer,
7852 >,
7853 ) -> ::fidl_next::TwoWayFuture<'_, super::GetMoniker, ___T>
7854 where
7855 <___T as ::fidl_next::Transport>::SendBuffer:
7856 ::fidl_next::encoder::InternalHandleEncoder,
7857 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7858 {
7859 self.get_moniker_with(crate::generic::IntrospectorGetMonikerRequest {
7860 component_instance,
7861 })
7862 }
7863
7864 #[doc = " Obtains the moniker relative to this realm of the component\n corresponding to the provided token. Runners may obtain the token via\n `fuchsia.component.runner/ComponentStartInfo.component_instance`.\n\n Returns `Error.INSTANCE_NOT_FOUND` if the token is invalid, or\n does not correspond to a component under this realm.\n"]
7865 pub fn get_moniker_with<___R>(
7866 &self,
7867 request: ___R,
7868 ) -> ::fidl_next::TwoWayFuture<'_, super::GetMoniker, ___T>
7869 where
7870 ___R: ::fidl_next::Encode<
7871 crate::wire::IntrospectorGetMonikerRequest,
7872 <___T as ::fidl_next::Transport>::SendBuffer,
7873 >,
7874 {
7875 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7876 214344082539672664,
7877 <super::GetMoniker as ::fidl_next::Method>::FLEXIBILITY,
7878 request,
7879 ))
7880 }
7881 }
7882
7883 #[repr(transparent)]
7885 pub struct IntrospectorServer<___T: ::fidl_next::Transport> {
7886 server: ::fidl_next::protocol::Server<___T>,
7887 }
7888
7889 impl<___T> IntrospectorServer<___T> where ___T: ::fidl_next::Transport {}
7890 }
7891}
7892
7893pub trait IntrospectorClientHandler<
7897 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7898 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7899>
7900{
7901 fn on_unknown_interaction(
7902 &mut self,
7903 ordinal: u64,
7904 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7905 ::core::future::ready(())
7906 }
7907}
7908
7909impl<___T> IntrospectorClientHandler<___T> for ::fidl_next::IgnoreEvents
7910where
7911 ___T: ::fidl_next::Transport,
7912{
7913 async fn on_unknown_interaction(&mut self, _: u64) {}
7914}
7915
7916impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Introspector
7917where
7918 ___H: IntrospectorClientHandler<___T> + ::core::marker::Send,
7919 ___T: ::fidl_next::Transport,
7920{
7921 async fn on_event(
7922 handler: &mut ___H,
7923 ordinal: u64,
7924 flexibility: ::fidl_next::protocol::Flexibility,
7925 buffer: ___T::RecvBuffer,
7926 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7927 match ordinal {
7928 ordinal => {
7929 handler.on_unknown_interaction(ordinal).await;
7930 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7931 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7932 } else {
7933 Ok(())
7934 }
7935 }
7936 }
7937 }
7938}
7939
7940pub trait IntrospectorServerHandler<
7944 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7945 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7946>
7947{
7948 #[doc = " Obtains the moniker relative to this realm of the component\n corresponding to the provided token. Runners may obtain the token via\n `fuchsia.component.runner/ComponentStartInfo.component_instance`.\n\n Returns `Error.INSTANCE_NOT_FOUND` if the token is invalid, or\n does not correspond to a component under this realm.\n"]
7949 fn get_moniker(
7950 &mut self,
7951
7952 request: ::fidl_next::Request<introspector::GetMoniker, ___T>,
7953
7954 responder: ::fidl_next::Responder<introspector::GetMoniker, ___T>,
7955 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7956
7957 fn on_unknown_interaction(
7958 &mut self,
7959 ordinal: u64,
7960 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7961 ::core::future::ready(())
7962 }
7963}
7964
7965impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Introspector
7966where
7967 ___H: IntrospectorServerHandler<___T> + ::core::marker::Send,
7968 ___T: ::fidl_next::Transport,
7969 <introspector::GetMoniker as ::fidl_next::Method>::Request:
7970 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7971{
7972 async fn on_one_way(
7973 handler: &mut ___H,
7974 ordinal: u64,
7975 flexibility: ::fidl_next::protocol::Flexibility,
7976 buffer: ___T::RecvBuffer,
7977 ) -> ::core::result::Result<
7978 (),
7979 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7980 > {
7981 match ordinal {
7982 ordinal => {
7983 handler.on_unknown_interaction(ordinal).await;
7984 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7985 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7986 } else {
7987 Ok(())
7988 }
7989 }
7990 }
7991 }
7992
7993 async fn on_two_way(
7994 handler: &mut ___H,
7995 ordinal: u64,
7996 flexibility: ::fidl_next::protocol::Flexibility,
7997 buffer: ___T::RecvBuffer,
7998 responder: ::fidl_next::protocol::Responder<___T>,
7999 ) -> ::core::result::Result<
8000 (),
8001 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8002 > {
8003 match ordinal {
8004 214344082539672664 => {
8005 let responder = ::fidl_next::Responder::from_untyped(responder);
8006
8007 match ::fidl_next::DecoderExt::decode(buffer) {
8008 Ok(decoded) => {
8009 handler
8010 .get_moniker(::fidl_next::Request::from_decoded(decoded), responder)
8011 .await;
8012 Ok(())
8013 }
8014 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8015 ordinal: 214344082539672664,
8016 error,
8017 }),
8018 }
8019 }
8020
8021 ordinal => {
8022 handler.on_unknown_interaction(ordinal).await;
8023 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
8024 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8025 } else {
8026 responder
8027 .respond(
8028 ordinal,
8029 flexibility,
8030 ::fidl_next::Flexible::<()>::FrameworkErr(
8031 ::fidl_next::FrameworkError::UnknownMethod,
8032 ),
8033 )
8034 .expect("encoding a framework error should never fail")
8035 .await?;
8036 Ok(())
8037 }
8038 }
8039 }
8040 }
8041}
8042
8043#[doc = " Protocol for performing namespace operations.\n"]
8045#[derive(PartialEq, Debug)]
8046pub struct Namespace;
8047
8048impl ::fidl_next::Discoverable for Namespace {
8049 const PROTOCOL_NAME: &'static str = "fuchsia.component.Namespace";
8050}
8051
8052#[cfg(target_os = "fuchsia")]
8053impl ::fidl_next::HasTransport for Namespace {
8054 type Transport = ::fidl_next::fuchsia::zx::Channel;
8055}
8056
8057pub mod namespace {
8058 pub mod prelude {
8059 pub use crate::{Namespace, NamespaceClientHandler, NamespaceServerHandler, namespace};
8060
8061 pub use crate::natural::NamespaceCreateRequest;
8062
8063 pub use crate::natural::NamespaceError;
8064
8065 pub use crate::natural::NamespaceCreateResponse;
8066 }
8067
8068 pub struct Create;
8069
8070 impl ::fidl_next::Method for Create {
8071 const ORDINAL: u64 = 4839678630846501113;
8072 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8073 ::fidl_next::protocol::Flexibility::Flexible;
8074
8075 type Protocol = crate::Namespace;
8076
8077 type Request = crate::wire::NamespaceCreateRequest<'static>;
8078 }
8079
8080 impl ::fidl_next::TwoWayMethod for Create {
8081 type Response = ::fidl_next::WireFlexibleResult<
8082 'static,
8083 crate::wire::NamespaceCreateResponse<'static>,
8084 crate::wire::NamespaceError,
8085 >;
8086 }
8087
8088 impl<___R> ::fidl_next::Respond<___R> for Create {
8089 type Output = ::fidl_next::FlexibleResult<
8090 crate::generic::NamespaceCreateResponse<___R>,
8091 ::fidl_next::util::Never,
8092 >;
8093
8094 fn respond(response: ___R) -> Self::Output {
8095 ::fidl_next::FlexibleResult::Ok(crate::generic::NamespaceCreateResponse {
8096 entries: response,
8097 })
8098 }
8099 }
8100
8101 impl<___R> ::fidl_next::RespondErr<___R> for Create {
8102 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8103
8104 fn respond_err(response: ___R) -> Self::Output {
8105 ::fidl_next::FlexibleResult::Err(response)
8106 }
8107 }
8108
8109 mod ___detail {
8110 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Namespace
8111 where
8112 ___T: ::fidl_next::Transport,
8113 {
8114 type Client = NamespaceClient<___T>;
8115 type Server = NamespaceServer<___T>;
8116 }
8117
8118 #[repr(transparent)]
8120 pub struct NamespaceClient<___T: ::fidl_next::Transport> {
8121 #[allow(dead_code)]
8122 client: ::fidl_next::protocol::Client<___T>,
8123 }
8124
8125 impl<___T> NamespaceClient<___T>
8126 where
8127 ___T: ::fidl_next::Transport,
8128 {
8129 pub fn create(
8130 &self,
8131
8132 entries: impl ::fidl_next::Encode<
8133 ::fidl_next::WireVector<'static, crate::wire::NamespaceInputEntry<'static>>,
8134 <___T as ::fidl_next::Transport>::SendBuffer,
8135 >,
8136 ) -> ::fidl_next::TwoWayFuture<'_, super::Create, ___T>
8137 where
8138 <___T as ::fidl_next::Transport>::SendBuffer:
8139 ::fidl_next::encoder::InternalHandleEncoder,
8140 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8141 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8142 {
8143 self.create_with(crate::generic::NamespaceCreateRequest { entries })
8144 }
8145
8146 pub fn create_with<___R>(
8147 &self,
8148 request: ___R,
8149 ) -> ::fidl_next::TwoWayFuture<'_, super::Create, ___T>
8150 where
8151 ___R: ::fidl_next::Encode<
8152 crate::wire::NamespaceCreateRequest<'static>,
8153 <___T as ::fidl_next::Transport>::SendBuffer,
8154 >,
8155 {
8156 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8157 4839678630846501113,
8158 <super::Create as ::fidl_next::Method>::FLEXIBILITY,
8159 request,
8160 ))
8161 }
8162 }
8163
8164 #[repr(transparent)]
8166 pub struct NamespaceServer<___T: ::fidl_next::Transport> {
8167 server: ::fidl_next::protocol::Server<___T>,
8168 }
8169
8170 impl<___T> NamespaceServer<___T> where ___T: ::fidl_next::Transport {}
8171 }
8172}
8173
8174pub trait NamespaceClientHandler<
8178 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8179 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8180>
8181{
8182 fn on_unknown_interaction(
8183 &mut self,
8184 ordinal: u64,
8185 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8186 ::core::future::ready(())
8187 }
8188}
8189
8190impl<___T> NamespaceClientHandler<___T> for ::fidl_next::IgnoreEvents
8191where
8192 ___T: ::fidl_next::Transport,
8193{
8194 async fn on_unknown_interaction(&mut self, _: u64) {}
8195}
8196
8197impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Namespace
8198where
8199 ___H: NamespaceClientHandler<___T> + ::core::marker::Send,
8200 ___T: ::fidl_next::Transport,
8201{
8202 async fn on_event(
8203 handler: &mut ___H,
8204 ordinal: u64,
8205 flexibility: ::fidl_next::protocol::Flexibility,
8206 buffer: ___T::RecvBuffer,
8207 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
8208 match ordinal {
8209 ordinal => {
8210 handler.on_unknown_interaction(ordinal).await;
8211 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
8212 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8213 } else {
8214 Ok(())
8215 }
8216 }
8217 }
8218 }
8219}
8220
8221pub trait NamespaceServerHandler<
8225 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8226 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8227>
8228{
8229 fn create(
8230 &mut self,
8231
8232 request: ::fidl_next::Request<namespace::Create, ___T>,
8233
8234 responder: ::fidl_next::Responder<namespace::Create, ___T>,
8235 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8236
8237 fn on_unknown_interaction(
8238 &mut self,
8239 ordinal: u64,
8240 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8241 ::core::future::ready(())
8242 }
8243}
8244
8245impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Namespace
8246where
8247 ___H: NamespaceServerHandler<___T> + ::core::marker::Send,
8248 ___T: ::fidl_next::Transport,
8249 <namespace::Create as ::fidl_next::Method>::Request:
8250 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
8251{
8252 async fn on_one_way(
8253 handler: &mut ___H,
8254 ordinal: u64,
8255 flexibility: ::fidl_next::protocol::Flexibility,
8256 buffer: ___T::RecvBuffer,
8257 ) -> ::core::result::Result<
8258 (),
8259 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8260 > {
8261 match ordinal {
8262 ordinal => {
8263 handler.on_unknown_interaction(ordinal).await;
8264 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
8265 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8266 } else {
8267 Ok(())
8268 }
8269 }
8270 }
8271 }
8272
8273 async fn on_two_way(
8274 handler: &mut ___H,
8275 ordinal: u64,
8276 flexibility: ::fidl_next::protocol::Flexibility,
8277 buffer: ___T::RecvBuffer,
8278 responder: ::fidl_next::protocol::Responder<___T>,
8279 ) -> ::core::result::Result<
8280 (),
8281 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8282 > {
8283 match ordinal {
8284 4839678630846501113 => {
8285 let responder = ::fidl_next::Responder::from_untyped(responder);
8286
8287 match ::fidl_next::DecoderExt::decode(buffer) {
8288 Ok(decoded) => {
8289 handler
8290 .create(::fidl_next::Request::from_decoded(decoded), responder)
8291 .await;
8292 Ok(())
8293 }
8294 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8295 ordinal: 4839678630846501113,
8296 error,
8297 }),
8298 }
8299 }
8300
8301 ordinal => {
8302 handler.on_unknown_interaction(ordinal).await;
8303 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
8304 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8305 } else {
8306 responder
8307 .respond(
8308 ordinal,
8309 flexibility,
8310 ::fidl_next::Flexible::<()>::FrameworkErr(
8311 ::fidl_next::FrameworkError::UnknownMethod,
8312 ),
8313 )
8314 .expect("encoding a framework error should never fail")
8315 .await?;
8316 Ok(())
8317 }
8318 }
8319 }
8320 }
8321}
8322
8323#[doc = " A protocol used by a component instance to manage its own realm, such as for\n binding to its children.\n\n Requests to this protocol are processed in the order they are received.\n Clients that wish to send requests in parallel should open multiple\n connections.\n\n The component framework provides this service to components that use\n `fuchsia.component.Realm`.\n"]
8325#[derive(PartialEq, Debug)]
8326pub struct Realm;
8327
8328impl ::fidl_next::Discoverable for Realm {
8329 const PROTOCOL_NAME: &'static str = "fuchsia.component.Realm";
8330}
8331
8332#[cfg(target_os = "fuchsia")]
8333impl ::fidl_next::HasTransport for Realm {
8334 type Transport = ::fidl_next::fuchsia::zx::Channel;
8335}
8336
8337pub mod realm {
8338 pub mod prelude {
8339 pub use crate::{Realm, RealmClientHandler, RealmServerHandler, realm};
8340
8341 pub use crate::natural::Error;
8342
8343 pub use crate::natural::RealmCreateChildRequest;
8344
8345 pub use crate::natural::RealmDestroyChildRequest;
8346
8347 pub use crate::natural::RealmGetChildOutputDictionaryDeprecatedRequest;
8348
8349 pub use crate::natural::RealmGetChildOutputDictionaryRequest;
8350
8351 pub use crate::natural::RealmListChildrenRequest;
8352
8353 pub use crate::natural::RealmOpenControllerRequest;
8354
8355 pub use crate::natural::RealmOpenExposedDirRequest;
8356
8357 pub use crate::natural::RealmCreateChildResponse;
8358
8359 pub use crate::natural::RealmDestroyChildResponse;
8360
8361 pub use crate::natural::RealmGetChildOutputDictionaryDeprecatedResponse;
8362
8363 pub use crate::natural::RealmGetChildOutputDictionaryResponse;
8364
8365 pub use crate::natural::RealmGetResolvedInfoResponse;
8366
8367 pub use crate::natural::RealmListChildrenResponse;
8368
8369 pub use crate::natural::RealmOpenControllerResponse;
8370
8371 pub use crate::natural::RealmOpenExposedDirResponse;
8372 }
8373
8374 pub struct OpenController;
8375
8376 impl ::fidl_next::Method for OpenController {
8377 const ORDINAL: u64 = 8165227925828473216;
8378 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8379 ::fidl_next::protocol::Flexibility::Strict;
8380
8381 type Protocol = crate::Realm;
8382
8383 type Request = crate::wire::RealmOpenControllerRequest<'static>;
8384 }
8385
8386 impl ::fidl_next::TwoWayMethod for OpenController {
8387 type Response = ::fidl_next::WireResult<
8388 'static,
8389 crate::wire::RealmOpenControllerResponse,
8390 crate::wire::Error,
8391 >;
8392 }
8393
8394 impl<___R> ::fidl_next::Respond<___R> for OpenController {
8395 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8396
8397 fn respond(response: ___R) -> Self::Output {
8398 ::core::result::Result::Ok(response)
8399 }
8400 }
8401
8402 impl<___R> ::fidl_next::RespondErr<___R> for OpenController {
8403 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8404
8405 fn respond_err(response: ___R) -> Self::Output {
8406 ::core::result::Result::Err(response)
8407 }
8408 }
8409
8410 pub struct OpenExposedDir;
8411
8412 impl ::fidl_next::Method for OpenExposedDir {
8413 const ORDINAL: u64 = 9194435320863127852;
8414 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8415 ::fidl_next::protocol::Flexibility::Strict;
8416
8417 type Protocol = crate::Realm;
8418
8419 type Request = crate::wire::RealmOpenExposedDirRequest<'static>;
8420 }
8421
8422 impl ::fidl_next::TwoWayMethod for OpenExposedDir {
8423 type Response = ::fidl_next::WireResult<
8424 'static,
8425 crate::wire::RealmOpenExposedDirResponse,
8426 crate::wire::Error,
8427 >;
8428 }
8429
8430 impl<___R> ::fidl_next::Respond<___R> for OpenExposedDir {
8431 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8432
8433 fn respond(response: ___R) -> Self::Output {
8434 ::core::result::Result::Ok(response)
8435 }
8436 }
8437
8438 impl<___R> ::fidl_next::RespondErr<___R> for OpenExposedDir {
8439 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8440
8441 fn respond_err(response: ___R) -> Self::Output {
8442 ::core::result::Result::Err(response)
8443 }
8444 }
8445
8446 pub struct CreateChild;
8447
8448 impl ::fidl_next::Method for CreateChild {
8449 const ORDINAL: u64 = 4892190024503489888;
8450 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8451 ::fidl_next::protocol::Flexibility::Strict;
8452
8453 type Protocol = crate::Realm;
8454
8455 type Request = crate::wire::RealmCreateChildRequest<'static>;
8456 }
8457
8458 impl ::fidl_next::TwoWayMethod for CreateChild {
8459 type Response = ::fidl_next::WireResult<
8460 'static,
8461 crate::wire::RealmCreateChildResponse,
8462 crate::wire::Error,
8463 >;
8464 }
8465
8466 impl<___R> ::fidl_next::Respond<___R> for CreateChild {
8467 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8468
8469 fn respond(response: ___R) -> Self::Output {
8470 ::core::result::Result::Ok(response)
8471 }
8472 }
8473
8474 impl<___R> ::fidl_next::RespondErr<___R> for CreateChild {
8475 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8476
8477 fn respond_err(response: ___R) -> Self::Output {
8478 ::core::result::Result::Err(response)
8479 }
8480 }
8481
8482 pub struct DestroyChild;
8483
8484 impl ::fidl_next::Method for DestroyChild {
8485 const ORDINAL: u64 = 8203529889988252194;
8486 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8487 ::fidl_next::protocol::Flexibility::Strict;
8488
8489 type Protocol = crate::Realm;
8490
8491 type Request = crate::wire::RealmDestroyChildRequest<'static>;
8492 }
8493
8494 impl ::fidl_next::TwoWayMethod for DestroyChild {
8495 type Response = ::fidl_next::WireResult<
8496 'static,
8497 crate::wire::RealmDestroyChildResponse,
8498 crate::wire::Error,
8499 >;
8500 }
8501
8502 impl<___R> ::fidl_next::Respond<___R> for DestroyChild {
8503 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8504
8505 fn respond(response: ___R) -> Self::Output {
8506 ::core::result::Result::Ok(response)
8507 }
8508 }
8509
8510 impl<___R> ::fidl_next::RespondErr<___R> for DestroyChild {
8511 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8512
8513 fn respond_err(response: ___R) -> Self::Output {
8514 ::core::result::Result::Err(response)
8515 }
8516 }
8517
8518 pub struct ListChildren;
8519
8520 impl ::fidl_next::Method for ListChildren {
8521 const ORDINAL: u64 = 7532454435519185057;
8522 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8523 ::fidl_next::protocol::Flexibility::Strict;
8524
8525 type Protocol = crate::Realm;
8526
8527 type Request = crate::wire::RealmListChildrenRequest<'static>;
8528 }
8529
8530 impl ::fidl_next::TwoWayMethod for ListChildren {
8531 type Response = ::fidl_next::WireResult<
8532 'static,
8533 crate::wire::RealmListChildrenResponse,
8534 crate::wire::Error,
8535 >;
8536 }
8537
8538 impl<___R> ::fidl_next::Respond<___R> for ListChildren {
8539 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8540
8541 fn respond(response: ___R) -> Self::Output {
8542 ::core::result::Result::Ok(response)
8543 }
8544 }
8545
8546 impl<___R> ::fidl_next::RespondErr<___R> for ListChildren {
8547 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8548
8549 fn respond_err(response: ___R) -> Self::Output {
8550 ::core::result::Result::Err(response)
8551 }
8552 }
8553
8554 pub struct GetResolvedInfo;
8555
8556 impl ::fidl_next::Method for GetResolvedInfo {
8557 const ORDINAL: u64 = 8308987710372188322;
8558 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8559 ::fidl_next::protocol::Flexibility::Strict;
8560
8561 type Protocol = crate::Realm;
8562
8563 type Request = ();
8564 }
8565
8566 impl ::fidl_next::TwoWayMethod for GetResolvedInfo {
8567 type Response = ::fidl_next::WireResult<
8568 'static,
8569 crate::wire::RealmGetResolvedInfoResponse<'static>,
8570 crate::wire::Error,
8571 >;
8572 }
8573
8574 impl<___R> ::fidl_next::Respond<___R> for GetResolvedInfo {
8575 type Output = ::core::result::Result<
8576 crate::generic::RealmGetResolvedInfoResponse<___R>,
8577 ::fidl_next::util::Never,
8578 >;
8579
8580 fn respond(response: ___R) -> Self::Output {
8581 ::core::result::Result::Ok(crate::generic::RealmGetResolvedInfoResponse {
8582 resolved_info: response,
8583 })
8584 }
8585 }
8586
8587 impl<___R> ::fidl_next::RespondErr<___R> for GetResolvedInfo {
8588 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8589
8590 fn respond_err(response: ___R) -> Self::Output {
8591 ::core::result::Result::Err(response)
8592 }
8593 }
8594
8595 pub struct GetChildOutputDictionaryDeprecated;
8596
8597 impl ::fidl_next::Method for GetChildOutputDictionaryDeprecated {
8598 const ORDINAL: u64 = 4117516026351534948;
8599 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8600 ::fidl_next::protocol::Flexibility::Strict;
8601
8602 type Protocol = crate::Realm;
8603
8604 type Request = crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>;
8605 }
8606
8607 impl ::fidl_next::TwoWayMethod for GetChildOutputDictionaryDeprecated {
8608 type Response = ::fidl_next::WireResult<
8609 'static,
8610 crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse,
8611 crate::wire::Error,
8612 >;
8613 }
8614
8615 impl<___R> ::fidl_next::Respond<___R> for GetChildOutputDictionaryDeprecated {
8616 type Output = ::core::result::Result<
8617 crate::generic::RealmGetChildOutputDictionaryDeprecatedResponse<___R>,
8618 ::fidl_next::util::Never,
8619 >;
8620
8621 fn respond(response: ___R) -> Self::Output {
8622 ::core::result::Result::Ok(
8623 crate::generic::RealmGetChildOutputDictionaryDeprecatedResponse {
8624 dictionary: response,
8625 },
8626 )
8627 }
8628 }
8629
8630 impl<___R> ::fidl_next::RespondErr<___R> for GetChildOutputDictionaryDeprecated {
8631 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8632
8633 fn respond_err(response: ___R) -> Self::Output {
8634 ::core::result::Result::Err(response)
8635 }
8636 }
8637
8638 pub struct GetChildOutputDictionary;
8639
8640 impl ::fidl_next::Method for GetChildOutputDictionary {
8641 const ORDINAL: u64 = 4781081784078915088;
8642 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8643 ::fidl_next::protocol::Flexibility::Strict;
8644
8645 type Protocol = crate::Realm;
8646
8647 type Request = crate::wire::RealmGetChildOutputDictionaryRequest<'static>;
8648 }
8649
8650 impl ::fidl_next::TwoWayMethod for GetChildOutputDictionary {
8651 type Response = ::fidl_next::WireResult<
8652 'static,
8653 crate::wire::RealmGetChildOutputDictionaryResponse,
8654 crate::wire::Error,
8655 >;
8656 }
8657
8658 impl<___R> ::fidl_next::Respond<___R> for GetChildOutputDictionary {
8659 type Output = ::core::result::Result<
8660 crate::generic::RealmGetChildOutputDictionaryResponse<___R>,
8661 ::fidl_next::util::Never,
8662 >;
8663
8664 fn respond(response: ___R) -> Self::Output {
8665 ::core::result::Result::Ok(crate::generic::RealmGetChildOutputDictionaryResponse {
8666 dictionary: response,
8667 })
8668 }
8669 }
8670
8671 impl<___R> ::fidl_next::RespondErr<___R> for GetChildOutputDictionary {
8672 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8673
8674 fn respond_err(response: ___R) -> Self::Output {
8675 ::core::result::Result::Err(response)
8676 }
8677 }
8678
8679 mod ___detail {
8680 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Realm
8681 where
8682 ___T: ::fidl_next::Transport,
8683 {
8684 type Client = RealmClient<___T>;
8685 type Server = RealmServer<___T>;
8686 }
8687
8688 #[repr(transparent)]
8690 pub struct RealmClient<___T: ::fidl_next::Transport> {
8691 #[allow(dead_code)]
8692 client: ::fidl_next::protocol::Client<___T>,
8693 }
8694
8695 impl<___T> RealmClient<___T>
8696 where
8697 ___T: ::fidl_next::Transport,
8698 {
8699 #[doc = " Operate on a child component. See documentation for [`Controller`].\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
8700 pub fn open_controller(
8701 &self,
8702
8703 child: impl ::fidl_next::Encode<
8704 ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
8705 <___T as ::fidl_next::Transport>::SendBuffer,
8706 >,
8707
8708 controller: impl ::fidl_next::Encode<
8709 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>,
8710 <___T as ::fidl_next::Transport>::SendBuffer,
8711 >,
8712 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenController, ___T>
8713 where
8714 <___T as ::fidl_next::Transport>::SendBuffer:
8715 ::fidl_next::encoder::InternalHandleEncoder,
8716 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8717 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8718 {
8719 self.open_controller_with(crate::generic::RealmOpenControllerRequest {
8720 child,
8721
8722 controller,
8723 })
8724 }
8725
8726 #[doc = " Operate on a child component. See documentation for [`Controller`].\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
8727 pub fn open_controller_with<___R>(
8728 &self,
8729 request: ___R,
8730 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenController, ___T>
8731 where
8732 ___R: ::fidl_next::Encode<
8733 crate::wire::RealmOpenControllerRequest<'static>,
8734 <___T as ::fidl_next::Transport>::SendBuffer,
8735 >,
8736 {
8737 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8738 8165227925828473216,
8739 <super::OpenController as ::fidl_next::Method>::FLEXIBILITY,
8740 request,
8741 ))
8742 }
8743
8744 #[doc = " Opens the exposed directory of a child component. When this function\n successfully returns, `exposed_dir` is bound to a directory that\n contains the capabilities which the child exposed to its realm via\n `ComponentDecl.exposes` (specified via \"expose\" declarations in the\n component\'s manifest). The child component will not start as a result of\n this call.\n\n `exposed_dir` is open as long as `child` exists.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
8745 pub fn open_exposed_dir(
8746 &self,
8747
8748 child: impl ::fidl_next::Encode<
8749 ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
8750 <___T as ::fidl_next::Transport>::SendBuffer,
8751 >,
8752
8753 exposed_dir: impl ::fidl_next::Encode<
8754 ::fidl_next::ServerEnd<
8755 ::fidl_next_fuchsia_io::Directory,
8756 ::fidl_next::fuchsia::WireChannel,
8757 >,
8758 <___T as ::fidl_next::Transport>::SendBuffer,
8759 >,
8760 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
8761 where
8762 <___T as ::fidl_next::Transport>::SendBuffer:
8763 ::fidl_next::encoder::InternalHandleEncoder,
8764 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8765 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8766 {
8767 self.open_exposed_dir_with(crate::generic::RealmOpenExposedDirRequest {
8768 child,
8769
8770 exposed_dir,
8771 })
8772 }
8773
8774 #[doc = " Opens the exposed directory of a child component. When this function\n successfully returns, `exposed_dir` is bound to a directory that\n contains the capabilities which the child exposed to its realm via\n `ComponentDecl.exposes` (specified via \"expose\" declarations in the\n component\'s manifest). The child component will not start as a result of\n this call.\n\n `exposed_dir` is open as long as `child` exists.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
8775 pub fn open_exposed_dir_with<___R>(
8776 &self,
8777 request: ___R,
8778 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
8779 where
8780 ___R: ::fidl_next::Encode<
8781 crate::wire::RealmOpenExposedDirRequest<'static>,
8782 <___T as ::fidl_next::Transport>::SendBuffer,
8783 >,
8784 {
8785 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8786 9194435320863127852,
8787 <super::OpenExposedDir as ::fidl_next::Method>::FLEXIBILITY,
8788 request,
8789 ))
8790 }
8791
8792 #[doc = " Creates a child component instance dynamically. When this function\n returns successfully, the instance exists, but it may not be running.\n\n The environment of the child instance is determined by the environment\n of the collection. `decl` must not set `environment`.\n\n If `decl.startup == EAGER`, or `collection.durability == SINGLE_RUN`,\n [CreateChild] will start the component and return once the component is\n started. Otherwise, [CreateChild] will return immediately after creating\n the component and will not start or resolve it.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `child`\n is not a valid declaration.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_ALREADY_EXISTS`: `decl.name` already exists in `collection`.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve\n in a `SingleRun` collection.\n - `NO_SPACE`: Could not allocate storage for the new instance.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
8793 pub fn create_child(
8794 &self,
8795
8796 collection: impl ::fidl_next::Encode<
8797 ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
8798 <___T as ::fidl_next::Transport>::SendBuffer,
8799 >,
8800
8801 decl: impl ::fidl_next::Encode<
8802 ::fidl_next_fuchsia_component_decl::wire::Child<'static>,
8803 <___T as ::fidl_next::Transport>::SendBuffer,
8804 >,
8805
8806 args: impl ::fidl_next::Encode<
8807 crate::wire::CreateChildArgs<'static>,
8808 <___T as ::fidl_next::Transport>::SendBuffer,
8809 >,
8810 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateChild, ___T>
8811 where
8812 <___T as ::fidl_next::Transport>::SendBuffer:
8813 ::fidl_next::encoder::InternalHandleEncoder,
8814 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8815 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8816 {
8817 self.create_child_with(crate::generic::RealmCreateChildRequest {
8818 collection,
8819
8820 decl,
8821
8822 args,
8823 })
8824 }
8825
8826 #[doc = " Creates a child component instance dynamically. When this function\n returns successfully, the instance exists, but it may not be running.\n\n The environment of the child instance is determined by the environment\n of the collection. `decl` must not set `environment`.\n\n If `decl.startup == EAGER`, or `collection.durability == SINGLE_RUN`,\n [CreateChild] will start the component and return once the component is\n started. Otherwise, [CreateChild] will return immediately after creating\n the component and will not start or resolve it.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `child`\n is not a valid declaration.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_ALREADY_EXISTS`: `decl.name` already exists in `collection`.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve\n in a `SingleRun` collection.\n - `NO_SPACE`: Could not allocate storage for the new instance.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
8827 pub fn create_child_with<___R>(
8828 &self,
8829 request: ___R,
8830 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateChild, ___T>
8831 where
8832 ___R: ::fidl_next::Encode<
8833 crate::wire::RealmCreateChildRequest<'static>,
8834 <___T as ::fidl_next::Transport>::SendBuffer,
8835 >,
8836 {
8837 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8838 4892190024503489888,
8839 <super::CreateChild as ::fidl_next::Method>::FLEXIBILITY,
8840 request,
8841 ))
8842 }
8843
8844 #[doc = " Destroys a dynamically-created component instance. When this function\n returns, the instance is destroyed and has stopped running. However,\n cleanup of the component\'s resources (such as its isolated storage) may\n happen in the background after this function returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid reference or does not refer\n to a dynamic instance.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
8845 pub fn destroy_child(
8846 &self,
8847
8848 child: impl ::fidl_next::Encode<
8849 ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
8850 <___T as ::fidl_next::Transport>::SendBuffer,
8851 >,
8852 ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyChild, ___T>
8853 where
8854 <___T as ::fidl_next::Transport>::SendBuffer:
8855 ::fidl_next::encoder::InternalHandleEncoder,
8856 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8857 {
8858 self.destroy_child_with(crate::generic::RealmDestroyChildRequest { child })
8859 }
8860
8861 #[doc = " Destroys a dynamically-created component instance. When this function\n returns, the instance is destroyed and has stopped running. However,\n cleanup of the component\'s resources (such as its isolated storage) may\n happen in the background after this function returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid reference or does not refer\n to a dynamic instance.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
8862 pub fn destroy_child_with<___R>(
8863 &self,
8864 request: ___R,
8865 ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyChild, ___T>
8866 where
8867 ___R: ::fidl_next::Encode<
8868 crate::wire::RealmDestroyChildRequest<'static>,
8869 <___T as ::fidl_next::Transport>::SendBuffer,
8870 >,
8871 {
8872 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8873 8203529889988252194,
8874 <super::DestroyChild as ::fidl_next::Method>::FLEXIBILITY,
8875 request,
8876 ))
8877 }
8878
8879 #[doc = " Returns an iterator that lists all instances in a collection.\n\n NOTE: The results are not guaranteed to be consistent. Instances may be\n created or destroyed while the iterator is live, but those changes\n won\'t be observed by the iterator after this method returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `iter`\n does not have `ZX_RIGHT_WAIT`.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n - If `iter` does not have standard channel rights, this function may\n return `ACCESS_DENIED` or component manager may close `iter`.\n"]
8880 pub fn list_children(
8881 &self,
8882
8883 collection: impl ::fidl_next::Encode<
8884 ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
8885 <___T as ::fidl_next::Transport>::SendBuffer,
8886 >,
8887
8888 iter: impl ::fidl_next::Encode<
8889 ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::WireChannel>,
8890 <___T as ::fidl_next::Transport>::SendBuffer,
8891 >,
8892 ) -> ::fidl_next::TwoWayFuture<'_, super::ListChildren, ___T>
8893 where
8894 <___T as ::fidl_next::Transport>::SendBuffer:
8895 ::fidl_next::encoder::InternalHandleEncoder,
8896 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8897 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8898 {
8899 self.list_children_with(crate::generic::RealmListChildrenRequest {
8900 collection,
8901
8902 iter,
8903 })
8904 }
8905
8906 #[doc = " Returns an iterator that lists all instances in a collection.\n\n NOTE: The results are not guaranteed to be consistent. Instances may be\n created or destroyed while the iterator is live, but those changes\n won\'t be observed by the iterator after this method returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `iter`\n does not have `ZX_RIGHT_WAIT`.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n - If `iter` does not have standard channel rights, this function may\n return `ACCESS_DENIED` or component manager may close `iter`.\n"]
8907 pub fn list_children_with<___R>(
8908 &self,
8909 request: ___R,
8910 ) -> ::fidl_next::TwoWayFuture<'_, super::ListChildren, ___T>
8911 where
8912 ___R: ::fidl_next::Encode<
8913 crate::wire::RealmListChildrenRequest<'static>,
8914 <___T as ::fidl_next::Transport>::SendBuffer,
8915 >,
8916 {
8917 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8918 7532454435519185057,
8919 <super::ListChildren as ::fidl_next::Method>::FLEXIBILITY,
8920 request,
8921 ))
8922 }
8923
8924 #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
8925 pub fn get_resolved_info(
8926 &self,
8927 ) -> ::fidl_next::TwoWayFuture<'_, super::GetResolvedInfo, ___T> {
8928 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8929 8308987710372188322,
8930 <super::GetResolvedInfo as ::fidl_next::Method>::FLEXIBILITY,
8931 (),
8932 ))
8933 }
8934
8935 pub fn get_child_output_dictionary_deprecated(
8936 &self,
8937
8938 child: impl ::fidl_next::Encode<
8939 ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
8940 <___T as ::fidl_next::Transport>::SendBuffer,
8941 >,
8942 ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionaryDeprecated, ___T>
8943 where
8944 <___T as ::fidl_next::Transport>::SendBuffer:
8945 ::fidl_next::encoder::InternalHandleEncoder,
8946 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8947 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8948 {
8949 self.get_child_output_dictionary_deprecated_with(
8950 crate::generic::RealmGetChildOutputDictionaryDeprecatedRequest { child },
8951 )
8952 }
8953
8954 pub fn get_child_output_dictionary_deprecated_with<___R>(
8955 &self,
8956 request: ___R,
8957 ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionaryDeprecated, ___T>
8958 where
8959 ___R: ::fidl_next::Encode<
8960 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
8961 <___T as ::fidl_next::Transport>::SendBuffer,
8962 >,
8963 {
8964 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8965 4117516026351534948,
8966 <super::GetChildOutputDictionaryDeprecated as ::fidl_next::Method>::FLEXIBILITY,
8967 request,
8968 ))
8969 }
8970
8971 #[doc = " Returns a reference to a child\'s output dictionary, which may be\n interacted with by using the fuchsia.component.runtime.Capabilities API.\n"]
8972 pub fn get_child_output_dictionary(
8973 &self,
8974
8975 child: impl ::fidl_next::Encode<
8976 ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
8977 <___T as ::fidl_next::Transport>::SendBuffer,
8978 >,
8979 ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionary, ___T>
8980 where
8981 <___T as ::fidl_next::Transport>::SendBuffer:
8982 ::fidl_next::encoder::InternalHandleEncoder,
8983 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8984 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8985 {
8986 self.get_child_output_dictionary_with(
8987 crate::generic::RealmGetChildOutputDictionaryRequest { child },
8988 )
8989 }
8990
8991 #[doc = " Returns a reference to a child\'s output dictionary, which may be\n interacted with by using the fuchsia.component.runtime.Capabilities API.\n"]
8992 pub fn get_child_output_dictionary_with<___R>(
8993 &self,
8994 request: ___R,
8995 ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionary, ___T>
8996 where
8997 ___R: ::fidl_next::Encode<
8998 crate::wire::RealmGetChildOutputDictionaryRequest<'static>,
8999 <___T as ::fidl_next::Transport>::SendBuffer,
9000 >,
9001 {
9002 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9003 4781081784078915088,
9004 <super::GetChildOutputDictionary as ::fidl_next::Method>::FLEXIBILITY,
9005 request,
9006 ))
9007 }
9008 }
9009
9010 #[repr(transparent)]
9012 pub struct RealmServer<___T: ::fidl_next::Transport> {
9013 server: ::fidl_next::protocol::Server<___T>,
9014 }
9015
9016 impl<___T> RealmServer<___T> where ___T: ::fidl_next::Transport {}
9017 }
9018}
9019
9020pub trait RealmClientHandler<
9024 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9025 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9026>
9027{
9028}
9029
9030impl<___T> RealmClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
9031
9032impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Realm
9033where
9034 ___H: RealmClientHandler<___T> + ::core::marker::Send,
9035 ___T: ::fidl_next::Transport,
9036{
9037 async fn on_event(
9038 handler: &mut ___H,
9039 ordinal: u64,
9040 flexibility: ::fidl_next::protocol::Flexibility,
9041 buffer: ___T::RecvBuffer,
9042 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9043 match ordinal {
9044 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9045 }
9046 }
9047}
9048
9049pub trait RealmServerHandler<
9053 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9054 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9055>
9056{
9057 #[doc = " Operate on a child component. See documentation for [`Controller`].\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9058 fn open_controller(
9059 &mut self,
9060
9061 request: ::fidl_next::Request<realm::OpenController, ___T>,
9062
9063 responder: ::fidl_next::Responder<realm::OpenController, ___T>,
9064 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9065
9066 #[doc = " Opens the exposed directory of a child component. When this function\n successfully returns, `exposed_dir` is bound to a directory that\n contains the capabilities which the child exposed to its realm via\n `ComponentDecl.exposes` (specified via \"expose\" declarations in the\n component\'s manifest). The child component will not start as a result of\n this call.\n\n `exposed_dir` is open as long as `child` exists.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9067 fn open_exposed_dir(
9068 &mut self,
9069
9070 request: ::fidl_next::Request<realm::OpenExposedDir, ___T>,
9071
9072 responder: ::fidl_next::Responder<realm::OpenExposedDir, ___T>,
9073 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9074
9075 #[doc = " Creates a child component instance dynamically. When this function\n returns successfully, the instance exists, but it may not be running.\n\n The environment of the child instance is determined by the environment\n of the collection. `decl` must not set `environment`.\n\n If `decl.startup == EAGER`, or `collection.durability == SINGLE_RUN`,\n [CreateChild] will start the component and return once the component is\n started. Otherwise, [CreateChild] will return immediately after creating\n the component and will not start or resolve it.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `child`\n is not a valid declaration.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_ALREADY_EXISTS`: `decl.name` already exists in `collection`.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve\n in a `SingleRun` collection.\n - `NO_SPACE`: Could not allocate storage for the new instance.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9076 fn create_child(
9077 &mut self,
9078
9079 request: ::fidl_next::Request<realm::CreateChild, ___T>,
9080
9081 responder: ::fidl_next::Responder<realm::CreateChild, ___T>,
9082 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9083
9084 #[doc = " Destroys a dynamically-created component instance. When this function\n returns, the instance is destroyed and has stopped running. However,\n cleanup of the component\'s resources (such as its isolated storage) may\n happen in the background after this function returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid reference or does not refer\n to a dynamic instance.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9085 fn destroy_child(
9086 &mut self,
9087
9088 request: ::fidl_next::Request<realm::DestroyChild, ___T>,
9089
9090 responder: ::fidl_next::Responder<realm::DestroyChild, ___T>,
9091 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9092
9093 #[doc = " Returns an iterator that lists all instances in a collection.\n\n NOTE: The results are not guaranteed to be consistent. Instances may be\n created or destroyed while the iterator is live, but those changes\n won\'t be observed by the iterator after this method returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `iter`\n does not have `ZX_RIGHT_WAIT`.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n - If `iter` does not have standard channel rights, this function may\n return `ACCESS_DENIED` or component manager may close `iter`.\n"]
9094 fn list_children(
9095 &mut self,
9096
9097 request: ::fidl_next::Request<realm::ListChildren, ___T>,
9098
9099 responder: ::fidl_next::Responder<realm::ListChildren, ___T>,
9100 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9101
9102 #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
9103 fn get_resolved_info(
9104 &mut self,
9105
9106 responder: ::fidl_next::Responder<realm::GetResolvedInfo, ___T>,
9107 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9108
9109 fn get_child_output_dictionary_deprecated(
9110 &mut self,
9111
9112 request: ::fidl_next::Request<realm::GetChildOutputDictionaryDeprecated, ___T>,
9113
9114 responder: ::fidl_next::Responder<realm::GetChildOutputDictionaryDeprecated, ___T>,
9115 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9116
9117 #[doc = " Returns a reference to a child\'s output dictionary, which may be\n interacted with by using the fuchsia.component.runtime.Capabilities API.\n"]
9118 fn get_child_output_dictionary(
9119 &mut self,
9120
9121 request: ::fidl_next::Request<realm::GetChildOutputDictionary, ___T>,
9122
9123 responder: ::fidl_next::Responder<realm::GetChildOutputDictionary, ___T>,
9124 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9125}
9126
9127impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Realm
9128where
9129 ___H: RealmServerHandler<___T> + ::core::marker::Send,
9130 ___T: ::fidl_next::Transport,
9131 <realm::OpenController as ::fidl_next::Method>::Request:
9132 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9133 <realm::OpenExposedDir as ::fidl_next::Method>::Request:
9134 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9135 <realm::CreateChild as ::fidl_next::Method>::Request:
9136 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9137 <realm::DestroyChild as ::fidl_next::Method>::Request:
9138 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9139 <realm::ListChildren as ::fidl_next::Method>::Request:
9140 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9141 <realm::GetChildOutputDictionaryDeprecated as ::fidl_next::Method>::Request:
9142 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9143 <realm::GetChildOutputDictionary as ::fidl_next::Method>::Request:
9144 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9145{
9146 async fn on_one_way(
9147 handler: &mut ___H,
9148 ordinal: u64,
9149 flexibility: ::fidl_next::protocol::Flexibility,
9150 buffer: ___T::RecvBuffer,
9151 ) -> ::core::result::Result<
9152 (),
9153 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9154 > {
9155 match ordinal {
9156 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9157 }
9158 }
9159
9160 async fn on_two_way(
9161 handler: &mut ___H,
9162 ordinal: u64,
9163 flexibility: ::fidl_next::protocol::Flexibility,
9164 buffer: ___T::RecvBuffer,
9165 responder: ::fidl_next::protocol::Responder<___T>,
9166 ) -> ::core::result::Result<
9167 (),
9168 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9169 > {
9170 match ordinal {
9171 8165227925828473216 => {
9172 let responder = ::fidl_next::Responder::from_untyped(responder);
9173
9174 match ::fidl_next::DecoderExt::decode(buffer) {
9175 Ok(decoded) => {
9176 handler
9177 .open_controller(::fidl_next::Request::from_decoded(decoded), responder)
9178 .await;
9179 Ok(())
9180 }
9181 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9182 ordinal: 8165227925828473216,
9183 error,
9184 }),
9185 }
9186 }
9187
9188 9194435320863127852 => {
9189 let responder = ::fidl_next::Responder::from_untyped(responder);
9190
9191 match ::fidl_next::DecoderExt::decode(buffer) {
9192 Ok(decoded) => {
9193 handler
9194 .open_exposed_dir(
9195 ::fidl_next::Request::from_decoded(decoded),
9196 responder,
9197 )
9198 .await;
9199 Ok(())
9200 }
9201 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9202 ordinal: 9194435320863127852,
9203 error,
9204 }),
9205 }
9206 }
9207
9208 4892190024503489888 => {
9209 let responder = ::fidl_next::Responder::from_untyped(responder);
9210
9211 match ::fidl_next::DecoderExt::decode(buffer) {
9212 Ok(decoded) => {
9213 handler
9214 .create_child(::fidl_next::Request::from_decoded(decoded), responder)
9215 .await;
9216 Ok(())
9217 }
9218 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9219 ordinal: 4892190024503489888,
9220 error,
9221 }),
9222 }
9223 }
9224
9225 8203529889988252194 => {
9226 let responder = ::fidl_next::Responder::from_untyped(responder);
9227
9228 match ::fidl_next::DecoderExt::decode(buffer) {
9229 Ok(decoded) => {
9230 handler
9231 .destroy_child(::fidl_next::Request::from_decoded(decoded), responder)
9232 .await;
9233 Ok(())
9234 }
9235 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9236 ordinal: 8203529889988252194,
9237 error,
9238 }),
9239 }
9240 }
9241
9242 7532454435519185057 => {
9243 let responder = ::fidl_next::Responder::from_untyped(responder);
9244
9245 match ::fidl_next::DecoderExt::decode(buffer) {
9246 Ok(decoded) => {
9247 handler
9248 .list_children(::fidl_next::Request::from_decoded(decoded), responder)
9249 .await;
9250 Ok(())
9251 }
9252 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9253 ordinal: 7532454435519185057,
9254 error,
9255 }),
9256 }
9257 }
9258
9259 8308987710372188322 => {
9260 let responder = ::fidl_next::Responder::from_untyped(responder);
9261
9262 handler.get_resolved_info(responder).await;
9263 Ok(())
9264 }
9265
9266 4117516026351534948 => {
9267 let responder = ::fidl_next::Responder::from_untyped(responder);
9268
9269 match ::fidl_next::DecoderExt::decode(buffer) {
9270 Ok(decoded) => {
9271 handler
9272 .get_child_output_dictionary_deprecated(
9273 ::fidl_next::Request::from_decoded(decoded),
9274 responder,
9275 )
9276 .await;
9277 Ok(())
9278 }
9279 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9280 ordinal: 4117516026351534948,
9281 error,
9282 }),
9283 }
9284 }
9285
9286 4781081784078915088 => {
9287 let responder = ::fidl_next::Responder::from_untyped(responder);
9288
9289 match ::fidl_next::DecoderExt::decode(buffer) {
9290 Ok(decoded) => {
9291 handler
9292 .get_child_output_dictionary(
9293 ::fidl_next::Request::from_decoded(decoded),
9294 responder,
9295 )
9296 .await;
9297 Ok(())
9298 }
9299 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9300 ordinal: 4781081784078915088,
9301 error,
9302 }),
9303 }
9304 }
9305
9306 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9307 }
9308 }
9309}
9310
9311#[derive(PartialEq, Debug)]
9313pub struct StorageAdmin;
9314
9315impl ::fidl_next::Discoverable for StorageAdmin {
9316 const PROTOCOL_NAME: &'static str = "fuchsia.component.StorageAdmin";
9317}
9318
9319#[cfg(target_os = "fuchsia")]
9320impl ::fidl_next::HasTransport for StorageAdmin {
9321 type Transport = ::fidl_next::fuchsia::zx::Channel;
9322}
9323
9324pub mod storage_admin {
9325 pub mod prelude {
9326 pub use crate::{
9327 StorageAdmin, StorageAdminClientHandler, StorageAdminServerHandler, storage_admin,
9328 };
9329
9330 pub use crate::natural::DeletionError;
9331
9332 pub use crate::natural::Error;
9333
9334 pub use crate::natural::StatusError;
9335
9336 pub use crate::natural::StorageAdminDeleteComponentStorageRequest;
9337
9338 pub use crate::natural::StorageAdminListStorageInRealmRequest;
9339
9340 pub use crate::natural::StorageAdminOpenComponentStorageByIdRequest;
9341
9342 pub use crate::natural::StorageAdminOpenStorageRequest;
9343
9344 pub use crate::natural::StorageAdminDeleteAllStorageContentsResponse;
9345
9346 pub use crate::natural::StorageAdminDeleteComponentStorageResponse;
9347
9348 pub use crate::natural::StorageAdminListStorageInRealmResponse;
9349
9350 pub use crate::natural::StorageAdminOpenComponentStorageByIdResponse;
9351
9352 pub use crate::natural::StorageAdminOpenStorageResponse;
9353
9354 pub use crate::natural::StorageStatus;
9355 }
9356
9357 pub struct OpenStorage;
9358
9359 impl ::fidl_next::Method for OpenStorage {
9360 const ORDINAL: u64 = 7848267339832116087;
9361 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9362 ::fidl_next::protocol::Flexibility::Strict;
9363
9364 type Protocol = crate::StorageAdmin;
9365
9366 type Request = crate::wire::StorageAdminOpenStorageRequest<'static>;
9367 }
9368
9369 impl ::fidl_next::TwoWayMethod for OpenStorage {
9370 type Response = ::fidl_next::WireResult<
9371 'static,
9372 crate::wire::StorageAdminOpenStorageResponse,
9373 crate::wire::Error,
9374 >;
9375 }
9376
9377 impl<___R> ::fidl_next::Respond<___R> for OpenStorage {
9378 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9379
9380 fn respond(response: ___R) -> Self::Output {
9381 ::core::result::Result::Ok(response)
9382 }
9383 }
9384
9385 impl<___R> ::fidl_next::RespondErr<___R> for OpenStorage {
9386 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9387
9388 fn respond_err(response: ___R) -> Self::Output {
9389 ::core::result::Result::Err(response)
9390 }
9391 }
9392
9393 pub struct ListStorageInRealm;
9394
9395 impl ::fidl_next::Method for ListStorageInRealm {
9396 const ORDINAL: u64 = 8525152599685368827;
9397 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9398 ::fidl_next::protocol::Flexibility::Strict;
9399
9400 type Protocol = crate::StorageAdmin;
9401
9402 type Request = crate::wire::StorageAdminListStorageInRealmRequest<'static>;
9403 }
9404
9405 impl ::fidl_next::TwoWayMethod for ListStorageInRealm {
9406 type Response = ::fidl_next::WireResult<
9407 'static,
9408 crate::wire::StorageAdminListStorageInRealmResponse,
9409 crate::wire::Error,
9410 >;
9411 }
9412
9413 impl<___R> ::fidl_next::Respond<___R> for ListStorageInRealm {
9414 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9415
9416 fn respond(response: ___R) -> Self::Output {
9417 ::core::result::Result::Ok(response)
9418 }
9419 }
9420
9421 impl<___R> ::fidl_next::RespondErr<___R> for ListStorageInRealm {
9422 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9423
9424 fn respond_err(response: ___R) -> Self::Output {
9425 ::core::result::Result::Err(response)
9426 }
9427 }
9428
9429 pub struct OpenComponentStorageById;
9430
9431 impl ::fidl_next::Method for OpenComponentStorageById {
9432 const ORDINAL: u64 = 5188727505160068593;
9433 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9434 ::fidl_next::protocol::Flexibility::Strict;
9435
9436 type Protocol = crate::StorageAdmin;
9437
9438 type Request = crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>;
9439 }
9440
9441 impl ::fidl_next::TwoWayMethod for OpenComponentStorageById {
9442 type Response = ::fidl_next::WireResult<
9443 'static,
9444 crate::wire::StorageAdminOpenComponentStorageByIdResponse,
9445 crate::wire::Error,
9446 >;
9447 }
9448
9449 impl<___R> ::fidl_next::Respond<___R> for OpenComponentStorageById {
9450 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9451
9452 fn respond(response: ___R) -> Self::Output {
9453 ::core::result::Result::Ok(response)
9454 }
9455 }
9456
9457 impl<___R> ::fidl_next::RespondErr<___R> for OpenComponentStorageById {
9458 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9459
9460 fn respond_err(response: ___R) -> Self::Output {
9461 ::core::result::Result::Err(response)
9462 }
9463 }
9464
9465 pub struct DeleteComponentStorage;
9466
9467 impl ::fidl_next::Method for DeleteComponentStorage {
9468 const ORDINAL: u64 = 1618975681517712474;
9469 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9470 ::fidl_next::protocol::Flexibility::Strict;
9471
9472 type Protocol = crate::StorageAdmin;
9473
9474 type Request = crate::wire::StorageAdminDeleteComponentStorageRequest<'static>;
9475 }
9476
9477 impl ::fidl_next::TwoWayMethod for DeleteComponentStorage {
9478 type Response = ::fidl_next::WireResult<
9479 'static,
9480 crate::wire::StorageAdminDeleteComponentStorageResponse,
9481 crate::wire::Error,
9482 >;
9483 }
9484
9485 impl<___R> ::fidl_next::Respond<___R> for DeleteComponentStorage {
9486 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9487
9488 fn respond(response: ___R) -> Self::Output {
9489 ::core::result::Result::Ok(response)
9490 }
9491 }
9492
9493 impl<___R> ::fidl_next::RespondErr<___R> for DeleteComponentStorage {
9494 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9495
9496 fn respond_err(response: ___R) -> Self::Output {
9497 ::core::result::Result::Err(response)
9498 }
9499 }
9500
9501 pub struct GetStatus;
9502
9503 impl ::fidl_next::Method for GetStatus {
9504 const ORDINAL: u64 = 8586643915409794760;
9505 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9506 ::fidl_next::protocol::Flexibility::Strict;
9507
9508 type Protocol = crate::StorageAdmin;
9509
9510 type Request = ();
9511 }
9512
9513 impl ::fidl_next::TwoWayMethod for GetStatus {
9514 type Response = ::fidl_next::WireResult<
9515 'static,
9516 crate::wire::StorageStatus<'static>,
9517 crate::wire::StatusError,
9518 >;
9519 }
9520
9521 impl<___R> ::fidl_next::Respond<___R> for GetStatus {
9522 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9523
9524 fn respond(response: ___R) -> Self::Output {
9525 ::core::result::Result::Ok(response)
9526 }
9527 }
9528
9529 impl<___R> ::fidl_next::RespondErr<___R> for GetStatus {
9530 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9531
9532 fn respond_err(response: ___R) -> Self::Output {
9533 ::core::result::Result::Err(response)
9534 }
9535 }
9536
9537 pub struct DeleteAllStorageContents;
9538
9539 impl ::fidl_next::Method for DeleteAllStorageContents {
9540 const ORDINAL: u64 = 3380374508900862683;
9541 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9542 ::fidl_next::protocol::Flexibility::Strict;
9543
9544 type Protocol = crate::StorageAdmin;
9545
9546 type Request = ();
9547 }
9548
9549 impl ::fidl_next::TwoWayMethod for DeleteAllStorageContents {
9550 type Response = ::fidl_next::WireResult<
9551 'static,
9552 crate::wire::StorageAdminDeleteAllStorageContentsResponse,
9553 crate::wire::DeletionError,
9554 >;
9555 }
9556
9557 impl<___R> ::fidl_next::Respond<___R> for DeleteAllStorageContents {
9558 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9559
9560 fn respond(response: ___R) -> Self::Output {
9561 ::core::result::Result::Ok(response)
9562 }
9563 }
9564
9565 impl<___R> ::fidl_next::RespondErr<___R> for DeleteAllStorageContents {
9566 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9567
9568 fn respond_err(response: ___R) -> Self::Output {
9569 ::core::result::Result::Err(response)
9570 }
9571 }
9572
9573 mod ___detail {
9574 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::StorageAdmin
9575 where
9576 ___T: ::fidl_next::Transport,
9577 {
9578 type Client = StorageAdminClient<___T>;
9579 type Server = StorageAdminServer<___T>;
9580 }
9581
9582 #[repr(transparent)]
9584 pub struct StorageAdminClient<___T: ::fidl_next::Transport> {
9585 #[allow(dead_code)]
9586 client: ::fidl_next::protocol::Client<___T>,
9587 }
9588
9589 impl<___T> StorageAdminClient<___T>
9590 where
9591 ___T: ::fidl_next::Transport,
9592 {
9593 #[doc = " Opens the isolated directory for the given component. The provided\n moniker is relative to the component that declares the storage\n capability. Creates the backing sub-directory for this storage if it\n hasn\'t yet been created.\n"]
9594 pub fn open_storage(
9595 &self,
9596
9597 relative_moniker: impl ::fidl_next::Encode<
9598 ::fidl_next::WireString<'static>,
9599 <___T as ::fidl_next::Transport>::SendBuffer,
9600 >,
9601
9602 object: impl ::fidl_next::Encode<
9603 ::fidl_next::ServerEnd<
9604 ::fidl_next_fuchsia_io::Node,
9605 ::fidl_next::fuchsia::WireChannel,
9606 >,
9607 <___T as ::fidl_next::Transport>::SendBuffer,
9608 >,
9609 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenStorage, ___T>
9610 where
9611 <___T as ::fidl_next::Transport>::SendBuffer:
9612 ::fidl_next::encoder::InternalHandleEncoder,
9613 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9614 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9615 {
9616 self.open_storage_with(crate::generic::StorageAdminOpenStorageRequest {
9617 relative_moniker,
9618
9619 object,
9620 })
9621 }
9622
9623 #[doc = " Opens the isolated directory for the given component. The provided\n moniker is relative to the component that declares the storage\n capability. Creates the backing sub-directory for this storage if it\n hasn\'t yet been created.\n"]
9624 pub fn open_storage_with<___R>(
9625 &self,
9626 request: ___R,
9627 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenStorage, ___T>
9628 where
9629 ___R: ::fidl_next::Encode<
9630 crate::wire::StorageAdminOpenStorageRequest<'static>,
9631 <___T as ::fidl_next::Transport>::SendBuffer,
9632 >,
9633 {
9634 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9635 7848267339832116087,
9636 <super::OpenStorage as ::fidl_next::Method>::FLEXIBILITY,
9637 request,
9638 ))
9639 }
9640
9641 #[doc = " Lists the descendant components under the specified realm that use the\n storage capability. The provided moniker is relative to the component\n that declares the storage capability.\n\n Returns INSTANCE_NOT_FOUND if the realm does not exist, and INVALID_ARGS\n if |relative_moniker| is malformed.\n"]
9642 pub fn list_storage_in_realm(
9643 &self,
9644
9645 relative_moniker: impl ::fidl_next::Encode<
9646 ::fidl_next::WireString<'static>,
9647 <___T as ::fidl_next::Transport>::SendBuffer,
9648 >,
9649
9650 iterator: impl ::fidl_next::Encode<
9651 ::fidl_next::ServerEnd<
9652 crate::StorageIterator,
9653 ::fidl_next::fuchsia::WireChannel,
9654 >,
9655 <___T as ::fidl_next::Transport>::SendBuffer,
9656 >,
9657 ) -> ::fidl_next::TwoWayFuture<'_, super::ListStorageInRealm, ___T>
9658 where
9659 <___T as ::fidl_next::Transport>::SendBuffer:
9660 ::fidl_next::encoder::InternalHandleEncoder,
9661 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9662 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9663 {
9664 self.list_storage_in_realm_with(
9665 crate::generic::StorageAdminListStorageInRealmRequest {
9666 relative_moniker,
9667
9668 iterator,
9669 },
9670 )
9671 }
9672
9673 #[doc = " Lists the descendant components under the specified realm that use the\n storage capability. The provided moniker is relative to the component\n that declares the storage capability.\n\n Returns INSTANCE_NOT_FOUND if the realm does not exist, and INVALID_ARGS\n if |relative_moniker| is malformed.\n"]
9674 pub fn list_storage_in_realm_with<___R>(
9675 &self,
9676 request: ___R,
9677 ) -> ::fidl_next::TwoWayFuture<'_, super::ListStorageInRealm, ___T>
9678 where
9679 ___R: ::fidl_next::Encode<
9680 crate::wire::StorageAdminListStorageInRealmRequest<'static>,
9681 <___T as ::fidl_next::Transport>::SendBuffer,
9682 >,
9683 {
9684 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9685 8525152599685368827,
9686 <super::ListStorageInRealm as ::fidl_next::Method>::FLEXIBILITY,
9687 request,
9688 ))
9689 }
9690
9691 #[doc = " Opens the isolated directory for the given storage ID. Creates the\n backing sub-directory for this storage if it hasn\'t yet been created.\n"]
9692 pub fn open_component_storage_by_id(
9693 &self,
9694
9695 id: impl ::fidl_next::Encode<
9696 ::fidl_next::WireString<'static>,
9697 <___T as ::fidl_next::Transport>::SendBuffer,
9698 >,
9699
9700 object: impl ::fidl_next::Encode<
9701 ::fidl_next::ServerEnd<
9702 ::fidl_next_fuchsia_io::Node,
9703 ::fidl_next::fuchsia::WireChannel,
9704 >,
9705 <___T as ::fidl_next::Transport>::SendBuffer,
9706 >,
9707 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenComponentStorageById, ___T>
9708 where
9709 <___T as ::fidl_next::Transport>::SendBuffer:
9710 ::fidl_next::encoder::InternalHandleEncoder,
9711 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9712 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9713 {
9714 self.open_component_storage_by_id_with(
9715 crate::generic::StorageAdminOpenComponentStorageByIdRequest { id, object },
9716 )
9717 }
9718
9719 #[doc = " Opens the isolated directory for the given storage ID. Creates the\n backing sub-directory for this storage if it hasn\'t yet been created.\n"]
9720 pub fn open_component_storage_by_id_with<___R>(
9721 &self,
9722 request: ___R,
9723 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenComponentStorageById, ___T>
9724 where
9725 ___R: ::fidl_next::Encode<
9726 crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>,
9727 <___T as ::fidl_next::Transport>::SendBuffer,
9728 >,
9729 {
9730 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9731 5188727505160068593,
9732 <super::OpenComponentStorageById as ::fidl_next::Method>::FLEXIBILITY,
9733 request,
9734 ))
9735 }
9736
9737 #[doc = " Deletes the contents of the storage for this component. Preserves the\n component\'s subdirectory itself within the storage backing directory.\n The provided moniker is relative to the component that declares the\n storage capability.\n"]
9738 pub fn delete_component_storage(
9739 &self,
9740
9741 relative_moniker: impl ::fidl_next::Encode<
9742 ::fidl_next::WireString<'static>,
9743 <___T as ::fidl_next::Transport>::SendBuffer,
9744 >,
9745 ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteComponentStorage, ___T>
9746 where
9747 <___T as ::fidl_next::Transport>::SendBuffer:
9748 ::fidl_next::encoder::InternalHandleEncoder,
9749 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9750 {
9751 self.delete_component_storage_with(
9752 crate::generic::StorageAdminDeleteComponentStorageRequest { relative_moniker },
9753 )
9754 }
9755
9756 #[doc = " Deletes the contents of the storage for this component. Preserves the\n component\'s subdirectory itself within the storage backing directory.\n The provided moniker is relative to the component that declares the\n storage capability.\n"]
9757 pub fn delete_component_storage_with<___R>(
9758 &self,
9759 request: ___R,
9760 ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteComponentStorage, ___T>
9761 where
9762 ___R: ::fidl_next::Encode<
9763 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
9764 <___T as ::fidl_next::Transport>::SendBuffer,
9765 >,
9766 {
9767 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9768 1618975681517712474,
9769 <super::DeleteComponentStorage as ::fidl_next::Method>::FLEXIBILITY,
9770 request,
9771 ))
9772 }
9773
9774 #[doc = " Get the current status of the storage.\n"]
9775 pub fn get_status(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetStatus, ___T> {
9776 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9777 8586643915409794760,
9778 <super::GetStatus as ::fidl_next::Method>::FLEXIBILITY,
9779 (),
9780 ))
9781 }
9782
9783 #[doc = " Deletes the contents of all the storage. Storage directories are\n retained so any components using storage will be able to continue using\n it to create new files and directories.\n\n Returns Error::INTERNAL only if no storage at all could be cleared.\n Returns successfully even if some errors happen during the deletion\n progress.\n"]
9784 pub fn delete_all_storage_contents(
9785 &self,
9786 ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteAllStorageContents, ___T> {
9787 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9788 3380374508900862683,
9789 <super::DeleteAllStorageContents as ::fidl_next::Method>::FLEXIBILITY,
9790 (),
9791 ))
9792 }
9793 }
9794
9795 #[repr(transparent)]
9797 pub struct StorageAdminServer<___T: ::fidl_next::Transport> {
9798 server: ::fidl_next::protocol::Server<___T>,
9799 }
9800
9801 impl<___T> StorageAdminServer<___T> where ___T: ::fidl_next::Transport {}
9802 }
9803}
9804
9805pub trait StorageAdminClientHandler<
9809 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9810 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9811>
9812{
9813}
9814
9815impl<___T> StorageAdminClientHandler<___T> for ::fidl_next::IgnoreEvents where
9816 ___T: ::fidl_next::Transport
9817{
9818}
9819
9820impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for StorageAdmin
9821where
9822 ___H: StorageAdminClientHandler<___T> + ::core::marker::Send,
9823 ___T: ::fidl_next::Transport,
9824{
9825 async fn on_event(
9826 handler: &mut ___H,
9827 ordinal: u64,
9828 flexibility: ::fidl_next::protocol::Flexibility,
9829 buffer: ___T::RecvBuffer,
9830 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9831 match ordinal {
9832 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9833 }
9834 }
9835}
9836
9837pub trait StorageAdminServerHandler<
9841 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9842 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9843>
9844{
9845 #[doc = " Opens the isolated directory for the given component. The provided\n moniker is relative to the component that declares the storage\n capability. Creates the backing sub-directory for this storage if it\n hasn\'t yet been created.\n"]
9846 fn open_storage(
9847 &mut self,
9848
9849 request: ::fidl_next::Request<storage_admin::OpenStorage, ___T>,
9850
9851 responder: ::fidl_next::Responder<storage_admin::OpenStorage, ___T>,
9852 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9853
9854 #[doc = " Lists the descendant components under the specified realm that use the\n storage capability. The provided moniker is relative to the component\n that declares the storage capability.\n\n Returns INSTANCE_NOT_FOUND if the realm does not exist, and INVALID_ARGS\n if |relative_moniker| is malformed.\n"]
9855 fn list_storage_in_realm(
9856 &mut self,
9857
9858 request: ::fidl_next::Request<storage_admin::ListStorageInRealm, ___T>,
9859
9860 responder: ::fidl_next::Responder<storage_admin::ListStorageInRealm, ___T>,
9861 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9862
9863 #[doc = " Opens the isolated directory for the given storage ID. Creates the\n backing sub-directory for this storage if it hasn\'t yet been created.\n"]
9864 fn open_component_storage_by_id(
9865 &mut self,
9866
9867 request: ::fidl_next::Request<storage_admin::OpenComponentStorageById, ___T>,
9868
9869 responder: ::fidl_next::Responder<storage_admin::OpenComponentStorageById, ___T>,
9870 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9871
9872 #[doc = " Deletes the contents of the storage for this component. Preserves the\n component\'s subdirectory itself within the storage backing directory.\n The provided moniker is relative to the component that declares the\n storage capability.\n"]
9873 fn delete_component_storage(
9874 &mut self,
9875
9876 request: ::fidl_next::Request<storage_admin::DeleteComponentStorage, ___T>,
9877
9878 responder: ::fidl_next::Responder<storage_admin::DeleteComponentStorage, ___T>,
9879 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9880
9881 #[doc = " Get the current status of the storage.\n"]
9882 fn get_status(
9883 &mut self,
9884
9885 responder: ::fidl_next::Responder<storage_admin::GetStatus, ___T>,
9886 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9887
9888 #[doc = " Deletes the contents of all the storage. Storage directories are\n retained so any components using storage will be able to continue using\n it to create new files and directories.\n\n Returns Error::INTERNAL only if no storage at all could be cleared.\n Returns successfully even if some errors happen during the deletion\n progress.\n"]
9889 fn delete_all_storage_contents(
9890 &mut self,
9891
9892 responder: ::fidl_next::Responder<storage_admin::DeleteAllStorageContents, ___T>,
9893 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9894}
9895
9896impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for StorageAdmin
9897where
9898 ___H: StorageAdminServerHandler<___T> + ::core::marker::Send,
9899 ___T: ::fidl_next::Transport,
9900 <storage_admin::OpenStorage as ::fidl_next::Method>::Request:
9901 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9902 <storage_admin::ListStorageInRealm as ::fidl_next::Method>::Request:
9903 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9904 <storage_admin::OpenComponentStorageById as ::fidl_next::Method>::Request:
9905 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9906 <storage_admin::DeleteComponentStorage as ::fidl_next::Method>::Request:
9907 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9908{
9909 async fn on_one_way(
9910 handler: &mut ___H,
9911 ordinal: u64,
9912 flexibility: ::fidl_next::protocol::Flexibility,
9913 buffer: ___T::RecvBuffer,
9914 ) -> ::core::result::Result<
9915 (),
9916 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9917 > {
9918 match ordinal {
9919 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9920 }
9921 }
9922
9923 async fn on_two_way(
9924 handler: &mut ___H,
9925 ordinal: u64,
9926 flexibility: ::fidl_next::protocol::Flexibility,
9927 buffer: ___T::RecvBuffer,
9928 responder: ::fidl_next::protocol::Responder<___T>,
9929 ) -> ::core::result::Result<
9930 (),
9931 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9932 > {
9933 match ordinal {
9934 7848267339832116087 => {
9935 let responder = ::fidl_next::Responder::from_untyped(responder);
9936
9937 match ::fidl_next::DecoderExt::decode(buffer) {
9938 Ok(decoded) => {
9939 handler
9940 .open_storage(::fidl_next::Request::from_decoded(decoded), responder)
9941 .await;
9942 Ok(())
9943 }
9944 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9945 ordinal: 7848267339832116087,
9946 error,
9947 }),
9948 }
9949 }
9950
9951 8525152599685368827 => {
9952 let responder = ::fidl_next::Responder::from_untyped(responder);
9953
9954 match ::fidl_next::DecoderExt::decode(buffer) {
9955 Ok(decoded) => {
9956 handler
9957 .list_storage_in_realm(
9958 ::fidl_next::Request::from_decoded(decoded),
9959 responder,
9960 )
9961 .await;
9962 Ok(())
9963 }
9964 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9965 ordinal: 8525152599685368827,
9966 error,
9967 }),
9968 }
9969 }
9970
9971 5188727505160068593 => {
9972 let responder = ::fidl_next::Responder::from_untyped(responder);
9973
9974 match ::fidl_next::DecoderExt::decode(buffer) {
9975 Ok(decoded) => {
9976 handler
9977 .open_component_storage_by_id(
9978 ::fidl_next::Request::from_decoded(decoded),
9979 responder,
9980 )
9981 .await;
9982 Ok(())
9983 }
9984 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9985 ordinal: 5188727505160068593,
9986 error,
9987 }),
9988 }
9989 }
9990
9991 1618975681517712474 => {
9992 let responder = ::fidl_next::Responder::from_untyped(responder);
9993
9994 match ::fidl_next::DecoderExt::decode(buffer) {
9995 Ok(decoded) => {
9996 handler
9997 .delete_component_storage(
9998 ::fidl_next::Request::from_decoded(decoded),
9999 responder,
10000 )
10001 .await;
10002 Ok(())
10003 }
10004 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10005 ordinal: 1618975681517712474,
10006 error,
10007 }),
10008 }
10009 }
10010
10011 8586643915409794760 => {
10012 let responder = ::fidl_next::Responder::from_untyped(responder);
10013
10014 handler.get_status(responder).await;
10015 Ok(())
10016 }
10017
10018 3380374508900862683 => {
10019 let responder = ::fidl_next::Responder::from_untyped(responder);
10020
10021 handler.delete_all_storage_contents(responder).await;
10022 Ok(())
10023 }
10024
10025 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
10026 }
10027 }
10028}
10029
10030pub use fidl_next_common_fuchsia_component::*;
10031
10032pub mod compat {
10034
10035 pub use fidl_next_common_fuchsia_component::compat::*;
10036
10037 impl ::fidl_next::CompatFrom<crate::CapabilityRequestedPayload>
10038 for ::fidl_fuchsia_component::CapabilityRequestedPayload
10039 {
10040 fn compat_from(value: crate::CapabilityRequestedPayload) -> Self {
10041 Self {
10042 name: ::fidl_next::CompatFrom::compat_from(value.name),
10043
10044 capability: ::fidl_next::CompatFrom::compat_from(value.capability),
10045
10046 __source_breaking: ::fidl::marker::SourceBreaking,
10047 }
10048 }
10049 }
10050
10051 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::CapabilityRequestedPayload>
10052 for crate::CapabilityRequestedPayload
10053 {
10054 fn compat_from(value: ::fidl_fuchsia_component::CapabilityRequestedPayload) -> Self {
10055 Self {
10056 name: ::fidl_next::CompatFrom::compat_from(value.name),
10057
10058 capability: ::fidl_next::CompatFrom::compat_from(value.capability),
10059 }
10060 }
10061 }
10062
10063 impl ::fidl_next::CompatFrom<crate::ControllerIsStartedResponse>
10064 for ::fidl_fuchsia_component::ControllerIsStartedResponse
10065 {
10066 #[inline]
10067 fn compat_from(value: crate::ControllerIsStartedResponse) -> Self {
10068 Self { is_started: ::fidl_next::CompatFrom::compat_from(value.is_started) }
10069 }
10070 }
10071
10072 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerIsStartedResponse>
10073 for crate::ControllerIsStartedResponse
10074 {
10075 #[inline]
10076 fn compat_from(value: ::fidl_fuchsia_component::ControllerIsStartedResponse) -> Self {
10077 Self { is_started: ::fidl_next::CompatFrom::compat_from(value.is_started) }
10078 }
10079 }
10080
10081 impl ::fidl_next::CompatFrom<crate::ControllerGetExposedDictionaryResponse>
10082 for ::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse
10083 {
10084 #[inline]
10085 fn compat_from(value: crate::ControllerGetExposedDictionaryResponse) -> Self {
10086 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
10087 }
10088 }
10089
10090 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse>
10091 for crate::ControllerGetExposedDictionaryResponse
10092 {
10093 #[inline]
10094 fn compat_from(
10095 value: ::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse,
10096 ) -> Self {
10097 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
10098 }
10099 }
10100
10101 impl ::fidl_next::CompatFrom<crate::ControllerGetOutputDictionaryResponse>
10102 for ::fidl_fuchsia_component::ControllerGetOutputDictionaryResponse
10103 {
10104 #[inline]
10105 fn compat_from(value: crate::ControllerGetOutputDictionaryResponse) -> Self {
10106 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
10107 }
10108 }
10109
10110 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerGetOutputDictionaryResponse>
10111 for crate::ControllerGetOutputDictionaryResponse
10112 {
10113 #[inline]
10114 fn compat_from(
10115 value: ::fidl_fuchsia_component::ControllerGetOutputDictionaryResponse,
10116 ) -> Self {
10117 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
10118 }
10119 }
10120
10121 impl ::fidl_next::CompatFrom<crate::NamespaceEntry> for ::fidl_fuchsia_component::NamespaceEntry {
10122 fn compat_from(value: crate::NamespaceEntry) -> Self {
10123 Self {
10124 path: ::fidl_next::CompatFrom::compat_from(value.path),
10125
10126 directory: ::fidl_next::CompatFrom::compat_from(value.directory),
10127
10128 __source_breaking: ::fidl::marker::SourceBreaking,
10129 }
10130 }
10131 }
10132
10133 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceEntry> for crate::NamespaceEntry {
10134 fn compat_from(value: ::fidl_fuchsia_component::NamespaceEntry) -> Self {
10135 Self {
10136 path: ::fidl_next::CompatFrom::compat_from(value.path),
10137
10138 directory: ::fidl_next::CompatFrom::compat_from(value.directory),
10139 }
10140 }
10141 }
10142
10143 impl ::fidl_next::CompatFrom<crate::StartChildArgs> for ::fidl_fuchsia_component::StartChildArgs {
10144 fn compat_from(value: crate::StartChildArgs) -> Self {
10145 Self {
10146 numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
10147
10148 namespace_entries: ::fidl_next::CompatFrom::compat_from(value.namespace_entries),
10149
10150 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
10151
10152 additional_inputs: ::fidl_next::CompatFrom::compat_from(value.additional_inputs),
10153
10154 __source_breaking: ::fidl::marker::SourceBreaking,
10155 }
10156 }
10157 }
10158
10159 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StartChildArgs> for crate::StartChildArgs {
10160 fn compat_from(value: ::fidl_fuchsia_component::StartChildArgs) -> Self {
10161 Self {
10162 numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
10163
10164 namespace_entries: ::fidl_next::CompatFrom::compat_from(value.namespace_entries),
10165
10166 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
10167
10168 additional_inputs: ::fidl_next::CompatFrom::compat_from(value.additional_inputs),
10169 }
10170 }
10171 }
10172
10173 impl ::fidl_next::CompatFrom<crate::ControllerStartRequest>
10174 for ::fidl_fuchsia_component::ControllerStartRequest
10175 {
10176 #[inline]
10177 fn compat_from(value: crate::ControllerStartRequest) -> Self {
10178 Self {
10179 args: ::fidl_next::CompatFrom::compat_from(value.args),
10180
10181 execution_controller: ::fidl_next::CompatFrom::compat_from(
10182 value.execution_controller,
10183 ),
10184 }
10185 }
10186 }
10187
10188 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerStartRequest>
10189 for crate::ControllerStartRequest
10190 {
10191 #[inline]
10192 fn compat_from(value: ::fidl_fuchsia_component::ControllerStartRequest) -> Self {
10193 Self {
10194 args: ::fidl_next::CompatFrom::compat_from(value.args),
10195
10196 execution_controller: ::fidl_next::CompatFrom::compat_from(
10197 value.execution_controller,
10198 ),
10199 }
10200 }
10201 }
10202
10203 impl ::fidl_next::CompatFrom<crate::ControllerOpenExposedDirRequest>
10204 for ::fidl_fuchsia_component::ControllerOpenExposedDirRequest
10205 {
10206 #[inline]
10207 fn compat_from(value: crate::ControllerOpenExposedDirRequest) -> Self {
10208 Self { exposed_dir: ::fidl_next::CompatFrom::compat_from(value.exposed_dir) }
10209 }
10210 }
10211
10212 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerOpenExposedDirRequest>
10213 for crate::ControllerOpenExposedDirRequest
10214 {
10215 #[inline]
10216 fn compat_from(value: ::fidl_fuchsia_component::ControllerOpenExposedDirRequest) -> Self {
10217 Self { exposed_dir: ::fidl_next::CompatFrom::compat_from(value.exposed_dir) }
10218 }
10219 }
10220
10221 #[cfg(target_os = "fuchsia")]
10222 pub type ControllerProxy = ::fidl_next::Client<crate::Controller>;
10225
10226 impl ::fidl_next::CompatFrom<crate::Controller> for ::fidl_fuchsia_component::ControllerMarker {
10227 fn compat_from(_: crate::Controller) -> Self {
10228 Self
10229 }
10230 }
10231
10232 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerMarker> for crate::Controller {
10233 fn compat_from(_: ::fidl_fuchsia_component::ControllerMarker) -> Self {
10234 Self
10235 }
10236 }
10237
10238 #[cfg(target_os = "fuchsia")]
10239
10240 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ControllerProxy>
10241 for crate::Controller
10242 {
10243 fn client_compat_from(
10244 proxy: ::fidl_fuchsia_component::ControllerProxy,
10245 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
10246 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
10247 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
10248 ::fidl_next::ClientDispatcher::new(client_end)
10249 }
10250 }
10251
10252 impl ::fidl_next::CompatFrom<crate::CreateChildArgs> for ::fidl_fuchsia_component::CreateChildArgs {
10253 fn compat_from(value: crate::CreateChildArgs) -> Self {
10254 Self {
10255 numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
10256
10257 dynamic_offers: ::fidl_next::CompatFrom::compat_from(value.dynamic_offers),
10258
10259 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
10260
10261 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
10262
10263 additional_inputs: ::fidl_next::CompatFrom::compat_from(value.additional_inputs),
10264
10265 __source_breaking: ::fidl::marker::SourceBreaking,
10266 }
10267 }
10268 }
10269
10270 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::CreateChildArgs> for crate::CreateChildArgs {
10271 fn compat_from(value: ::fidl_fuchsia_component::CreateChildArgs) -> Self {
10272 Self {
10273 numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
10274
10275 dynamic_offers: ::fidl_next::CompatFrom::compat_from(value.dynamic_offers),
10276
10277 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
10278
10279 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
10280
10281 additional_inputs: ::fidl_next::CompatFrom::compat_from(value.additional_inputs),
10282 }
10283 }
10284 }
10285
10286 impl ::fidl_next::CompatFrom<crate::DebugStartedPayload>
10287 for ::fidl_fuchsia_component::DebugStartedPayload
10288 {
10289 fn compat_from(value: crate::DebugStartedPayload) -> Self {
10290 Self {
10291 runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
10292
10293 break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
10294
10295 __source_breaking: ::fidl::marker::SourceBreaking,
10296 }
10297 }
10298 }
10299
10300 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DebugStartedPayload>
10301 for crate::DebugStartedPayload
10302 {
10303 fn compat_from(value: ::fidl_fuchsia_component::DebugStartedPayload) -> Self {
10304 Self {
10305 runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
10306
10307 break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
10308 }
10309 }
10310 }
10311
10312 impl ::fidl_next::CompatFrom<crate::EventPayload> for ::fidl_fuchsia_component::EventPayload {
10313 fn compat_from(value: crate::EventPayload) -> Self {
10314 match value {
10315 crate::EventPayload::CapabilityRequested(value) => {
10316 Self::CapabilityRequested(::fidl_next::CompatFrom::compat_from(value))
10317 }
10318
10319 crate::EventPayload::Purged(value) => {
10320 Self::Purged(::fidl_next::CompatFrom::compat_from(value))
10321 }
10322
10323 crate::EventPayload::Discovered(value) => {
10324 Self::Discovered(::fidl_next::CompatFrom::compat_from(value))
10325 }
10326
10327 crate::EventPayload::Destroyed(value) => {
10328 Self::Destroyed(::fidl_next::CompatFrom::compat_from(value))
10329 }
10330
10331 crate::EventPayload::Resolved(value) => {
10332 Self::Resolved(::fidl_next::CompatFrom::compat_from(value))
10333 }
10334
10335 crate::EventPayload::Started(value) => {
10336 Self::Started(::fidl_next::CompatFrom::compat_from(value))
10337 }
10338
10339 crate::EventPayload::Stopped(value) => {
10340 Self::Stopped(::fidl_next::CompatFrom::compat_from(value))
10341 }
10342
10343 crate::EventPayload::DebugStarted(value) => {
10344 Self::DebugStarted(::fidl_next::CompatFrom::compat_from(value))
10345 }
10346
10347 crate::EventPayload::Unresolved(value) => {
10348 Self::Unresolved(::fidl_next::CompatFrom::compat_from(value))
10349 }
10350
10351 crate::EventPayload::UnknownOrdinal_(unknown_ordinal) => {
10352 Self::__SourceBreaking { unknown_ordinal }
10353 }
10354 }
10355 }
10356 }
10357
10358 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventPayload> for crate::EventPayload {
10359 fn compat_from(value: ::fidl_fuchsia_component::EventPayload) -> Self {
10360 match value {
10361 ::fidl_fuchsia_component::EventPayload::CapabilityRequested(value) => {
10362 Self::CapabilityRequested(::fidl_next::CompatFrom::compat_from(value))
10363 }
10364
10365 ::fidl_fuchsia_component::EventPayload::Purged(value) => {
10366 Self::Purged(::fidl_next::CompatFrom::compat_from(value))
10367 }
10368
10369 ::fidl_fuchsia_component::EventPayload::Discovered(value) => {
10370 Self::Discovered(::fidl_next::CompatFrom::compat_from(value))
10371 }
10372
10373 ::fidl_fuchsia_component::EventPayload::Destroyed(value) => {
10374 Self::Destroyed(::fidl_next::CompatFrom::compat_from(value))
10375 }
10376
10377 ::fidl_fuchsia_component::EventPayload::Resolved(value) => {
10378 Self::Resolved(::fidl_next::CompatFrom::compat_from(value))
10379 }
10380
10381 ::fidl_fuchsia_component::EventPayload::Started(value) => {
10382 Self::Started(::fidl_next::CompatFrom::compat_from(value))
10383 }
10384
10385 ::fidl_fuchsia_component::EventPayload::Stopped(value) => {
10386 Self::Stopped(::fidl_next::CompatFrom::compat_from(value))
10387 }
10388
10389 ::fidl_fuchsia_component::EventPayload::DebugStarted(value) => {
10390 Self::DebugStarted(::fidl_next::CompatFrom::compat_from(value))
10391 }
10392
10393 ::fidl_fuchsia_component::EventPayload::Unresolved(value) => {
10394 Self::Unresolved(::fidl_next::CompatFrom::compat_from(value))
10395 }
10396
10397 ::fidl_fuchsia_component::EventPayload::__SourceBreaking { unknown_ordinal } => {
10398 Self::UnknownOrdinal_(unknown_ordinal)
10399 }
10400 }
10401 }
10402 }
10403
10404 impl ::fidl_next::CompatFrom<crate::Event> for ::fidl_fuchsia_component::Event {
10405 fn compat_from(value: crate::Event) -> Self {
10406 Self {
10407 header: ::fidl_next::CompatFrom::compat_from(value.header),
10408
10409 payload: ::fidl_next::CompatFrom::compat_from(value.payload),
10410
10411 __source_breaking: ::fidl::marker::SourceBreaking,
10412 }
10413 }
10414 }
10415
10416 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::Event> for crate::Event {
10417 fn compat_from(value: ::fidl_fuchsia_component::Event) -> Self {
10418 Self {
10419 header: ::fidl_next::CompatFrom::compat_from(value.header),
10420
10421 payload: ::fidl_next::CompatFrom::compat_from(value.payload),
10422 }
10423 }
10424 }
10425
10426 impl ::fidl_next::CompatFrom<crate::EventStreamGetNextResponse>
10427 for ::fidl_fuchsia_component::EventStreamGetNextResponse
10428 {
10429 #[inline]
10430 fn compat_from(value: crate::EventStreamGetNextResponse) -> Self {
10431 Self { events: ::fidl_next::CompatFrom::compat_from(value.events) }
10432 }
10433 }
10434
10435 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventStreamGetNextResponse>
10436 for crate::EventStreamGetNextResponse
10437 {
10438 #[inline]
10439 fn compat_from(value: ::fidl_fuchsia_component::EventStreamGetNextResponse) -> Self {
10440 Self { events: ::fidl_next::CompatFrom::compat_from(value.events) }
10441 }
10442 }
10443
10444 #[cfg(target_os = "fuchsia")]
10445 pub type EventStreamProxy = ::fidl_next::Client<crate::EventStream>;
10448
10449 impl ::fidl_next::CompatFrom<crate::EventStream> for ::fidl_fuchsia_component::EventStreamMarker {
10450 fn compat_from(_: crate::EventStream) -> Self {
10451 Self
10452 }
10453 }
10454
10455 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventStreamMarker> for crate::EventStream {
10456 fn compat_from(_: ::fidl_fuchsia_component::EventStreamMarker) -> Self {
10457 Self
10458 }
10459 }
10460
10461 #[cfg(target_os = "fuchsia")]
10462
10463 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::EventStreamProxy>
10464 for crate::EventStream
10465 {
10466 fn client_compat_from(
10467 proxy: ::fidl_fuchsia_component::EventStreamProxy,
10468 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
10469 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
10470 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
10471 ::fidl_next::ClientDispatcher::new(client_end)
10472 }
10473 }
10474
10475 impl ::fidl_next::CompatFrom<crate::IntrospectorGetMonikerRequest>
10476 for ::fidl_fuchsia_component::IntrospectorGetMonikerRequest
10477 {
10478 #[inline]
10479 fn compat_from(value: crate::IntrospectorGetMonikerRequest) -> Self {
10480 Self {
10481 component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
10482 }
10483 }
10484 }
10485
10486 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorGetMonikerRequest>
10487 for crate::IntrospectorGetMonikerRequest
10488 {
10489 #[inline]
10490 fn compat_from(value: ::fidl_fuchsia_component::IntrospectorGetMonikerRequest) -> Self {
10491 Self {
10492 component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
10493 }
10494 }
10495 }
10496
10497 #[cfg(target_os = "fuchsia")]
10498 pub type IntrospectorProxy = ::fidl_next::Client<crate::Introspector>;
10501
10502 impl ::fidl_next::CompatFrom<crate::Introspector> for ::fidl_fuchsia_component::IntrospectorMarker {
10503 fn compat_from(_: crate::Introspector) -> Self {
10504 Self
10505 }
10506 }
10507
10508 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorMarker> for crate::Introspector {
10509 fn compat_from(_: ::fidl_fuchsia_component::IntrospectorMarker) -> Self {
10510 Self
10511 }
10512 }
10513
10514 #[cfg(target_os = "fuchsia")]
10515
10516 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::IntrospectorProxy>
10517 for crate::Introspector
10518 {
10519 fn client_compat_from(
10520 proxy: ::fidl_fuchsia_component::IntrospectorProxy,
10521 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
10522 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
10523 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
10524 ::fidl_next::ClientDispatcher::new(client_end)
10525 }
10526 }
10527
10528 impl ::fidl_next::CompatFrom<crate::NamespaceInputEntry>
10529 for ::fidl_fuchsia_component::NamespaceInputEntry
10530 {
10531 #[inline]
10532 fn compat_from(value: crate::NamespaceInputEntry) -> Self {
10533 Self {
10534 path: ::fidl_next::CompatFrom::compat_from(value.path),
10535
10536 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
10537 }
10538 }
10539 }
10540
10541 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceInputEntry>
10542 for crate::NamespaceInputEntry
10543 {
10544 #[inline]
10545 fn compat_from(value: ::fidl_fuchsia_component::NamespaceInputEntry) -> Self {
10546 Self {
10547 path: ::fidl_next::CompatFrom::compat_from(value.path),
10548
10549 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
10550 }
10551 }
10552 }
10553
10554 impl ::fidl_next::CompatFrom<crate::NamespaceCreateRequest>
10555 for ::fidl_fuchsia_component::NamespaceCreateRequest
10556 {
10557 #[inline]
10558 fn compat_from(value: crate::NamespaceCreateRequest) -> Self {
10559 Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
10560 }
10561 }
10562
10563 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceCreateRequest>
10564 for crate::NamespaceCreateRequest
10565 {
10566 #[inline]
10567 fn compat_from(value: ::fidl_fuchsia_component::NamespaceCreateRequest) -> Self {
10568 Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
10569 }
10570 }
10571
10572 impl ::fidl_next::CompatFrom<crate::NamespaceCreateResponse>
10573 for ::fidl_fuchsia_component::NamespaceCreateResponse
10574 {
10575 #[inline]
10576 fn compat_from(value: crate::NamespaceCreateResponse) -> Self {
10577 Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
10578 }
10579 }
10580
10581 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceCreateResponse>
10582 for crate::NamespaceCreateResponse
10583 {
10584 #[inline]
10585 fn compat_from(value: ::fidl_fuchsia_component::NamespaceCreateResponse) -> Self {
10586 Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
10587 }
10588 }
10589
10590 #[cfg(target_os = "fuchsia")]
10591 pub type NamespaceProxy = ::fidl_next::Client<crate::Namespace>;
10594
10595 impl ::fidl_next::CompatFrom<crate::Namespace> for ::fidl_fuchsia_component::NamespaceMarker {
10596 fn compat_from(_: crate::Namespace) -> Self {
10597 Self
10598 }
10599 }
10600
10601 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceMarker> for crate::Namespace {
10602 fn compat_from(_: ::fidl_fuchsia_component::NamespaceMarker) -> Self {
10603 Self
10604 }
10605 }
10606
10607 #[cfg(target_os = "fuchsia")]
10608
10609 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::NamespaceProxy> for crate::Namespace {
10610 fn client_compat_from(
10611 proxy: ::fidl_fuchsia_component::NamespaceProxy,
10612 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
10613 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
10614 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
10615 ::fidl_next::ClientDispatcher::new(client_end)
10616 }
10617 }
10618
10619 impl ::fidl_next::CompatFrom<crate::RealmListChildrenRequest>
10620 for ::fidl_fuchsia_component::RealmListChildrenRequest
10621 {
10622 #[inline]
10623 fn compat_from(value: crate::RealmListChildrenRequest) -> Self {
10624 Self {
10625 collection: ::fidl_next::CompatFrom::compat_from(value.collection),
10626
10627 iter: ::fidl_next::CompatFrom::compat_from(value.iter),
10628 }
10629 }
10630 }
10631
10632 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmListChildrenRequest>
10633 for crate::RealmListChildrenRequest
10634 {
10635 #[inline]
10636 fn compat_from(value: ::fidl_fuchsia_component::RealmListChildrenRequest) -> Self {
10637 Self {
10638 collection: ::fidl_next::CompatFrom::compat_from(value.collection),
10639
10640 iter: ::fidl_next::CompatFrom::compat_from(value.iter),
10641 }
10642 }
10643 }
10644
10645 impl ::fidl_next::CompatFrom<crate::RealmGetChildOutputDictionaryDeprecatedRequest>
10646 for ::fidl_fuchsia_component::RealmGetChildOutputDictionaryDeprecatedRequest
10647 {
10648 #[inline]
10649 fn compat_from(value: crate::RealmGetChildOutputDictionaryDeprecatedRequest) -> Self {
10650 Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
10651 }
10652 }
10653
10654 impl
10655 ::fidl_next::CompatFrom<
10656 ::fidl_fuchsia_component::RealmGetChildOutputDictionaryDeprecatedRequest,
10657 > for crate::RealmGetChildOutputDictionaryDeprecatedRequest
10658 {
10659 #[inline]
10660 fn compat_from(
10661 value: ::fidl_fuchsia_component::RealmGetChildOutputDictionaryDeprecatedRequest,
10662 ) -> Self {
10663 Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
10664 }
10665 }
10666
10667 impl ::fidl_next::CompatFrom<crate::RealmGetChildOutputDictionaryDeprecatedResponse>
10668 for ::fidl_fuchsia_component::RealmGetChildOutputDictionaryDeprecatedResponse
10669 {
10670 #[inline]
10671 fn compat_from(value: crate::RealmGetChildOutputDictionaryDeprecatedResponse) -> Self {
10672 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
10673 }
10674 }
10675
10676 impl
10677 ::fidl_next::CompatFrom<
10678 ::fidl_fuchsia_component::RealmGetChildOutputDictionaryDeprecatedResponse,
10679 > for crate::RealmGetChildOutputDictionaryDeprecatedResponse
10680 {
10681 #[inline]
10682 fn compat_from(
10683 value: ::fidl_fuchsia_component::RealmGetChildOutputDictionaryDeprecatedResponse,
10684 ) -> Self {
10685 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
10686 }
10687 }
10688
10689 impl ::fidl_next::CompatFrom<crate::RealmGetChildOutputDictionaryRequest>
10690 for ::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest
10691 {
10692 #[inline]
10693 fn compat_from(value: crate::RealmGetChildOutputDictionaryRequest) -> Self {
10694 Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
10695 }
10696 }
10697
10698 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest>
10699 for crate::RealmGetChildOutputDictionaryRequest
10700 {
10701 #[inline]
10702 fn compat_from(
10703 value: ::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest,
10704 ) -> Self {
10705 Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
10706 }
10707 }
10708
10709 impl ::fidl_next::CompatFrom<crate::RealmGetChildOutputDictionaryResponse>
10710 for ::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse
10711 {
10712 #[inline]
10713 fn compat_from(value: crate::RealmGetChildOutputDictionaryResponse) -> Self {
10714 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
10715 }
10716 }
10717
10718 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse>
10719 for crate::RealmGetChildOutputDictionaryResponse
10720 {
10721 #[inline]
10722 fn compat_from(
10723 value: ::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse,
10724 ) -> Self {
10725 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
10726 }
10727 }
10728
10729 impl ::fidl_next::CompatFrom<crate::RealmOpenControllerRequest>
10730 for ::fidl_fuchsia_component::RealmOpenControllerRequest
10731 {
10732 #[inline]
10733 fn compat_from(value: crate::RealmOpenControllerRequest) -> Self {
10734 Self {
10735 child: ::fidl_next::CompatFrom::compat_from(value.child),
10736
10737 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
10738 }
10739 }
10740 }
10741
10742 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmOpenControllerRequest>
10743 for crate::RealmOpenControllerRequest
10744 {
10745 #[inline]
10746 fn compat_from(value: ::fidl_fuchsia_component::RealmOpenControllerRequest) -> Self {
10747 Self {
10748 child: ::fidl_next::CompatFrom::compat_from(value.child),
10749
10750 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
10751 }
10752 }
10753 }
10754
10755 impl ::fidl_next::CompatFrom<crate::RealmOpenExposedDirRequest>
10756 for ::fidl_fuchsia_component::RealmOpenExposedDirRequest
10757 {
10758 #[inline]
10759 fn compat_from(value: crate::RealmOpenExposedDirRequest) -> Self {
10760 Self {
10761 child: ::fidl_next::CompatFrom::compat_from(value.child),
10762
10763 exposed_dir: ::fidl_next::CompatFrom::compat_from(value.exposed_dir),
10764 }
10765 }
10766 }
10767
10768 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmOpenExposedDirRequest>
10769 for crate::RealmOpenExposedDirRequest
10770 {
10771 #[inline]
10772 fn compat_from(value: ::fidl_fuchsia_component::RealmOpenExposedDirRequest) -> Self {
10773 Self {
10774 child: ::fidl_next::CompatFrom::compat_from(value.child),
10775
10776 exposed_dir: ::fidl_next::CompatFrom::compat_from(value.exposed_dir),
10777 }
10778 }
10779 }
10780
10781 impl ::fidl_next::CompatFrom<crate::RealmCreateChildRequest>
10782 for ::fidl_fuchsia_component::RealmCreateChildRequest
10783 {
10784 #[inline]
10785 fn compat_from(value: crate::RealmCreateChildRequest) -> Self {
10786 Self {
10787 collection: ::fidl_next::CompatFrom::compat_from(value.collection),
10788
10789 decl: ::fidl_next::CompatFrom::compat_from(value.decl),
10790
10791 args: ::fidl_next::CompatFrom::compat_from(value.args),
10792 }
10793 }
10794 }
10795
10796 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmCreateChildRequest>
10797 for crate::RealmCreateChildRequest
10798 {
10799 #[inline]
10800 fn compat_from(value: ::fidl_fuchsia_component::RealmCreateChildRequest) -> Self {
10801 Self {
10802 collection: ::fidl_next::CompatFrom::compat_from(value.collection),
10803
10804 decl: ::fidl_next::CompatFrom::compat_from(value.decl),
10805
10806 args: ::fidl_next::CompatFrom::compat_from(value.args),
10807 }
10808 }
10809 }
10810
10811 impl ::fidl_next::CompatFrom<crate::RealmGetResolvedInfoResponse>
10812 for ::fidl_fuchsia_component::RealmGetResolvedInfoResponse
10813 {
10814 #[inline]
10815 fn compat_from(value: crate::RealmGetResolvedInfoResponse) -> Self {
10816 Self { resolved_info: ::fidl_next::CompatFrom::compat_from(value.resolved_info) }
10817 }
10818 }
10819
10820 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetResolvedInfoResponse>
10821 for crate::RealmGetResolvedInfoResponse
10822 {
10823 #[inline]
10824 fn compat_from(value: ::fidl_fuchsia_component::RealmGetResolvedInfoResponse) -> Self {
10825 Self { resolved_info: ::fidl_next::CompatFrom::compat_from(value.resolved_info) }
10826 }
10827 }
10828
10829 #[cfg(target_os = "fuchsia")]
10830 pub type RealmProxy = ::fidl_next::Client<crate::Realm>;
10833
10834 impl ::fidl_next::CompatFrom<crate::Realm> for ::fidl_fuchsia_component::RealmMarker {
10835 fn compat_from(_: crate::Realm) -> Self {
10836 Self
10837 }
10838 }
10839
10840 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmMarker> for crate::Realm {
10841 fn compat_from(_: ::fidl_fuchsia_component::RealmMarker) -> Self {
10842 Self
10843 }
10844 }
10845
10846 #[cfg(target_os = "fuchsia")]
10847
10848 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::RealmProxy> for crate::Realm {
10849 fn client_compat_from(
10850 proxy: ::fidl_fuchsia_component::RealmProxy,
10851 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
10852 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
10853 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
10854 ::fidl_next::ClientDispatcher::new(client_end)
10855 }
10856 }
10857
10858 impl ::fidl_next::CompatFrom<crate::StorageAdminListStorageInRealmRequest>
10859 for ::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest
10860 {
10861 #[inline]
10862 fn compat_from(value: crate::StorageAdminListStorageInRealmRequest) -> Self {
10863 Self {
10864 relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
10865
10866 iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
10867 }
10868 }
10869 }
10870
10871 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest>
10872 for crate::StorageAdminListStorageInRealmRequest
10873 {
10874 #[inline]
10875 fn compat_from(
10876 value: ::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest,
10877 ) -> Self {
10878 Self {
10879 relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
10880
10881 iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
10882 }
10883 }
10884 }
10885
10886 impl ::fidl_next::CompatFrom<crate::StorageAdminOpenStorageRequest>
10887 for ::fidl_fuchsia_component::StorageAdminOpenStorageRequest
10888 {
10889 #[inline]
10890 fn compat_from(value: crate::StorageAdminOpenStorageRequest) -> Self {
10891 Self {
10892 relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
10893
10894 object: ::fidl_next::CompatFrom::compat_from(value.object),
10895 }
10896 }
10897 }
10898
10899 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminOpenStorageRequest>
10900 for crate::StorageAdminOpenStorageRequest
10901 {
10902 #[inline]
10903 fn compat_from(value: ::fidl_fuchsia_component::StorageAdminOpenStorageRequest) -> Self {
10904 Self {
10905 relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
10906
10907 object: ::fidl_next::CompatFrom::compat_from(value.object),
10908 }
10909 }
10910 }
10911
10912 impl ::fidl_next::CompatFrom<crate::StorageAdminOpenComponentStorageByIdRequest>
10913 for ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest
10914 {
10915 #[inline]
10916 fn compat_from(value: crate::StorageAdminOpenComponentStorageByIdRequest) -> Self {
10917 Self {
10918 id: ::fidl_next::CompatFrom::compat_from(value.id),
10919
10920 object: ::fidl_next::CompatFrom::compat_from(value.object),
10921 }
10922 }
10923 }
10924
10925 impl
10926 ::fidl_next::CompatFrom<
10927 ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest,
10928 > for crate::StorageAdminOpenComponentStorageByIdRequest
10929 {
10930 #[inline]
10931 fn compat_from(
10932 value: ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest,
10933 ) -> Self {
10934 Self {
10935 id: ::fidl_next::CompatFrom::compat_from(value.id),
10936
10937 object: ::fidl_next::CompatFrom::compat_from(value.object),
10938 }
10939 }
10940 }
10941
10942 #[cfg(target_os = "fuchsia")]
10943 pub type StorageAdminProxy = ::fidl_next::Client<crate::StorageAdmin>;
10946
10947 impl ::fidl_next::CompatFrom<crate::StorageAdmin> for ::fidl_fuchsia_component::StorageAdminMarker {
10948 fn compat_from(_: crate::StorageAdmin) -> Self {
10949 Self
10950 }
10951 }
10952
10953 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminMarker> for crate::StorageAdmin {
10954 fn compat_from(_: ::fidl_fuchsia_component::StorageAdminMarker) -> Self {
10955 Self
10956 }
10957 }
10958
10959 #[cfg(target_os = "fuchsia")]
10960
10961 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::StorageAdminProxy>
10962 for crate::StorageAdmin
10963 {
10964 fn client_compat_from(
10965 proxy: ::fidl_fuchsia_component::StorageAdminProxy,
10966 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
10967 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
10968 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
10969 ::fidl_next::ClientDispatcher::new(client_end)
10970 }
10971 }
10972}