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, Clone, 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, Clone, 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 take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3383 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3384 }
3385
3386 pub fn capability(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
3387 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3388 }
3389
3390 pub fn take_capability(
3391 &mut self,
3392 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Channel> {
3393 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3394 }
3395 }
3396
3397 impl<'de> ::core::fmt::Debug for CapabilityRequestedPayload<'de> {
3398 fn fmt(
3399 &self,
3400 f: &mut ::core::fmt::Formatter<'_>,
3401 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3402 f.debug_struct("CapabilityRequestedPayload")
3403 .field("name", &self.name())
3404 .field("capability", &self.capability())
3405 .finish()
3406 }
3407 }
3408
3409 impl<'de> ::fidl_next::IntoNatural for CapabilityRequestedPayload<'de> {
3410 type Natural = crate::natural::CapabilityRequestedPayload;
3411 }
3412
3413 #[derive(Debug)]
3415 #[repr(C)]
3416 pub struct ControllerIsStartedResponse {
3417 pub is_started: bool,
3418 }
3419
3420 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerIsStartedResponse>(), 1);
3421 static_assertions::const_assert_eq!(std::mem::align_of::<ControllerIsStartedResponse>(), 1);
3422
3423 static_assertions::const_assert_eq!(
3424 std::mem::offset_of!(ControllerIsStartedResponse, is_started),
3425 0
3426 );
3427
3428 impl ::fidl_next::Constrained for ControllerIsStartedResponse {
3429 type Constraint = ();
3430
3431 fn validate(
3432 _: ::fidl_next::Slot<'_, Self>,
3433 _: Self::Constraint,
3434 ) -> Result<(), ::fidl_next::ValidationError> {
3435 Ok(())
3436 }
3437 }
3438
3439 unsafe impl ::fidl_next::Wire for ControllerIsStartedResponse {
3440 type Narrowed<'de> = ControllerIsStartedResponse;
3441
3442 #[inline]
3443 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3444 ::fidl_next::munge! {
3445 let Self {
3446 is_started,
3447
3448 } = &mut *out_;
3449 }
3450
3451 ::fidl_next::Wire::zero_padding(is_started);
3452 }
3453 }
3454
3455 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerIsStartedResponse
3456 where
3457 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3458 ___D: ::fidl_next::fuchsia::HandleDecoder,
3459 {
3460 fn decode(
3461 slot_: ::fidl_next::Slot<'_, Self>,
3462 decoder_: &mut ___D,
3463 _: (),
3464 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3465 ::fidl_next::munge! {
3466 let Self {
3467 mut is_started,
3468
3469 } = slot_;
3470 }
3471
3472 let _field = is_started.as_mut();
3473
3474 ::fidl_next::Decode::decode(is_started.as_mut(), decoder_, ())?;
3475
3476 Ok(())
3477 }
3478 }
3479
3480 impl ::fidl_next::IntoNatural for ControllerIsStartedResponse {
3481 type Natural = crate::natural::ControllerIsStartedResponse;
3482 }
3483
3484 #[derive(Debug)]
3486 #[repr(C)]
3487 pub struct ControllerGetExposedDictionaryResponse {
3488 pub dictionary: ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
3489 }
3490
3491 static_assertions::const_assert_eq!(
3492 std::mem::size_of::<ControllerGetExposedDictionaryResponse>(),
3493 4
3494 );
3495 static_assertions::const_assert_eq!(
3496 std::mem::align_of::<ControllerGetExposedDictionaryResponse>(),
3497 4
3498 );
3499
3500 static_assertions::const_assert_eq!(
3501 std::mem::offset_of!(ControllerGetExposedDictionaryResponse, dictionary),
3502 0
3503 );
3504
3505 impl ::fidl_next::Constrained for ControllerGetExposedDictionaryResponse {
3506 type Constraint = ();
3507
3508 fn validate(
3509 _: ::fidl_next::Slot<'_, Self>,
3510 _: Self::Constraint,
3511 ) -> Result<(), ::fidl_next::ValidationError> {
3512 Ok(())
3513 }
3514 }
3515
3516 unsafe impl ::fidl_next::Wire for ControllerGetExposedDictionaryResponse {
3517 type Narrowed<'de> = ControllerGetExposedDictionaryResponse;
3518
3519 #[inline]
3520 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3521 ::fidl_next::munge! {
3522 let Self {
3523 dictionary,
3524
3525 } = &mut *out_;
3526 }
3527
3528 ::fidl_next::Wire::zero_padding(dictionary);
3529 }
3530 }
3531
3532 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerGetExposedDictionaryResponse
3533 where
3534 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3535 ___D: ::fidl_next::fuchsia::HandleDecoder,
3536 {
3537 fn decode(
3538 slot_: ::fidl_next::Slot<'_, Self>,
3539 decoder_: &mut ___D,
3540 _: (),
3541 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3542 ::fidl_next::munge! {
3543 let Self {
3544 mut dictionary,
3545
3546 } = slot_;
3547 }
3548
3549 let _field = dictionary.as_mut();
3550
3551 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_, ())?;
3552
3553 Ok(())
3554 }
3555 }
3556
3557 impl ::fidl_next::IntoNatural for ControllerGetExposedDictionaryResponse {
3558 type Natural = crate::natural::ControllerGetExposedDictionaryResponse;
3559 }
3560
3561 #[derive(Debug)]
3563 #[repr(C)]
3564 pub struct ControllerGetOutputDictionaryResponse {
3565 pub dictionary: ::fidl_next::wire::fuchsia::EventPair,
3566 }
3567
3568 static_assertions::const_assert_eq!(
3569 std::mem::size_of::<ControllerGetOutputDictionaryResponse>(),
3570 4
3571 );
3572 static_assertions::const_assert_eq!(
3573 std::mem::align_of::<ControllerGetOutputDictionaryResponse>(),
3574 4
3575 );
3576
3577 static_assertions::const_assert_eq!(
3578 std::mem::offset_of!(ControllerGetOutputDictionaryResponse, dictionary),
3579 0
3580 );
3581
3582 impl ::fidl_next::Constrained for ControllerGetOutputDictionaryResponse {
3583 type Constraint = ();
3584
3585 fn validate(
3586 _: ::fidl_next::Slot<'_, Self>,
3587 _: Self::Constraint,
3588 ) -> Result<(), ::fidl_next::ValidationError> {
3589 Ok(())
3590 }
3591 }
3592
3593 unsafe impl ::fidl_next::Wire for ControllerGetOutputDictionaryResponse {
3594 type Narrowed<'de> = ControllerGetOutputDictionaryResponse;
3595
3596 #[inline]
3597 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3598 ::fidl_next::munge! {
3599 let Self {
3600 dictionary,
3601
3602 } = &mut *out_;
3603 }
3604
3605 ::fidl_next::Wire::zero_padding(dictionary);
3606 }
3607 }
3608
3609 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerGetOutputDictionaryResponse
3610 where
3611 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3612 ___D: ::fidl_next::fuchsia::HandleDecoder,
3613 {
3614 fn decode(
3615 slot_: ::fidl_next::Slot<'_, Self>,
3616 decoder_: &mut ___D,
3617 _: (),
3618 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3619 ::fidl_next::munge! {
3620 let Self {
3621 mut dictionary,
3622
3623 } = slot_;
3624 }
3625
3626 let _field = dictionary.as_mut();
3627
3628 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_, ())?;
3629
3630 Ok(())
3631 }
3632 }
3633
3634 impl ::fidl_next::IntoNatural for ControllerGetOutputDictionaryResponse {
3635 type Natural = crate::natural::ControllerGetOutputDictionaryResponse;
3636 }
3637
3638 #[repr(C)]
3640 pub struct NamespaceEntry<'de> {
3641 pub(crate) table: ::fidl_next::wire::Table<'de>,
3642 }
3643
3644 impl<'de> Drop for NamespaceEntry<'de> {
3645 fn drop(&mut self) {
3646 let _ = self.table.get(1).map(|envelope| unsafe {
3647 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3648 });
3649
3650 let _ = self.table.get(2).map(|envelope| unsafe {
3651 envelope.read_unchecked::<::fidl_next::ClientEnd<
3652 ::fidl_next_fuchsia_io::Directory,
3653 ::fidl_next::wire::fuchsia::Channel,
3654 >>()
3655 });
3656 }
3657 }
3658
3659 impl ::fidl_next::Constrained for NamespaceEntry<'_> {
3660 type Constraint = ();
3661
3662 fn validate(
3663 _: ::fidl_next::Slot<'_, Self>,
3664 _: Self::Constraint,
3665 ) -> Result<(), ::fidl_next::ValidationError> {
3666 Ok(())
3667 }
3668 }
3669
3670 unsafe impl ::fidl_next::Wire for NamespaceEntry<'static> {
3671 type Narrowed<'de> = NamespaceEntry<'de>;
3672
3673 #[inline]
3674 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3675 ::fidl_next::munge!(let Self { table } = out);
3676 ::fidl_next::wire::Table::zero_padding(table);
3677 }
3678 }
3679
3680 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NamespaceEntry<'de>
3681 where
3682 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3683 ___D: ::fidl_next::fuchsia::HandleDecoder,
3684 {
3685 fn decode(
3686 slot: ::fidl_next::Slot<'_, Self>,
3687 decoder: &mut ___D,
3688 _: (),
3689 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3690 ::fidl_next::munge!(let Self { table } = slot);
3691
3692 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3693 match ordinal {
3694 0 => unsafe { ::core::hint::unreachable_unchecked() },
3695
3696 1 => {
3697 ::fidl_next::wire::Envelope::decode_as::<
3698 ___D,
3699 ::fidl_next::wire::String<'de>,
3700 >(slot.as_mut(), decoder, 4095)?;
3701
3702 let value = unsafe {
3703 slot.deref_unchecked()
3704 .deref_unchecked::<::fidl_next::wire::String<'_>>()
3705 };
3706
3707 if value.len() > 4095 {
3708 return Err(::fidl_next::DecodeError::VectorTooLong {
3709 size: value.len() as u64,
3710 limit: 4095,
3711 });
3712 }
3713
3714 Ok(())
3715 }
3716
3717 2 => {
3718 ::fidl_next::wire::Envelope::decode_as::<
3719 ___D,
3720 ::fidl_next::ClientEnd<
3721 ::fidl_next_fuchsia_io::Directory,
3722 ::fidl_next::wire::fuchsia::Channel,
3723 >,
3724 >(slot.as_mut(), decoder, ())?;
3725
3726 Ok(())
3727 }
3728
3729 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3730 }
3731 })
3732 }
3733 }
3734
3735 impl<'de> NamespaceEntry<'de> {
3736 pub fn path(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3737 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3738 }
3739
3740 pub fn take_path(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3741 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3742 }
3743
3744 pub fn directory(
3745 &self,
3746 ) -> ::core::option::Option<
3747 &::fidl_next::ClientEnd<
3748 ::fidl_next_fuchsia_io::Directory,
3749 ::fidl_next::wire::fuchsia::Channel,
3750 >,
3751 > {
3752 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3753 }
3754
3755 pub fn take_directory(
3756 &mut self,
3757 ) -> ::core::option::Option<
3758 ::fidl_next::ClientEnd<
3759 ::fidl_next_fuchsia_io::Directory,
3760 ::fidl_next::wire::fuchsia::Channel,
3761 >,
3762 > {
3763 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3764 }
3765 }
3766
3767 impl<'de> ::core::fmt::Debug for NamespaceEntry<'de> {
3768 fn fmt(
3769 &self,
3770 f: &mut ::core::fmt::Formatter<'_>,
3771 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3772 f.debug_struct("NamespaceEntry")
3773 .field("path", &self.path())
3774 .field("directory", &self.directory())
3775 .finish()
3776 }
3777 }
3778
3779 impl<'de> ::fidl_next::IntoNatural for NamespaceEntry<'de> {
3780 type Natural = crate::natural::NamespaceEntry;
3781 }
3782
3783 #[repr(C)]
3785 pub struct StartChildArgs<'de> {
3786 pub(crate) table: ::fidl_next::wire::Table<'de>,
3787 }
3788
3789 impl<'de> Drop for StartChildArgs<'de> {
3790 fn drop(&mut self) {
3791 let _ =
3792 self.table.get(1).map(|envelope| unsafe {
3793 envelope.read_unchecked::<::fidl_next::wire::Vector<
3794 'de,
3795 ::fidl_next_fuchsia_process::wire::HandleInfo,
3796 >>()
3797 });
3798
3799 let _ = self.table.get(2)
3800 .map(|envelope| unsafe {
3801 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NamespaceEntry<'de>>>()
3802 });
3803
3804 let _ = self.table.get(3)
3805 .map(|envelope| unsafe {
3806 envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
3807 });
3808
3809 let _ = self.table.get(4).map(|envelope| unsafe {
3810 envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
3811 });
3812 }
3813 }
3814
3815 impl ::fidl_next::Constrained for StartChildArgs<'_> {
3816 type Constraint = ();
3817
3818 fn validate(
3819 _: ::fidl_next::Slot<'_, Self>,
3820 _: Self::Constraint,
3821 ) -> Result<(), ::fidl_next::ValidationError> {
3822 Ok(())
3823 }
3824 }
3825
3826 unsafe impl ::fidl_next::Wire for StartChildArgs<'static> {
3827 type Narrowed<'de> = StartChildArgs<'de>;
3828
3829 #[inline]
3830 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3831 ::fidl_next::munge!(let Self { table } = out);
3832 ::fidl_next::wire::Table::zero_padding(table);
3833 }
3834 }
3835
3836 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StartChildArgs<'de>
3837 where
3838 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3839 ___D: ::fidl_next::fuchsia::HandleDecoder,
3840 {
3841 fn decode(
3842 slot: ::fidl_next::Slot<'_, Self>,
3843 decoder: &mut ___D,
3844 _: (),
3845 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3846 ::fidl_next::munge!(let Self { table } = slot);
3847
3848 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3849 match ordinal {
3850 0 => unsafe { ::core::hint::unreachable_unchecked() },
3851
3852 1 => {
3853 ::fidl_next::wire::Envelope::decode_as::<
3854 ___D,
3855 ::fidl_next::wire::Vector<
3856 'de,
3857 ::fidl_next_fuchsia_process::wire::HandleInfo,
3858 >,
3859 >(slot.as_mut(), decoder, (128, ()))?;
3860
3861 let value = unsafe {
3862 slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
3863 '_,
3864 ::fidl_next_fuchsia_process::wire::HandleInfo,
3865 >>()
3866 };
3867
3868 if value.len() > 128 {
3869 return Err(::fidl_next::DecodeError::VectorTooLong {
3870 size: value.len() as u64,
3871 limit: 128,
3872 });
3873 }
3874
3875 Ok(())
3876 }
3877
3878 2 => {
3879 ::fidl_next::wire::Envelope::decode_as::<
3880 ___D,
3881 ::fidl_next::wire::Vector<'de, crate::wire::NamespaceEntry<'de>>,
3882 >(slot.as_mut(), decoder, (32, ()))?;
3883
3884 let value = unsafe {
3885 slot
3886 .deref_unchecked()
3887 .deref_unchecked::<
3888 ::fidl_next::wire::Vector<'_, crate::wire::NamespaceEntry<'_>>
3889 >()
3890 };
3891
3892 if value.len() > 32 {
3893 return Err(::fidl_next::DecodeError::VectorTooLong {
3894 size: value.len() as u64,
3895 limit: 32,
3896 });
3897 }
3898
3899 Ok(())
3900 }
3901
3902 3 => {
3903 ::fidl_next::wire::Envelope::decode_as::<
3904 ___D,
3905 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
3906 >(slot.as_mut(), decoder, ())?;
3907
3908 Ok(())
3909 }
3910
3911 4 => {
3912 ::fidl_next::wire::Envelope::decode_as::<
3913 ___D,
3914 ::fidl_next::wire::fuchsia::EventPair,
3915 >(slot.as_mut(), decoder, ())?;
3916
3917 Ok(())
3918 }
3919
3920 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3921 }
3922 })
3923 }
3924 }
3925
3926 impl<'de> StartChildArgs<'de> {
3927 pub fn numbered_handles(
3928 &self,
3929 ) -> ::core::option::Option<
3930 &::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
3931 > {
3932 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3933 }
3934
3935 pub fn take_numbered_handles(
3936 &mut self,
3937 ) -> ::core::option::Option<
3938 ::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
3939 > {
3940 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3941 }
3942
3943 pub fn namespace_entries(
3944 &self,
3945 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NamespaceEntry<'de>>>
3946 {
3947 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3948 }
3949
3950 pub fn take_namespace_entries(
3951 &mut self,
3952 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NamespaceEntry<'de>>>
3953 {
3954 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3955 }
3956
3957 pub fn dictionary(
3958 &self,
3959 ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3960 {
3961 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3962 }
3963
3964 pub fn take_dictionary(
3965 &mut self,
3966 ) -> ::core::option::Option<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3967 {
3968 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3969 }
3970
3971 pub fn additional_inputs(
3972 &self,
3973 ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::EventPair> {
3974 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3975 }
3976
3977 pub fn take_additional_inputs(
3978 &mut self,
3979 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::EventPair> {
3980 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
3981 }
3982 }
3983
3984 impl<'de> ::core::fmt::Debug for StartChildArgs<'de> {
3985 fn fmt(
3986 &self,
3987 f: &mut ::core::fmt::Formatter<'_>,
3988 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3989 f.debug_struct("StartChildArgs")
3990 .field("numbered_handles", &self.numbered_handles())
3991 .field("namespace_entries", &self.namespace_entries())
3992 .field("dictionary", &self.dictionary())
3993 .field("additional_inputs", &self.additional_inputs())
3994 .finish()
3995 }
3996 }
3997
3998 impl<'de> ::fidl_next::IntoNatural for StartChildArgs<'de> {
3999 type Natural = crate::natural::StartChildArgs;
4000 }
4001
4002 #[derive(Debug)]
4004 #[repr(C)]
4005 pub struct ControllerStartRequest<'de> {
4006 pub args: crate::wire::StartChildArgs<'de>,
4007
4008 pub execution_controller:
4009 ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::wire::fuchsia::Channel>,
4010 }
4011
4012 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerStartRequest<'_>>(), 24);
4013 static_assertions::const_assert_eq!(std::mem::align_of::<ControllerStartRequest<'_>>(), 8);
4014
4015 static_assertions::const_assert_eq!(std::mem::offset_of!(ControllerStartRequest<'_>, args), 0);
4016
4017 static_assertions::const_assert_eq!(
4018 std::mem::offset_of!(ControllerStartRequest<'_>, execution_controller),
4019 16
4020 );
4021
4022 impl ::fidl_next::Constrained for ControllerStartRequest<'_> {
4023 type Constraint = ();
4024
4025 fn validate(
4026 _: ::fidl_next::Slot<'_, Self>,
4027 _: Self::Constraint,
4028 ) -> Result<(), ::fidl_next::ValidationError> {
4029 Ok(())
4030 }
4031 }
4032
4033 unsafe impl ::fidl_next::Wire for ControllerStartRequest<'static> {
4034 type Narrowed<'de> = ControllerStartRequest<'de>;
4035
4036 #[inline]
4037 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4038 ::fidl_next::munge! {
4039 let Self {
4040 args,
4041 execution_controller,
4042
4043 } = &mut *out_;
4044 }
4045
4046 ::fidl_next::Wire::zero_padding(args);
4047
4048 ::fidl_next::Wire::zero_padding(execution_controller);
4049
4050 unsafe {
4051 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4052 }
4053 }
4054 }
4055
4056 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ControllerStartRequest<'de>
4057 where
4058 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4059 ___D: ::fidl_next::Decoder<'de>,
4060 ___D: ::fidl_next::fuchsia::HandleDecoder,
4061 {
4062 fn decode(
4063 slot_: ::fidl_next::Slot<'_, Self>,
4064 decoder_: &mut ___D,
4065 _: (),
4066 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4067 if slot_.as_bytes()[20..24] != [0u8; 4] {
4068 return Err(::fidl_next::DecodeError::InvalidPadding);
4069 }
4070
4071 ::fidl_next::munge! {
4072 let Self {
4073 mut args,
4074 mut execution_controller,
4075
4076 } = slot_;
4077 }
4078
4079 let _field = args.as_mut();
4080
4081 ::fidl_next::Decode::decode(args.as_mut(), decoder_, ())?;
4082
4083 let _field = execution_controller.as_mut();
4084
4085 ::fidl_next::Decode::decode(execution_controller.as_mut(), decoder_, ())?;
4086
4087 Ok(())
4088 }
4089 }
4090
4091 impl<'de> ::fidl_next::IntoNatural for ControllerStartRequest<'de> {
4092 type Natural = crate::natural::ControllerStartRequest;
4093 }
4094
4095 #[derive(Debug)]
4097 #[repr(C)]
4098 pub struct ControllerOpenExposedDirRequest {
4099 pub exposed_dir: ::fidl_next::ServerEnd<
4100 ::fidl_next_fuchsia_io::Directory,
4101 ::fidl_next::wire::fuchsia::Channel,
4102 >,
4103 }
4104
4105 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerOpenExposedDirRequest>(), 4);
4106 static_assertions::const_assert_eq!(std::mem::align_of::<ControllerOpenExposedDirRequest>(), 4);
4107
4108 static_assertions::const_assert_eq!(
4109 std::mem::offset_of!(ControllerOpenExposedDirRequest, exposed_dir),
4110 0
4111 );
4112
4113 impl ::fidl_next::Constrained for ControllerOpenExposedDirRequest {
4114 type Constraint = ();
4115
4116 fn validate(
4117 _: ::fidl_next::Slot<'_, Self>,
4118 _: Self::Constraint,
4119 ) -> Result<(), ::fidl_next::ValidationError> {
4120 Ok(())
4121 }
4122 }
4123
4124 unsafe impl ::fidl_next::Wire for ControllerOpenExposedDirRequest {
4125 type Narrowed<'de> = ControllerOpenExposedDirRequest;
4126
4127 #[inline]
4128 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4129 ::fidl_next::munge! {
4130 let Self {
4131 exposed_dir,
4132
4133 } = &mut *out_;
4134 }
4135
4136 ::fidl_next::Wire::zero_padding(exposed_dir);
4137 }
4138 }
4139
4140 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerOpenExposedDirRequest
4141 where
4142 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4143 ___D: ::fidl_next::fuchsia::HandleDecoder,
4144 {
4145 fn decode(
4146 slot_: ::fidl_next::Slot<'_, Self>,
4147 decoder_: &mut ___D,
4148 _: (),
4149 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4150 ::fidl_next::munge! {
4151 let Self {
4152 mut exposed_dir,
4153
4154 } = slot_;
4155 }
4156
4157 let _field = exposed_dir.as_mut();
4158
4159 ::fidl_next::Decode::decode(exposed_dir.as_mut(), decoder_, ())?;
4160
4161 Ok(())
4162 }
4163 }
4164
4165 impl ::fidl_next::IntoNatural for ControllerOpenExposedDirRequest {
4166 type Natural = crate::natural::ControllerOpenExposedDirRequest;
4167 }
4168
4169 #[repr(C)]
4171 pub struct CreateChildArgs<'de> {
4172 pub(crate) table: ::fidl_next::wire::Table<'de>,
4173 }
4174
4175 impl<'de> Drop for CreateChildArgs<'de> {
4176 fn drop(&mut self) {
4177 let _ =
4178 self.table.get(1).map(|envelope| unsafe {
4179 envelope.read_unchecked::<::fidl_next::wire::Vector<
4180 'de,
4181 ::fidl_next_fuchsia_process::wire::HandleInfo,
4182 >>()
4183 });
4184
4185 let _ = self.table.get(2).map(|envelope| unsafe {
4186 envelope.read_unchecked::<::fidl_next::wire::Vector<
4187 'de,
4188 ::fidl_next_fuchsia_component_decl::wire::Offer<'de>,
4189 >>()
4190 });
4191
4192 let _ =
4193 self.table.get(3).map(|envelope| unsafe {
4194 envelope.read_unchecked::<::fidl_next::ServerEnd<
4195 crate::Controller,
4196 ::fidl_next::wire::fuchsia::Channel,
4197 >>()
4198 });
4199
4200 let _ = self.table.get(4)
4201 .map(|envelope| unsafe {
4202 envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
4203 });
4204
4205 let _ = self.table.get(5).map(|envelope| unsafe {
4206 envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
4207 });
4208 }
4209 }
4210
4211 impl ::fidl_next::Constrained for CreateChildArgs<'_> {
4212 type Constraint = ();
4213
4214 fn validate(
4215 _: ::fidl_next::Slot<'_, Self>,
4216 _: Self::Constraint,
4217 ) -> Result<(), ::fidl_next::ValidationError> {
4218 Ok(())
4219 }
4220 }
4221
4222 unsafe impl ::fidl_next::Wire for CreateChildArgs<'static> {
4223 type Narrowed<'de> = CreateChildArgs<'de>;
4224
4225 #[inline]
4226 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4227 ::fidl_next::munge!(let Self { table } = out);
4228 ::fidl_next::wire::Table::zero_padding(table);
4229 }
4230 }
4231
4232 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CreateChildArgs<'de>
4233 where
4234 ___D: ::fidl_next::Decoder<'de> + ?Sized,
4235 ___D: ::fidl_next::fuchsia::HandleDecoder,
4236 {
4237 fn decode(
4238 slot: ::fidl_next::Slot<'_, Self>,
4239 decoder: &mut ___D,
4240 _: (),
4241 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4242 ::fidl_next::munge!(let Self { table } = slot);
4243
4244 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4245 match ordinal {
4246 0 => unsafe { ::core::hint::unreachable_unchecked() },
4247
4248 1 => {
4249 ::fidl_next::wire::Envelope::decode_as::<
4250 ___D,
4251 ::fidl_next::wire::Vector<
4252 'de,
4253 ::fidl_next_fuchsia_process::wire::HandleInfo,
4254 >,
4255 >(slot.as_mut(), decoder, (128, ()))?;
4256
4257 let value = unsafe {
4258 slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
4259 '_,
4260 ::fidl_next_fuchsia_process::wire::HandleInfo,
4261 >>()
4262 };
4263
4264 if value.len() > 128 {
4265 return Err(::fidl_next::DecodeError::VectorTooLong {
4266 size: value.len() as u64,
4267 limit: 128,
4268 });
4269 }
4270
4271 Ok(())
4272 }
4273
4274 2 => {
4275 ::fidl_next::wire::Envelope::decode_as::<
4276 ___D,
4277 ::fidl_next::wire::Vector<
4278 'de,
4279 ::fidl_next_fuchsia_component_decl::wire::Offer<'de>,
4280 >,
4281 >(slot.as_mut(), decoder, (128, ()))?;
4282
4283 let value = unsafe {
4284 slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
4285 '_,
4286 ::fidl_next_fuchsia_component_decl::wire::Offer<'_>,
4287 >>()
4288 };
4289
4290 if value.len() > 128 {
4291 return Err(::fidl_next::DecodeError::VectorTooLong {
4292 size: value.len() as u64,
4293 limit: 128,
4294 });
4295 }
4296
4297 Ok(())
4298 }
4299
4300 3 => {
4301 ::fidl_next::wire::Envelope::decode_as::<
4302 ___D,
4303 ::fidl_next::ServerEnd<
4304 crate::Controller,
4305 ::fidl_next::wire::fuchsia::Channel,
4306 >,
4307 >(slot.as_mut(), decoder, ())?;
4308
4309 Ok(())
4310 }
4311
4312 4 => {
4313 ::fidl_next::wire::Envelope::decode_as::<
4314 ___D,
4315 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
4316 >(slot.as_mut(), decoder, ())?;
4317
4318 Ok(())
4319 }
4320
4321 5 => {
4322 ::fidl_next::wire::Envelope::decode_as::<
4323 ___D,
4324 ::fidl_next::wire::fuchsia::EventPair,
4325 >(slot.as_mut(), decoder, ())?;
4326
4327 Ok(())
4328 }
4329
4330 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
4331 }
4332 })
4333 }
4334 }
4335
4336 impl<'de> CreateChildArgs<'de> {
4337 pub fn numbered_handles(
4338 &self,
4339 ) -> ::core::option::Option<
4340 &::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
4341 > {
4342 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4343 }
4344
4345 pub fn take_numbered_handles(
4346 &mut self,
4347 ) -> ::core::option::Option<
4348 ::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
4349 > {
4350 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
4351 }
4352
4353 pub fn dynamic_offers(
4354 &self,
4355 ) -> ::core::option::Option<
4356 &::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_component_decl::wire::Offer<'de>>,
4357 > {
4358 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4359 }
4360
4361 pub fn take_dynamic_offers(
4362 &mut self,
4363 ) -> ::core::option::Option<
4364 ::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_component_decl::wire::Offer<'de>>,
4365 > {
4366 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
4367 }
4368
4369 pub fn controller(
4370 &self,
4371 ) -> ::core::option::Option<
4372 &::fidl_next::ServerEnd<crate::Controller, ::fidl_next::wire::fuchsia::Channel>,
4373 > {
4374 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
4375 }
4376
4377 pub fn take_controller(
4378 &mut self,
4379 ) -> ::core::option::Option<
4380 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::wire::fuchsia::Channel>,
4381 > {
4382 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
4383 }
4384
4385 pub fn dictionary(
4386 &self,
4387 ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
4388 {
4389 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
4390 }
4391
4392 pub fn take_dictionary(
4393 &mut self,
4394 ) -> ::core::option::Option<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
4395 {
4396 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
4397 }
4398
4399 pub fn additional_inputs(
4400 &self,
4401 ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::EventPair> {
4402 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
4403 }
4404
4405 pub fn take_additional_inputs(
4406 &mut self,
4407 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::EventPair> {
4408 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
4409 }
4410 }
4411
4412 impl<'de> ::core::fmt::Debug for CreateChildArgs<'de> {
4413 fn fmt(
4414 &self,
4415 f: &mut ::core::fmt::Formatter<'_>,
4416 ) -> ::core::result::Result<(), ::core::fmt::Error> {
4417 f.debug_struct("CreateChildArgs")
4418 .field("numbered_handles", &self.numbered_handles())
4419 .field("dynamic_offers", &self.dynamic_offers())
4420 .field("controller", &self.controller())
4421 .field("dictionary", &self.dictionary())
4422 .field("additional_inputs", &self.additional_inputs())
4423 .finish()
4424 }
4425 }
4426
4427 impl<'de> ::fidl_next::IntoNatural for CreateChildArgs<'de> {
4428 type Natural = crate::natural::CreateChildArgs;
4429 }
4430
4431 #[repr(C)]
4433 pub struct DebugStartedPayload<'de> {
4434 pub(crate) table: ::fidl_next::wire::Table<'de>,
4435 }
4436
4437 impl<'de> Drop for DebugStartedPayload<'de> {
4438 fn drop(&mut self) {
4439 let _ = self.table.get(1).map(|envelope| unsafe {
4440 envelope.read_unchecked::<::fidl_next::ClientEnd<
4441 ::fidl_next_fuchsia_io::Directory,
4442 ::fidl_next::wire::fuchsia::Channel,
4443 >>()
4444 });
4445
4446 let _ = self.table.get(2).map(|envelope| unsafe {
4447 envelope.read_unchecked::<::fidl_next::wire::fuchsia::EventPair>()
4448 });
4449 }
4450 }
4451
4452 impl ::fidl_next::Constrained for DebugStartedPayload<'_> {
4453 type Constraint = ();
4454
4455 fn validate(
4456 _: ::fidl_next::Slot<'_, Self>,
4457 _: Self::Constraint,
4458 ) -> Result<(), ::fidl_next::ValidationError> {
4459 Ok(())
4460 }
4461 }
4462
4463 unsafe impl ::fidl_next::Wire for DebugStartedPayload<'static> {
4464 type Narrowed<'de> = DebugStartedPayload<'de>;
4465
4466 #[inline]
4467 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4468 ::fidl_next::munge!(let Self { table } = out);
4469 ::fidl_next::wire::Table::zero_padding(table);
4470 }
4471 }
4472
4473 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DebugStartedPayload<'de>
4474 where
4475 ___D: ::fidl_next::Decoder<'de> + ?Sized,
4476 ___D: ::fidl_next::fuchsia::HandleDecoder,
4477 {
4478 fn decode(
4479 slot: ::fidl_next::Slot<'_, Self>,
4480 decoder: &mut ___D,
4481 _: (),
4482 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4483 ::fidl_next::munge!(let Self { table } = slot);
4484
4485 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4486 match ordinal {
4487 0 => unsafe { ::core::hint::unreachable_unchecked() },
4488
4489 1 => {
4490 ::fidl_next::wire::Envelope::decode_as::<
4491 ___D,
4492 ::fidl_next::ClientEnd<
4493 ::fidl_next_fuchsia_io::Directory,
4494 ::fidl_next::wire::fuchsia::Channel,
4495 >,
4496 >(slot.as_mut(), decoder, ())?;
4497
4498 Ok(())
4499 }
4500
4501 2 => {
4502 ::fidl_next::wire::Envelope::decode_as::<
4503 ___D,
4504 ::fidl_next::wire::fuchsia::EventPair,
4505 >(slot.as_mut(), decoder, ())?;
4506
4507 Ok(())
4508 }
4509
4510 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
4511 }
4512 })
4513 }
4514 }
4515
4516 impl<'de> DebugStartedPayload<'de> {
4517 pub fn runtime_dir(
4518 &self,
4519 ) -> ::core::option::Option<
4520 &::fidl_next::ClientEnd<
4521 ::fidl_next_fuchsia_io::Directory,
4522 ::fidl_next::wire::fuchsia::Channel,
4523 >,
4524 > {
4525 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4526 }
4527
4528 pub fn take_runtime_dir(
4529 &mut self,
4530 ) -> ::core::option::Option<
4531 ::fidl_next::ClientEnd<
4532 ::fidl_next_fuchsia_io::Directory,
4533 ::fidl_next::wire::fuchsia::Channel,
4534 >,
4535 > {
4536 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
4537 }
4538
4539 pub fn break_on_start(
4540 &self,
4541 ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::EventPair> {
4542 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4543 }
4544
4545 pub fn take_break_on_start(
4546 &mut self,
4547 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::EventPair> {
4548 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
4549 }
4550 }
4551
4552 impl<'de> ::core::fmt::Debug for DebugStartedPayload<'de> {
4553 fn fmt(
4554 &self,
4555 f: &mut ::core::fmt::Formatter<'_>,
4556 ) -> ::core::result::Result<(), ::core::fmt::Error> {
4557 f.debug_struct("DebugStartedPayload")
4558 .field("runtime_dir", &self.runtime_dir())
4559 .field("break_on_start", &self.break_on_start())
4560 .finish()
4561 }
4562 }
4563
4564 impl<'de> ::fidl_next::IntoNatural for DebugStartedPayload<'de> {
4565 type Natural = crate::natural::DebugStartedPayload;
4566 }
4567
4568 #[repr(transparent)]
4570 pub struct EventPayload<'de> {
4571 pub(crate) raw: ::fidl_next::wire::Union,
4572 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4573 }
4574
4575 impl<'de> Drop for EventPayload<'de> {
4576 fn drop(&mut self) {
4577 match self.raw.ordinal() {
4578 1 => {
4579 let _ = unsafe {
4580 self.raw
4581 .get()
4582 .read_unchecked::<crate::wire::CapabilityRequestedPayload<'de>>()
4583 };
4584 }
4585
4586 2 => {
4587 let _ = unsafe {
4588 self.raw.get().read_unchecked::<crate::wire::PurgedPayload<'de>>()
4589 };
4590 }
4591
4592 4 => {
4593 let _ = unsafe {
4594 self.raw.get().read_unchecked::<crate::wire::DiscoveredPayload<'de>>()
4595 };
4596 }
4597
4598 5 => {
4599 let _ = unsafe {
4600 self.raw.get().read_unchecked::<crate::wire::DestroyedPayload<'de>>()
4601 };
4602 }
4603
4604 6 => {
4605 let _ = unsafe {
4606 self.raw.get().read_unchecked::<crate::wire::ResolvedPayload<'de>>()
4607 };
4608 }
4609
4610 7 => {
4611 let _ = unsafe {
4612 self.raw.get().read_unchecked::<crate::wire::StartedPayload<'de>>()
4613 };
4614 }
4615
4616 8 => {
4617 let _ = unsafe {
4618 self.raw.get().read_unchecked::<crate::wire::StoppedPayload<'de>>()
4619 };
4620 }
4621
4622 9 => {
4623 let _ = unsafe {
4624 self.raw.get().read_unchecked::<crate::wire::DebugStartedPayload<'de>>()
4625 };
4626 }
4627
4628 10 => {
4629 let _ = unsafe {
4630 self.raw.get().read_unchecked::<crate::wire::UnresolvedPayload<'de>>()
4631 };
4632 }
4633
4634 _ => (),
4635 }
4636 }
4637 }
4638
4639 impl ::fidl_next::Constrained for EventPayload<'_> {
4640 type Constraint = ();
4641
4642 fn validate(
4643 _: ::fidl_next::Slot<'_, Self>,
4644 _: Self::Constraint,
4645 ) -> Result<(), ::fidl_next::ValidationError> {
4646 Ok(())
4647 }
4648 }
4649
4650 unsafe impl ::fidl_next::Wire for EventPayload<'static> {
4651 type Narrowed<'de> = EventPayload<'de>;
4652
4653 #[inline]
4654 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4655 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4656 ::fidl_next::wire::Union::zero_padding(raw);
4657 }
4658 }
4659
4660 pub mod event_payload {
4661 pub enum Ref<'de> {
4662 CapabilityRequested(&'de crate::wire::CapabilityRequestedPayload<'de>),
4663
4664 Purged(&'de crate::wire::PurgedPayload<'de>),
4665
4666 Discovered(&'de crate::wire::DiscoveredPayload<'de>),
4667
4668 Destroyed(&'de crate::wire::DestroyedPayload<'de>),
4669
4670 Resolved(&'de crate::wire::ResolvedPayload<'de>),
4671
4672 Started(&'de crate::wire::StartedPayload<'de>),
4673
4674 Stopped(&'de crate::wire::StoppedPayload<'de>),
4675
4676 DebugStarted(&'de crate::wire::DebugStartedPayload<'de>),
4677
4678 Unresolved(&'de crate::wire::UnresolvedPayload<'de>),
4679
4680 UnknownOrdinal_(u64),
4681 }
4682
4683 pub enum Value<'de> {
4684 CapabilityRequested(crate::wire::CapabilityRequestedPayload<'de>),
4685
4686 Purged(crate::wire::PurgedPayload<'de>),
4687
4688 Discovered(crate::wire::DiscoveredPayload<'de>),
4689
4690 Destroyed(crate::wire::DestroyedPayload<'de>),
4691
4692 Resolved(crate::wire::ResolvedPayload<'de>),
4693
4694 Started(crate::wire::StartedPayload<'de>),
4695
4696 Stopped(crate::wire::StoppedPayload<'de>),
4697
4698 DebugStarted(crate::wire::DebugStartedPayload<'de>),
4699
4700 Unresolved(crate::wire::UnresolvedPayload<'de>),
4701
4702 UnknownOrdinal_(u64),
4703 }
4704 }
4705
4706 impl<'de> EventPayload<'de> {
4707 pub fn as_ref(&self) -> crate::wire::event_payload::Ref<'_> {
4708 match self.raw.ordinal() {
4709 1 => crate::wire::event_payload::Ref::CapabilityRequested(unsafe {
4710 self.raw.get().deref_unchecked::<crate::wire::CapabilityRequestedPayload<'_>>()
4711 }),
4712
4713 2 => crate::wire::event_payload::Ref::Purged(unsafe {
4714 self.raw.get().deref_unchecked::<crate::wire::PurgedPayload<'_>>()
4715 }),
4716
4717 4 => crate::wire::event_payload::Ref::Discovered(unsafe {
4718 self.raw.get().deref_unchecked::<crate::wire::DiscoveredPayload<'_>>()
4719 }),
4720
4721 5 => crate::wire::event_payload::Ref::Destroyed(unsafe {
4722 self.raw.get().deref_unchecked::<crate::wire::DestroyedPayload<'_>>()
4723 }),
4724
4725 6 => crate::wire::event_payload::Ref::Resolved(unsafe {
4726 self.raw.get().deref_unchecked::<crate::wire::ResolvedPayload<'_>>()
4727 }),
4728
4729 7 => crate::wire::event_payload::Ref::Started(unsafe {
4730 self.raw.get().deref_unchecked::<crate::wire::StartedPayload<'_>>()
4731 }),
4732
4733 8 => crate::wire::event_payload::Ref::Stopped(unsafe {
4734 self.raw.get().deref_unchecked::<crate::wire::StoppedPayload<'_>>()
4735 }),
4736
4737 9 => crate::wire::event_payload::Ref::DebugStarted(unsafe {
4738 self.raw.get().deref_unchecked::<crate::wire::DebugStartedPayload<'_>>()
4739 }),
4740
4741 10 => crate::wire::event_payload::Ref::Unresolved(unsafe {
4742 self.raw.get().deref_unchecked::<crate::wire::UnresolvedPayload<'_>>()
4743 }),
4744
4745 unknown => crate::wire::event_payload::Ref::UnknownOrdinal_(unknown),
4746 }
4747 }
4748
4749 pub fn into_inner(self) -> crate::wire::event_payload::Value<'de> {
4750 let this = ::core::mem::ManuallyDrop::new(self);
4751
4752 match this.raw.ordinal() {
4753 1 => crate::wire::event_payload::Value::CapabilityRequested(unsafe {
4754 this.raw.get().read_unchecked::<crate::wire::CapabilityRequestedPayload<'de>>()
4755 }),
4756
4757 2 => crate::wire::event_payload::Value::Purged(unsafe {
4758 this.raw.get().read_unchecked::<crate::wire::PurgedPayload<'de>>()
4759 }),
4760
4761 4 => crate::wire::event_payload::Value::Discovered(unsafe {
4762 this.raw.get().read_unchecked::<crate::wire::DiscoveredPayload<'de>>()
4763 }),
4764
4765 5 => crate::wire::event_payload::Value::Destroyed(unsafe {
4766 this.raw.get().read_unchecked::<crate::wire::DestroyedPayload<'de>>()
4767 }),
4768
4769 6 => crate::wire::event_payload::Value::Resolved(unsafe {
4770 this.raw.get().read_unchecked::<crate::wire::ResolvedPayload<'de>>()
4771 }),
4772
4773 7 => crate::wire::event_payload::Value::Started(unsafe {
4774 this.raw.get().read_unchecked::<crate::wire::StartedPayload<'de>>()
4775 }),
4776
4777 8 => crate::wire::event_payload::Value::Stopped(unsafe {
4778 this.raw.get().read_unchecked::<crate::wire::StoppedPayload<'de>>()
4779 }),
4780
4781 9 => crate::wire::event_payload::Value::DebugStarted(unsafe {
4782 this.raw.get().read_unchecked::<crate::wire::DebugStartedPayload<'de>>()
4783 }),
4784
4785 10 => crate::wire::event_payload::Value::Unresolved(unsafe {
4786 this.raw.get().read_unchecked::<crate::wire::UnresolvedPayload<'de>>()
4787 }),
4788
4789 unknown => crate::wire::event_payload::Value::UnknownOrdinal_(unknown),
4790 }
4791 }
4792 }
4793
4794 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EventPayload<'de>
4795 where
4796 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4797 ___D: ::fidl_next::Decoder<'de>,
4798 ___D: ::fidl_next::fuchsia::HandleDecoder,
4799 {
4800 fn decode(
4801 mut slot: ::fidl_next::Slot<'_, Self>,
4802 decoder: &mut ___D,
4803 _: (),
4804 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4805 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4806 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4807 1 => ::fidl_next::wire::Union::decode_as::<
4808 ___D,
4809 crate::wire::CapabilityRequestedPayload<'de>,
4810 >(raw, decoder, ())?,
4811
4812 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::PurgedPayload<'de>>(
4813 raw,
4814 decoder,
4815 (),
4816 )?,
4817
4818 4 => ::fidl_next::wire::Union::decode_as::<
4819 ___D,
4820 crate::wire::DiscoveredPayload<'de>,
4821 >(raw, decoder, ())?,
4822
4823 5 => {
4824 ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DestroyedPayload<'de>>(
4825 raw,
4826 decoder,
4827 (),
4828 )?
4829 }
4830
4831 6 => {
4832 ::fidl_next::wire::Union::decode_as::<___D, crate::wire::ResolvedPayload<'de>>(
4833 raw,
4834 decoder,
4835 (),
4836 )?
4837 }
4838
4839 7 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::StartedPayload<'de>>(
4840 raw,
4841 decoder,
4842 (),
4843 )?,
4844
4845 8 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::StoppedPayload<'de>>(
4846 raw,
4847 decoder,
4848 (),
4849 )?,
4850
4851 9 => ::fidl_next::wire::Union::decode_as::<
4852 ___D,
4853 crate::wire::DebugStartedPayload<'de>,
4854 >(raw, decoder, ())?,
4855
4856 10 => ::fidl_next::wire::Union::decode_as::<
4857 ___D,
4858 crate::wire::UnresolvedPayload<'de>,
4859 >(raw, decoder, ())?,
4860
4861 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4862 }
4863
4864 Ok(())
4865 }
4866 }
4867
4868 impl<'de> ::core::fmt::Debug for EventPayload<'de> {
4869 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4870 match self.raw.ordinal() {
4871 1 => unsafe {
4872 self.raw
4873 .get()
4874 .deref_unchecked::<crate::wire::CapabilityRequestedPayload<'_>>()
4875 .fmt(f)
4876 },
4877 2 => unsafe {
4878 self.raw.get().deref_unchecked::<crate::wire::PurgedPayload<'_>>().fmt(f)
4879 },
4880 4 => unsafe {
4881 self.raw.get().deref_unchecked::<crate::wire::DiscoveredPayload<'_>>().fmt(f)
4882 },
4883 5 => unsafe {
4884 self.raw.get().deref_unchecked::<crate::wire::DestroyedPayload<'_>>().fmt(f)
4885 },
4886 6 => unsafe {
4887 self.raw.get().deref_unchecked::<crate::wire::ResolvedPayload<'_>>().fmt(f)
4888 },
4889 7 => unsafe {
4890 self.raw.get().deref_unchecked::<crate::wire::StartedPayload<'_>>().fmt(f)
4891 },
4892 8 => unsafe {
4893 self.raw.get().deref_unchecked::<crate::wire::StoppedPayload<'_>>().fmt(f)
4894 },
4895 9 => unsafe {
4896 self.raw.get().deref_unchecked::<crate::wire::DebugStartedPayload<'_>>().fmt(f)
4897 },
4898 10 => unsafe {
4899 self.raw.get().deref_unchecked::<crate::wire::UnresolvedPayload<'_>>().fmt(f)
4900 },
4901 _ => unsafe { ::core::hint::unreachable_unchecked() },
4902 }
4903 }
4904 }
4905
4906 impl<'de> ::fidl_next::IntoNatural for EventPayload<'de> {
4907 type Natural = crate::natural::EventPayload;
4908 }
4909
4910 #[repr(C)]
4912 pub struct Event<'de> {
4913 pub(crate) table: ::fidl_next::wire::Table<'de>,
4914 }
4915
4916 impl<'de> Drop for Event<'de> {
4917 fn drop(&mut self) {
4918 let _ = self.table.get(1).map(|envelope| unsafe {
4919 envelope.read_unchecked::<crate::wire::EventHeader<'de>>()
4920 });
4921
4922 let _ = self.table.get(2).map(|envelope| unsafe {
4923 envelope.read_unchecked::<crate::wire::EventPayload<'de>>()
4924 });
4925 }
4926 }
4927
4928 impl ::fidl_next::Constrained for Event<'_> {
4929 type Constraint = ();
4930
4931 fn validate(
4932 _: ::fidl_next::Slot<'_, Self>,
4933 _: Self::Constraint,
4934 ) -> Result<(), ::fidl_next::ValidationError> {
4935 Ok(())
4936 }
4937 }
4938
4939 unsafe impl ::fidl_next::Wire for Event<'static> {
4940 type Narrowed<'de> = Event<'de>;
4941
4942 #[inline]
4943 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4944 ::fidl_next::munge!(let Self { table } = out);
4945 ::fidl_next::wire::Table::zero_padding(table);
4946 }
4947 }
4948
4949 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Event<'de>
4950 where
4951 ___D: ::fidl_next::Decoder<'de> + ?Sized,
4952 ___D: ::fidl_next::fuchsia::HandleDecoder,
4953 {
4954 fn decode(
4955 slot: ::fidl_next::Slot<'_, Self>,
4956 decoder: &mut ___D,
4957 _: (),
4958 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4959 ::fidl_next::munge!(let Self { table } = slot);
4960
4961 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4962 match ordinal {
4963 0 => unsafe { ::core::hint::unreachable_unchecked() },
4964
4965 1 => {
4966 ::fidl_next::wire::Envelope::decode_as::<
4967 ___D,
4968 crate::wire::EventHeader<'de>,
4969 >(slot.as_mut(), decoder, ())?;
4970
4971 Ok(())
4972 }
4973
4974 2 => {
4975 ::fidl_next::wire::Envelope::decode_as::<
4976 ___D,
4977 crate::wire::EventPayload<'de>,
4978 >(slot.as_mut(), decoder, ())?;
4979
4980 Ok(())
4981 }
4982
4983 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
4984 }
4985 })
4986 }
4987 }
4988
4989 impl<'de> Event<'de> {
4990 pub fn header(&self) -> ::core::option::Option<&crate::wire::EventHeader<'de>> {
4991 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4992 }
4993
4994 pub fn take_header(&mut self) -> ::core::option::Option<crate::wire::EventHeader<'de>> {
4995 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
4996 }
4997
4998 pub fn payload(&self) -> ::core::option::Option<&crate::wire::EventPayload<'de>> {
4999 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5000 }
5001
5002 pub fn take_payload(&mut self) -> ::core::option::Option<crate::wire::EventPayload<'de>> {
5003 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
5004 }
5005 }
5006
5007 impl<'de> ::core::fmt::Debug for Event<'de> {
5008 fn fmt(
5009 &self,
5010 f: &mut ::core::fmt::Formatter<'_>,
5011 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5012 f.debug_struct("Event")
5013 .field("header", &self.header())
5014 .field("payload", &self.payload())
5015 .finish()
5016 }
5017 }
5018
5019 impl<'de> ::fidl_next::IntoNatural for Event<'de> {
5020 type Natural = crate::natural::Event;
5021 }
5022
5023 #[derive(Debug)]
5025 #[repr(C)]
5026 pub struct EventStreamGetNextResponse<'de> {
5027 pub events: ::fidl_next::wire::Vector<'de, crate::wire::Event<'de>>,
5028 }
5029
5030 static_assertions::const_assert_eq!(std::mem::size_of::<EventStreamGetNextResponse<'_>>(), 16);
5031 static_assertions::const_assert_eq!(std::mem::align_of::<EventStreamGetNextResponse<'_>>(), 8);
5032
5033 static_assertions::const_assert_eq!(
5034 std::mem::offset_of!(EventStreamGetNextResponse<'_>, events),
5035 0
5036 );
5037
5038 impl ::fidl_next::Constrained for EventStreamGetNextResponse<'_> {
5039 type Constraint = ();
5040
5041 fn validate(
5042 _: ::fidl_next::Slot<'_, Self>,
5043 _: Self::Constraint,
5044 ) -> Result<(), ::fidl_next::ValidationError> {
5045 Ok(())
5046 }
5047 }
5048
5049 unsafe impl ::fidl_next::Wire for EventStreamGetNextResponse<'static> {
5050 type Narrowed<'de> = EventStreamGetNextResponse<'de>;
5051
5052 #[inline]
5053 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5054 ::fidl_next::munge! {
5055 let Self {
5056 events,
5057
5058 } = &mut *out_;
5059 }
5060
5061 ::fidl_next::Wire::zero_padding(events);
5062 }
5063 }
5064
5065 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EventStreamGetNextResponse<'de>
5066 where
5067 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5068 ___D: ::fidl_next::Decoder<'de>,
5069 ___D: ::fidl_next::fuchsia::HandleDecoder,
5070 {
5071 fn decode(
5072 slot_: ::fidl_next::Slot<'_, Self>,
5073 decoder_: &mut ___D,
5074 _: (),
5075 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5076 ::fidl_next::munge! {
5077 let Self {
5078 mut events,
5079
5080 } = slot_;
5081 }
5082
5083 let _field = events.as_mut();
5084 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
5085 ::fidl_next::Decode::decode(events.as_mut(), decoder_, (4294967295, ()))?;
5086
5087 Ok(())
5088 }
5089 }
5090
5091 impl<'de> ::fidl_next::IntoNatural for EventStreamGetNextResponse<'de> {
5092 type Natural = crate::natural::EventStreamGetNextResponse;
5093 }
5094
5095 #[derive(Debug)]
5097 #[repr(C)]
5098 pub struct IntrospectorGetMonikerRequest {
5099 pub component_instance: ::fidl_next::wire::fuchsia::Event,
5100 }
5101
5102 static_assertions::const_assert_eq!(std::mem::size_of::<IntrospectorGetMonikerRequest>(), 4);
5103 static_assertions::const_assert_eq!(std::mem::align_of::<IntrospectorGetMonikerRequest>(), 4);
5104
5105 static_assertions::const_assert_eq!(
5106 std::mem::offset_of!(IntrospectorGetMonikerRequest, component_instance),
5107 0
5108 );
5109
5110 impl ::fidl_next::Constrained for IntrospectorGetMonikerRequest {
5111 type Constraint = ();
5112
5113 fn validate(
5114 _: ::fidl_next::Slot<'_, Self>,
5115 _: Self::Constraint,
5116 ) -> Result<(), ::fidl_next::ValidationError> {
5117 Ok(())
5118 }
5119 }
5120
5121 unsafe impl ::fidl_next::Wire for IntrospectorGetMonikerRequest {
5122 type Narrowed<'de> = IntrospectorGetMonikerRequest;
5123
5124 #[inline]
5125 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5126 ::fidl_next::munge! {
5127 let Self {
5128 component_instance,
5129
5130 } = &mut *out_;
5131 }
5132
5133 ::fidl_next::Wire::zero_padding(component_instance);
5134 }
5135 }
5136
5137 unsafe impl<___D> ::fidl_next::Decode<___D> for IntrospectorGetMonikerRequest
5138 where
5139 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5140 ___D: ::fidl_next::fuchsia::HandleDecoder,
5141 {
5142 fn decode(
5143 slot_: ::fidl_next::Slot<'_, Self>,
5144 decoder_: &mut ___D,
5145 _: (),
5146 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5147 ::fidl_next::munge! {
5148 let Self {
5149 mut component_instance,
5150
5151 } = slot_;
5152 }
5153
5154 let _field = component_instance.as_mut();
5155
5156 ::fidl_next::Decode::decode(component_instance.as_mut(), decoder_, ())?;
5157
5158 Ok(())
5159 }
5160 }
5161
5162 impl ::fidl_next::IntoNatural for IntrospectorGetMonikerRequest {
5163 type Natural = crate::natural::IntrospectorGetMonikerRequest;
5164 }
5165
5166 #[derive(Debug)]
5168 #[repr(C)]
5169 pub struct NamespaceInputEntry<'de> {
5170 pub path: ::fidl_next::wire::String<'de>,
5171
5172 pub dictionary: ::fidl_next::ClientEnd<
5173 ::fidl_next_fuchsia_component_sandbox::Dictionary,
5174 ::fidl_next::wire::fuchsia::Channel,
5175 >,
5176 }
5177
5178 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceInputEntry<'_>>(), 24);
5179 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceInputEntry<'_>>(), 8);
5180
5181 static_assertions::const_assert_eq!(std::mem::offset_of!(NamespaceInputEntry<'_>, path), 0);
5182
5183 static_assertions::const_assert_eq!(
5184 std::mem::offset_of!(NamespaceInputEntry<'_>, dictionary),
5185 16
5186 );
5187
5188 impl ::fidl_next::Constrained for NamespaceInputEntry<'_> {
5189 type Constraint = ();
5190
5191 fn validate(
5192 _: ::fidl_next::Slot<'_, Self>,
5193 _: Self::Constraint,
5194 ) -> Result<(), ::fidl_next::ValidationError> {
5195 Ok(())
5196 }
5197 }
5198
5199 unsafe impl ::fidl_next::Wire for NamespaceInputEntry<'static> {
5200 type Narrowed<'de> = NamespaceInputEntry<'de>;
5201
5202 #[inline]
5203 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5204 ::fidl_next::munge! {
5205 let Self {
5206 path,
5207 dictionary,
5208
5209 } = &mut *out_;
5210 }
5211
5212 ::fidl_next::Wire::zero_padding(path);
5213
5214 ::fidl_next::Wire::zero_padding(dictionary);
5215
5216 unsafe {
5217 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
5218 }
5219 }
5220 }
5221
5222 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NamespaceInputEntry<'de>
5223 where
5224 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5225 ___D: ::fidl_next::Decoder<'de>,
5226 ___D: ::fidl_next::fuchsia::HandleDecoder,
5227 {
5228 fn decode(
5229 slot_: ::fidl_next::Slot<'_, Self>,
5230 decoder_: &mut ___D,
5231 _: (),
5232 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5233 if slot_.as_bytes()[20..24] != [0u8; 4] {
5234 return Err(::fidl_next::DecodeError::InvalidPadding);
5235 }
5236
5237 ::fidl_next::munge! {
5238 let Self {
5239 mut path,
5240 mut dictionary,
5241
5242 } = slot_;
5243 }
5244
5245 let _field = path.as_mut();
5246 ::fidl_next::Constrained::validate(_field, 4095)?;
5247 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
5248
5249 let path = unsafe { path.deref_unchecked() };
5250
5251 if path.len() > 4095 {
5252 return Err(::fidl_next::DecodeError::VectorTooLong {
5253 size: path.len() as u64,
5254 limit: 4095,
5255 });
5256 }
5257
5258 let _field = dictionary.as_mut();
5259
5260 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_, ())?;
5261
5262 Ok(())
5263 }
5264 }
5265
5266 impl<'de> ::fidl_next::IntoNatural for NamespaceInputEntry<'de> {
5267 type Natural = crate::natural::NamespaceInputEntry;
5268 }
5269
5270 #[derive(Debug)]
5272 #[repr(C)]
5273 pub struct NamespaceCreateRequest<'de> {
5274 pub entries: ::fidl_next::wire::Vector<'de, crate::wire::NamespaceInputEntry<'de>>,
5275 }
5276
5277 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceCreateRequest<'_>>(), 16);
5278 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceCreateRequest<'_>>(), 8);
5279
5280 static_assertions::const_assert_eq!(
5281 std::mem::offset_of!(NamespaceCreateRequest<'_>, entries),
5282 0
5283 );
5284
5285 impl ::fidl_next::Constrained for NamespaceCreateRequest<'_> {
5286 type Constraint = ();
5287
5288 fn validate(
5289 _: ::fidl_next::Slot<'_, Self>,
5290 _: Self::Constraint,
5291 ) -> Result<(), ::fidl_next::ValidationError> {
5292 Ok(())
5293 }
5294 }
5295
5296 unsafe impl ::fidl_next::Wire for NamespaceCreateRequest<'static> {
5297 type Narrowed<'de> = NamespaceCreateRequest<'de>;
5298
5299 #[inline]
5300 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5301 ::fidl_next::munge! {
5302 let Self {
5303 entries,
5304
5305 } = &mut *out_;
5306 }
5307
5308 ::fidl_next::Wire::zero_padding(entries);
5309 }
5310 }
5311
5312 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NamespaceCreateRequest<'de>
5313 where
5314 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5315 ___D: ::fidl_next::Decoder<'de>,
5316 ___D: ::fidl_next::fuchsia::HandleDecoder,
5317 {
5318 fn decode(
5319 slot_: ::fidl_next::Slot<'_, Self>,
5320 decoder_: &mut ___D,
5321 _: (),
5322 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5323 ::fidl_next::munge! {
5324 let Self {
5325 mut entries,
5326
5327 } = slot_;
5328 }
5329
5330 let _field = entries.as_mut();
5331 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
5332 ::fidl_next::Decode::decode(entries.as_mut(), decoder_, (4294967295, ()))?;
5333
5334 Ok(())
5335 }
5336 }
5337
5338 impl<'de> ::fidl_next::IntoNatural for NamespaceCreateRequest<'de> {
5339 type Natural = crate::natural::NamespaceCreateRequest;
5340 }
5341
5342 #[derive(Debug)]
5344 #[repr(C)]
5345 pub struct NamespaceInputEntry2<'de> {
5346 pub path: ::fidl_next::wire::String<'de>,
5347
5348 pub capability: ::fidl_next::wire::fuchsia::EventPair,
5349 }
5350
5351 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceInputEntry2<'_>>(), 24);
5352 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceInputEntry2<'_>>(), 8);
5353
5354 static_assertions::const_assert_eq!(std::mem::offset_of!(NamespaceInputEntry2<'_>, path), 0);
5355
5356 static_assertions::const_assert_eq!(
5357 std::mem::offset_of!(NamespaceInputEntry2<'_>, capability),
5358 16
5359 );
5360
5361 impl ::fidl_next::Constrained for NamespaceInputEntry2<'_> {
5362 type Constraint = ();
5363
5364 fn validate(
5365 _: ::fidl_next::Slot<'_, Self>,
5366 _: Self::Constraint,
5367 ) -> Result<(), ::fidl_next::ValidationError> {
5368 Ok(())
5369 }
5370 }
5371
5372 unsafe impl ::fidl_next::Wire for NamespaceInputEntry2<'static> {
5373 type Narrowed<'de> = NamespaceInputEntry2<'de>;
5374
5375 #[inline]
5376 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5377 ::fidl_next::munge! {
5378 let Self {
5379 path,
5380 capability,
5381
5382 } = &mut *out_;
5383 }
5384
5385 ::fidl_next::Wire::zero_padding(path);
5386
5387 ::fidl_next::Wire::zero_padding(capability);
5388
5389 unsafe {
5390 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
5391 }
5392 }
5393 }
5394
5395 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NamespaceInputEntry2<'de>
5396 where
5397 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5398 ___D: ::fidl_next::Decoder<'de>,
5399 ___D: ::fidl_next::fuchsia::HandleDecoder,
5400 {
5401 fn decode(
5402 slot_: ::fidl_next::Slot<'_, Self>,
5403 decoder_: &mut ___D,
5404 _: (),
5405 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5406 if slot_.as_bytes()[20..24] != [0u8; 4] {
5407 return Err(::fidl_next::DecodeError::InvalidPadding);
5408 }
5409
5410 ::fidl_next::munge! {
5411 let Self {
5412 mut path,
5413 mut capability,
5414
5415 } = slot_;
5416 }
5417
5418 let _field = path.as_mut();
5419 ::fidl_next::Constrained::validate(_field, 4095)?;
5420 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
5421
5422 let path = unsafe { path.deref_unchecked() };
5423
5424 if path.len() > 4095 {
5425 return Err(::fidl_next::DecodeError::VectorTooLong {
5426 size: path.len() as u64,
5427 limit: 4095,
5428 });
5429 }
5430
5431 let _field = capability.as_mut();
5432
5433 ::fidl_next::Decode::decode(capability.as_mut(), decoder_, ())?;
5434
5435 Ok(())
5436 }
5437 }
5438
5439 impl<'de> ::fidl_next::IntoNatural for NamespaceInputEntry2<'de> {
5440 type Natural = crate::natural::NamespaceInputEntry2;
5441 }
5442
5443 #[derive(Debug)]
5445 #[repr(C)]
5446 pub struct NamespaceCreate2Request<'de> {
5447 pub entries: ::fidl_next::wire::Vector<'de, crate::wire::NamespaceInputEntry2<'de>>,
5448 }
5449
5450 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceCreate2Request<'_>>(), 16);
5451 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceCreate2Request<'_>>(), 8);
5452
5453 static_assertions::const_assert_eq!(
5454 std::mem::offset_of!(NamespaceCreate2Request<'_>, entries),
5455 0
5456 );
5457
5458 impl ::fidl_next::Constrained for NamespaceCreate2Request<'_> {
5459 type Constraint = ();
5460
5461 fn validate(
5462 _: ::fidl_next::Slot<'_, Self>,
5463 _: Self::Constraint,
5464 ) -> Result<(), ::fidl_next::ValidationError> {
5465 Ok(())
5466 }
5467 }
5468
5469 unsafe impl ::fidl_next::Wire for NamespaceCreate2Request<'static> {
5470 type Narrowed<'de> = NamespaceCreate2Request<'de>;
5471
5472 #[inline]
5473 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5474 ::fidl_next::munge! {
5475 let Self {
5476 entries,
5477
5478 } = &mut *out_;
5479 }
5480
5481 ::fidl_next::Wire::zero_padding(entries);
5482 }
5483 }
5484
5485 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NamespaceCreate2Request<'de>
5486 where
5487 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5488 ___D: ::fidl_next::Decoder<'de>,
5489 ___D: ::fidl_next::fuchsia::HandleDecoder,
5490 {
5491 fn decode(
5492 slot_: ::fidl_next::Slot<'_, Self>,
5493 decoder_: &mut ___D,
5494 _: (),
5495 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5496 ::fidl_next::munge! {
5497 let Self {
5498 mut entries,
5499
5500 } = slot_;
5501 }
5502
5503 let _field = entries.as_mut();
5504 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
5505 ::fidl_next::Decode::decode(entries.as_mut(), decoder_, (4294967295, ()))?;
5506
5507 Ok(())
5508 }
5509 }
5510
5511 impl<'de> ::fidl_next::IntoNatural for NamespaceCreate2Request<'de> {
5512 type Natural = crate::natural::NamespaceCreate2Request;
5513 }
5514
5515 #[derive(Debug)]
5517 #[repr(C)]
5518 pub struct NamespaceCreateResponse<'de> {
5519 pub entries: ::fidl_next::wire::Vector<'de, crate::wire::NamespaceEntry<'de>>,
5520 }
5521
5522 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceCreateResponse<'_>>(), 16);
5523 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceCreateResponse<'_>>(), 8);
5524
5525 static_assertions::const_assert_eq!(
5526 std::mem::offset_of!(NamespaceCreateResponse<'_>, entries),
5527 0
5528 );
5529
5530 impl ::fidl_next::Constrained for NamespaceCreateResponse<'_> {
5531 type Constraint = ();
5532
5533 fn validate(
5534 _: ::fidl_next::Slot<'_, Self>,
5535 _: Self::Constraint,
5536 ) -> Result<(), ::fidl_next::ValidationError> {
5537 Ok(())
5538 }
5539 }
5540
5541 unsafe impl ::fidl_next::Wire for NamespaceCreateResponse<'static> {
5542 type Narrowed<'de> = NamespaceCreateResponse<'de>;
5543
5544 #[inline]
5545 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5546 ::fidl_next::munge! {
5547 let Self {
5548 entries,
5549
5550 } = &mut *out_;
5551 }
5552
5553 ::fidl_next::Wire::zero_padding(entries);
5554 }
5555 }
5556
5557 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NamespaceCreateResponse<'de>
5558 where
5559 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5560 ___D: ::fidl_next::Decoder<'de>,
5561 ___D: ::fidl_next::fuchsia::HandleDecoder,
5562 {
5563 fn decode(
5564 slot_: ::fidl_next::Slot<'_, Self>,
5565 decoder_: &mut ___D,
5566 _: (),
5567 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5568 ::fidl_next::munge! {
5569 let Self {
5570 mut entries,
5571
5572 } = slot_;
5573 }
5574
5575 let _field = entries.as_mut();
5576 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
5577 ::fidl_next::Decode::decode(entries.as_mut(), decoder_, (4294967295, ()))?;
5578
5579 Ok(())
5580 }
5581 }
5582
5583 impl<'de> ::fidl_next::IntoNatural for NamespaceCreateResponse<'de> {
5584 type Natural = crate::natural::NamespaceCreateResponse;
5585 }
5586
5587 #[derive(Debug)]
5589 #[repr(C)]
5590 pub struct NamespaceCreate2Response<'de> {
5591 pub entries: ::fidl_next::wire::Vector<'de, crate::wire::NamespaceEntry<'de>>,
5592 }
5593
5594 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceCreate2Response<'_>>(), 16);
5595 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceCreate2Response<'_>>(), 8);
5596
5597 static_assertions::const_assert_eq!(
5598 std::mem::offset_of!(NamespaceCreate2Response<'_>, entries),
5599 0
5600 );
5601
5602 impl ::fidl_next::Constrained for NamespaceCreate2Response<'_> {
5603 type Constraint = ();
5604
5605 fn validate(
5606 _: ::fidl_next::Slot<'_, Self>,
5607 _: Self::Constraint,
5608 ) -> Result<(), ::fidl_next::ValidationError> {
5609 Ok(())
5610 }
5611 }
5612
5613 unsafe impl ::fidl_next::Wire for NamespaceCreate2Response<'static> {
5614 type Narrowed<'de> = NamespaceCreate2Response<'de>;
5615
5616 #[inline]
5617 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5618 ::fidl_next::munge! {
5619 let Self {
5620 entries,
5621
5622 } = &mut *out_;
5623 }
5624
5625 ::fidl_next::Wire::zero_padding(entries);
5626 }
5627 }
5628
5629 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NamespaceCreate2Response<'de>
5630 where
5631 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5632 ___D: ::fidl_next::Decoder<'de>,
5633 ___D: ::fidl_next::fuchsia::HandleDecoder,
5634 {
5635 fn decode(
5636 slot_: ::fidl_next::Slot<'_, Self>,
5637 decoder_: &mut ___D,
5638 _: (),
5639 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5640 ::fidl_next::munge! {
5641 let Self {
5642 mut entries,
5643
5644 } = slot_;
5645 }
5646
5647 let _field = entries.as_mut();
5648 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
5649 ::fidl_next::Decode::decode(entries.as_mut(), decoder_, (4294967295, ()))?;
5650
5651 Ok(())
5652 }
5653 }
5654
5655 impl<'de> ::fidl_next::IntoNatural for NamespaceCreate2Response<'de> {
5656 type Natural = crate::natural::NamespaceCreate2Response;
5657 }
5658
5659 #[derive(Debug)]
5661 #[repr(C)]
5662 pub struct RealmListChildrenRequest<'de> {
5663 pub collection: ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'de>,
5664
5665 pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::wire::fuchsia::Channel>,
5666 }
5667
5668 static_assertions::const_assert_eq!(std::mem::size_of::<RealmListChildrenRequest<'_>>(), 24);
5669 static_assertions::const_assert_eq!(std::mem::align_of::<RealmListChildrenRequest<'_>>(), 8);
5670
5671 static_assertions::const_assert_eq!(
5672 std::mem::offset_of!(RealmListChildrenRequest<'_>, collection),
5673 0
5674 );
5675
5676 static_assertions::const_assert_eq!(
5677 std::mem::offset_of!(RealmListChildrenRequest<'_>, iter),
5678 16
5679 );
5680
5681 impl ::fidl_next::Constrained for RealmListChildrenRequest<'_> {
5682 type Constraint = ();
5683
5684 fn validate(
5685 _: ::fidl_next::Slot<'_, Self>,
5686 _: Self::Constraint,
5687 ) -> Result<(), ::fidl_next::ValidationError> {
5688 Ok(())
5689 }
5690 }
5691
5692 unsafe impl ::fidl_next::Wire for RealmListChildrenRequest<'static> {
5693 type Narrowed<'de> = RealmListChildrenRequest<'de>;
5694
5695 #[inline]
5696 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5697 ::fidl_next::munge! {
5698 let Self {
5699 collection,
5700 iter,
5701
5702 } = &mut *out_;
5703 }
5704
5705 ::fidl_next::Wire::zero_padding(collection);
5706
5707 ::fidl_next::Wire::zero_padding(iter);
5708
5709 unsafe {
5710 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
5711 }
5712 }
5713 }
5714
5715 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RealmListChildrenRequest<'de>
5716 where
5717 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5718 ___D: ::fidl_next::Decoder<'de>,
5719 ___D: ::fidl_next::fuchsia::HandleDecoder,
5720 {
5721 fn decode(
5722 slot_: ::fidl_next::Slot<'_, Self>,
5723 decoder_: &mut ___D,
5724 _: (),
5725 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5726 if slot_.as_bytes()[20..24] != [0u8; 4] {
5727 return Err(::fidl_next::DecodeError::InvalidPadding);
5728 }
5729
5730 ::fidl_next::munge! {
5731 let Self {
5732 mut collection,
5733 mut iter,
5734
5735 } = slot_;
5736 }
5737
5738 let _field = collection.as_mut();
5739
5740 ::fidl_next::Decode::decode(collection.as_mut(), decoder_, ())?;
5741
5742 let _field = iter.as_mut();
5743
5744 ::fidl_next::Decode::decode(iter.as_mut(), decoder_, ())?;
5745
5746 Ok(())
5747 }
5748 }
5749
5750 impl<'de> ::fidl_next::IntoNatural for RealmListChildrenRequest<'de> {
5751 type Natural = crate::natural::RealmListChildrenRequest;
5752 }
5753
5754 #[derive(Debug)]
5756 #[repr(C)]
5757 pub struct RealmGetChildOutputDictionaryDeprecatedRequest<'de> {
5758 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
5759 }
5760
5761 static_assertions::const_assert_eq!(
5762 std::mem::size_of::<RealmGetChildOutputDictionaryDeprecatedRequest<'_>>(),
5763 32
5764 );
5765 static_assertions::const_assert_eq!(
5766 std::mem::align_of::<RealmGetChildOutputDictionaryDeprecatedRequest<'_>>(),
5767 8
5768 );
5769
5770 static_assertions::const_assert_eq!(
5771 std::mem::offset_of!(RealmGetChildOutputDictionaryDeprecatedRequest<'_>, child),
5772 0
5773 );
5774
5775 impl ::fidl_next::Constrained for RealmGetChildOutputDictionaryDeprecatedRequest<'_> {
5776 type Constraint = ();
5777
5778 fn validate(
5779 _: ::fidl_next::Slot<'_, Self>,
5780 _: Self::Constraint,
5781 ) -> Result<(), ::fidl_next::ValidationError> {
5782 Ok(())
5783 }
5784 }
5785
5786 unsafe impl ::fidl_next::Wire for RealmGetChildOutputDictionaryDeprecatedRequest<'static> {
5787 type Narrowed<'de> = RealmGetChildOutputDictionaryDeprecatedRequest<'de>;
5788
5789 #[inline]
5790 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5791 ::fidl_next::munge! {
5792 let Self {
5793 child,
5794
5795 } = &mut *out_;
5796 }
5797
5798 ::fidl_next::Wire::zero_padding(child);
5799 }
5800 }
5801
5802 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
5803 for RealmGetChildOutputDictionaryDeprecatedRequest<'de>
5804 where
5805 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5806 ___D: ::fidl_next::Decoder<'de>,
5807 ___D: ::fidl_next::fuchsia::HandleDecoder,
5808 {
5809 fn decode(
5810 slot_: ::fidl_next::Slot<'_, Self>,
5811 decoder_: &mut ___D,
5812 _: (),
5813 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5814 ::fidl_next::munge! {
5815 let Self {
5816 mut child,
5817
5818 } = slot_;
5819 }
5820
5821 let _field = child.as_mut();
5822
5823 ::fidl_next::Decode::decode(child.as_mut(), decoder_, ())?;
5824
5825 Ok(())
5826 }
5827 }
5828
5829 impl<'de> ::fidl_next::IntoNatural for RealmGetChildOutputDictionaryDeprecatedRequest<'de> {
5830 type Natural = crate::natural::RealmGetChildOutputDictionaryDeprecatedRequest;
5831 }
5832
5833 #[derive(Debug)]
5835 #[repr(C)]
5836 pub struct RealmGetChildOutputDictionaryDeprecatedResponse {
5837 pub dictionary: ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
5838 }
5839
5840 static_assertions::const_assert_eq!(
5841 std::mem::size_of::<RealmGetChildOutputDictionaryDeprecatedResponse>(),
5842 4
5843 );
5844 static_assertions::const_assert_eq!(
5845 std::mem::align_of::<RealmGetChildOutputDictionaryDeprecatedResponse>(),
5846 4
5847 );
5848
5849 static_assertions::const_assert_eq!(
5850 std::mem::offset_of!(RealmGetChildOutputDictionaryDeprecatedResponse, dictionary),
5851 0
5852 );
5853
5854 impl ::fidl_next::Constrained for RealmGetChildOutputDictionaryDeprecatedResponse {
5855 type Constraint = ();
5856
5857 fn validate(
5858 _: ::fidl_next::Slot<'_, Self>,
5859 _: Self::Constraint,
5860 ) -> Result<(), ::fidl_next::ValidationError> {
5861 Ok(())
5862 }
5863 }
5864
5865 unsafe impl ::fidl_next::Wire for RealmGetChildOutputDictionaryDeprecatedResponse {
5866 type Narrowed<'de> = RealmGetChildOutputDictionaryDeprecatedResponse;
5867
5868 #[inline]
5869 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5870 ::fidl_next::munge! {
5871 let Self {
5872 dictionary,
5873
5874 } = &mut *out_;
5875 }
5876
5877 ::fidl_next::Wire::zero_padding(dictionary);
5878 }
5879 }
5880
5881 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmGetChildOutputDictionaryDeprecatedResponse
5882 where
5883 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5884 ___D: ::fidl_next::fuchsia::HandleDecoder,
5885 {
5886 fn decode(
5887 slot_: ::fidl_next::Slot<'_, Self>,
5888 decoder_: &mut ___D,
5889 _: (),
5890 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5891 ::fidl_next::munge! {
5892 let Self {
5893 mut dictionary,
5894
5895 } = slot_;
5896 }
5897
5898 let _field = dictionary.as_mut();
5899
5900 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_, ())?;
5901
5902 Ok(())
5903 }
5904 }
5905
5906 impl ::fidl_next::IntoNatural for RealmGetChildOutputDictionaryDeprecatedResponse {
5907 type Natural = crate::natural::RealmGetChildOutputDictionaryDeprecatedResponse;
5908 }
5909
5910 #[derive(Debug)]
5912 #[repr(C)]
5913 pub struct RealmGetChildOutputDictionaryRequest<'de> {
5914 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
5915 }
5916
5917 static_assertions::const_assert_eq!(
5918 std::mem::size_of::<RealmGetChildOutputDictionaryRequest<'_>>(),
5919 32
5920 );
5921 static_assertions::const_assert_eq!(
5922 std::mem::align_of::<RealmGetChildOutputDictionaryRequest<'_>>(),
5923 8
5924 );
5925
5926 static_assertions::const_assert_eq!(
5927 std::mem::offset_of!(RealmGetChildOutputDictionaryRequest<'_>, child),
5928 0
5929 );
5930
5931 impl ::fidl_next::Constrained for RealmGetChildOutputDictionaryRequest<'_> {
5932 type Constraint = ();
5933
5934 fn validate(
5935 _: ::fidl_next::Slot<'_, Self>,
5936 _: Self::Constraint,
5937 ) -> Result<(), ::fidl_next::ValidationError> {
5938 Ok(())
5939 }
5940 }
5941
5942 unsafe impl ::fidl_next::Wire for RealmGetChildOutputDictionaryRequest<'static> {
5943 type Narrowed<'de> = RealmGetChildOutputDictionaryRequest<'de>;
5944
5945 #[inline]
5946 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5947 ::fidl_next::munge! {
5948 let Self {
5949 child,
5950
5951 } = &mut *out_;
5952 }
5953
5954 ::fidl_next::Wire::zero_padding(child);
5955 }
5956 }
5957
5958 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RealmGetChildOutputDictionaryRequest<'de>
5959 where
5960 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5961 ___D: ::fidl_next::Decoder<'de>,
5962 ___D: ::fidl_next::fuchsia::HandleDecoder,
5963 {
5964 fn decode(
5965 slot_: ::fidl_next::Slot<'_, Self>,
5966 decoder_: &mut ___D,
5967 _: (),
5968 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5969 ::fidl_next::munge! {
5970 let Self {
5971 mut child,
5972
5973 } = slot_;
5974 }
5975
5976 let _field = child.as_mut();
5977
5978 ::fidl_next::Decode::decode(child.as_mut(), decoder_, ())?;
5979
5980 Ok(())
5981 }
5982 }
5983
5984 impl<'de> ::fidl_next::IntoNatural for RealmGetChildOutputDictionaryRequest<'de> {
5985 type Natural = crate::natural::RealmGetChildOutputDictionaryRequest;
5986 }
5987
5988 #[derive(Debug)]
5990 #[repr(C)]
5991 pub struct RealmGetChildOutputDictionaryResponse {
5992 pub dictionary: ::fidl_next::wire::fuchsia::EventPair,
5993 }
5994
5995 static_assertions::const_assert_eq!(
5996 std::mem::size_of::<RealmGetChildOutputDictionaryResponse>(),
5997 4
5998 );
5999 static_assertions::const_assert_eq!(
6000 std::mem::align_of::<RealmGetChildOutputDictionaryResponse>(),
6001 4
6002 );
6003
6004 static_assertions::const_assert_eq!(
6005 std::mem::offset_of!(RealmGetChildOutputDictionaryResponse, dictionary),
6006 0
6007 );
6008
6009 impl ::fidl_next::Constrained for RealmGetChildOutputDictionaryResponse {
6010 type Constraint = ();
6011
6012 fn validate(
6013 _: ::fidl_next::Slot<'_, Self>,
6014 _: Self::Constraint,
6015 ) -> Result<(), ::fidl_next::ValidationError> {
6016 Ok(())
6017 }
6018 }
6019
6020 unsafe impl ::fidl_next::Wire for RealmGetChildOutputDictionaryResponse {
6021 type Narrowed<'de> = RealmGetChildOutputDictionaryResponse;
6022
6023 #[inline]
6024 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6025 ::fidl_next::munge! {
6026 let Self {
6027 dictionary,
6028
6029 } = &mut *out_;
6030 }
6031
6032 ::fidl_next::Wire::zero_padding(dictionary);
6033 }
6034 }
6035
6036 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmGetChildOutputDictionaryResponse
6037 where
6038 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6039 ___D: ::fidl_next::fuchsia::HandleDecoder,
6040 {
6041 fn decode(
6042 slot_: ::fidl_next::Slot<'_, Self>,
6043 decoder_: &mut ___D,
6044 _: (),
6045 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6046 ::fidl_next::munge! {
6047 let Self {
6048 mut dictionary,
6049
6050 } = slot_;
6051 }
6052
6053 let _field = dictionary.as_mut();
6054
6055 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_, ())?;
6056
6057 Ok(())
6058 }
6059 }
6060
6061 impl ::fidl_next::IntoNatural for RealmGetChildOutputDictionaryResponse {
6062 type Natural = crate::natural::RealmGetChildOutputDictionaryResponse;
6063 }
6064
6065 #[derive(Debug)]
6067 #[repr(C)]
6068 pub struct RealmOpenControllerRequest<'de> {
6069 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
6070
6071 pub controller:
6072 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::wire::fuchsia::Channel>,
6073 }
6074
6075 static_assertions::const_assert_eq!(std::mem::size_of::<RealmOpenControllerRequest<'_>>(), 40);
6076 static_assertions::const_assert_eq!(std::mem::align_of::<RealmOpenControllerRequest<'_>>(), 8);
6077
6078 static_assertions::const_assert_eq!(
6079 std::mem::offset_of!(RealmOpenControllerRequest<'_>, child),
6080 0
6081 );
6082
6083 static_assertions::const_assert_eq!(
6084 std::mem::offset_of!(RealmOpenControllerRequest<'_>, controller),
6085 32
6086 );
6087
6088 impl ::fidl_next::Constrained for RealmOpenControllerRequest<'_> {
6089 type Constraint = ();
6090
6091 fn validate(
6092 _: ::fidl_next::Slot<'_, Self>,
6093 _: Self::Constraint,
6094 ) -> Result<(), ::fidl_next::ValidationError> {
6095 Ok(())
6096 }
6097 }
6098
6099 unsafe impl ::fidl_next::Wire for RealmOpenControllerRequest<'static> {
6100 type Narrowed<'de> = RealmOpenControllerRequest<'de>;
6101
6102 #[inline]
6103 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6104 ::fidl_next::munge! {
6105 let Self {
6106 child,
6107 controller,
6108
6109 } = &mut *out_;
6110 }
6111
6112 ::fidl_next::Wire::zero_padding(child);
6113
6114 ::fidl_next::Wire::zero_padding(controller);
6115
6116 unsafe {
6117 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
6118 }
6119 }
6120 }
6121
6122 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RealmOpenControllerRequest<'de>
6123 where
6124 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6125 ___D: ::fidl_next::Decoder<'de>,
6126 ___D: ::fidl_next::fuchsia::HandleDecoder,
6127 {
6128 fn decode(
6129 slot_: ::fidl_next::Slot<'_, Self>,
6130 decoder_: &mut ___D,
6131 _: (),
6132 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6133 if slot_.as_bytes()[36..40] != [0u8; 4] {
6134 return Err(::fidl_next::DecodeError::InvalidPadding);
6135 }
6136
6137 ::fidl_next::munge! {
6138 let Self {
6139 mut child,
6140 mut controller,
6141
6142 } = slot_;
6143 }
6144
6145 let _field = child.as_mut();
6146
6147 ::fidl_next::Decode::decode(child.as_mut(), decoder_, ())?;
6148
6149 let _field = controller.as_mut();
6150
6151 ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
6152
6153 Ok(())
6154 }
6155 }
6156
6157 impl<'de> ::fidl_next::IntoNatural for RealmOpenControllerRequest<'de> {
6158 type Natural = crate::natural::RealmOpenControllerRequest;
6159 }
6160
6161 #[derive(Debug)]
6163 #[repr(C)]
6164 pub struct RealmOpenExposedDirRequest<'de> {
6165 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
6166
6167 pub exposed_dir: ::fidl_next::ServerEnd<
6168 ::fidl_next_fuchsia_io::Directory,
6169 ::fidl_next::wire::fuchsia::Channel,
6170 >,
6171 }
6172
6173 static_assertions::const_assert_eq!(std::mem::size_of::<RealmOpenExposedDirRequest<'_>>(), 40);
6174 static_assertions::const_assert_eq!(std::mem::align_of::<RealmOpenExposedDirRequest<'_>>(), 8);
6175
6176 static_assertions::const_assert_eq!(
6177 std::mem::offset_of!(RealmOpenExposedDirRequest<'_>, child),
6178 0
6179 );
6180
6181 static_assertions::const_assert_eq!(
6182 std::mem::offset_of!(RealmOpenExposedDirRequest<'_>, exposed_dir),
6183 32
6184 );
6185
6186 impl ::fidl_next::Constrained for RealmOpenExposedDirRequest<'_> {
6187 type Constraint = ();
6188
6189 fn validate(
6190 _: ::fidl_next::Slot<'_, Self>,
6191 _: Self::Constraint,
6192 ) -> Result<(), ::fidl_next::ValidationError> {
6193 Ok(())
6194 }
6195 }
6196
6197 unsafe impl ::fidl_next::Wire for RealmOpenExposedDirRequest<'static> {
6198 type Narrowed<'de> = RealmOpenExposedDirRequest<'de>;
6199
6200 #[inline]
6201 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6202 ::fidl_next::munge! {
6203 let Self {
6204 child,
6205 exposed_dir,
6206
6207 } = &mut *out_;
6208 }
6209
6210 ::fidl_next::Wire::zero_padding(child);
6211
6212 ::fidl_next::Wire::zero_padding(exposed_dir);
6213
6214 unsafe {
6215 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
6216 }
6217 }
6218 }
6219
6220 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RealmOpenExposedDirRequest<'de>
6221 where
6222 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6223 ___D: ::fidl_next::Decoder<'de>,
6224 ___D: ::fidl_next::fuchsia::HandleDecoder,
6225 {
6226 fn decode(
6227 slot_: ::fidl_next::Slot<'_, Self>,
6228 decoder_: &mut ___D,
6229 _: (),
6230 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6231 if slot_.as_bytes()[36..40] != [0u8; 4] {
6232 return Err(::fidl_next::DecodeError::InvalidPadding);
6233 }
6234
6235 ::fidl_next::munge! {
6236 let Self {
6237 mut child,
6238 mut exposed_dir,
6239
6240 } = slot_;
6241 }
6242
6243 let _field = child.as_mut();
6244
6245 ::fidl_next::Decode::decode(child.as_mut(), decoder_, ())?;
6246
6247 let _field = exposed_dir.as_mut();
6248
6249 ::fidl_next::Decode::decode(exposed_dir.as_mut(), decoder_, ())?;
6250
6251 Ok(())
6252 }
6253 }
6254
6255 impl<'de> ::fidl_next::IntoNatural for RealmOpenExposedDirRequest<'de> {
6256 type Natural = crate::natural::RealmOpenExposedDirRequest;
6257 }
6258
6259 #[derive(Debug)]
6261 #[repr(C)]
6262 pub struct RealmCreateChildRequest<'de> {
6263 pub collection: ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'de>,
6264
6265 pub decl: ::fidl_next_fuchsia_component_decl::wire::Child<'de>,
6266
6267 pub args: crate::wire::CreateChildArgs<'de>,
6268 }
6269
6270 static_assertions::const_assert_eq!(std::mem::size_of::<RealmCreateChildRequest<'_>>(), 48);
6271 static_assertions::const_assert_eq!(std::mem::align_of::<RealmCreateChildRequest<'_>>(), 8);
6272
6273 static_assertions::const_assert_eq!(
6274 std::mem::offset_of!(RealmCreateChildRequest<'_>, collection),
6275 0
6276 );
6277
6278 static_assertions::const_assert_eq!(
6279 std::mem::offset_of!(RealmCreateChildRequest<'_>, decl),
6280 16
6281 );
6282
6283 static_assertions::const_assert_eq!(
6284 std::mem::offset_of!(RealmCreateChildRequest<'_>, args),
6285 32
6286 );
6287
6288 impl ::fidl_next::Constrained for RealmCreateChildRequest<'_> {
6289 type Constraint = ();
6290
6291 fn validate(
6292 _: ::fidl_next::Slot<'_, Self>,
6293 _: Self::Constraint,
6294 ) -> Result<(), ::fidl_next::ValidationError> {
6295 Ok(())
6296 }
6297 }
6298
6299 unsafe impl ::fidl_next::Wire for RealmCreateChildRequest<'static> {
6300 type Narrowed<'de> = RealmCreateChildRequest<'de>;
6301
6302 #[inline]
6303 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6304 ::fidl_next::munge! {
6305 let Self {
6306 collection,
6307 decl,
6308 args,
6309
6310 } = &mut *out_;
6311 }
6312
6313 ::fidl_next::Wire::zero_padding(collection);
6314
6315 ::fidl_next::Wire::zero_padding(decl);
6316
6317 ::fidl_next::Wire::zero_padding(args);
6318 }
6319 }
6320
6321 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RealmCreateChildRequest<'de>
6322 where
6323 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6324 ___D: ::fidl_next::Decoder<'de>,
6325 ___D: ::fidl_next::fuchsia::HandleDecoder,
6326 {
6327 fn decode(
6328 slot_: ::fidl_next::Slot<'_, Self>,
6329 decoder_: &mut ___D,
6330 _: (),
6331 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6332 ::fidl_next::munge! {
6333 let Self {
6334 mut collection,
6335 mut decl,
6336 mut args,
6337
6338 } = slot_;
6339 }
6340
6341 let _field = collection.as_mut();
6342
6343 ::fidl_next::Decode::decode(collection.as_mut(), decoder_, ())?;
6344
6345 let _field = decl.as_mut();
6346
6347 ::fidl_next::Decode::decode(decl.as_mut(), decoder_, ())?;
6348
6349 let _field = args.as_mut();
6350
6351 ::fidl_next::Decode::decode(args.as_mut(), decoder_, ())?;
6352
6353 Ok(())
6354 }
6355 }
6356
6357 impl<'de> ::fidl_next::IntoNatural for RealmCreateChildRequest<'de> {
6358 type Natural = crate::natural::RealmCreateChildRequest;
6359 }
6360
6361 #[derive(Debug)]
6363 #[repr(C)]
6364 pub struct RealmGetResolvedInfoResponse<'de> {
6365 pub resolved_info: ::fidl_next_fuchsia_component_resolution::wire::Component<'de>,
6366 }
6367
6368 static_assertions::const_assert_eq!(
6369 std::mem::size_of::<RealmGetResolvedInfoResponse<'_>>(),
6370 16
6371 );
6372 static_assertions::const_assert_eq!(
6373 std::mem::align_of::<RealmGetResolvedInfoResponse<'_>>(),
6374 8
6375 );
6376
6377 static_assertions::const_assert_eq!(
6378 std::mem::offset_of!(RealmGetResolvedInfoResponse<'_>, resolved_info),
6379 0
6380 );
6381
6382 impl ::fidl_next::Constrained for RealmGetResolvedInfoResponse<'_> {
6383 type Constraint = ();
6384
6385 fn validate(
6386 _: ::fidl_next::Slot<'_, Self>,
6387 _: Self::Constraint,
6388 ) -> Result<(), ::fidl_next::ValidationError> {
6389 Ok(())
6390 }
6391 }
6392
6393 unsafe impl ::fidl_next::Wire for RealmGetResolvedInfoResponse<'static> {
6394 type Narrowed<'de> = RealmGetResolvedInfoResponse<'de>;
6395
6396 #[inline]
6397 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6398 ::fidl_next::munge! {
6399 let Self {
6400 resolved_info,
6401
6402 } = &mut *out_;
6403 }
6404
6405 ::fidl_next::Wire::zero_padding(resolved_info);
6406 }
6407 }
6408
6409 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RealmGetResolvedInfoResponse<'de>
6410 where
6411 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6412 ___D: ::fidl_next::Decoder<'de>,
6413 ___D: ::fidl_next::fuchsia::HandleDecoder,
6414 {
6415 fn decode(
6416 slot_: ::fidl_next::Slot<'_, Self>,
6417 decoder_: &mut ___D,
6418 _: (),
6419 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6420 ::fidl_next::munge! {
6421 let Self {
6422 mut resolved_info,
6423
6424 } = slot_;
6425 }
6426
6427 let _field = resolved_info.as_mut();
6428
6429 ::fidl_next::Decode::decode(resolved_info.as_mut(), decoder_, ())?;
6430
6431 Ok(())
6432 }
6433 }
6434
6435 impl<'de> ::fidl_next::IntoNatural for RealmGetResolvedInfoResponse<'de> {
6436 type Natural = crate::natural::RealmGetResolvedInfoResponse;
6437 }
6438
6439 #[derive(Debug)]
6441 #[repr(C)]
6442 pub struct StorageAdminListStorageInRealmRequest<'de> {
6443 pub relative_moniker: ::fidl_next::wire::String<'de>,
6444
6445 pub iterator:
6446 ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::wire::fuchsia::Channel>,
6447 }
6448
6449 static_assertions::const_assert_eq!(
6450 std::mem::size_of::<StorageAdminListStorageInRealmRequest<'_>>(),
6451 24
6452 );
6453 static_assertions::const_assert_eq!(
6454 std::mem::align_of::<StorageAdminListStorageInRealmRequest<'_>>(),
6455 8
6456 );
6457
6458 static_assertions::const_assert_eq!(
6459 std::mem::offset_of!(StorageAdminListStorageInRealmRequest<'_>, relative_moniker),
6460 0
6461 );
6462
6463 static_assertions::const_assert_eq!(
6464 std::mem::offset_of!(StorageAdminListStorageInRealmRequest<'_>, iterator),
6465 16
6466 );
6467
6468 impl ::fidl_next::Constrained for StorageAdminListStorageInRealmRequest<'_> {
6469 type Constraint = ();
6470
6471 fn validate(
6472 _: ::fidl_next::Slot<'_, Self>,
6473 _: Self::Constraint,
6474 ) -> Result<(), ::fidl_next::ValidationError> {
6475 Ok(())
6476 }
6477 }
6478
6479 unsafe impl ::fidl_next::Wire for StorageAdminListStorageInRealmRequest<'static> {
6480 type Narrowed<'de> = StorageAdminListStorageInRealmRequest<'de>;
6481
6482 #[inline]
6483 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6484 ::fidl_next::munge! {
6485 let Self {
6486 relative_moniker,
6487 iterator,
6488
6489 } = &mut *out_;
6490 }
6491
6492 ::fidl_next::Wire::zero_padding(relative_moniker);
6493
6494 ::fidl_next::Wire::zero_padding(iterator);
6495
6496 unsafe {
6497 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
6498 }
6499 }
6500 }
6501
6502 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StorageAdminListStorageInRealmRequest<'de>
6503 where
6504 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6505 ___D: ::fidl_next::Decoder<'de>,
6506 ___D: ::fidl_next::fuchsia::HandleDecoder,
6507 {
6508 fn decode(
6509 slot_: ::fidl_next::Slot<'_, Self>,
6510 decoder_: &mut ___D,
6511 _: (),
6512 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6513 if slot_.as_bytes()[20..24] != [0u8; 4] {
6514 return Err(::fidl_next::DecodeError::InvalidPadding);
6515 }
6516
6517 ::fidl_next::munge! {
6518 let Self {
6519 mut relative_moniker,
6520 mut iterator,
6521
6522 } = slot_;
6523 }
6524
6525 let _field = relative_moniker.as_mut();
6526 ::fidl_next::Constrained::validate(_field, 4096)?;
6527 ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_, 4096)?;
6528
6529 let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
6530
6531 if relative_moniker.len() > 4096 {
6532 return Err(::fidl_next::DecodeError::VectorTooLong {
6533 size: relative_moniker.len() as u64,
6534 limit: 4096,
6535 });
6536 }
6537
6538 let _field = iterator.as_mut();
6539
6540 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
6541
6542 Ok(())
6543 }
6544 }
6545
6546 impl<'de> ::fidl_next::IntoNatural for StorageAdminListStorageInRealmRequest<'de> {
6547 type Natural = crate::natural::StorageAdminListStorageInRealmRequest;
6548 }
6549
6550 #[derive(Debug)]
6552 #[repr(C)]
6553 pub struct StorageAdminOpenStorageRequest<'de> {
6554 pub relative_moniker: ::fidl_next::wire::String<'de>,
6555
6556 pub object: ::fidl_next::ServerEnd<
6557 ::fidl_next_fuchsia_io::Node,
6558 ::fidl_next::wire::fuchsia::Channel,
6559 >,
6560 }
6561
6562 static_assertions::const_assert_eq!(
6563 std::mem::size_of::<StorageAdminOpenStorageRequest<'_>>(),
6564 24
6565 );
6566 static_assertions::const_assert_eq!(
6567 std::mem::align_of::<StorageAdminOpenStorageRequest<'_>>(),
6568 8
6569 );
6570
6571 static_assertions::const_assert_eq!(
6572 std::mem::offset_of!(StorageAdminOpenStorageRequest<'_>, relative_moniker),
6573 0
6574 );
6575
6576 static_assertions::const_assert_eq!(
6577 std::mem::offset_of!(StorageAdminOpenStorageRequest<'_>, object),
6578 16
6579 );
6580
6581 impl ::fidl_next::Constrained for StorageAdminOpenStorageRequest<'_> {
6582 type Constraint = ();
6583
6584 fn validate(
6585 _: ::fidl_next::Slot<'_, Self>,
6586 _: Self::Constraint,
6587 ) -> Result<(), ::fidl_next::ValidationError> {
6588 Ok(())
6589 }
6590 }
6591
6592 unsafe impl ::fidl_next::Wire for StorageAdminOpenStorageRequest<'static> {
6593 type Narrowed<'de> = StorageAdminOpenStorageRequest<'de>;
6594
6595 #[inline]
6596 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6597 ::fidl_next::munge! {
6598 let Self {
6599 relative_moniker,
6600 object,
6601
6602 } = &mut *out_;
6603 }
6604
6605 ::fidl_next::Wire::zero_padding(relative_moniker);
6606
6607 ::fidl_next::Wire::zero_padding(object);
6608
6609 unsafe {
6610 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
6611 }
6612 }
6613 }
6614
6615 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StorageAdminOpenStorageRequest<'de>
6616 where
6617 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6618 ___D: ::fidl_next::Decoder<'de>,
6619 ___D: ::fidl_next::fuchsia::HandleDecoder,
6620 {
6621 fn decode(
6622 slot_: ::fidl_next::Slot<'_, Self>,
6623 decoder_: &mut ___D,
6624 _: (),
6625 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6626 if slot_.as_bytes()[20..24] != [0u8; 4] {
6627 return Err(::fidl_next::DecodeError::InvalidPadding);
6628 }
6629
6630 ::fidl_next::munge! {
6631 let Self {
6632 mut relative_moniker,
6633 mut object,
6634
6635 } = slot_;
6636 }
6637
6638 let _field = relative_moniker.as_mut();
6639 ::fidl_next::Constrained::validate(_field, 4096)?;
6640 ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_, 4096)?;
6641
6642 let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
6643
6644 if relative_moniker.len() > 4096 {
6645 return Err(::fidl_next::DecodeError::VectorTooLong {
6646 size: relative_moniker.len() as u64,
6647 limit: 4096,
6648 });
6649 }
6650
6651 let _field = object.as_mut();
6652
6653 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
6654
6655 Ok(())
6656 }
6657 }
6658
6659 impl<'de> ::fidl_next::IntoNatural for StorageAdminOpenStorageRequest<'de> {
6660 type Natural = crate::natural::StorageAdminOpenStorageRequest;
6661 }
6662
6663 #[derive(Debug)]
6665 #[repr(C)]
6666 pub struct StorageAdminOpenComponentStorageByIdRequest<'de> {
6667 pub id: ::fidl_next::wire::String<'de>,
6668
6669 pub object: ::fidl_next::ServerEnd<
6670 ::fidl_next_fuchsia_io::Node,
6671 ::fidl_next::wire::fuchsia::Channel,
6672 >,
6673 }
6674
6675 static_assertions::const_assert_eq!(
6676 std::mem::size_of::<StorageAdminOpenComponentStorageByIdRequest<'_>>(),
6677 24
6678 );
6679 static_assertions::const_assert_eq!(
6680 std::mem::align_of::<StorageAdminOpenComponentStorageByIdRequest<'_>>(),
6681 8
6682 );
6683
6684 static_assertions::const_assert_eq!(
6685 std::mem::offset_of!(StorageAdminOpenComponentStorageByIdRequest<'_>, id),
6686 0
6687 );
6688
6689 static_assertions::const_assert_eq!(
6690 std::mem::offset_of!(StorageAdminOpenComponentStorageByIdRequest<'_>, object),
6691 16
6692 );
6693
6694 impl ::fidl_next::Constrained for StorageAdminOpenComponentStorageByIdRequest<'_> {
6695 type Constraint = ();
6696
6697 fn validate(
6698 _: ::fidl_next::Slot<'_, Self>,
6699 _: Self::Constraint,
6700 ) -> Result<(), ::fidl_next::ValidationError> {
6701 Ok(())
6702 }
6703 }
6704
6705 unsafe impl ::fidl_next::Wire for StorageAdminOpenComponentStorageByIdRequest<'static> {
6706 type Narrowed<'de> = StorageAdminOpenComponentStorageByIdRequest<'de>;
6707
6708 #[inline]
6709 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6710 ::fidl_next::munge! {
6711 let Self {
6712 id,
6713 object,
6714
6715 } = &mut *out_;
6716 }
6717
6718 ::fidl_next::Wire::zero_padding(id);
6719
6720 ::fidl_next::Wire::zero_padding(object);
6721
6722 unsafe {
6723 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
6724 }
6725 }
6726 }
6727
6728 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
6729 for StorageAdminOpenComponentStorageByIdRequest<'de>
6730 where
6731 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6732 ___D: ::fidl_next::Decoder<'de>,
6733 ___D: ::fidl_next::fuchsia::HandleDecoder,
6734 {
6735 fn decode(
6736 slot_: ::fidl_next::Slot<'_, Self>,
6737 decoder_: &mut ___D,
6738 _: (),
6739 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6740 if slot_.as_bytes()[20..24] != [0u8; 4] {
6741 return Err(::fidl_next::DecodeError::InvalidPadding);
6742 }
6743
6744 ::fidl_next::munge! {
6745 let Self {
6746 mut id,
6747 mut object,
6748
6749 } = slot_;
6750 }
6751
6752 let _field = id.as_mut();
6753 ::fidl_next::Constrained::validate(_field, 64)?;
6754 ::fidl_next::Decode::decode(id.as_mut(), decoder_, 64)?;
6755
6756 let id = unsafe { id.deref_unchecked() };
6757
6758 if id.len() > 64 {
6759 return Err(::fidl_next::DecodeError::VectorTooLong {
6760 size: id.len() as u64,
6761 limit: 64,
6762 });
6763 }
6764
6765 let _field = object.as_mut();
6766
6767 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
6768
6769 Ok(())
6770 }
6771 }
6772
6773 impl<'de> ::fidl_next::IntoNatural for StorageAdminOpenComponentStorageByIdRequest<'de> {
6774 type Natural = crate::natural::StorageAdminOpenComponentStorageByIdRequest;
6775 }
6776}
6777
6778pub mod wire_optional {
6779
6780 pub use fidl_next_common_fuchsia_component::wire_optional::*;
6781
6782 #[repr(transparent)]
6783 pub struct EventPayload<'de> {
6784 pub(crate) raw: ::fidl_next::wire::Union,
6785 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
6786 }
6787
6788 impl ::fidl_next::Constrained for EventPayload<'_> {
6789 type Constraint = ();
6790
6791 fn validate(
6792 _: ::fidl_next::Slot<'_, Self>,
6793 _: Self::Constraint,
6794 ) -> Result<(), ::fidl_next::ValidationError> {
6795 Ok(())
6796 }
6797 }
6798
6799 unsafe impl ::fidl_next::Wire for EventPayload<'static> {
6800 type Narrowed<'de> = EventPayload<'de>;
6801
6802 #[inline]
6803 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6804 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6805 ::fidl_next::wire::Union::zero_padding(raw);
6806 }
6807 }
6808
6809 impl<'de> EventPayload<'de> {
6810 pub fn is_some(&self) -> bool {
6811 self.raw.is_some()
6812 }
6813
6814 pub fn is_none(&self) -> bool {
6815 self.raw.is_none()
6816 }
6817
6818 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::EventPayload<'de>> {
6819 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
6820 }
6821
6822 pub fn into_option(self) -> ::core::option::Option<crate::wire::EventPayload<'de>> {
6823 if self.is_some() {
6824 Some(crate::wire::EventPayload {
6825 raw: self.raw,
6826 _phantom: ::core::marker::PhantomData,
6827 })
6828 } else {
6829 None
6830 }
6831 }
6832 }
6833
6834 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EventPayload<'de>
6835 where
6836 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6837 ___D: ::fidl_next::Decoder<'de>,
6838 ___D: ::fidl_next::fuchsia::HandleDecoder,
6839 {
6840 fn decode(
6841 mut slot: ::fidl_next::Slot<'_, Self>,
6842 decoder: &mut ___D,
6843 _: (),
6844 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6845 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6846 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6847 1 => ::fidl_next::wire::Union::decode_as::<
6848 ___D,
6849 crate::wire::CapabilityRequestedPayload<'de>,
6850 >(raw, decoder, ())?,
6851
6852 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::PurgedPayload<'de>>(
6853 raw,
6854 decoder,
6855 (),
6856 )?,
6857
6858 4 => ::fidl_next::wire::Union::decode_as::<
6859 ___D,
6860 crate::wire::DiscoveredPayload<'de>,
6861 >(raw, decoder, ())?,
6862
6863 5 => {
6864 ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DestroyedPayload<'de>>(
6865 raw,
6866 decoder,
6867 (),
6868 )?
6869 }
6870
6871 6 => {
6872 ::fidl_next::wire::Union::decode_as::<___D, crate::wire::ResolvedPayload<'de>>(
6873 raw,
6874 decoder,
6875 (),
6876 )?
6877 }
6878
6879 7 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::StartedPayload<'de>>(
6880 raw,
6881 decoder,
6882 (),
6883 )?,
6884
6885 8 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::StoppedPayload<'de>>(
6886 raw,
6887 decoder,
6888 (),
6889 )?,
6890
6891 9 => ::fidl_next::wire::Union::decode_as::<
6892 ___D,
6893 crate::wire::DebugStartedPayload<'de>,
6894 >(raw, decoder, ())?,
6895
6896 10 => ::fidl_next::wire::Union::decode_as::<
6897 ___D,
6898 crate::wire::UnresolvedPayload<'de>,
6899 >(raw, decoder, ())?,
6900
6901 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
6902 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
6903 }
6904
6905 Ok(())
6906 }
6907 }
6908
6909 impl<'de> ::core::fmt::Debug for EventPayload<'de> {
6910 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6911 self.as_ref().fmt(f)
6912 }
6913 }
6914
6915 impl<'de> ::fidl_next::IntoNatural for EventPayload<'de> {
6916 type Natural = ::core::option::Option<crate::natural::EventPayload>;
6917 }
6918}
6919
6920pub mod generic {
6921
6922 pub use fidl_next_common_fuchsia_component::generic::*;
6923
6924 pub struct ControllerIsStartedResponse<T0> {
6926 pub is_started: T0,
6927 }
6928
6929 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ControllerIsStartedResponse, ___E>
6930 for ControllerIsStartedResponse<T0>
6931 where
6932 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6933 ___E: ::fidl_next::fuchsia::HandleEncoder,
6934 T0: ::fidl_next::Encode<bool, ___E>,
6935 {
6936 #[inline]
6937 fn encode(
6938 self,
6939 encoder_: &mut ___E,
6940 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerIsStartedResponse>,
6941 _: (),
6942 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6943 ::fidl_next::munge! {
6944 let crate::wire::ControllerIsStartedResponse {
6945 is_started,
6946
6947 } = out_;
6948 }
6949
6950 ::fidl_next::Encode::encode(self.is_started, encoder_, is_started, ())?;
6951
6952 Ok(())
6953 }
6954 }
6955
6956 pub struct ControllerGetExposedDictionaryResponse<T0> {
6958 pub dictionary: T0,
6959 }
6960
6961 unsafe impl<___E, T0>
6962 ::fidl_next::Encode<crate::wire::ControllerGetExposedDictionaryResponse, ___E>
6963 for ControllerGetExposedDictionaryResponse<T0>
6964 where
6965 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6966 ___E: ::fidl_next::fuchsia::HandleEncoder,
6967 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef, ___E>,
6968 {
6969 #[inline]
6970 fn encode(
6971 self,
6972 encoder_: &mut ___E,
6973 out_: &mut ::core::mem::MaybeUninit<
6974 crate::wire::ControllerGetExposedDictionaryResponse,
6975 >,
6976 _: (),
6977 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6978 ::fidl_next::munge! {
6979 let crate::wire::ControllerGetExposedDictionaryResponse {
6980 dictionary,
6981
6982 } = out_;
6983 }
6984
6985 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
6986
6987 Ok(())
6988 }
6989 }
6990
6991 pub struct ControllerGetOutputDictionaryResponse<T0> {
6993 pub dictionary: T0,
6994 }
6995
6996 unsafe impl<___E, T0>
6997 ::fidl_next::Encode<crate::wire::ControllerGetOutputDictionaryResponse, ___E>
6998 for ControllerGetOutputDictionaryResponse<T0>
6999 where
7000 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7001 ___E: ::fidl_next::fuchsia::HandleEncoder,
7002 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
7003 {
7004 #[inline]
7005 fn encode(
7006 self,
7007 encoder_: &mut ___E,
7008 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerGetOutputDictionaryResponse>,
7009 _: (),
7010 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7011 ::fidl_next::munge! {
7012 let crate::wire::ControllerGetOutputDictionaryResponse {
7013 dictionary,
7014
7015 } = out_;
7016 }
7017
7018 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
7019
7020 Ok(())
7021 }
7022 }
7023
7024 pub struct ControllerStartRequest<T0, T1> {
7026 pub args: T0,
7027
7028 pub execution_controller: T1,
7029 }
7030
7031 unsafe impl<___E, T0, T1>
7032 ::fidl_next::Encode<crate::wire::ControllerStartRequest<'static>, ___E>
7033 for ControllerStartRequest<T0, T1>
7034 where
7035 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7036 ___E: ::fidl_next::Encoder,
7037 ___E: ::fidl_next::fuchsia::HandleEncoder,
7038 T0: ::fidl_next::Encode<crate::wire::StartChildArgs<'static>, ___E>,
7039 T1: ::fidl_next::Encode<
7040 ::fidl_next::ServerEnd<
7041 crate::ExecutionController,
7042 ::fidl_next::wire::fuchsia::Channel,
7043 >,
7044 ___E,
7045 >,
7046 {
7047 #[inline]
7048 fn encode(
7049 self,
7050 encoder_: &mut ___E,
7051 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerStartRequest<'static>>,
7052 _: (),
7053 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7054 ::fidl_next::munge! {
7055 let crate::wire::ControllerStartRequest {
7056 args,
7057 execution_controller,
7058
7059 } = out_;
7060 }
7061
7062 ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
7063
7064 ::fidl_next::Encode::encode(
7065 self.execution_controller,
7066 encoder_,
7067 execution_controller,
7068 (),
7069 )?;
7070
7071 Ok(())
7072 }
7073 }
7074
7075 pub struct ControllerOpenExposedDirRequest<T0> {
7077 pub exposed_dir: T0,
7078 }
7079
7080 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ControllerOpenExposedDirRequest, ___E>
7081 for ControllerOpenExposedDirRequest<T0>
7082 where
7083 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7084 ___E: ::fidl_next::fuchsia::HandleEncoder,
7085 T0: ::fidl_next::Encode<
7086 ::fidl_next::ServerEnd<
7087 ::fidl_next_fuchsia_io::Directory,
7088 ::fidl_next::wire::fuchsia::Channel,
7089 >,
7090 ___E,
7091 >,
7092 {
7093 #[inline]
7094 fn encode(
7095 self,
7096 encoder_: &mut ___E,
7097 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerOpenExposedDirRequest>,
7098 _: (),
7099 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7100 ::fidl_next::munge! {
7101 let crate::wire::ControllerOpenExposedDirRequest {
7102 exposed_dir,
7103
7104 } = out_;
7105 }
7106
7107 ::fidl_next::Encode::encode(self.exposed_dir, encoder_, exposed_dir, ())?;
7108
7109 Ok(())
7110 }
7111 }
7112
7113 pub struct EventStreamGetNextResponse<T0> {
7115 pub events: T0,
7116 }
7117
7118 unsafe impl<___E, T0>
7119 ::fidl_next::Encode<crate::wire::EventStreamGetNextResponse<'static>, ___E>
7120 for EventStreamGetNextResponse<T0>
7121 where
7122 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7123 ___E: ::fidl_next::Encoder,
7124 ___E: ::fidl_next::fuchsia::HandleEncoder,
7125 T0: ::fidl_next::Encode<
7126 ::fidl_next::wire::Vector<'static, crate::wire::Event<'static>>,
7127 ___E,
7128 >,
7129 {
7130 #[inline]
7131 fn encode(
7132 self,
7133 encoder_: &mut ___E,
7134 out_: &mut ::core::mem::MaybeUninit<crate::wire::EventStreamGetNextResponse<'static>>,
7135 _: (),
7136 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7137 ::fidl_next::munge! {
7138 let crate::wire::EventStreamGetNextResponse {
7139 events,
7140
7141 } = out_;
7142 }
7143
7144 ::fidl_next::Encode::encode(self.events, encoder_, events, (4294967295, ()))?;
7145
7146 Ok(())
7147 }
7148 }
7149
7150 pub struct IntrospectorGetMonikerRequest<T0> {
7152 pub component_instance: T0,
7153 }
7154
7155 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::IntrospectorGetMonikerRequest, ___E>
7156 for IntrospectorGetMonikerRequest<T0>
7157 where
7158 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7159 ___E: ::fidl_next::fuchsia::HandleEncoder,
7160 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
7161 {
7162 #[inline]
7163 fn encode(
7164 self,
7165 encoder_: &mut ___E,
7166 out_: &mut ::core::mem::MaybeUninit<crate::wire::IntrospectorGetMonikerRequest>,
7167 _: (),
7168 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7169 ::fidl_next::munge! {
7170 let crate::wire::IntrospectorGetMonikerRequest {
7171 component_instance,
7172
7173 } = out_;
7174 }
7175
7176 ::fidl_next::Encode::encode(self.component_instance, encoder_, component_instance, ())?;
7177
7178 Ok(())
7179 }
7180 }
7181
7182 pub struct NamespaceInputEntry<T0, T1> {
7184 pub path: T0,
7185
7186 pub dictionary: T1,
7187 }
7188
7189 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NamespaceInputEntry<'static>, ___E>
7190 for NamespaceInputEntry<T0, T1>
7191 where
7192 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7193 ___E: ::fidl_next::Encoder,
7194 ___E: ::fidl_next::fuchsia::HandleEncoder,
7195 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
7196 T1: ::fidl_next::Encode<
7197 ::fidl_next::ClientEnd<
7198 ::fidl_next_fuchsia_component_sandbox::Dictionary,
7199 ::fidl_next::wire::fuchsia::Channel,
7200 >,
7201 ___E,
7202 >,
7203 {
7204 #[inline]
7205 fn encode(
7206 self,
7207 encoder_: &mut ___E,
7208 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceInputEntry<'static>>,
7209 _: (),
7210 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7211 ::fidl_next::munge! {
7212 let crate::wire::NamespaceInputEntry {
7213 path,
7214 dictionary,
7215
7216 } = out_;
7217 }
7218
7219 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
7220
7221 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
7222
7223 Ok(())
7224 }
7225 }
7226
7227 pub struct NamespaceCreateRequest<T0> {
7229 pub entries: T0,
7230 }
7231
7232 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NamespaceCreateRequest<'static>, ___E>
7233 for NamespaceCreateRequest<T0>
7234 where
7235 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7236 ___E: ::fidl_next::Encoder,
7237 ___E: ::fidl_next::fuchsia::HandleEncoder,
7238 T0: ::fidl_next::Encode<
7239 ::fidl_next::wire::Vector<'static, crate::wire::NamespaceInputEntry<'static>>,
7240 ___E,
7241 >,
7242 {
7243 #[inline]
7244 fn encode(
7245 self,
7246 encoder_: &mut ___E,
7247 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceCreateRequest<'static>>,
7248 _: (),
7249 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7250 ::fidl_next::munge! {
7251 let crate::wire::NamespaceCreateRequest {
7252 entries,
7253
7254 } = out_;
7255 }
7256
7257 ::fidl_next::Encode::encode(self.entries, encoder_, entries, (4294967295, ()))?;
7258
7259 Ok(())
7260 }
7261 }
7262
7263 pub struct NamespaceInputEntry2<T0, T1> {
7265 pub path: T0,
7266
7267 pub capability: T1,
7268 }
7269
7270 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NamespaceInputEntry2<'static>, ___E>
7271 for NamespaceInputEntry2<T0, T1>
7272 where
7273 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7274 ___E: ::fidl_next::Encoder,
7275 ___E: ::fidl_next::fuchsia::HandleEncoder,
7276 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
7277 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
7278 {
7279 #[inline]
7280 fn encode(
7281 self,
7282 encoder_: &mut ___E,
7283 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceInputEntry2<'static>>,
7284 _: (),
7285 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7286 ::fidl_next::munge! {
7287 let crate::wire::NamespaceInputEntry2 {
7288 path,
7289 capability,
7290
7291 } = out_;
7292 }
7293
7294 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
7295
7296 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
7297
7298 Ok(())
7299 }
7300 }
7301
7302 pub struct NamespaceCreate2Request<T0> {
7304 pub entries: T0,
7305 }
7306
7307 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NamespaceCreate2Request<'static>, ___E>
7308 for NamespaceCreate2Request<T0>
7309 where
7310 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7311 ___E: ::fidl_next::Encoder,
7312 ___E: ::fidl_next::fuchsia::HandleEncoder,
7313 T0: ::fidl_next::Encode<
7314 ::fidl_next::wire::Vector<'static, crate::wire::NamespaceInputEntry2<'static>>,
7315 ___E,
7316 >,
7317 {
7318 #[inline]
7319 fn encode(
7320 self,
7321 encoder_: &mut ___E,
7322 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceCreate2Request<'static>>,
7323 _: (),
7324 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7325 ::fidl_next::munge! {
7326 let crate::wire::NamespaceCreate2Request {
7327 entries,
7328
7329 } = out_;
7330 }
7331
7332 ::fidl_next::Encode::encode(self.entries, encoder_, entries, (4294967295, ()))?;
7333
7334 Ok(())
7335 }
7336 }
7337
7338 pub struct NamespaceCreateResponse<T0> {
7340 pub entries: T0,
7341 }
7342
7343 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NamespaceCreateResponse<'static>, ___E>
7344 for NamespaceCreateResponse<T0>
7345 where
7346 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7347 ___E: ::fidl_next::Encoder,
7348 ___E: ::fidl_next::fuchsia::HandleEncoder,
7349 T0: ::fidl_next::Encode<
7350 ::fidl_next::wire::Vector<'static, crate::wire::NamespaceEntry<'static>>,
7351 ___E,
7352 >,
7353 {
7354 #[inline]
7355 fn encode(
7356 self,
7357 encoder_: &mut ___E,
7358 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceCreateResponse<'static>>,
7359 _: (),
7360 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7361 ::fidl_next::munge! {
7362 let crate::wire::NamespaceCreateResponse {
7363 entries,
7364
7365 } = out_;
7366 }
7367
7368 ::fidl_next::Encode::encode(self.entries, encoder_, entries, (4294967295, ()))?;
7369
7370 Ok(())
7371 }
7372 }
7373
7374 pub struct NamespaceCreate2Response<T0> {
7376 pub entries: T0,
7377 }
7378
7379 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NamespaceCreate2Response<'static>, ___E>
7380 for NamespaceCreate2Response<T0>
7381 where
7382 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7383 ___E: ::fidl_next::Encoder,
7384 ___E: ::fidl_next::fuchsia::HandleEncoder,
7385 T0: ::fidl_next::Encode<
7386 ::fidl_next::wire::Vector<'static, crate::wire::NamespaceEntry<'static>>,
7387 ___E,
7388 >,
7389 {
7390 #[inline]
7391 fn encode(
7392 self,
7393 encoder_: &mut ___E,
7394 out_: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceCreate2Response<'static>>,
7395 _: (),
7396 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7397 ::fidl_next::munge! {
7398 let crate::wire::NamespaceCreate2Response {
7399 entries,
7400
7401 } = out_;
7402 }
7403
7404 ::fidl_next::Encode::encode(self.entries, encoder_, entries, (4294967295, ()))?;
7405
7406 Ok(())
7407 }
7408 }
7409
7410 pub struct RealmListChildrenRequest<T0, T1> {
7412 pub collection: T0,
7413
7414 pub iter: T1,
7415 }
7416
7417 unsafe impl<___E, T0, T1>
7418 ::fidl_next::Encode<crate::wire::RealmListChildrenRequest<'static>, ___E>
7419 for RealmListChildrenRequest<T0, T1>
7420 where
7421 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7422 ___E: ::fidl_next::Encoder,
7423 ___E: ::fidl_next::fuchsia::HandleEncoder,
7424 T0: ::fidl_next::Encode<
7425 ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
7426 ___E,
7427 >,
7428 T1: ::fidl_next::Encode<
7429 ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::wire::fuchsia::Channel>,
7430 ___E,
7431 >,
7432 {
7433 #[inline]
7434 fn encode(
7435 self,
7436 encoder_: &mut ___E,
7437 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmListChildrenRequest<'static>>,
7438 _: (),
7439 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7440 ::fidl_next::munge! {
7441 let crate::wire::RealmListChildrenRequest {
7442 collection,
7443 iter,
7444
7445 } = out_;
7446 }
7447
7448 ::fidl_next::Encode::encode(self.collection, encoder_, collection, ())?;
7449
7450 ::fidl_next::Encode::encode(self.iter, encoder_, iter, ())?;
7451
7452 Ok(())
7453 }
7454 }
7455
7456 pub struct RealmGetChildOutputDictionaryDeprecatedRequest<T0> {
7458 pub child: T0,
7459 }
7460
7461 unsafe impl<___E, T0>
7462 ::fidl_next::Encode<
7463 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
7464 ___E,
7465 > for RealmGetChildOutputDictionaryDeprecatedRequest<T0>
7466 where
7467 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7468 ___E: ::fidl_next::Encoder,
7469 ___E: ::fidl_next::fuchsia::HandleEncoder,
7470 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>, ___E>,
7471 {
7472 #[inline]
7473 fn encode(
7474 self,
7475 encoder_: &mut ___E,
7476 out_: &mut ::core::mem::MaybeUninit<
7477 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
7478 >,
7479 _: (),
7480 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7481 ::fidl_next::munge! {
7482 let crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest {
7483 child,
7484
7485 } = out_;
7486 }
7487
7488 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
7489
7490 Ok(())
7491 }
7492 }
7493
7494 pub struct RealmGetChildOutputDictionaryDeprecatedResponse<T0> {
7496 pub dictionary: T0,
7497 }
7498
7499 unsafe impl<___E, T0>
7500 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse, ___E>
7501 for RealmGetChildOutputDictionaryDeprecatedResponse<T0>
7502 where
7503 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7504 ___E: ::fidl_next::fuchsia::HandleEncoder,
7505 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef, ___E>,
7506 {
7507 #[inline]
7508 fn encode(
7509 self,
7510 encoder_: &mut ___E,
7511 out_: &mut ::core::mem::MaybeUninit<
7512 crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse,
7513 >,
7514 _: (),
7515 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7516 ::fidl_next::munge! {
7517 let crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse {
7518 dictionary,
7519
7520 } = out_;
7521 }
7522
7523 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
7524
7525 Ok(())
7526 }
7527 }
7528
7529 pub struct RealmGetChildOutputDictionaryRequest<T0> {
7531 pub child: T0,
7532 }
7533
7534 unsafe impl<___E, T0>
7535 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryRequest<'static>, ___E>
7536 for RealmGetChildOutputDictionaryRequest<T0>
7537 where
7538 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7539 ___E: ::fidl_next::Encoder,
7540 ___E: ::fidl_next::fuchsia::HandleEncoder,
7541 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>, ___E>,
7542 {
7543 #[inline]
7544 fn encode(
7545 self,
7546 encoder_: &mut ___E,
7547 out_: &mut ::core::mem::MaybeUninit<
7548 crate::wire::RealmGetChildOutputDictionaryRequest<'static>,
7549 >,
7550 _: (),
7551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7552 ::fidl_next::munge! {
7553 let crate::wire::RealmGetChildOutputDictionaryRequest {
7554 child,
7555
7556 } = out_;
7557 }
7558
7559 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
7560
7561 Ok(())
7562 }
7563 }
7564
7565 pub struct RealmGetChildOutputDictionaryResponse<T0> {
7567 pub dictionary: T0,
7568 }
7569
7570 unsafe impl<___E, T0>
7571 ::fidl_next::Encode<crate::wire::RealmGetChildOutputDictionaryResponse, ___E>
7572 for RealmGetChildOutputDictionaryResponse<T0>
7573 where
7574 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7575 ___E: ::fidl_next::fuchsia::HandleEncoder,
7576 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
7577 {
7578 #[inline]
7579 fn encode(
7580 self,
7581 encoder_: &mut ___E,
7582 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmGetChildOutputDictionaryResponse>,
7583 _: (),
7584 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7585 ::fidl_next::munge! {
7586 let crate::wire::RealmGetChildOutputDictionaryResponse {
7587 dictionary,
7588
7589 } = out_;
7590 }
7591
7592 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary, ())?;
7593
7594 Ok(())
7595 }
7596 }
7597
7598 pub struct RealmOpenControllerRequest<T0, T1> {
7600 pub child: T0,
7601
7602 pub controller: T1,
7603 }
7604
7605 unsafe impl<___E, T0, T1>
7606 ::fidl_next::Encode<crate::wire::RealmOpenControllerRequest<'static>, ___E>
7607 for RealmOpenControllerRequest<T0, T1>
7608 where
7609 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7610 ___E: ::fidl_next::Encoder,
7611 ___E: ::fidl_next::fuchsia::HandleEncoder,
7612 T0: ::fidl_next::Encode<::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>, ___E>,
7613 T1: ::fidl_next::Encode<
7614 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::wire::fuchsia::Channel>,
7615 ___E,
7616 >,
7617 {
7618 #[inline]
7619 fn encode(
7620 self,
7621 encoder_: &mut ___E,
7622 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmOpenControllerRequest<'static>>,
7623 _: (),
7624 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7625 ::fidl_next::munge! {
7626 let crate::wire::RealmOpenControllerRequest {
7627 child,
7628 controller,
7629
7630 } = out_;
7631 }
7632
7633 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
7634
7635 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
7636
7637 Ok(())
7638 }
7639 }
7640
7641 pub struct RealmOpenExposedDirRequest<T0, T1> {
7643 pub child: T0,
7644
7645 pub exposed_dir: T1,
7646 }
7647
7648 unsafe impl<___E, T0, T1>
7649 ::fidl_next::Encode<crate::wire::RealmOpenExposedDirRequest<'static>, ___E>
7650 for RealmOpenExposedDirRequest<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_fuchsia_component_decl::wire::ChildRef<'static>, ___E>,
7656 T1: ::fidl_next::Encode<
7657 ::fidl_next::ServerEnd<
7658 ::fidl_next_fuchsia_io::Directory,
7659 ::fidl_next::wire::fuchsia::Channel,
7660 >,
7661 ___E,
7662 >,
7663 {
7664 #[inline]
7665 fn encode(
7666 self,
7667 encoder_: &mut ___E,
7668 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmOpenExposedDirRequest<'static>>,
7669 _: (),
7670 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7671 ::fidl_next::munge! {
7672 let crate::wire::RealmOpenExposedDirRequest {
7673 child,
7674 exposed_dir,
7675
7676 } = out_;
7677 }
7678
7679 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
7680
7681 ::fidl_next::Encode::encode(self.exposed_dir, encoder_, exposed_dir, ())?;
7682
7683 Ok(())
7684 }
7685 }
7686
7687 pub struct RealmCreateChildRequest<T0, T1, T2> {
7689 pub collection: T0,
7690
7691 pub decl: T1,
7692
7693 pub args: T2,
7694 }
7695
7696 unsafe impl<___E, T0, T1, T2>
7697 ::fidl_next::Encode<crate::wire::RealmCreateChildRequest<'static>, ___E>
7698 for RealmCreateChildRequest<T0, T1, T2>
7699 where
7700 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7701 ___E: ::fidl_next::Encoder,
7702 ___E: ::fidl_next::fuchsia::HandleEncoder,
7703 T0: ::fidl_next::Encode<
7704 ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
7705 ___E,
7706 >,
7707 T1: ::fidl_next::Encode<::fidl_next_fuchsia_component_decl::wire::Child<'static>, ___E>,
7708 T2: ::fidl_next::Encode<crate::wire::CreateChildArgs<'static>, ___E>,
7709 {
7710 #[inline]
7711 fn encode(
7712 self,
7713 encoder_: &mut ___E,
7714 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmCreateChildRequest<'static>>,
7715 _: (),
7716 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7717 ::fidl_next::munge! {
7718 let crate::wire::RealmCreateChildRequest {
7719 collection,
7720 decl,
7721 args,
7722
7723 } = out_;
7724 }
7725
7726 ::fidl_next::Encode::encode(self.collection, encoder_, collection, ())?;
7727
7728 ::fidl_next::Encode::encode(self.decl, encoder_, decl, ())?;
7729
7730 ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
7731
7732 Ok(())
7733 }
7734 }
7735
7736 pub struct RealmGetResolvedInfoResponse<T0> {
7738 pub resolved_info: T0,
7739 }
7740
7741 unsafe impl<___E, T0>
7742 ::fidl_next::Encode<crate::wire::RealmGetResolvedInfoResponse<'static>, ___E>
7743 for RealmGetResolvedInfoResponse<T0>
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<
7749 ::fidl_next_fuchsia_component_resolution::wire::Component<'static>,
7750 ___E,
7751 >,
7752 {
7753 #[inline]
7754 fn encode(
7755 self,
7756 encoder_: &mut ___E,
7757 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmGetResolvedInfoResponse<'static>>,
7758 _: (),
7759 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7760 ::fidl_next::munge! {
7761 let crate::wire::RealmGetResolvedInfoResponse {
7762 resolved_info,
7763
7764 } = out_;
7765 }
7766
7767 ::fidl_next::Encode::encode(self.resolved_info, encoder_, resolved_info, ())?;
7768
7769 Ok(())
7770 }
7771 }
7772
7773 pub struct StorageAdminListStorageInRealmRequest<T0, T1> {
7775 pub relative_moniker: T0,
7776
7777 pub iterator: T1,
7778 }
7779
7780 unsafe impl<___E, T0, T1>
7781 ::fidl_next::Encode<crate::wire::StorageAdminListStorageInRealmRequest<'static>, ___E>
7782 for StorageAdminListStorageInRealmRequest<T0, T1>
7783 where
7784 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7785 ___E: ::fidl_next::Encoder,
7786 ___E: ::fidl_next::fuchsia::HandleEncoder,
7787 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
7788 T1: ::fidl_next::Encode<
7789 ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::wire::fuchsia::Channel>,
7790 ___E,
7791 >,
7792 {
7793 #[inline]
7794 fn encode(
7795 self,
7796 encoder_: &mut ___E,
7797 out_: &mut ::core::mem::MaybeUninit<
7798 crate::wire::StorageAdminListStorageInRealmRequest<'static>,
7799 >,
7800 _: (),
7801 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7802 ::fidl_next::munge! {
7803 let crate::wire::StorageAdminListStorageInRealmRequest {
7804 relative_moniker,
7805 iterator,
7806
7807 } = out_;
7808 }
7809
7810 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker, 4096)?;
7811
7812 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
7813
7814 Ok(())
7815 }
7816 }
7817
7818 pub struct StorageAdminOpenStorageRequest<T0, T1> {
7820 pub relative_moniker: T0,
7821
7822 pub object: T1,
7823 }
7824
7825 unsafe impl<___E, T0, T1>
7826 ::fidl_next::Encode<crate::wire::StorageAdminOpenStorageRequest<'static>, ___E>
7827 for StorageAdminOpenStorageRequest<T0, T1>
7828 where
7829 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7830 ___E: ::fidl_next::Encoder,
7831 ___E: ::fidl_next::fuchsia::HandleEncoder,
7832 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
7833 T1: ::fidl_next::Encode<
7834 ::fidl_next::ServerEnd<
7835 ::fidl_next_fuchsia_io::Node,
7836 ::fidl_next::wire::fuchsia::Channel,
7837 >,
7838 ___E,
7839 >,
7840 {
7841 #[inline]
7842 fn encode(
7843 self,
7844 encoder_: &mut ___E,
7845 out_: &mut ::core::mem::MaybeUninit<
7846 crate::wire::StorageAdminOpenStorageRequest<'static>,
7847 >,
7848 _: (),
7849 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7850 ::fidl_next::munge! {
7851 let crate::wire::StorageAdminOpenStorageRequest {
7852 relative_moniker,
7853 object,
7854
7855 } = out_;
7856 }
7857
7858 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker, 4096)?;
7859
7860 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
7861
7862 Ok(())
7863 }
7864 }
7865
7866 pub struct StorageAdminOpenComponentStorageByIdRequest<T0, T1> {
7868 pub id: T0,
7869
7870 pub object: T1,
7871 }
7872
7873 unsafe impl<___E, T0, T1>
7874 ::fidl_next::Encode<crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>, ___E>
7875 for StorageAdminOpenComponentStorageByIdRequest<T0, T1>
7876 where
7877 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7878 ___E: ::fidl_next::Encoder,
7879 ___E: ::fidl_next::fuchsia::HandleEncoder,
7880 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
7881 T1: ::fidl_next::Encode<
7882 ::fidl_next::ServerEnd<
7883 ::fidl_next_fuchsia_io::Node,
7884 ::fidl_next::wire::fuchsia::Channel,
7885 >,
7886 ___E,
7887 >,
7888 {
7889 #[inline]
7890 fn encode(
7891 self,
7892 encoder_: &mut ___E,
7893 out_: &mut ::core::mem::MaybeUninit<
7894 crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>,
7895 >,
7896 _: (),
7897 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7898 ::fidl_next::munge! {
7899 let crate::wire::StorageAdminOpenComponentStorageByIdRequest {
7900 id,
7901 object,
7902
7903 } = out_;
7904 }
7905
7906 ::fidl_next::Encode::encode(self.id, encoder_, id, 64)?;
7907
7908 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
7909
7910 Ok(())
7911 }
7912 }
7913}
7914
7915pub use self::natural::*;
7916
7917#[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"]
7919#[derive(PartialEq, Debug)]
7920pub struct Controller;
7921
7922#[cfg(target_os = "fuchsia")]
7923impl ::fidl_next::HasTransport for Controller {
7924 type Transport = ::fidl_next::fuchsia::zx::Channel;
7925}
7926
7927pub mod controller {
7928 pub mod prelude {
7929 pub use crate::{
7930 Controller, ControllerClientHandler, ControllerLocalClientHandler,
7931 ControllerLocalServerHandler, ControllerServerHandler, controller,
7932 };
7933
7934 pub use crate::natural::ControllerOpenExposedDirRequest;
7935
7936 pub use crate::natural::ControllerStartRequest;
7937
7938 pub use crate::natural::ControllerDestroyResponse;
7939
7940 pub use crate::natural::ControllerGetExposedDictionaryResponse;
7941
7942 pub use crate::natural::ControllerGetOutputDictionaryResponse;
7943
7944 pub use crate::natural::ControllerIsStartedResponse;
7945
7946 pub use crate::natural::ControllerOpenExposedDirResponse;
7947
7948 pub use crate::natural::ControllerStartResponse;
7949
7950 pub use crate::natural::Error;
7951 }
7952
7953 pub struct Start;
7954
7955 impl ::fidl_next::Method for Start {
7956 const ORDINAL: u64 = 7532130149195770565;
7957 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7958 ::fidl_next::protocol::Flexibility::Flexible;
7959
7960 type Protocol = crate::Controller;
7961
7962 type Request = crate::wire::ControllerStartRequest<'static>;
7963 }
7964
7965 impl ::fidl_next::TwoWayMethod for Start {
7966 type Response = ::fidl_next::wire::Result<
7967 'static,
7968 crate::wire::ControllerStartResponse,
7969 crate::wire::Error,
7970 >;
7971 }
7972
7973 impl<___R> ::fidl_next::Respond<___R> for Start {
7974 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
7975
7976 fn respond(response: ___R) -> Self::Output {
7977 ::core::result::Result::Ok(response)
7978 }
7979 }
7980
7981 impl<___R> ::fidl_next::RespondErr<___R> for Start {
7982 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7983
7984 fn respond_err(response: ___R) -> Self::Output {
7985 ::core::result::Result::Err(response)
7986 }
7987 }
7988
7989 pub struct IsStarted;
7990
7991 impl ::fidl_next::Method for IsStarted {
7992 const ORDINAL: u64 = 2402079833990398915;
7993 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7994 ::fidl_next::protocol::Flexibility::Flexible;
7995
7996 type Protocol = crate::Controller;
7997
7998 type Request = ::fidl_next::wire::EmptyMessageBody;
7999 }
8000
8001 impl ::fidl_next::TwoWayMethod for IsStarted {
8002 type Response = ::fidl_next::wire::Result<
8003 'static,
8004 crate::wire::ControllerIsStartedResponse,
8005 crate::wire::Error,
8006 >;
8007 }
8008
8009 impl<___R> ::fidl_next::Respond<___R> for IsStarted {
8010 type Output = ::core::result::Result<
8011 crate::generic::ControllerIsStartedResponse<___R>,
8012 ::fidl_next::never::Never,
8013 >;
8014
8015 fn respond(response: ___R) -> Self::Output {
8016 ::core::result::Result::Ok(crate::generic::ControllerIsStartedResponse {
8017 is_started: response,
8018 })
8019 }
8020 }
8021
8022 impl<___R> ::fidl_next::RespondErr<___R> for IsStarted {
8023 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8024
8025 fn respond_err(response: ___R) -> Self::Output {
8026 ::core::result::Result::Err(response)
8027 }
8028 }
8029
8030 pub struct OpenExposedDir;
8031
8032 impl ::fidl_next::Method for OpenExposedDir {
8033 const ORDINAL: u64 = 2683208291886099860;
8034 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8035 ::fidl_next::protocol::Flexibility::Strict;
8036
8037 type Protocol = crate::Controller;
8038
8039 type Request = crate::wire::ControllerOpenExposedDirRequest;
8040 }
8041
8042 impl ::fidl_next::TwoWayMethod for OpenExposedDir {
8043 type Response = ::fidl_next::wire::Result<
8044 'static,
8045 crate::wire::ControllerOpenExposedDirResponse,
8046 crate::wire::Error,
8047 >;
8048 }
8049
8050 impl<___R> ::fidl_next::Respond<___R> for OpenExposedDir {
8051 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
8052
8053 fn respond(response: ___R) -> Self::Output {
8054 ::core::result::Result::Ok(response)
8055 }
8056 }
8057
8058 impl<___R> ::fidl_next::RespondErr<___R> for OpenExposedDir {
8059 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8060
8061 fn respond_err(response: ___R) -> Self::Output {
8062 ::core::result::Result::Err(response)
8063 }
8064 }
8065
8066 pub struct GetExposedDictionary;
8067
8068 impl ::fidl_next::Method for GetExposedDictionary {
8069 const ORDINAL: u64 = 9099583788120940443;
8070 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8071 ::fidl_next::protocol::Flexibility::Flexible;
8072
8073 type Protocol = crate::Controller;
8074
8075 type Request = ::fidl_next::wire::EmptyMessageBody;
8076 }
8077
8078 impl ::fidl_next::TwoWayMethod for GetExposedDictionary {
8079 type Response = ::fidl_next::wire::Result<
8080 'static,
8081 crate::wire::ControllerGetExposedDictionaryResponse,
8082 crate::wire::Error,
8083 >;
8084 }
8085
8086 impl<___R> ::fidl_next::Respond<___R> for GetExposedDictionary {
8087 type Output = ::core::result::Result<
8088 crate::generic::ControllerGetExposedDictionaryResponse<___R>,
8089 ::fidl_next::never::Never,
8090 >;
8091
8092 fn respond(response: ___R) -> Self::Output {
8093 ::core::result::Result::Ok(crate::generic::ControllerGetExposedDictionaryResponse {
8094 dictionary: response,
8095 })
8096 }
8097 }
8098
8099 impl<___R> ::fidl_next::RespondErr<___R> for GetExposedDictionary {
8100 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8101
8102 fn respond_err(response: ___R) -> Self::Output {
8103 ::core::result::Result::Err(response)
8104 }
8105 }
8106
8107 pub struct GetOutputDictionary;
8108
8109 impl ::fidl_next::Method for GetOutputDictionary {
8110 const ORDINAL: u64 = 4182795765624263201;
8111 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8112 ::fidl_next::protocol::Flexibility::Flexible;
8113
8114 type Protocol = crate::Controller;
8115
8116 type Request = ::fidl_next::wire::EmptyMessageBody;
8117 }
8118
8119 impl ::fidl_next::TwoWayMethod for GetOutputDictionary {
8120 type Response = ::fidl_next::wire::Result<
8121 'static,
8122 crate::wire::ControllerGetOutputDictionaryResponse,
8123 crate::wire::Error,
8124 >;
8125 }
8126
8127 impl<___R> ::fidl_next::Respond<___R> for GetOutputDictionary {
8128 type Output = ::core::result::Result<
8129 crate::generic::ControllerGetOutputDictionaryResponse<___R>,
8130 ::fidl_next::never::Never,
8131 >;
8132
8133 fn respond(response: ___R) -> Self::Output {
8134 ::core::result::Result::Ok(crate::generic::ControllerGetOutputDictionaryResponse {
8135 dictionary: response,
8136 })
8137 }
8138 }
8139
8140 impl<___R> ::fidl_next::RespondErr<___R> for GetOutputDictionary {
8141 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8142
8143 fn respond_err(response: ___R) -> Self::Output {
8144 ::core::result::Result::Err(response)
8145 }
8146 }
8147
8148 pub struct Destroy;
8149
8150 impl ::fidl_next::Method for Destroy {
8151 const ORDINAL: u64 = 8381937394141370177;
8152 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8153 ::fidl_next::protocol::Flexibility::Flexible;
8154
8155 type Protocol = crate::Controller;
8156
8157 type Request = ::fidl_next::wire::EmptyMessageBody;
8158 }
8159
8160 impl ::fidl_next::TwoWayMethod for Destroy {
8161 type Response = ::fidl_next::wire::Result<
8162 'static,
8163 crate::wire::ControllerDestroyResponse,
8164 crate::wire::Error,
8165 >;
8166 }
8167
8168 impl<___R> ::fidl_next::Respond<___R> for Destroy {
8169 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
8170
8171 fn respond(response: ___R) -> Self::Output {
8172 ::core::result::Result::Ok(response)
8173 }
8174 }
8175
8176 impl<___R> ::fidl_next::RespondErr<___R> for Destroy {
8177 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8178
8179 fn respond_err(response: ___R) -> Self::Output {
8180 ::core::result::Result::Err(response)
8181 }
8182 }
8183
8184 mod ___detail {
8185 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Controller
8186 where
8187 ___T: ::fidl_next::Transport,
8188 {
8189 type Client = ControllerClient<___T>;
8190 type Server = ControllerServer<___T>;
8191 }
8192
8193 #[repr(transparent)]
8195 pub struct ControllerClient<___T: ::fidl_next::Transport> {
8196 #[allow(dead_code)]
8197 client: ::fidl_next::protocol::Client<___T>,
8198 }
8199
8200 impl<___T> ControllerClient<___T>
8201 where
8202 ___T: ::fidl_next::Transport,
8203 {
8204 #[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"]
8205 pub fn start(
8206 &self,
8207
8208 args: impl ::fidl_next::Encode<
8209 crate::wire::StartChildArgs<'static>,
8210 <___T as ::fidl_next::Transport>::SendBuffer,
8211 >,
8212
8213 execution_controller: impl ::fidl_next::Encode<
8214 ::fidl_next::ServerEnd<
8215 crate::ExecutionController,
8216 ::fidl_next::wire::fuchsia::Channel,
8217 >,
8218 <___T as ::fidl_next::Transport>::SendBuffer,
8219 >,
8220 ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
8221 where
8222 <___T as ::fidl_next::Transport>::SendBuffer:
8223 ::fidl_next::encoder::InternalHandleEncoder,
8224 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8225 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8226 {
8227 self.start_with(crate::generic::ControllerStartRequest {
8228 args,
8229
8230 execution_controller,
8231 })
8232 }
8233
8234 #[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"]
8235 pub fn start_with<___R>(
8236 &self,
8237 request: ___R,
8238 ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
8239 where
8240 ___R: ::fidl_next::Encode<
8241 crate::wire::ControllerStartRequest<'static>,
8242 <___T as ::fidl_next::Transport>::SendBuffer,
8243 >,
8244 {
8245 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8246 7532130149195770565,
8247 <super::Start as ::fidl_next::Method>::FLEXIBILITY,
8248 request,
8249 ))
8250 }
8251
8252 #[doc = " Returns true if this instance is currently running.\n"]
8253 pub fn is_started(&self) -> ::fidl_next::TwoWayFuture<'_, super::IsStarted, ___T> {
8254 ::fidl_next::TwoWayFuture::from_untyped(
8255 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8256 2402079833990398915,
8257 <super::IsStarted as ::fidl_next::Method>::FLEXIBILITY,
8258 (),
8259 ),
8260 )
8261 }
8262
8263 #[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"]
8264 pub fn open_exposed_dir(
8265 &self,
8266
8267 exposed_dir: impl ::fidl_next::Encode<
8268 ::fidl_next::ServerEnd<
8269 ::fidl_next_fuchsia_io::Directory,
8270 ::fidl_next::wire::fuchsia::Channel,
8271 >,
8272 <___T as ::fidl_next::Transport>::SendBuffer,
8273 >,
8274 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
8275 where
8276 <___T as ::fidl_next::Transport>::SendBuffer:
8277 ::fidl_next::encoder::InternalHandleEncoder,
8278 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8279 {
8280 self.open_exposed_dir_with(crate::generic::ControllerOpenExposedDirRequest {
8281 exposed_dir,
8282 })
8283 }
8284
8285 #[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"]
8286 pub fn open_exposed_dir_with<___R>(
8287 &self,
8288 request: ___R,
8289 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
8290 where
8291 ___R: ::fidl_next::Encode<
8292 crate::wire::ControllerOpenExposedDirRequest,
8293 <___T as ::fidl_next::Transport>::SendBuffer,
8294 >,
8295 {
8296 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8297 2683208291886099860,
8298 <super::OpenExposedDir as ::fidl_next::Method>::FLEXIBILITY,
8299 request,
8300 ))
8301 }
8302
8303 #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
8304 pub fn get_exposed_dictionary(
8305 &self,
8306 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExposedDictionary, ___T> {
8307 ::fidl_next::TwoWayFuture::from_untyped(
8308 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8309 9099583788120940443,
8310 <super::GetExposedDictionary as ::fidl_next::Method>::FLEXIBILITY,
8311 (),
8312 ),
8313 )
8314 }
8315
8316 #[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"]
8317 pub fn get_output_dictionary(
8318 &self,
8319 ) -> ::fidl_next::TwoWayFuture<'_, super::GetOutputDictionary, ___T> {
8320 ::fidl_next::TwoWayFuture::from_untyped(
8321 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8322 4182795765624263201,
8323 <super::GetOutputDictionary as ::fidl_next::Method>::FLEXIBILITY,
8324 (),
8325 ),
8326 )
8327 }
8328
8329 #[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"]
8330 pub fn destroy(&self) -> ::fidl_next::TwoWayFuture<'_, super::Destroy, ___T> {
8331 ::fidl_next::TwoWayFuture::from_untyped(
8332 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8333 8381937394141370177,
8334 <super::Destroy as ::fidl_next::Method>::FLEXIBILITY,
8335 (),
8336 ),
8337 )
8338 }
8339 }
8340
8341 #[repr(transparent)]
8343 pub struct ControllerServer<___T: ::fidl_next::Transport> {
8344 server: ::fidl_next::protocol::Server<___T>,
8345 }
8346
8347 impl<___T> ControllerServer<___T> where ___T: ::fidl_next::Transport {}
8348 }
8349}
8350
8351#[diagnostic::on_unimplemented(
8352 note = "If {Self} implements the non-local ControllerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
8353)]
8354
8355pub trait ControllerLocalClientHandler<
8359 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8360 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8361>
8362{
8363 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
8364 ::core::future::ready(())
8365 }
8366}
8367
8368impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Controller
8369where
8370 ___H: ControllerLocalClientHandler<___T>,
8371 ___T: ::fidl_next::Transport,
8372{
8373 async fn on_event(
8374 handler: &mut ___H,
8375 mut message: ::fidl_next::Message<___T>,
8376 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
8377 match *message.header().ordinal {
8378 ordinal => {
8379 handler.on_unknown_interaction(ordinal).await;
8380 if ::core::matches!(
8381 message.header().flexibility(),
8382 ::fidl_next::protocol::Flexibility::Strict
8383 ) {
8384 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8385 } else {
8386 Ok(())
8387 }
8388 }
8389 }
8390 }
8391}
8392
8393#[diagnostic::on_unimplemented(
8394 note = "If {Self} implements the non-local ControllerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
8395)]
8396
8397pub trait ControllerLocalServerHandler<
8401 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8402 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8403>
8404{
8405 #[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"]
8406 fn start(
8407 &mut self,
8408
8409 request: ::fidl_next::Request<controller::Start, ___T>,
8410
8411 responder: ::fidl_next::Responder<controller::Start, ___T>,
8412 ) -> impl ::core::future::Future<Output = ()>;
8413
8414 #[doc = " Returns true if this instance is currently running.\n"]
8415 fn is_started(
8416 &mut self,
8417
8418 responder: ::fidl_next::Responder<controller::IsStarted, ___T>,
8419 ) -> impl ::core::future::Future<Output = ()>;
8420
8421 #[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"]
8422 fn open_exposed_dir(
8423 &mut self,
8424
8425 request: ::fidl_next::Request<controller::OpenExposedDir, ___T>,
8426
8427 responder: ::fidl_next::Responder<controller::OpenExposedDir, ___T>,
8428 ) -> impl ::core::future::Future<Output = ()>;
8429
8430 #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
8431 fn get_exposed_dictionary(
8432 &mut self,
8433
8434 responder: ::fidl_next::Responder<controller::GetExposedDictionary, ___T>,
8435 ) -> impl ::core::future::Future<Output = ()>;
8436
8437 #[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"]
8438 fn get_output_dictionary(
8439 &mut self,
8440
8441 responder: ::fidl_next::Responder<controller::GetOutputDictionary, ___T>,
8442 ) -> impl ::core::future::Future<Output = ()>;
8443
8444 #[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"]
8445 fn destroy(
8446 &mut self,
8447
8448 responder: ::fidl_next::Responder<controller::Destroy, ___T>,
8449 ) -> impl ::core::future::Future<Output = ()>;
8450
8451 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
8452 ::core::future::ready(())
8453 }
8454}
8455
8456impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Controller
8457where
8458 ___H: ControllerLocalServerHandler<___T>,
8459 ___T: ::fidl_next::Transport,
8460 for<'de> crate::wire::ControllerStartRequest<'de>: ::fidl_next::Decode<
8461 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8462 Constraint = (),
8463 >,
8464 for<'de> crate::wire::ControllerOpenExposedDirRequest: ::fidl_next::Decode<
8465 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8466 Constraint = (),
8467 >,
8468{
8469 async fn on_one_way(
8470 handler: &mut ___H,
8471 mut message: ::fidl_next::Message<___T>,
8472 ) -> ::core::result::Result<
8473 (),
8474 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8475 > {
8476 match *message.header().ordinal {
8477 ordinal => {
8478 handler.on_unknown_interaction(ordinal).await;
8479 if ::core::matches!(
8480 message.header().flexibility(),
8481 ::fidl_next::protocol::Flexibility::Strict
8482 ) {
8483 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8484 } else {
8485 Ok(())
8486 }
8487 }
8488 }
8489 }
8490
8491 async fn on_two_way(
8492 handler: &mut ___H,
8493 mut message: ::fidl_next::Message<___T>,
8494 responder: ::fidl_next::protocol::Responder<___T>,
8495 ) -> ::core::result::Result<
8496 (),
8497 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8498 > {
8499 match *message.header().ordinal {
8500 7532130149195770565 => {
8501 let responder = ::fidl_next::Responder::from_untyped(responder);
8502
8503 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8504 Ok(decoded) => {
8505 handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
8506 Ok(())
8507 }
8508 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8509 ordinal: 7532130149195770565,
8510 error,
8511 }),
8512 }
8513 }
8514
8515 2402079833990398915 => {
8516 let responder = ::fidl_next::Responder::from_untyped(responder);
8517
8518 handler.is_started(responder).await;
8519 Ok(())
8520 }
8521
8522 2683208291886099860 => {
8523 let responder = ::fidl_next::Responder::from_untyped(responder);
8524
8525 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8526 Ok(decoded) => {
8527 handler
8528 .open_exposed_dir(
8529 ::fidl_next::Request::from_decoded(decoded),
8530 responder,
8531 )
8532 .await;
8533 Ok(())
8534 }
8535 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8536 ordinal: 2683208291886099860,
8537 error,
8538 }),
8539 }
8540 }
8541
8542 9099583788120940443 => {
8543 let responder = ::fidl_next::Responder::from_untyped(responder);
8544
8545 handler.get_exposed_dictionary(responder).await;
8546 Ok(())
8547 }
8548
8549 4182795765624263201 => {
8550 let responder = ::fidl_next::Responder::from_untyped(responder);
8551
8552 handler.get_output_dictionary(responder).await;
8553 Ok(())
8554 }
8555
8556 8381937394141370177 => {
8557 let responder = ::fidl_next::Responder::from_untyped(responder);
8558
8559 handler.destroy(responder).await;
8560 Ok(())
8561 }
8562
8563 ordinal => {
8564 handler.on_unknown_interaction(ordinal).await;
8565 if ::core::matches!(
8566 message.header().flexibility(),
8567 ::fidl_next::protocol::Flexibility::Strict
8568 ) {
8569 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8570 } else {
8571 responder
8572 .respond_framework_error(
8573 ordinal,
8574 ::fidl_next::FrameworkError::UnknownMethod,
8575 )
8576 .expect("encoding a framework error should never fail")
8577 .await?;
8578 Ok(())
8579 }
8580 }
8581 }
8582 }
8583}
8584
8585pub trait ControllerClientHandler<
8589 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8590 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8591>
8592{
8593 fn on_unknown_interaction(
8594 &mut self,
8595 ordinal: u64,
8596 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8597 ::core::future::ready(())
8598 }
8599}
8600
8601impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Controller
8602where
8603 ___H: ControllerClientHandler<___T> + ::core::marker::Send,
8604 ___T: ::fidl_next::Transport,
8605{
8606 async fn on_event(
8607 handler: &mut ___H,
8608 mut message: ::fidl_next::Message<___T>,
8609 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
8610 match *message.header().ordinal {
8611 ordinal => {
8612 handler.on_unknown_interaction(ordinal).await;
8613 if ::core::matches!(
8614 message.header().flexibility(),
8615 ::fidl_next::protocol::Flexibility::Strict
8616 ) {
8617 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8618 } else {
8619 Ok(())
8620 }
8621 }
8622 }
8623 }
8624}
8625
8626pub trait ControllerServerHandler<
8630 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8631 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8632>
8633{
8634 #[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"]
8635 fn start(
8636 &mut self,
8637
8638 request: ::fidl_next::Request<controller::Start, ___T>,
8639
8640 responder: ::fidl_next::Responder<controller::Start, ___T>,
8641 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8642
8643 #[doc = " Returns true if this instance is currently running.\n"]
8644 fn is_started(
8645 &mut self,
8646
8647 responder: ::fidl_next::Responder<controller::IsStarted, ___T>,
8648 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8649
8650 #[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"]
8651 fn open_exposed_dir(
8652 &mut self,
8653
8654 request: ::fidl_next::Request<controller::OpenExposedDir, ___T>,
8655
8656 responder: ::fidl_next::Responder<controller::OpenExposedDir, ___T>,
8657 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8658
8659 #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
8660 fn get_exposed_dictionary(
8661 &mut self,
8662
8663 responder: ::fidl_next::Responder<controller::GetExposedDictionary, ___T>,
8664 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8665
8666 #[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"]
8667 fn get_output_dictionary(
8668 &mut self,
8669
8670 responder: ::fidl_next::Responder<controller::GetOutputDictionary, ___T>,
8671 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8672
8673 #[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"]
8674 fn destroy(
8675 &mut self,
8676
8677 responder: ::fidl_next::Responder<controller::Destroy, ___T>,
8678 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8679
8680 fn on_unknown_interaction(
8681 &mut self,
8682 ordinal: u64,
8683 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8684 ::core::future::ready(())
8685 }
8686}
8687
8688impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Controller
8689where
8690 ___H: ControllerServerHandler<___T> + ::core::marker::Send,
8691 ___T: ::fidl_next::Transport,
8692 for<'de> crate::wire::ControllerStartRequest<'de>: ::fidl_next::Decode<
8693 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8694 Constraint = (),
8695 >,
8696 for<'de> crate::wire::ControllerOpenExposedDirRequest: ::fidl_next::Decode<
8697 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8698 Constraint = (),
8699 >,
8700{
8701 async fn on_one_way(
8702 handler: &mut ___H,
8703 mut message: ::fidl_next::Message<___T>,
8704 ) -> ::core::result::Result<
8705 (),
8706 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8707 > {
8708 match *message.header().ordinal {
8709 ordinal => {
8710 handler.on_unknown_interaction(ordinal).await;
8711 if ::core::matches!(
8712 message.header().flexibility(),
8713 ::fidl_next::protocol::Flexibility::Strict
8714 ) {
8715 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8716 } else {
8717 Ok(())
8718 }
8719 }
8720 }
8721 }
8722
8723 async fn on_two_way(
8724 handler: &mut ___H,
8725 mut message: ::fidl_next::Message<___T>,
8726 responder: ::fidl_next::protocol::Responder<___T>,
8727 ) -> ::core::result::Result<
8728 (),
8729 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8730 > {
8731 match *message.header().ordinal {
8732 7532130149195770565 => {
8733 let responder = ::fidl_next::Responder::from_untyped(responder);
8734
8735 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8736 Ok(decoded) => {
8737 handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
8738 Ok(())
8739 }
8740 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8741 ordinal: 7532130149195770565,
8742 error,
8743 }),
8744 }
8745 }
8746
8747 2402079833990398915 => {
8748 let responder = ::fidl_next::Responder::from_untyped(responder);
8749
8750 handler.is_started(responder).await;
8751 Ok(())
8752 }
8753
8754 2683208291886099860 => {
8755 let responder = ::fidl_next::Responder::from_untyped(responder);
8756
8757 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8758 Ok(decoded) => {
8759 handler
8760 .open_exposed_dir(
8761 ::fidl_next::Request::from_decoded(decoded),
8762 responder,
8763 )
8764 .await;
8765 Ok(())
8766 }
8767 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8768 ordinal: 2683208291886099860,
8769 error,
8770 }),
8771 }
8772 }
8773
8774 9099583788120940443 => {
8775 let responder = ::fidl_next::Responder::from_untyped(responder);
8776
8777 handler.get_exposed_dictionary(responder).await;
8778 Ok(())
8779 }
8780
8781 4182795765624263201 => {
8782 let responder = ::fidl_next::Responder::from_untyped(responder);
8783
8784 handler.get_output_dictionary(responder).await;
8785 Ok(())
8786 }
8787
8788 8381937394141370177 => {
8789 let responder = ::fidl_next::Responder::from_untyped(responder);
8790
8791 handler.destroy(responder).await;
8792 Ok(())
8793 }
8794
8795 ordinal => {
8796 handler.on_unknown_interaction(ordinal).await;
8797 if ::core::matches!(
8798 message.header().flexibility(),
8799 ::fidl_next::protocol::Flexibility::Strict
8800 ) {
8801 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8802 } else {
8803 responder
8804 .respond_framework_error(
8805 ordinal,
8806 ::fidl_next::FrameworkError::UnknownMethod,
8807 )
8808 .expect("encoding a framework error should never fail")
8809 .await?;
8810 Ok(())
8811 }
8812 }
8813 }
8814 }
8815}
8816
8817impl<___T> ControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
8818where
8819 ___T: ::fidl_next::Transport,
8820{
8821 async fn on_unknown_interaction(&mut self, _: u64) {}
8822}
8823
8824impl<___H, ___T> ControllerLocalClientHandler<___T> for ::fidl_next::Local<___H>
8825where
8826 ___H: ControllerClientHandler<___T>,
8827 ___T: ::fidl_next::Transport,
8828{
8829 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8830 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8831 }
8832}
8833
8834impl<___H, ___T> ControllerLocalServerHandler<___T> for ::fidl_next::Local<___H>
8835where
8836 ___H: ControllerServerHandler<___T>,
8837 ___T: ::fidl_next::Transport,
8838{
8839 async fn start(
8840 &mut self,
8841
8842 request: ::fidl_next::Request<controller::Start, ___T>,
8843
8844 responder: ::fidl_next::Responder<controller::Start, ___T>,
8845 ) {
8846 ___H::start(&mut self.0, request, responder).await
8847 }
8848
8849 async fn is_started(&mut self, responder: ::fidl_next::Responder<controller::IsStarted, ___T>) {
8850 ___H::is_started(&mut self.0, responder).await
8851 }
8852
8853 async fn open_exposed_dir(
8854 &mut self,
8855
8856 request: ::fidl_next::Request<controller::OpenExposedDir, ___T>,
8857
8858 responder: ::fidl_next::Responder<controller::OpenExposedDir, ___T>,
8859 ) {
8860 ___H::open_exposed_dir(&mut self.0, request, responder).await
8861 }
8862
8863 async fn get_exposed_dictionary(
8864 &mut self,
8865
8866 responder: ::fidl_next::Responder<controller::GetExposedDictionary, ___T>,
8867 ) {
8868 ___H::get_exposed_dictionary(&mut self.0, responder).await
8869 }
8870
8871 async fn get_output_dictionary(
8872 &mut self,
8873
8874 responder: ::fidl_next::Responder<controller::GetOutputDictionary, ___T>,
8875 ) {
8876 ___H::get_output_dictionary(&mut self.0, responder).await
8877 }
8878
8879 async fn destroy(&mut self, responder: ::fidl_next::Responder<controller::Destroy, ___T>) {
8880 ___H::destroy(&mut self.0, responder).await
8881 }
8882
8883 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8884 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8885 }
8886}
8887
8888#[doc = " Listener for events on the component hierarchy.\n Can\'t be used outside of the platform.\n"]
8890#[derive(PartialEq, Debug)]
8891pub struct EventStream;
8892
8893impl ::fidl_next::Discoverable for EventStream {
8894 const PROTOCOL_NAME: &'static str = "fuchsia.component.EventStream";
8895}
8896
8897#[cfg(target_os = "fuchsia")]
8898impl ::fidl_next::HasTransport for EventStream {
8899 type Transport = ::fidl_next::fuchsia::zx::Channel;
8900}
8901
8902pub mod event_stream {
8903 pub mod prelude {
8904 pub use crate::{
8905 EventStream, EventStreamClientHandler, EventStreamLocalClientHandler,
8906 EventStreamLocalServerHandler, EventStreamServerHandler, event_stream,
8907 };
8908
8909 pub use crate::natural::EventStreamGetNextResponse;
8910 }
8911
8912 pub struct GetNext;
8913
8914 impl ::fidl_next::Method for GetNext {
8915 const ORDINAL: u64 = 4549982840421936006;
8916 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8917 ::fidl_next::protocol::Flexibility::Strict;
8918
8919 type Protocol = crate::EventStream;
8920
8921 type Request = ::fidl_next::wire::EmptyMessageBody;
8922 }
8923
8924 impl ::fidl_next::TwoWayMethod for GetNext {
8925 type Response = ::fidl_next::wire::Strict<crate::wire::EventStreamGetNextResponse<'static>>;
8926 }
8927
8928 impl<___R> ::fidl_next::Respond<___R> for GetNext {
8929 type Output = ::fidl_next::Strict<crate::generic::EventStreamGetNextResponse<___R>>;
8930
8931 fn respond(response: ___R) -> Self::Output {
8932 ::fidl_next::Strict(crate::generic::EventStreamGetNextResponse { events: response })
8933 }
8934 }
8935
8936 pub struct WaitForReady;
8937
8938 impl ::fidl_next::Method for WaitForReady {
8939 const ORDINAL: u64 = 3545212058508387970;
8940 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8941 ::fidl_next::protocol::Flexibility::Strict;
8942
8943 type Protocol = crate::EventStream;
8944
8945 type Request = ::fidl_next::wire::EmptyMessageBody;
8946 }
8947
8948 impl ::fidl_next::TwoWayMethod for WaitForReady {
8949 type Response = ::fidl_next::wire::Strict<::fidl_next::wire::EmptyMessageBody>;
8950 }
8951
8952 impl<___R> ::fidl_next::Respond<___R> for WaitForReady {
8953 type Output = ::fidl_next::Strict<___R>;
8954
8955 fn respond(response: ___R) -> Self::Output {
8956 ::fidl_next::Strict(response)
8957 }
8958 }
8959
8960 mod ___detail {
8961 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::EventStream
8962 where
8963 ___T: ::fidl_next::Transport,
8964 {
8965 type Client = EventStreamClient<___T>;
8966 type Server = EventStreamServer<___T>;
8967 }
8968
8969 #[repr(transparent)]
8971 pub struct EventStreamClient<___T: ::fidl_next::Transport> {
8972 #[allow(dead_code)]
8973 client: ::fidl_next::protocol::Client<___T>,
8974 }
8975
8976 impl<___T> EventStreamClient<___T>
8977 where
8978 ___T: ::fidl_next::Transport,
8979 {
8980 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
8981 ::fidl_next::TwoWayFuture::from_untyped(
8982 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8983 4549982840421936006,
8984 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
8985 (),
8986 ),
8987 )
8988 }
8989
8990 #[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"]
8991 pub fn wait_for_ready(
8992 &self,
8993 ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForReady, ___T> {
8994 ::fidl_next::TwoWayFuture::from_untyped(
8995 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8996 3545212058508387970,
8997 <super::WaitForReady as ::fidl_next::Method>::FLEXIBILITY,
8998 (),
8999 ),
9000 )
9001 }
9002 }
9003
9004 #[repr(transparent)]
9006 pub struct EventStreamServer<___T: ::fidl_next::Transport> {
9007 server: ::fidl_next::protocol::Server<___T>,
9008 }
9009
9010 impl<___T> EventStreamServer<___T> where ___T: ::fidl_next::Transport {}
9011 }
9012}
9013
9014#[diagnostic::on_unimplemented(
9015 note = "If {Self} implements the non-local EventStreamClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
9016)]
9017
9018pub trait EventStreamLocalClientHandler<
9022 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9023 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9024>
9025{
9026}
9027
9028impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for EventStream
9029where
9030 ___H: EventStreamLocalClientHandler<___T>,
9031 ___T: ::fidl_next::Transport,
9032{
9033 async fn on_event(
9034 handler: &mut ___H,
9035 mut message: ::fidl_next::Message<___T>,
9036 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9037 match *message.header().ordinal {
9038 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9039 }
9040 }
9041}
9042
9043#[diagnostic::on_unimplemented(
9044 note = "If {Self} implements the non-local EventStreamServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
9045)]
9046
9047pub trait EventStreamLocalServerHandler<
9051 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9052 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9053>
9054{
9055 fn get_next(
9056 &mut self,
9057
9058 responder: ::fidl_next::Responder<event_stream::GetNext, ___T>,
9059 ) -> impl ::core::future::Future<Output = ()>;
9060
9061 #[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"]
9062 fn wait_for_ready(
9063 &mut self,
9064
9065 responder: ::fidl_next::Responder<event_stream::WaitForReady, ___T>,
9066 ) -> impl ::core::future::Future<Output = ()>;
9067}
9068
9069impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for EventStream
9070where
9071 ___H: EventStreamLocalServerHandler<___T>,
9072 ___T: ::fidl_next::Transport,
9073{
9074 async fn on_one_way(
9075 handler: &mut ___H,
9076 mut message: ::fidl_next::Message<___T>,
9077 ) -> ::core::result::Result<
9078 (),
9079 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9080 > {
9081 match *message.header().ordinal {
9082 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9083 }
9084 }
9085
9086 async fn on_two_way(
9087 handler: &mut ___H,
9088 mut message: ::fidl_next::Message<___T>,
9089 responder: ::fidl_next::protocol::Responder<___T>,
9090 ) -> ::core::result::Result<
9091 (),
9092 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9093 > {
9094 match *message.header().ordinal {
9095 4549982840421936006 => {
9096 let responder = ::fidl_next::Responder::from_untyped(responder);
9097
9098 handler.get_next(responder).await;
9099 Ok(())
9100 }
9101
9102 3545212058508387970 => {
9103 let responder = ::fidl_next::Responder::from_untyped(responder);
9104
9105 handler.wait_for_ready(responder).await;
9106 Ok(())
9107 }
9108
9109 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9110 }
9111 }
9112}
9113
9114pub trait EventStreamClientHandler<
9118 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9119 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9120>
9121{
9122}
9123
9124impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for EventStream
9125where
9126 ___H: EventStreamClientHandler<___T> + ::core::marker::Send,
9127 ___T: ::fidl_next::Transport,
9128{
9129 async fn on_event(
9130 handler: &mut ___H,
9131 mut message: ::fidl_next::Message<___T>,
9132 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9133 match *message.header().ordinal {
9134 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9135 }
9136 }
9137}
9138
9139pub trait EventStreamServerHandler<
9143 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9144 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9145>
9146{
9147 fn get_next(
9148 &mut self,
9149
9150 responder: ::fidl_next::Responder<event_stream::GetNext, ___T>,
9151 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9152
9153 #[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"]
9154 fn wait_for_ready(
9155 &mut self,
9156
9157 responder: ::fidl_next::Responder<event_stream::WaitForReady, ___T>,
9158 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9159}
9160
9161impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for EventStream
9162where
9163 ___H: EventStreamServerHandler<___T> + ::core::marker::Send,
9164 ___T: ::fidl_next::Transport,
9165{
9166 async fn on_one_way(
9167 handler: &mut ___H,
9168 mut message: ::fidl_next::Message<___T>,
9169 ) -> ::core::result::Result<
9170 (),
9171 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9172 > {
9173 match *message.header().ordinal {
9174 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9175 }
9176 }
9177
9178 async fn on_two_way(
9179 handler: &mut ___H,
9180 mut message: ::fidl_next::Message<___T>,
9181 responder: ::fidl_next::protocol::Responder<___T>,
9182 ) -> ::core::result::Result<
9183 (),
9184 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9185 > {
9186 match *message.header().ordinal {
9187 4549982840421936006 => {
9188 let responder = ::fidl_next::Responder::from_untyped(responder);
9189
9190 handler.get_next(responder).await;
9191 Ok(())
9192 }
9193
9194 3545212058508387970 => {
9195 let responder = ::fidl_next::Responder::from_untyped(responder);
9196
9197 handler.wait_for_ready(responder).await;
9198 Ok(())
9199 }
9200
9201 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
9202 }
9203 }
9204}
9205
9206impl<___T> EventStreamClientHandler<___T> for ::fidl_next::IgnoreEvents where
9207 ___T: ::fidl_next::Transport
9208{
9209}
9210
9211impl<___H, ___T> EventStreamLocalClientHandler<___T> for ::fidl_next::Local<___H>
9212where
9213 ___H: EventStreamClientHandler<___T>,
9214 ___T: ::fidl_next::Transport,
9215{
9216}
9217
9218impl<___H, ___T> EventStreamLocalServerHandler<___T> for ::fidl_next::Local<___H>
9219where
9220 ___H: EventStreamServerHandler<___T>,
9221 ___T: ::fidl_next::Transport,
9222{
9223 async fn get_next(&mut self, responder: ::fidl_next::Responder<event_stream::GetNext, ___T>) {
9224 ___H::get_next(&mut self.0, responder).await
9225 }
9226
9227 async fn wait_for_ready(
9228 &mut self,
9229
9230 responder: ::fidl_next::Responder<event_stream::WaitForReady, ___T>,
9231 ) {
9232 ___H::wait_for_ready(&mut self.0, responder).await
9233 }
9234}
9235
9236#[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"]
9238#[derive(PartialEq, Debug)]
9239pub struct Introspector;
9240
9241impl ::fidl_next::Discoverable for Introspector {
9242 const PROTOCOL_NAME: &'static str = "fuchsia.component.Introspector";
9243}
9244
9245#[cfg(target_os = "fuchsia")]
9246impl ::fidl_next::HasTransport for Introspector {
9247 type Transport = ::fidl_next::fuchsia::zx::Channel;
9248}
9249
9250pub mod introspector {
9251 pub mod prelude {
9252 pub use crate::{
9253 Introspector, IntrospectorClientHandler, IntrospectorLocalClientHandler,
9254 IntrospectorLocalServerHandler, IntrospectorServerHandler, introspector,
9255 };
9256
9257 pub use crate::natural::Error;
9258
9259 pub use crate::natural::IntrospectorGetMonikerRequest;
9260
9261 pub use crate::natural::IntrospectorGetMonikerResponse;
9262 }
9263
9264 pub struct GetMoniker;
9265
9266 impl ::fidl_next::Method for GetMoniker {
9267 const ORDINAL: u64 = 214344082539672664;
9268 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9269 ::fidl_next::protocol::Flexibility::Flexible;
9270
9271 type Protocol = crate::Introspector;
9272
9273 type Request = crate::wire::IntrospectorGetMonikerRequest;
9274 }
9275
9276 impl ::fidl_next::TwoWayMethod for GetMoniker {
9277 type Response = ::fidl_next::wire::Result<
9278 'static,
9279 crate::wire::IntrospectorGetMonikerResponse<'static>,
9280 crate::wire::Error,
9281 >;
9282 }
9283
9284 impl<___R> ::fidl_next::Respond<___R> for GetMoniker {
9285 type Output = ::core::result::Result<
9286 crate::generic::IntrospectorGetMonikerResponse<___R>,
9287 ::fidl_next::never::Never,
9288 >;
9289
9290 fn respond(response: ___R) -> Self::Output {
9291 ::core::result::Result::Ok(crate::generic::IntrospectorGetMonikerResponse {
9292 moniker: response,
9293 })
9294 }
9295 }
9296
9297 impl<___R> ::fidl_next::RespondErr<___R> for GetMoniker {
9298 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9299
9300 fn respond_err(response: ___R) -> Self::Output {
9301 ::core::result::Result::Err(response)
9302 }
9303 }
9304
9305 mod ___detail {
9306 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Introspector
9307 where
9308 ___T: ::fidl_next::Transport,
9309 {
9310 type Client = IntrospectorClient<___T>;
9311 type Server = IntrospectorServer<___T>;
9312 }
9313
9314 #[repr(transparent)]
9316 pub struct IntrospectorClient<___T: ::fidl_next::Transport> {
9317 #[allow(dead_code)]
9318 client: ::fidl_next::protocol::Client<___T>,
9319 }
9320
9321 impl<___T> IntrospectorClient<___T>
9322 where
9323 ___T: ::fidl_next::Transport,
9324 {
9325 #[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"]
9326 pub fn get_moniker(
9327 &self,
9328
9329 component_instance: impl ::fidl_next::Encode<
9330 ::fidl_next::wire::fuchsia::Event,
9331 <___T as ::fidl_next::Transport>::SendBuffer,
9332 >,
9333 ) -> ::fidl_next::TwoWayFuture<'_, super::GetMoniker, ___T>
9334 where
9335 <___T as ::fidl_next::Transport>::SendBuffer:
9336 ::fidl_next::encoder::InternalHandleEncoder,
9337 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9338 {
9339 self.get_moniker_with(crate::generic::IntrospectorGetMonikerRequest {
9340 component_instance,
9341 })
9342 }
9343
9344 #[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"]
9345 pub fn get_moniker_with<___R>(
9346 &self,
9347 request: ___R,
9348 ) -> ::fidl_next::TwoWayFuture<'_, super::GetMoniker, ___T>
9349 where
9350 ___R: ::fidl_next::Encode<
9351 crate::wire::IntrospectorGetMonikerRequest,
9352 <___T as ::fidl_next::Transport>::SendBuffer,
9353 >,
9354 {
9355 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9356 214344082539672664,
9357 <super::GetMoniker as ::fidl_next::Method>::FLEXIBILITY,
9358 request,
9359 ))
9360 }
9361 }
9362
9363 #[repr(transparent)]
9365 pub struct IntrospectorServer<___T: ::fidl_next::Transport> {
9366 server: ::fidl_next::protocol::Server<___T>,
9367 }
9368
9369 impl<___T> IntrospectorServer<___T> where ___T: ::fidl_next::Transport {}
9370 }
9371}
9372
9373#[diagnostic::on_unimplemented(
9374 note = "If {Self} implements the non-local IntrospectorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
9375)]
9376
9377pub trait IntrospectorLocalClientHandler<
9381 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9382 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9383>
9384{
9385 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
9386 ::core::future::ready(())
9387 }
9388}
9389
9390impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Introspector
9391where
9392 ___H: IntrospectorLocalClientHandler<___T>,
9393 ___T: ::fidl_next::Transport,
9394{
9395 async fn on_event(
9396 handler: &mut ___H,
9397 mut message: ::fidl_next::Message<___T>,
9398 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9399 match *message.header().ordinal {
9400 ordinal => {
9401 handler.on_unknown_interaction(ordinal).await;
9402 if ::core::matches!(
9403 message.header().flexibility(),
9404 ::fidl_next::protocol::Flexibility::Strict
9405 ) {
9406 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9407 } else {
9408 Ok(())
9409 }
9410 }
9411 }
9412 }
9413}
9414
9415#[diagnostic::on_unimplemented(
9416 note = "If {Self} implements the non-local IntrospectorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
9417)]
9418
9419pub trait IntrospectorLocalServerHandler<
9423 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9424 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9425>
9426{
9427 #[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"]
9428 fn get_moniker(
9429 &mut self,
9430
9431 request: ::fidl_next::Request<introspector::GetMoniker, ___T>,
9432
9433 responder: ::fidl_next::Responder<introspector::GetMoniker, ___T>,
9434 ) -> impl ::core::future::Future<Output = ()>;
9435
9436 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
9437 ::core::future::ready(())
9438 }
9439}
9440
9441impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Introspector
9442where
9443 ___H: IntrospectorLocalServerHandler<___T>,
9444 ___T: ::fidl_next::Transport,
9445 for<'de> crate::wire::IntrospectorGetMonikerRequest: ::fidl_next::Decode<
9446 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9447 Constraint = (),
9448 >,
9449{
9450 async fn on_one_way(
9451 handler: &mut ___H,
9452 mut message: ::fidl_next::Message<___T>,
9453 ) -> ::core::result::Result<
9454 (),
9455 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9456 > {
9457 match *message.header().ordinal {
9458 ordinal => {
9459 handler.on_unknown_interaction(ordinal).await;
9460 if ::core::matches!(
9461 message.header().flexibility(),
9462 ::fidl_next::protocol::Flexibility::Strict
9463 ) {
9464 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9465 } else {
9466 Ok(())
9467 }
9468 }
9469 }
9470 }
9471
9472 async fn on_two_way(
9473 handler: &mut ___H,
9474 mut message: ::fidl_next::Message<___T>,
9475 responder: ::fidl_next::protocol::Responder<___T>,
9476 ) -> ::core::result::Result<
9477 (),
9478 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9479 > {
9480 match *message.header().ordinal {
9481 214344082539672664 => {
9482 let responder = ::fidl_next::Responder::from_untyped(responder);
9483
9484 match ::fidl_next::AsDecoderExt::into_decoded(message) {
9485 Ok(decoded) => {
9486 handler
9487 .get_moniker(::fidl_next::Request::from_decoded(decoded), responder)
9488 .await;
9489 Ok(())
9490 }
9491 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9492 ordinal: 214344082539672664,
9493 error,
9494 }),
9495 }
9496 }
9497
9498 ordinal => {
9499 handler.on_unknown_interaction(ordinal).await;
9500 if ::core::matches!(
9501 message.header().flexibility(),
9502 ::fidl_next::protocol::Flexibility::Strict
9503 ) {
9504 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9505 } else {
9506 responder
9507 .respond_framework_error(
9508 ordinal,
9509 ::fidl_next::FrameworkError::UnknownMethod,
9510 )
9511 .expect("encoding a framework error should never fail")
9512 .await?;
9513 Ok(())
9514 }
9515 }
9516 }
9517 }
9518}
9519
9520pub trait IntrospectorClientHandler<
9524 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9525 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9526>
9527{
9528 fn on_unknown_interaction(
9529 &mut self,
9530 ordinal: u64,
9531 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9532 ::core::future::ready(())
9533 }
9534}
9535
9536impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Introspector
9537where
9538 ___H: IntrospectorClientHandler<___T> + ::core::marker::Send,
9539 ___T: ::fidl_next::Transport,
9540{
9541 async fn on_event(
9542 handler: &mut ___H,
9543 mut message: ::fidl_next::Message<___T>,
9544 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9545 match *message.header().ordinal {
9546 ordinal => {
9547 handler.on_unknown_interaction(ordinal).await;
9548 if ::core::matches!(
9549 message.header().flexibility(),
9550 ::fidl_next::protocol::Flexibility::Strict
9551 ) {
9552 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9553 } else {
9554 Ok(())
9555 }
9556 }
9557 }
9558 }
9559}
9560
9561pub trait IntrospectorServerHandler<
9565 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9566 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9567>
9568{
9569 #[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"]
9570 fn get_moniker(
9571 &mut self,
9572
9573 request: ::fidl_next::Request<introspector::GetMoniker, ___T>,
9574
9575 responder: ::fidl_next::Responder<introspector::GetMoniker, ___T>,
9576 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9577
9578 fn on_unknown_interaction(
9579 &mut self,
9580 ordinal: u64,
9581 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9582 ::core::future::ready(())
9583 }
9584}
9585
9586impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Introspector
9587where
9588 ___H: IntrospectorServerHandler<___T> + ::core::marker::Send,
9589 ___T: ::fidl_next::Transport,
9590 for<'de> crate::wire::IntrospectorGetMonikerRequest: ::fidl_next::Decode<
9591 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9592 Constraint = (),
9593 >,
9594{
9595 async fn on_one_way(
9596 handler: &mut ___H,
9597 mut message: ::fidl_next::Message<___T>,
9598 ) -> ::core::result::Result<
9599 (),
9600 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9601 > {
9602 match *message.header().ordinal {
9603 ordinal => {
9604 handler.on_unknown_interaction(ordinal).await;
9605 if ::core::matches!(
9606 message.header().flexibility(),
9607 ::fidl_next::protocol::Flexibility::Strict
9608 ) {
9609 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9610 } else {
9611 Ok(())
9612 }
9613 }
9614 }
9615 }
9616
9617 async fn on_two_way(
9618 handler: &mut ___H,
9619 mut message: ::fidl_next::Message<___T>,
9620 responder: ::fidl_next::protocol::Responder<___T>,
9621 ) -> ::core::result::Result<
9622 (),
9623 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9624 > {
9625 match *message.header().ordinal {
9626 214344082539672664 => {
9627 let responder = ::fidl_next::Responder::from_untyped(responder);
9628
9629 match ::fidl_next::AsDecoderExt::into_decoded(message) {
9630 Ok(decoded) => {
9631 handler
9632 .get_moniker(::fidl_next::Request::from_decoded(decoded), responder)
9633 .await;
9634 Ok(())
9635 }
9636 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9637 ordinal: 214344082539672664,
9638 error,
9639 }),
9640 }
9641 }
9642
9643 ordinal => {
9644 handler.on_unknown_interaction(ordinal).await;
9645 if ::core::matches!(
9646 message.header().flexibility(),
9647 ::fidl_next::protocol::Flexibility::Strict
9648 ) {
9649 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9650 } else {
9651 responder
9652 .respond_framework_error(
9653 ordinal,
9654 ::fidl_next::FrameworkError::UnknownMethod,
9655 )
9656 .expect("encoding a framework error should never fail")
9657 .await?;
9658 Ok(())
9659 }
9660 }
9661 }
9662 }
9663}
9664
9665impl<___T> IntrospectorClientHandler<___T> for ::fidl_next::IgnoreEvents
9666where
9667 ___T: ::fidl_next::Transport,
9668{
9669 async fn on_unknown_interaction(&mut self, _: u64) {}
9670}
9671
9672impl<___H, ___T> IntrospectorLocalClientHandler<___T> for ::fidl_next::Local<___H>
9673where
9674 ___H: IntrospectorClientHandler<___T>,
9675 ___T: ::fidl_next::Transport,
9676{
9677 async fn on_unknown_interaction(&mut self, ordinal: u64) {
9678 ___H::on_unknown_interaction(&mut self.0, ordinal).await
9679 }
9680}
9681
9682impl<___H, ___T> IntrospectorLocalServerHandler<___T> for ::fidl_next::Local<___H>
9683where
9684 ___H: IntrospectorServerHandler<___T>,
9685 ___T: ::fidl_next::Transport,
9686{
9687 async fn get_moniker(
9688 &mut self,
9689
9690 request: ::fidl_next::Request<introspector::GetMoniker, ___T>,
9691
9692 responder: ::fidl_next::Responder<introspector::GetMoniker, ___T>,
9693 ) {
9694 ___H::get_moniker(&mut self.0, request, responder).await
9695 }
9696
9697 async fn on_unknown_interaction(&mut self, ordinal: u64) {
9698 ___H::on_unknown_interaction(&mut self.0, ordinal).await
9699 }
9700}
9701
9702#[doc = " Protocol for performing namespace operations.\n"]
9704#[derive(PartialEq, Debug)]
9705pub struct Namespace;
9706
9707impl ::fidl_next::Discoverable for Namespace {
9708 const PROTOCOL_NAME: &'static str = "fuchsia.component.Namespace";
9709}
9710
9711#[cfg(target_os = "fuchsia")]
9712impl ::fidl_next::HasTransport for Namespace {
9713 type Transport = ::fidl_next::fuchsia::zx::Channel;
9714}
9715
9716pub mod namespace {
9717 pub mod prelude {
9718 pub use crate::{
9719 Namespace, NamespaceClientHandler, NamespaceLocalClientHandler,
9720 NamespaceLocalServerHandler, NamespaceServerHandler, namespace,
9721 };
9722
9723 pub use crate::natural::NamespaceCreate2Request;
9724
9725 pub use crate::natural::NamespaceCreateRequest;
9726
9727 pub use crate::natural::NamespaceError;
9728
9729 pub use crate::natural::NamespaceCreate2Response;
9730
9731 pub use crate::natural::NamespaceCreateResponse;
9732 }
9733
9734 pub struct Create;
9735
9736 impl ::fidl_next::Method for Create {
9737 const ORDINAL: u64 = 4839678630846501113;
9738 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9739 ::fidl_next::protocol::Flexibility::Flexible;
9740
9741 type Protocol = crate::Namespace;
9742
9743 type Request = crate::wire::NamespaceCreateRequest<'static>;
9744 }
9745
9746 impl ::fidl_next::TwoWayMethod for Create {
9747 type Response = ::fidl_next::wire::Result<
9748 'static,
9749 crate::wire::NamespaceCreateResponse<'static>,
9750 crate::wire::NamespaceError,
9751 >;
9752 }
9753
9754 impl<___R> ::fidl_next::Respond<___R> for Create {
9755 type Output = ::core::result::Result<
9756 crate::generic::NamespaceCreateResponse<___R>,
9757 ::fidl_next::never::Never,
9758 >;
9759
9760 fn respond(response: ___R) -> Self::Output {
9761 ::core::result::Result::Ok(crate::generic::NamespaceCreateResponse {
9762 entries: response,
9763 })
9764 }
9765 }
9766
9767 impl<___R> ::fidl_next::RespondErr<___R> for Create {
9768 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9769
9770 fn respond_err(response: ___R) -> Self::Output {
9771 ::core::result::Result::Err(response)
9772 }
9773 }
9774
9775 pub struct Create2;
9776
9777 impl ::fidl_next::Method for Create2 {
9778 const ORDINAL: u64 = 7375388463768777553;
9779 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9780 ::fidl_next::protocol::Flexibility::Flexible;
9781
9782 type Protocol = crate::Namespace;
9783
9784 type Request = crate::wire::NamespaceCreate2Request<'static>;
9785 }
9786
9787 impl ::fidl_next::TwoWayMethod for Create2 {
9788 type Response = ::fidl_next::wire::Result<
9789 'static,
9790 crate::wire::NamespaceCreate2Response<'static>,
9791 crate::wire::NamespaceError,
9792 >;
9793 }
9794
9795 impl<___R> ::fidl_next::Respond<___R> for Create2 {
9796 type Output = ::core::result::Result<
9797 crate::generic::NamespaceCreate2Response<___R>,
9798 ::fidl_next::never::Never,
9799 >;
9800
9801 fn respond(response: ___R) -> Self::Output {
9802 ::core::result::Result::Ok(crate::generic::NamespaceCreate2Response {
9803 entries: response,
9804 })
9805 }
9806 }
9807
9808 impl<___R> ::fidl_next::RespondErr<___R> for Create2 {
9809 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9810
9811 fn respond_err(response: ___R) -> Self::Output {
9812 ::core::result::Result::Err(response)
9813 }
9814 }
9815
9816 mod ___detail {
9817 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Namespace
9818 where
9819 ___T: ::fidl_next::Transport,
9820 {
9821 type Client = NamespaceClient<___T>;
9822 type Server = NamespaceServer<___T>;
9823 }
9824
9825 #[repr(transparent)]
9827 pub struct NamespaceClient<___T: ::fidl_next::Transport> {
9828 #[allow(dead_code)]
9829 client: ::fidl_next::protocol::Client<___T>,
9830 }
9831
9832 impl<___T> NamespaceClient<___T>
9833 where
9834 ___T: ::fidl_next::Transport,
9835 {
9836 pub fn create(
9837 &self,
9838
9839 entries: impl ::fidl_next::Encode<
9840 ::fidl_next::wire::Vector<'static, crate::wire::NamespaceInputEntry<'static>>,
9841 <___T as ::fidl_next::Transport>::SendBuffer,
9842 >,
9843 ) -> ::fidl_next::TwoWayFuture<'_, super::Create, ___T>
9844 where
9845 <___T as ::fidl_next::Transport>::SendBuffer:
9846 ::fidl_next::encoder::InternalHandleEncoder,
9847 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9848 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9849 {
9850 self.create_with(crate::generic::NamespaceCreateRequest { entries })
9851 }
9852
9853 pub fn create_with<___R>(
9854 &self,
9855 request: ___R,
9856 ) -> ::fidl_next::TwoWayFuture<'_, super::Create, ___T>
9857 where
9858 ___R: ::fidl_next::Encode<
9859 crate::wire::NamespaceCreateRequest<'static>,
9860 <___T as ::fidl_next::Transport>::SendBuffer,
9861 >,
9862 {
9863 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9864 4839678630846501113,
9865 <super::Create as ::fidl_next::Method>::FLEXIBILITY,
9866 request,
9867 ))
9868 }
9869
9870 pub fn create2(
9871 &self,
9872
9873 entries: impl ::fidl_next::Encode<
9874 ::fidl_next::wire::Vector<'static, crate::wire::NamespaceInputEntry2<'static>>,
9875 <___T as ::fidl_next::Transport>::SendBuffer,
9876 >,
9877 ) -> ::fidl_next::TwoWayFuture<'_, super::Create2, ___T>
9878 where
9879 <___T as ::fidl_next::Transport>::SendBuffer:
9880 ::fidl_next::encoder::InternalHandleEncoder,
9881 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9882 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9883 {
9884 self.create2_with(crate::generic::NamespaceCreate2Request { entries })
9885 }
9886
9887 pub fn create2_with<___R>(
9888 &self,
9889 request: ___R,
9890 ) -> ::fidl_next::TwoWayFuture<'_, super::Create2, ___T>
9891 where
9892 ___R: ::fidl_next::Encode<
9893 crate::wire::NamespaceCreate2Request<'static>,
9894 <___T as ::fidl_next::Transport>::SendBuffer,
9895 >,
9896 {
9897 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9898 7375388463768777553,
9899 <super::Create2 as ::fidl_next::Method>::FLEXIBILITY,
9900 request,
9901 ))
9902 }
9903 }
9904
9905 #[repr(transparent)]
9907 pub struct NamespaceServer<___T: ::fidl_next::Transport> {
9908 server: ::fidl_next::protocol::Server<___T>,
9909 }
9910
9911 impl<___T> NamespaceServer<___T> where ___T: ::fidl_next::Transport {}
9912 }
9913}
9914
9915#[diagnostic::on_unimplemented(
9916 note = "If {Self} implements the non-local NamespaceClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
9917)]
9918
9919pub trait NamespaceLocalClientHandler<
9923 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9924 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9925>
9926{
9927 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
9928 ::core::future::ready(())
9929 }
9930}
9931
9932impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Namespace
9933where
9934 ___H: NamespaceLocalClientHandler<___T>,
9935 ___T: ::fidl_next::Transport,
9936{
9937 async fn on_event(
9938 handler: &mut ___H,
9939 mut message: ::fidl_next::Message<___T>,
9940 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9941 match *message.header().ordinal {
9942 ordinal => {
9943 handler.on_unknown_interaction(ordinal).await;
9944 if ::core::matches!(
9945 message.header().flexibility(),
9946 ::fidl_next::protocol::Flexibility::Strict
9947 ) {
9948 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9949 } else {
9950 Ok(())
9951 }
9952 }
9953 }
9954 }
9955}
9956
9957#[diagnostic::on_unimplemented(
9958 note = "If {Self} implements the non-local NamespaceServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
9959)]
9960
9961pub trait NamespaceLocalServerHandler<
9965 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9966 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9967>
9968{
9969 fn create(
9970 &mut self,
9971
9972 request: ::fidl_next::Request<namespace::Create, ___T>,
9973
9974 responder: ::fidl_next::Responder<namespace::Create, ___T>,
9975 ) -> impl ::core::future::Future<Output = ()>;
9976
9977 fn create2(
9978 &mut self,
9979
9980 request: ::fidl_next::Request<namespace::Create2, ___T>,
9981
9982 responder: ::fidl_next::Responder<namespace::Create2, ___T>,
9983 ) -> impl ::core::future::Future<Output = ()>;
9984
9985 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
9986 ::core::future::ready(())
9987 }
9988}
9989
9990impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Namespace
9991where
9992 ___H: NamespaceLocalServerHandler<___T>,
9993 ___T: ::fidl_next::Transport,
9994 for<'de> crate::wire::NamespaceCreateRequest<'de>: ::fidl_next::Decode<
9995 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9996 Constraint = (),
9997 >,
9998 for<'de> crate::wire::NamespaceCreate2Request<'de>: ::fidl_next::Decode<
9999 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10000 Constraint = (),
10001 >,
10002{
10003 async fn on_one_way(
10004 handler: &mut ___H,
10005 mut message: ::fidl_next::Message<___T>,
10006 ) -> ::core::result::Result<
10007 (),
10008 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10009 > {
10010 match *message.header().ordinal {
10011 ordinal => {
10012 handler.on_unknown_interaction(ordinal).await;
10013 if ::core::matches!(
10014 message.header().flexibility(),
10015 ::fidl_next::protocol::Flexibility::Strict
10016 ) {
10017 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10018 } else {
10019 Ok(())
10020 }
10021 }
10022 }
10023 }
10024
10025 async fn on_two_way(
10026 handler: &mut ___H,
10027 mut message: ::fidl_next::Message<___T>,
10028 responder: ::fidl_next::protocol::Responder<___T>,
10029 ) -> ::core::result::Result<
10030 (),
10031 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10032 > {
10033 match *message.header().ordinal {
10034 4839678630846501113 => {
10035 let responder = ::fidl_next::Responder::from_untyped(responder);
10036
10037 match ::fidl_next::AsDecoderExt::into_decoded(message) {
10038 Ok(decoded) => {
10039 handler
10040 .create(::fidl_next::Request::from_decoded(decoded), responder)
10041 .await;
10042 Ok(())
10043 }
10044 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10045 ordinal: 4839678630846501113,
10046 error,
10047 }),
10048 }
10049 }
10050
10051 7375388463768777553 => {
10052 let responder = ::fidl_next::Responder::from_untyped(responder);
10053
10054 match ::fidl_next::AsDecoderExt::into_decoded(message) {
10055 Ok(decoded) => {
10056 handler
10057 .create2(::fidl_next::Request::from_decoded(decoded), responder)
10058 .await;
10059 Ok(())
10060 }
10061 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10062 ordinal: 7375388463768777553,
10063 error,
10064 }),
10065 }
10066 }
10067
10068 ordinal => {
10069 handler.on_unknown_interaction(ordinal).await;
10070 if ::core::matches!(
10071 message.header().flexibility(),
10072 ::fidl_next::protocol::Flexibility::Strict
10073 ) {
10074 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10075 } else {
10076 responder
10077 .respond_framework_error(
10078 ordinal,
10079 ::fidl_next::FrameworkError::UnknownMethod,
10080 )
10081 .expect("encoding a framework error should never fail")
10082 .await?;
10083 Ok(())
10084 }
10085 }
10086 }
10087 }
10088}
10089
10090pub trait NamespaceClientHandler<
10094 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10095 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10096>
10097{
10098 fn on_unknown_interaction(
10099 &mut self,
10100 ordinal: u64,
10101 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
10102 ::core::future::ready(())
10103 }
10104}
10105
10106impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Namespace
10107where
10108 ___H: NamespaceClientHandler<___T> + ::core::marker::Send,
10109 ___T: ::fidl_next::Transport,
10110{
10111 async fn on_event(
10112 handler: &mut ___H,
10113 mut message: ::fidl_next::Message<___T>,
10114 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10115 match *message.header().ordinal {
10116 ordinal => {
10117 handler.on_unknown_interaction(ordinal).await;
10118 if ::core::matches!(
10119 message.header().flexibility(),
10120 ::fidl_next::protocol::Flexibility::Strict
10121 ) {
10122 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10123 } else {
10124 Ok(())
10125 }
10126 }
10127 }
10128 }
10129}
10130
10131pub trait NamespaceServerHandler<
10135 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10136 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10137>
10138{
10139 fn create(
10140 &mut self,
10141
10142 request: ::fidl_next::Request<namespace::Create, ___T>,
10143
10144 responder: ::fidl_next::Responder<namespace::Create, ___T>,
10145 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10146
10147 fn create2(
10148 &mut self,
10149
10150 request: ::fidl_next::Request<namespace::Create2, ___T>,
10151
10152 responder: ::fidl_next::Responder<namespace::Create2, ___T>,
10153 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10154
10155 fn on_unknown_interaction(
10156 &mut self,
10157 ordinal: u64,
10158 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
10159 ::core::future::ready(())
10160 }
10161}
10162
10163impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Namespace
10164where
10165 ___H: NamespaceServerHandler<___T> + ::core::marker::Send,
10166 ___T: ::fidl_next::Transport,
10167 for<'de> crate::wire::NamespaceCreateRequest<'de>: ::fidl_next::Decode<
10168 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10169 Constraint = (),
10170 >,
10171 for<'de> crate::wire::NamespaceCreate2Request<'de>: ::fidl_next::Decode<
10172 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10173 Constraint = (),
10174 >,
10175{
10176 async fn on_one_way(
10177 handler: &mut ___H,
10178 mut message: ::fidl_next::Message<___T>,
10179 ) -> ::core::result::Result<
10180 (),
10181 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10182 > {
10183 match *message.header().ordinal {
10184 ordinal => {
10185 handler.on_unknown_interaction(ordinal).await;
10186 if ::core::matches!(
10187 message.header().flexibility(),
10188 ::fidl_next::protocol::Flexibility::Strict
10189 ) {
10190 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10191 } else {
10192 Ok(())
10193 }
10194 }
10195 }
10196 }
10197
10198 async fn on_two_way(
10199 handler: &mut ___H,
10200 mut message: ::fidl_next::Message<___T>,
10201 responder: ::fidl_next::protocol::Responder<___T>,
10202 ) -> ::core::result::Result<
10203 (),
10204 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10205 > {
10206 match *message.header().ordinal {
10207 4839678630846501113 => {
10208 let responder = ::fidl_next::Responder::from_untyped(responder);
10209
10210 match ::fidl_next::AsDecoderExt::into_decoded(message) {
10211 Ok(decoded) => {
10212 handler
10213 .create(::fidl_next::Request::from_decoded(decoded), responder)
10214 .await;
10215 Ok(())
10216 }
10217 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10218 ordinal: 4839678630846501113,
10219 error,
10220 }),
10221 }
10222 }
10223
10224 7375388463768777553 => {
10225 let responder = ::fidl_next::Responder::from_untyped(responder);
10226
10227 match ::fidl_next::AsDecoderExt::into_decoded(message) {
10228 Ok(decoded) => {
10229 handler
10230 .create2(::fidl_next::Request::from_decoded(decoded), responder)
10231 .await;
10232 Ok(())
10233 }
10234 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10235 ordinal: 7375388463768777553,
10236 error,
10237 }),
10238 }
10239 }
10240
10241 ordinal => {
10242 handler.on_unknown_interaction(ordinal).await;
10243 if ::core::matches!(
10244 message.header().flexibility(),
10245 ::fidl_next::protocol::Flexibility::Strict
10246 ) {
10247 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10248 } else {
10249 responder
10250 .respond_framework_error(
10251 ordinal,
10252 ::fidl_next::FrameworkError::UnknownMethod,
10253 )
10254 .expect("encoding a framework error should never fail")
10255 .await?;
10256 Ok(())
10257 }
10258 }
10259 }
10260 }
10261}
10262
10263impl<___T> NamespaceClientHandler<___T> for ::fidl_next::IgnoreEvents
10264where
10265 ___T: ::fidl_next::Transport,
10266{
10267 async fn on_unknown_interaction(&mut self, _: u64) {}
10268}
10269
10270impl<___H, ___T> NamespaceLocalClientHandler<___T> for ::fidl_next::Local<___H>
10271where
10272 ___H: NamespaceClientHandler<___T>,
10273 ___T: ::fidl_next::Transport,
10274{
10275 async fn on_unknown_interaction(&mut self, ordinal: u64) {
10276 ___H::on_unknown_interaction(&mut self.0, ordinal).await
10277 }
10278}
10279
10280impl<___H, ___T> NamespaceLocalServerHandler<___T> for ::fidl_next::Local<___H>
10281where
10282 ___H: NamespaceServerHandler<___T>,
10283 ___T: ::fidl_next::Transport,
10284{
10285 async fn create(
10286 &mut self,
10287
10288 request: ::fidl_next::Request<namespace::Create, ___T>,
10289
10290 responder: ::fidl_next::Responder<namespace::Create, ___T>,
10291 ) {
10292 ___H::create(&mut self.0, request, responder).await
10293 }
10294
10295 async fn create2(
10296 &mut self,
10297
10298 request: ::fidl_next::Request<namespace::Create2, ___T>,
10299
10300 responder: ::fidl_next::Responder<namespace::Create2, ___T>,
10301 ) {
10302 ___H::create2(&mut self.0, request, responder).await
10303 }
10304
10305 async fn on_unknown_interaction(&mut self, ordinal: u64) {
10306 ___H::on_unknown_interaction(&mut self.0, ordinal).await
10307 }
10308}
10309
10310#[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"]
10312#[derive(PartialEq, Debug)]
10313pub struct Realm;
10314
10315impl ::fidl_next::Discoverable for Realm {
10316 const PROTOCOL_NAME: &'static str = "fuchsia.component.Realm";
10317}
10318
10319#[cfg(target_os = "fuchsia")]
10320impl ::fidl_next::HasTransport for Realm {
10321 type Transport = ::fidl_next::fuchsia::zx::Channel;
10322}
10323
10324pub mod realm {
10325 pub mod prelude {
10326 pub use crate::{
10327 Realm, RealmClientHandler, RealmLocalClientHandler, RealmLocalServerHandler,
10328 RealmServerHandler, realm,
10329 };
10330
10331 pub use crate::natural::Error;
10332
10333 pub use crate::natural::RealmCreateChildRequest;
10334
10335 pub use crate::natural::RealmDestroyChildRequest;
10336
10337 pub use crate::natural::RealmGetChildOutputDictionaryDeprecatedRequest;
10338
10339 pub use crate::natural::RealmGetChildOutputDictionaryRequest;
10340
10341 pub use crate::natural::RealmListChildrenRequest;
10342
10343 pub use crate::natural::RealmOpenControllerRequest;
10344
10345 pub use crate::natural::RealmOpenExposedDirRequest;
10346
10347 pub use crate::natural::RealmCreateChildResponse;
10348
10349 pub use crate::natural::RealmDestroyChildResponse;
10350
10351 pub use crate::natural::RealmGetChildOutputDictionaryDeprecatedResponse;
10352
10353 pub use crate::natural::RealmGetChildOutputDictionaryResponse;
10354
10355 pub use crate::natural::RealmGetResolvedInfoResponse;
10356
10357 pub use crate::natural::RealmListChildrenResponse;
10358
10359 pub use crate::natural::RealmOpenControllerResponse;
10360
10361 pub use crate::natural::RealmOpenExposedDirResponse;
10362 }
10363
10364 pub struct OpenController;
10365
10366 impl ::fidl_next::Method for OpenController {
10367 const ORDINAL: u64 = 8165227925828473216;
10368 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10369 ::fidl_next::protocol::Flexibility::Strict;
10370
10371 type Protocol = crate::Realm;
10372
10373 type Request = crate::wire::RealmOpenControllerRequest<'static>;
10374 }
10375
10376 impl ::fidl_next::TwoWayMethod for OpenController {
10377 type Response = ::fidl_next::wire::Result<
10378 'static,
10379 crate::wire::RealmOpenControllerResponse,
10380 crate::wire::Error,
10381 >;
10382 }
10383
10384 impl<___R> ::fidl_next::Respond<___R> for OpenController {
10385 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10386
10387 fn respond(response: ___R) -> Self::Output {
10388 ::core::result::Result::Ok(response)
10389 }
10390 }
10391
10392 impl<___R> ::fidl_next::RespondErr<___R> for OpenController {
10393 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10394
10395 fn respond_err(response: ___R) -> Self::Output {
10396 ::core::result::Result::Err(response)
10397 }
10398 }
10399
10400 pub struct OpenExposedDir;
10401
10402 impl ::fidl_next::Method for OpenExposedDir {
10403 const ORDINAL: u64 = 9194435320863127852;
10404 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10405 ::fidl_next::protocol::Flexibility::Strict;
10406
10407 type Protocol = crate::Realm;
10408
10409 type Request = crate::wire::RealmOpenExposedDirRequest<'static>;
10410 }
10411
10412 impl ::fidl_next::TwoWayMethod for OpenExposedDir {
10413 type Response = ::fidl_next::wire::Result<
10414 'static,
10415 crate::wire::RealmOpenExposedDirResponse,
10416 crate::wire::Error,
10417 >;
10418 }
10419
10420 impl<___R> ::fidl_next::Respond<___R> for OpenExposedDir {
10421 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10422
10423 fn respond(response: ___R) -> Self::Output {
10424 ::core::result::Result::Ok(response)
10425 }
10426 }
10427
10428 impl<___R> ::fidl_next::RespondErr<___R> for OpenExposedDir {
10429 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10430
10431 fn respond_err(response: ___R) -> Self::Output {
10432 ::core::result::Result::Err(response)
10433 }
10434 }
10435
10436 pub struct CreateChild;
10437
10438 impl ::fidl_next::Method for CreateChild {
10439 const ORDINAL: u64 = 4892190024503489888;
10440 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10441 ::fidl_next::protocol::Flexibility::Strict;
10442
10443 type Protocol = crate::Realm;
10444
10445 type Request = crate::wire::RealmCreateChildRequest<'static>;
10446 }
10447
10448 impl ::fidl_next::TwoWayMethod for CreateChild {
10449 type Response = ::fidl_next::wire::Result<
10450 'static,
10451 crate::wire::RealmCreateChildResponse,
10452 crate::wire::Error,
10453 >;
10454 }
10455
10456 impl<___R> ::fidl_next::Respond<___R> for CreateChild {
10457 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10458
10459 fn respond(response: ___R) -> Self::Output {
10460 ::core::result::Result::Ok(response)
10461 }
10462 }
10463
10464 impl<___R> ::fidl_next::RespondErr<___R> for CreateChild {
10465 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10466
10467 fn respond_err(response: ___R) -> Self::Output {
10468 ::core::result::Result::Err(response)
10469 }
10470 }
10471
10472 pub struct DestroyChild;
10473
10474 impl ::fidl_next::Method for DestroyChild {
10475 const ORDINAL: u64 = 8203529889988252194;
10476 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10477 ::fidl_next::protocol::Flexibility::Strict;
10478
10479 type Protocol = crate::Realm;
10480
10481 type Request = crate::wire::RealmDestroyChildRequest<'static>;
10482 }
10483
10484 impl ::fidl_next::TwoWayMethod for DestroyChild {
10485 type Response = ::fidl_next::wire::Result<
10486 'static,
10487 crate::wire::RealmDestroyChildResponse,
10488 crate::wire::Error,
10489 >;
10490 }
10491
10492 impl<___R> ::fidl_next::Respond<___R> for DestroyChild {
10493 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10494
10495 fn respond(response: ___R) -> Self::Output {
10496 ::core::result::Result::Ok(response)
10497 }
10498 }
10499
10500 impl<___R> ::fidl_next::RespondErr<___R> for DestroyChild {
10501 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10502
10503 fn respond_err(response: ___R) -> Self::Output {
10504 ::core::result::Result::Err(response)
10505 }
10506 }
10507
10508 pub struct ListChildren;
10509
10510 impl ::fidl_next::Method for ListChildren {
10511 const ORDINAL: u64 = 7532454435519185057;
10512 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10513 ::fidl_next::protocol::Flexibility::Strict;
10514
10515 type Protocol = crate::Realm;
10516
10517 type Request = crate::wire::RealmListChildrenRequest<'static>;
10518 }
10519
10520 impl ::fidl_next::TwoWayMethod for ListChildren {
10521 type Response = ::fidl_next::wire::Result<
10522 'static,
10523 crate::wire::RealmListChildrenResponse,
10524 crate::wire::Error,
10525 >;
10526 }
10527
10528 impl<___R> ::fidl_next::Respond<___R> for ListChildren {
10529 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10530
10531 fn respond(response: ___R) -> Self::Output {
10532 ::core::result::Result::Ok(response)
10533 }
10534 }
10535
10536 impl<___R> ::fidl_next::RespondErr<___R> for ListChildren {
10537 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10538
10539 fn respond_err(response: ___R) -> Self::Output {
10540 ::core::result::Result::Err(response)
10541 }
10542 }
10543
10544 pub struct GetResolvedInfo;
10545
10546 impl ::fidl_next::Method for GetResolvedInfo {
10547 const ORDINAL: u64 = 8308987710372188322;
10548 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10549 ::fidl_next::protocol::Flexibility::Strict;
10550
10551 type Protocol = crate::Realm;
10552
10553 type Request = ::fidl_next::wire::EmptyMessageBody;
10554 }
10555
10556 impl ::fidl_next::TwoWayMethod for GetResolvedInfo {
10557 type Response = ::fidl_next::wire::Result<
10558 'static,
10559 crate::wire::RealmGetResolvedInfoResponse<'static>,
10560 crate::wire::Error,
10561 >;
10562 }
10563
10564 impl<___R> ::fidl_next::Respond<___R> for GetResolvedInfo {
10565 type Output = ::core::result::Result<
10566 crate::generic::RealmGetResolvedInfoResponse<___R>,
10567 ::fidl_next::never::Never,
10568 >;
10569
10570 fn respond(response: ___R) -> Self::Output {
10571 ::core::result::Result::Ok(crate::generic::RealmGetResolvedInfoResponse {
10572 resolved_info: response,
10573 })
10574 }
10575 }
10576
10577 impl<___R> ::fidl_next::RespondErr<___R> for GetResolvedInfo {
10578 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10579
10580 fn respond_err(response: ___R) -> Self::Output {
10581 ::core::result::Result::Err(response)
10582 }
10583 }
10584
10585 pub struct GetChildOutputDictionaryDeprecated;
10586
10587 impl ::fidl_next::Method for GetChildOutputDictionaryDeprecated {
10588 const ORDINAL: u64 = 4117516026351534948;
10589 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10590 ::fidl_next::protocol::Flexibility::Strict;
10591
10592 type Protocol = crate::Realm;
10593
10594 type Request = crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>;
10595 }
10596
10597 impl ::fidl_next::TwoWayMethod for GetChildOutputDictionaryDeprecated {
10598 type Response = ::fidl_next::wire::Result<
10599 'static,
10600 crate::wire::RealmGetChildOutputDictionaryDeprecatedResponse,
10601 crate::wire::Error,
10602 >;
10603 }
10604
10605 impl<___R> ::fidl_next::Respond<___R> for GetChildOutputDictionaryDeprecated {
10606 type Output = ::core::result::Result<
10607 crate::generic::RealmGetChildOutputDictionaryDeprecatedResponse<___R>,
10608 ::fidl_next::never::Never,
10609 >;
10610
10611 fn respond(response: ___R) -> Self::Output {
10612 ::core::result::Result::Ok(
10613 crate::generic::RealmGetChildOutputDictionaryDeprecatedResponse {
10614 dictionary: response,
10615 },
10616 )
10617 }
10618 }
10619
10620 impl<___R> ::fidl_next::RespondErr<___R> for GetChildOutputDictionaryDeprecated {
10621 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10622
10623 fn respond_err(response: ___R) -> Self::Output {
10624 ::core::result::Result::Err(response)
10625 }
10626 }
10627
10628 pub struct GetChildOutputDictionary;
10629
10630 impl ::fidl_next::Method for GetChildOutputDictionary {
10631 const ORDINAL: u64 = 4781081784078915088;
10632 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10633 ::fidl_next::protocol::Flexibility::Strict;
10634
10635 type Protocol = crate::Realm;
10636
10637 type Request = crate::wire::RealmGetChildOutputDictionaryRequest<'static>;
10638 }
10639
10640 impl ::fidl_next::TwoWayMethod for GetChildOutputDictionary {
10641 type Response = ::fidl_next::wire::Result<
10642 'static,
10643 crate::wire::RealmGetChildOutputDictionaryResponse,
10644 crate::wire::Error,
10645 >;
10646 }
10647
10648 impl<___R> ::fidl_next::Respond<___R> for GetChildOutputDictionary {
10649 type Output = ::core::result::Result<
10650 crate::generic::RealmGetChildOutputDictionaryResponse<___R>,
10651 ::fidl_next::never::Never,
10652 >;
10653
10654 fn respond(response: ___R) -> Self::Output {
10655 ::core::result::Result::Ok(crate::generic::RealmGetChildOutputDictionaryResponse {
10656 dictionary: response,
10657 })
10658 }
10659 }
10660
10661 impl<___R> ::fidl_next::RespondErr<___R> for GetChildOutputDictionary {
10662 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10663
10664 fn respond_err(response: ___R) -> Self::Output {
10665 ::core::result::Result::Err(response)
10666 }
10667 }
10668
10669 mod ___detail {
10670 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Realm
10671 where
10672 ___T: ::fidl_next::Transport,
10673 {
10674 type Client = RealmClient<___T>;
10675 type Server = RealmServer<___T>;
10676 }
10677
10678 #[repr(transparent)]
10680 pub struct RealmClient<___T: ::fidl_next::Transport> {
10681 #[allow(dead_code)]
10682 client: ::fidl_next::protocol::Client<___T>,
10683 }
10684
10685 impl<___T> RealmClient<___T>
10686 where
10687 ___T: ::fidl_next::Transport,
10688 {
10689 #[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"]
10690 pub fn open_controller(
10691 &self,
10692
10693 child: impl ::fidl_next::Encode<
10694 ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
10695 <___T as ::fidl_next::Transport>::SendBuffer,
10696 >,
10697
10698 controller: impl ::fidl_next::Encode<
10699 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::wire::fuchsia::Channel>,
10700 <___T as ::fidl_next::Transport>::SendBuffer,
10701 >,
10702 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenController, ___T>
10703 where
10704 <___T as ::fidl_next::Transport>::SendBuffer:
10705 ::fidl_next::encoder::InternalHandleEncoder,
10706 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10707 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10708 {
10709 self.open_controller_with(crate::generic::RealmOpenControllerRequest {
10710 child,
10711
10712 controller,
10713 })
10714 }
10715
10716 #[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"]
10717 pub fn open_controller_with<___R>(
10718 &self,
10719 request: ___R,
10720 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenController, ___T>
10721 where
10722 ___R: ::fidl_next::Encode<
10723 crate::wire::RealmOpenControllerRequest<'static>,
10724 <___T as ::fidl_next::Transport>::SendBuffer,
10725 >,
10726 {
10727 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10728 8165227925828473216,
10729 <super::OpenController as ::fidl_next::Method>::FLEXIBILITY,
10730 request,
10731 ))
10732 }
10733
10734 #[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"]
10735 pub fn open_exposed_dir(
10736 &self,
10737
10738 child: impl ::fidl_next::Encode<
10739 ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
10740 <___T as ::fidl_next::Transport>::SendBuffer,
10741 >,
10742
10743 exposed_dir: impl ::fidl_next::Encode<
10744 ::fidl_next::ServerEnd<
10745 ::fidl_next_fuchsia_io::Directory,
10746 ::fidl_next::wire::fuchsia::Channel,
10747 >,
10748 <___T as ::fidl_next::Transport>::SendBuffer,
10749 >,
10750 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
10751 where
10752 <___T as ::fidl_next::Transport>::SendBuffer:
10753 ::fidl_next::encoder::InternalHandleEncoder,
10754 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10755 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10756 {
10757 self.open_exposed_dir_with(crate::generic::RealmOpenExposedDirRequest {
10758 child,
10759
10760 exposed_dir,
10761 })
10762 }
10763
10764 #[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"]
10765 pub fn open_exposed_dir_with<___R>(
10766 &self,
10767 request: ___R,
10768 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
10769 where
10770 ___R: ::fidl_next::Encode<
10771 crate::wire::RealmOpenExposedDirRequest<'static>,
10772 <___T as ::fidl_next::Transport>::SendBuffer,
10773 >,
10774 {
10775 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10776 9194435320863127852,
10777 <super::OpenExposedDir as ::fidl_next::Method>::FLEXIBILITY,
10778 request,
10779 ))
10780 }
10781
10782 #[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"]
10783 pub fn create_child(
10784 &self,
10785
10786 collection: impl ::fidl_next::Encode<
10787 ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
10788 <___T as ::fidl_next::Transport>::SendBuffer,
10789 >,
10790
10791 decl: impl ::fidl_next::Encode<
10792 ::fidl_next_fuchsia_component_decl::wire::Child<'static>,
10793 <___T as ::fidl_next::Transport>::SendBuffer,
10794 >,
10795
10796 args: impl ::fidl_next::Encode<
10797 crate::wire::CreateChildArgs<'static>,
10798 <___T as ::fidl_next::Transport>::SendBuffer,
10799 >,
10800 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateChild, ___T>
10801 where
10802 <___T as ::fidl_next::Transport>::SendBuffer:
10803 ::fidl_next::encoder::InternalHandleEncoder,
10804 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10805 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10806 {
10807 self.create_child_with(crate::generic::RealmCreateChildRequest {
10808 collection,
10809
10810 decl,
10811
10812 args,
10813 })
10814 }
10815
10816 #[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"]
10817 pub fn create_child_with<___R>(
10818 &self,
10819 request: ___R,
10820 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateChild, ___T>
10821 where
10822 ___R: ::fidl_next::Encode<
10823 crate::wire::RealmCreateChildRequest<'static>,
10824 <___T as ::fidl_next::Transport>::SendBuffer,
10825 >,
10826 {
10827 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10828 4892190024503489888,
10829 <super::CreateChild as ::fidl_next::Method>::FLEXIBILITY,
10830 request,
10831 ))
10832 }
10833
10834 #[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"]
10835 pub fn destroy_child(
10836 &self,
10837
10838 child: impl ::fidl_next::Encode<
10839 ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
10840 <___T as ::fidl_next::Transport>::SendBuffer,
10841 >,
10842 ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyChild, ___T>
10843 where
10844 <___T as ::fidl_next::Transport>::SendBuffer:
10845 ::fidl_next::encoder::InternalHandleEncoder,
10846 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10847 {
10848 self.destroy_child_with(crate::generic::RealmDestroyChildRequest { child })
10849 }
10850
10851 #[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"]
10852 pub fn destroy_child_with<___R>(
10853 &self,
10854 request: ___R,
10855 ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyChild, ___T>
10856 where
10857 ___R: ::fidl_next::Encode<
10858 crate::wire::RealmDestroyChildRequest<'static>,
10859 <___T as ::fidl_next::Transport>::SendBuffer,
10860 >,
10861 {
10862 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10863 8203529889988252194,
10864 <super::DestroyChild as ::fidl_next::Method>::FLEXIBILITY,
10865 request,
10866 ))
10867 }
10868
10869 #[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"]
10870 pub fn list_children(
10871 &self,
10872
10873 collection: impl ::fidl_next::Encode<
10874 ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
10875 <___T as ::fidl_next::Transport>::SendBuffer,
10876 >,
10877
10878 iter: impl ::fidl_next::Encode<
10879 ::fidl_next::ServerEnd<
10880 crate::ChildIterator,
10881 ::fidl_next::wire::fuchsia::Channel,
10882 >,
10883 <___T as ::fidl_next::Transport>::SendBuffer,
10884 >,
10885 ) -> ::fidl_next::TwoWayFuture<'_, super::ListChildren, ___T>
10886 where
10887 <___T as ::fidl_next::Transport>::SendBuffer:
10888 ::fidl_next::encoder::InternalHandleEncoder,
10889 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10890 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10891 {
10892 self.list_children_with(crate::generic::RealmListChildrenRequest {
10893 collection,
10894
10895 iter,
10896 })
10897 }
10898
10899 #[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"]
10900 pub fn list_children_with<___R>(
10901 &self,
10902 request: ___R,
10903 ) -> ::fidl_next::TwoWayFuture<'_, super::ListChildren, ___T>
10904 where
10905 ___R: ::fidl_next::Encode<
10906 crate::wire::RealmListChildrenRequest<'static>,
10907 <___T as ::fidl_next::Transport>::SendBuffer,
10908 >,
10909 {
10910 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10911 7532454435519185057,
10912 <super::ListChildren as ::fidl_next::Method>::FLEXIBILITY,
10913 request,
10914 ))
10915 }
10916
10917 #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
10918 pub fn get_resolved_info(
10919 &self,
10920 ) -> ::fidl_next::TwoWayFuture<'_, super::GetResolvedInfo, ___T> {
10921 ::fidl_next::TwoWayFuture::from_untyped(
10922 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10923 8308987710372188322,
10924 <super::GetResolvedInfo as ::fidl_next::Method>::FLEXIBILITY,
10925 (),
10926 ),
10927 )
10928 }
10929
10930 pub fn get_child_output_dictionary_deprecated(
10931 &self,
10932
10933 child: impl ::fidl_next::Encode<
10934 ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
10935 <___T as ::fidl_next::Transport>::SendBuffer,
10936 >,
10937 ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionaryDeprecated, ___T>
10938 where
10939 <___T as ::fidl_next::Transport>::SendBuffer:
10940 ::fidl_next::encoder::InternalHandleEncoder,
10941 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10942 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10943 {
10944 self.get_child_output_dictionary_deprecated_with(
10945 crate::generic::RealmGetChildOutputDictionaryDeprecatedRequest { child },
10946 )
10947 }
10948
10949 pub fn get_child_output_dictionary_deprecated_with<___R>(
10950 &self,
10951 request: ___R,
10952 ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionaryDeprecated, ___T>
10953 where
10954 ___R: ::fidl_next::Encode<
10955 crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'static>,
10956 <___T as ::fidl_next::Transport>::SendBuffer,
10957 >,
10958 {
10959 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10960 4117516026351534948,
10961 <super::GetChildOutputDictionaryDeprecated as ::fidl_next::Method>::FLEXIBILITY,
10962 request,
10963 ))
10964 }
10965
10966 #[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"]
10967 pub fn get_child_output_dictionary(
10968 &self,
10969
10970 child: impl ::fidl_next::Encode<
10971 ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
10972 <___T as ::fidl_next::Transport>::SendBuffer,
10973 >,
10974 ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionary, ___T>
10975 where
10976 <___T as ::fidl_next::Transport>::SendBuffer:
10977 ::fidl_next::encoder::InternalHandleEncoder,
10978 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10979 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10980 {
10981 self.get_child_output_dictionary_with(
10982 crate::generic::RealmGetChildOutputDictionaryRequest { child },
10983 )
10984 }
10985
10986 #[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"]
10987 pub fn get_child_output_dictionary_with<___R>(
10988 &self,
10989 request: ___R,
10990 ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionary, ___T>
10991 where
10992 ___R: ::fidl_next::Encode<
10993 crate::wire::RealmGetChildOutputDictionaryRequest<'static>,
10994 <___T as ::fidl_next::Transport>::SendBuffer,
10995 >,
10996 {
10997 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10998 4781081784078915088,
10999 <super::GetChildOutputDictionary as ::fidl_next::Method>::FLEXIBILITY,
11000 request,
11001 ))
11002 }
11003 }
11004
11005 #[repr(transparent)]
11007 pub struct RealmServer<___T: ::fidl_next::Transport> {
11008 server: ::fidl_next::protocol::Server<___T>,
11009 }
11010
11011 impl<___T> RealmServer<___T> where ___T: ::fidl_next::Transport {}
11012 }
11013}
11014
11015#[diagnostic::on_unimplemented(
11016 note = "If {Self} implements the non-local RealmClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
11017)]
11018
11019pub trait RealmLocalClientHandler<
11023 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11024 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11025>
11026{
11027}
11028
11029impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Realm
11030where
11031 ___H: RealmLocalClientHandler<___T>,
11032 ___T: ::fidl_next::Transport,
11033{
11034 async fn on_event(
11035 handler: &mut ___H,
11036 mut message: ::fidl_next::Message<___T>,
11037 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11038 match *message.header().ordinal {
11039 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
11040 }
11041 }
11042}
11043
11044#[diagnostic::on_unimplemented(
11045 note = "If {Self} implements the non-local RealmServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
11046)]
11047
11048pub trait RealmLocalServerHandler<
11052 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11053 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11054>
11055{
11056 #[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"]
11057 fn open_controller(
11058 &mut self,
11059
11060 request: ::fidl_next::Request<realm::OpenController, ___T>,
11061
11062 responder: ::fidl_next::Responder<realm::OpenController, ___T>,
11063 ) -> impl ::core::future::Future<Output = ()>;
11064
11065 #[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"]
11066 fn open_exposed_dir(
11067 &mut self,
11068
11069 request: ::fidl_next::Request<realm::OpenExposedDir, ___T>,
11070
11071 responder: ::fidl_next::Responder<realm::OpenExposedDir, ___T>,
11072 ) -> impl ::core::future::Future<Output = ()>;
11073
11074 #[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"]
11075 fn create_child(
11076 &mut self,
11077
11078 request: ::fidl_next::Request<realm::CreateChild, ___T>,
11079
11080 responder: ::fidl_next::Responder<realm::CreateChild, ___T>,
11081 ) -> impl ::core::future::Future<Output = ()>;
11082
11083 #[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"]
11084 fn destroy_child(
11085 &mut self,
11086
11087 request: ::fidl_next::Request<realm::DestroyChild, ___T>,
11088
11089 responder: ::fidl_next::Responder<realm::DestroyChild, ___T>,
11090 ) -> impl ::core::future::Future<Output = ()>;
11091
11092 #[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"]
11093 fn list_children(
11094 &mut self,
11095
11096 request: ::fidl_next::Request<realm::ListChildren, ___T>,
11097
11098 responder: ::fidl_next::Responder<realm::ListChildren, ___T>,
11099 ) -> impl ::core::future::Future<Output = ()>;
11100
11101 #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
11102 fn get_resolved_info(
11103 &mut self,
11104
11105 responder: ::fidl_next::Responder<realm::GetResolvedInfo, ___T>,
11106 ) -> impl ::core::future::Future<Output = ()>;
11107
11108 fn get_child_output_dictionary_deprecated(
11109 &mut self,
11110
11111 request: ::fidl_next::Request<realm::GetChildOutputDictionaryDeprecated, ___T>,
11112
11113 responder: ::fidl_next::Responder<realm::GetChildOutputDictionaryDeprecated, ___T>,
11114 ) -> impl ::core::future::Future<Output = ()>;
11115
11116 #[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"]
11117 fn get_child_output_dictionary(
11118 &mut self,
11119
11120 request: ::fidl_next::Request<realm::GetChildOutputDictionary, ___T>,
11121
11122 responder: ::fidl_next::Responder<realm::GetChildOutputDictionary, ___T>,
11123 ) -> impl ::core::future::Future<Output = ()>;
11124}
11125
11126impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Realm
11127where
11128 ___H: RealmLocalServerHandler<___T>,
11129 ___T: ::fidl_next::Transport,
11130 for<'de> crate::wire::RealmOpenControllerRequest<'de>: ::fidl_next::Decode<
11131 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11132 Constraint = (),
11133 >,
11134 for<'de> crate::wire::RealmOpenExposedDirRequest<'de>: ::fidl_next::Decode<
11135 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11136 Constraint = (),
11137 >,
11138 for<'de> crate::wire::RealmCreateChildRequest<'de>: ::fidl_next::Decode<
11139 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11140 Constraint = (),
11141 >,
11142 for<'de> crate::wire::RealmDestroyChildRequest<'de>: ::fidl_next::Decode<
11143 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11144 Constraint = (),
11145 >,
11146 for<'de> crate::wire::RealmListChildrenRequest<'de>: ::fidl_next::Decode<
11147 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11148 Constraint = (),
11149 >,
11150 for<'de> crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'de>: ::fidl_next::Decode<
11151 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11152 Constraint = (),
11153 >,
11154 for<'de> crate::wire::RealmGetChildOutputDictionaryRequest<'de>: ::fidl_next::Decode<
11155 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11156 Constraint = (),
11157 >,
11158{
11159 async fn on_one_way(
11160 handler: &mut ___H,
11161 mut message: ::fidl_next::Message<___T>,
11162 ) -> ::core::result::Result<
11163 (),
11164 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11165 > {
11166 match *message.header().ordinal {
11167 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
11168 }
11169 }
11170
11171 async fn on_two_way(
11172 handler: &mut ___H,
11173 mut message: ::fidl_next::Message<___T>,
11174 responder: ::fidl_next::protocol::Responder<___T>,
11175 ) -> ::core::result::Result<
11176 (),
11177 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11178 > {
11179 match *message.header().ordinal {
11180 8165227925828473216 => {
11181 let responder = ::fidl_next::Responder::from_untyped(responder);
11182
11183 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11184 Ok(decoded) => {
11185 handler
11186 .open_controller(::fidl_next::Request::from_decoded(decoded), responder)
11187 .await;
11188 Ok(())
11189 }
11190 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11191 ordinal: 8165227925828473216,
11192 error,
11193 }),
11194 }
11195 }
11196
11197 9194435320863127852 => {
11198 let responder = ::fidl_next::Responder::from_untyped(responder);
11199
11200 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11201 Ok(decoded) => {
11202 handler
11203 .open_exposed_dir(
11204 ::fidl_next::Request::from_decoded(decoded),
11205 responder,
11206 )
11207 .await;
11208 Ok(())
11209 }
11210 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11211 ordinal: 9194435320863127852,
11212 error,
11213 }),
11214 }
11215 }
11216
11217 4892190024503489888 => {
11218 let responder = ::fidl_next::Responder::from_untyped(responder);
11219
11220 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11221 Ok(decoded) => {
11222 handler
11223 .create_child(::fidl_next::Request::from_decoded(decoded), responder)
11224 .await;
11225 Ok(())
11226 }
11227 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11228 ordinal: 4892190024503489888,
11229 error,
11230 }),
11231 }
11232 }
11233
11234 8203529889988252194 => {
11235 let responder = ::fidl_next::Responder::from_untyped(responder);
11236
11237 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11238 Ok(decoded) => {
11239 handler
11240 .destroy_child(::fidl_next::Request::from_decoded(decoded), responder)
11241 .await;
11242 Ok(())
11243 }
11244 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11245 ordinal: 8203529889988252194,
11246 error,
11247 }),
11248 }
11249 }
11250
11251 7532454435519185057 => {
11252 let responder = ::fidl_next::Responder::from_untyped(responder);
11253
11254 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11255 Ok(decoded) => {
11256 handler
11257 .list_children(::fidl_next::Request::from_decoded(decoded), responder)
11258 .await;
11259 Ok(())
11260 }
11261 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11262 ordinal: 7532454435519185057,
11263 error,
11264 }),
11265 }
11266 }
11267
11268 8308987710372188322 => {
11269 let responder = ::fidl_next::Responder::from_untyped(responder);
11270
11271 handler.get_resolved_info(responder).await;
11272 Ok(())
11273 }
11274
11275 4117516026351534948 => {
11276 let responder = ::fidl_next::Responder::from_untyped(responder);
11277
11278 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11279 Ok(decoded) => {
11280 handler
11281 .get_child_output_dictionary_deprecated(
11282 ::fidl_next::Request::from_decoded(decoded),
11283 responder,
11284 )
11285 .await;
11286 Ok(())
11287 }
11288 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11289 ordinal: 4117516026351534948,
11290 error,
11291 }),
11292 }
11293 }
11294
11295 4781081784078915088 => {
11296 let responder = ::fidl_next::Responder::from_untyped(responder);
11297
11298 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11299 Ok(decoded) => {
11300 handler
11301 .get_child_output_dictionary(
11302 ::fidl_next::Request::from_decoded(decoded),
11303 responder,
11304 )
11305 .await;
11306 Ok(())
11307 }
11308 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11309 ordinal: 4781081784078915088,
11310 error,
11311 }),
11312 }
11313 }
11314
11315 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
11316 }
11317 }
11318}
11319
11320pub trait RealmClientHandler<
11324 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11325 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11326>
11327{
11328}
11329
11330impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Realm
11331where
11332 ___H: RealmClientHandler<___T> + ::core::marker::Send,
11333 ___T: ::fidl_next::Transport,
11334{
11335 async fn on_event(
11336 handler: &mut ___H,
11337 mut message: ::fidl_next::Message<___T>,
11338 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11339 match *message.header().ordinal {
11340 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
11341 }
11342 }
11343}
11344
11345pub trait RealmServerHandler<
11349 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11350 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11351>
11352{
11353 #[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"]
11354 fn open_controller(
11355 &mut self,
11356
11357 request: ::fidl_next::Request<realm::OpenController, ___T>,
11358
11359 responder: ::fidl_next::Responder<realm::OpenController, ___T>,
11360 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11361
11362 #[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"]
11363 fn open_exposed_dir(
11364 &mut self,
11365
11366 request: ::fidl_next::Request<realm::OpenExposedDir, ___T>,
11367
11368 responder: ::fidl_next::Responder<realm::OpenExposedDir, ___T>,
11369 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11370
11371 #[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"]
11372 fn create_child(
11373 &mut self,
11374
11375 request: ::fidl_next::Request<realm::CreateChild, ___T>,
11376
11377 responder: ::fidl_next::Responder<realm::CreateChild, ___T>,
11378 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11379
11380 #[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"]
11381 fn destroy_child(
11382 &mut self,
11383
11384 request: ::fidl_next::Request<realm::DestroyChild, ___T>,
11385
11386 responder: ::fidl_next::Responder<realm::DestroyChild, ___T>,
11387 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11388
11389 #[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"]
11390 fn list_children(
11391 &mut self,
11392
11393 request: ::fidl_next::Request<realm::ListChildren, ___T>,
11394
11395 responder: ::fidl_next::Responder<realm::ListChildren, ___T>,
11396 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11397
11398 #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
11399 fn get_resolved_info(
11400 &mut self,
11401
11402 responder: ::fidl_next::Responder<realm::GetResolvedInfo, ___T>,
11403 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11404
11405 fn get_child_output_dictionary_deprecated(
11406 &mut self,
11407
11408 request: ::fidl_next::Request<realm::GetChildOutputDictionaryDeprecated, ___T>,
11409
11410 responder: ::fidl_next::Responder<realm::GetChildOutputDictionaryDeprecated, ___T>,
11411 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11412
11413 #[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"]
11414 fn get_child_output_dictionary(
11415 &mut self,
11416
11417 request: ::fidl_next::Request<realm::GetChildOutputDictionary, ___T>,
11418
11419 responder: ::fidl_next::Responder<realm::GetChildOutputDictionary, ___T>,
11420 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11421}
11422
11423impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Realm
11424where
11425 ___H: RealmServerHandler<___T> + ::core::marker::Send,
11426 ___T: ::fidl_next::Transport,
11427 for<'de> crate::wire::RealmOpenControllerRequest<'de>: ::fidl_next::Decode<
11428 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11429 Constraint = (),
11430 >,
11431 for<'de> crate::wire::RealmOpenExposedDirRequest<'de>: ::fidl_next::Decode<
11432 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11433 Constraint = (),
11434 >,
11435 for<'de> crate::wire::RealmCreateChildRequest<'de>: ::fidl_next::Decode<
11436 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11437 Constraint = (),
11438 >,
11439 for<'de> crate::wire::RealmDestroyChildRequest<'de>: ::fidl_next::Decode<
11440 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11441 Constraint = (),
11442 >,
11443 for<'de> crate::wire::RealmListChildrenRequest<'de>: ::fidl_next::Decode<
11444 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11445 Constraint = (),
11446 >,
11447 for<'de> crate::wire::RealmGetChildOutputDictionaryDeprecatedRequest<'de>: ::fidl_next::Decode<
11448 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11449 Constraint = (),
11450 >,
11451 for<'de> crate::wire::RealmGetChildOutputDictionaryRequest<'de>: ::fidl_next::Decode<
11452 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11453 Constraint = (),
11454 >,
11455{
11456 async fn on_one_way(
11457 handler: &mut ___H,
11458 mut message: ::fidl_next::Message<___T>,
11459 ) -> ::core::result::Result<
11460 (),
11461 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11462 > {
11463 match *message.header().ordinal {
11464 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
11465 }
11466 }
11467
11468 async fn on_two_way(
11469 handler: &mut ___H,
11470 mut message: ::fidl_next::Message<___T>,
11471 responder: ::fidl_next::protocol::Responder<___T>,
11472 ) -> ::core::result::Result<
11473 (),
11474 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11475 > {
11476 match *message.header().ordinal {
11477 8165227925828473216 => {
11478 let responder = ::fidl_next::Responder::from_untyped(responder);
11479
11480 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11481 Ok(decoded) => {
11482 handler
11483 .open_controller(::fidl_next::Request::from_decoded(decoded), responder)
11484 .await;
11485 Ok(())
11486 }
11487 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11488 ordinal: 8165227925828473216,
11489 error,
11490 }),
11491 }
11492 }
11493
11494 9194435320863127852 => {
11495 let responder = ::fidl_next::Responder::from_untyped(responder);
11496
11497 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11498 Ok(decoded) => {
11499 handler
11500 .open_exposed_dir(
11501 ::fidl_next::Request::from_decoded(decoded),
11502 responder,
11503 )
11504 .await;
11505 Ok(())
11506 }
11507 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11508 ordinal: 9194435320863127852,
11509 error,
11510 }),
11511 }
11512 }
11513
11514 4892190024503489888 => {
11515 let responder = ::fidl_next::Responder::from_untyped(responder);
11516
11517 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11518 Ok(decoded) => {
11519 handler
11520 .create_child(::fidl_next::Request::from_decoded(decoded), responder)
11521 .await;
11522 Ok(())
11523 }
11524 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11525 ordinal: 4892190024503489888,
11526 error,
11527 }),
11528 }
11529 }
11530
11531 8203529889988252194 => {
11532 let responder = ::fidl_next::Responder::from_untyped(responder);
11533
11534 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11535 Ok(decoded) => {
11536 handler
11537 .destroy_child(::fidl_next::Request::from_decoded(decoded), responder)
11538 .await;
11539 Ok(())
11540 }
11541 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11542 ordinal: 8203529889988252194,
11543 error,
11544 }),
11545 }
11546 }
11547
11548 7532454435519185057 => {
11549 let responder = ::fidl_next::Responder::from_untyped(responder);
11550
11551 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11552 Ok(decoded) => {
11553 handler
11554 .list_children(::fidl_next::Request::from_decoded(decoded), responder)
11555 .await;
11556 Ok(())
11557 }
11558 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11559 ordinal: 7532454435519185057,
11560 error,
11561 }),
11562 }
11563 }
11564
11565 8308987710372188322 => {
11566 let responder = ::fidl_next::Responder::from_untyped(responder);
11567
11568 handler.get_resolved_info(responder).await;
11569 Ok(())
11570 }
11571
11572 4117516026351534948 => {
11573 let responder = ::fidl_next::Responder::from_untyped(responder);
11574
11575 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11576 Ok(decoded) => {
11577 handler
11578 .get_child_output_dictionary_deprecated(
11579 ::fidl_next::Request::from_decoded(decoded),
11580 responder,
11581 )
11582 .await;
11583 Ok(())
11584 }
11585 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11586 ordinal: 4117516026351534948,
11587 error,
11588 }),
11589 }
11590 }
11591
11592 4781081784078915088 => {
11593 let responder = ::fidl_next::Responder::from_untyped(responder);
11594
11595 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11596 Ok(decoded) => {
11597 handler
11598 .get_child_output_dictionary(
11599 ::fidl_next::Request::from_decoded(decoded),
11600 responder,
11601 )
11602 .await;
11603 Ok(())
11604 }
11605 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11606 ordinal: 4781081784078915088,
11607 error,
11608 }),
11609 }
11610 }
11611
11612 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
11613 }
11614 }
11615}
11616
11617impl<___T> RealmClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
11618
11619impl<___H, ___T> RealmLocalClientHandler<___T> for ::fidl_next::Local<___H>
11620where
11621 ___H: RealmClientHandler<___T>,
11622 ___T: ::fidl_next::Transport,
11623{
11624}
11625
11626impl<___H, ___T> RealmLocalServerHandler<___T> for ::fidl_next::Local<___H>
11627where
11628 ___H: RealmServerHandler<___T>,
11629 ___T: ::fidl_next::Transport,
11630{
11631 async fn open_controller(
11632 &mut self,
11633
11634 request: ::fidl_next::Request<realm::OpenController, ___T>,
11635
11636 responder: ::fidl_next::Responder<realm::OpenController, ___T>,
11637 ) {
11638 ___H::open_controller(&mut self.0, request, responder).await
11639 }
11640
11641 async fn open_exposed_dir(
11642 &mut self,
11643
11644 request: ::fidl_next::Request<realm::OpenExposedDir, ___T>,
11645
11646 responder: ::fidl_next::Responder<realm::OpenExposedDir, ___T>,
11647 ) {
11648 ___H::open_exposed_dir(&mut self.0, request, responder).await
11649 }
11650
11651 async fn create_child(
11652 &mut self,
11653
11654 request: ::fidl_next::Request<realm::CreateChild, ___T>,
11655
11656 responder: ::fidl_next::Responder<realm::CreateChild, ___T>,
11657 ) {
11658 ___H::create_child(&mut self.0, request, responder).await
11659 }
11660
11661 async fn destroy_child(
11662 &mut self,
11663
11664 request: ::fidl_next::Request<realm::DestroyChild, ___T>,
11665
11666 responder: ::fidl_next::Responder<realm::DestroyChild, ___T>,
11667 ) {
11668 ___H::destroy_child(&mut self.0, request, responder).await
11669 }
11670
11671 async fn list_children(
11672 &mut self,
11673
11674 request: ::fidl_next::Request<realm::ListChildren, ___T>,
11675
11676 responder: ::fidl_next::Responder<realm::ListChildren, ___T>,
11677 ) {
11678 ___H::list_children(&mut self.0, request, responder).await
11679 }
11680
11681 async fn get_resolved_info(
11682 &mut self,
11683
11684 responder: ::fidl_next::Responder<realm::GetResolvedInfo, ___T>,
11685 ) {
11686 ___H::get_resolved_info(&mut self.0, responder).await
11687 }
11688
11689 async fn get_child_output_dictionary_deprecated(
11690 &mut self,
11691
11692 request: ::fidl_next::Request<realm::GetChildOutputDictionaryDeprecated, ___T>,
11693
11694 responder: ::fidl_next::Responder<realm::GetChildOutputDictionaryDeprecated, ___T>,
11695 ) {
11696 ___H::get_child_output_dictionary_deprecated(&mut self.0, request, responder).await
11697 }
11698
11699 async fn get_child_output_dictionary(
11700 &mut self,
11701
11702 request: ::fidl_next::Request<realm::GetChildOutputDictionary, ___T>,
11703
11704 responder: ::fidl_next::Responder<realm::GetChildOutputDictionary, ___T>,
11705 ) {
11706 ___H::get_child_output_dictionary(&mut self.0, request, responder).await
11707 }
11708}
11709
11710#[derive(PartialEq, Debug)]
11712pub struct StorageAdmin;
11713
11714impl ::fidl_next::Discoverable for StorageAdmin {
11715 const PROTOCOL_NAME: &'static str = "fuchsia.component.StorageAdmin";
11716}
11717
11718#[cfg(target_os = "fuchsia")]
11719impl ::fidl_next::HasTransport for StorageAdmin {
11720 type Transport = ::fidl_next::fuchsia::zx::Channel;
11721}
11722
11723pub mod storage_admin {
11724 pub mod prelude {
11725 pub use crate::{
11726 StorageAdmin, StorageAdminClientHandler, StorageAdminLocalClientHandler,
11727 StorageAdminLocalServerHandler, StorageAdminServerHandler, storage_admin,
11728 };
11729
11730 pub use crate::natural::DeletionError;
11731
11732 pub use crate::natural::Error;
11733
11734 pub use crate::natural::StatusError;
11735
11736 pub use crate::natural::StorageAdminDeleteComponentStorageRequest;
11737
11738 pub use crate::natural::StorageAdminListStorageInRealmRequest;
11739
11740 pub use crate::natural::StorageAdminOpenComponentStorageByIdRequest;
11741
11742 pub use crate::natural::StorageAdminOpenStorageRequest;
11743
11744 pub use crate::natural::StorageAdminDeleteAllStorageContentsResponse;
11745
11746 pub use crate::natural::StorageAdminDeleteComponentStorageResponse;
11747
11748 pub use crate::natural::StorageAdminListStorageInRealmResponse;
11749
11750 pub use crate::natural::StorageAdminOpenComponentStorageByIdResponse;
11751
11752 pub use crate::natural::StorageAdminOpenStorageResponse;
11753
11754 pub use crate::natural::StorageStatus;
11755 }
11756
11757 pub struct OpenStorage;
11758
11759 impl ::fidl_next::Method for OpenStorage {
11760 const ORDINAL: u64 = 7848267339832116087;
11761 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11762 ::fidl_next::protocol::Flexibility::Strict;
11763
11764 type Protocol = crate::StorageAdmin;
11765
11766 type Request = crate::wire::StorageAdminOpenStorageRequest<'static>;
11767 }
11768
11769 impl ::fidl_next::TwoWayMethod for OpenStorage {
11770 type Response = ::fidl_next::wire::Result<
11771 'static,
11772 crate::wire::StorageAdminOpenStorageResponse,
11773 crate::wire::Error,
11774 >;
11775 }
11776
11777 impl<___R> ::fidl_next::Respond<___R> for OpenStorage {
11778 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
11779
11780 fn respond(response: ___R) -> Self::Output {
11781 ::core::result::Result::Ok(response)
11782 }
11783 }
11784
11785 impl<___R> ::fidl_next::RespondErr<___R> for OpenStorage {
11786 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
11787
11788 fn respond_err(response: ___R) -> Self::Output {
11789 ::core::result::Result::Err(response)
11790 }
11791 }
11792
11793 pub struct ListStorageInRealm;
11794
11795 impl ::fidl_next::Method for ListStorageInRealm {
11796 const ORDINAL: u64 = 8525152599685368827;
11797 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11798 ::fidl_next::protocol::Flexibility::Strict;
11799
11800 type Protocol = crate::StorageAdmin;
11801
11802 type Request = crate::wire::StorageAdminListStorageInRealmRequest<'static>;
11803 }
11804
11805 impl ::fidl_next::TwoWayMethod for ListStorageInRealm {
11806 type Response = ::fidl_next::wire::Result<
11807 'static,
11808 crate::wire::StorageAdminListStorageInRealmResponse,
11809 crate::wire::Error,
11810 >;
11811 }
11812
11813 impl<___R> ::fidl_next::Respond<___R> for ListStorageInRealm {
11814 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
11815
11816 fn respond(response: ___R) -> Self::Output {
11817 ::core::result::Result::Ok(response)
11818 }
11819 }
11820
11821 impl<___R> ::fidl_next::RespondErr<___R> for ListStorageInRealm {
11822 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
11823
11824 fn respond_err(response: ___R) -> Self::Output {
11825 ::core::result::Result::Err(response)
11826 }
11827 }
11828
11829 pub struct OpenComponentStorageById;
11830
11831 impl ::fidl_next::Method for OpenComponentStorageById {
11832 const ORDINAL: u64 = 5188727505160068593;
11833 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11834 ::fidl_next::protocol::Flexibility::Strict;
11835
11836 type Protocol = crate::StorageAdmin;
11837
11838 type Request = crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>;
11839 }
11840
11841 impl ::fidl_next::TwoWayMethod for OpenComponentStorageById {
11842 type Response = ::fidl_next::wire::Result<
11843 'static,
11844 crate::wire::StorageAdminOpenComponentStorageByIdResponse,
11845 crate::wire::Error,
11846 >;
11847 }
11848
11849 impl<___R> ::fidl_next::Respond<___R> for OpenComponentStorageById {
11850 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
11851
11852 fn respond(response: ___R) -> Self::Output {
11853 ::core::result::Result::Ok(response)
11854 }
11855 }
11856
11857 impl<___R> ::fidl_next::RespondErr<___R> for OpenComponentStorageById {
11858 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
11859
11860 fn respond_err(response: ___R) -> Self::Output {
11861 ::core::result::Result::Err(response)
11862 }
11863 }
11864
11865 pub struct DeleteComponentStorage;
11866
11867 impl ::fidl_next::Method for DeleteComponentStorage {
11868 const ORDINAL: u64 = 1618975681517712474;
11869 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11870 ::fidl_next::protocol::Flexibility::Strict;
11871
11872 type Protocol = crate::StorageAdmin;
11873
11874 type Request = crate::wire::StorageAdminDeleteComponentStorageRequest<'static>;
11875 }
11876
11877 impl ::fidl_next::TwoWayMethod for DeleteComponentStorage {
11878 type Response = ::fidl_next::wire::Result<
11879 'static,
11880 crate::wire::StorageAdminDeleteComponentStorageResponse,
11881 crate::wire::Error,
11882 >;
11883 }
11884
11885 impl<___R> ::fidl_next::Respond<___R> for DeleteComponentStorage {
11886 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
11887
11888 fn respond(response: ___R) -> Self::Output {
11889 ::core::result::Result::Ok(response)
11890 }
11891 }
11892
11893 impl<___R> ::fidl_next::RespondErr<___R> for DeleteComponentStorage {
11894 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
11895
11896 fn respond_err(response: ___R) -> Self::Output {
11897 ::core::result::Result::Err(response)
11898 }
11899 }
11900
11901 pub struct GetStatus;
11902
11903 impl ::fidl_next::Method for GetStatus {
11904 const ORDINAL: u64 = 8586643915409794760;
11905 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11906 ::fidl_next::protocol::Flexibility::Strict;
11907
11908 type Protocol = crate::StorageAdmin;
11909
11910 type Request = ::fidl_next::wire::EmptyMessageBody;
11911 }
11912
11913 impl ::fidl_next::TwoWayMethod for GetStatus {
11914 type Response = ::fidl_next::wire::Result<
11915 'static,
11916 crate::wire::StorageStatus<'static>,
11917 crate::wire::StatusError,
11918 >;
11919 }
11920
11921 impl<___R> ::fidl_next::Respond<___R> for GetStatus {
11922 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
11923
11924 fn respond(response: ___R) -> Self::Output {
11925 ::core::result::Result::Ok(response)
11926 }
11927 }
11928
11929 impl<___R> ::fidl_next::RespondErr<___R> for GetStatus {
11930 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
11931
11932 fn respond_err(response: ___R) -> Self::Output {
11933 ::core::result::Result::Err(response)
11934 }
11935 }
11936
11937 pub struct DeleteAllStorageContents;
11938
11939 impl ::fidl_next::Method for DeleteAllStorageContents {
11940 const ORDINAL: u64 = 3380374508900862683;
11941 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11942 ::fidl_next::protocol::Flexibility::Strict;
11943
11944 type Protocol = crate::StorageAdmin;
11945
11946 type Request = ::fidl_next::wire::EmptyMessageBody;
11947 }
11948
11949 impl ::fidl_next::TwoWayMethod for DeleteAllStorageContents {
11950 type Response = ::fidl_next::wire::Result<
11951 'static,
11952 crate::wire::StorageAdminDeleteAllStorageContentsResponse,
11953 crate::wire::DeletionError,
11954 >;
11955 }
11956
11957 impl<___R> ::fidl_next::Respond<___R> for DeleteAllStorageContents {
11958 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
11959
11960 fn respond(response: ___R) -> Self::Output {
11961 ::core::result::Result::Ok(response)
11962 }
11963 }
11964
11965 impl<___R> ::fidl_next::RespondErr<___R> for DeleteAllStorageContents {
11966 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
11967
11968 fn respond_err(response: ___R) -> Self::Output {
11969 ::core::result::Result::Err(response)
11970 }
11971 }
11972
11973 mod ___detail {
11974 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::StorageAdmin
11975 where
11976 ___T: ::fidl_next::Transport,
11977 {
11978 type Client = StorageAdminClient<___T>;
11979 type Server = StorageAdminServer<___T>;
11980 }
11981
11982 #[repr(transparent)]
11984 pub struct StorageAdminClient<___T: ::fidl_next::Transport> {
11985 #[allow(dead_code)]
11986 client: ::fidl_next::protocol::Client<___T>,
11987 }
11988
11989 impl<___T> StorageAdminClient<___T>
11990 where
11991 ___T: ::fidl_next::Transport,
11992 {
11993 #[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"]
11994 pub fn open_storage(
11995 &self,
11996
11997 relative_moniker: impl ::fidl_next::Encode<
11998 ::fidl_next::wire::String<'static>,
11999 <___T as ::fidl_next::Transport>::SendBuffer,
12000 >,
12001
12002 object: impl ::fidl_next::Encode<
12003 ::fidl_next::ServerEnd<
12004 ::fidl_next_fuchsia_io::Node,
12005 ::fidl_next::wire::fuchsia::Channel,
12006 >,
12007 <___T as ::fidl_next::Transport>::SendBuffer,
12008 >,
12009 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenStorage, ___T>
12010 where
12011 <___T as ::fidl_next::Transport>::SendBuffer:
12012 ::fidl_next::encoder::InternalHandleEncoder,
12013 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12014 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12015 {
12016 self.open_storage_with(crate::generic::StorageAdminOpenStorageRequest {
12017 relative_moniker,
12018
12019 object,
12020 })
12021 }
12022
12023 #[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"]
12024 pub fn open_storage_with<___R>(
12025 &self,
12026 request: ___R,
12027 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenStorage, ___T>
12028 where
12029 ___R: ::fidl_next::Encode<
12030 crate::wire::StorageAdminOpenStorageRequest<'static>,
12031 <___T as ::fidl_next::Transport>::SendBuffer,
12032 >,
12033 {
12034 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12035 7848267339832116087,
12036 <super::OpenStorage as ::fidl_next::Method>::FLEXIBILITY,
12037 request,
12038 ))
12039 }
12040
12041 #[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"]
12042 pub fn list_storage_in_realm(
12043 &self,
12044
12045 relative_moniker: impl ::fidl_next::Encode<
12046 ::fidl_next::wire::String<'static>,
12047 <___T as ::fidl_next::Transport>::SendBuffer,
12048 >,
12049
12050 iterator: impl ::fidl_next::Encode<
12051 ::fidl_next::ServerEnd<
12052 crate::StorageIterator,
12053 ::fidl_next::wire::fuchsia::Channel,
12054 >,
12055 <___T as ::fidl_next::Transport>::SendBuffer,
12056 >,
12057 ) -> ::fidl_next::TwoWayFuture<'_, super::ListStorageInRealm, ___T>
12058 where
12059 <___T as ::fidl_next::Transport>::SendBuffer:
12060 ::fidl_next::encoder::InternalHandleEncoder,
12061 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12062 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12063 {
12064 self.list_storage_in_realm_with(
12065 crate::generic::StorageAdminListStorageInRealmRequest {
12066 relative_moniker,
12067
12068 iterator,
12069 },
12070 )
12071 }
12072
12073 #[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"]
12074 pub fn list_storage_in_realm_with<___R>(
12075 &self,
12076 request: ___R,
12077 ) -> ::fidl_next::TwoWayFuture<'_, super::ListStorageInRealm, ___T>
12078 where
12079 ___R: ::fidl_next::Encode<
12080 crate::wire::StorageAdminListStorageInRealmRequest<'static>,
12081 <___T as ::fidl_next::Transport>::SendBuffer,
12082 >,
12083 {
12084 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12085 8525152599685368827,
12086 <super::ListStorageInRealm as ::fidl_next::Method>::FLEXIBILITY,
12087 request,
12088 ))
12089 }
12090
12091 #[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"]
12092 pub fn open_component_storage_by_id(
12093 &self,
12094
12095 id: impl ::fidl_next::Encode<
12096 ::fidl_next::wire::String<'static>,
12097 <___T as ::fidl_next::Transport>::SendBuffer,
12098 >,
12099
12100 object: impl ::fidl_next::Encode<
12101 ::fidl_next::ServerEnd<
12102 ::fidl_next_fuchsia_io::Node,
12103 ::fidl_next::wire::fuchsia::Channel,
12104 >,
12105 <___T as ::fidl_next::Transport>::SendBuffer,
12106 >,
12107 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenComponentStorageById, ___T>
12108 where
12109 <___T as ::fidl_next::Transport>::SendBuffer:
12110 ::fidl_next::encoder::InternalHandleEncoder,
12111 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12112 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12113 {
12114 self.open_component_storage_by_id_with(
12115 crate::generic::StorageAdminOpenComponentStorageByIdRequest { id, object },
12116 )
12117 }
12118
12119 #[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"]
12120 pub fn open_component_storage_by_id_with<___R>(
12121 &self,
12122 request: ___R,
12123 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenComponentStorageById, ___T>
12124 where
12125 ___R: ::fidl_next::Encode<
12126 crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>,
12127 <___T as ::fidl_next::Transport>::SendBuffer,
12128 >,
12129 {
12130 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12131 5188727505160068593,
12132 <super::OpenComponentStorageById as ::fidl_next::Method>::FLEXIBILITY,
12133 request,
12134 ))
12135 }
12136
12137 #[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"]
12138 pub fn delete_component_storage(
12139 &self,
12140
12141 relative_moniker: impl ::fidl_next::Encode<
12142 ::fidl_next::wire::String<'static>,
12143 <___T as ::fidl_next::Transport>::SendBuffer,
12144 >,
12145 ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteComponentStorage, ___T>
12146 where
12147 <___T as ::fidl_next::Transport>::SendBuffer:
12148 ::fidl_next::encoder::InternalHandleEncoder,
12149 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12150 {
12151 self.delete_component_storage_with(
12152 crate::generic::StorageAdminDeleteComponentStorageRequest { relative_moniker },
12153 )
12154 }
12155
12156 #[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"]
12157 pub fn delete_component_storage_with<___R>(
12158 &self,
12159 request: ___R,
12160 ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteComponentStorage, ___T>
12161 where
12162 ___R: ::fidl_next::Encode<
12163 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
12164 <___T as ::fidl_next::Transport>::SendBuffer,
12165 >,
12166 {
12167 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12168 1618975681517712474,
12169 <super::DeleteComponentStorage as ::fidl_next::Method>::FLEXIBILITY,
12170 request,
12171 ))
12172 }
12173
12174 #[doc = " Get the current status of the storage.\n"]
12175 pub fn get_status(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetStatus, ___T> {
12176 ::fidl_next::TwoWayFuture::from_untyped(
12177 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
12178 8586643915409794760,
12179 <super::GetStatus as ::fidl_next::Method>::FLEXIBILITY,
12180 (),
12181 ),
12182 )
12183 }
12184
12185 #[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"]
12186 pub fn delete_all_storage_contents(
12187 &self,
12188 ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteAllStorageContents, ___T> {
12189 ::fidl_next::TwoWayFuture::from_untyped(
12190 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
12191 3380374508900862683,
12192 <super::DeleteAllStorageContents as ::fidl_next::Method>::FLEXIBILITY,
12193 (),
12194 ),
12195 )
12196 }
12197 }
12198
12199 #[repr(transparent)]
12201 pub struct StorageAdminServer<___T: ::fidl_next::Transport> {
12202 server: ::fidl_next::protocol::Server<___T>,
12203 }
12204
12205 impl<___T> StorageAdminServer<___T> where ___T: ::fidl_next::Transport {}
12206 }
12207}
12208
12209#[diagnostic::on_unimplemented(
12210 note = "If {Self} implements the non-local StorageAdminClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
12211)]
12212
12213pub trait StorageAdminLocalClientHandler<
12217 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12218 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12219>
12220{
12221}
12222
12223impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for StorageAdmin
12224where
12225 ___H: StorageAdminLocalClientHandler<___T>,
12226 ___T: ::fidl_next::Transport,
12227{
12228 async fn on_event(
12229 handler: &mut ___H,
12230 mut message: ::fidl_next::Message<___T>,
12231 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12232 match *message.header().ordinal {
12233 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12234 }
12235 }
12236}
12237
12238#[diagnostic::on_unimplemented(
12239 note = "If {Self} implements the non-local StorageAdminServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
12240)]
12241
12242pub trait StorageAdminLocalServerHandler<
12246 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12247 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12248>
12249{
12250 #[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"]
12251 fn open_storage(
12252 &mut self,
12253
12254 request: ::fidl_next::Request<storage_admin::OpenStorage, ___T>,
12255
12256 responder: ::fidl_next::Responder<storage_admin::OpenStorage, ___T>,
12257 ) -> impl ::core::future::Future<Output = ()>;
12258
12259 #[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"]
12260 fn list_storage_in_realm(
12261 &mut self,
12262
12263 request: ::fidl_next::Request<storage_admin::ListStorageInRealm, ___T>,
12264
12265 responder: ::fidl_next::Responder<storage_admin::ListStorageInRealm, ___T>,
12266 ) -> impl ::core::future::Future<Output = ()>;
12267
12268 #[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"]
12269 fn open_component_storage_by_id(
12270 &mut self,
12271
12272 request: ::fidl_next::Request<storage_admin::OpenComponentStorageById, ___T>,
12273
12274 responder: ::fidl_next::Responder<storage_admin::OpenComponentStorageById, ___T>,
12275 ) -> impl ::core::future::Future<Output = ()>;
12276
12277 #[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"]
12278 fn delete_component_storage(
12279 &mut self,
12280
12281 request: ::fidl_next::Request<storage_admin::DeleteComponentStorage, ___T>,
12282
12283 responder: ::fidl_next::Responder<storage_admin::DeleteComponentStorage, ___T>,
12284 ) -> impl ::core::future::Future<Output = ()>;
12285
12286 #[doc = " Get the current status of the storage.\n"]
12287 fn get_status(
12288 &mut self,
12289
12290 responder: ::fidl_next::Responder<storage_admin::GetStatus, ___T>,
12291 ) -> impl ::core::future::Future<Output = ()>;
12292
12293 #[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"]
12294 fn delete_all_storage_contents(
12295 &mut self,
12296
12297 responder: ::fidl_next::Responder<storage_admin::DeleteAllStorageContents, ___T>,
12298 ) -> impl ::core::future::Future<Output = ()>;
12299}
12300
12301impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for StorageAdmin
12302where
12303 ___H: StorageAdminLocalServerHandler<___T>,
12304 ___T: ::fidl_next::Transport,
12305 for<'de> crate::wire::StorageAdminOpenStorageRequest<'de>: ::fidl_next::Decode<
12306 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12307 Constraint = (),
12308 >,
12309 for<'de> crate::wire::StorageAdminListStorageInRealmRequest<'de>: ::fidl_next::Decode<
12310 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12311 Constraint = (),
12312 >,
12313 for<'de> crate::wire::StorageAdminOpenComponentStorageByIdRequest<'de>: ::fidl_next::Decode<
12314 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12315 Constraint = (),
12316 >,
12317 for<'de> crate::wire::StorageAdminDeleteComponentStorageRequest<'de>: ::fidl_next::Decode<
12318 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12319 Constraint = (),
12320 >,
12321{
12322 async fn on_one_way(
12323 handler: &mut ___H,
12324 mut message: ::fidl_next::Message<___T>,
12325 ) -> ::core::result::Result<
12326 (),
12327 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12328 > {
12329 match *message.header().ordinal {
12330 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12331 }
12332 }
12333
12334 async fn on_two_way(
12335 handler: &mut ___H,
12336 mut message: ::fidl_next::Message<___T>,
12337 responder: ::fidl_next::protocol::Responder<___T>,
12338 ) -> ::core::result::Result<
12339 (),
12340 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12341 > {
12342 match *message.header().ordinal {
12343 7848267339832116087 => {
12344 let responder = ::fidl_next::Responder::from_untyped(responder);
12345
12346 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12347 Ok(decoded) => {
12348 handler
12349 .open_storage(::fidl_next::Request::from_decoded(decoded), responder)
12350 .await;
12351 Ok(())
12352 }
12353 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12354 ordinal: 7848267339832116087,
12355 error,
12356 }),
12357 }
12358 }
12359
12360 8525152599685368827 => {
12361 let responder = ::fidl_next::Responder::from_untyped(responder);
12362
12363 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12364 Ok(decoded) => {
12365 handler
12366 .list_storage_in_realm(
12367 ::fidl_next::Request::from_decoded(decoded),
12368 responder,
12369 )
12370 .await;
12371 Ok(())
12372 }
12373 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12374 ordinal: 8525152599685368827,
12375 error,
12376 }),
12377 }
12378 }
12379
12380 5188727505160068593 => {
12381 let responder = ::fidl_next::Responder::from_untyped(responder);
12382
12383 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12384 Ok(decoded) => {
12385 handler
12386 .open_component_storage_by_id(
12387 ::fidl_next::Request::from_decoded(decoded),
12388 responder,
12389 )
12390 .await;
12391 Ok(())
12392 }
12393 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12394 ordinal: 5188727505160068593,
12395 error,
12396 }),
12397 }
12398 }
12399
12400 1618975681517712474 => {
12401 let responder = ::fidl_next::Responder::from_untyped(responder);
12402
12403 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12404 Ok(decoded) => {
12405 handler
12406 .delete_component_storage(
12407 ::fidl_next::Request::from_decoded(decoded),
12408 responder,
12409 )
12410 .await;
12411 Ok(())
12412 }
12413 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12414 ordinal: 1618975681517712474,
12415 error,
12416 }),
12417 }
12418 }
12419
12420 8586643915409794760 => {
12421 let responder = ::fidl_next::Responder::from_untyped(responder);
12422
12423 handler.get_status(responder).await;
12424 Ok(())
12425 }
12426
12427 3380374508900862683 => {
12428 let responder = ::fidl_next::Responder::from_untyped(responder);
12429
12430 handler.delete_all_storage_contents(responder).await;
12431 Ok(())
12432 }
12433
12434 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12435 }
12436 }
12437}
12438
12439pub trait StorageAdminClientHandler<
12443 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12444 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12445>
12446{
12447}
12448
12449impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for StorageAdmin
12450where
12451 ___H: StorageAdminClientHandler<___T> + ::core::marker::Send,
12452 ___T: ::fidl_next::Transport,
12453{
12454 async fn on_event(
12455 handler: &mut ___H,
12456 mut message: ::fidl_next::Message<___T>,
12457 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12458 match *message.header().ordinal {
12459 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12460 }
12461 }
12462}
12463
12464pub trait StorageAdminServerHandler<
12468 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12469 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12470>
12471{
12472 #[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"]
12473 fn open_storage(
12474 &mut self,
12475
12476 request: ::fidl_next::Request<storage_admin::OpenStorage, ___T>,
12477
12478 responder: ::fidl_next::Responder<storage_admin::OpenStorage, ___T>,
12479 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12480
12481 #[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"]
12482 fn list_storage_in_realm(
12483 &mut self,
12484
12485 request: ::fidl_next::Request<storage_admin::ListStorageInRealm, ___T>,
12486
12487 responder: ::fidl_next::Responder<storage_admin::ListStorageInRealm, ___T>,
12488 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12489
12490 #[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"]
12491 fn open_component_storage_by_id(
12492 &mut self,
12493
12494 request: ::fidl_next::Request<storage_admin::OpenComponentStorageById, ___T>,
12495
12496 responder: ::fidl_next::Responder<storage_admin::OpenComponentStorageById, ___T>,
12497 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12498
12499 #[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"]
12500 fn delete_component_storage(
12501 &mut self,
12502
12503 request: ::fidl_next::Request<storage_admin::DeleteComponentStorage, ___T>,
12504
12505 responder: ::fidl_next::Responder<storage_admin::DeleteComponentStorage, ___T>,
12506 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12507
12508 #[doc = " Get the current status of the storage.\n"]
12509 fn get_status(
12510 &mut self,
12511
12512 responder: ::fidl_next::Responder<storage_admin::GetStatus, ___T>,
12513 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12514
12515 #[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"]
12516 fn delete_all_storage_contents(
12517 &mut self,
12518
12519 responder: ::fidl_next::Responder<storage_admin::DeleteAllStorageContents, ___T>,
12520 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12521}
12522
12523impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for StorageAdmin
12524where
12525 ___H: StorageAdminServerHandler<___T> + ::core::marker::Send,
12526 ___T: ::fidl_next::Transport,
12527 for<'de> crate::wire::StorageAdminOpenStorageRequest<'de>: ::fidl_next::Decode<
12528 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12529 Constraint = (),
12530 >,
12531 for<'de> crate::wire::StorageAdminListStorageInRealmRequest<'de>: ::fidl_next::Decode<
12532 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12533 Constraint = (),
12534 >,
12535 for<'de> crate::wire::StorageAdminOpenComponentStorageByIdRequest<'de>: ::fidl_next::Decode<
12536 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12537 Constraint = (),
12538 >,
12539 for<'de> crate::wire::StorageAdminDeleteComponentStorageRequest<'de>: ::fidl_next::Decode<
12540 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12541 Constraint = (),
12542 >,
12543{
12544 async fn on_one_way(
12545 handler: &mut ___H,
12546 mut message: ::fidl_next::Message<___T>,
12547 ) -> ::core::result::Result<
12548 (),
12549 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12550 > {
12551 match *message.header().ordinal {
12552 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12553 }
12554 }
12555
12556 async fn on_two_way(
12557 handler: &mut ___H,
12558 mut message: ::fidl_next::Message<___T>,
12559 responder: ::fidl_next::protocol::Responder<___T>,
12560 ) -> ::core::result::Result<
12561 (),
12562 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12563 > {
12564 match *message.header().ordinal {
12565 7848267339832116087 => {
12566 let responder = ::fidl_next::Responder::from_untyped(responder);
12567
12568 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12569 Ok(decoded) => {
12570 handler
12571 .open_storage(::fidl_next::Request::from_decoded(decoded), responder)
12572 .await;
12573 Ok(())
12574 }
12575 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12576 ordinal: 7848267339832116087,
12577 error,
12578 }),
12579 }
12580 }
12581
12582 8525152599685368827 => {
12583 let responder = ::fidl_next::Responder::from_untyped(responder);
12584
12585 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12586 Ok(decoded) => {
12587 handler
12588 .list_storage_in_realm(
12589 ::fidl_next::Request::from_decoded(decoded),
12590 responder,
12591 )
12592 .await;
12593 Ok(())
12594 }
12595 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12596 ordinal: 8525152599685368827,
12597 error,
12598 }),
12599 }
12600 }
12601
12602 5188727505160068593 => {
12603 let responder = ::fidl_next::Responder::from_untyped(responder);
12604
12605 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12606 Ok(decoded) => {
12607 handler
12608 .open_component_storage_by_id(
12609 ::fidl_next::Request::from_decoded(decoded),
12610 responder,
12611 )
12612 .await;
12613 Ok(())
12614 }
12615 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12616 ordinal: 5188727505160068593,
12617 error,
12618 }),
12619 }
12620 }
12621
12622 1618975681517712474 => {
12623 let responder = ::fidl_next::Responder::from_untyped(responder);
12624
12625 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12626 Ok(decoded) => {
12627 handler
12628 .delete_component_storage(
12629 ::fidl_next::Request::from_decoded(decoded),
12630 responder,
12631 )
12632 .await;
12633 Ok(())
12634 }
12635 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12636 ordinal: 1618975681517712474,
12637 error,
12638 }),
12639 }
12640 }
12641
12642 8586643915409794760 => {
12643 let responder = ::fidl_next::Responder::from_untyped(responder);
12644
12645 handler.get_status(responder).await;
12646 Ok(())
12647 }
12648
12649 3380374508900862683 => {
12650 let responder = ::fidl_next::Responder::from_untyped(responder);
12651
12652 handler.delete_all_storage_contents(responder).await;
12653 Ok(())
12654 }
12655
12656 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12657 }
12658 }
12659}
12660
12661impl<___T> StorageAdminClientHandler<___T> for ::fidl_next::IgnoreEvents where
12662 ___T: ::fidl_next::Transport
12663{
12664}
12665
12666impl<___H, ___T> StorageAdminLocalClientHandler<___T> for ::fidl_next::Local<___H>
12667where
12668 ___H: StorageAdminClientHandler<___T>,
12669 ___T: ::fidl_next::Transport,
12670{
12671}
12672
12673impl<___H, ___T> StorageAdminLocalServerHandler<___T> for ::fidl_next::Local<___H>
12674where
12675 ___H: StorageAdminServerHandler<___T>,
12676 ___T: ::fidl_next::Transport,
12677{
12678 async fn open_storage(
12679 &mut self,
12680
12681 request: ::fidl_next::Request<storage_admin::OpenStorage, ___T>,
12682
12683 responder: ::fidl_next::Responder<storage_admin::OpenStorage, ___T>,
12684 ) {
12685 ___H::open_storage(&mut self.0, request, responder).await
12686 }
12687
12688 async fn list_storage_in_realm(
12689 &mut self,
12690
12691 request: ::fidl_next::Request<storage_admin::ListStorageInRealm, ___T>,
12692
12693 responder: ::fidl_next::Responder<storage_admin::ListStorageInRealm, ___T>,
12694 ) {
12695 ___H::list_storage_in_realm(&mut self.0, request, responder).await
12696 }
12697
12698 async fn open_component_storage_by_id(
12699 &mut self,
12700
12701 request: ::fidl_next::Request<storage_admin::OpenComponentStorageById, ___T>,
12702
12703 responder: ::fidl_next::Responder<storage_admin::OpenComponentStorageById, ___T>,
12704 ) {
12705 ___H::open_component_storage_by_id(&mut self.0, request, responder).await
12706 }
12707
12708 async fn delete_component_storage(
12709 &mut self,
12710
12711 request: ::fidl_next::Request<storage_admin::DeleteComponentStorage, ___T>,
12712
12713 responder: ::fidl_next::Responder<storage_admin::DeleteComponentStorage, ___T>,
12714 ) {
12715 ___H::delete_component_storage(&mut self.0, request, responder).await
12716 }
12717
12718 async fn get_status(
12719 &mut self,
12720
12721 responder: ::fidl_next::Responder<storage_admin::GetStatus, ___T>,
12722 ) {
12723 ___H::get_status(&mut self.0, responder).await
12724 }
12725
12726 async fn delete_all_storage_contents(
12727 &mut self,
12728
12729 responder: ::fidl_next::Responder<storage_admin::DeleteAllStorageContents, ___T>,
12730 ) {
12731 ___H::delete_all_storage_contents(&mut self.0, responder).await
12732 }
12733}
12734
12735pub use fidl_next_common_fuchsia_component::*;