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