1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub type Name = ::std::string::String;
8
9 #[doc = " Payload for CapabilityRequested events\n"]
10 #[derive(PartialEq, Debug, Default)]
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 impl ::fidl_next::Encodable for CapabilityRequestedPayload {
32 type Encoded = crate::wire::CapabilityRequestedPayload<'static>;
33 }
34
35 unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityRequestedPayload
36 where
37 ___E: ::fidl_next::Encoder + ?Sized,
38 ___E: ::fidl_next::fuchsia::HandleEncoder,
39 {
40 #[inline]
41 fn encode(
42 mut self,
43 encoder: &mut ___E,
44 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
45 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
46 ::fidl_next::munge!(let crate::wire::CapabilityRequestedPayload { table } = out);
47
48 let max_ord = self.__max_ordinal();
49
50 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
51 ::fidl_next::Wire::zero_padding(&mut out);
52
53 let mut preallocated =
54 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
55
56 for i in 1..=max_ord {
57 match i {
58 2 => {
59 if let Some(value) = self.capability.take() {
60 ::fidl_next::WireEnvelope::encode_value(
61 value,
62 preallocated.encoder,
63 &mut out,
64 )?;
65 } else {
66 ::fidl_next::WireEnvelope::encode_zero(&mut out)
67 }
68 }
69
70 1 => {
71 if let Some(value) = self.name.take() {
72 ::fidl_next::WireEnvelope::encode_value(
73 value,
74 preallocated.encoder,
75 &mut out,
76 )?;
77 } else {
78 ::fidl_next::WireEnvelope::encode_zero(&mut out)
79 }
80 }
81
82 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
83 }
84 unsafe {
85 preallocated.write_next(out.assume_init_ref());
86 }
87 }
88
89 ::fidl_next::WireTable::encode_len(table, max_ord);
90
91 Ok(())
92 }
93 }
94
95 impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityRequestedPayload<'de>>
96 for CapabilityRequestedPayload
97 {
98 #[inline]
99 fn from_wire(wire_: crate::wire::CapabilityRequestedPayload<'de>) -> Self {
100 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
101
102 let name = wire_.table.get(1);
103
104 let capability = wire_.table.get(2);
105
106 Self {
107 name: name.map(|envelope| {
108 ::fidl_next::FromWire::from_wire(unsafe {
109 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
110 })
111 }),
112
113 capability: capability.map(|envelope| {
114 ::fidl_next::FromWire::from_wire(unsafe {
115 envelope.read_unchecked::<::fidl_next::fuchsia::WireChannel>()
116 })
117 }),
118 }
119 }
120 }
121
122 #[derive(PartialEq, Clone, Debug)]
123 pub struct ChildIteratorNextResponse {
124 pub children: ::std::vec::Vec<::fidl_next_fuchsia_component_decl::natural::ChildRef>,
125 }
126
127 impl ::fidl_next::Encodable for ChildIteratorNextResponse {
128 type Encoded = crate::wire::ChildIteratorNextResponse<'static>;
129 }
130
131 unsafe impl<___E> ::fidl_next::Encode<___E> for ChildIteratorNextResponse
132 where
133 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
134 ___E: ::fidl_next::Encoder,
135 {
136 #[inline]
137 fn encode(
138 self,
139 encoder_: &mut ___E,
140 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
141 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
142 ::fidl_next::munge! {
143 let Self::Encoded {
144 children,
145
146 } = out_;
147 }
148
149 ::fidl_next::Encode::encode(self.children, encoder_, children)?;
150
151 Ok(())
152 }
153 }
154
155 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ChildIteratorNextResponse
156 where
157 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
158 ___E: ::fidl_next::Encoder,
159 {
160 #[inline]
161 fn encode_ref(
162 &self,
163 encoder_: &mut ___E,
164 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
165 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
166 ::fidl_next::munge! {
167 let Self::Encoded {
168
169 children,
170
171 } = out_;
172 }
173
174 ::fidl_next::EncodeRef::encode_ref(&self.children, encoder_, children)?;
175
176 Ok(())
177 }
178 }
179
180 impl ::fidl_next::EncodableOption for ChildIteratorNextResponse {
181 type EncodedOption =
182 ::fidl_next::WireBox<'static, crate::wire::ChildIteratorNextResponse<'static>>;
183 }
184
185 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ChildIteratorNextResponse
186 where
187 ___E: ::fidl_next::Encoder + ?Sized,
188 ChildIteratorNextResponse: ::fidl_next::Encode<___E>,
189 {
190 #[inline]
191 fn encode_option(
192 this: ::core::option::Option<Self>,
193 encoder: &mut ___E,
194 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
195 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
196 if let Some(inner) = this {
197 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
198 ::fidl_next::WireBox::encode_present(out);
199 } else {
200 ::fidl_next::WireBox::encode_absent(out);
201 }
202
203 Ok(())
204 }
205 }
206
207 unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ChildIteratorNextResponse
208 where
209 ___E: ::fidl_next::Encoder + ?Sized,
210 ChildIteratorNextResponse: ::fidl_next::EncodeRef<___E>,
211 {
212 #[inline]
213 fn encode_option_ref(
214 this: ::core::option::Option<&Self>,
215 encoder: &mut ___E,
216 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
217 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
218 if let Some(inner) = this {
219 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
220 ::fidl_next::WireBox::encode_present(out);
221 } else {
222 ::fidl_next::WireBox::encode_absent(out);
223 }
224
225 Ok(())
226 }
227 }
228
229 impl<'de> ::fidl_next::FromWire<crate::wire::ChildIteratorNextResponse<'de>>
230 for ChildIteratorNextResponse
231 {
232 #[inline]
233 fn from_wire(wire: crate::wire::ChildIteratorNextResponse<'de>) -> Self {
234 Self { children: ::fidl_next::FromWire::from_wire(wire.children) }
235 }
236 }
237
238 impl<'de> ::fidl_next::FromWireRef<crate::wire::ChildIteratorNextResponse<'de>>
239 for ChildIteratorNextResponse
240 {
241 #[inline]
242 fn from_wire_ref(wire: &crate::wire::ChildIteratorNextResponse<'de>) -> Self {
243 Self { children: ::fidl_next::FromWireRef::from_wire_ref(&wire.children) }
244 }
245 }
246
247 pub type ControllerStartResponse = ();
248
249 #[derive(PartialEq, Debug)]
250 #[repr(C)]
251 pub struct ControllerIsStartedResponse {
252 pub is_started: bool,
253 }
254
255 impl ::fidl_next::Encodable for ControllerIsStartedResponse {
256 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
257 Self,
258 crate::wire::ControllerIsStartedResponse,
259 > = unsafe {
260 ::fidl_next::CopyOptimization::enable_if(
261 true && <bool as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
262 )
263 };
264
265 type Encoded = crate::wire::ControllerIsStartedResponse;
266 }
267
268 unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerIsStartedResponse
269 where
270 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
271 ___E: ::fidl_next::fuchsia::HandleEncoder,
272 {
273 #[inline]
274 fn encode(
275 self,
276 encoder_: &mut ___E,
277 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
278 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
279 ::fidl_next::munge! {
280 let Self::Encoded {
281 is_started,
282
283 } = out_;
284 }
285
286 ::fidl_next::Encode::encode(self.is_started, encoder_, is_started)?;
287
288 Ok(())
289 }
290 }
291
292 impl ::fidl_next::EncodableOption for ControllerIsStartedResponse {
293 type EncodedOption =
294 ::fidl_next::WireBox<'static, crate::wire::ControllerIsStartedResponse>;
295 }
296
297 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerIsStartedResponse
298 where
299 ___E: ::fidl_next::Encoder + ?Sized,
300 ControllerIsStartedResponse: ::fidl_next::Encode<___E>,
301 {
302 #[inline]
303 fn encode_option(
304 this: ::core::option::Option<Self>,
305 encoder: &mut ___E,
306 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
307 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
308 if let Some(inner) = this {
309 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
310 ::fidl_next::WireBox::encode_present(out);
311 } else {
312 ::fidl_next::WireBox::encode_absent(out);
313 }
314
315 Ok(())
316 }
317 }
318
319 impl ::fidl_next::FromWire<crate::wire::ControllerIsStartedResponse>
320 for ControllerIsStartedResponse
321 {
322 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
323 crate::wire::ControllerIsStartedResponse,
324 Self,
325 > = unsafe {
326 ::fidl_next::CopyOptimization::enable_if(
327 true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
328 )
329 };
330
331 #[inline]
332 fn from_wire(wire: crate::wire::ControllerIsStartedResponse) -> Self {
333 Self { is_started: ::fidl_next::FromWire::from_wire(wire.is_started) }
334 }
335 }
336
337 #[doc = " Standard error codes for component framework protocols.\n"]
338 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
339 #[repr(u32)]
340 pub enum Error {
341 Internal = 1,
342 InvalidArguments = 2,
343 Unsupported = 3,
344 AccessDenied = 4,
345 InstanceNotFound = 5,
346 InstanceAlreadyExists = 6,
347 InstanceCannotStart = 7,
348 InstanceCannotResolve = 8,
349 CollectionNotFound = 9,
350 ResourceUnavailable = 10,
351 InstanceDied = 11,
352 ResourceNotFound = 12,
353 InstanceCannotUnresolve = 13,
354 InstanceAlreadyStarted = 14,
355 DependencyCycle = 15,
356 UnknownOrdinal_(u32) = 16,
357 }
358
359 impl ::fidl_next::Encodable for Error {
360 type Encoded = crate::wire::Error;
361 }
362 impl ::std::convert::From<u32> for Error {
363 fn from(value: u32) -> Self {
364 match value {
365 1 => Self::Internal,
366 2 => Self::InvalidArguments,
367 3 => Self::Unsupported,
368 4 => Self::AccessDenied,
369 5 => Self::InstanceNotFound,
370 6 => Self::InstanceAlreadyExists,
371 7 => Self::InstanceCannotStart,
372 8 => Self::InstanceCannotResolve,
373 9 => Self::CollectionNotFound,
374 10 => Self::ResourceUnavailable,
375 11 => Self::InstanceDied,
376 12 => Self::ResourceNotFound,
377 13 => Self::InstanceCannotUnresolve,
378 14 => Self::InstanceAlreadyStarted,
379 15 => Self::DependencyCycle,
380
381 _ => Self::UnknownOrdinal_(value),
382 }
383 }
384 }
385
386 unsafe impl<___E> ::fidl_next::Encode<___E> for Error
387 where
388 ___E: ?Sized,
389 {
390 #[inline]
391 fn encode(
392 self,
393 encoder: &mut ___E,
394 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
395 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
396 ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
397 }
398 }
399
400 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Error
401 where
402 ___E: ?Sized,
403 {
404 #[inline]
405 fn encode_ref(
406 &self,
407 encoder: &mut ___E,
408 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
409 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
410 ::fidl_next::munge!(let crate::wire::Error { value } = out);
411 let _ = value.write(::fidl_next::WireU32::from(match *self {
412 Self::Internal => 1,
413
414 Self::InvalidArguments => 2,
415
416 Self::Unsupported => 3,
417
418 Self::AccessDenied => 4,
419
420 Self::InstanceNotFound => 5,
421
422 Self::InstanceAlreadyExists => 6,
423
424 Self::InstanceCannotStart => 7,
425
426 Self::InstanceCannotResolve => 8,
427
428 Self::CollectionNotFound => 9,
429
430 Self::ResourceUnavailable => 10,
431
432 Self::InstanceDied => 11,
433
434 Self::ResourceNotFound => 12,
435
436 Self::InstanceCannotUnresolve => 13,
437
438 Self::InstanceAlreadyStarted => 14,
439
440 Self::DependencyCycle => 15,
441
442 Self::UnknownOrdinal_(value) => value,
443 }));
444
445 Ok(())
446 }
447 }
448
449 impl ::core::convert::From<crate::wire::Error> for Error {
450 fn from(wire: crate::wire::Error) -> Self {
451 match u32::from(wire.value) {
452 1 => Self::Internal,
453
454 2 => Self::InvalidArguments,
455
456 3 => Self::Unsupported,
457
458 4 => Self::AccessDenied,
459
460 5 => Self::InstanceNotFound,
461
462 6 => Self::InstanceAlreadyExists,
463
464 7 => Self::InstanceCannotStart,
465
466 8 => Self::InstanceCannotResolve,
467
468 9 => Self::CollectionNotFound,
469
470 10 => Self::ResourceUnavailable,
471
472 11 => Self::InstanceDied,
473
474 12 => Self::ResourceNotFound,
475
476 13 => Self::InstanceCannotUnresolve,
477
478 14 => Self::InstanceAlreadyStarted,
479
480 15 => Self::DependencyCycle,
481
482 value => Self::UnknownOrdinal_(value),
483 }
484 }
485 }
486
487 impl ::fidl_next::FromWire<crate::wire::Error> for Error {
488 #[inline]
489 fn from_wire(wire: crate::wire::Error) -> Self {
490 Self::from(wire)
491 }
492 }
493
494 impl ::fidl_next::FromWireRef<crate::wire::Error> for Error {
495 #[inline]
496 fn from_wire_ref(wire: &crate::wire::Error) -> Self {
497 Self::from(*wire)
498 }
499 }
500
501 #[derive(PartialEq, Debug)]
502 #[repr(C)]
503 pub struct ControllerGetExposedDictionaryResponse {
504 pub dictionary: ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef,
505 }
506
507 impl ::fidl_next::Encodable for ControllerGetExposedDictionaryResponse {
508 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
509 Self,
510 crate::wire::ControllerGetExposedDictionaryResponse,
511 > = unsafe {
512 ::fidl_next::CopyOptimization::enable_if(
513 true
514
515 && <
516 ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef as ::fidl_next::Encodable
517 >::COPY_OPTIMIZATION.is_enabled()
518
519 )
520 };
521
522 type Encoded = crate::wire::ControllerGetExposedDictionaryResponse;
523 }
524
525 unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerGetExposedDictionaryResponse
526 where
527 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
528 ___E: ::fidl_next::fuchsia::HandleEncoder,
529 {
530 #[inline]
531 fn encode(
532 self,
533 encoder_: &mut ___E,
534 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
535 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
536 ::fidl_next::munge! {
537 let Self::Encoded {
538 dictionary,
539
540 } = out_;
541 }
542
543 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary)?;
544
545 Ok(())
546 }
547 }
548
549 impl ::fidl_next::EncodableOption for ControllerGetExposedDictionaryResponse {
550 type EncodedOption =
551 ::fidl_next::WireBox<'static, crate::wire::ControllerGetExposedDictionaryResponse>;
552 }
553
554 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerGetExposedDictionaryResponse
555 where
556 ___E: ::fidl_next::Encoder + ?Sized,
557 ControllerGetExposedDictionaryResponse: ::fidl_next::Encode<___E>,
558 {
559 #[inline]
560 fn encode_option(
561 this: ::core::option::Option<Self>,
562 encoder: &mut ___E,
563 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
564 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
565 if let Some(inner) = this {
566 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
567 ::fidl_next::WireBox::encode_present(out);
568 } else {
569 ::fidl_next::WireBox::encode_absent(out);
570 }
571
572 Ok(())
573 }
574 }
575
576 impl ::fidl_next::FromWire<crate::wire::ControllerGetExposedDictionaryResponse>
577 for ControllerGetExposedDictionaryResponse
578 {
579 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
580 crate::wire::ControllerGetExposedDictionaryResponse,
581 Self,
582 > = unsafe {
583 ::fidl_next::CopyOptimization::enable_if(
584 true
585
586 && <
587 ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef as ::fidl_next::FromWire<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
588 >::COPY_OPTIMIZATION.is_enabled()
589
590 )
591 };
592
593 #[inline]
594 fn from_wire(wire: crate::wire::ControllerGetExposedDictionaryResponse) -> Self {
595 Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
596 }
597 }
598
599 pub type ControllerDestroyResponse = ();
600
601 #[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"]
602 #[derive(PartialEq, Debug, Default)]
603 pub struct NamespaceEntry {
604 pub path: ::core::option::Option<::std::string::String>,
605
606 pub directory: ::core::option::Option<
607 ::fidl_next::ClientEnd<
608 ::fidl_next_fuchsia_io::Directory,
609 ::fidl_next::fuchsia::zx::Channel,
610 >,
611 >,
612 }
613
614 impl NamespaceEntry {
615 fn __max_ordinal(&self) -> usize {
616 if self.directory.is_some() {
617 return 2;
618 }
619
620 if self.path.is_some() {
621 return 1;
622 }
623
624 0
625 }
626 }
627
628 impl ::fidl_next::Encodable for NamespaceEntry {
629 type Encoded = crate::wire::NamespaceEntry<'static>;
630 }
631
632 unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceEntry
633 where
634 ___E: ::fidl_next::Encoder + ?Sized,
635 ___E: ::fidl_next::fuchsia::HandleEncoder,
636 {
637 #[inline]
638 fn encode(
639 mut self,
640 encoder: &mut ___E,
641 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
642 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
643 ::fidl_next::munge!(let crate::wire::NamespaceEntry { table } = out);
644
645 let max_ord = self.__max_ordinal();
646
647 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
648 ::fidl_next::Wire::zero_padding(&mut out);
649
650 let mut preallocated =
651 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
652
653 for i in 1..=max_ord {
654 match i {
655 2 => {
656 if let Some(value) = self.directory.take() {
657 ::fidl_next::WireEnvelope::encode_value(
658 value,
659 preallocated.encoder,
660 &mut out,
661 )?;
662 } else {
663 ::fidl_next::WireEnvelope::encode_zero(&mut out)
664 }
665 }
666
667 1 => {
668 if let Some(value) = self.path.take() {
669 ::fidl_next::WireEnvelope::encode_value(
670 value,
671 preallocated.encoder,
672 &mut out,
673 )?;
674 } else {
675 ::fidl_next::WireEnvelope::encode_zero(&mut out)
676 }
677 }
678
679 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
680 }
681 unsafe {
682 preallocated.write_next(out.assume_init_ref());
683 }
684 }
685
686 ::fidl_next::WireTable::encode_len(table, max_ord);
687
688 Ok(())
689 }
690 }
691
692 impl<'de> ::fidl_next::FromWire<crate::wire::NamespaceEntry<'de>> for NamespaceEntry {
693 #[inline]
694 fn from_wire(wire_: crate::wire::NamespaceEntry<'de>) -> Self {
695 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
696
697 let path = wire_.table.get(1);
698
699 let directory = wire_.table.get(2);
700
701 Self {
702 path: path.map(|envelope| {
703 ::fidl_next::FromWire::from_wire(unsafe {
704 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
705 })
706 }),
707
708 directory: directory.map(|envelope| {
709 ::fidl_next::FromWire::from_wire(unsafe {
710 envelope.read_unchecked::<::fidl_next::ClientEnd<
711 ::fidl_next_fuchsia_io::Directory,
712 ::fidl_next::fuchsia::WireChannel,
713 >>()
714 })
715 }),
716 }
717 }
718 }
719
720 #[derive(PartialEq, Debug, Default)]
721 pub struct StartChildArgs {
722 pub numbered_handles: ::core::option::Option<
723 ::std::vec::Vec<::fidl_next_fuchsia_process::natural::HandleInfo>,
724 >,
725
726 pub namespace_entries:
727 ::core::option::Option<::std::vec::Vec<crate::natural::NamespaceEntry>>,
728
729 pub dictionary:
730 ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
731 }
732
733 impl StartChildArgs {
734 fn __max_ordinal(&self) -> usize {
735 if self.dictionary.is_some() {
736 return 3;
737 }
738
739 if self.namespace_entries.is_some() {
740 return 2;
741 }
742
743 if self.numbered_handles.is_some() {
744 return 1;
745 }
746
747 0
748 }
749 }
750
751 impl ::fidl_next::Encodable for StartChildArgs {
752 type Encoded = crate::wire::StartChildArgs<'static>;
753 }
754
755 unsafe impl<___E> ::fidl_next::Encode<___E> for StartChildArgs
756 where
757 ___E: ::fidl_next::Encoder + ?Sized,
758 ___E: ::fidl_next::fuchsia::HandleEncoder,
759 {
760 #[inline]
761 fn encode(
762 mut self,
763 encoder: &mut ___E,
764 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
765 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
766 ::fidl_next::munge!(let crate::wire::StartChildArgs { table } = out);
767
768 let max_ord = self.__max_ordinal();
769
770 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
771 ::fidl_next::Wire::zero_padding(&mut out);
772
773 let mut preallocated =
774 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
775
776 for i in 1..=max_ord {
777 match i {
778 3 => {
779 if let Some(value) = self.dictionary.take() {
780 ::fidl_next::WireEnvelope::encode_value(
781 value,
782 preallocated.encoder,
783 &mut out,
784 )?;
785 } else {
786 ::fidl_next::WireEnvelope::encode_zero(&mut out)
787 }
788 }
789
790 2 => {
791 if let Some(value) = self.namespace_entries.take() {
792 ::fidl_next::WireEnvelope::encode_value(
793 value,
794 preallocated.encoder,
795 &mut out,
796 )?;
797 } else {
798 ::fidl_next::WireEnvelope::encode_zero(&mut out)
799 }
800 }
801
802 1 => {
803 if let Some(value) = self.numbered_handles.take() {
804 ::fidl_next::WireEnvelope::encode_value(
805 value,
806 preallocated.encoder,
807 &mut out,
808 )?;
809 } else {
810 ::fidl_next::WireEnvelope::encode_zero(&mut out)
811 }
812 }
813
814 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
815 }
816 unsafe {
817 preallocated.write_next(out.assume_init_ref());
818 }
819 }
820
821 ::fidl_next::WireTable::encode_len(table, max_ord);
822
823 Ok(())
824 }
825 }
826
827 impl<'de> ::fidl_next::FromWire<crate::wire::StartChildArgs<'de>> for StartChildArgs {
828 #[inline]
829 fn from_wire(wire_: crate::wire::StartChildArgs<'de>) -> Self {
830 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
831
832 let numbered_handles = wire_.table.get(1);
833
834 let namespace_entries = wire_.table.get(2);
835
836 let dictionary = wire_.table.get(3);
837
838 Self {
839
840
841 numbered_handles: numbered_handles.map(|envelope| ::fidl_next::FromWire::from_wire(
842 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>() }
843 )),
844
845
846 namespace_entries: namespace_entries.map(|envelope| ::fidl_next::FromWire::from_wire(
847 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NamespaceEntry<'de>>>() }
848 )),
849
850
851 dictionary: dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
852 unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
853 )),
854
855 }
856 }
857 }
858
859 #[derive(PartialEq, Debug)]
860 pub struct ControllerStartRequest {
861 pub args: crate::natural::StartChildArgs,
862
863 pub execution_controller:
864 ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::fuchsia::zx::Channel>,
865 }
866
867 impl ::fidl_next::Encodable for ControllerStartRequest {
868 type Encoded = crate::wire::ControllerStartRequest<'static>;
869 }
870
871 unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerStartRequest
872 where
873 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
874 ___E: ::fidl_next::Encoder,
875 ___E: ::fidl_next::fuchsia::HandleEncoder,
876 {
877 #[inline]
878 fn encode(
879 self,
880 encoder_: &mut ___E,
881 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
882 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
883 ::fidl_next::munge! {
884 let Self::Encoded {
885 args,
886 execution_controller,
887
888 } = out_;
889 }
890
891 ::fidl_next::Encode::encode(self.args, encoder_, args)?;
892
893 ::fidl_next::Encode::encode(self.execution_controller, encoder_, execution_controller)?;
894
895 Ok(())
896 }
897 }
898
899 impl ::fidl_next::EncodableOption for ControllerStartRequest {
900 type EncodedOption =
901 ::fidl_next::WireBox<'static, crate::wire::ControllerStartRequest<'static>>;
902 }
903
904 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerStartRequest
905 where
906 ___E: ::fidl_next::Encoder + ?Sized,
907 ControllerStartRequest: ::fidl_next::Encode<___E>,
908 {
909 #[inline]
910 fn encode_option(
911 this: ::core::option::Option<Self>,
912 encoder: &mut ___E,
913 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
914 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
915 if let Some(inner) = this {
916 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
917 ::fidl_next::WireBox::encode_present(out);
918 } else {
919 ::fidl_next::WireBox::encode_absent(out);
920 }
921
922 Ok(())
923 }
924 }
925
926 impl<'de> ::fidl_next::FromWire<crate::wire::ControllerStartRequest<'de>>
927 for ControllerStartRequest
928 {
929 #[inline]
930 fn from_wire(wire: crate::wire::ControllerStartRequest<'de>) -> Self {
931 Self {
932 args: ::fidl_next::FromWire::from_wire(wire.args),
933
934 execution_controller: ::fidl_next::FromWire::from_wire(wire.execution_controller),
935 }
936 }
937 }
938
939 #[derive(PartialEq, Debug, Default)]
940 pub struct CreateChildArgs {
941 pub numbered_handles: ::core::option::Option<
942 ::std::vec::Vec<::fidl_next_fuchsia_process::natural::HandleInfo>,
943 >,
944
945 pub dynamic_offers: ::core::option::Option<
946 ::std::vec::Vec<::fidl_next_fuchsia_component_decl::natural::Offer>,
947 >,
948
949 pub controller: ::core::option::Option<
950 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::zx::Channel>,
951 >,
952
953 pub dictionary:
954 ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
955 }
956
957 impl CreateChildArgs {
958 fn __max_ordinal(&self) -> usize {
959 if self.dictionary.is_some() {
960 return 4;
961 }
962
963 if self.controller.is_some() {
964 return 3;
965 }
966
967 if self.dynamic_offers.is_some() {
968 return 2;
969 }
970
971 if self.numbered_handles.is_some() {
972 return 1;
973 }
974
975 0
976 }
977 }
978
979 impl ::fidl_next::Encodable for CreateChildArgs {
980 type Encoded = crate::wire::CreateChildArgs<'static>;
981 }
982
983 unsafe impl<___E> ::fidl_next::Encode<___E> for CreateChildArgs
984 where
985 ___E: ::fidl_next::Encoder + ?Sized,
986 ___E: ::fidl_next::fuchsia::HandleEncoder,
987 {
988 #[inline]
989 fn encode(
990 mut self,
991 encoder: &mut ___E,
992 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
993 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
994 ::fidl_next::munge!(let crate::wire::CreateChildArgs { table } = out);
995
996 let max_ord = self.__max_ordinal();
997
998 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
999 ::fidl_next::Wire::zero_padding(&mut out);
1000
1001 let mut preallocated =
1002 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1003
1004 for i in 1..=max_ord {
1005 match i {
1006 4 => {
1007 if let Some(value) = self.dictionary.take() {
1008 ::fidl_next::WireEnvelope::encode_value(
1009 value,
1010 preallocated.encoder,
1011 &mut out,
1012 )?;
1013 } else {
1014 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1015 }
1016 }
1017
1018 3 => {
1019 if let Some(value) = self.controller.take() {
1020 ::fidl_next::WireEnvelope::encode_value(
1021 value,
1022 preallocated.encoder,
1023 &mut out,
1024 )?;
1025 } else {
1026 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1027 }
1028 }
1029
1030 2 => {
1031 if let Some(value) = self.dynamic_offers.take() {
1032 ::fidl_next::WireEnvelope::encode_value(
1033 value,
1034 preallocated.encoder,
1035 &mut out,
1036 )?;
1037 } else {
1038 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1039 }
1040 }
1041
1042 1 => {
1043 if let Some(value) = self.numbered_handles.take() {
1044 ::fidl_next::WireEnvelope::encode_value(
1045 value,
1046 preallocated.encoder,
1047 &mut out,
1048 )?;
1049 } else {
1050 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1051 }
1052 }
1053
1054 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1055 }
1056 unsafe {
1057 preallocated.write_next(out.assume_init_ref());
1058 }
1059 }
1060
1061 ::fidl_next::WireTable::encode_len(table, max_ord);
1062
1063 Ok(())
1064 }
1065 }
1066
1067 impl<'de> ::fidl_next::FromWire<crate::wire::CreateChildArgs<'de>> for CreateChildArgs {
1068 #[inline]
1069 fn from_wire(wire_: crate::wire::CreateChildArgs<'de>) -> Self {
1070 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1071
1072 let numbered_handles = wire_.table.get(1);
1073
1074 let dynamic_offers = wire_.table.get(2);
1075
1076 let controller = wire_.table.get(3);
1077
1078 let dictionary = wire_.table.get(4);
1079
1080 Self {
1081
1082
1083 numbered_handles: numbered_handles.map(|envelope| ::fidl_next::FromWire::from_wire(
1084 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>() }
1085 )),
1086
1087
1088 dynamic_offers: dynamic_offers.map(|envelope| ::fidl_next::FromWire::from_wire(
1089 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::wire::Offer<'de>>>() }
1090 )),
1091
1092
1093 controller: controller.map(|envelope| ::fidl_next::FromWire::from_wire(
1094 unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>>() }
1095 )),
1096
1097
1098 dictionary: dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1099 unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
1100 )),
1101
1102 }
1103 }
1104 }
1105
1106 #[doc = " Payload for DebugStarted events.\n"]
1107 #[derive(PartialEq, Debug, Default)]
1108 pub struct DebugStartedPayload {
1109 pub runtime_dir: ::core::option::Option<
1110 ::fidl_next::ClientEnd<
1111 ::fidl_next_fuchsia_io::Directory,
1112 ::fidl_next::fuchsia::zx::Channel,
1113 >,
1114 >,
1115
1116 pub break_on_start: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
1117 }
1118
1119 impl DebugStartedPayload {
1120 fn __max_ordinal(&self) -> usize {
1121 if self.break_on_start.is_some() {
1122 return 2;
1123 }
1124
1125 if self.runtime_dir.is_some() {
1126 return 1;
1127 }
1128
1129 0
1130 }
1131 }
1132
1133 impl ::fidl_next::Encodable for DebugStartedPayload {
1134 type Encoded = crate::wire::DebugStartedPayload<'static>;
1135 }
1136
1137 unsafe impl<___E> ::fidl_next::Encode<___E> for DebugStartedPayload
1138 where
1139 ___E: ::fidl_next::Encoder + ?Sized,
1140 ___E: ::fidl_next::fuchsia::HandleEncoder,
1141 {
1142 #[inline]
1143 fn encode(
1144 mut self,
1145 encoder: &mut ___E,
1146 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1147 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1148 ::fidl_next::munge!(let crate::wire::DebugStartedPayload { table } = out);
1149
1150 let max_ord = self.__max_ordinal();
1151
1152 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1153 ::fidl_next::Wire::zero_padding(&mut out);
1154
1155 let mut preallocated =
1156 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1157
1158 for i in 1..=max_ord {
1159 match i {
1160 2 => {
1161 if let Some(value) = self.break_on_start.take() {
1162 ::fidl_next::WireEnvelope::encode_value(
1163 value,
1164 preallocated.encoder,
1165 &mut out,
1166 )?;
1167 } else {
1168 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1169 }
1170 }
1171
1172 1 => {
1173 if let Some(value) = self.runtime_dir.take() {
1174 ::fidl_next::WireEnvelope::encode_value(
1175 value,
1176 preallocated.encoder,
1177 &mut out,
1178 )?;
1179 } else {
1180 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1181 }
1182 }
1183
1184 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1185 }
1186 unsafe {
1187 preallocated.write_next(out.assume_init_ref());
1188 }
1189 }
1190
1191 ::fidl_next::WireTable::encode_len(table, max_ord);
1192
1193 Ok(())
1194 }
1195 }
1196
1197 impl<'de> ::fidl_next::FromWire<crate::wire::DebugStartedPayload<'de>> for DebugStartedPayload {
1198 #[inline]
1199 fn from_wire(wire_: crate::wire::DebugStartedPayload<'de>) -> Self {
1200 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1201
1202 let runtime_dir = wire_.table.get(1);
1203
1204 let break_on_start = wire_.table.get(2);
1205
1206 Self {
1207 runtime_dir: runtime_dir.map(|envelope| {
1208 ::fidl_next::FromWire::from_wire(unsafe {
1209 envelope.read_unchecked::<::fidl_next::ClientEnd<
1210 ::fidl_next_fuchsia_io::Directory,
1211 ::fidl_next::fuchsia::WireChannel,
1212 >>()
1213 })
1214 }),
1215
1216 break_on_start: break_on_start.map(|envelope| {
1217 ::fidl_next::FromWire::from_wire(unsafe {
1218 envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
1219 })
1220 }),
1221 }
1222 }
1223 }
1224
1225 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1226 #[repr(u32)]
1227 pub enum DeletionError {
1228 Connection = 1,
1229 Protocol = 2,
1230 NoneAvailable = 3,
1231 Unsupported = 4,
1232 }
1233
1234 impl ::fidl_next::Encodable for DeletionError {
1235 type Encoded = crate::wire::DeletionError;
1236 }
1237 impl ::core::convert::TryFrom<u32> for DeletionError {
1238 type Error = ::fidl_next::UnknownStrictEnumMemberError;
1239 fn try_from(
1240 value: u32,
1241 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
1242 match value {
1243 1 => Ok(Self::Connection),
1244 2 => Ok(Self::Protocol),
1245 3 => Ok(Self::NoneAvailable),
1246 4 => Ok(Self::Unsupported),
1247
1248 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
1249 }
1250 }
1251 }
1252
1253 unsafe impl<___E> ::fidl_next::Encode<___E> for DeletionError
1254 where
1255 ___E: ?Sized,
1256 {
1257 #[inline]
1258 fn encode(
1259 self,
1260 encoder: &mut ___E,
1261 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1262 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1263 ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
1264 }
1265 }
1266
1267 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DeletionError
1268 where
1269 ___E: ?Sized,
1270 {
1271 #[inline]
1272 fn encode_ref(
1273 &self,
1274 encoder: &mut ___E,
1275 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1276 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1277 ::fidl_next::munge!(let crate::wire::DeletionError { value } = out);
1278 let _ = value.write(::fidl_next::WireU32::from(match *self {
1279 Self::Connection => 1,
1280
1281 Self::Protocol => 2,
1282
1283 Self::NoneAvailable => 3,
1284
1285 Self::Unsupported => 4,
1286 }));
1287
1288 Ok(())
1289 }
1290 }
1291
1292 impl ::core::convert::From<crate::wire::DeletionError> for DeletionError {
1293 fn from(wire: crate::wire::DeletionError) -> Self {
1294 match u32::from(wire.value) {
1295 1 => Self::Connection,
1296
1297 2 => Self::Protocol,
1298
1299 3 => Self::NoneAvailable,
1300
1301 4 => Self::Unsupported,
1302
1303 _ => unsafe { ::core::hint::unreachable_unchecked() },
1304 }
1305 }
1306 }
1307
1308 impl ::fidl_next::FromWire<crate::wire::DeletionError> for DeletionError {
1309 #[inline]
1310 fn from_wire(wire: crate::wire::DeletionError) -> Self {
1311 Self::from(wire)
1312 }
1313 }
1314
1315 impl ::fidl_next::FromWireRef<crate::wire::DeletionError> for DeletionError {
1316 #[inline]
1317 fn from_wire_ref(wire: &crate::wire::DeletionError) -> Self {
1318 Self::from(*wire)
1319 }
1320 }
1321
1322 #[doc = " Payload for Destroyed events.\n"]
1323 #[derive(PartialEq, Clone, Debug, Default)]
1324 pub struct DestroyedPayload {}
1325
1326 impl DestroyedPayload {
1327 fn __max_ordinal(&self) -> usize {
1328 0
1329 }
1330 }
1331
1332 impl ::fidl_next::Encodable for DestroyedPayload {
1333 type Encoded = crate::wire::DestroyedPayload<'static>;
1334 }
1335
1336 unsafe impl<___E> ::fidl_next::Encode<___E> for DestroyedPayload
1337 where
1338 ___E: ::fidl_next::Encoder + ?Sized,
1339 {
1340 #[inline]
1341 fn encode(
1342 mut self,
1343 encoder: &mut ___E,
1344 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1345 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1346 ::fidl_next::munge!(let crate::wire::DestroyedPayload { table } = out);
1347
1348 let max_ord = self.__max_ordinal();
1349
1350 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1351 ::fidl_next::Wire::zero_padding(&mut out);
1352
1353 let mut preallocated =
1354 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1355
1356 for i in 1..=max_ord {
1357 match i {
1358 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1359 }
1360 unsafe {
1361 preallocated.write_next(out.assume_init_ref());
1362 }
1363 }
1364
1365 ::fidl_next::WireTable::encode_len(table, max_ord);
1366
1367 Ok(())
1368 }
1369 }
1370
1371 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DestroyedPayload
1372 where
1373 ___E: ::fidl_next::Encoder + ?Sized,
1374 {
1375 #[inline]
1376 fn encode_ref(
1377 &self,
1378 encoder: &mut ___E,
1379 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1381 ::fidl_next::munge!(let crate::wire::DestroyedPayload { table } = out);
1382
1383 let max_ord = self.__max_ordinal();
1384
1385 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1386 ::fidl_next::Wire::zero_padding(&mut out);
1387
1388 let mut preallocated =
1389 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1390
1391 for i in 1..=max_ord {
1392 match i {
1393 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1394 }
1395 unsafe {
1396 preallocated.write_next(out.assume_init_ref());
1397 }
1398 }
1399
1400 ::fidl_next::WireTable::encode_len(table, max_ord);
1401
1402 Ok(())
1403 }
1404 }
1405
1406 impl<'de> ::fidl_next::FromWire<crate::wire::DestroyedPayload<'de>> for DestroyedPayload {
1407 #[inline]
1408 fn from_wire(wire_: crate::wire::DestroyedPayload<'de>) -> Self {
1409 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1410
1411 Self {}
1412 }
1413 }
1414
1415 impl<'de> ::fidl_next::FromWireRef<crate::wire::DestroyedPayload<'de>> for DestroyedPayload {
1416 #[inline]
1417 fn from_wire_ref(wire: &crate::wire::DestroyedPayload<'de>) -> Self {
1418 Self {}
1419 }
1420 }
1421
1422 #[doc = " Payload for Discovered events.\n"]
1423 #[derive(PartialEq, Clone, Debug, Default)]
1424 pub struct DiscoveredPayload {}
1425
1426 impl DiscoveredPayload {
1427 fn __max_ordinal(&self) -> usize {
1428 0
1429 }
1430 }
1431
1432 impl ::fidl_next::Encodable for DiscoveredPayload {
1433 type Encoded = crate::wire::DiscoveredPayload<'static>;
1434 }
1435
1436 unsafe impl<___E> ::fidl_next::Encode<___E> for DiscoveredPayload
1437 where
1438 ___E: ::fidl_next::Encoder + ?Sized,
1439 {
1440 #[inline]
1441 fn encode(
1442 mut self,
1443 encoder: &mut ___E,
1444 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1445 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1446 ::fidl_next::munge!(let crate::wire::DiscoveredPayload { table } = out);
1447
1448 let max_ord = self.__max_ordinal();
1449
1450 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1451 ::fidl_next::Wire::zero_padding(&mut out);
1452
1453 let mut preallocated =
1454 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1455
1456 for i in 1..=max_ord {
1457 match i {
1458 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1459 }
1460 unsafe {
1461 preallocated.write_next(out.assume_init_ref());
1462 }
1463 }
1464
1465 ::fidl_next::WireTable::encode_len(table, max_ord);
1466
1467 Ok(())
1468 }
1469 }
1470
1471 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DiscoveredPayload
1472 where
1473 ___E: ::fidl_next::Encoder + ?Sized,
1474 {
1475 #[inline]
1476 fn encode_ref(
1477 &self,
1478 encoder: &mut ___E,
1479 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1480 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1481 ::fidl_next::munge!(let crate::wire::DiscoveredPayload { table } = out);
1482
1483 let max_ord = self.__max_ordinal();
1484
1485 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1486 ::fidl_next::Wire::zero_padding(&mut out);
1487
1488 let mut preallocated =
1489 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1490
1491 for i in 1..=max_ord {
1492 match i {
1493 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1494 }
1495 unsafe {
1496 preallocated.write_next(out.assume_init_ref());
1497 }
1498 }
1499
1500 ::fidl_next::WireTable::encode_len(table, max_ord);
1501
1502 Ok(())
1503 }
1504 }
1505
1506 impl<'de> ::fidl_next::FromWire<crate::wire::DiscoveredPayload<'de>> for DiscoveredPayload {
1507 #[inline]
1508 fn from_wire(wire_: crate::wire::DiscoveredPayload<'de>) -> Self {
1509 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1510
1511 Self {}
1512 }
1513 }
1514
1515 impl<'de> ::fidl_next::FromWireRef<crate::wire::DiscoveredPayload<'de>> for DiscoveredPayload {
1516 #[inline]
1517 fn from_wire_ref(wire: &crate::wire::DiscoveredPayload<'de>) -> Self {
1518 Self {}
1519 }
1520 }
1521
1522 #[doc = " Payload for Purged events.\n"]
1523 #[derive(PartialEq, Clone, Debug, Default)]
1524 pub struct PurgedPayload {}
1525
1526 impl PurgedPayload {
1527 fn __max_ordinal(&self) -> usize {
1528 0
1529 }
1530 }
1531
1532 impl ::fidl_next::Encodable for PurgedPayload {
1533 type Encoded = crate::wire::PurgedPayload<'static>;
1534 }
1535
1536 unsafe impl<___E> ::fidl_next::Encode<___E> for PurgedPayload
1537 where
1538 ___E: ::fidl_next::Encoder + ?Sized,
1539 {
1540 #[inline]
1541 fn encode(
1542 mut self,
1543 encoder: &mut ___E,
1544 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1545 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1546 ::fidl_next::munge!(let crate::wire::PurgedPayload { table } = out);
1547
1548 let max_ord = self.__max_ordinal();
1549
1550 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1551 ::fidl_next::Wire::zero_padding(&mut out);
1552
1553 let mut preallocated =
1554 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1555
1556 for i in 1..=max_ord {
1557 match i {
1558 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1559 }
1560 unsafe {
1561 preallocated.write_next(out.assume_init_ref());
1562 }
1563 }
1564
1565 ::fidl_next::WireTable::encode_len(table, max_ord);
1566
1567 Ok(())
1568 }
1569 }
1570
1571 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for PurgedPayload
1572 where
1573 ___E: ::fidl_next::Encoder + ?Sized,
1574 {
1575 #[inline]
1576 fn encode_ref(
1577 &self,
1578 encoder: &mut ___E,
1579 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1580 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1581 ::fidl_next::munge!(let crate::wire::PurgedPayload { table } = out);
1582
1583 let max_ord = self.__max_ordinal();
1584
1585 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1586 ::fidl_next::Wire::zero_padding(&mut out);
1587
1588 let mut preallocated =
1589 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1590
1591 for i in 1..=max_ord {
1592 match i {
1593 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1594 }
1595 unsafe {
1596 preallocated.write_next(out.assume_init_ref());
1597 }
1598 }
1599
1600 ::fidl_next::WireTable::encode_len(table, max_ord);
1601
1602 Ok(())
1603 }
1604 }
1605
1606 impl<'de> ::fidl_next::FromWire<crate::wire::PurgedPayload<'de>> for PurgedPayload {
1607 #[inline]
1608 fn from_wire(wire_: crate::wire::PurgedPayload<'de>) -> Self {
1609 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1610
1611 Self {}
1612 }
1613 }
1614
1615 impl<'de> ::fidl_next::FromWireRef<crate::wire::PurgedPayload<'de>> for PurgedPayload {
1616 #[inline]
1617 fn from_wire_ref(wire: &crate::wire::PurgedPayload<'de>) -> Self {
1618 Self {}
1619 }
1620 }
1621
1622 #[doc = " Payload for Resolved events.\n"]
1623 #[derive(PartialEq, Clone, Debug, Default)]
1624 pub struct ResolvedPayload {}
1625
1626 impl ResolvedPayload {
1627 fn __max_ordinal(&self) -> usize {
1628 0
1629 }
1630 }
1631
1632 impl ::fidl_next::Encodable for ResolvedPayload {
1633 type Encoded = crate::wire::ResolvedPayload<'static>;
1634 }
1635
1636 unsafe impl<___E> ::fidl_next::Encode<___E> for ResolvedPayload
1637 where
1638 ___E: ::fidl_next::Encoder + ?Sized,
1639 {
1640 #[inline]
1641 fn encode(
1642 mut self,
1643 encoder: &mut ___E,
1644 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1645 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1646 ::fidl_next::munge!(let crate::wire::ResolvedPayload { table } = out);
1647
1648 let max_ord = self.__max_ordinal();
1649
1650 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1651 ::fidl_next::Wire::zero_padding(&mut out);
1652
1653 let mut preallocated =
1654 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1655
1656 for i in 1..=max_ord {
1657 match i {
1658 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1659 }
1660 unsafe {
1661 preallocated.write_next(out.assume_init_ref());
1662 }
1663 }
1664
1665 ::fidl_next::WireTable::encode_len(table, max_ord);
1666
1667 Ok(())
1668 }
1669 }
1670
1671 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ResolvedPayload
1672 where
1673 ___E: ::fidl_next::Encoder + ?Sized,
1674 {
1675 #[inline]
1676 fn encode_ref(
1677 &self,
1678 encoder: &mut ___E,
1679 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1680 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1681 ::fidl_next::munge!(let crate::wire::ResolvedPayload { table } = out);
1682
1683 let max_ord = self.__max_ordinal();
1684
1685 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1686 ::fidl_next::Wire::zero_padding(&mut out);
1687
1688 let mut preallocated =
1689 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1690
1691 for i in 1..=max_ord {
1692 match i {
1693 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1694 }
1695 unsafe {
1696 preallocated.write_next(out.assume_init_ref());
1697 }
1698 }
1699
1700 ::fidl_next::WireTable::encode_len(table, max_ord);
1701
1702 Ok(())
1703 }
1704 }
1705
1706 impl<'de> ::fidl_next::FromWire<crate::wire::ResolvedPayload<'de>> for ResolvedPayload {
1707 #[inline]
1708 fn from_wire(wire_: crate::wire::ResolvedPayload<'de>) -> Self {
1709 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1710
1711 Self {}
1712 }
1713 }
1714
1715 impl<'de> ::fidl_next::FromWireRef<crate::wire::ResolvedPayload<'de>> for ResolvedPayload {
1716 #[inline]
1717 fn from_wire_ref(wire: &crate::wire::ResolvedPayload<'de>) -> Self {
1718 Self {}
1719 }
1720 }
1721
1722 #[doc = " Payload for Started events.\n"]
1723 #[derive(PartialEq, Clone, Debug, Default)]
1724 pub struct StartedPayload {}
1725
1726 impl StartedPayload {
1727 fn __max_ordinal(&self) -> usize {
1728 0
1729 }
1730 }
1731
1732 impl ::fidl_next::Encodable for StartedPayload {
1733 type Encoded = crate::wire::StartedPayload<'static>;
1734 }
1735
1736 unsafe impl<___E> ::fidl_next::Encode<___E> for StartedPayload
1737 where
1738 ___E: ::fidl_next::Encoder + ?Sized,
1739 {
1740 #[inline]
1741 fn encode(
1742 mut self,
1743 encoder: &mut ___E,
1744 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1745 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1746 ::fidl_next::munge!(let crate::wire::StartedPayload { table } = out);
1747
1748 let max_ord = self.__max_ordinal();
1749
1750 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1751 ::fidl_next::Wire::zero_padding(&mut out);
1752
1753 let mut preallocated =
1754 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1755
1756 for i in 1..=max_ord {
1757 match i {
1758 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1759 }
1760 unsafe {
1761 preallocated.write_next(out.assume_init_ref());
1762 }
1763 }
1764
1765 ::fidl_next::WireTable::encode_len(table, max_ord);
1766
1767 Ok(())
1768 }
1769 }
1770
1771 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StartedPayload
1772 where
1773 ___E: ::fidl_next::Encoder + ?Sized,
1774 {
1775 #[inline]
1776 fn encode_ref(
1777 &self,
1778 encoder: &mut ___E,
1779 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1780 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1781 ::fidl_next::munge!(let crate::wire::StartedPayload { table } = out);
1782
1783 let max_ord = self.__max_ordinal();
1784
1785 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1786 ::fidl_next::Wire::zero_padding(&mut out);
1787
1788 let mut preallocated =
1789 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1790
1791 for i in 1..=max_ord {
1792 match i {
1793 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1794 }
1795 unsafe {
1796 preallocated.write_next(out.assume_init_ref());
1797 }
1798 }
1799
1800 ::fidl_next::WireTable::encode_len(table, max_ord);
1801
1802 Ok(())
1803 }
1804 }
1805
1806 impl<'de> ::fidl_next::FromWire<crate::wire::StartedPayload<'de>> for StartedPayload {
1807 #[inline]
1808 fn from_wire(wire_: crate::wire::StartedPayload<'de>) -> Self {
1809 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1810
1811 Self {}
1812 }
1813 }
1814
1815 impl<'de> ::fidl_next::FromWireRef<crate::wire::StartedPayload<'de>> for StartedPayload {
1816 #[inline]
1817 fn from_wire_ref(wire: &crate::wire::StartedPayload<'de>) -> Self {
1818 Self {}
1819 }
1820 }
1821
1822 #[doc = " Payload for Unresolved events.\n"]
1823 #[derive(PartialEq, Clone, Debug, Default)]
1824 pub struct UnresolvedPayload {}
1825
1826 impl UnresolvedPayload {
1827 fn __max_ordinal(&self) -> usize {
1828 0
1829 }
1830 }
1831
1832 impl ::fidl_next::Encodable for UnresolvedPayload {
1833 type Encoded = crate::wire::UnresolvedPayload<'static>;
1834 }
1835
1836 unsafe impl<___E> ::fidl_next::Encode<___E> for UnresolvedPayload
1837 where
1838 ___E: ::fidl_next::Encoder + ?Sized,
1839 {
1840 #[inline]
1841 fn encode(
1842 mut self,
1843 encoder: &mut ___E,
1844 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1845 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1846 ::fidl_next::munge!(let crate::wire::UnresolvedPayload { table } = out);
1847
1848 let max_ord = self.__max_ordinal();
1849
1850 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1851 ::fidl_next::Wire::zero_padding(&mut out);
1852
1853 let mut preallocated =
1854 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1855
1856 for i in 1..=max_ord {
1857 match i {
1858 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1859 }
1860 unsafe {
1861 preallocated.write_next(out.assume_init_ref());
1862 }
1863 }
1864
1865 ::fidl_next::WireTable::encode_len(table, max_ord);
1866
1867 Ok(())
1868 }
1869 }
1870
1871 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for UnresolvedPayload
1872 where
1873 ___E: ::fidl_next::Encoder + ?Sized,
1874 {
1875 #[inline]
1876 fn encode_ref(
1877 &self,
1878 encoder: &mut ___E,
1879 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1880 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1881 ::fidl_next::munge!(let crate::wire::UnresolvedPayload { table } = out);
1882
1883 let max_ord = self.__max_ordinal();
1884
1885 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1886 ::fidl_next::Wire::zero_padding(&mut out);
1887
1888 let mut preallocated =
1889 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1890
1891 for i in 1..=max_ord {
1892 match i {
1893 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1894 }
1895 unsafe {
1896 preallocated.write_next(out.assume_init_ref());
1897 }
1898 }
1899
1900 ::fidl_next::WireTable::encode_len(table, max_ord);
1901
1902 Ok(())
1903 }
1904 }
1905
1906 impl<'de> ::fidl_next::FromWire<crate::wire::UnresolvedPayload<'de>> for UnresolvedPayload {
1907 #[inline]
1908 fn from_wire(wire_: crate::wire::UnresolvedPayload<'de>) -> Self {
1909 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1910
1911 Self {}
1912 }
1913 }
1914
1915 impl<'de> ::fidl_next::FromWireRef<crate::wire::UnresolvedPayload<'de>> for UnresolvedPayload {
1916 #[inline]
1917 fn from_wire_ref(wire: &crate::wire::UnresolvedPayload<'de>) -> Self {
1918 Self {}
1919 }
1920 }
1921
1922 #[doc = " These EventTypes are used for the EventStream protocol.\n They are FIDL versions of the EventType enum in hooks.rs and have\n the same meaning.\n"]
1923 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1924 #[repr(u32)]
1925 pub enum EventType {
1926 CapabilityRequested = 1,
1927 Discovered = 3,
1928 Destroyed = 4,
1929 Resolved = 5,
1930 Started = 6,
1931 Stopped = 7,
1932 DebugStarted = 8,
1933 Unresolved = 9,
1934 }
1935
1936 impl ::fidl_next::Encodable for EventType {
1937 type Encoded = crate::wire::EventType;
1938 }
1939 impl ::core::convert::TryFrom<u32> for EventType {
1940 type Error = ::fidl_next::UnknownStrictEnumMemberError;
1941 fn try_from(
1942 value: u32,
1943 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
1944 match value {
1945 1 => Ok(Self::CapabilityRequested),
1946 3 => Ok(Self::Discovered),
1947 4 => Ok(Self::Destroyed),
1948 5 => Ok(Self::Resolved),
1949 6 => Ok(Self::Started),
1950 7 => Ok(Self::Stopped),
1951 8 => Ok(Self::DebugStarted),
1952 9 => Ok(Self::Unresolved),
1953
1954 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
1955 }
1956 }
1957 }
1958
1959 unsafe impl<___E> ::fidl_next::Encode<___E> for EventType
1960 where
1961 ___E: ?Sized,
1962 {
1963 #[inline]
1964 fn encode(
1965 self,
1966 encoder: &mut ___E,
1967 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1968 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1969 ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
1970 }
1971 }
1972
1973 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for EventType
1974 where
1975 ___E: ?Sized,
1976 {
1977 #[inline]
1978 fn encode_ref(
1979 &self,
1980 encoder: &mut ___E,
1981 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1982 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1983 ::fidl_next::munge!(let crate::wire::EventType { value } = out);
1984 let _ = value.write(::fidl_next::WireU32::from(match *self {
1985 Self::CapabilityRequested => 1,
1986
1987 Self::Discovered => 3,
1988
1989 Self::Destroyed => 4,
1990
1991 Self::Resolved => 5,
1992
1993 Self::Started => 6,
1994
1995 Self::Stopped => 7,
1996
1997 Self::DebugStarted => 8,
1998
1999 Self::Unresolved => 9,
2000 }));
2001
2002 Ok(())
2003 }
2004 }
2005
2006 impl ::core::convert::From<crate::wire::EventType> for EventType {
2007 fn from(wire: crate::wire::EventType) -> Self {
2008 match u32::from(wire.value) {
2009 1 => Self::CapabilityRequested,
2010
2011 3 => Self::Discovered,
2012
2013 4 => Self::Destroyed,
2014
2015 5 => Self::Resolved,
2016
2017 6 => Self::Started,
2018
2019 7 => Self::Stopped,
2020
2021 8 => Self::DebugStarted,
2022
2023 9 => Self::Unresolved,
2024
2025 _ => unsafe { ::core::hint::unreachable_unchecked() },
2026 }
2027 }
2028 }
2029
2030 impl ::fidl_next::FromWire<crate::wire::EventType> for EventType {
2031 #[inline]
2032 fn from_wire(wire: crate::wire::EventType) -> Self {
2033 Self::from(wire)
2034 }
2035 }
2036
2037 impl ::fidl_next::FromWireRef<crate::wire::EventType> for EventType {
2038 #[inline]
2039 fn from_wire_ref(wire: &crate::wire::EventType) -> Self {
2040 Self::from(*wire)
2041 }
2042 }
2043
2044 #[doc = " Payload for Stopped events.\n"]
2045 #[derive(PartialEq, Clone, Debug, Default)]
2046 pub struct StoppedPayload {
2047 pub status: ::core::option::Option<i32>,
2048
2049 pub exit_code: ::core::option::Option<i64>,
2050 }
2051
2052 impl StoppedPayload {
2053 fn __max_ordinal(&self) -> usize {
2054 if self.exit_code.is_some() {
2055 return 2;
2056 }
2057
2058 if self.status.is_some() {
2059 return 1;
2060 }
2061
2062 0
2063 }
2064 }
2065
2066 impl ::fidl_next::Encodable for StoppedPayload {
2067 type Encoded = crate::wire::StoppedPayload<'static>;
2068 }
2069
2070 unsafe impl<___E> ::fidl_next::Encode<___E> for StoppedPayload
2071 where
2072 ___E: ::fidl_next::Encoder + ?Sized,
2073 {
2074 #[inline]
2075 fn encode(
2076 mut self,
2077 encoder: &mut ___E,
2078 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2079 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2080 ::fidl_next::munge!(let crate::wire::StoppedPayload { table } = out);
2081
2082 let max_ord = self.__max_ordinal();
2083
2084 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2085 ::fidl_next::Wire::zero_padding(&mut out);
2086
2087 let mut preallocated =
2088 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2089
2090 for i in 1..=max_ord {
2091 match i {
2092 2 => {
2093 if let Some(value) = self.exit_code.take() {
2094 ::fidl_next::WireEnvelope::encode_value(
2095 value,
2096 preallocated.encoder,
2097 &mut out,
2098 )?;
2099 } else {
2100 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2101 }
2102 }
2103
2104 1 => {
2105 if let Some(value) = self.status.take() {
2106 ::fidl_next::WireEnvelope::encode_value(
2107 value,
2108 preallocated.encoder,
2109 &mut out,
2110 )?;
2111 } else {
2112 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2113 }
2114 }
2115
2116 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2117 }
2118 unsafe {
2119 preallocated.write_next(out.assume_init_ref());
2120 }
2121 }
2122
2123 ::fidl_next::WireTable::encode_len(table, max_ord);
2124
2125 Ok(())
2126 }
2127 }
2128
2129 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StoppedPayload
2130 where
2131 ___E: ::fidl_next::Encoder + ?Sized,
2132 {
2133 #[inline]
2134 fn encode_ref(
2135 &self,
2136 encoder: &mut ___E,
2137 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2138 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2139 ::fidl_next::munge!(let crate::wire::StoppedPayload { table } = out);
2140
2141 let max_ord = self.__max_ordinal();
2142
2143 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2144 ::fidl_next::Wire::zero_padding(&mut out);
2145
2146 let mut preallocated =
2147 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2148
2149 for i in 1..=max_ord {
2150 match i {
2151 2 => {
2152 if let Some(value) = &self.exit_code {
2153 ::fidl_next::WireEnvelope::encode_value(
2154 value,
2155 preallocated.encoder,
2156 &mut out,
2157 )?;
2158 } else {
2159 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2160 }
2161 }
2162
2163 1 => {
2164 if let Some(value) = &self.status {
2165 ::fidl_next::WireEnvelope::encode_value(
2166 value,
2167 preallocated.encoder,
2168 &mut out,
2169 )?;
2170 } else {
2171 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2172 }
2173 }
2174
2175 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2176 }
2177 unsafe {
2178 preallocated.write_next(out.assume_init_ref());
2179 }
2180 }
2181
2182 ::fidl_next::WireTable::encode_len(table, max_ord);
2183
2184 Ok(())
2185 }
2186 }
2187
2188 impl<'de> ::fidl_next::FromWire<crate::wire::StoppedPayload<'de>> for StoppedPayload {
2189 #[inline]
2190 fn from_wire(wire_: crate::wire::StoppedPayload<'de>) -> Self {
2191 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2192
2193 let status = wire_.table.get(1);
2194
2195 let exit_code = wire_.table.get(2);
2196
2197 Self {
2198 status: status.map(|envelope| {
2199 ::fidl_next::FromWire::from_wire(unsafe {
2200 envelope.read_unchecked::<::fidl_next::WireI32>()
2201 })
2202 }),
2203
2204 exit_code: exit_code.map(|envelope| {
2205 ::fidl_next::FromWire::from_wire(unsafe {
2206 envelope.read_unchecked::<::fidl_next::WireI64>()
2207 })
2208 }),
2209 }
2210 }
2211 }
2212
2213 impl<'de> ::fidl_next::FromWireRef<crate::wire::StoppedPayload<'de>> for StoppedPayload {
2214 #[inline]
2215 fn from_wire_ref(wire: &crate::wire::StoppedPayload<'de>) -> Self {
2216 Self {
2217 status: wire.table.get(1).map(|envelope| {
2218 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2219 envelope.deref_unchecked::<::fidl_next::WireI32>()
2220 })
2221 }),
2222
2223 exit_code: wire.table.get(2).map(|envelope| {
2224 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2225 envelope.deref_unchecked::<::fidl_next::WireI64>()
2226 })
2227 }),
2228 }
2229 }
2230 }
2231
2232 #[doc = " A head providing metadata about a target component instance.\n"]
2233 #[derive(PartialEq, Clone, Debug, Default)]
2234 pub struct EventHeader {
2235 pub event_type: ::core::option::Option<crate::natural::EventType>,
2236
2237 pub moniker: ::core::option::Option<::std::string::String>,
2238
2239 pub component_url: ::core::option::Option<::std::string::String>,
2240
2241 pub timestamp: ::core::option::Option<i64>,
2242 }
2243
2244 impl EventHeader {
2245 fn __max_ordinal(&self) -> usize {
2246 if self.timestamp.is_some() {
2247 return 4;
2248 }
2249
2250 if self.component_url.is_some() {
2251 return 3;
2252 }
2253
2254 if self.moniker.is_some() {
2255 return 2;
2256 }
2257
2258 if self.event_type.is_some() {
2259 return 1;
2260 }
2261
2262 0
2263 }
2264 }
2265
2266 impl ::fidl_next::Encodable for EventHeader {
2267 type Encoded = crate::wire::EventHeader<'static>;
2268 }
2269
2270 unsafe impl<___E> ::fidl_next::Encode<___E> for EventHeader
2271 where
2272 ___E: ::fidl_next::Encoder + ?Sized,
2273 {
2274 #[inline]
2275 fn encode(
2276 mut self,
2277 encoder: &mut ___E,
2278 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2279 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2280 ::fidl_next::munge!(let crate::wire::EventHeader { table } = out);
2281
2282 let max_ord = self.__max_ordinal();
2283
2284 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2285 ::fidl_next::Wire::zero_padding(&mut out);
2286
2287 let mut preallocated =
2288 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2289
2290 for i in 1..=max_ord {
2291 match i {
2292 4 => {
2293 if let Some(value) = self.timestamp.take() {
2294 ::fidl_next::WireEnvelope::encode_value(
2295 value,
2296 preallocated.encoder,
2297 &mut out,
2298 )?;
2299 } else {
2300 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2301 }
2302 }
2303
2304 3 => {
2305 if let Some(value) = self.component_url.take() {
2306 ::fidl_next::WireEnvelope::encode_value(
2307 value,
2308 preallocated.encoder,
2309 &mut out,
2310 )?;
2311 } else {
2312 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2313 }
2314 }
2315
2316 2 => {
2317 if let Some(value) = self.moniker.take() {
2318 ::fidl_next::WireEnvelope::encode_value(
2319 value,
2320 preallocated.encoder,
2321 &mut out,
2322 )?;
2323 } else {
2324 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2325 }
2326 }
2327
2328 1 => {
2329 if let Some(value) = self.event_type.take() {
2330 ::fidl_next::WireEnvelope::encode_value(
2331 value,
2332 preallocated.encoder,
2333 &mut out,
2334 )?;
2335 } else {
2336 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2337 }
2338 }
2339
2340 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2341 }
2342 unsafe {
2343 preallocated.write_next(out.assume_init_ref());
2344 }
2345 }
2346
2347 ::fidl_next::WireTable::encode_len(table, max_ord);
2348
2349 Ok(())
2350 }
2351 }
2352
2353 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for EventHeader
2354 where
2355 ___E: ::fidl_next::Encoder + ?Sized,
2356 {
2357 #[inline]
2358 fn encode_ref(
2359 &self,
2360 encoder: &mut ___E,
2361 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2362 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2363 ::fidl_next::munge!(let crate::wire::EventHeader { table } = out);
2364
2365 let max_ord = self.__max_ordinal();
2366
2367 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2368 ::fidl_next::Wire::zero_padding(&mut out);
2369
2370 let mut preallocated =
2371 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2372
2373 for i in 1..=max_ord {
2374 match i {
2375 4 => {
2376 if let Some(value) = &self.timestamp {
2377 ::fidl_next::WireEnvelope::encode_value(
2378 value,
2379 preallocated.encoder,
2380 &mut out,
2381 )?;
2382 } else {
2383 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2384 }
2385 }
2386
2387 3 => {
2388 if let Some(value) = &self.component_url {
2389 ::fidl_next::WireEnvelope::encode_value(
2390 value,
2391 preallocated.encoder,
2392 &mut out,
2393 )?;
2394 } else {
2395 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2396 }
2397 }
2398
2399 2 => {
2400 if let Some(value) = &self.moniker {
2401 ::fidl_next::WireEnvelope::encode_value(
2402 value,
2403 preallocated.encoder,
2404 &mut out,
2405 )?;
2406 } else {
2407 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2408 }
2409 }
2410
2411 1 => {
2412 if let Some(value) = &self.event_type {
2413 ::fidl_next::WireEnvelope::encode_value(
2414 value,
2415 preallocated.encoder,
2416 &mut out,
2417 )?;
2418 } else {
2419 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2420 }
2421 }
2422
2423 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2424 }
2425 unsafe {
2426 preallocated.write_next(out.assume_init_ref());
2427 }
2428 }
2429
2430 ::fidl_next::WireTable::encode_len(table, max_ord);
2431
2432 Ok(())
2433 }
2434 }
2435
2436 impl<'de> ::fidl_next::FromWire<crate::wire::EventHeader<'de>> for EventHeader {
2437 #[inline]
2438 fn from_wire(wire_: crate::wire::EventHeader<'de>) -> Self {
2439 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2440
2441 let event_type = wire_.table.get(1);
2442
2443 let moniker = wire_.table.get(2);
2444
2445 let component_url = wire_.table.get(3);
2446
2447 let timestamp = wire_.table.get(4);
2448
2449 Self {
2450 event_type: event_type.map(|envelope| {
2451 ::fidl_next::FromWire::from_wire(unsafe {
2452 envelope.read_unchecked::<crate::wire::EventType>()
2453 })
2454 }),
2455
2456 moniker: moniker.map(|envelope| {
2457 ::fidl_next::FromWire::from_wire(unsafe {
2458 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
2459 })
2460 }),
2461
2462 component_url: component_url.map(|envelope| {
2463 ::fidl_next::FromWire::from_wire(unsafe {
2464 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
2465 })
2466 }),
2467
2468 timestamp: timestamp.map(|envelope| {
2469 ::fidl_next::FromWire::from_wire(unsafe {
2470 envelope.read_unchecked::<::fidl_next::WireI64>()
2471 })
2472 }),
2473 }
2474 }
2475 }
2476
2477 impl<'de> ::fidl_next::FromWireRef<crate::wire::EventHeader<'de>> for EventHeader {
2478 #[inline]
2479 fn from_wire_ref(wire: &crate::wire::EventHeader<'de>) -> Self {
2480 Self {
2481 event_type: wire.table.get(1).map(|envelope| {
2482 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2483 envelope.deref_unchecked::<crate::wire::EventType>()
2484 })
2485 }),
2486
2487 moniker: wire.table.get(2).map(|envelope| {
2488 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2489 envelope.deref_unchecked::<::fidl_next::WireString<'de>>()
2490 })
2491 }),
2492
2493 component_url: wire.table.get(3).map(|envelope| {
2494 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2495 envelope.deref_unchecked::<::fidl_next::WireString<'de>>()
2496 })
2497 }),
2498
2499 timestamp: wire.table.get(4).map(|envelope| {
2500 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2501 envelope.deref_unchecked::<::fidl_next::WireI64>()
2502 })
2503 }),
2504 }
2505 }
2506 }
2507
2508 #[doc = " Encapsulates additional data/protocols for some event types.\n"]
2509 #[derive(PartialEq, Debug)]
2510 pub enum EventPayload {
2511 CapabilityRequested(crate::natural::CapabilityRequestedPayload),
2512
2513 Purged(crate::natural::PurgedPayload),
2514
2515 Discovered(crate::natural::DiscoveredPayload),
2516
2517 Destroyed(crate::natural::DestroyedPayload),
2518
2519 Resolved(crate::natural::ResolvedPayload),
2520
2521 Started(crate::natural::StartedPayload),
2522
2523 Stopped(crate::natural::StoppedPayload),
2524
2525 DebugStarted(crate::natural::DebugStartedPayload),
2526
2527 Unresolved(crate::natural::UnresolvedPayload),
2528
2529 UnknownOrdinal_(u64),
2530 }
2531
2532 impl ::fidl_next::Encodable for EventPayload {
2533 type Encoded = crate::wire::EventPayload<'static>;
2534 }
2535
2536 unsafe impl<___E> ::fidl_next::Encode<___E> for EventPayload
2537 where
2538 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2539 ___E: ::fidl_next::Encoder,
2540 ___E: ::fidl_next::fuchsia::HandleEncoder,
2541 {
2542 #[inline]
2543 fn encode(
2544 self,
2545 encoder: &mut ___E,
2546 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2547 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2548 ::fidl_next::munge!(let crate::wire::EventPayload { raw, _phantom: _ } = out);
2549
2550 match self {
2551 Self::CapabilityRequested(value) => ::fidl_next::RawWireUnion::encode_as::<
2552 ___E,
2553 crate::natural::CapabilityRequestedPayload,
2554 >(value, 1, encoder, raw)?,
2555
2556 Self::Purged(value) => ::fidl_next::RawWireUnion::encode_as::<
2557 ___E,
2558 crate::natural::PurgedPayload,
2559 >(value, 2, encoder, raw)?,
2560
2561 Self::Discovered(value) => ::fidl_next::RawWireUnion::encode_as::<
2562 ___E,
2563 crate::natural::DiscoveredPayload,
2564 >(value, 4, encoder, raw)?,
2565
2566 Self::Destroyed(value) => ::fidl_next::RawWireUnion::encode_as::<
2567 ___E,
2568 crate::natural::DestroyedPayload,
2569 >(value, 5, encoder, raw)?,
2570
2571 Self::Resolved(value) => ::fidl_next::RawWireUnion::encode_as::<
2572 ___E,
2573 crate::natural::ResolvedPayload,
2574 >(value, 6, encoder, raw)?,
2575
2576 Self::Started(value) => ::fidl_next::RawWireUnion::encode_as::<
2577 ___E,
2578 crate::natural::StartedPayload,
2579 >(value, 7, encoder, raw)?,
2580
2581 Self::Stopped(value) => ::fidl_next::RawWireUnion::encode_as::<
2582 ___E,
2583 crate::natural::StoppedPayload,
2584 >(value, 8, encoder, raw)?,
2585
2586 Self::DebugStarted(value) => ::fidl_next::RawWireUnion::encode_as::<
2587 ___E,
2588 crate::natural::DebugStartedPayload,
2589 >(value, 9, encoder, raw)?,
2590
2591 Self::Unresolved(value) => ::fidl_next::RawWireUnion::encode_as::<
2592 ___E,
2593 crate::natural::UnresolvedPayload,
2594 >(value, 10, encoder, raw)?,
2595
2596 Self::UnknownOrdinal_(ordinal) => {
2597 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
2598 }
2599 }
2600
2601 Ok(())
2602 }
2603 }
2604
2605 impl ::fidl_next::EncodableOption for EventPayload {
2606 type EncodedOption = crate::wire_optional::EventPayload<'static>;
2607 }
2608
2609 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for EventPayload
2610 where
2611 ___E: ?Sized,
2612 EventPayload: ::fidl_next::Encode<___E>,
2613 {
2614 #[inline]
2615 fn encode_option(
2616 this: ::core::option::Option<Self>,
2617 encoder: &mut ___E,
2618 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2619 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2620 ::fidl_next::munge!(let crate::wire_optional::EventPayload { raw, _phantom: _ } = &mut *out);
2621
2622 if let Some(inner) = this {
2623 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2624 ::fidl_next::Encode::encode(inner, encoder, value_out)?;
2625 } else {
2626 ::fidl_next::RawWireUnion::encode_absent(raw);
2627 }
2628
2629 Ok(())
2630 }
2631 }
2632
2633 impl<'de> ::fidl_next::FromWire<crate::wire::EventPayload<'de>> for EventPayload {
2634 #[inline]
2635 fn from_wire(wire: crate::wire::EventPayload<'de>) -> Self {
2636 let wire = ::core::mem::ManuallyDrop::new(wire);
2637 match wire.raw.ordinal() {
2638 1 => Self::CapabilityRequested(::fidl_next::FromWire::from_wire(unsafe {
2639 wire.raw.get().read_unchecked::<crate::wire::CapabilityRequestedPayload<'de>>()
2640 })),
2641
2642 2 => Self::Purged(::fidl_next::FromWire::from_wire(unsafe {
2643 wire.raw.get().read_unchecked::<crate::wire::PurgedPayload<'de>>()
2644 })),
2645
2646 4 => Self::Discovered(::fidl_next::FromWire::from_wire(unsafe {
2647 wire.raw.get().read_unchecked::<crate::wire::DiscoveredPayload<'de>>()
2648 })),
2649
2650 5 => Self::Destroyed(::fidl_next::FromWire::from_wire(unsafe {
2651 wire.raw.get().read_unchecked::<crate::wire::DestroyedPayload<'de>>()
2652 })),
2653
2654 6 => Self::Resolved(::fidl_next::FromWire::from_wire(unsafe {
2655 wire.raw.get().read_unchecked::<crate::wire::ResolvedPayload<'de>>()
2656 })),
2657
2658 7 => Self::Started(::fidl_next::FromWire::from_wire(unsafe {
2659 wire.raw.get().read_unchecked::<crate::wire::StartedPayload<'de>>()
2660 })),
2661
2662 8 => Self::Stopped(::fidl_next::FromWire::from_wire(unsafe {
2663 wire.raw.get().read_unchecked::<crate::wire::StoppedPayload<'de>>()
2664 })),
2665
2666 9 => Self::DebugStarted(::fidl_next::FromWire::from_wire(unsafe {
2667 wire.raw.get().read_unchecked::<crate::wire::DebugStartedPayload<'de>>()
2668 })),
2669
2670 10 => Self::Unresolved(::fidl_next::FromWire::from_wire(unsafe {
2671 wire.raw.get().read_unchecked::<crate::wire::UnresolvedPayload<'de>>()
2672 })),
2673
2674 _ => unsafe { ::core::hint::unreachable_unchecked() },
2675 }
2676 }
2677 }
2678
2679 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::EventPayload<'de>> for EventPayload {
2680 #[inline]
2681 fn from_wire_option(
2682 wire: crate::wire_optional::EventPayload<'de>,
2683 ) -> ::core::option::Option<Self> {
2684 if let Some(inner) = wire.into_option() {
2685 Some(::fidl_next::FromWire::from_wire(inner))
2686 } else {
2687 None
2688 }
2689 }
2690 }
2691
2692 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::EventPayload<'de>>
2693 for Box<EventPayload>
2694 {
2695 #[inline]
2696 fn from_wire_option(
2697 wire: crate::wire_optional::EventPayload<'de>,
2698 ) -> ::core::option::Option<Self> {
2699 <
2700 EventPayload as ::fidl_next::FromWireOption<crate::wire_optional::EventPayload<'de>>
2701 >::from_wire_option(wire).map(Box::new)
2702 }
2703 }
2704
2705 #[doc = " Contains all information about a single event\n"]
2706 #[derive(PartialEq, Debug, Default)]
2707 pub struct Event {
2708 pub header: ::core::option::Option<crate::natural::EventHeader>,
2709
2710 pub payload: ::core::option::Option<crate::natural::EventPayload>,
2711 }
2712
2713 impl Event {
2714 fn __max_ordinal(&self) -> usize {
2715 if self.payload.is_some() {
2716 return 2;
2717 }
2718
2719 if self.header.is_some() {
2720 return 1;
2721 }
2722
2723 0
2724 }
2725 }
2726
2727 impl ::fidl_next::Encodable for Event {
2728 type Encoded = crate::wire::Event<'static>;
2729 }
2730
2731 unsafe impl<___E> ::fidl_next::Encode<___E> for Event
2732 where
2733 ___E: ::fidl_next::Encoder + ?Sized,
2734 ___E: ::fidl_next::fuchsia::HandleEncoder,
2735 {
2736 #[inline]
2737 fn encode(
2738 mut self,
2739 encoder: &mut ___E,
2740 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2741 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2742 ::fidl_next::munge!(let crate::wire::Event { table } = out);
2743
2744 let max_ord = self.__max_ordinal();
2745
2746 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2747 ::fidl_next::Wire::zero_padding(&mut out);
2748
2749 let mut preallocated =
2750 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2751
2752 for i in 1..=max_ord {
2753 match i {
2754 2 => {
2755 if let Some(value) = self.payload.take() {
2756 ::fidl_next::WireEnvelope::encode_value(
2757 value,
2758 preallocated.encoder,
2759 &mut out,
2760 )?;
2761 } else {
2762 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2763 }
2764 }
2765
2766 1 => {
2767 if let Some(value) = self.header.take() {
2768 ::fidl_next::WireEnvelope::encode_value(
2769 value,
2770 preallocated.encoder,
2771 &mut out,
2772 )?;
2773 } else {
2774 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2775 }
2776 }
2777
2778 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2779 }
2780 unsafe {
2781 preallocated.write_next(out.assume_init_ref());
2782 }
2783 }
2784
2785 ::fidl_next::WireTable::encode_len(table, max_ord);
2786
2787 Ok(())
2788 }
2789 }
2790
2791 impl<'de> ::fidl_next::FromWire<crate::wire::Event<'de>> for Event {
2792 #[inline]
2793 fn from_wire(wire_: crate::wire::Event<'de>) -> Self {
2794 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2795
2796 let header = wire_.table.get(1);
2797
2798 let payload = wire_.table.get(2);
2799
2800 Self {
2801 header: header.map(|envelope| {
2802 ::fidl_next::FromWire::from_wire(unsafe {
2803 envelope.read_unchecked::<crate::wire::EventHeader<'de>>()
2804 })
2805 }),
2806
2807 payload: payload.map(|envelope| {
2808 ::fidl_next::FromWire::from_wire(unsafe {
2809 envelope.read_unchecked::<crate::wire::EventPayload<'de>>()
2810 })
2811 }),
2812 }
2813 }
2814 }
2815
2816 #[derive(PartialEq, Debug)]
2817 pub struct EventStreamGetNextResponse {
2818 pub events: ::std::vec::Vec<crate::natural::Event>,
2819 }
2820
2821 impl ::fidl_next::Encodable for EventStreamGetNextResponse {
2822 type Encoded = crate::wire::EventStreamGetNextResponse<'static>;
2823 }
2824
2825 unsafe impl<___E> ::fidl_next::Encode<___E> for EventStreamGetNextResponse
2826 where
2827 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2828 ___E: ::fidl_next::Encoder,
2829 ___E: ::fidl_next::fuchsia::HandleEncoder,
2830 {
2831 #[inline]
2832 fn encode(
2833 self,
2834 encoder_: &mut ___E,
2835 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2836 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2837 ::fidl_next::munge! {
2838 let Self::Encoded {
2839 events,
2840
2841 } = out_;
2842 }
2843
2844 ::fidl_next::Encode::encode(self.events, encoder_, events)?;
2845
2846 Ok(())
2847 }
2848 }
2849
2850 impl ::fidl_next::EncodableOption for EventStreamGetNextResponse {
2851 type EncodedOption =
2852 ::fidl_next::WireBox<'static, crate::wire::EventStreamGetNextResponse<'static>>;
2853 }
2854
2855 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for EventStreamGetNextResponse
2856 where
2857 ___E: ::fidl_next::Encoder + ?Sized,
2858 EventStreamGetNextResponse: ::fidl_next::Encode<___E>,
2859 {
2860 #[inline]
2861 fn encode_option(
2862 this: ::core::option::Option<Self>,
2863 encoder: &mut ___E,
2864 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2865 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2866 if let Some(inner) = this {
2867 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2868 ::fidl_next::WireBox::encode_present(out);
2869 } else {
2870 ::fidl_next::WireBox::encode_absent(out);
2871 }
2872
2873 Ok(())
2874 }
2875 }
2876
2877 impl<'de> ::fidl_next::FromWire<crate::wire::EventStreamGetNextResponse<'de>>
2878 for EventStreamGetNextResponse
2879 {
2880 #[inline]
2881 fn from_wire(wire: crate::wire::EventStreamGetNextResponse<'de>) -> Self {
2882 Self { events: ::fidl_next::FromWire::from_wire(wire.events) }
2883 }
2884 }
2885
2886 #[derive(PartialEq, Clone, Debug)]
2887 pub struct ExecutionControllerOnStopRequest {
2888 pub stopped_payload: crate::natural::StoppedPayload,
2889 }
2890
2891 impl ::fidl_next::Encodable for ExecutionControllerOnStopRequest {
2892 type Encoded = crate::wire::ExecutionControllerOnStopRequest<'static>;
2893 }
2894
2895 unsafe impl<___E> ::fidl_next::Encode<___E> for ExecutionControllerOnStopRequest
2896 where
2897 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2898 ___E: ::fidl_next::Encoder,
2899 {
2900 #[inline]
2901 fn encode(
2902 self,
2903 encoder_: &mut ___E,
2904 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2905 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2906 ::fidl_next::munge! {
2907 let Self::Encoded {
2908 stopped_payload,
2909
2910 } = out_;
2911 }
2912
2913 ::fidl_next::Encode::encode(self.stopped_payload, encoder_, stopped_payload)?;
2914
2915 Ok(())
2916 }
2917 }
2918
2919 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ExecutionControllerOnStopRequest
2920 where
2921 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2922 ___E: ::fidl_next::Encoder,
2923 {
2924 #[inline]
2925 fn encode_ref(
2926 &self,
2927 encoder_: &mut ___E,
2928 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2929 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2930 ::fidl_next::munge! {
2931 let Self::Encoded {
2932
2933 stopped_payload,
2934
2935 } = out_;
2936 }
2937
2938 ::fidl_next::EncodeRef::encode_ref(&self.stopped_payload, encoder_, stopped_payload)?;
2939
2940 Ok(())
2941 }
2942 }
2943
2944 impl ::fidl_next::EncodableOption for ExecutionControllerOnStopRequest {
2945 type EncodedOption =
2946 ::fidl_next::WireBox<'static, crate::wire::ExecutionControllerOnStopRequest<'static>>;
2947 }
2948
2949 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ExecutionControllerOnStopRequest
2950 where
2951 ___E: ::fidl_next::Encoder + ?Sized,
2952 ExecutionControllerOnStopRequest: ::fidl_next::Encode<___E>,
2953 {
2954 #[inline]
2955 fn encode_option(
2956 this: ::core::option::Option<Self>,
2957 encoder: &mut ___E,
2958 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2959 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2960 if let Some(inner) = this {
2961 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2962 ::fidl_next::WireBox::encode_present(out);
2963 } else {
2964 ::fidl_next::WireBox::encode_absent(out);
2965 }
2966
2967 Ok(())
2968 }
2969 }
2970
2971 unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ExecutionControllerOnStopRequest
2972 where
2973 ___E: ::fidl_next::Encoder + ?Sized,
2974 ExecutionControllerOnStopRequest: ::fidl_next::EncodeRef<___E>,
2975 {
2976 #[inline]
2977 fn encode_option_ref(
2978 this: ::core::option::Option<&Self>,
2979 encoder: &mut ___E,
2980 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2981 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2982 if let Some(inner) = this {
2983 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2984 ::fidl_next::WireBox::encode_present(out);
2985 } else {
2986 ::fidl_next::WireBox::encode_absent(out);
2987 }
2988
2989 Ok(())
2990 }
2991 }
2992
2993 impl<'de> ::fidl_next::FromWire<crate::wire::ExecutionControllerOnStopRequest<'de>>
2994 for ExecutionControllerOnStopRequest
2995 {
2996 #[inline]
2997 fn from_wire(wire: crate::wire::ExecutionControllerOnStopRequest<'de>) -> Self {
2998 Self { stopped_payload: ::fidl_next::FromWire::from_wire(wire.stopped_payload) }
2999 }
3000 }
3001
3002 impl<'de> ::fidl_next::FromWireRef<crate::wire::ExecutionControllerOnStopRequest<'de>>
3003 for ExecutionControllerOnStopRequest
3004 {
3005 #[inline]
3006 fn from_wire_ref(wire: &crate::wire::ExecutionControllerOnStopRequest<'de>) -> Self {
3007 Self { stopped_payload: ::fidl_next::FromWireRef::from_wire_ref(&wire.stopped_payload) }
3008 }
3009 }
3010
3011 #[derive(PartialEq, Debug)]
3012 #[repr(C)]
3013 pub struct IntrospectorGetMonikerRequest {
3014 pub component_instance: ::fidl_next::fuchsia::zx::Event,
3015 }
3016
3017 impl ::fidl_next::Encodable for IntrospectorGetMonikerRequest {
3018 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3019 Self,
3020 crate::wire::IntrospectorGetMonikerRequest,
3021 > = unsafe {
3022 ::fidl_next::CopyOptimization::enable_if(
3023 true
3024
3025 && <
3026 ::fidl_next::fuchsia::zx::Event as ::fidl_next::Encodable
3027 >::COPY_OPTIMIZATION.is_enabled()
3028
3029 )
3030 };
3031
3032 type Encoded = crate::wire::IntrospectorGetMonikerRequest;
3033 }
3034
3035 unsafe impl<___E> ::fidl_next::Encode<___E> for IntrospectorGetMonikerRequest
3036 where
3037 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3038 ___E: ::fidl_next::fuchsia::HandleEncoder,
3039 {
3040 #[inline]
3041 fn encode(
3042 self,
3043 encoder_: &mut ___E,
3044 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3045 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3046 ::fidl_next::munge! {
3047 let Self::Encoded {
3048 component_instance,
3049
3050 } = out_;
3051 }
3052
3053 ::fidl_next::Encode::encode(self.component_instance, encoder_, component_instance)?;
3054
3055 Ok(())
3056 }
3057 }
3058
3059 impl ::fidl_next::EncodableOption for IntrospectorGetMonikerRequest {
3060 type EncodedOption =
3061 ::fidl_next::WireBox<'static, crate::wire::IntrospectorGetMonikerRequest>;
3062 }
3063
3064 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for IntrospectorGetMonikerRequest
3065 where
3066 ___E: ::fidl_next::Encoder + ?Sized,
3067 IntrospectorGetMonikerRequest: ::fidl_next::Encode<___E>,
3068 {
3069 #[inline]
3070 fn encode_option(
3071 this: ::core::option::Option<Self>,
3072 encoder: &mut ___E,
3073 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3074 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3075 if let Some(inner) = this {
3076 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3077 ::fidl_next::WireBox::encode_present(out);
3078 } else {
3079 ::fidl_next::WireBox::encode_absent(out);
3080 }
3081
3082 Ok(())
3083 }
3084 }
3085
3086 impl ::fidl_next::FromWire<crate::wire::IntrospectorGetMonikerRequest>
3087 for IntrospectorGetMonikerRequest
3088 {
3089 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3090 crate::wire::IntrospectorGetMonikerRequest,
3091 Self,
3092 > = unsafe {
3093 ::fidl_next::CopyOptimization::enable_if(
3094 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
3095 ::fidl_next::fuchsia::WireEvent,
3096 >>::COPY_OPTIMIZATION
3097 .is_enabled(),
3098 )
3099 };
3100
3101 #[inline]
3102 fn from_wire(wire: crate::wire::IntrospectorGetMonikerRequest) -> Self {
3103 Self { component_instance: ::fidl_next::FromWire::from_wire(wire.component_instance) }
3104 }
3105 }
3106
3107 #[derive(PartialEq, Clone, Debug)]
3108 pub struct IntrospectorGetMonikerResponse {
3109 pub moniker: ::std::string::String,
3110 }
3111
3112 impl ::fidl_next::Encodable for IntrospectorGetMonikerResponse {
3113 type Encoded = crate::wire::IntrospectorGetMonikerResponse<'static>;
3114 }
3115
3116 unsafe impl<___E> ::fidl_next::Encode<___E> for IntrospectorGetMonikerResponse
3117 where
3118 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3119 ___E: ::fidl_next::Encoder,
3120 {
3121 #[inline]
3122 fn encode(
3123 self,
3124 encoder_: &mut ___E,
3125 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3126 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3127 ::fidl_next::munge! {
3128 let Self::Encoded {
3129 moniker,
3130
3131 } = out_;
3132 }
3133
3134 ::fidl_next::Encode::encode(self.moniker, encoder_, moniker)?;
3135
3136 Ok(())
3137 }
3138 }
3139
3140 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for IntrospectorGetMonikerResponse
3141 where
3142 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3143 ___E: ::fidl_next::Encoder,
3144 {
3145 #[inline]
3146 fn encode_ref(
3147 &self,
3148 encoder_: &mut ___E,
3149 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3150 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3151 ::fidl_next::munge! {
3152 let Self::Encoded {
3153
3154 moniker,
3155
3156 } = out_;
3157 }
3158
3159 ::fidl_next::EncodeRef::encode_ref(&self.moniker, encoder_, moniker)?;
3160
3161 Ok(())
3162 }
3163 }
3164
3165 impl ::fidl_next::EncodableOption for IntrospectorGetMonikerResponse {
3166 type EncodedOption =
3167 ::fidl_next::WireBox<'static, crate::wire::IntrospectorGetMonikerResponse<'static>>;
3168 }
3169
3170 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for IntrospectorGetMonikerResponse
3171 where
3172 ___E: ::fidl_next::Encoder + ?Sized,
3173 IntrospectorGetMonikerResponse: ::fidl_next::Encode<___E>,
3174 {
3175 #[inline]
3176 fn encode_option(
3177 this: ::core::option::Option<Self>,
3178 encoder: &mut ___E,
3179 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3180 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3181 if let Some(inner) = this {
3182 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3183 ::fidl_next::WireBox::encode_present(out);
3184 } else {
3185 ::fidl_next::WireBox::encode_absent(out);
3186 }
3187
3188 Ok(())
3189 }
3190 }
3191
3192 unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for IntrospectorGetMonikerResponse
3193 where
3194 ___E: ::fidl_next::Encoder + ?Sized,
3195 IntrospectorGetMonikerResponse: ::fidl_next::EncodeRef<___E>,
3196 {
3197 #[inline]
3198 fn encode_option_ref(
3199 this: ::core::option::Option<&Self>,
3200 encoder: &mut ___E,
3201 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3202 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3203 if let Some(inner) = this {
3204 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3205 ::fidl_next::WireBox::encode_present(out);
3206 } else {
3207 ::fidl_next::WireBox::encode_absent(out);
3208 }
3209
3210 Ok(())
3211 }
3212 }
3213
3214 impl<'de> ::fidl_next::FromWire<crate::wire::IntrospectorGetMonikerResponse<'de>>
3215 for IntrospectorGetMonikerResponse
3216 {
3217 #[inline]
3218 fn from_wire(wire: crate::wire::IntrospectorGetMonikerResponse<'de>) -> Self {
3219 Self { moniker: ::fidl_next::FromWire::from_wire(wire.moniker) }
3220 }
3221 }
3222
3223 impl<'de> ::fidl_next::FromWireRef<crate::wire::IntrospectorGetMonikerResponse<'de>>
3224 for IntrospectorGetMonikerResponse
3225 {
3226 #[inline]
3227 fn from_wire_ref(wire: &crate::wire::IntrospectorGetMonikerResponse<'de>) -> Self {
3228 Self { moniker: ::fidl_next::FromWireRef::from_wire_ref(&wire.moniker) }
3229 }
3230 }
3231
3232 #[derive(PartialEq, Debug)]
3233 pub struct NamespaceInputEntry {
3234 pub path: ::std::string::String,
3235
3236 pub dictionary: ::fidl_next::ClientEnd<
3237 ::fidl_next_fuchsia_component_sandbox::Dictionary,
3238 ::fidl_next::fuchsia::zx::Channel,
3239 >,
3240 }
3241
3242 impl ::fidl_next::Encodable for NamespaceInputEntry {
3243 type Encoded = crate::wire::NamespaceInputEntry<'static>;
3244 }
3245
3246 unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceInputEntry
3247 where
3248 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3249 ___E: ::fidl_next::Encoder,
3250 ___E: ::fidl_next::fuchsia::HandleEncoder,
3251 {
3252 #[inline]
3253 fn encode(
3254 self,
3255 encoder_: &mut ___E,
3256 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3257 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3258 ::fidl_next::munge! {
3259 let Self::Encoded {
3260 path,
3261 dictionary,
3262
3263 } = out_;
3264 }
3265
3266 ::fidl_next::Encode::encode(self.path, encoder_, path)?;
3267
3268 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary)?;
3269
3270 Ok(())
3271 }
3272 }
3273
3274 impl ::fidl_next::EncodableOption for NamespaceInputEntry {
3275 type EncodedOption =
3276 ::fidl_next::WireBox<'static, crate::wire::NamespaceInputEntry<'static>>;
3277 }
3278
3279 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceInputEntry
3280 where
3281 ___E: ::fidl_next::Encoder + ?Sized,
3282 NamespaceInputEntry: ::fidl_next::Encode<___E>,
3283 {
3284 #[inline]
3285 fn encode_option(
3286 this: ::core::option::Option<Self>,
3287 encoder: &mut ___E,
3288 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3289 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3290 if let Some(inner) = this {
3291 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3292 ::fidl_next::WireBox::encode_present(out);
3293 } else {
3294 ::fidl_next::WireBox::encode_absent(out);
3295 }
3296
3297 Ok(())
3298 }
3299 }
3300
3301 impl<'de> ::fidl_next::FromWire<crate::wire::NamespaceInputEntry<'de>> for NamespaceInputEntry {
3302 #[inline]
3303 fn from_wire(wire: crate::wire::NamespaceInputEntry<'de>) -> Self {
3304 Self {
3305 path: ::fidl_next::FromWire::from_wire(wire.path),
3306
3307 dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary),
3308 }
3309 }
3310 }
3311
3312 #[derive(PartialEq, Debug)]
3313 pub struct NamespaceCreateRequest {
3314 pub entries: ::std::vec::Vec<crate::natural::NamespaceInputEntry>,
3315 }
3316
3317 impl ::fidl_next::Encodable for NamespaceCreateRequest {
3318 type Encoded = crate::wire::NamespaceCreateRequest<'static>;
3319 }
3320
3321 unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceCreateRequest
3322 where
3323 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3324 ___E: ::fidl_next::Encoder,
3325 ___E: ::fidl_next::fuchsia::HandleEncoder,
3326 {
3327 #[inline]
3328 fn encode(
3329 self,
3330 encoder_: &mut ___E,
3331 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3332 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3333 ::fidl_next::munge! {
3334 let Self::Encoded {
3335 entries,
3336
3337 } = out_;
3338 }
3339
3340 ::fidl_next::Encode::encode(self.entries, encoder_, entries)?;
3341
3342 Ok(())
3343 }
3344 }
3345
3346 impl ::fidl_next::EncodableOption for NamespaceCreateRequest {
3347 type EncodedOption =
3348 ::fidl_next::WireBox<'static, crate::wire::NamespaceCreateRequest<'static>>;
3349 }
3350
3351 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceCreateRequest
3352 where
3353 ___E: ::fidl_next::Encoder + ?Sized,
3354 NamespaceCreateRequest: ::fidl_next::Encode<___E>,
3355 {
3356 #[inline]
3357 fn encode_option(
3358 this: ::core::option::Option<Self>,
3359 encoder: &mut ___E,
3360 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3361 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3362 if let Some(inner) = this {
3363 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3364 ::fidl_next::WireBox::encode_present(out);
3365 } else {
3366 ::fidl_next::WireBox::encode_absent(out);
3367 }
3368
3369 Ok(())
3370 }
3371 }
3372
3373 impl<'de> ::fidl_next::FromWire<crate::wire::NamespaceCreateRequest<'de>>
3374 for NamespaceCreateRequest
3375 {
3376 #[inline]
3377 fn from_wire(wire: crate::wire::NamespaceCreateRequest<'de>) -> Self {
3378 Self { entries: ::fidl_next::FromWire::from_wire(wire.entries) }
3379 }
3380 }
3381
3382 #[doc = " Error returned from methods in [`Namespace`].\n"]
3383 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
3384 #[repr(u32)]
3385 pub enum NamespaceError {
3386 Shadow = 1,
3387 Duplicate = 2,
3388 Conversion = 3,
3389 BadEntry = 4,
3390 DictionaryRead = 5,
3391 UnknownOrdinal_(u32) = 6,
3392 }
3393
3394 impl ::fidl_next::Encodable for NamespaceError {
3395 type Encoded = crate::wire::NamespaceError;
3396 }
3397 impl ::std::convert::From<u32> for NamespaceError {
3398 fn from(value: u32) -> Self {
3399 match value {
3400 1 => Self::Shadow,
3401 2 => Self::Duplicate,
3402 3 => Self::Conversion,
3403 4 => Self::BadEntry,
3404 5 => Self::DictionaryRead,
3405
3406 _ => Self::UnknownOrdinal_(value),
3407 }
3408 }
3409 }
3410
3411 unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceError
3412 where
3413 ___E: ?Sized,
3414 {
3415 #[inline]
3416 fn encode(
3417 self,
3418 encoder: &mut ___E,
3419 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3420 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3421 ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
3422 }
3423 }
3424
3425 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NamespaceError
3426 where
3427 ___E: ?Sized,
3428 {
3429 #[inline]
3430 fn encode_ref(
3431 &self,
3432 encoder: &mut ___E,
3433 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3434 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3435 ::fidl_next::munge!(let crate::wire::NamespaceError { value } = out);
3436 let _ = value.write(::fidl_next::WireU32::from(match *self {
3437 Self::Shadow => 1,
3438
3439 Self::Duplicate => 2,
3440
3441 Self::Conversion => 3,
3442
3443 Self::BadEntry => 4,
3444
3445 Self::DictionaryRead => 5,
3446
3447 Self::UnknownOrdinal_(value) => value,
3448 }));
3449
3450 Ok(())
3451 }
3452 }
3453
3454 impl ::core::convert::From<crate::wire::NamespaceError> for NamespaceError {
3455 fn from(wire: crate::wire::NamespaceError) -> Self {
3456 match u32::from(wire.value) {
3457 1 => Self::Shadow,
3458
3459 2 => Self::Duplicate,
3460
3461 3 => Self::Conversion,
3462
3463 4 => Self::BadEntry,
3464
3465 5 => Self::DictionaryRead,
3466
3467 value => Self::UnknownOrdinal_(value),
3468 }
3469 }
3470 }
3471
3472 impl ::fidl_next::FromWire<crate::wire::NamespaceError> for NamespaceError {
3473 #[inline]
3474 fn from_wire(wire: crate::wire::NamespaceError) -> Self {
3475 Self::from(wire)
3476 }
3477 }
3478
3479 impl ::fidl_next::FromWireRef<crate::wire::NamespaceError> for NamespaceError {
3480 #[inline]
3481 fn from_wire_ref(wire: &crate::wire::NamespaceError) -> Self {
3482 Self::from(*wire)
3483 }
3484 }
3485
3486 #[derive(PartialEq, Debug)]
3487 pub struct NamespaceCreateResponse {
3488 pub entries: ::std::vec::Vec<crate::natural::NamespaceEntry>,
3489 }
3490
3491 impl ::fidl_next::Encodable for NamespaceCreateResponse {
3492 type Encoded = crate::wire::NamespaceCreateResponse<'static>;
3493 }
3494
3495 unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceCreateResponse
3496 where
3497 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3498 ___E: ::fidl_next::Encoder,
3499 ___E: ::fidl_next::fuchsia::HandleEncoder,
3500 {
3501 #[inline]
3502 fn encode(
3503 self,
3504 encoder_: &mut ___E,
3505 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3506 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3507 ::fidl_next::munge! {
3508 let Self::Encoded {
3509 entries,
3510
3511 } = out_;
3512 }
3513
3514 ::fidl_next::Encode::encode(self.entries, encoder_, entries)?;
3515
3516 Ok(())
3517 }
3518 }
3519
3520 impl ::fidl_next::EncodableOption for NamespaceCreateResponse {
3521 type EncodedOption =
3522 ::fidl_next::WireBox<'static, crate::wire::NamespaceCreateResponse<'static>>;
3523 }
3524
3525 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceCreateResponse
3526 where
3527 ___E: ::fidl_next::Encoder + ?Sized,
3528 NamespaceCreateResponse: ::fidl_next::Encode<___E>,
3529 {
3530 #[inline]
3531 fn encode_option(
3532 this: ::core::option::Option<Self>,
3533 encoder: &mut ___E,
3534 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3535 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3536 if let Some(inner) = this {
3537 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3538 ::fidl_next::WireBox::encode_present(out);
3539 } else {
3540 ::fidl_next::WireBox::encode_absent(out);
3541 }
3542
3543 Ok(())
3544 }
3545 }
3546
3547 impl<'de> ::fidl_next::FromWire<crate::wire::NamespaceCreateResponse<'de>>
3548 for NamespaceCreateResponse
3549 {
3550 #[inline]
3551 fn from_wire(wire: crate::wire::NamespaceCreateResponse<'de>) -> Self {
3552 Self { entries: ::fidl_next::FromWire::from_wire(wire.entries) }
3553 }
3554 }
3555
3556 pub type RealmOpenExposedDirResponse = ();
3557
3558 pub type RealmCreateChildResponse = ();
3559
3560 #[derive(PartialEq, Clone, Debug)]
3561 pub struct RealmDestroyChildRequest {
3562 pub child: ::fidl_next_fuchsia_component_decl::natural::ChildRef,
3563 }
3564
3565 impl ::fidl_next::Encodable for RealmDestroyChildRequest {
3566 type Encoded = crate::wire::RealmDestroyChildRequest<'static>;
3567 }
3568
3569 unsafe impl<___E> ::fidl_next::Encode<___E> for RealmDestroyChildRequest
3570 where
3571 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3572 ___E: ::fidl_next::Encoder,
3573 {
3574 #[inline]
3575 fn encode(
3576 self,
3577 encoder_: &mut ___E,
3578 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3579 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3580 ::fidl_next::munge! {
3581 let Self::Encoded {
3582 child,
3583
3584 } = out_;
3585 }
3586
3587 ::fidl_next::Encode::encode(self.child, encoder_, child)?;
3588
3589 Ok(())
3590 }
3591 }
3592
3593 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for RealmDestroyChildRequest
3594 where
3595 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3596 ___E: ::fidl_next::Encoder,
3597 {
3598 #[inline]
3599 fn encode_ref(
3600 &self,
3601 encoder_: &mut ___E,
3602 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3603 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3604 ::fidl_next::munge! {
3605 let Self::Encoded {
3606
3607 child,
3608
3609 } = out_;
3610 }
3611
3612 ::fidl_next::EncodeRef::encode_ref(&self.child, encoder_, child)?;
3613
3614 Ok(())
3615 }
3616 }
3617
3618 impl ::fidl_next::EncodableOption for RealmDestroyChildRequest {
3619 type EncodedOption =
3620 ::fidl_next::WireBox<'static, crate::wire::RealmDestroyChildRequest<'static>>;
3621 }
3622
3623 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmDestroyChildRequest
3624 where
3625 ___E: ::fidl_next::Encoder + ?Sized,
3626 RealmDestroyChildRequest: ::fidl_next::Encode<___E>,
3627 {
3628 #[inline]
3629 fn encode_option(
3630 this: ::core::option::Option<Self>,
3631 encoder: &mut ___E,
3632 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3634 if let Some(inner) = this {
3635 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3636 ::fidl_next::WireBox::encode_present(out);
3637 } else {
3638 ::fidl_next::WireBox::encode_absent(out);
3639 }
3640
3641 Ok(())
3642 }
3643 }
3644
3645 unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for RealmDestroyChildRequest
3646 where
3647 ___E: ::fidl_next::Encoder + ?Sized,
3648 RealmDestroyChildRequest: ::fidl_next::EncodeRef<___E>,
3649 {
3650 #[inline]
3651 fn encode_option_ref(
3652 this: ::core::option::Option<&Self>,
3653 encoder: &mut ___E,
3654 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3655 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3656 if let Some(inner) = this {
3657 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3658 ::fidl_next::WireBox::encode_present(out);
3659 } else {
3660 ::fidl_next::WireBox::encode_absent(out);
3661 }
3662
3663 Ok(())
3664 }
3665 }
3666
3667 impl<'de> ::fidl_next::FromWire<crate::wire::RealmDestroyChildRequest<'de>>
3668 for RealmDestroyChildRequest
3669 {
3670 #[inline]
3671 fn from_wire(wire: crate::wire::RealmDestroyChildRequest<'de>) -> Self {
3672 Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
3673 }
3674 }
3675
3676 impl<'de> ::fidl_next::FromWireRef<crate::wire::RealmDestroyChildRequest<'de>>
3677 for RealmDestroyChildRequest
3678 {
3679 #[inline]
3680 fn from_wire_ref(wire: &crate::wire::RealmDestroyChildRequest<'de>) -> Self {
3681 Self { child: ::fidl_next::FromWireRef::from_wire_ref(&wire.child) }
3682 }
3683 }
3684
3685 pub type RealmDestroyChildResponse = ();
3686
3687 #[derive(PartialEq, Debug)]
3688 pub struct RealmListChildrenRequest {
3689 pub collection: ::fidl_next_fuchsia_component_decl::natural::CollectionRef,
3690
3691 pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::zx::Channel>,
3692 }
3693
3694 impl ::fidl_next::Encodable for RealmListChildrenRequest {
3695 type Encoded = crate::wire::RealmListChildrenRequest<'static>;
3696 }
3697
3698 unsafe impl<___E> ::fidl_next::Encode<___E> for RealmListChildrenRequest
3699 where
3700 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3701 ___E: ::fidl_next::Encoder,
3702 ___E: ::fidl_next::fuchsia::HandleEncoder,
3703 {
3704 #[inline]
3705 fn encode(
3706 self,
3707 encoder_: &mut ___E,
3708 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3709 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3710 ::fidl_next::munge! {
3711 let Self::Encoded {
3712 collection,
3713 iter,
3714
3715 } = out_;
3716 }
3717
3718 ::fidl_next::Encode::encode(self.collection, encoder_, collection)?;
3719
3720 ::fidl_next::Encode::encode(self.iter, encoder_, iter)?;
3721
3722 Ok(())
3723 }
3724 }
3725
3726 impl ::fidl_next::EncodableOption for RealmListChildrenRequest {
3727 type EncodedOption =
3728 ::fidl_next::WireBox<'static, crate::wire::RealmListChildrenRequest<'static>>;
3729 }
3730
3731 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmListChildrenRequest
3732 where
3733 ___E: ::fidl_next::Encoder + ?Sized,
3734 RealmListChildrenRequest: ::fidl_next::Encode<___E>,
3735 {
3736 #[inline]
3737 fn encode_option(
3738 this: ::core::option::Option<Self>,
3739 encoder: &mut ___E,
3740 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3741 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3742 if let Some(inner) = this {
3743 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3744 ::fidl_next::WireBox::encode_present(out);
3745 } else {
3746 ::fidl_next::WireBox::encode_absent(out);
3747 }
3748
3749 Ok(())
3750 }
3751 }
3752
3753 impl<'de> ::fidl_next::FromWire<crate::wire::RealmListChildrenRequest<'de>>
3754 for RealmListChildrenRequest
3755 {
3756 #[inline]
3757 fn from_wire(wire: crate::wire::RealmListChildrenRequest<'de>) -> Self {
3758 Self {
3759 collection: ::fidl_next::FromWire::from_wire(wire.collection),
3760
3761 iter: ::fidl_next::FromWire::from_wire(wire.iter),
3762 }
3763 }
3764 }
3765
3766 pub type RealmListChildrenResponse = ();
3767
3768 pub type RealmOpenControllerResponse = ();
3769
3770 #[derive(PartialEq, Debug)]
3771 pub struct RealmGetChildOutputDictionaryRequest {
3772 pub child: ::fidl_next_fuchsia_component_decl::natural::ChildRef,
3773 }
3774
3775 impl ::fidl_next::Encodable for RealmGetChildOutputDictionaryRequest {
3776 type Encoded = crate::wire::RealmGetChildOutputDictionaryRequest<'static>;
3777 }
3778
3779 unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetChildOutputDictionaryRequest
3780 where
3781 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3782 ___E: ::fidl_next::Encoder,
3783 ___E: ::fidl_next::fuchsia::HandleEncoder,
3784 {
3785 #[inline]
3786 fn encode(
3787 self,
3788 encoder_: &mut ___E,
3789 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3790 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3791 ::fidl_next::munge! {
3792 let Self::Encoded {
3793 child,
3794
3795 } = out_;
3796 }
3797
3798 ::fidl_next::Encode::encode(self.child, encoder_, child)?;
3799
3800 Ok(())
3801 }
3802 }
3803
3804 impl ::fidl_next::EncodableOption for RealmGetChildOutputDictionaryRequest {
3805 type EncodedOption = ::fidl_next::WireBox<
3806 'static,
3807 crate::wire::RealmGetChildOutputDictionaryRequest<'static>,
3808 >;
3809 }
3810
3811 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetChildOutputDictionaryRequest
3812 where
3813 ___E: ::fidl_next::Encoder + ?Sized,
3814 RealmGetChildOutputDictionaryRequest: ::fidl_next::Encode<___E>,
3815 {
3816 #[inline]
3817 fn encode_option(
3818 this: ::core::option::Option<Self>,
3819 encoder: &mut ___E,
3820 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3821 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3822 if let Some(inner) = this {
3823 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3824 ::fidl_next::WireBox::encode_present(out);
3825 } else {
3826 ::fidl_next::WireBox::encode_absent(out);
3827 }
3828
3829 Ok(())
3830 }
3831 }
3832
3833 impl<'de> ::fidl_next::FromWire<crate::wire::RealmGetChildOutputDictionaryRequest<'de>>
3834 for RealmGetChildOutputDictionaryRequest
3835 {
3836 #[inline]
3837 fn from_wire(wire: crate::wire::RealmGetChildOutputDictionaryRequest<'de>) -> Self {
3838 Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
3839 }
3840 }
3841
3842 #[derive(PartialEq, Debug)]
3843 #[repr(C)]
3844 pub struct RealmGetChildOutputDictionaryResponse {
3845 pub dictionary: ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef,
3846 }
3847
3848 impl ::fidl_next::Encodable for RealmGetChildOutputDictionaryResponse {
3849 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3850 Self,
3851 crate::wire::RealmGetChildOutputDictionaryResponse,
3852 > = unsafe {
3853 ::fidl_next::CopyOptimization::enable_if(
3854 true
3855
3856 && <
3857 ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef as ::fidl_next::Encodable
3858 >::COPY_OPTIMIZATION.is_enabled()
3859
3860 )
3861 };
3862
3863 type Encoded = crate::wire::RealmGetChildOutputDictionaryResponse;
3864 }
3865
3866 unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetChildOutputDictionaryResponse
3867 where
3868 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3869 ___E: ::fidl_next::fuchsia::HandleEncoder,
3870 {
3871 #[inline]
3872 fn encode(
3873 self,
3874 encoder_: &mut ___E,
3875 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3876 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3877 ::fidl_next::munge! {
3878 let Self::Encoded {
3879 dictionary,
3880
3881 } = out_;
3882 }
3883
3884 ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary)?;
3885
3886 Ok(())
3887 }
3888 }
3889
3890 impl ::fidl_next::EncodableOption for RealmGetChildOutputDictionaryResponse {
3891 type EncodedOption =
3892 ::fidl_next::WireBox<'static, crate::wire::RealmGetChildOutputDictionaryResponse>;
3893 }
3894
3895 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetChildOutputDictionaryResponse
3896 where
3897 ___E: ::fidl_next::Encoder + ?Sized,
3898 RealmGetChildOutputDictionaryResponse: ::fidl_next::Encode<___E>,
3899 {
3900 #[inline]
3901 fn encode_option(
3902 this: ::core::option::Option<Self>,
3903 encoder: &mut ___E,
3904 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3905 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3906 if let Some(inner) = this {
3907 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3908 ::fidl_next::WireBox::encode_present(out);
3909 } else {
3910 ::fidl_next::WireBox::encode_absent(out);
3911 }
3912
3913 Ok(())
3914 }
3915 }
3916
3917 impl ::fidl_next::FromWire<crate::wire::RealmGetChildOutputDictionaryResponse>
3918 for RealmGetChildOutputDictionaryResponse
3919 {
3920 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3921 crate::wire::RealmGetChildOutputDictionaryResponse,
3922 Self,
3923 > = unsafe {
3924 ::fidl_next::CopyOptimization::enable_if(
3925 true
3926
3927 && <
3928 ::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef as ::fidl_next::FromWire<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3929 >::COPY_OPTIMIZATION.is_enabled()
3930
3931 )
3932 };
3933
3934 #[inline]
3935 fn from_wire(wire: crate::wire::RealmGetChildOutputDictionaryResponse) -> Self {
3936 Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
3937 }
3938 }
3939
3940 #[derive(PartialEq, Debug)]
3941 pub struct RealmOpenControllerRequest {
3942 pub child: ::fidl_next_fuchsia_component_decl::natural::ChildRef,
3943
3944 pub controller:
3945 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::zx::Channel>,
3946 }
3947
3948 impl ::fidl_next::Encodable for RealmOpenControllerRequest {
3949 type Encoded = crate::wire::RealmOpenControllerRequest<'static>;
3950 }
3951
3952 unsafe impl<___E> ::fidl_next::Encode<___E> for RealmOpenControllerRequest
3953 where
3954 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3955 ___E: ::fidl_next::Encoder,
3956 ___E: ::fidl_next::fuchsia::HandleEncoder,
3957 {
3958 #[inline]
3959 fn encode(
3960 self,
3961 encoder_: &mut ___E,
3962 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3963 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3964 ::fidl_next::munge! {
3965 let Self::Encoded {
3966 child,
3967 controller,
3968
3969 } = out_;
3970 }
3971
3972 ::fidl_next::Encode::encode(self.child, encoder_, child)?;
3973
3974 ::fidl_next::Encode::encode(self.controller, encoder_, controller)?;
3975
3976 Ok(())
3977 }
3978 }
3979
3980 impl ::fidl_next::EncodableOption for RealmOpenControllerRequest {
3981 type EncodedOption =
3982 ::fidl_next::WireBox<'static, crate::wire::RealmOpenControllerRequest<'static>>;
3983 }
3984
3985 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmOpenControllerRequest
3986 where
3987 ___E: ::fidl_next::Encoder + ?Sized,
3988 RealmOpenControllerRequest: ::fidl_next::Encode<___E>,
3989 {
3990 #[inline]
3991 fn encode_option(
3992 this: ::core::option::Option<Self>,
3993 encoder: &mut ___E,
3994 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3995 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3996 if let Some(inner) = this {
3997 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3998 ::fidl_next::WireBox::encode_present(out);
3999 } else {
4000 ::fidl_next::WireBox::encode_absent(out);
4001 }
4002
4003 Ok(())
4004 }
4005 }
4006
4007 impl<'de> ::fidl_next::FromWire<crate::wire::RealmOpenControllerRequest<'de>>
4008 for RealmOpenControllerRequest
4009 {
4010 #[inline]
4011 fn from_wire(wire: crate::wire::RealmOpenControllerRequest<'de>) -> Self {
4012 Self {
4013 child: ::fidl_next::FromWire::from_wire(wire.child),
4014
4015 controller: ::fidl_next::FromWire::from_wire(wire.controller),
4016 }
4017 }
4018 }
4019
4020 #[derive(PartialEq, Debug)]
4021 pub struct RealmOpenExposedDirRequest {
4022 pub child: ::fidl_next_fuchsia_component_decl::natural::ChildRef,
4023
4024 pub exposed_dir: ::fidl_next::ServerEnd<
4025 ::fidl_next_fuchsia_io::Directory,
4026 ::fidl_next::fuchsia::zx::Channel,
4027 >,
4028 }
4029
4030 impl ::fidl_next::Encodable for RealmOpenExposedDirRequest {
4031 type Encoded = crate::wire::RealmOpenExposedDirRequest<'static>;
4032 }
4033
4034 unsafe impl<___E> ::fidl_next::Encode<___E> for RealmOpenExposedDirRequest
4035 where
4036 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4037 ___E: ::fidl_next::Encoder,
4038 ___E: ::fidl_next::fuchsia::HandleEncoder,
4039 {
4040 #[inline]
4041 fn encode(
4042 self,
4043 encoder_: &mut ___E,
4044 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4045 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4046 ::fidl_next::munge! {
4047 let Self::Encoded {
4048 child,
4049 exposed_dir,
4050
4051 } = out_;
4052 }
4053
4054 ::fidl_next::Encode::encode(self.child, encoder_, child)?;
4055
4056 ::fidl_next::Encode::encode(self.exposed_dir, encoder_, exposed_dir)?;
4057
4058 Ok(())
4059 }
4060 }
4061
4062 impl ::fidl_next::EncodableOption for RealmOpenExposedDirRequest {
4063 type EncodedOption =
4064 ::fidl_next::WireBox<'static, crate::wire::RealmOpenExposedDirRequest<'static>>;
4065 }
4066
4067 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmOpenExposedDirRequest
4068 where
4069 ___E: ::fidl_next::Encoder + ?Sized,
4070 RealmOpenExposedDirRequest: ::fidl_next::Encode<___E>,
4071 {
4072 #[inline]
4073 fn encode_option(
4074 this: ::core::option::Option<Self>,
4075 encoder: &mut ___E,
4076 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4077 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4078 if let Some(inner) = this {
4079 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4080 ::fidl_next::WireBox::encode_present(out);
4081 } else {
4082 ::fidl_next::WireBox::encode_absent(out);
4083 }
4084
4085 Ok(())
4086 }
4087 }
4088
4089 impl<'de> ::fidl_next::FromWire<crate::wire::RealmOpenExposedDirRequest<'de>>
4090 for RealmOpenExposedDirRequest
4091 {
4092 #[inline]
4093 fn from_wire(wire: crate::wire::RealmOpenExposedDirRequest<'de>) -> Self {
4094 Self {
4095 child: ::fidl_next::FromWire::from_wire(wire.child),
4096
4097 exposed_dir: ::fidl_next::FromWire::from_wire(wire.exposed_dir),
4098 }
4099 }
4100 }
4101
4102 #[derive(PartialEq, Debug)]
4103 pub struct RealmCreateChildRequest {
4104 pub collection: ::fidl_next_fuchsia_component_decl::natural::CollectionRef,
4105
4106 pub decl: ::fidl_next_fuchsia_component_decl::natural::Child,
4107
4108 pub args: crate::natural::CreateChildArgs,
4109 }
4110
4111 impl ::fidl_next::Encodable for RealmCreateChildRequest {
4112 type Encoded = crate::wire::RealmCreateChildRequest<'static>;
4113 }
4114
4115 unsafe impl<___E> ::fidl_next::Encode<___E> for RealmCreateChildRequest
4116 where
4117 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4118 ___E: ::fidl_next::Encoder,
4119 ___E: ::fidl_next::fuchsia::HandleEncoder,
4120 {
4121 #[inline]
4122 fn encode(
4123 self,
4124 encoder_: &mut ___E,
4125 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4126 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4127 ::fidl_next::munge! {
4128 let Self::Encoded {
4129 collection,
4130 decl,
4131 args,
4132
4133 } = out_;
4134 }
4135
4136 ::fidl_next::Encode::encode(self.collection, encoder_, collection)?;
4137
4138 ::fidl_next::Encode::encode(self.decl, encoder_, decl)?;
4139
4140 ::fidl_next::Encode::encode(self.args, encoder_, args)?;
4141
4142 Ok(())
4143 }
4144 }
4145
4146 impl ::fidl_next::EncodableOption for RealmCreateChildRequest {
4147 type EncodedOption =
4148 ::fidl_next::WireBox<'static, crate::wire::RealmCreateChildRequest<'static>>;
4149 }
4150
4151 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmCreateChildRequest
4152 where
4153 ___E: ::fidl_next::Encoder + ?Sized,
4154 RealmCreateChildRequest: ::fidl_next::Encode<___E>,
4155 {
4156 #[inline]
4157 fn encode_option(
4158 this: ::core::option::Option<Self>,
4159 encoder: &mut ___E,
4160 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4161 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4162 if let Some(inner) = this {
4163 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4164 ::fidl_next::WireBox::encode_present(out);
4165 } else {
4166 ::fidl_next::WireBox::encode_absent(out);
4167 }
4168
4169 Ok(())
4170 }
4171 }
4172
4173 impl<'de> ::fidl_next::FromWire<crate::wire::RealmCreateChildRequest<'de>>
4174 for RealmCreateChildRequest
4175 {
4176 #[inline]
4177 fn from_wire(wire: crate::wire::RealmCreateChildRequest<'de>) -> Self {
4178 Self {
4179 collection: ::fidl_next::FromWire::from_wire(wire.collection),
4180
4181 decl: ::fidl_next::FromWire::from_wire(wire.decl),
4182
4183 args: ::fidl_next::FromWire::from_wire(wire.args),
4184 }
4185 }
4186 }
4187
4188 #[derive(PartialEq, Debug)]
4189 pub struct RealmGetResolvedInfoResponse {
4190 pub resolved_info: ::fidl_next_fuchsia_component_resolution::natural::Component,
4191 }
4192
4193 impl ::fidl_next::Encodable for RealmGetResolvedInfoResponse {
4194 type Encoded = crate::wire::RealmGetResolvedInfoResponse<'static>;
4195 }
4196
4197 unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetResolvedInfoResponse
4198 where
4199 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4200 ___E: ::fidl_next::Encoder,
4201 ___E: ::fidl_next::fuchsia::HandleEncoder,
4202 {
4203 #[inline]
4204 fn encode(
4205 self,
4206 encoder_: &mut ___E,
4207 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4208 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4209 ::fidl_next::munge! {
4210 let Self::Encoded {
4211 resolved_info,
4212
4213 } = out_;
4214 }
4215
4216 ::fidl_next::Encode::encode(self.resolved_info, encoder_, resolved_info)?;
4217
4218 Ok(())
4219 }
4220 }
4221
4222 impl ::fidl_next::EncodableOption for RealmGetResolvedInfoResponse {
4223 type EncodedOption =
4224 ::fidl_next::WireBox<'static, crate::wire::RealmGetResolvedInfoResponse<'static>>;
4225 }
4226
4227 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetResolvedInfoResponse
4228 where
4229 ___E: ::fidl_next::Encoder + ?Sized,
4230 RealmGetResolvedInfoResponse: ::fidl_next::Encode<___E>,
4231 {
4232 #[inline]
4233 fn encode_option(
4234 this: ::core::option::Option<Self>,
4235 encoder: &mut ___E,
4236 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4237 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4238 if let Some(inner) = this {
4239 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4240 ::fidl_next::WireBox::encode_present(out);
4241 } else {
4242 ::fidl_next::WireBox::encode_absent(out);
4243 }
4244
4245 Ok(())
4246 }
4247 }
4248
4249 impl<'de> ::fidl_next::FromWire<crate::wire::RealmGetResolvedInfoResponse<'de>>
4250 for RealmGetResolvedInfoResponse
4251 {
4252 #[inline]
4253 fn from_wire(wire: crate::wire::RealmGetResolvedInfoResponse<'de>) -> Self {
4254 Self { resolved_info: ::fidl_next::FromWire::from_wire(wire.resolved_info) }
4255 }
4256 }
4257
4258 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
4259 #[repr(u32)]
4260 pub enum StatusError {
4261 Provider = 1,
4262 ResponseInvalid = 2,
4263 StatusUnknown = 3,
4264 Unsupported = 4,
4265 }
4266
4267 impl ::fidl_next::Encodable for StatusError {
4268 type Encoded = crate::wire::StatusError;
4269 }
4270 impl ::core::convert::TryFrom<u32> for StatusError {
4271 type Error = ::fidl_next::UnknownStrictEnumMemberError;
4272 fn try_from(
4273 value: u32,
4274 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
4275 match value {
4276 1 => Ok(Self::Provider),
4277 2 => Ok(Self::ResponseInvalid),
4278 3 => Ok(Self::StatusUnknown),
4279 4 => Ok(Self::Unsupported),
4280
4281 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
4282 }
4283 }
4284 }
4285
4286 unsafe impl<___E> ::fidl_next::Encode<___E> for StatusError
4287 where
4288 ___E: ?Sized,
4289 {
4290 #[inline]
4291 fn encode(
4292 self,
4293 encoder: &mut ___E,
4294 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4295 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4296 ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
4297 }
4298 }
4299
4300 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StatusError
4301 where
4302 ___E: ?Sized,
4303 {
4304 #[inline]
4305 fn encode_ref(
4306 &self,
4307 encoder: &mut ___E,
4308 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4309 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4310 ::fidl_next::munge!(let crate::wire::StatusError { value } = out);
4311 let _ = value.write(::fidl_next::WireU32::from(match *self {
4312 Self::Provider => 1,
4313
4314 Self::ResponseInvalid => 2,
4315
4316 Self::StatusUnknown => 3,
4317
4318 Self::Unsupported => 4,
4319 }));
4320
4321 Ok(())
4322 }
4323 }
4324
4325 impl ::core::convert::From<crate::wire::StatusError> for StatusError {
4326 fn from(wire: crate::wire::StatusError) -> Self {
4327 match u32::from(wire.value) {
4328 1 => Self::Provider,
4329
4330 2 => Self::ResponseInvalid,
4331
4332 3 => Self::StatusUnknown,
4333
4334 4 => Self::Unsupported,
4335
4336 _ => unsafe { ::core::hint::unreachable_unchecked() },
4337 }
4338 }
4339 }
4340
4341 impl ::fidl_next::FromWire<crate::wire::StatusError> for StatusError {
4342 #[inline]
4343 fn from_wire(wire: crate::wire::StatusError) -> Self {
4344 Self::from(wire)
4345 }
4346 }
4347
4348 impl ::fidl_next::FromWireRef<crate::wire::StatusError> for StatusError {
4349 #[inline]
4350 fn from_wire_ref(wire: &crate::wire::StatusError) -> Self {
4351 Self::from(*wire)
4352 }
4353 }
4354
4355 pub type StorageAdminOpenStorageResponse = ();
4356
4357 #[derive(PartialEq, Debug)]
4358 pub struct StorageAdminListStorageInRealmRequest {
4359 pub relative_moniker: ::std::string::String,
4360
4361 pub iterator:
4362 ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::fuchsia::zx::Channel>,
4363 }
4364
4365 impl ::fidl_next::Encodable for StorageAdminListStorageInRealmRequest {
4366 type Encoded = crate::wire::StorageAdminListStorageInRealmRequest<'static>;
4367 }
4368
4369 unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminListStorageInRealmRequest
4370 where
4371 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4372 ___E: ::fidl_next::Encoder,
4373 ___E: ::fidl_next::fuchsia::HandleEncoder,
4374 {
4375 #[inline]
4376 fn encode(
4377 self,
4378 encoder_: &mut ___E,
4379 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4381 ::fidl_next::munge! {
4382 let Self::Encoded {
4383 relative_moniker,
4384 iterator,
4385
4386 } = out_;
4387 }
4388
4389 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
4390
4391 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator)?;
4392
4393 Ok(())
4394 }
4395 }
4396
4397 impl ::fidl_next::EncodableOption for StorageAdminListStorageInRealmRequest {
4398 type EncodedOption = ::fidl_next::WireBox<
4399 'static,
4400 crate::wire::StorageAdminListStorageInRealmRequest<'static>,
4401 >;
4402 }
4403
4404 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminListStorageInRealmRequest
4405 where
4406 ___E: ::fidl_next::Encoder + ?Sized,
4407 StorageAdminListStorageInRealmRequest: ::fidl_next::Encode<___E>,
4408 {
4409 #[inline]
4410 fn encode_option(
4411 this: ::core::option::Option<Self>,
4412 encoder: &mut ___E,
4413 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4414 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4415 if let Some(inner) = this {
4416 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4417 ::fidl_next::WireBox::encode_present(out);
4418 } else {
4419 ::fidl_next::WireBox::encode_absent(out);
4420 }
4421
4422 Ok(())
4423 }
4424 }
4425
4426 impl<'de> ::fidl_next::FromWire<crate::wire::StorageAdminListStorageInRealmRequest<'de>>
4427 for StorageAdminListStorageInRealmRequest
4428 {
4429 #[inline]
4430 fn from_wire(wire: crate::wire::StorageAdminListStorageInRealmRequest<'de>) -> Self {
4431 Self {
4432 relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker),
4433
4434 iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
4435 }
4436 }
4437 }
4438
4439 pub type StorageAdminListStorageInRealmResponse = ();
4440
4441 pub type StorageAdminOpenComponentStorageByIdResponse = ();
4442
4443 #[derive(PartialEq, Clone, Debug)]
4444 pub struct StorageAdminDeleteComponentStorageRequest {
4445 pub relative_moniker: ::std::string::String,
4446 }
4447
4448 impl ::fidl_next::Encodable for StorageAdminDeleteComponentStorageRequest {
4449 type Encoded = crate::wire::StorageAdminDeleteComponentStorageRequest<'static>;
4450 }
4451
4452 unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminDeleteComponentStorageRequest
4453 where
4454 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4455 ___E: ::fidl_next::Encoder,
4456 {
4457 #[inline]
4458 fn encode(
4459 self,
4460 encoder_: &mut ___E,
4461 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4462 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4463 ::fidl_next::munge! {
4464 let Self::Encoded {
4465 relative_moniker,
4466
4467 } = out_;
4468 }
4469
4470 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
4471
4472 Ok(())
4473 }
4474 }
4475
4476 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StorageAdminDeleteComponentStorageRequest
4477 where
4478 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4479 ___E: ::fidl_next::Encoder,
4480 {
4481 #[inline]
4482 fn encode_ref(
4483 &self,
4484 encoder_: &mut ___E,
4485 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4486 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4487 ::fidl_next::munge! {
4488 let Self::Encoded {
4489
4490 relative_moniker,
4491
4492 } = out_;
4493 }
4494
4495 ::fidl_next::EncodeRef::encode_ref(&self.relative_moniker, encoder_, relative_moniker)?;
4496
4497 Ok(())
4498 }
4499 }
4500
4501 impl ::fidl_next::EncodableOption for StorageAdminDeleteComponentStorageRequest {
4502 type EncodedOption = ::fidl_next::WireBox<
4503 'static,
4504 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
4505 >;
4506 }
4507
4508 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminDeleteComponentStorageRequest
4509 where
4510 ___E: ::fidl_next::Encoder + ?Sized,
4511 StorageAdminDeleteComponentStorageRequest: ::fidl_next::Encode<___E>,
4512 {
4513 #[inline]
4514 fn encode_option(
4515 this: ::core::option::Option<Self>,
4516 encoder: &mut ___E,
4517 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4518 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4519 if let Some(inner) = this {
4520 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4521 ::fidl_next::WireBox::encode_present(out);
4522 } else {
4523 ::fidl_next::WireBox::encode_absent(out);
4524 }
4525
4526 Ok(())
4527 }
4528 }
4529
4530 unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for StorageAdminDeleteComponentStorageRequest
4531 where
4532 ___E: ::fidl_next::Encoder + ?Sized,
4533 StorageAdminDeleteComponentStorageRequest: ::fidl_next::EncodeRef<___E>,
4534 {
4535 #[inline]
4536 fn encode_option_ref(
4537 this: ::core::option::Option<&Self>,
4538 encoder: &mut ___E,
4539 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4540 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4541 if let Some(inner) = this {
4542 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4543 ::fidl_next::WireBox::encode_present(out);
4544 } else {
4545 ::fidl_next::WireBox::encode_absent(out);
4546 }
4547
4548 Ok(())
4549 }
4550 }
4551
4552 impl<'de> ::fidl_next::FromWire<crate::wire::StorageAdminDeleteComponentStorageRequest<'de>>
4553 for StorageAdminDeleteComponentStorageRequest
4554 {
4555 #[inline]
4556 fn from_wire(wire: crate::wire::StorageAdminDeleteComponentStorageRequest<'de>) -> Self {
4557 Self { relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker) }
4558 }
4559 }
4560
4561 impl<'de> ::fidl_next::FromWireRef<crate::wire::StorageAdminDeleteComponentStorageRequest<'de>>
4562 for StorageAdminDeleteComponentStorageRequest
4563 {
4564 #[inline]
4565 fn from_wire_ref(
4566 wire: &crate::wire::StorageAdminDeleteComponentStorageRequest<'de>,
4567 ) -> Self {
4568 Self {
4569 relative_moniker: ::fidl_next::FromWireRef::from_wire_ref(&wire.relative_moniker),
4570 }
4571 }
4572 }
4573
4574 pub type StorageAdminDeleteComponentStorageResponse = ();
4575
4576 #[doc = " Metadata about status of the storage\n"]
4577 #[derive(PartialEq, Clone, Debug, Default)]
4578 pub struct StorageStatus {
4579 pub total_size: ::core::option::Option<u64>,
4580
4581 pub used_size: ::core::option::Option<u64>,
4582 }
4583
4584 impl StorageStatus {
4585 fn __max_ordinal(&self) -> usize {
4586 if self.used_size.is_some() {
4587 return 2;
4588 }
4589
4590 if self.total_size.is_some() {
4591 return 1;
4592 }
4593
4594 0
4595 }
4596 }
4597
4598 impl ::fidl_next::Encodable for StorageStatus {
4599 type Encoded = crate::wire::StorageStatus<'static>;
4600 }
4601
4602 unsafe impl<___E> ::fidl_next::Encode<___E> for StorageStatus
4603 where
4604 ___E: ::fidl_next::Encoder + ?Sized,
4605 {
4606 #[inline]
4607 fn encode(
4608 mut self,
4609 encoder: &mut ___E,
4610 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4611 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4612 ::fidl_next::munge!(let crate::wire::StorageStatus { table } = out);
4613
4614 let max_ord = self.__max_ordinal();
4615
4616 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4617 ::fidl_next::Wire::zero_padding(&mut out);
4618
4619 let mut preallocated =
4620 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4621
4622 for i in 1..=max_ord {
4623 match i {
4624 2 => {
4625 if let Some(value) = self.used_size.take() {
4626 ::fidl_next::WireEnvelope::encode_value(
4627 value,
4628 preallocated.encoder,
4629 &mut out,
4630 )?;
4631 } else {
4632 ::fidl_next::WireEnvelope::encode_zero(&mut out)
4633 }
4634 }
4635
4636 1 => {
4637 if let Some(value) = self.total_size.take() {
4638 ::fidl_next::WireEnvelope::encode_value(
4639 value,
4640 preallocated.encoder,
4641 &mut out,
4642 )?;
4643 } else {
4644 ::fidl_next::WireEnvelope::encode_zero(&mut out)
4645 }
4646 }
4647
4648 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4649 }
4650 unsafe {
4651 preallocated.write_next(out.assume_init_ref());
4652 }
4653 }
4654
4655 ::fidl_next::WireTable::encode_len(table, max_ord);
4656
4657 Ok(())
4658 }
4659 }
4660
4661 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StorageStatus
4662 where
4663 ___E: ::fidl_next::Encoder + ?Sized,
4664 {
4665 #[inline]
4666 fn encode_ref(
4667 &self,
4668 encoder: &mut ___E,
4669 out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4670 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4671 ::fidl_next::munge!(let crate::wire::StorageStatus { table } = out);
4672
4673 let max_ord = self.__max_ordinal();
4674
4675 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4676 ::fidl_next::Wire::zero_padding(&mut out);
4677
4678 let mut preallocated =
4679 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4680
4681 for i in 1..=max_ord {
4682 match i {
4683 2 => {
4684 if let Some(value) = &self.used_size {
4685 ::fidl_next::WireEnvelope::encode_value(
4686 value,
4687 preallocated.encoder,
4688 &mut out,
4689 )?;
4690 } else {
4691 ::fidl_next::WireEnvelope::encode_zero(&mut out)
4692 }
4693 }
4694
4695 1 => {
4696 if let Some(value) = &self.total_size {
4697 ::fidl_next::WireEnvelope::encode_value(
4698 value,
4699 preallocated.encoder,
4700 &mut out,
4701 )?;
4702 } else {
4703 ::fidl_next::WireEnvelope::encode_zero(&mut out)
4704 }
4705 }
4706
4707 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4708 }
4709 unsafe {
4710 preallocated.write_next(out.assume_init_ref());
4711 }
4712 }
4713
4714 ::fidl_next::WireTable::encode_len(table, max_ord);
4715
4716 Ok(())
4717 }
4718 }
4719
4720 impl<'de> ::fidl_next::FromWire<crate::wire::StorageStatus<'de>> for StorageStatus {
4721 #[inline]
4722 fn from_wire(wire_: crate::wire::StorageStatus<'de>) -> Self {
4723 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4724
4725 let total_size = wire_.table.get(1);
4726
4727 let used_size = wire_.table.get(2);
4728
4729 Self {
4730 total_size: total_size.map(|envelope| {
4731 ::fidl_next::FromWire::from_wire(unsafe {
4732 envelope.read_unchecked::<::fidl_next::WireU64>()
4733 })
4734 }),
4735
4736 used_size: used_size.map(|envelope| {
4737 ::fidl_next::FromWire::from_wire(unsafe {
4738 envelope.read_unchecked::<::fidl_next::WireU64>()
4739 })
4740 }),
4741 }
4742 }
4743 }
4744
4745 impl<'de> ::fidl_next::FromWireRef<crate::wire::StorageStatus<'de>> for StorageStatus {
4746 #[inline]
4747 fn from_wire_ref(wire: &crate::wire::StorageStatus<'de>) -> Self {
4748 Self {
4749 total_size: wire.table.get(1).map(|envelope| {
4750 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4751 envelope.deref_unchecked::<::fidl_next::WireU64>()
4752 })
4753 }),
4754
4755 used_size: wire.table.get(2).map(|envelope| {
4756 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4757 envelope.deref_unchecked::<::fidl_next::WireU64>()
4758 })
4759 }),
4760 }
4761 }
4762 }
4763
4764 pub type StorageAdminDeleteAllStorageContentsResponse = ();
4765
4766 #[derive(PartialEq, Debug)]
4767 pub struct StorageAdminOpenStorageRequest {
4768 pub relative_moniker: ::std::string::String,
4769
4770 pub object:
4771 ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::zx::Channel>,
4772 }
4773
4774 impl ::fidl_next::Encodable for StorageAdminOpenStorageRequest {
4775 type Encoded = crate::wire::StorageAdminOpenStorageRequest<'static>;
4776 }
4777
4778 unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminOpenStorageRequest
4779 where
4780 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4781 ___E: ::fidl_next::Encoder,
4782 ___E: ::fidl_next::fuchsia::HandleEncoder,
4783 {
4784 #[inline]
4785 fn encode(
4786 self,
4787 encoder_: &mut ___E,
4788 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4789 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4790 ::fidl_next::munge! {
4791 let Self::Encoded {
4792 relative_moniker,
4793 object,
4794
4795 } = out_;
4796 }
4797
4798 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
4799
4800 ::fidl_next::Encode::encode(self.object, encoder_, object)?;
4801
4802 Ok(())
4803 }
4804 }
4805
4806 impl ::fidl_next::EncodableOption for StorageAdminOpenStorageRequest {
4807 type EncodedOption =
4808 ::fidl_next::WireBox<'static, crate::wire::StorageAdminOpenStorageRequest<'static>>;
4809 }
4810
4811 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminOpenStorageRequest
4812 where
4813 ___E: ::fidl_next::Encoder + ?Sized,
4814 StorageAdminOpenStorageRequest: ::fidl_next::Encode<___E>,
4815 {
4816 #[inline]
4817 fn encode_option(
4818 this: ::core::option::Option<Self>,
4819 encoder: &mut ___E,
4820 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4821 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4822 if let Some(inner) = this {
4823 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4824 ::fidl_next::WireBox::encode_present(out);
4825 } else {
4826 ::fidl_next::WireBox::encode_absent(out);
4827 }
4828
4829 Ok(())
4830 }
4831 }
4832
4833 impl<'de> ::fidl_next::FromWire<crate::wire::StorageAdminOpenStorageRequest<'de>>
4834 for StorageAdminOpenStorageRequest
4835 {
4836 #[inline]
4837 fn from_wire(wire: crate::wire::StorageAdminOpenStorageRequest<'de>) -> Self {
4838 Self {
4839 relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker),
4840
4841 object: ::fidl_next::FromWire::from_wire(wire.object),
4842 }
4843 }
4844 }
4845
4846 #[derive(PartialEq, Debug)]
4847 pub struct StorageAdminOpenComponentStorageByIdRequest {
4848 pub id: ::std::string::String,
4849
4850 pub object:
4851 ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::zx::Channel>,
4852 }
4853
4854 impl ::fidl_next::Encodable for StorageAdminOpenComponentStorageByIdRequest {
4855 type Encoded = crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>;
4856 }
4857
4858 unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminOpenComponentStorageByIdRequest
4859 where
4860 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4861 ___E: ::fidl_next::Encoder,
4862 ___E: ::fidl_next::fuchsia::HandleEncoder,
4863 {
4864 #[inline]
4865 fn encode(
4866 self,
4867 encoder_: &mut ___E,
4868 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4869 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4870 ::fidl_next::munge! {
4871 let Self::Encoded {
4872 id,
4873 object,
4874
4875 } = out_;
4876 }
4877
4878 ::fidl_next::Encode::encode(self.id, encoder_, id)?;
4879
4880 ::fidl_next::Encode::encode(self.object, encoder_, object)?;
4881
4882 Ok(())
4883 }
4884 }
4885
4886 impl ::fidl_next::EncodableOption for StorageAdminOpenComponentStorageByIdRequest {
4887 type EncodedOption = ::fidl_next::WireBox<
4888 'static,
4889 crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>,
4890 >;
4891 }
4892
4893 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminOpenComponentStorageByIdRequest
4894 where
4895 ___E: ::fidl_next::Encoder + ?Sized,
4896 StorageAdminOpenComponentStorageByIdRequest: ::fidl_next::Encode<___E>,
4897 {
4898 #[inline]
4899 fn encode_option(
4900 this: ::core::option::Option<Self>,
4901 encoder: &mut ___E,
4902 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4903 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4904 if let Some(inner) = this {
4905 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4906 ::fidl_next::WireBox::encode_present(out);
4907 } else {
4908 ::fidl_next::WireBox::encode_absent(out);
4909 }
4910
4911 Ok(())
4912 }
4913 }
4914
4915 impl<'de> ::fidl_next::FromWire<crate::wire::StorageAdminOpenComponentStorageByIdRequest<'de>>
4916 for StorageAdminOpenComponentStorageByIdRequest
4917 {
4918 #[inline]
4919 fn from_wire(wire: crate::wire::StorageAdminOpenComponentStorageByIdRequest<'de>) -> Self {
4920 Self {
4921 id: ::fidl_next::FromWire::from_wire(wire.id),
4922
4923 object: ::fidl_next::FromWire::from_wire(wire.object),
4924 }
4925 }
4926 }
4927
4928 #[derive(PartialEq, Clone, Debug)]
4929 pub struct StorageIteratorNextResponse {
4930 pub relative_monikers: ::std::vec::Vec<::std::string::String>,
4931 }
4932
4933 impl ::fidl_next::Encodable for StorageIteratorNextResponse {
4934 type Encoded = crate::wire::StorageIteratorNextResponse<'static>;
4935 }
4936
4937 unsafe impl<___E> ::fidl_next::Encode<___E> for StorageIteratorNextResponse
4938 where
4939 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4940 ___E: ::fidl_next::Encoder,
4941 {
4942 #[inline]
4943 fn encode(
4944 self,
4945 encoder_: &mut ___E,
4946 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4947 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4948 ::fidl_next::munge! {
4949 let Self::Encoded {
4950 relative_monikers,
4951
4952 } = out_;
4953 }
4954
4955 ::fidl_next::Encode::encode(self.relative_monikers, encoder_, relative_monikers)?;
4956
4957 Ok(())
4958 }
4959 }
4960
4961 unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StorageIteratorNextResponse
4962 where
4963 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4964 ___E: ::fidl_next::Encoder,
4965 {
4966 #[inline]
4967 fn encode_ref(
4968 &self,
4969 encoder_: &mut ___E,
4970 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4971 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4972 ::fidl_next::munge! {
4973 let Self::Encoded {
4974
4975 relative_monikers,
4976
4977 } = out_;
4978 }
4979
4980 ::fidl_next::EncodeRef::encode_ref(
4981 &self.relative_monikers,
4982 encoder_,
4983 relative_monikers,
4984 )?;
4985
4986 Ok(())
4987 }
4988 }
4989
4990 impl ::fidl_next::EncodableOption for StorageIteratorNextResponse {
4991 type EncodedOption =
4992 ::fidl_next::WireBox<'static, crate::wire::StorageIteratorNextResponse<'static>>;
4993 }
4994
4995 unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageIteratorNextResponse
4996 where
4997 ___E: ::fidl_next::Encoder + ?Sized,
4998 StorageIteratorNextResponse: ::fidl_next::Encode<___E>,
4999 {
5000 #[inline]
5001 fn encode_option(
5002 this: ::core::option::Option<Self>,
5003 encoder: &mut ___E,
5004 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5005 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5006 if let Some(inner) = this {
5007 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5008 ::fidl_next::WireBox::encode_present(out);
5009 } else {
5010 ::fidl_next::WireBox::encode_absent(out);
5011 }
5012
5013 Ok(())
5014 }
5015 }
5016
5017 unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for StorageIteratorNextResponse
5018 where
5019 ___E: ::fidl_next::Encoder + ?Sized,
5020 StorageIteratorNextResponse: ::fidl_next::EncodeRef<___E>,
5021 {
5022 #[inline]
5023 fn encode_option_ref(
5024 this: ::core::option::Option<&Self>,
5025 encoder: &mut ___E,
5026 out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5027 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5028 if let Some(inner) = this {
5029 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5030 ::fidl_next::WireBox::encode_present(out);
5031 } else {
5032 ::fidl_next::WireBox::encode_absent(out);
5033 }
5034
5035 Ok(())
5036 }
5037 }
5038
5039 impl<'de> ::fidl_next::FromWire<crate::wire::StorageIteratorNextResponse<'de>>
5040 for StorageIteratorNextResponse
5041 {
5042 #[inline]
5043 fn from_wire(wire: crate::wire::StorageIteratorNextResponse<'de>) -> Self {
5044 Self { relative_monikers: ::fidl_next::FromWire::from_wire(wire.relative_monikers) }
5045 }
5046 }
5047
5048 impl<'de> ::fidl_next::FromWireRef<crate::wire::StorageIteratorNextResponse<'de>>
5049 for StorageIteratorNextResponse
5050 {
5051 #[inline]
5052 fn from_wire_ref(wire: &crate::wire::StorageIteratorNextResponse<'de>) -> Self {
5053 Self {
5054 relative_monikers: ::fidl_next::FromWireRef::from_wire_ref(&wire.relative_monikers),
5055 }
5056 }
5057 }
5058
5059 pub type ChildName = ::std::string::String;
5060
5061 pub type UrlScheme = ::std::string::String;
5062}
5063
5064pub mod wire {
5065
5066 pub type Name<'de> = ::fidl_next::WireString<'de>;
5068
5069 #[repr(C)]
5071 pub struct CapabilityRequestedPayload<'de> {
5072 pub(crate) table: ::fidl_next::WireTable<'de>,
5073 }
5074
5075 impl<'de> Drop for CapabilityRequestedPayload<'de> {
5076 fn drop(&mut self) {
5077 let _ = self.table.get(1).map(|envelope| unsafe {
5078 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
5079 });
5080
5081 let _ = self.table.get(2).map(|envelope| unsafe {
5082 envelope.read_unchecked::<::fidl_next::fuchsia::WireChannel>()
5083 });
5084 }
5085 }
5086
5087 unsafe impl ::fidl_next::Wire for CapabilityRequestedPayload<'static> {
5088 type Decoded<'de> = CapabilityRequestedPayload<'de>;
5089
5090 #[inline]
5091 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5092 ::fidl_next::munge!(let Self { table } = out);
5093 ::fidl_next::WireTable::zero_padding(table);
5094 }
5095 }
5096
5097 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityRequestedPayload<'static>
5098 where
5099 ___D: ::fidl_next::Decoder + ?Sized,
5100 ___D: ::fidl_next::fuchsia::HandleDecoder,
5101 {
5102 fn decode(
5103 slot: ::fidl_next::Slot<'_, Self>,
5104 decoder: &mut ___D,
5105 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5106 ::fidl_next::munge!(let Self { table } = slot);
5107
5108 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5109 match ordinal {
5110 0 => unsafe { ::core::hint::unreachable_unchecked() },
5111
5112 1 => {
5113 ::fidl_next::WireEnvelope::decode_as::<
5114 ___D,
5115 ::fidl_next::WireString<'static>,
5116 >(slot.as_mut(), decoder)?;
5117
5118 let value = unsafe {
5119 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
5120 };
5121
5122 if value.len() > 255 {
5123 return Err(::fidl_next::DecodeError::VectorTooLong {
5124 size: value.len() as u64,
5125 limit: 255,
5126 });
5127 }
5128
5129 Ok(())
5130 }
5131
5132 2 => {
5133 ::fidl_next::WireEnvelope::decode_as::<
5134 ___D,
5135 ::fidl_next::fuchsia::WireChannel,
5136 >(slot.as_mut(), decoder)?;
5137
5138 Ok(())
5139 }
5140
5141 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
5142 }
5143 })
5144 }
5145 }
5146
5147 impl<'de> CapabilityRequestedPayload<'de> {
5148 pub fn name(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
5149 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5150 }
5151
5152 pub fn capability(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireChannel> {
5153 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5154 }
5155 }
5156
5157 impl<'de> ::core::fmt::Debug for CapabilityRequestedPayload<'de> {
5158 fn fmt(
5159 &self,
5160 f: &mut ::core::fmt::Formatter<'_>,
5161 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5162 f.debug_struct("CapabilityRequestedPayload")
5163 .field("name", &self.name())
5164 .field("capability", &self.capability())
5165 .finish()
5166 }
5167 }
5168
5169 impl<'de> ::fidl_next::IntoNatural for CapabilityRequestedPayload<'de> {
5170 type Natural = crate::natural::CapabilityRequestedPayload;
5171 }
5172
5173 #[derive(Debug)]
5175 #[repr(C)]
5176 pub struct ChildIteratorNextResponse<'de> {
5177 pub children:
5178 ::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>>,
5179 }
5180
5181 static_assertions::const_assert_eq!(std::mem::size_of::<ChildIteratorNextResponse<'_>>(), 16);
5182 static_assertions::const_assert_eq!(std::mem::align_of::<ChildIteratorNextResponse<'_>>(), 8);
5183
5184 static_assertions::const_assert_eq!(
5185 std::mem::offset_of!(ChildIteratorNextResponse<'_>, children),
5186 0
5187 );
5188
5189 unsafe impl ::fidl_next::Wire for ChildIteratorNextResponse<'static> {
5190 type Decoded<'de> = ChildIteratorNextResponse<'de>;
5191
5192 #[inline]
5193 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5194 ::fidl_next::munge! {
5195 let Self {
5196
5197 children,
5198
5199 } = &mut *out_;
5200 }
5201
5202 ::fidl_next::Wire::zero_padding(children);
5203 }
5204 }
5205
5206 unsafe impl<___D> ::fidl_next::Decode<___D> for ChildIteratorNextResponse<'static>
5207 where
5208 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5209 ___D: ::fidl_next::Decoder,
5210 {
5211 fn decode(
5212 slot_: ::fidl_next::Slot<'_, Self>,
5213 decoder_: &mut ___D,
5214 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5215 ::fidl_next::munge! {
5216 let Self {
5217
5218 mut children,
5219
5220 } = slot_;
5221 }
5222
5223 ::fidl_next::Decode::decode(children.as_mut(), decoder_)?;
5224
5225 let children = unsafe { children.deref_unchecked() };
5226
5227 if children.len() > 128 {
5228 return Err(::fidl_next::DecodeError::VectorTooLong {
5229 size: children.len() as u64,
5230 limit: 128,
5231 });
5232 }
5233
5234 Ok(())
5235 }
5236 }
5237
5238 impl<'de> ::fidl_next::IntoNatural for ChildIteratorNextResponse<'de> {
5239 type Natural = crate::natural::ChildIteratorNextResponse;
5240 }
5241
5242 pub type ControllerStartResponse = ();
5244
5245 #[derive(Debug)]
5247 #[repr(C)]
5248 pub struct ControllerIsStartedResponse {
5249 pub is_started: bool,
5250 }
5251
5252 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerIsStartedResponse>(), 1);
5253 static_assertions::const_assert_eq!(std::mem::align_of::<ControllerIsStartedResponse>(), 1);
5254
5255 static_assertions::const_assert_eq!(
5256 std::mem::offset_of!(ControllerIsStartedResponse, is_started),
5257 0
5258 );
5259
5260 unsafe impl ::fidl_next::Wire for ControllerIsStartedResponse {
5261 type Decoded<'de> = ControllerIsStartedResponse;
5262
5263 #[inline]
5264 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5265 ::fidl_next::munge! {
5266 let Self {
5267
5268 is_started,
5269
5270 } = &mut *out_;
5271 }
5272
5273 ::fidl_next::Wire::zero_padding(is_started);
5274 }
5275 }
5276
5277 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerIsStartedResponse
5278 where
5279 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5280 ___D: ::fidl_next::fuchsia::HandleDecoder,
5281 {
5282 fn decode(
5283 slot_: ::fidl_next::Slot<'_, Self>,
5284 decoder_: &mut ___D,
5285 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5286 ::fidl_next::munge! {
5287 let Self {
5288
5289 mut is_started,
5290
5291 } = slot_;
5292 }
5293
5294 ::fidl_next::Decode::decode(is_started.as_mut(), decoder_)?;
5295
5296 Ok(())
5297 }
5298 }
5299
5300 impl ::fidl_next::IntoNatural for ControllerIsStartedResponse {
5301 type Natural = crate::natural::ControllerIsStartedResponse;
5302 }
5303
5304 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
5306 #[repr(transparent)]
5307 pub struct Error {
5308 pub(crate) value: ::fidl_next::WireU32,
5309 }
5310
5311 unsafe impl ::fidl_next::Wire for Error {
5312 type Decoded<'de> = Self;
5313
5314 #[inline]
5315 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
5316 }
5318 }
5319
5320 impl Error {
5321 pub const INTERNAL: Error = Error { value: ::fidl_next::WireU32(1) };
5322
5323 pub const INVALID_ARGUMENTS: Error = Error { value: ::fidl_next::WireU32(2) };
5324
5325 pub const UNSUPPORTED: Error = Error { value: ::fidl_next::WireU32(3) };
5326
5327 pub const ACCESS_DENIED: Error = Error { value: ::fidl_next::WireU32(4) };
5328
5329 pub const INSTANCE_NOT_FOUND: Error = Error { value: ::fidl_next::WireU32(5) };
5330
5331 pub const INSTANCE_ALREADY_EXISTS: Error = Error { value: ::fidl_next::WireU32(6) };
5332
5333 pub const INSTANCE_CANNOT_START: Error = Error { value: ::fidl_next::WireU32(7) };
5334
5335 pub const INSTANCE_CANNOT_RESOLVE: Error = Error { value: ::fidl_next::WireU32(8) };
5336
5337 pub const COLLECTION_NOT_FOUND: Error = Error { value: ::fidl_next::WireU32(9) };
5338
5339 pub const RESOURCE_UNAVAILABLE: Error = Error { value: ::fidl_next::WireU32(10) };
5340
5341 pub const INSTANCE_DIED: Error = Error { value: ::fidl_next::WireU32(11) };
5342
5343 pub const RESOURCE_NOT_FOUND: Error = Error { value: ::fidl_next::WireU32(12) };
5344
5345 pub const INSTANCE_CANNOT_UNRESOLVE: Error = Error { value: ::fidl_next::WireU32(13) };
5346
5347 pub const INSTANCE_ALREADY_STARTED: Error = Error { value: ::fidl_next::WireU32(14) };
5348
5349 pub const DEPENDENCY_CYCLE: Error = Error { value: ::fidl_next::WireU32(15) };
5350 }
5351
5352 unsafe impl<___D> ::fidl_next::Decode<___D> for Error
5353 where
5354 ___D: ?Sized,
5355 {
5356 fn decode(
5357 slot: ::fidl_next::Slot<'_, Self>,
5358 _: &mut ___D,
5359 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5360 Ok(())
5361 }
5362 }
5363
5364 impl ::core::convert::From<crate::natural::Error> for Error {
5365 fn from(natural: crate::natural::Error) -> Self {
5366 match natural {
5367 crate::natural::Error::Internal => Error::INTERNAL,
5368
5369 crate::natural::Error::InvalidArguments => Error::INVALID_ARGUMENTS,
5370
5371 crate::natural::Error::Unsupported => Error::UNSUPPORTED,
5372
5373 crate::natural::Error::AccessDenied => Error::ACCESS_DENIED,
5374
5375 crate::natural::Error::InstanceNotFound => Error::INSTANCE_NOT_FOUND,
5376
5377 crate::natural::Error::InstanceAlreadyExists => Error::INSTANCE_ALREADY_EXISTS,
5378
5379 crate::natural::Error::InstanceCannotStart => Error::INSTANCE_CANNOT_START,
5380
5381 crate::natural::Error::InstanceCannotResolve => Error::INSTANCE_CANNOT_RESOLVE,
5382
5383 crate::natural::Error::CollectionNotFound => Error::COLLECTION_NOT_FOUND,
5384
5385 crate::natural::Error::ResourceUnavailable => Error::RESOURCE_UNAVAILABLE,
5386
5387 crate::natural::Error::InstanceDied => Error::INSTANCE_DIED,
5388
5389 crate::natural::Error::ResourceNotFound => Error::RESOURCE_NOT_FOUND,
5390
5391 crate::natural::Error::InstanceCannotUnresolve => Error::INSTANCE_CANNOT_UNRESOLVE,
5392
5393 crate::natural::Error::InstanceAlreadyStarted => Error::INSTANCE_ALREADY_STARTED,
5394
5395 crate::natural::Error::DependencyCycle => Error::DEPENDENCY_CYCLE,
5396
5397 crate::natural::Error::UnknownOrdinal_(value) => {
5398 Error { value: ::fidl_next::WireU32::from(value) }
5399 }
5400 }
5401 }
5402 }
5403
5404 impl ::fidl_next::IntoNatural for Error {
5405 type Natural = crate::natural::Error;
5406 }
5407
5408 #[derive(Debug)]
5410 #[repr(C)]
5411 pub struct ControllerGetExposedDictionaryResponse {
5412 pub dictionary: ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
5413 }
5414
5415 static_assertions::const_assert_eq!(
5416 std::mem::size_of::<ControllerGetExposedDictionaryResponse>(),
5417 4
5418 );
5419 static_assertions::const_assert_eq!(
5420 std::mem::align_of::<ControllerGetExposedDictionaryResponse>(),
5421 4
5422 );
5423
5424 static_assertions::const_assert_eq!(
5425 std::mem::offset_of!(ControllerGetExposedDictionaryResponse, dictionary),
5426 0
5427 );
5428
5429 unsafe impl ::fidl_next::Wire for ControllerGetExposedDictionaryResponse {
5430 type Decoded<'de> = ControllerGetExposedDictionaryResponse;
5431
5432 #[inline]
5433 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5434 ::fidl_next::munge! {
5435 let Self {
5436
5437 dictionary,
5438
5439 } = &mut *out_;
5440 }
5441
5442 ::fidl_next::Wire::zero_padding(dictionary);
5443 }
5444 }
5445
5446 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerGetExposedDictionaryResponse
5447 where
5448 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5449 ___D: ::fidl_next::fuchsia::HandleDecoder,
5450 {
5451 fn decode(
5452 slot_: ::fidl_next::Slot<'_, Self>,
5453 decoder_: &mut ___D,
5454 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5455 ::fidl_next::munge! {
5456 let Self {
5457
5458 mut dictionary,
5459
5460 } = slot_;
5461 }
5462
5463 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_)?;
5464
5465 Ok(())
5466 }
5467 }
5468
5469 impl ::fidl_next::IntoNatural for ControllerGetExposedDictionaryResponse {
5470 type Natural = crate::natural::ControllerGetExposedDictionaryResponse;
5471 }
5472
5473 pub type ControllerDestroyResponse = ();
5475
5476 #[repr(C)]
5478 pub struct NamespaceEntry<'de> {
5479 pub(crate) table: ::fidl_next::WireTable<'de>,
5480 }
5481
5482 impl<'de> Drop for NamespaceEntry<'de> {
5483 fn drop(&mut self) {
5484 let _ = self.table.get(1).map(|envelope| unsafe {
5485 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
5486 });
5487
5488 let _ = self.table.get(2).map(|envelope| unsafe {
5489 envelope.read_unchecked::<::fidl_next::ClientEnd<
5490 ::fidl_next_fuchsia_io::Directory,
5491 ::fidl_next::fuchsia::WireChannel,
5492 >>()
5493 });
5494 }
5495 }
5496
5497 unsafe impl ::fidl_next::Wire for NamespaceEntry<'static> {
5498 type Decoded<'de> = NamespaceEntry<'de>;
5499
5500 #[inline]
5501 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5502 ::fidl_next::munge!(let Self { table } = out);
5503 ::fidl_next::WireTable::zero_padding(table);
5504 }
5505 }
5506
5507 unsafe impl<___D> ::fidl_next::Decode<___D> for NamespaceEntry<'static>
5508 where
5509 ___D: ::fidl_next::Decoder + ?Sized,
5510 ___D: ::fidl_next::fuchsia::HandleDecoder,
5511 {
5512 fn decode(
5513 slot: ::fidl_next::Slot<'_, Self>,
5514 decoder: &mut ___D,
5515 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5516 ::fidl_next::munge!(let Self { table } = slot);
5517
5518 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5519 match ordinal {
5520 0 => unsafe { ::core::hint::unreachable_unchecked() },
5521
5522 1 => {
5523 ::fidl_next::WireEnvelope::decode_as::<
5524 ___D,
5525 ::fidl_next::WireString<'static>,
5526 >(slot.as_mut(), decoder)?;
5527
5528 let value = unsafe {
5529 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
5530 };
5531
5532 if value.len() > 4095 {
5533 return Err(::fidl_next::DecodeError::VectorTooLong {
5534 size: value.len() as u64,
5535 limit: 4095,
5536 });
5537 }
5538
5539 Ok(())
5540 }
5541
5542 2 => {
5543 ::fidl_next::WireEnvelope::decode_as::<
5544 ___D,
5545 ::fidl_next::ClientEnd<
5546 ::fidl_next_fuchsia_io::Directory,
5547 ::fidl_next::fuchsia::WireChannel,
5548 >,
5549 >(slot.as_mut(), decoder)?;
5550
5551 Ok(())
5552 }
5553
5554 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
5555 }
5556 })
5557 }
5558 }
5559
5560 impl<'de> NamespaceEntry<'de> {
5561 pub fn path(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
5562 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5563 }
5564
5565 pub fn directory(
5566 &self,
5567 ) -> ::core::option::Option<
5568 &::fidl_next::ClientEnd<
5569 ::fidl_next_fuchsia_io::Directory,
5570 ::fidl_next::fuchsia::WireChannel,
5571 >,
5572 > {
5573 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5574 }
5575 }
5576
5577 impl<'de> ::core::fmt::Debug for NamespaceEntry<'de> {
5578 fn fmt(
5579 &self,
5580 f: &mut ::core::fmt::Formatter<'_>,
5581 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5582 f.debug_struct("NamespaceEntry")
5583 .field("path", &self.path())
5584 .field("directory", &self.directory())
5585 .finish()
5586 }
5587 }
5588
5589 impl<'de> ::fidl_next::IntoNatural for NamespaceEntry<'de> {
5590 type Natural = crate::natural::NamespaceEntry;
5591 }
5592
5593 #[repr(C)]
5595 pub struct StartChildArgs<'de> {
5596 pub(crate) table: ::fidl_next::WireTable<'de>,
5597 }
5598
5599 impl<'de> Drop for StartChildArgs<'de> {
5600 fn drop(&mut self) {
5601 let _ = self.table.get(1)
5602 .map(|envelope| unsafe {
5603 envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>()
5604 });
5605
5606 let _ = self.table.get(2)
5607 .map(|envelope| unsafe {
5608 envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NamespaceEntry<'de>>>()
5609 });
5610
5611 let _ = self.table.get(3)
5612 .map(|envelope| unsafe {
5613 envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
5614 });
5615 }
5616 }
5617
5618 unsafe impl ::fidl_next::Wire for StartChildArgs<'static> {
5619 type Decoded<'de> = StartChildArgs<'de>;
5620
5621 #[inline]
5622 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5623 ::fidl_next::munge!(let Self { table } = out);
5624 ::fidl_next::WireTable::zero_padding(table);
5625 }
5626 }
5627
5628 unsafe impl<___D> ::fidl_next::Decode<___D> for StartChildArgs<'static>
5629 where
5630 ___D: ::fidl_next::Decoder + ?Sized,
5631 ___D: ::fidl_next::fuchsia::HandleDecoder,
5632 {
5633 fn decode(
5634 slot: ::fidl_next::Slot<'_, Self>,
5635 decoder: &mut ___D,
5636 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5637 ::fidl_next::munge!(let Self { table } = slot);
5638
5639 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5640 match ordinal {
5641 0 => unsafe { ::core::hint::unreachable_unchecked() },
5642
5643 1 => {
5644 ::fidl_next::WireEnvelope::decode_as::<
5645 ___D,
5646 ::fidl_next::WireVector<
5647 'static,
5648 ::fidl_next_fuchsia_process::wire::HandleInfo,
5649 >,
5650 >(slot.as_mut(), decoder)?;
5651
5652 let value = unsafe {
5653 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
5654 '_,
5655 ::fidl_next_fuchsia_process::wire::HandleInfo,
5656 >>()
5657 };
5658
5659 if value.len() > 128 {
5660 return Err(::fidl_next::DecodeError::VectorTooLong {
5661 size: value.len() as u64,
5662 limit: 128,
5663 });
5664 }
5665
5666 Ok(())
5667 }
5668
5669 2 => {
5670 ::fidl_next::WireEnvelope::decode_as::<
5671 ___D,
5672 ::fidl_next::WireVector<'static, crate::wire::NamespaceEntry<'static>>,
5673 >(slot.as_mut(), decoder)?;
5674
5675 let value = unsafe {
5676 slot
5677 .deref_unchecked()
5678 .deref_unchecked::<
5679 ::fidl_next::WireVector<'_, crate::wire::NamespaceEntry<'_>>
5680 >()
5681 };
5682
5683 if value.len() > 32 {
5684 return Err(::fidl_next::DecodeError::VectorTooLong {
5685 size: value.len() as u64,
5686 limit: 32,
5687 });
5688 }
5689
5690 Ok(())
5691 }
5692
5693 3 => {
5694 ::fidl_next::WireEnvelope::decode_as::<
5695 ___D,
5696 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
5697 >(slot.as_mut(), decoder)?;
5698
5699 Ok(())
5700 }
5701
5702 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
5703 }
5704 })
5705 }
5706 }
5707
5708 impl<'de> StartChildArgs<'de> {
5709 pub fn numbered_handles(
5710 &self,
5711 ) -> ::core::option::Option<
5712 &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
5713 > {
5714 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5715 }
5716
5717 pub fn namespace_entries(
5718 &self,
5719 ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::NamespaceEntry<'de>>>
5720 {
5721 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5722 }
5723
5724 pub fn dictionary(
5725 &self,
5726 ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
5727 {
5728 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
5729 }
5730 }
5731
5732 impl<'de> ::core::fmt::Debug for StartChildArgs<'de> {
5733 fn fmt(
5734 &self,
5735 f: &mut ::core::fmt::Formatter<'_>,
5736 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5737 f.debug_struct("StartChildArgs")
5738 .field("numbered_handles", &self.numbered_handles())
5739 .field("namespace_entries", &self.namespace_entries())
5740 .field("dictionary", &self.dictionary())
5741 .finish()
5742 }
5743 }
5744
5745 impl<'de> ::fidl_next::IntoNatural for StartChildArgs<'de> {
5746 type Natural = crate::natural::StartChildArgs;
5747 }
5748
5749 #[derive(Debug)]
5751 #[repr(C)]
5752 pub struct ControllerStartRequest<'de> {
5753 pub args: crate::wire::StartChildArgs<'de>,
5754
5755 pub execution_controller:
5756 ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::fuchsia::WireChannel>,
5757 }
5758
5759 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerStartRequest<'_>>(), 24);
5760 static_assertions::const_assert_eq!(std::mem::align_of::<ControllerStartRequest<'_>>(), 8);
5761
5762 static_assertions::const_assert_eq!(std::mem::offset_of!(ControllerStartRequest<'_>, args), 0);
5763
5764 static_assertions::const_assert_eq!(
5765 std::mem::offset_of!(ControllerStartRequest<'_>, execution_controller),
5766 16
5767 );
5768
5769 unsafe impl ::fidl_next::Wire for ControllerStartRequest<'static> {
5770 type Decoded<'de> = ControllerStartRequest<'de>;
5771
5772 #[inline]
5773 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5774 ::fidl_next::munge! {
5775 let Self {
5776
5777 args,
5778 execution_controller,
5779
5780 } = &mut *out_;
5781 }
5782
5783 ::fidl_next::Wire::zero_padding(args);
5784
5785 ::fidl_next::Wire::zero_padding(execution_controller);
5786
5787 unsafe {
5788 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
5789 }
5790 }
5791 }
5792
5793 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerStartRequest<'static>
5794 where
5795 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5796 ___D: ::fidl_next::Decoder,
5797 ___D: ::fidl_next::fuchsia::HandleDecoder,
5798 {
5799 fn decode(
5800 slot_: ::fidl_next::Slot<'_, Self>,
5801 decoder_: &mut ___D,
5802 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5803 ::fidl_next::munge! {
5804 let Self {
5805
5806 mut args,
5807 mut execution_controller,
5808
5809 } = slot_;
5810 }
5811
5812 ::fidl_next::Decode::decode(args.as_mut(), decoder_)?;
5813
5814 ::fidl_next::Decode::decode(execution_controller.as_mut(), decoder_)?;
5815
5816 Ok(())
5817 }
5818 }
5819
5820 impl<'de> ::fidl_next::IntoNatural for ControllerStartRequest<'de> {
5821 type Natural = crate::natural::ControllerStartRequest;
5822 }
5823
5824 #[repr(C)]
5826 pub struct CreateChildArgs<'de> {
5827 pub(crate) table: ::fidl_next::WireTable<'de>,
5828 }
5829
5830 impl<'de> Drop for CreateChildArgs<'de> {
5831 fn drop(&mut self) {
5832 let _ = self.table.get(1)
5833 .map(|envelope| unsafe {
5834 envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>>()
5835 });
5836
5837 let _ = self.table.get(2).map(|envelope| unsafe {
5838 envelope.read_unchecked::<::fidl_next::WireVector<
5839 'de,
5840 ::fidl_next_fuchsia_component_decl::wire::Offer<'de>,
5841 >>()
5842 });
5843
5844 let _ = self.table.get(3)
5845 .map(|envelope| unsafe {
5846 envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>>()
5847 });
5848
5849 let _ = self.table.get(4)
5850 .map(|envelope| unsafe {
5851 envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
5852 });
5853 }
5854 }
5855
5856 unsafe impl ::fidl_next::Wire for CreateChildArgs<'static> {
5857 type Decoded<'de> = CreateChildArgs<'de>;
5858
5859 #[inline]
5860 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5861 ::fidl_next::munge!(let Self { table } = out);
5862 ::fidl_next::WireTable::zero_padding(table);
5863 }
5864 }
5865
5866 unsafe impl<___D> ::fidl_next::Decode<___D> for CreateChildArgs<'static>
5867 where
5868 ___D: ::fidl_next::Decoder + ?Sized,
5869 ___D: ::fidl_next::fuchsia::HandleDecoder,
5870 {
5871 fn decode(
5872 slot: ::fidl_next::Slot<'_, Self>,
5873 decoder: &mut ___D,
5874 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5875 ::fidl_next::munge!(let Self { table } = slot);
5876
5877 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5878 match ordinal {
5879 0 => unsafe { ::core::hint::unreachable_unchecked() },
5880
5881 1 => {
5882 ::fidl_next::WireEnvelope::decode_as::<
5883 ___D,
5884 ::fidl_next::WireVector<
5885 'static,
5886 ::fidl_next_fuchsia_process::wire::HandleInfo,
5887 >,
5888 >(slot.as_mut(), decoder)?;
5889
5890 let value = unsafe {
5891 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
5892 '_,
5893 ::fidl_next_fuchsia_process::wire::HandleInfo,
5894 >>()
5895 };
5896
5897 if value.len() > 128 {
5898 return Err(::fidl_next::DecodeError::VectorTooLong {
5899 size: value.len() as u64,
5900 limit: 128,
5901 });
5902 }
5903
5904 Ok(())
5905 }
5906
5907 2 => {
5908 ::fidl_next::WireEnvelope::decode_as::<
5909 ___D,
5910 ::fidl_next::WireVector<
5911 'static,
5912 ::fidl_next_fuchsia_component_decl::wire::Offer<'static>,
5913 >,
5914 >(slot.as_mut(), decoder)?;
5915
5916 let value = unsafe {
5917 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
5918 '_,
5919 ::fidl_next_fuchsia_component_decl::wire::Offer<'_>,
5920 >>()
5921 };
5922
5923 if value.len() > 128 {
5924 return Err(::fidl_next::DecodeError::VectorTooLong {
5925 size: value.len() as u64,
5926 limit: 128,
5927 });
5928 }
5929
5930 Ok(())
5931 }
5932
5933 3 => {
5934 ::fidl_next::WireEnvelope::decode_as::<
5935 ___D,
5936 ::fidl_next::ServerEnd<
5937 crate::Controller,
5938 ::fidl_next::fuchsia::WireChannel,
5939 >,
5940 >(slot.as_mut(), decoder)?;
5941
5942 Ok(())
5943 }
5944
5945 4 => {
5946 ::fidl_next::WireEnvelope::decode_as::<
5947 ___D,
5948 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
5949 >(slot.as_mut(), decoder)?;
5950
5951 Ok(())
5952 }
5953
5954 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
5955 }
5956 })
5957 }
5958 }
5959
5960 impl<'de> CreateChildArgs<'de> {
5961 pub fn numbered_handles(
5962 &self,
5963 ) -> ::core::option::Option<
5964 &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::wire::HandleInfo>,
5965 > {
5966 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5967 }
5968
5969 pub fn dynamic_offers(
5970 &self,
5971 ) -> ::core::option::Option<
5972 &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::wire::Offer<'de>>,
5973 > {
5974 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5975 }
5976
5977 pub fn controller(
5978 &self,
5979 ) -> ::core::option::Option<
5980 &::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>,
5981 > {
5982 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
5983 }
5984
5985 pub fn dictionary(
5986 &self,
5987 ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
5988 {
5989 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
5990 }
5991 }
5992
5993 impl<'de> ::core::fmt::Debug for CreateChildArgs<'de> {
5994 fn fmt(
5995 &self,
5996 f: &mut ::core::fmt::Formatter<'_>,
5997 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5998 f.debug_struct("CreateChildArgs")
5999 .field("numbered_handles", &self.numbered_handles())
6000 .field("dynamic_offers", &self.dynamic_offers())
6001 .field("controller", &self.controller())
6002 .field("dictionary", &self.dictionary())
6003 .finish()
6004 }
6005 }
6006
6007 impl<'de> ::fidl_next::IntoNatural for CreateChildArgs<'de> {
6008 type Natural = crate::natural::CreateChildArgs;
6009 }
6010
6011 #[repr(C)]
6013 pub struct DebugStartedPayload<'de> {
6014 pub(crate) table: ::fidl_next::WireTable<'de>,
6015 }
6016
6017 impl<'de> Drop for DebugStartedPayload<'de> {
6018 fn drop(&mut self) {
6019 let _ = self.table.get(1).map(|envelope| unsafe {
6020 envelope.read_unchecked::<::fidl_next::ClientEnd<
6021 ::fidl_next_fuchsia_io::Directory,
6022 ::fidl_next::fuchsia::WireChannel,
6023 >>()
6024 });
6025
6026 let _ = self.table.get(2).map(|envelope| unsafe {
6027 envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
6028 });
6029 }
6030 }
6031
6032 unsafe impl ::fidl_next::Wire for DebugStartedPayload<'static> {
6033 type Decoded<'de> = DebugStartedPayload<'de>;
6034
6035 #[inline]
6036 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6037 ::fidl_next::munge!(let Self { table } = out);
6038 ::fidl_next::WireTable::zero_padding(table);
6039 }
6040 }
6041
6042 unsafe impl<___D> ::fidl_next::Decode<___D> for DebugStartedPayload<'static>
6043 where
6044 ___D: ::fidl_next::Decoder + ?Sized,
6045 ___D: ::fidl_next::fuchsia::HandleDecoder,
6046 {
6047 fn decode(
6048 slot: ::fidl_next::Slot<'_, Self>,
6049 decoder: &mut ___D,
6050 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6051 ::fidl_next::munge!(let Self { table } = slot);
6052
6053 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6054 match ordinal {
6055 0 => unsafe { ::core::hint::unreachable_unchecked() },
6056
6057 1 => {
6058 ::fidl_next::WireEnvelope::decode_as::<
6059 ___D,
6060 ::fidl_next::ClientEnd<
6061 ::fidl_next_fuchsia_io::Directory,
6062 ::fidl_next::fuchsia::WireChannel,
6063 >,
6064 >(slot.as_mut(), decoder)?;
6065
6066 Ok(())
6067 }
6068
6069 2 => {
6070 ::fidl_next::WireEnvelope::decode_as::<
6071 ___D,
6072 ::fidl_next::fuchsia::WireEventPair,
6073 >(slot.as_mut(), decoder)?;
6074
6075 Ok(())
6076 }
6077
6078 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6079 }
6080 })
6081 }
6082 }
6083
6084 impl<'de> DebugStartedPayload<'de> {
6085 pub fn runtime_dir(
6086 &self,
6087 ) -> ::core::option::Option<
6088 &::fidl_next::ClientEnd<
6089 ::fidl_next_fuchsia_io::Directory,
6090 ::fidl_next::fuchsia::WireChannel,
6091 >,
6092 > {
6093 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6094 }
6095
6096 pub fn break_on_start(
6097 &self,
6098 ) -> ::core::option::Option<&::fidl_next::fuchsia::WireEventPair> {
6099 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6100 }
6101 }
6102
6103 impl<'de> ::core::fmt::Debug for DebugStartedPayload<'de> {
6104 fn fmt(
6105 &self,
6106 f: &mut ::core::fmt::Formatter<'_>,
6107 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6108 f.debug_struct("DebugStartedPayload")
6109 .field("runtime_dir", &self.runtime_dir())
6110 .field("break_on_start", &self.break_on_start())
6111 .finish()
6112 }
6113 }
6114
6115 impl<'de> ::fidl_next::IntoNatural for DebugStartedPayload<'de> {
6116 type Natural = crate::natural::DebugStartedPayload;
6117 }
6118
6119 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6121 #[repr(transparent)]
6122 pub struct DeletionError {
6123 pub(crate) value: ::fidl_next::WireU32,
6124 }
6125
6126 unsafe impl ::fidl_next::Wire for DeletionError {
6127 type Decoded<'de> = Self;
6128
6129 #[inline]
6130 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6131 }
6133 }
6134
6135 impl DeletionError {
6136 pub const CONNECTION: DeletionError = DeletionError { value: ::fidl_next::WireU32(1) };
6137
6138 pub const PROTOCOL: DeletionError = DeletionError { value: ::fidl_next::WireU32(2) };
6139
6140 pub const NONE_AVAILABLE: DeletionError = DeletionError { value: ::fidl_next::WireU32(3) };
6141
6142 pub const UNSUPPORTED: DeletionError = DeletionError { value: ::fidl_next::WireU32(4) };
6143 }
6144
6145 unsafe impl<___D> ::fidl_next::Decode<___D> for DeletionError
6146 where
6147 ___D: ?Sized,
6148 {
6149 fn decode(
6150 slot: ::fidl_next::Slot<'_, Self>,
6151 _: &mut ___D,
6152 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6153 ::fidl_next::munge!(let Self { value } = slot);
6154
6155 match u32::from(*value) {
6156 1 | 2 | 3 | 4 => (),
6157 unknown => {
6158 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
6159 }
6160 }
6161
6162 Ok(())
6163 }
6164 }
6165
6166 impl ::core::convert::From<crate::natural::DeletionError> for DeletionError {
6167 fn from(natural: crate::natural::DeletionError) -> Self {
6168 match natural {
6169 crate::natural::DeletionError::Connection => DeletionError::CONNECTION,
6170
6171 crate::natural::DeletionError::Protocol => DeletionError::PROTOCOL,
6172
6173 crate::natural::DeletionError::NoneAvailable => DeletionError::NONE_AVAILABLE,
6174
6175 crate::natural::DeletionError::Unsupported => DeletionError::UNSUPPORTED,
6176 }
6177 }
6178 }
6179
6180 impl ::fidl_next::IntoNatural for DeletionError {
6181 type Natural = crate::natural::DeletionError;
6182 }
6183
6184 #[repr(C)]
6186 pub struct DestroyedPayload<'de> {
6187 pub(crate) table: ::fidl_next::WireTable<'de>,
6188 }
6189
6190 impl<'de> Drop for DestroyedPayload<'de> {
6191 fn drop(&mut self) {}
6192 }
6193
6194 unsafe impl ::fidl_next::Wire for DestroyedPayload<'static> {
6195 type Decoded<'de> = DestroyedPayload<'de>;
6196
6197 #[inline]
6198 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6199 ::fidl_next::munge!(let Self { table } = out);
6200 ::fidl_next::WireTable::zero_padding(table);
6201 }
6202 }
6203
6204 unsafe impl<___D> ::fidl_next::Decode<___D> for DestroyedPayload<'static>
6205 where
6206 ___D: ::fidl_next::Decoder + ?Sized,
6207 {
6208 fn decode(
6209 slot: ::fidl_next::Slot<'_, Self>,
6210 decoder: &mut ___D,
6211 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6212 ::fidl_next::munge!(let Self { table } = slot);
6213
6214 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6215 match ordinal {
6216 0 => unsafe { ::core::hint::unreachable_unchecked() },
6217
6218 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6219 }
6220 })
6221 }
6222 }
6223
6224 impl<'de> DestroyedPayload<'de> {}
6225
6226 impl<'de> ::core::fmt::Debug for DestroyedPayload<'de> {
6227 fn fmt(
6228 &self,
6229 f: &mut ::core::fmt::Formatter<'_>,
6230 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6231 f.debug_struct("DestroyedPayload").finish()
6232 }
6233 }
6234
6235 impl<'de> ::fidl_next::IntoNatural for DestroyedPayload<'de> {
6236 type Natural = crate::natural::DestroyedPayload;
6237 }
6238
6239 #[repr(C)]
6241 pub struct DiscoveredPayload<'de> {
6242 pub(crate) table: ::fidl_next::WireTable<'de>,
6243 }
6244
6245 impl<'de> Drop for DiscoveredPayload<'de> {
6246 fn drop(&mut self) {}
6247 }
6248
6249 unsafe impl ::fidl_next::Wire for DiscoveredPayload<'static> {
6250 type Decoded<'de> = DiscoveredPayload<'de>;
6251
6252 #[inline]
6253 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6254 ::fidl_next::munge!(let Self { table } = out);
6255 ::fidl_next::WireTable::zero_padding(table);
6256 }
6257 }
6258
6259 unsafe impl<___D> ::fidl_next::Decode<___D> for DiscoveredPayload<'static>
6260 where
6261 ___D: ::fidl_next::Decoder + ?Sized,
6262 {
6263 fn decode(
6264 slot: ::fidl_next::Slot<'_, Self>,
6265 decoder: &mut ___D,
6266 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6267 ::fidl_next::munge!(let Self { table } = slot);
6268
6269 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6270 match ordinal {
6271 0 => unsafe { ::core::hint::unreachable_unchecked() },
6272
6273 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6274 }
6275 })
6276 }
6277 }
6278
6279 impl<'de> DiscoveredPayload<'de> {}
6280
6281 impl<'de> ::core::fmt::Debug for DiscoveredPayload<'de> {
6282 fn fmt(
6283 &self,
6284 f: &mut ::core::fmt::Formatter<'_>,
6285 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6286 f.debug_struct("DiscoveredPayload").finish()
6287 }
6288 }
6289
6290 impl<'de> ::fidl_next::IntoNatural for DiscoveredPayload<'de> {
6291 type Natural = crate::natural::DiscoveredPayload;
6292 }
6293
6294 #[repr(C)]
6296 pub struct PurgedPayload<'de> {
6297 pub(crate) table: ::fidl_next::WireTable<'de>,
6298 }
6299
6300 impl<'de> Drop for PurgedPayload<'de> {
6301 fn drop(&mut self) {}
6302 }
6303
6304 unsafe impl ::fidl_next::Wire for PurgedPayload<'static> {
6305 type Decoded<'de> = PurgedPayload<'de>;
6306
6307 #[inline]
6308 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6309 ::fidl_next::munge!(let Self { table } = out);
6310 ::fidl_next::WireTable::zero_padding(table);
6311 }
6312 }
6313
6314 unsafe impl<___D> ::fidl_next::Decode<___D> for PurgedPayload<'static>
6315 where
6316 ___D: ::fidl_next::Decoder + ?Sized,
6317 {
6318 fn decode(
6319 slot: ::fidl_next::Slot<'_, Self>,
6320 decoder: &mut ___D,
6321 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6322 ::fidl_next::munge!(let Self { table } = slot);
6323
6324 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6325 match ordinal {
6326 0 => unsafe { ::core::hint::unreachable_unchecked() },
6327
6328 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6329 }
6330 })
6331 }
6332 }
6333
6334 impl<'de> PurgedPayload<'de> {}
6335
6336 impl<'de> ::core::fmt::Debug for PurgedPayload<'de> {
6337 fn fmt(
6338 &self,
6339 f: &mut ::core::fmt::Formatter<'_>,
6340 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6341 f.debug_struct("PurgedPayload").finish()
6342 }
6343 }
6344
6345 impl<'de> ::fidl_next::IntoNatural for PurgedPayload<'de> {
6346 type Natural = crate::natural::PurgedPayload;
6347 }
6348
6349 #[repr(C)]
6351 pub struct ResolvedPayload<'de> {
6352 pub(crate) table: ::fidl_next::WireTable<'de>,
6353 }
6354
6355 impl<'de> Drop for ResolvedPayload<'de> {
6356 fn drop(&mut self) {}
6357 }
6358
6359 unsafe impl ::fidl_next::Wire for ResolvedPayload<'static> {
6360 type Decoded<'de> = ResolvedPayload<'de>;
6361
6362 #[inline]
6363 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6364 ::fidl_next::munge!(let Self { table } = out);
6365 ::fidl_next::WireTable::zero_padding(table);
6366 }
6367 }
6368
6369 unsafe impl<___D> ::fidl_next::Decode<___D> for ResolvedPayload<'static>
6370 where
6371 ___D: ::fidl_next::Decoder + ?Sized,
6372 {
6373 fn decode(
6374 slot: ::fidl_next::Slot<'_, Self>,
6375 decoder: &mut ___D,
6376 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6377 ::fidl_next::munge!(let Self { table } = slot);
6378
6379 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6380 match ordinal {
6381 0 => unsafe { ::core::hint::unreachable_unchecked() },
6382
6383 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6384 }
6385 })
6386 }
6387 }
6388
6389 impl<'de> ResolvedPayload<'de> {}
6390
6391 impl<'de> ::core::fmt::Debug for ResolvedPayload<'de> {
6392 fn fmt(
6393 &self,
6394 f: &mut ::core::fmt::Formatter<'_>,
6395 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6396 f.debug_struct("ResolvedPayload").finish()
6397 }
6398 }
6399
6400 impl<'de> ::fidl_next::IntoNatural for ResolvedPayload<'de> {
6401 type Natural = crate::natural::ResolvedPayload;
6402 }
6403
6404 #[repr(C)]
6406 pub struct StartedPayload<'de> {
6407 pub(crate) table: ::fidl_next::WireTable<'de>,
6408 }
6409
6410 impl<'de> Drop for StartedPayload<'de> {
6411 fn drop(&mut self) {}
6412 }
6413
6414 unsafe impl ::fidl_next::Wire for StartedPayload<'static> {
6415 type Decoded<'de> = StartedPayload<'de>;
6416
6417 #[inline]
6418 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6419 ::fidl_next::munge!(let Self { table } = out);
6420 ::fidl_next::WireTable::zero_padding(table);
6421 }
6422 }
6423
6424 unsafe impl<___D> ::fidl_next::Decode<___D> for StartedPayload<'static>
6425 where
6426 ___D: ::fidl_next::Decoder + ?Sized,
6427 {
6428 fn decode(
6429 slot: ::fidl_next::Slot<'_, Self>,
6430 decoder: &mut ___D,
6431 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6432 ::fidl_next::munge!(let Self { table } = slot);
6433
6434 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6435 match ordinal {
6436 0 => unsafe { ::core::hint::unreachable_unchecked() },
6437
6438 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6439 }
6440 })
6441 }
6442 }
6443
6444 impl<'de> StartedPayload<'de> {}
6445
6446 impl<'de> ::core::fmt::Debug for StartedPayload<'de> {
6447 fn fmt(
6448 &self,
6449 f: &mut ::core::fmt::Formatter<'_>,
6450 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6451 f.debug_struct("StartedPayload").finish()
6452 }
6453 }
6454
6455 impl<'de> ::fidl_next::IntoNatural for StartedPayload<'de> {
6456 type Natural = crate::natural::StartedPayload;
6457 }
6458
6459 #[repr(C)]
6461 pub struct UnresolvedPayload<'de> {
6462 pub(crate) table: ::fidl_next::WireTable<'de>,
6463 }
6464
6465 impl<'de> Drop for UnresolvedPayload<'de> {
6466 fn drop(&mut self) {}
6467 }
6468
6469 unsafe impl ::fidl_next::Wire for UnresolvedPayload<'static> {
6470 type Decoded<'de> = UnresolvedPayload<'de>;
6471
6472 #[inline]
6473 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6474 ::fidl_next::munge!(let Self { table } = out);
6475 ::fidl_next::WireTable::zero_padding(table);
6476 }
6477 }
6478
6479 unsafe impl<___D> ::fidl_next::Decode<___D> for UnresolvedPayload<'static>
6480 where
6481 ___D: ::fidl_next::Decoder + ?Sized,
6482 {
6483 fn decode(
6484 slot: ::fidl_next::Slot<'_, Self>,
6485 decoder: &mut ___D,
6486 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6487 ::fidl_next::munge!(let Self { table } = slot);
6488
6489 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6490 match ordinal {
6491 0 => unsafe { ::core::hint::unreachable_unchecked() },
6492
6493 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6494 }
6495 })
6496 }
6497 }
6498
6499 impl<'de> UnresolvedPayload<'de> {}
6500
6501 impl<'de> ::core::fmt::Debug for UnresolvedPayload<'de> {
6502 fn fmt(
6503 &self,
6504 f: &mut ::core::fmt::Formatter<'_>,
6505 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6506 f.debug_struct("UnresolvedPayload").finish()
6507 }
6508 }
6509
6510 impl<'de> ::fidl_next::IntoNatural for UnresolvedPayload<'de> {
6511 type Natural = crate::natural::UnresolvedPayload;
6512 }
6513
6514 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6516 #[repr(transparent)]
6517 pub struct EventType {
6518 pub(crate) value: ::fidl_next::WireU32,
6519 }
6520
6521 unsafe impl ::fidl_next::Wire for EventType {
6522 type Decoded<'de> = Self;
6523
6524 #[inline]
6525 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6526 }
6528 }
6529
6530 impl EventType {
6531 pub const CAPABILITY_REQUESTED: EventType = EventType { value: ::fidl_next::WireU32(1) };
6532
6533 pub const DISCOVERED: EventType = EventType { value: ::fidl_next::WireU32(3) };
6534
6535 pub const DESTROYED: EventType = EventType { value: ::fidl_next::WireU32(4) };
6536
6537 pub const RESOLVED: EventType = EventType { value: ::fidl_next::WireU32(5) };
6538
6539 pub const STARTED: EventType = EventType { value: ::fidl_next::WireU32(6) };
6540
6541 pub const STOPPED: EventType = EventType { value: ::fidl_next::WireU32(7) };
6542
6543 pub const DEBUG_STARTED: EventType = EventType { value: ::fidl_next::WireU32(8) };
6544
6545 pub const UNRESOLVED: EventType = EventType { value: ::fidl_next::WireU32(9) };
6546 }
6547
6548 unsafe impl<___D> ::fidl_next::Decode<___D> for EventType
6549 where
6550 ___D: ?Sized,
6551 {
6552 fn decode(
6553 slot: ::fidl_next::Slot<'_, Self>,
6554 _: &mut ___D,
6555 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6556 ::fidl_next::munge!(let Self { value } = slot);
6557
6558 match u32::from(*value) {
6559 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 => (),
6560 unknown => {
6561 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
6562 }
6563 }
6564
6565 Ok(())
6566 }
6567 }
6568
6569 impl ::core::convert::From<crate::natural::EventType> for EventType {
6570 fn from(natural: crate::natural::EventType) -> Self {
6571 match natural {
6572 crate::natural::EventType::CapabilityRequested => EventType::CAPABILITY_REQUESTED,
6573
6574 crate::natural::EventType::Discovered => EventType::DISCOVERED,
6575
6576 crate::natural::EventType::Destroyed => EventType::DESTROYED,
6577
6578 crate::natural::EventType::Resolved => EventType::RESOLVED,
6579
6580 crate::natural::EventType::Started => EventType::STARTED,
6581
6582 crate::natural::EventType::Stopped => EventType::STOPPED,
6583
6584 crate::natural::EventType::DebugStarted => EventType::DEBUG_STARTED,
6585
6586 crate::natural::EventType::Unresolved => EventType::UNRESOLVED,
6587 }
6588 }
6589 }
6590
6591 impl ::fidl_next::IntoNatural for EventType {
6592 type Natural = crate::natural::EventType;
6593 }
6594
6595 #[repr(C)]
6597 pub struct StoppedPayload<'de> {
6598 pub(crate) table: ::fidl_next::WireTable<'de>,
6599 }
6600
6601 impl<'de> Drop for StoppedPayload<'de> {
6602 fn drop(&mut self) {
6603 let _ = self
6604 .table
6605 .get(1)
6606 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
6607
6608 let _ = self
6609 .table
6610 .get(2)
6611 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI64>() });
6612 }
6613 }
6614
6615 unsafe impl ::fidl_next::Wire for StoppedPayload<'static> {
6616 type Decoded<'de> = StoppedPayload<'de>;
6617
6618 #[inline]
6619 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6620 ::fidl_next::munge!(let Self { table } = out);
6621 ::fidl_next::WireTable::zero_padding(table);
6622 }
6623 }
6624
6625 unsafe impl<___D> ::fidl_next::Decode<___D> for StoppedPayload<'static>
6626 where
6627 ___D: ::fidl_next::Decoder + ?Sized,
6628 {
6629 fn decode(
6630 slot: ::fidl_next::Slot<'_, Self>,
6631 decoder: &mut ___D,
6632 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6633 ::fidl_next::munge!(let Self { table } = slot);
6634
6635 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6636 match ordinal {
6637 0 => unsafe { ::core::hint::unreachable_unchecked() },
6638
6639 1 => {
6640 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
6641 slot.as_mut(),
6642 decoder,
6643 )?;
6644
6645 Ok(())
6646 }
6647
6648 2 => {
6649 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI64>(
6650 slot.as_mut(),
6651 decoder,
6652 )?;
6653
6654 Ok(())
6655 }
6656
6657 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6658 }
6659 })
6660 }
6661 }
6662
6663 impl<'de> StoppedPayload<'de> {
6664 pub fn status(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
6665 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6666 }
6667
6668 pub fn exit_code(&self) -> ::core::option::Option<&::fidl_next::WireI64> {
6669 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6670 }
6671 }
6672
6673 impl<'de> ::core::fmt::Debug for StoppedPayload<'de> {
6674 fn fmt(
6675 &self,
6676 f: &mut ::core::fmt::Formatter<'_>,
6677 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6678 f.debug_struct("StoppedPayload")
6679 .field("status", &self.status())
6680 .field("exit_code", &self.exit_code())
6681 .finish()
6682 }
6683 }
6684
6685 impl<'de> ::fidl_next::IntoNatural for StoppedPayload<'de> {
6686 type Natural = crate::natural::StoppedPayload;
6687 }
6688
6689 #[repr(C)]
6691 pub struct EventHeader<'de> {
6692 pub(crate) table: ::fidl_next::WireTable<'de>,
6693 }
6694
6695 impl<'de> Drop for EventHeader<'de> {
6696 fn drop(&mut self) {
6697 let _ = self
6698 .table
6699 .get(1)
6700 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::EventType>() });
6701
6702 let _ = self.table.get(2).map(|envelope| unsafe {
6703 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
6704 });
6705
6706 let _ = self.table.get(3).map(|envelope| unsafe {
6707 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
6708 });
6709
6710 let _ = self
6711 .table
6712 .get(4)
6713 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI64>() });
6714 }
6715 }
6716
6717 unsafe impl ::fidl_next::Wire for EventHeader<'static> {
6718 type Decoded<'de> = EventHeader<'de>;
6719
6720 #[inline]
6721 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6722 ::fidl_next::munge!(let Self { table } = out);
6723 ::fidl_next::WireTable::zero_padding(table);
6724 }
6725 }
6726
6727 unsafe impl<___D> ::fidl_next::Decode<___D> for EventHeader<'static>
6728 where
6729 ___D: ::fidl_next::Decoder + ?Sized,
6730 {
6731 fn decode(
6732 slot: ::fidl_next::Slot<'_, Self>,
6733 decoder: &mut ___D,
6734 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6735 ::fidl_next::munge!(let Self { table } = slot);
6736
6737 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6738 match ordinal {
6739 0 => unsafe { ::core::hint::unreachable_unchecked() },
6740
6741 1 => {
6742 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::EventType>(
6743 slot.as_mut(),
6744 decoder,
6745 )?;
6746
6747 Ok(())
6748 }
6749
6750 2 => {
6751 ::fidl_next::WireEnvelope::decode_as::<
6752 ___D,
6753 ::fidl_next::WireString<'static>,
6754 >(slot.as_mut(), decoder)?;
6755
6756 let value = unsafe {
6757 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
6758 };
6759
6760 if value.len() > 4096 {
6761 return Err(::fidl_next::DecodeError::VectorTooLong {
6762 size: value.len() as u64,
6763 limit: 4096,
6764 });
6765 }
6766
6767 Ok(())
6768 }
6769
6770 3 => {
6771 ::fidl_next::WireEnvelope::decode_as::<
6772 ___D,
6773 ::fidl_next::WireString<'static>,
6774 >(slot.as_mut(), decoder)?;
6775
6776 let value = unsafe {
6777 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
6778 };
6779
6780 if value.len() > 4096 {
6781 return Err(::fidl_next::DecodeError::VectorTooLong {
6782 size: value.len() as u64,
6783 limit: 4096,
6784 });
6785 }
6786
6787 Ok(())
6788 }
6789
6790 4 => {
6791 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI64>(
6792 slot.as_mut(),
6793 decoder,
6794 )?;
6795
6796 Ok(())
6797 }
6798
6799 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6800 }
6801 })
6802 }
6803 }
6804
6805 impl<'de> EventHeader<'de> {
6806 pub fn event_type(&self) -> ::core::option::Option<&crate::wire::EventType> {
6807 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6808 }
6809
6810 pub fn moniker(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
6811 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6812 }
6813
6814 pub fn component_url(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
6815 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
6816 }
6817
6818 pub fn timestamp(&self) -> ::core::option::Option<&::fidl_next::WireI64> {
6819 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
6820 }
6821 }
6822
6823 impl<'de> ::core::fmt::Debug for EventHeader<'de> {
6824 fn fmt(
6825 &self,
6826 f: &mut ::core::fmt::Formatter<'_>,
6827 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6828 f.debug_struct("EventHeader")
6829 .field("event_type", &self.event_type())
6830 .field("moniker", &self.moniker())
6831 .field("component_url", &self.component_url())
6832 .field("timestamp", &self.timestamp())
6833 .finish()
6834 }
6835 }
6836
6837 impl<'de> ::fidl_next::IntoNatural for EventHeader<'de> {
6838 type Natural = crate::natural::EventHeader;
6839 }
6840
6841 #[repr(transparent)]
6843 pub struct EventPayload<'de> {
6844 pub(crate) raw: ::fidl_next::RawWireUnion,
6845 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
6846 }
6847
6848 impl<'de> Drop for EventPayload<'de> {
6849 fn drop(&mut self) {
6850 match self.raw.ordinal() {
6851 1 => {
6852 let _ = unsafe {
6853 self.raw
6854 .get()
6855 .read_unchecked::<crate::wire::CapabilityRequestedPayload<'de>>()
6856 };
6857 }
6858
6859 2 => {
6860 let _ = unsafe {
6861 self.raw.get().read_unchecked::<crate::wire::PurgedPayload<'de>>()
6862 };
6863 }
6864
6865 4 => {
6866 let _ = unsafe {
6867 self.raw.get().read_unchecked::<crate::wire::DiscoveredPayload<'de>>()
6868 };
6869 }
6870
6871 5 => {
6872 let _ = unsafe {
6873 self.raw.get().read_unchecked::<crate::wire::DestroyedPayload<'de>>()
6874 };
6875 }
6876
6877 6 => {
6878 let _ = unsafe {
6879 self.raw.get().read_unchecked::<crate::wire::ResolvedPayload<'de>>()
6880 };
6881 }
6882
6883 7 => {
6884 let _ = unsafe {
6885 self.raw.get().read_unchecked::<crate::wire::StartedPayload<'de>>()
6886 };
6887 }
6888
6889 8 => {
6890 let _ = unsafe {
6891 self.raw.get().read_unchecked::<crate::wire::StoppedPayload<'de>>()
6892 };
6893 }
6894
6895 9 => {
6896 let _ = unsafe {
6897 self.raw.get().read_unchecked::<crate::wire::DebugStartedPayload<'de>>()
6898 };
6899 }
6900
6901 10 => {
6902 let _ = unsafe {
6903 self.raw.get().read_unchecked::<crate::wire::UnresolvedPayload<'de>>()
6904 };
6905 }
6906
6907 _ => (),
6908 }
6909 }
6910 }
6911
6912 unsafe impl ::fidl_next::Wire for EventPayload<'static> {
6913 type Decoded<'de> = EventPayload<'de>;
6914
6915 #[inline]
6916 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6917 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6918 ::fidl_next::RawWireUnion::zero_padding(raw);
6919 }
6920 }
6921
6922 pub mod event_payload {
6923 pub enum Ref<'de> {
6924 CapabilityRequested(&'de crate::wire::CapabilityRequestedPayload<'de>),
6925
6926 Purged(&'de crate::wire::PurgedPayload<'de>),
6927
6928 Discovered(&'de crate::wire::DiscoveredPayload<'de>),
6929
6930 Destroyed(&'de crate::wire::DestroyedPayload<'de>),
6931
6932 Resolved(&'de crate::wire::ResolvedPayload<'de>),
6933
6934 Started(&'de crate::wire::StartedPayload<'de>),
6935
6936 Stopped(&'de crate::wire::StoppedPayload<'de>),
6937
6938 DebugStarted(&'de crate::wire::DebugStartedPayload<'de>),
6939
6940 Unresolved(&'de crate::wire::UnresolvedPayload<'de>),
6941
6942 UnknownOrdinal_(u64),
6943 }
6944 }
6945
6946 impl<'de> EventPayload<'de> {
6947 pub fn as_ref(&self) -> crate::wire::event_payload::Ref<'_> {
6948 match self.raw.ordinal() {
6949 1 => crate::wire::event_payload::Ref::CapabilityRequested(unsafe {
6950 self.raw.get().deref_unchecked::<crate::wire::CapabilityRequestedPayload<'_>>()
6951 }),
6952
6953 2 => crate::wire::event_payload::Ref::Purged(unsafe {
6954 self.raw.get().deref_unchecked::<crate::wire::PurgedPayload<'_>>()
6955 }),
6956
6957 4 => crate::wire::event_payload::Ref::Discovered(unsafe {
6958 self.raw.get().deref_unchecked::<crate::wire::DiscoveredPayload<'_>>()
6959 }),
6960
6961 5 => crate::wire::event_payload::Ref::Destroyed(unsafe {
6962 self.raw.get().deref_unchecked::<crate::wire::DestroyedPayload<'_>>()
6963 }),
6964
6965 6 => crate::wire::event_payload::Ref::Resolved(unsafe {
6966 self.raw.get().deref_unchecked::<crate::wire::ResolvedPayload<'_>>()
6967 }),
6968
6969 7 => crate::wire::event_payload::Ref::Started(unsafe {
6970 self.raw.get().deref_unchecked::<crate::wire::StartedPayload<'_>>()
6971 }),
6972
6973 8 => crate::wire::event_payload::Ref::Stopped(unsafe {
6974 self.raw.get().deref_unchecked::<crate::wire::StoppedPayload<'_>>()
6975 }),
6976
6977 9 => crate::wire::event_payload::Ref::DebugStarted(unsafe {
6978 self.raw.get().deref_unchecked::<crate::wire::DebugStartedPayload<'_>>()
6979 }),
6980
6981 10 => crate::wire::event_payload::Ref::Unresolved(unsafe {
6982 self.raw.get().deref_unchecked::<crate::wire::UnresolvedPayload<'_>>()
6983 }),
6984
6985 unknown => crate::wire::event_payload::Ref::UnknownOrdinal_(unknown),
6986 }
6987 }
6988 }
6989
6990 unsafe impl<___D> ::fidl_next::Decode<___D> for EventPayload<'static>
6991 where
6992 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6993 ___D: ::fidl_next::Decoder,
6994 ___D: ::fidl_next::fuchsia::HandleDecoder,
6995 {
6996 fn decode(
6997 mut slot: ::fidl_next::Slot<'_, Self>,
6998 decoder: &mut ___D,
6999 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7000 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7001 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
7002 1 => ::fidl_next::RawWireUnion::decode_as::<
7003 ___D,
7004 crate::wire::CapabilityRequestedPayload<'static>,
7005 >(raw, decoder)?,
7006
7007 2 => ::fidl_next::RawWireUnion::decode_as::<
7008 ___D,
7009 crate::wire::PurgedPayload<'static>,
7010 >(raw, decoder)?,
7011
7012 4 => ::fidl_next::RawWireUnion::decode_as::<
7013 ___D,
7014 crate::wire::DiscoveredPayload<'static>,
7015 >(raw, decoder)?,
7016
7017 5 => ::fidl_next::RawWireUnion::decode_as::<
7018 ___D,
7019 crate::wire::DestroyedPayload<'static>,
7020 >(raw, decoder)?,
7021
7022 6 => ::fidl_next::RawWireUnion::decode_as::<
7023 ___D,
7024 crate::wire::ResolvedPayload<'static>,
7025 >(raw, decoder)?,
7026
7027 7 => ::fidl_next::RawWireUnion::decode_as::<
7028 ___D,
7029 crate::wire::StartedPayload<'static>,
7030 >(raw, decoder)?,
7031
7032 8 => ::fidl_next::RawWireUnion::decode_as::<
7033 ___D,
7034 crate::wire::StoppedPayload<'static>,
7035 >(raw, decoder)?,
7036
7037 9 => ::fidl_next::RawWireUnion::decode_as::<
7038 ___D,
7039 crate::wire::DebugStartedPayload<'static>,
7040 >(raw, decoder)?,
7041
7042 10 => ::fidl_next::RawWireUnion::decode_as::<
7043 ___D,
7044 crate::wire::UnresolvedPayload<'static>,
7045 >(raw, decoder)?,
7046
7047 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
7048 }
7049
7050 Ok(())
7051 }
7052 }
7053
7054 impl<'de> ::core::fmt::Debug for EventPayload<'de> {
7055 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7056 match self.raw.ordinal() {
7057 1 => unsafe {
7058 self.raw
7059 .get()
7060 .deref_unchecked::<crate::wire::CapabilityRequestedPayload<'_>>()
7061 .fmt(f)
7062 },
7063 2 => unsafe {
7064 self.raw.get().deref_unchecked::<crate::wire::PurgedPayload<'_>>().fmt(f)
7065 },
7066 4 => unsafe {
7067 self.raw.get().deref_unchecked::<crate::wire::DiscoveredPayload<'_>>().fmt(f)
7068 },
7069 5 => unsafe {
7070 self.raw.get().deref_unchecked::<crate::wire::DestroyedPayload<'_>>().fmt(f)
7071 },
7072 6 => unsafe {
7073 self.raw.get().deref_unchecked::<crate::wire::ResolvedPayload<'_>>().fmt(f)
7074 },
7075 7 => unsafe {
7076 self.raw.get().deref_unchecked::<crate::wire::StartedPayload<'_>>().fmt(f)
7077 },
7078 8 => unsafe {
7079 self.raw.get().deref_unchecked::<crate::wire::StoppedPayload<'_>>().fmt(f)
7080 },
7081 9 => unsafe {
7082 self.raw.get().deref_unchecked::<crate::wire::DebugStartedPayload<'_>>().fmt(f)
7083 },
7084 10 => unsafe {
7085 self.raw.get().deref_unchecked::<crate::wire::UnresolvedPayload<'_>>().fmt(f)
7086 },
7087 _ => unsafe { ::core::hint::unreachable_unchecked() },
7088 }
7089 }
7090 }
7091
7092 impl<'de> ::fidl_next::IntoNatural for EventPayload<'de> {
7093 type Natural = crate::natural::EventPayload;
7094 }
7095
7096 #[repr(C)]
7098 pub struct Event<'de> {
7099 pub(crate) table: ::fidl_next::WireTable<'de>,
7100 }
7101
7102 impl<'de> Drop for Event<'de> {
7103 fn drop(&mut self) {
7104 let _ = self.table.get(1).map(|envelope| unsafe {
7105 envelope.read_unchecked::<crate::wire::EventHeader<'de>>()
7106 });
7107
7108 let _ = self.table.get(2).map(|envelope| unsafe {
7109 envelope.read_unchecked::<crate::wire::EventPayload<'de>>()
7110 });
7111 }
7112 }
7113
7114 unsafe impl ::fidl_next::Wire for Event<'static> {
7115 type Decoded<'de> = Event<'de>;
7116
7117 #[inline]
7118 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7119 ::fidl_next::munge!(let Self { table } = out);
7120 ::fidl_next::WireTable::zero_padding(table);
7121 }
7122 }
7123
7124 unsafe impl<___D> ::fidl_next::Decode<___D> for Event<'static>
7125 where
7126 ___D: ::fidl_next::Decoder + ?Sized,
7127 ___D: ::fidl_next::fuchsia::HandleDecoder,
7128 {
7129 fn decode(
7130 slot: ::fidl_next::Slot<'_, Self>,
7131 decoder: &mut ___D,
7132 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7133 ::fidl_next::munge!(let Self { table } = slot);
7134
7135 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7136 match ordinal {
7137 0 => unsafe { ::core::hint::unreachable_unchecked() },
7138
7139 1 => {
7140 ::fidl_next::WireEnvelope::decode_as::<
7141 ___D,
7142 crate::wire::EventHeader<'static>,
7143 >(slot.as_mut(), decoder)?;
7144
7145 Ok(())
7146 }
7147
7148 2 => {
7149 ::fidl_next::WireEnvelope::decode_as::<
7150 ___D,
7151 crate::wire::EventPayload<'static>,
7152 >(slot.as_mut(), decoder)?;
7153
7154 Ok(())
7155 }
7156
7157 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
7158 }
7159 })
7160 }
7161 }
7162
7163 impl<'de> Event<'de> {
7164 pub fn header(&self) -> ::core::option::Option<&crate::wire::EventHeader<'de>> {
7165 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7166 }
7167
7168 pub fn payload(&self) -> ::core::option::Option<&crate::wire::EventPayload<'de>> {
7169 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7170 }
7171 }
7172
7173 impl<'de> ::core::fmt::Debug for Event<'de> {
7174 fn fmt(
7175 &self,
7176 f: &mut ::core::fmt::Formatter<'_>,
7177 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7178 f.debug_struct("Event")
7179 .field("header", &self.header())
7180 .field("payload", &self.payload())
7181 .finish()
7182 }
7183 }
7184
7185 impl<'de> ::fidl_next::IntoNatural for Event<'de> {
7186 type Natural = crate::natural::Event;
7187 }
7188
7189 #[derive(Debug)]
7191 #[repr(C)]
7192 pub struct EventStreamGetNextResponse<'de> {
7193 pub events: ::fidl_next::WireVector<'de, crate::wire::Event<'de>>,
7194 }
7195
7196 static_assertions::const_assert_eq!(std::mem::size_of::<EventStreamGetNextResponse<'_>>(), 16);
7197 static_assertions::const_assert_eq!(std::mem::align_of::<EventStreamGetNextResponse<'_>>(), 8);
7198
7199 static_assertions::const_assert_eq!(
7200 std::mem::offset_of!(EventStreamGetNextResponse<'_>, events),
7201 0
7202 );
7203
7204 unsafe impl ::fidl_next::Wire for EventStreamGetNextResponse<'static> {
7205 type Decoded<'de> = EventStreamGetNextResponse<'de>;
7206
7207 #[inline]
7208 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7209 ::fidl_next::munge! {
7210 let Self {
7211
7212 events,
7213
7214 } = &mut *out_;
7215 }
7216
7217 ::fidl_next::Wire::zero_padding(events);
7218 }
7219 }
7220
7221 unsafe impl<___D> ::fidl_next::Decode<___D> for EventStreamGetNextResponse<'static>
7222 where
7223 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7224 ___D: ::fidl_next::Decoder,
7225 ___D: ::fidl_next::fuchsia::HandleDecoder,
7226 {
7227 fn decode(
7228 slot_: ::fidl_next::Slot<'_, Self>,
7229 decoder_: &mut ___D,
7230 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7231 ::fidl_next::munge! {
7232 let Self {
7233
7234 mut events,
7235
7236 } = slot_;
7237 }
7238
7239 ::fidl_next::Decode::decode(events.as_mut(), decoder_)?;
7240
7241 Ok(())
7242 }
7243 }
7244
7245 impl<'de> ::fidl_next::IntoNatural for EventStreamGetNextResponse<'de> {
7246 type Natural = crate::natural::EventStreamGetNextResponse;
7247 }
7248
7249 #[derive(Debug)]
7251 #[repr(C)]
7252 pub struct ExecutionControllerOnStopRequest<'de> {
7253 pub stopped_payload: crate::wire::StoppedPayload<'de>,
7254 }
7255
7256 static_assertions::const_assert_eq!(
7257 std::mem::size_of::<ExecutionControllerOnStopRequest<'_>>(),
7258 16
7259 );
7260 static_assertions::const_assert_eq!(
7261 std::mem::align_of::<ExecutionControllerOnStopRequest<'_>>(),
7262 8
7263 );
7264
7265 static_assertions::const_assert_eq!(
7266 std::mem::offset_of!(ExecutionControllerOnStopRequest<'_>, stopped_payload),
7267 0
7268 );
7269
7270 unsafe impl ::fidl_next::Wire for ExecutionControllerOnStopRequest<'static> {
7271 type Decoded<'de> = ExecutionControllerOnStopRequest<'de>;
7272
7273 #[inline]
7274 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7275 ::fidl_next::munge! {
7276 let Self {
7277
7278 stopped_payload,
7279
7280 } = &mut *out_;
7281 }
7282
7283 ::fidl_next::Wire::zero_padding(stopped_payload);
7284 }
7285 }
7286
7287 unsafe impl<___D> ::fidl_next::Decode<___D> for ExecutionControllerOnStopRequest<'static>
7288 where
7289 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7290 ___D: ::fidl_next::Decoder,
7291 {
7292 fn decode(
7293 slot_: ::fidl_next::Slot<'_, Self>,
7294 decoder_: &mut ___D,
7295 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7296 ::fidl_next::munge! {
7297 let Self {
7298
7299 mut stopped_payload,
7300
7301 } = slot_;
7302 }
7303
7304 ::fidl_next::Decode::decode(stopped_payload.as_mut(), decoder_)?;
7305
7306 Ok(())
7307 }
7308 }
7309
7310 impl<'de> ::fidl_next::IntoNatural for ExecutionControllerOnStopRequest<'de> {
7311 type Natural = crate::natural::ExecutionControllerOnStopRequest;
7312 }
7313
7314 #[derive(Debug)]
7316 #[repr(C)]
7317 pub struct IntrospectorGetMonikerRequest {
7318 pub component_instance: ::fidl_next::fuchsia::WireEvent,
7319 }
7320
7321 static_assertions::const_assert_eq!(std::mem::size_of::<IntrospectorGetMonikerRequest>(), 4);
7322 static_assertions::const_assert_eq!(std::mem::align_of::<IntrospectorGetMonikerRequest>(), 4);
7323
7324 static_assertions::const_assert_eq!(
7325 std::mem::offset_of!(IntrospectorGetMonikerRequest, component_instance),
7326 0
7327 );
7328
7329 unsafe impl ::fidl_next::Wire for IntrospectorGetMonikerRequest {
7330 type Decoded<'de> = IntrospectorGetMonikerRequest;
7331
7332 #[inline]
7333 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7334 ::fidl_next::munge! {
7335 let Self {
7336
7337 component_instance,
7338
7339 } = &mut *out_;
7340 }
7341
7342 ::fidl_next::Wire::zero_padding(component_instance);
7343 }
7344 }
7345
7346 unsafe impl<___D> ::fidl_next::Decode<___D> for IntrospectorGetMonikerRequest
7347 where
7348 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7349 ___D: ::fidl_next::fuchsia::HandleDecoder,
7350 {
7351 fn decode(
7352 slot_: ::fidl_next::Slot<'_, Self>,
7353 decoder_: &mut ___D,
7354 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7355 ::fidl_next::munge! {
7356 let Self {
7357
7358 mut component_instance,
7359
7360 } = slot_;
7361 }
7362
7363 ::fidl_next::Decode::decode(component_instance.as_mut(), decoder_)?;
7364
7365 Ok(())
7366 }
7367 }
7368
7369 impl ::fidl_next::IntoNatural for IntrospectorGetMonikerRequest {
7370 type Natural = crate::natural::IntrospectorGetMonikerRequest;
7371 }
7372
7373 #[derive(Debug)]
7375 #[repr(C)]
7376 pub struct IntrospectorGetMonikerResponse<'de> {
7377 pub moniker: ::fidl_next::WireString<'de>,
7378 }
7379
7380 static_assertions::const_assert_eq!(
7381 std::mem::size_of::<IntrospectorGetMonikerResponse<'_>>(),
7382 16
7383 );
7384 static_assertions::const_assert_eq!(
7385 std::mem::align_of::<IntrospectorGetMonikerResponse<'_>>(),
7386 8
7387 );
7388
7389 static_assertions::const_assert_eq!(
7390 std::mem::offset_of!(IntrospectorGetMonikerResponse<'_>, moniker),
7391 0
7392 );
7393
7394 unsafe impl ::fidl_next::Wire for IntrospectorGetMonikerResponse<'static> {
7395 type Decoded<'de> = IntrospectorGetMonikerResponse<'de>;
7396
7397 #[inline]
7398 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7399 ::fidl_next::munge! {
7400 let Self {
7401
7402 moniker,
7403
7404 } = &mut *out_;
7405 }
7406
7407 ::fidl_next::Wire::zero_padding(moniker);
7408 }
7409 }
7410
7411 unsafe impl<___D> ::fidl_next::Decode<___D> for IntrospectorGetMonikerResponse<'static>
7412 where
7413 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7414 ___D: ::fidl_next::Decoder,
7415 {
7416 fn decode(
7417 slot_: ::fidl_next::Slot<'_, Self>,
7418 decoder_: &mut ___D,
7419 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7420 ::fidl_next::munge! {
7421 let Self {
7422
7423 mut moniker,
7424
7425 } = slot_;
7426 }
7427
7428 ::fidl_next::Decode::decode(moniker.as_mut(), decoder_)?;
7429
7430 let moniker = unsafe { moniker.deref_unchecked() };
7431
7432 if moniker.len() > 4096 {
7433 return Err(::fidl_next::DecodeError::VectorTooLong {
7434 size: moniker.len() as u64,
7435 limit: 4096,
7436 });
7437 }
7438
7439 Ok(())
7440 }
7441 }
7442
7443 impl<'de> ::fidl_next::IntoNatural for IntrospectorGetMonikerResponse<'de> {
7444 type Natural = crate::natural::IntrospectorGetMonikerResponse;
7445 }
7446
7447 #[derive(Debug)]
7449 #[repr(C)]
7450 pub struct NamespaceInputEntry<'de> {
7451 pub path: ::fidl_next::WireString<'de>,
7452
7453 pub dictionary: ::fidl_next::ClientEnd<
7454 ::fidl_next_fuchsia_component_sandbox::Dictionary,
7455 ::fidl_next::fuchsia::WireChannel,
7456 >,
7457 }
7458
7459 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceInputEntry<'_>>(), 24);
7460 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceInputEntry<'_>>(), 8);
7461
7462 static_assertions::const_assert_eq!(std::mem::offset_of!(NamespaceInputEntry<'_>, path), 0);
7463
7464 static_assertions::const_assert_eq!(
7465 std::mem::offset_of!(NamespaceInputEntry<'_>, dictionary),
7466 16
7467 );
7468
7469 unsafe impl ::fidl_next::Wire for NamespaceInputEntry<'static> {
7470 type Decoded<'de> = NamespaceInputEntry<'de>;
7471
7472 #[inline]
7473 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7474 ::fidl_next::munge! {
7475 let Self {
7476
7477 path,
7478 dictionary,
7479
7480 } = &mut *out_;
7481 }
7482
7483 ::fidl_next::Wire::zero_padding(path);
7484
7485 ::fidl_next::Wire::zero_padding(dictionary);
7486
7487 unsafe {
7488 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
7489 }
7490 }
7491 }
7492
7493 unsafe impl<___D> ::fidl_next::Decode<___D> for NamespaceInputEntry<'static>
7494 where
7495 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7496 ___D: ::fidl_next::Decoder,
7497 ___D: ::fidl_next::fuchsia::HandleDecoder,
7498 {
7499 fn decode(
7500 slot_: ::fidl_next::Slot<'_, Self>,
7501 decoder_: &mut ___D,
7502 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7503 ::fidl_next::munge! {
7504 let Self {
7505
7506 mut path,
7507 mut dictionary,
7508
7509 } = slot_;
7510 }
7511
7512 ::fidl_next::Decode::decode(path.as_mut(), decoder_)?;
7513
7514 let path = unsafe { path.deref_unchecked() };
7515
7516 if path.len() > 4095 {
7517 return Err(::fidl_next::DecodeError::VectorTooLong {
7518 size: path.len() as u64,
7519 limit: 4095,
7520 });
7521 }
7522
7523 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_)?;
7524
7525 Ok(())
7526 }
7527 }
7528
7529 impl<'de> ::fidl_next::IntoNatural for NamespaceInputEntry<'de> {
7530 type Natural = crate::natural::NamespaceInputEntry;
7531 }
7532
7533 #[derive(Debug)]
7535 #[repr(C)]
7536 pub struct NamespaceCreateRequest<'de> {
7537 pub entries: ::fidl_next::WireVector<'de, crate::wire::NamespaceInputEntry<'de>>,
7538 }
7539
7540 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceCreateRequest<'_>>(), 16);
7541 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceCreateRequest<'_>>(), 8);
7542
7543 static_assertions::const_assert_eq!(
7544 std::mem::offset_of!(NamespaceCreateRequest<'_>, entries),
7545 0
7546 );
7547
7548 unsafe impl ::fidl_next::Wire for NamespaceCreateRequest<'static> {
7549 type Decoded<'de> = NamespaceCreateRequest<'de>;
7550
7551 #[inline]
7552 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7553 ::fidl_next::munge! {
7554 let Self {
7555
7556 entries,
7557
7558 } = &mut *out_;
7559 }
7560
7561 ::fidl_next::Wire::zero_padding(entries);
7562 }
7563 }
7564
7565 unsafe impl<___D> ::fidl_next::Decode<___D> for NamespaceCreateRequest<'static>
7566 where
7567 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7568 ___D: ::fidl_next::Decoder,
7569 ___D: ::fidl_next::fuchsia::HandleDecoder,
7570 {
7571 fn decode(
7572 slot_: ::fidl_next::Slot<'_, Self>,
7573 decoder_: &mut ___D,
7574 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7575 ::fidl_next::munge! {
7576 let Self {
7577
7578 mut entries,
7579
7580 } = slot_;
7581 }
7582
7583 ::fidl_next::Decode::decode(entries.as_mut(), decoder_)?;
7584
7585 Ok(())
7586 }
7587 }
7588
7589 impl<'de> ::fidl_next::IntoNatural for NamespaceCreateRequest<'de> {
7590 type Natural = crate::natural::NamespaceCreateRequest;
7591 }
7592
7593 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
7595 #[repr(transparent)]
7596 pub struct NamespaceError {
7597 pub(crate) value: ::fidl_next::WireU32,
7598 }
7599
7600 unsafe impl ::fidl_next::Wire for NamespaceError {
7601 type Decoded<'de> = Self;
7602
7603 #[inline]
7604 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
7605 }
7607 }
7608
7609 impl NamespaceError {
7610 pub const SHADOW: NamespaceError = NamespaceError { value: ::fidl_next::WireU32(1) };
7611
7612 pub const DUPLICATE: NamespaceError = NamespaceError { value: ::fidl_next::WireU32(2) };
7613
7614 pub const CONVERSION: NamespaceError = NamespaceError { value: ::fidl_next::WireU32(3) };
7615
7616 pub const BAD_ENTRY: NamespaceError = NamespaceError { value: ::fidl_next::WireU32(4) };
7617
7618 pub const DICTIONARY_READ: NamespaceError =
7619 NamespaceError { value: ::fidl_next::WireU32(5) };
7620 }
7621
7622 unsafe impl<___D> ::fidl_next::Decode<___D> for NamespaceError
7623 where
7624 ___D: ?Sized,
7625 {
7626 fn decode(
7627 slot: ::fidl_next::Slot<'_, Self>,
7628 _: &mut ___D,
7629 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7630 Ok(())
7631 }
7632 }
7633
7634 impl ::core::convert::From<crate::natural::NamespaceError> for NamespaceError {
7635 fn from(natural: crate::natural::NamespaceError) -> Self {
7636 match natural {
7637 crate::natural::NamespaceError::Shadow => NamespaceError::SHADOW,
7638
7639 crate::natural::NamespaceError::Duplicate => NamespaceError::DUPLICATE,
7640
7641 crate::natural::NamespaceError::Conversion => NamespaceError::CONVERSION,
7642
7643 crate::natural::NamespaceError::BadEntry => NamespaceError::BAD_ENTRY,
7644
7645 crate::natural::NamespaceError::DictionaryRead => NamespaceError::DICTIONARY_READ,
7646
7647 crate::natural::NamespaceError::UnknownOrdinal_(value) => {
7648 NamespaceError { value: ::fidl_next::WireU32::from(value) }
7649 }
7650 }
7651 }
7652 }
7653
7654 impl ::fidl_next::IntoNatural for NamespaceError {
7655 type Natural = crate::natural::NamespaceError;
7656 }
7657
7658 #[derive(Debug)]
7660 #[repr(C)]
7661 pub struct NamespaceCreateResponse<'de> {
7662 pub entries: ::fidl_next::WireVector<'de, crate::wire::NamespaceEntry<'de>>,
7663 }
7664
7665 static_assertions::const_assert_eq!(std::mem::size_of::<NamespaceCreateResponse<'_>>(), 16);
7666 static_assertions::const_assert_eq!(std::mem::align_of::<NamespaceCreateResponse<'_>>(), 8);
7667
7668 static_assertions::const_assert_eq!(
7669 std::mem::offset_of!(NamespaceCreateResponse<'_>, entries),
7670 0
7671 );
7672
7673 unsafe impl ::fidl_next::Wire for NamespaceCreateResponse<'static> {
7674 type Decoded<'de> = NamespaceCreateResponse<'de>;
7675
7676 #[inline]
7677 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7678 ::fidl_next::munge! {
7679 let Self {
7680
7681 entries,
7682
7683 } = &mut *out_;
7684 }
7685
7686 ::fidl_next::Wire::zero_padding(entries);
7687 }
7688 }
7689
7690 unsafe impl<___D> ::fidl_next::Decode<___D> for NamespaceCreateResponse<'static>
7691 where
7692 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7693 ___D: ::fidl_next::Decoder,
7694 ___D: ::fidl_next::fuchsia::HandleDecoder,
7695 {
7696 fn decode(
7697 slot_: ::fidl_next::Slot<'_, Self>,
7698 decoder_: &mut ___D,
7699 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7700 ::fidl_next::munge! {
7701 let Self {
7702
7703 mut entries,
7704
7705 } = slot_;
7706 }
7707
7708 ::fidl_next::Decode::decode(entries.as_mut(), decoder_)?;
7709
7710 Ok(())
7711 }
7712 }
7713
7714 impl<'de> ::fidl_next::IntoNatural for NamespaceCreateResponse<'de> {
7715 type Natural = crate::natural::NamespaceCreateResponse;
7716 }
7717
7718 pub type RealmOpenExposedDirResponse = ();
7720
7721 pub type RealmCreateChildResponse = ();
7723
7724 #[derive(Debug)]
7726 #[repr(C)]
7727 pub struct RealmDestroyChildRequest<'de> {
7728 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
7729 }
7730
7731 static_assertions::const_assert_eq!(std::mem::size_of::<RealmDestroyChildRequest<'_>>(), 32);
7732 static_assertions::const_assert_eq!(std::mem::align_of::<RealmDestroyChildRequest<'_>>(), 8);
7733
7734 static_assertions::const_assert_eq!(
7735 std::mem::offset_of!(RealmDestroyChildRequest<'_>, child),
7736 0
7737 );
7738
7739 unsafe impl ::fidl_next::Wire for RealmDestroyChildRequest<'static> {
7740 type Decoded<'de> = RealmDestroyChildRequest<'de>;
7741
7742 #[inline]
7743 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7744 ::fidl_next::munge! {
7745 let Self {
7746
7747 child,
7748
7749 } = &mut *out_;
7750 }
7751
7752 ::fidl_next::Wire::zero_padding(child);
7753 }
7754 }
7755
7756 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmDestroyChildRequest<'static>
7757 where
7758 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7759 ___D: ::fidl_next::Decoder,
7760 {
7761 fn decode(
7762 slot_: ::fidl_next::Slot<'_, Self>,
7763 decoder_: &mut ___D,
7764 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7765 ::fidl_next::munge! {
7766 let Self {
7767
7768 mut child,
7769
7770 } = slot_;
7771 }
7772
7773 ::fidl_next::Decode::decode(child.as_mut(), decoder_)?;
7774
7775 Ok(())
7776 }
7777 }
7778
7779 impl<'de> ::fidl_next::IntoNatural for RealmDestroyChildRequest<'de> {
7780 type Natural = crate::natural::RealmDestroyChildRequest;
7781 }
7782
7783 pub type RealmDestroyChildResponse = ();
7785
7786 #[derive(Debug)]
7788 #[repr(C)]
7789 pub struct RealmListChildrenRequest<'de> {
7790 pub collection: ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'de>,
7791
7792 pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::WireChannel>,
7793 }
7794
7795 static_assertions::const_assert_eq!(std::mem::size_of::<RealmListChildrenRequest<'_>>(), 24);
7796 static_assertions::const_assert_eq!(std::mem::align_of::<RealmListChildrenRequest<'_>>(), 8);
7797
7798 static_assertions::const_assert_eq!(
7799 std::mem::offset_of!(RealmListChildrenRequest<'_>, collection),
7800 0
7801 );
7802
7803 static_assertions::const_assert_eq!(
7804 std::mem::offset_of!(RealmListChildrenRequest<'_>, iter),
7805 16
7806 );
7807
7808 unsafe impl ::fidl_next::Wire for RealmListChildrenRequest<'static> {
7809 type Decoded<'de> = RealmListChildrenRequest<'de>;
7810
7811 #[inline]
7812 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7813 ::fidl_next::munge! {
7814 let Self {
7815
7816 collection,
7817 iter,
7818
7819 } = &mut *out_;
7820 }
7821
7822 ::fidl_next::Wire::zero_padding(collection);
7823
7824 ::fidl_next::Wire::zero_padding(iter);
7825
7826 unsafe {
7827 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
7828 }
7829 }
7830 }
7831
7832 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmListChildrenRequest<'static>
7833 where
7834 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7835 ___D: ::fidl_next::Decoder,
7836 ___D: ::fidl_next::fuchsia::HandleDecoder,
7837 {
7838 fn decode(
7839 slot_: ::fidl_next::Slot<'_, Self>,
7840 decoder_: &mut ___D,
7841 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7842 ::fidl_next::munge! {
7843 let Self {
7844
7845 mut collection,
7846 mut iter,
7847
7848 } = slot_;
7849 }
7850
7851 ::fidl_next::Decode::decode(collection.as_mut(), decoder_)?;
7852
7853 ::fidl_next::Decode::decode(iter.as_mut(), decoder_)?;
7854
7855 Ok(())
7856 }
7857 }
7858
7859 impl<'de> ::fidl_next::IntoNatural for RealmListChildrenRequest<'de> {
7860 type Natural = crate::natural::RealmListChildrenRequest;
7861 }
7862
7863 pub type RealmListChildrenResponse = ();
7865
7866 pub type RealmOpenControllerResponse = ();
7868
7869 #[derive(Debug)]
7871 #[repr(C)]
7872 pub struct RealmGetChildOutputDictionaryRequest<'de> {
7873 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
7874 }
7875
7876 static_assertions::const_assert_eq!(
7877 std::mem::size_of::<RealmGetChildOutputDictionaryRequest<'_>>(),
7878 32
7879 );
7880 static_assertions::const_assert_eq!(
7881 std::mem::align_of::<RealmGetChildOutputDictionaryRequest<'_>>(),
7882 8
7883 );
7884
7885 static_assertions::const_assert_eq!(
7886 std::mem::offset_of!(RealmGetChildOutputDictionaryRequest<'_>, child),
7887 0
7888 );
7889
7890 unsafe impl ::fidl_next::Wire for RealmGetChildOutputDictionaryRequest<'static> {
7891 type Decoded<'de> = RealmGetChildOutputDictionaryRequest<'de>;
7892
7893 #[inline]
7894 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7895 ::fidl_next::munge! {
7896 let Self {
7897
7898 child,
7899
7900 } = &mut *out_;
7901 }
7902
7903 ::fidl_next::Wire::zero_padding(child);
7904 }
7905 }
7906
7907 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmGetChildOutputDictionaryRequest<'static>
7908 where
7909 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7910 ___D: ::fidl_next::Decoder,
7911 ___D: ::fidl_next::fuchsia::HandleDecoder,
7912 {
7913 fn decode(
7914 slot_: ::fidl_next::Slot<'_, Self>,
7915 decoder_: &mut ___D,
7916 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7917 ::fidl_next::munge! {
7918 let Self {
7919
7920 mut child,
7921
7922 } = slot_;
7923 }
7924
7925 ::fidl_next::Decode::decode(child.as_mut(), decoder_)?;
7926
7927 Ok(())
7928 }
7929 }
7930
7931 impl<'de> ::fidl_next::IntoNatural for RealmGetChildOutputDictionaryRequest<'de> {
7932 type Natural = crate::natural::RealmGetChildOutputDictionaryRequest;
7933 }
7934
7935 #[derive(Debug)]
7937 #[repr(C)]
7938 pub struct RealmGetChildOutputDictionaryResponse {
7939 pub dictionary: ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
7940 }
7941
7942 static_assertions::const_assert_eq!(
7943 std::mem::size_of::<RealmGetChildOutputDictionaryResponse>(),
7944 4
7945 );
7946 static_assertions::const_assert_eq!(
7947 std::mem::align_of::<RealmGetChildOutputDictionaryResponse>(),
7948 4
7949 );
7950
7951 static_assertions::const_assert_eq!(
7952 std::mem::offset_of!(RealmGetChildOutputDictionaryResponse, dictionary),
7953 0
7954 );
7955
7956 unsafe impl ::fidl_next::Wire for RealmGetChildOutputDictionaryResponse {
7957 type Decoded<'de> = RealmGetChildOutputDictionaryResponse;
7958
7959 #[inline]
7960 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7961 ::fidl_next::munge! {
7962 let Self {
7963
7964 dictionary,
7965
7966 } = &mut *out_;
7967 }
7968
7969 ::fidl_next::Wire::zero_padding(dictionary);
7970 }
7971 }
7972
7973 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmGetChildOutputDictionaryResponse
7974 where
7975 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7976 ___D: ::fidl_next::fuchsia::HandleDecoder,
7977 {
7978 fn decode(
7979 slot_: ::fidl_next::Slot<'_, Self>,
7980 decoder_: &mut ___D,
7981 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7982 ::fidl_next::munge! {
7983 let Self {
7984
7985 mut dictionary,
7986
7987 } = slot_;
7988 }
7989
7990 ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_)?;
7991
7992 Ok(())
7993 }
7994 }
7995
7996 impl ::fidl_next::IntoNatural for RealmGetChildOutputDictionaryResponse {
7997 type Natural = crate::natural::RealmGetChildOutputDictionaryResponse;
7998 }
7999
8000 #[derive(Debug)]
8002 #[repr(C)]
8003 pub struct RealmOpenControllerRequest<'de> {
8004 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
8005
8006 pub controller:
8007 ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>,
8008 }
8009
8010 static_assertions::const_assert_eq!(std::mem::size_of::<RealmOpenControllerRequest<'_>>(), 40);
8011 static_assertions::const_assert_eq!(std::mem::align_of::<RealmOpenControllerRequest<'_>>(), 8);
8012
8013 static_assertions::const_assert_eq!(
8014 std::mem::offset_of!(RealmOpenControllerRequest<'_>, child),
8015 0
8016 );
8017
8018 static_assertions::const_assert_eq!(
8019 std::mem::offset_of!(RealmOpenControllerRequest<'_>, controller),
8020 32
8021 );
8022
8023 unsafe impl ::fidl_next::Wire for RealmOpenControllerRequest<'static> {
8024 type Decoded<'de> = RealmOpenControllerRequest<'de>;
8025
8026 #[inline]
8027 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8028 ::fidl_next::munge! {
8029 let Self {
8030
8031 child,
8032 controller,
8033
8034 } = &mut *out_;
8035 }
8036
8037 ::fidl_next::Wire::zero_padding(child);
8038
8039 ::fidl_next::Wire::zero_padding(controller);
8040
8041 unsafe {
8042 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
8043 }
8044 }
8045 }
8046
8047 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmOpenControllerRequest<'static>
8048 where
8049 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8050 ___D: ::fidl_next::Decoder,
8051 ___D: ::fidl_next::fuchsia::HandleDecoder,
8052 {
8053 fn decode(
8054 slot_: ::fidl_next::Slot<'_, Self>,
8055 decoder_: &mut ___D,
8056 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8057 ::fidl_next::munge! {
8058 let Self {
8059
8060 mut child,
8061 mut controller,
8062
8063 } = slot_;
8064 }
8065
8066 ::fidl_next::Decode::decode(child.as_mut(), decoder_)?;
8067
8068 ::fidl_next::Decode::decode(controller.as_mut(), decoder_)?;
8069
8070 Ok(())
8071 }
8072 }
8073
8074 impl<'de> ::fidl_next::IntoNatural for RealmOpenControllerRequest<'de> {
8075 type Natural = crate::natural::RealmOpenControllerRequest;
8076 }
8077
8078 #[derive(Debug)]
8080 #[repr(C)]
8081 pub struct RealmOpenExposedDirRequest<'de> {
8082 pub child: ::fidl_next_fuchsia_component_decl::wire::ChildRef<'de>,
8083
8084 pub exposed_dir: ::fidl_next::ServerEnd<
8085 ::fidl_next_fuchsia_io::Directory,
8086 ::fidl_next::fuchsia::WireChannel,
8087 >,
8088 }
8089
8090 static_assertions::const_assert_eq!(std::mem::size_of::<RealmOpenExposedDirRequest<'_>>(), 40);
8091 static_assertions::const_assert_eq!(std::mem::align_of::<RealmOpenExposedDirRequest<'_>>(), 8);
8092
8093 static_assertions::const_assert_eq!(
8094 std::mem::offset_of!(RealmOpenExposedDirRequest<'_>, child),
8095 0
8096 );
8097
8098 static_assertions::const_assert_eq!(
8099 std::mem::offset_of!(RealmOpenExposedDirRequest<'_>, exposed_dir),
8100 32
8101 );
8102
8103 unsafe impl ::fidl_next::Wire for RealmOpenExposedDirRequest<'static> {
8104 type Decoded<'de> = RealmOpenExposedDirRequest<'de>;
8105
8106 #[inline]
8107 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8108 ::fidl_next::munge! {
8109 let Self {
8110
8111 child,
8112 exposed_dir,
8113
8114 } = &mut *out_;
8115 }
8116
8117 ::fidl_next::Wire::zero_padding(child);
8118
8119 ::fidl_next::Wire::zero_padding(exposed_dir);
8120
8121 unsafe {
8122 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
8123 }
8124 }
8125 }
8126
8127 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmOpenExposedDirRequest<'static>
8128 where
8129 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8130 ___D: ::fidl_next::Decoder,
8131 ___D: ::fidl_next::fuchsia::HandleDecoder,
8132 {
8133 fn decode(
8134 slot_: ::fidl_next::Slot<'_, Self>,
8135 decoder_: &mut ___D,
8136 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8137 ::fidl_next::munge! {
8138 let Self {
8139
8140 mut child,
8141 mut exposed_dir,
8142
8143 } = slot_;
8144 }
8145
8146 ::fidl_next::Decode::decode(child.as_mut(), decoder_)?;
8147
8148 ::fidl_next::Decode::decode(exposed_dir.as_mut(), decoder_)?;
8149
8150 Ok(())
8151 }
8152 }
8153
8154 impl<'de> ::fidl_next::IntoNatural for RealmOpenExposedDirRequest<'de> {
8155 type Natural = crate::natural::RealmOpenExposedDirRequest;
8156 }
8157
8158 #[derive(Debug)]
8160 #[repr(C)]
8161 pub struct RealmCreateChildRequest<'de> {
8162 pub collection: ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'de>,
8163
8164 pub decl: ::fidl_next_fuchsia_component_decl::wire::Child<'de>,
8165
8166 pub args: crate::wire::CreateChildArgs<'de>,
8167 }
8168
8169 static_assertions::const_assert_eq!(std::mem::size_of::<RealmCreateChildRequest<'_>>(), 48);
8170 static_assertions::const_assert_eq!(std::mem::align_of::<RealmCreateChildRequest<'_>>(), 8);
8171
8172 static_assertions::const_assert_eq!(
8173 std::mem::offset_of!(RealmCreateChildRequest<'_>, collection),
8174 0
8175 );
8176
8177 static_assertions::const_assert_eq!(
8178 std::mem::offset_of!(RealmCreateChildRequest<'_>, decl),
8179 16
8180 );
8181
8182 static_assertions::const_assert_eq!(
8183 std::mem::offset_of!(RealmCreateChildRequest<'_>, args),
8184 32
8185 );
8186
8187 unsafe impl ::fidl_next::Wire for RealmCreateChildRequest<'static> {
8188 type Decoded<'de> = RealmCreateChildRequest<'de>;
8189
8190 #[inline]
8191 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8192 ::fidl_next::munge! {
8193 let Self {
8194
8195 collection,
8196 decl,
8197 args,
8198
8199 } = &mut *out_;
8200 }
8201
8202 ::fidl_next::Wire::zero_padding(collection);
8203
8204 ::fidl_next::Wire::zero_padding(decl);
8205
8206 ::fidl_next::Wire::zero_padding(args);
8207 }
8208 }
8209
8210 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmCreateChildRequest<'static>
8211 where
8212 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8213 ___D: ::fidl_next::Decoder,
8214 ___D: ::fidl_next::fuchsia::HandleDecoder,
8215 {
8216 fn decode(
8217 slot_: ::fidl_next::Slot<'_, Self>,
8218 decoder_: &mut ___D,
8219 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8220 ::fidl_next::munge! {
8221 let Self {
8222
8223 mut collection,
8224 mut decl,
8225 mut args,
8226
8227 } = slot_;
8228 }
8229
8230 ::fidl_next::Decode::decode(collection.as_mut(), decoder_)?;
8231
8232 ::fidl_next::Decode::decode(decl.as_mut(), decoder_)?;
8233
8234 ::fidl_next::Decode::decode(args.as_mut(), decoder_)?;
8235
8236 Ok(())
8237 }
8238 }
8239
8240 impl<'de> ::fidl_next::IntoNatural for RealmCreateChildRequest<'de> {
8241 type Natural = crate::natural::RealmCreateChildRequest;
8242 }
8243
8244 #[derive(Debug)]
8246 #[repr(C)]
8247 pub struct RealmGetResolvedInfoResponse<'de> {
8248 pub resolved_info: ::fidl_next_fuchsia_component_resolution::wire::Component<'de>,
8249 }
8250
8251 static_assertions::const_assert_eq!(
8252 std::mem::size_of::<RealmGetResolvedInfoResponse<'_>>(),
8253 16
8254 );
8255 static_assertions::const_assert_eq!(
8256 std::mem::align_of::<RealmGetResolvedInfoResponse<'_>>(),
8257 8
8258 );
8259
8260 static_assertions::const_assert_eq!(
8261 std::mem::offset_of!(RealmGetResolvedInfoResponse<'_>, resolved_info),
8262 0
8263 );
8264
8265 unsafe impl ::fidl_next::Wire for RealmGetResolvedInfoResponse<'static> {
8266 type Decoded<'de> = RealmGetResolvedInfoResponse<'de>;
8267
8268 #[inline]
8269 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8270 ::fidl_next::munge! {
8271 let Self {
8272
8273 resolved_info,
8274
8275 } = &mut *out_;
8276 }
8277
8278 ::fidl_next::Wire::zero_padding(resolved_info);
8279 }
8280 }
8281
8282 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmGetResolvedInfoResponse<'static>
8283 where
8284 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8285 ___D: ::fidl_next::Decoder,
8286 ___D: ::fidl_next::fuchsia::HandleDecoder,
8287 {
8288 fn decode(
8289 slot_: ::fidl_next::Slot<'_, Self>,
8290 decoder_: &mut ___D,
8291 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8292 ::fidl_next::munge! {
8293 let Self {
8294
8295 mut resolved_info,
8296
8297 } = slot_;
8298 }
8299
8300 ::fidl_next::Decode::decode(resolved_info.as_mut(), decoder_)?;
8301
8302 Ok(())
8303 }
8304 }
8305
8306 impl<'de> ::fidl_next::IntoNatural for RealmGetResolvedInfoResponse<'de> {
8307 type Natural = crate::natural::RealmGetResolvedInfoResponse;
8308 }
8309
8310 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
8312 #[repr(transparent)]
8313 pub struct StatusError {
8314 pub(crate) value: ::fidl_next::WireU32,
8315 }
8316
8317 unsafe impl ::fidl_next::Wire for StatusError {
8318 type Decoded<'de> = Self;
8319
8320 #[inline]
8321 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
8322 }
8324 }
8325
8326 impl StatusError {
8327 pub const PROVIDER: StatusError = StatusError { value: ::fidl_next::WireU32(1) };
8328
8329 pub const RESPONSE_INVALID: StatusError = StatusError { value: ::fidl_next::WireU32(2) };
8330
8331 pub const STATUS_UNKNOWN: StatusError = StatusError { value: ::fidl_next::WireU32(3) };
8332
8333 pub const UNSUPPORTED: StatusError = StatusError { value: ::fidl_next::WireU32(4) };
8334 }
8335
8336 unsafe impl<___D> ::fidl_next::Decode<___D> for StatusError
8337 where
8338 ___D: ?Sized,
8339 {
8340 fn decode(
8341 slot: ::fidl_next::Slot<'_, Self>,
8342 _: &mut ___D,
8343 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8344 ::fidl_next::munge!(let Self { value } = slot);
8345
8346 match u32::from(*value) {
8347 1 | 2 | 3 | 4 => (),
8348 unknown => {
8349 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
8350 }
8351 }
8352
8353 Ok(())
8354 }
8355 }
8356
8357 impl ::core::convert::From<crate::natural::StatusError> for StatusError {
8358 fn from(natural: crate::natural::StatusError) -> Self {
8359 match natural {
8360 crate::natural::StatusError::Provider => StatusError::PROVIDER,
8361
8362 crate::natural::StatusError::ResponseInvalid => StatusError::RESPONSE_INVALID,
8363
8364 crate::natural::StatusError::StatusUnknown => StatusError::STATUS_UNKNOWN,
8365
8366 crate::natural::StatusError::Unsupported => StatusError::UNSUPPORTED,
8367 }
8368 }
8369 }
8370
8371 impl ::fidl_next::IntoNatural for StatusError {
8372 type Natural = crate::natural::StatusError;
8373 }
8374
8375 pub type StorageAdminOpenStorageResponse = ();
8377
8378 #[derive(Debug)]
8380 #[repr(C)]
8381 pub struct StorageAdminListStorageInRealmRequest<'de> {
8382 pub relative_moniker: ::fidl_next::WireString<'de>,
8383
8384 pub iterator:
8385 ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::fuchsia::WireChannel>,
8386 }
8387
8388 static_assertions::const_assert_eq!(
8389 std::mem::size_of::<StorageAdminListStorageInRealmRequest<'_>>(),
8390 24
8391 );
8392 static_assertions::const_assert_eq!(
8393 std::mem::align_of::<StorageAdminListStorageInRealmRequest<'_>>(),
8394 8
8395 );
8396
8397 static_assertions::const_assert_eq!(
8398 std::mem::offset_of!(StorageAdminListStorageInRealmRequest<'_>, relative_moniker),
8399 0
8400 );
8401
8402 static_assertions::const_assert_eq!(
8403 std::mem::offset_of!(StorageAdminListStorageInRealmRequest<'_>, iterator),
8404 16
8405 );
8406
8407 unsafe impl ::fidl_next::Wire for StorageAdminListStorageInRealmRequest<'static> {
8408 type Decoded<'de> = StorageAdminListStorageInRealmRequest<'de>;
8409
8410 #[inline]
8411 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8412 ::fidl_next::munge! {
8413 let Self {
8414
8415 relative_moniker,
8416 iterator,
8417
8418 } = &mut *out_;
8419 }
8420
8421 ::fidl_next::Wire::zero_padding(relative_moniker);
8422
8423 ::fidl_next::Wire::zero_padding(iterator);
8424
8425 unsafe {
8426 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
8427 }
8428 }
8429 }
8430
8431 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminListStorageInRealmRequest<'static>
8432 where
8433 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8434 ___D: ::fidl_next::Decoder,
8435 ___D: ::fidl_next::fuchsia::HandleDecoder,
8436 {
8437 fn decode(
8438 slot_: ::fidl_next::Slot<'_, Self>,
8439 decoder_: &mut ___D,
8440 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8441 ::fidl_next::munge! {
8442 let Self {
8443
8444 mut relative_moniker,
8445 mut iterator,
8446
8447 } = slot_;
8448 }
8449
8450 ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_)?;
8451
8452 let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
8453
8454 if relative_moniker.len() > 4096 {
8455 return Err(::fidl_next::DecodeError::VectorTooLong {
8456 size: relative_moniker.len() as u64,
8457 limit: 4096,
8458 });
8459 }
8460
8461 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_)?;
8462
8463 Ok(())
8464 }
8465 }
8466
8467 impl<'de> ::fidl_next::IntoNatural for StorageAdminListStorageInRealmRequest<'de> {
8468 type Natural = crate::natural::StorageAdminListStorageInRealmRequest;
8469 }
8470
8471 pub type StorageAdminListStorageInRealmResponse = ();
8473
8474 pub type StorageAdminOpenComponentStorageByIdResponse = ();
8476
8477 #[derive(Debug)]
8479 #[repr(C)]
8480 pub struct StorageAdminDeleteComponentStorageRequest<'de> {
8481 pub relative_moniker: ::fidl_next::WireString<'de>,
8482 }
8483
8484 static_assertions::const_assert_eq!(
8485 std::mem::size_of::<StorageAdminDeleteComponentStorageRequest<'_>>(),
8486 16
8487 );
8488 static_assertions::const_assert_eq!(
8489 std::mem::align_of::<StorageAdminDeleteComponentStorageRequest<'_>>(),
8490 8
8491 );
8492
8493 static_assertions::const_assert_eq!(
8494 std::mem::offset_of!(StorageAdminDeleteComponentStorageRequest<'_>, relative_moniker),
8495 0
8496 );
8497
8498 unsafe impl ::fidl_next::Wire for StorageAdminDeleteComponentStorageRequest<'static> {
8499 type Decoded<'de> = StorageAdminDeleteComponentStorageRequest<'de>;
8500
8501 #[inline]
8502 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8503 ::fidl_next::munge! {
8504 let Self {
8505
8506 relative_moniker,
8507
8508 } = &mut *out_;
8509 }
8510
8511 ::fidl_next::Wire::zero_padding(relative_moniker);
8512 }
8513 }
8514
8515 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminDeleteComponentStorageRequest<'static>
8516 where
8517 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8518 ___D: ::fidl_next::Decoder,
8519 {
8520 fn decode(
8521 slot_: ::fidl_next::Slot<'_, Self>,
8522 decoder_: &mut ___D,
8523 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8524 ::fidl_next::munge! {
8525 let Self {
8526
8527 mut relative_moniker,
8528
8529 } = slot_;
8530 }
8531
8532 ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_)?;
8533
8534 let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
8535
8536 if relative_moniker.len() > 4096 {
8537 return Err(::fidl_next::DecodeError::VectorTooLong {
8538 size: relative_moniker.len() as u64,
8539 limit: 4096,
8540 });
8541 }
8542
8543 Ok(())
8544 }
8545 }
8546
8547 impl<'de> ::fidl_next::IntoNatural for StorageAdminDeleteComponentStorageRequest<'de> {
8548 type Natural = crate::natural::StorageAdminDeleteComponentStorageRequest;
8549 }
8550
8551 pub type StorageAdminDeleteComponentStorageResponse = ();
8553
8554 #[repr(C)]
8556 pub struct StorageStatus<'de> {
8557 pub(crate) table: ::fidl_next::WireTable<'de>,
8558 }
8559
8560 impl<'de> Drop for StorageStatus<'de> {
8561 fn drop(&mut self) {
8562 let _ = self
8563 .table
8564 .get(1)
8565 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
8566
8567 let _ = self
8568 .table
8569 .get(2)
8570 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
8571 }
8572 }
8573
8574 unsafe impl ::fidl_next::Wire for StorageStatus<'static> {
8575 type Decoded<'de> = StorageStatus<'de>;
8576
8577 #[inline]
8578 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8579 ::fidl_next::munge!(let Self { table } = out);
8580 ::fidl_next::WireTable::zero_padding(table);
8581 }
8582 }
8583
8584 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageStatus<'static>
8585 where
8586 ___D: ::fidl_next::Decoder + ?Sized,
8587 {
8588 fn decode(
8589 slot: ::fidl_next::Slot<'_, Self>,
8590 decoder: &mut ___D,
8591 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8592 ::fidl_next::munge!(let Self { table } = slot);
8593
8594 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8595 match ordinal {
8596 0 => unsafe { ::core::hint::unreachable_unchecked() },
8597
8598 1 => {
8599 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
8600 slot.as_mut(),
8601 decoder,
8602 )?;
8603
8604 Ok(())
8605 }
8606
8607 2 => {
8608 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
8609 slot.as_mut(),
8610 decoder,
8611 )?;
8612
8613 Ok(())
8614 }
8615
8616 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
8617 }
8618 })
8619 }
8620 }
8621
8622 impl<'de> StorageStatus<'de> {
8623 pub fn total_size(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
8624 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8625 }
8626
8627 pub fn used_size(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
8628 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
8629 }
8630 }
8631
8632 impl<'de> ::core::fmt::Debug for StorageStatus<'de> {
8633 fn fmt(
8634 &self,
8635 f: &mut ::core::fmt::Formatter<'_>,
8636 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8637 f.debug_struct("StorageStatus")
8638 .field("total_size", &self.total_size())
8639 .field("used_size", &self.used_size())
8640 .finish()
8641 }
8642 }
8643
8644 impl<'de> ::fidl_next::IntoNatural for StorageStatus<'de> {
8645 type Natural = crate::natural::StorageStatus;
8646 }
8647
8648 pub type StorageAdminDeleteAllStorageContentsResponse = ();
8650
8651 #[derive(Debug)]
8653 #[repr(C)]
8654 pub struct StorageAdminOpenStorageRequest<'de> {
8655 pub relative_moniker: ::fidl_next::WireString<'de>,
8656
8657 pub object:
8658 ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::WireChannel>,
8659 }
8660
8661 static_assertions::const_assert_eq!(
8662 std::mem::size_of::<StorageAdminOpenStorageRequest<'_>>(),
8663 24
8664 );
8665 static_assertions::const_assert_eq!(
8666 std::mem::align_of::<StorageAdminOpenStorageRequest<'_>>(),
8667 8
8668 );
8669
8670 static_assertions::const_assert_eq!(
8671 std::mem::offset_of!(StorageAdminOpenStorageRequest<'_>, relative_moniker),
8672 0
8673 );
8674
8675 static_assertions::const_assert_eq!(
8676 std::mem::offset_of!(StorageAdminOpenStorageRequest<'_>, object),
8677 16
8678 );
8679
8680 unsafe impl ::fidl_next::Wire for StorageAdminOpenStorageRequest<'static> {
8681 type Decoded<'de> = StorageAdminOpenStorageRequest<'de>;
8682
8683 #[inline]
8684 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8685 ::fidl_next::munge! {
8686 let Self {
8687
8688 relative_moniker,
8689 object,
8690
8691 } = &mut *out_;
8692 }
8693
8694 ::fidl_next::Wire::zero_padding(relative_moniker);
8695
8696 ::fidl_next::Wire::zero_padding(object);
8697
8698 unsafe {
8699 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
8700 }
8701 }
8702 }
8703
8704 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminOpenStorageRequest<'static>
8705 where
8706 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8707 ___D: ::fidl_next::Decoder,
8708 ___D: ::fidl_next::fuchsia::HandleDecoder,
8709 {
8710 fn decode(
8711 slot_: ::fidl_next::Slot<'_, Self>,
8712 decoder_: &mut ___D,
8713 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8714 ::fidl_next::munge! {
8715 let Self {
8716
8717 mut relative_moniker,
8718 mut object,
8719
8720 } = slot_;
8721 }
8722
8723 ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_)?;
8724
8725 let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
8726
8727 if relative_moniker.len() > 4096 {
8728 return Err(::fidl_next::DecodeError::VectorTooLong {
8729 size: relative_moniker.len() as u64,
8730 limit: 4096,
8731 });
8732 }
8733
8734 ::fidl_next::Decode::decode(object.as_mut(), decoder_)?;
8735
8736 Ok(())
8737 }
8738 }
8739
8740 impl<'de> ::fidl_next::IntoNatural for StorageAdminOpenStorageRequest<'de> {
8741 type Natural = crate::natural::StorageAdminOpenStorageRequest;
8742 }
8743
8744 #[derive(Debug)]
8746 #[repr(C)]
8747 pub struct StorageAdminOpenComponentStorageByIdRequest<'de> {
8748 pub id: ::fidl_next::WireString<'de>,
8749
8750 pub object:
8751 ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::WireChannel>,
8752 }
8753
8754 static_assertions::const_assert_eq!(
8755 std::mem::size_of::<StorageAdminOpenComponentStorageByIdRequest<'_>>(),
8756 24
8757 );
8758 static_assertions::const_assert_eq!(
8759 std::mem::align_of::<StorageAdminOpenComponentStorageByIdRequest<'_>>(),
8760 8
8761 );
8762
8763 static_assertions::const_assert_eq!(
8764 std::mem::offset_of!(StorageAdminOpenComponentStorageByIdRequest<'_>, id),
8765 0
8766 );
8767
8768 static_assertions::const_assert_eq!(
8769 std::mem::offset_of!(StorageAdminOpenComponentStorageByIdRequest<'_>, object),
8770 16
8771 );
8772
8773 unsafe impl ::fidl_next::Wire for StorageAdminOpenComponentStorageByIdRequest<'static> {
8774 type Decoded<'de> = StorageAdminOpenComponentStorageByIdRequest<'de>;
8775
8776 #[inline]
8777 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8778 ::fidl_next::munge! {
8779 let Self {
8780
8781 id,
8782 object,
8783
8784 } = &mut *out_;
8785 }
8786
8787 ::fidl_next::Wire::zero_padding(id);
8788
8789 ::fidl_next::Wire::zero_padding(object);
8790
8791 unsafe {
8792 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
8793 }
8794 }
8795 }
8796
8797 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminOpenComponentStorageByIdRequest<'static>
8798 where
8799 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8800 ___D: ::fidl_next::Decoder,
8801 ___D: ::fidl_next::fuchsia::HandleDecoder,
8802 {
8803 fn decode(
8804 slot_: ::fidl_next::Slot<'_, Self>,
8805 decoder_: &mut ___D,
8806 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8807 ::fidl_next::munge! {
8808 let Self {
8809
8810 mut id,
8811 mut object,
8812
8813 } = slot_;
8814 }
8815
8816 ::fidl_next::Decode::decode(id.as_mut(), decoder_)?;
8817
8818 let id = unsafe { id.deref_unchecked() };
8819
8820 if id.len() > 64 {
8821 return Err(::fidl_next::DecodeError::VectorTooLong {
8822 size: id.len() as u64,
8823 limit: 64,
8824 });
8825 }
8826
8827 ::fidl_next::Decode::decode(object.as_mut(), decoder_)?;
8828
8829 Ok(())
8830 }
8831 }
8832
8833 impl<'de> ::fidl_next::IntoNatural for StorageAdminOpenComponentStorageByIdRequest<'de> {
8834 type Natural = crate::natural::StorageAdminOpenComponentStorageByIdRequest;
8835 }
8836
8837 #[derive(Debug)]
8839 #[repr(C)]
8840 pub struct StorageIteratorNextResponse<'de> {
8841 pub relative_monikers: ::fidl_next::WireVector<'de, ::fidl_next::WireString<'de>>,
8842 }
8843
8844 static_assertions::const_assert_eq!(std::mem::size_of::<StorageIteratorNextResponse<'_>>(), 16);
8845 static_assertions::const_assert_eq!(std::mem::align_of::<StorageIteratorNextResponse<'_>>(), 8);
8846
8847 static_assertions::const_assert_eq!(
8848 std::mem::offset_of!(StorageIteratorNextResponse<'_>, relative_monikers),
8849 0
8850 );
8851
8852 unsafe impl ::fidl_next::Wire for StorageIteratorNextResponse<'static> {
8853 type Decoded<'de> = StorageIteratorNextResponse<'de>;
8854
8855 #[inline]
8856 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8857 ::fidl_next::munge! {
8858 let Self {
8859
8860 relative_monikers,
8861
8862 } = &mut *out_;
8863 }
8864
8865 ::fidl_next::Wire::zero_padding(relative_monikers);
8866 }
8867 }
8868
8869 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageIteratorNextResponse<'static>
8870 where
8871 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8872 ___D: ::fidl_next::Decoder,
8873 {
8874 fn decode(
8875 slot_: ::fidl_next::Slot<'_, Self>,
8876 decoder_: &mut ___D,
8877 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8878 ::fidl_next::munge! {
8879 let Self {
8880
8881 mut relative_monikers,
8882
8883 } = slot_;
8884 }
8885
8886 ::fidl_next::Decode::decode(relative_monikers.as_mut(), decoder_)?;
8887
8888 Ok(())
8889 }
8890 }
8891
8892 impl<'de> ::fidl_next::IntoNatural for StorageIteratorNextResponse<'de> {
8893 type Natural = crate::natural::StorageIteratorNextResponse;
8894 }
8895
8896 pub type ChildName<'de> = ::fidl_next::WireString<'de>;
8898
8899 pub type UrlScheme<'de> = ::fidl_next::WireString<'de>;
8901}
8902
8903pub mod wire_optional {
8904
8905 #[repr(transparent)]
8906 pub struct EventPayload<'de> {
8907 pub(crate) raw: ::fidl_next::RawWireUnion,
8908 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
8909 }
8910
8911 unsafe impl ::fidl_next::Wire for EventPayload<'static> {
8912 type Decoded<'de> = EventPayload<'de>;
8913
8914 #[inline]
8915 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8916 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
8917 ::fidl_next::RawWireUnion::zero_padding(raw);
8918 }
8919 }
8920
8921 impl<'de> EventPayload<'de> {
8922 pub fn is_some(&self) -> bool {
8923 self.raw.is_some()
8924 }
8925
8926 pub fn is_none(&self) -> bool {
8927 self.raw.is_none()
8928 }
8929
8930 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::EventPayload<'de>> {
8931 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
8932 }
8933
8934 pub fn into_option(self) -> ::core::option::Option<crate::wire::EventPayload<'de>> {
8935 if self.is_some() {
8936 Some(crate::wire::EventPayload {
8937 raw: self.raw,
8938 _phantom: ::core::marker::PhantomData,
8939 })
8940 } else {
8941 None
8942 }
8943 }
8944 }
8945
8946 unsafe impl<___D> ::fidl_next::Decode<___D> for EventPayload<'static>
8947 where
8948 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8949 ___D: ::fidl_next::Decoder,
8950 ___D: ::fidl_next::fuchsia::HandleDecoder,
8951 {
8952 fn decode(
8953 mut slot: ::fidl_next::Slot<'_, Self>,
8954 decoder: &mut ___D,
8955 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8956 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
8957 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
8958 1 => ::fidl_next::RawWireUnion::decode_as::<
8959 ___D,
8960 crate::wire::CapabilityRequestedPayload<'static>,
8961 >(raw, decoder)?,
8962
8963 2 => ::fidl_next::RawWireUnion::decode_as::<
8964 ___D,
8965 crate::wire::PurgedPayload<'static>,
8966 >(raw, decoder)?,
8967
8968 4 => ::fidl_next::RawWireUnion::decode_as::<
8969 ___D,
8970 crate::wire::DiscoveredPayload<'static>,
8971 >(raw, decoder)?,
8972
8973 5 => ::fidl_next::RawWireUnion::decode_as::<
8974 ___D,
8975 crate::wire::DestroyedPayload<'static>,
8976 >(raw, decoder)?,
8977
8978 6 => ::fidl_next::RawWireUnion::decode_as::<
8979 ___D,
8980 crate::wire::ResolvedPayload<'static>,
8981 >(raw, decoder)?,
8982
8983 7 => ::fidl_next::RawWireUnion::decode_as::<
8984 ___D,
8985 crate::wire::StartedPayload<'static>,
8986 >(raw, decoder)?,
8987
8988 8 => ::fidl_next::RawWireUnion::decode_as::<
8989 ___D,
8990 crate::wire::StoppedPayload<'static>,
8991 >(raw, decoder)?,
8992
8993 9 => ::fidl_next::RawWireUnion::decode_as::<
8994 ___D,
8995 crate::wire::DebugStartedPayload<'static>,
8996 >(raw, decoder)?,
8997
8998 10 => ::fidl_next::RawWireUnion::decode_as::<
8999 ___D,
9000 crate::wire::UnresolvedPayload<'static>,
9001 >(raw, decoder)?,
9002
9003 0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
9004 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
9005 }
9006
9007 Ok(())
9008 }
9009 }
9010
9011 impl<'de> ::core::fmt::Debug for EventPayload<'de> {
9012 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9013 self.as_ref().fmt(f)
9014 }
9015 }
9016
9017 impl<'de> ::fidl_next::IntoNatural for EventPayload<'de> {
9018 type Natural = ::core::option::Option<crate::natural::EventPayload>;
9019 }
9020}
9021
9022pub use self::natural::*;
9023
9024#[doc = " A framework-provided protocol that allows components that use it to bind to\n the component that exposes it. The act of connecting to this protocol will\n trigger the bind. Thus, this protocol contains no methods. For more details\n on binding, see\n https://fuchsia.dev/fuchsia-src/concepts/components/v2/lifecycle#binding.\n\n When a component connects to protocol, the component exposing this capability\n will be started if it\'s not already running. Upon a failure to start, the\n component framework will close the server end of the channel with a\n zx.Status epitaph.\n"]
9026#[derive(PartialEq, Debug)]
9027pub struct Binder;
9028
9029impl ::fidl_next::Discoverable for Binder {
9030 const PROTOCOL_NAME: &'static str = "fuchsia.component.Binder";
9031}
9032
9033pub mod binder {
9034 pub mod prelude {
9035 pub use crate::{Binder, BinderClientHandler, BinderServerHandler, binder};
9036 }
9037
9038 mod ___detail {
9039
9040 unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Binder
9041 where
9042 ___T: ::fidl_next::Transport,
9043 {
9044 type Client = BinderClient<___T>;
9045 type Server = BinderServer<___T>;
9046 }
9047
9048 #[repr(transparent)]
9050 pub struct BinderClient<___T: ::fidl_next::Transport> {
9051 #[allow(dead_code)]
9052 client: ::fidl_next::protocol::Client<___T>,
9053 }
9054
9055 impl<___T> BinderClient<___T> where ___T: ::fidl_next::Transport {}
9056
9057 #[repr(transparent)]
9059 pub struct BinderServer<___T: ::fidl_next::Transport> {
9060 server: ::fidl_next::protocol::Server<___T>,
9061 }
9062
9063 impl<___T> BinderServer<___T> where ___T: ::fidl_next::Transport {}
9064 }
9065}
9066
9067pub trait BinderClientHandler<
9071 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9072 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9073>
9074{
9075}
9076
9077impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Binder
9078where
9079 ___H: BinderClientHandler<___T> + ::core::marker::Send,
9080 ___T: ::fidl_next::Transport,
9081{
9082 async fn on_event(
9083 handler: &mut ___H,
9084 ordinal: u64,
9085 buffer: ___T::RecvBuffer,
9086 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9087 match ordinal {
9088 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
9089 }
9090 }
9091}
9092
9093pub trait BinderServerHandler<
9097 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9098 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9099>
9100{
9101}
9102
9103impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Binder
9104where
9105 ___H: BinderServerHandler<___T> + ::core::marker::Send,
9106 ___T: ::fidl_next::Transport,
9107{
9108 async fn on_one_way(
9109 handler: &mut ___H,
9110 ordinal: u64,
9111 buffer: ___T::RecvBuffer,
9112 ) -> ::core::result::Result<
9113 (),
9114 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9115 > {
9116 match ordinal {
9117 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
9118 }
9119 }
9120
9121 async fn on_two_way(
9122 handler: &mut ___H,
9123 ordinal: u64,
9124 buffer: ___T::RecvBuffer,
9125 responder: ::fidl_next::protocol::Responder<___T>,
9126 ) -> ::core::result::Result<
9127 (),
9128 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9129 > {
9130 match ordinal {
9131 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
9132 }
9133 }
9134}
9135
9136pub const MAX_NAME_LENGTH: u64 = 255 as u64;
9137
9138#[doc = " The maximum number of children that the a call `ChildIterator.Next`\n can return.\n Note, this is not a limit on the number of children that can be added\n to a component. This is merely a limit for a single invocation of the\n `Next` method.\n"]
9139pub const MAX_CHILD_COUNT: u32 = 128 as u32;
9140
9141#[doc = " A protocol to iterate over the list of children in a realm.\n"]
9143#[derive(PartialEq, Debug)]
9144pub struct ChildIterator;
9145
9146pub mod child_iterator {
9147 pub mod prelude {
9148 pub use crate::{
9149 ChildIterator, ChildIteratorClientHandler, ChildIteratorServerHandler, child_iterator,
9150 };
9151
9152 pub use crate::natural::ChildIteratorNextResponse;
9153 }
9154
9155 pub struct Next;
9156
9157 impl ::fidl_next::Method for Next {
9158 const ORDINAL: u64 = 4676077302722137352;
9159
9160 type Protocol = crate::ChildIterator;
9161
9162 type Request = ();
9163
9164 type Response = crate::wire::ChildIteratorNextResponse<'static>;
9165 }
9166
9167 mod ___detail {
9168
9169 unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::ChildIterator
9170 where
9171 ___T: ::fidl_next::Transport,
9172 {
9173 type Client = ChildIteratorClient<___T>;
9174 type Server = ChildIteratorServer<___T>;
9175 }
9176
9177 #[repr(transparent)]
9179 pub struct ChildIteratorClient<___T: ::fidl_next::Transport> {
9180 #[allow(dead_code)]
9181 client: ::fidl_next::protocol::Client<___T>,
9182 }
9183
9184 impl<___T> ChildIteratorClient<___T>
9185 where
9186 ___T: ::fidl_next::Transport,
9187 {
9188 #[doc = " Advance the iterator and return the next batch of children.\n\n Returns a vector of `ChildRef`. Returns an empty vector when there are\n no more children.\n"]
9189 pub fn next(&self) -> ::fidl_next::TwoWayFuture<'_, super::Next, ___T> {
9190 ::fidl_next::TwoWayFuture::from_untyped(
9191 self.client.send_two_way(4676077302722137352, ()),
9192 )
9193 }
9194 }
9195
9196 #[repr(transparent)]
9198 pub struct ChildIteratorServer<___T: ::fidl_next::Transport> {
9199 server: ::fidl_next::protocol::Server<___T>,
9200 }
9201
9202 impl<___T> ChildIteratorServer<___T> where ___T: ::fidl_next::Transport {}
9203 }
9204}
9205
9206pub trait ChildIteratorClientHandler<
9210 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9211 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9212>
9213{
9214}
9215
9216impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ChildIterator
9217where
9218 ___H: ChildIteratorClientHandler<___T> + ::core::marker::Send,
9219 ___T: ::fidl_next::Transport,
9220 <child_iterator::Next as ::fidl_next::Method>::Response:
9221 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9222{
9223 async fn on_event(
9224 handler: &mut ___H,
9225 ordinal: u64,
9226 buffer: ___T::RecvBuffer,
9227 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9228 match ordinal {
9229 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
9230 }
9231 }
9232}
9233
9234pub trait ChildIteratorServerHandler<
9238 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9239 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9240>
9241{
9242 #[doc = " Advance the iterator and return the next batch of children.\n\n Returns a vector of `ChildRef`. Returns an empty vector when there are\n no more children.\n"]
9243 fn next(
9244 &mut self,
9245
9246 responder: ::fidl_next::Responder<child_iterator::Next, ___T>,
9247 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9248}
9249
9250impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ChildIterator
9251where
9252 ___H: ChildIteratorServerHandler<___T> + ::core::marker::Send,
9253 ___T: ::fidl_next::Transport,
9254{
9255 async fn on_one_way(
9256 handler: &mut ___H,
9257 ordinal: u64,
9258 buffer: ___T::RecvBuffer,
9259 ) -> ::core::result::Result<
9260 (),
9261 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9262 > {
9263 match ordinal {
9264 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
9265 }
9266 }
9267
9268 async fn on_two_way(
9269 handler: &mut ___H,
9270 ordinal: u64,
9271 buffer: ___T::RecvBuffer,
9272 responder: ::fidl_next::protocol::Responder<___T>,
9273 ) -> ::core::result::Result<
9274 (),
9275 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9276 > {
9277 match ordinal {
9278 4676077302722137352 => {
9279 let responder = ::fidl_next::Responder::from_untyped(responder);
9280
9281 handler.next(responder).await;
9282 Ok(())
9283 }
9284
9285 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
9286 }
9287 }
9288}
9289
9290#[doc = " The maximum number of handles that can be passed to a created component.\n"]
9291pub const MAX_HANDLE_COUNT: u32 = 128 as u32;
9292
9293pub const MAX_NAMESPACE_COUNT: u32 = 32 as u32;
9294
9295pub const MAX_PATH_LENGTH: u64 = 4095 as u64;
9296
9297#[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"]
9299#[derive(PartialEq, Debug)]
9300pub struct Controller;
9301
9302pub mod controller {
9303 pub mod prelude {
9304 pub use crate::{Controller, ControllerClientHandler, ControllerServerHandler, controller};
9305
9306 pub use crate::natural::ControllerStartRequest;
9307
9308 pub use crate::natural::ControllerDestroyResponse;
9309
9310 pub use crate::natural::ControllerGetExposedDictionaryResponse;
9311
9312 pub use crate::natural::ControllerIsStartedResponse;
9313
9314 pub use crate::natural::ControllerStartResponse;
9315
9316 pub use crate::natural::Error;
9317 }
9318
9319 pub struct Start;
9320
9321 impl ::fidl_next::Method for Start {
9322 const ORDINAL: u64 = 7532130149195770565;
9323
9324 type Protocol = crate::Controller;
9325
9326 type Request = crate::wire::ControllerStartRequest<'static>;
9327
9328 type Response = ::fidl_next::WireFlexibleResult<
9329 'static,
9330 crate::wire::ControllerStartResponse,
9331 crate::wire::Error,
9332 >;
9333 }
9334
9335 pub struct IsStarted;
9336
9337 impl ::fidl_next::Method for IsStarted {
9338 const ORDINAL: u64 = 2402079833990398915;
9339
9340 type Protocol = crate::Controller;
9341
9342 type Request = ();
9343
9344 type Response = ::fidl_next::WireFlexibleResult<
9345 'static,
9346 crate::wire::ControllerIsStartedResponse,
9347 crate::wire::Error,
9348 >;
9349 }
9350
9351 pub struct GetExposedDictionary;
9352
9353 impl ::fidl_next::Method for GetExposedDictionary {
9354 const ORDINAL: u64 = 9099583788120940443;
9355
9356 type Protocol = crate::Controller;
9357
9358 type Request = ();
9359
9360 type Response = ::fidl_next::WireFlexibleResult<
9361 'static,
9362 crate::wire::ControllerGetExposedDictionaryResponse,
9363 crate::wire::Error,
9364 >;
9365 }
9366
9367 pub struct Destroy;
9368
9369 impl ::fidl_next::Method for Destroy {
9370 const ORDINAL: u64 = 8381937394141370177;
9371
9372 type Protocol = crate::Controller;
9373
9374 type Request = ();
9375
9376 type Response = ::fidl_next::WireFlexibleResult<
9377 'static,
9378 crate::wire::ControllerDestroyResponse,
9379 crate::wire::Error,
9380 >;
9381 }
9382
9383 mod ___detail {
9384
9385 pub struct Start<T0, T1> {
9386 args: T0,
9387
9388 execution_controller: T1,
9389 }
9390
9391 impl<T0, T1> ::fidl_next::Encodable for Start<T0, T1>
9392 where
9393 T0: ::fidl_next::Encodable<Encoded = crate::wire::StartChildArgs<'static>>,
9394 T1: ::fidl_next::Encodable<
9395 Encoded = ::fidl_next::ServerEnd<
9396 crate::ExecutionController,
9397 ::fidl_next::fuchsia::WireChannel,
9398 >,
9399 >,
9400 {
9401 type Encoded = crate::wire::ControllerStartRequest<'static>;
9402 }
9403
9404 unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for Start<T0, T1>
9405 where
9406 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9407 ___E: ::fidl_next::Encoder,
9408 ___E: ::fidl_next::fuchsia::HandleEncoder,
9409 T0: ::fidl_next::Encode<___E, Encoded = crate::wire::StartChildArgs<'static>>,
9410 T1: ::fidl_next::Encode<
9411 ___E,
9412 Encoded = ::fidl_next::ServerEnd<
9413 crate::ExecutionController,
9414 ::fidl_next::fuchsia::WireChannel,
9415 >,
9416 >,
9417 {
9418 #[inline]
9419 fn encode(
9420 self,
9421 encoder_: &mut ___E,
9422 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9423 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9424 ::fidl_next::munge! {
9425 let Self::Encoded {
9426 args,
9427 execution_controller,
9428
9429 } = out_;
9430 }
9431
9432 ::fidl_next::Encode::encode(self.args, encoder_, args)?;
9433
9434 ::fidl_next::Encode::encode(
9435 self.execution_controller,
9436 encoder_,
9437 execution_controller,
9438 )?;
9439
9440 Ok(())
9441 }
9442 }
9443
9444 unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Controller
9445 where
9446 ___T: ::fidl_next::Transport,
9447 {
9448 type Client = ControllerClient<___T>;
9449 type Server = ControllerServer<___T>;
9450 }
9451
9452 #[repr(transparent)]
9454 pub struct ControllerClient<___T: ::fidl_next::Transport> {
9455 #[allow(dead_code)]
9456 client: ::fidl_next::protocol::Client<___T>,
9457 }
9458
9459 impl<___T> ControllerClient<___T>
9460 where
9461 ___T: ::fidl_next::Transport,
9462 {
9463 #[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"]
9464 pub fn start(
9465 &self,
9466
9467 args: impl ::fidl_next::Encode<
9468 <___T as ::fidl_next::Transport>::SendBuffer,
9469 Encoded = crate::wire::StartChildArgs<'static>,
9470 >,
9471
9472 execution_controller: impl ::fidl_next::Encode<
9473 <___T as ::fidl_next::Transport>::SendBuffer,
9474 Encoded = ::fidl_next::ServerEnd<
9475 crate::ExecutionController,
9476 ::fidl_next::fuchsia::WireChannel,
9477 >,
9478 >,
9479 ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
9480 where
9481 <___T as ::fidl_next::Transport>::SendBuffer:
9482 ::fidl_next::encoder::InternalHandleEncoder,
9483 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9484 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9485 {
9486 self.start_with(Start { args, execution_controller })
9487 }
9488
9489 #[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"]
9490 pub fn start_with<___R>(
9491 &self,
9492 request: ___R,
9493 ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
9494 where
9495 ___R: ::fidl_next::Encode<
9496 <___T as ::fidl_next::Transport>::SendBuffer,
9497 Encoded = crate::wire::ControllerStartRequest<'static>,
9498 >,
9499 {
9500 ::fidl_next::TwoWayFuture::from_untyped(
9501 self.client.send_two_way(7532130149195770565, request),
9502 )
9503 }
9504
9505 #[doc = " Returns true if this instance is currently running.\n"]
9506 pub fn is_started(&self) -> ::fidl_next::TwoWayFuture<'_, super::IsStarted, ___T> {
9507 ::fidl_next::TwoWayFuture::from_untyped(
9508 self.client.send_two_way(2402079833990398915, ()),
9509 )
9510 }
9511
9512 #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
9513 pub fn get_exposed_dictionary(
9514 &self,
9515 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExposedDictionary, ___T> {
9516 ::fidl_next::TwoWayFuture::from_untyped(
9517 self.client.send_two_way(9099583788120940443, ()),
9518 )
9519 }
9520
9521 #[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"]
9522 pub fn destroy(&self) -> ::fidl_next::TwoWayFuture<'_, super::Destroy, ___T> {
9523 ::fidl_next::TwoWayFuture::from_untyped(
9524 self.client.send_two_way(8381937394141370177, ()),
9525 )
9526 }
9527 }
9528
9529 #[repr(transparent)]
9531 pub struct ControllerServer<___T: ::fidl_next::Transport> {
9532 server: ::fidl_next::protocol::Server<___T>,
9533 }
9534
9535 impl<___T> ControllerServer<___T> where ___T: ::fidl_next::Transport {}
9536 }
9537}
9538
9539pub trait ControllerClientHandler<
9543 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9544 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9545>
9546{
9547 fn on_unknown_interaction(
9548 &mut self,
9549 ordinal: u64,
9550 ) -> impl ::core::future::Future<
9551 Output = ::core::result::Result<
9552 (),
9553 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9554 >,
9555 > + ::core::marker::Send {
9556 ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
9557 }
9558}
9559
9560impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Controller
9561where
9562 ___H: ControllerClientHandler<___T> + ::core::marker::Send,
9563 ___T: ::fidl_next::Transport,
9564 <controller::Start as ::fidl_next::Method>::Response:
9565 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9566 <controller::IsStarted as ::fidl_next::Method>::Response:
9567 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9568 <controller::GetExposedDictionary as ::fidl_next::Method>::Response:
9569 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9570 <controller::Destroy as ::fidl_next::Method>::Response:
9571 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9572{
9573 async fn on_event(
9574 handler: &mut ___H,
9575 ordinal: u64,
9576 buffer: ___T::RecvBuffer,
9577 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9578 match ordinal {
9579 ordinal => handler.on_unknown_interaction(ordinal).await,
9580 }
9581 }
9582}
9583
9584pub trait ControllerServerHandler<
9588 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9589 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9590>
9591{
9592 #[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"]
9593 fn start(
9594 &mut self,
9595
9596 request: ::fidl_next::Request<controller::Start, ___T>,
9597
9598 responder: ::fidl_next::Responder<controller::Start, ___T>,
9599 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9600
9601 #[doc = " Returns true if this instance is currently running.\n"]
9602 fn is_started(
9603 &mut self,
9604
9605 responder: ::fidl_next::Responder<controller::IsStarted, ___T>,
9606 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9607
9608 #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
9609 fn get_exposed_dictionary(
9610 &mut self,
9611
9612 responder: ::fidl_next::Responder<controller::GetExposedDictionary, ___T>,
9613 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9614
9615 #[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"]
9616 fn destroy(
9617 &mut self,
9618
9619 responder: ::fidl_next::Responder<controller::Destroy, ___T>,
9620 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9621
9622 fn on_unknown_interaction(
9623 &mut self,
9624 ordinal: u64,
9625 ) -> impl ::core::future::Future<
9626 Output = ::core::result::Result<
9627 (),
9628 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9629 >,
9630 > + ::core::marker::Send {
9631 ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
9632 }
9633}
9634
9635impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Controller
9636where
9637 ___H: ControllerServerHandler<___T> + ::core::marker::Send,
9638 ___T: ::fidl_next::Transport,
9639 <controller::Start as ::fidl_next::Method>::Request:
9640 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9641{
9642 async fn on_one_way(
9643 handler: &mut ___H,
9644 ordinal: u64,
9645 buffer: ___T::RecvBuffer,
9646 ) -> ::core::result::Result<
9647 (),
9648 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9649 > {
9650 match ordinal {
9651 ordinal => handler.on_unknown_interaction(ordinal).await,
9652 }
9653 }
9654
9655 async fn on_two_way(
9656 handler: &mut ___H,
9657 ordinal: u64,
9658 buffer: ___T::RecvBuffer,
9659 responder: ::fidl_next::protocol::Responder<___T>,
9660 ) -> ::core::result::Result<
9661 (),
9662 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9663 > {
9664 match ordinal {
9665 7532130149195770565 => {
9666 let responder = ::fidl_next::Responder::from_untyped(responder);
9667
9668 match ::fidl_next::DecoderExt::decode(buffer) {
9669 Ok(decoded) => {
9670 handler.start(decoded, responder).await;
9671 Ok(())
9672 }
9673 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9674 ordinal: 7532130149195770565,
9675 error,
9676 }),
9677 }
9678 }
9679
9680 2402079833990398915 => {
9681 let responder = ::fidl_next::Responder::from_untyped(responder);
9682
9683 handler.is_started(responder).await;
9684 Ok(())
9685 }
9686
9687 9099583788120940443 => {
9688 let responder = ::fidl_next::Responder::from_untyped(responder);
9689
9690 handler.get_exposed_dictionary(responder).await;
9691 Ok(())
9692 }
9693
9694 8381937394141370177 => {
9695 let responder = ::fidl_next::Responder::from_untyped(responder);
9696
9697 handler.destroy(responder).await;
9698 Ok(())
9699 }
9700
9701 ordinal => handler.on_unknown_interaction(ordinal).await,
9702 }
9703 }
9704}
9705
9706#[doc = " The maximum number of dynamic offers that can target a created component.\n"]
9707pub const MAX_DYNAMIC_OFFER_COUNT: u32 = 128 as u32;
9708
9709pub const MAX_MONIKER_LENGTH: u32 = 4096 as u32;
9710
9711#[doc = " Listener for events on the component hierarchy.\n Can\'t be used outside of the platform.\n"]
9713#[derive(PartialEq, Debug)]
9714pub struct EventStream;
9715
9716impl ::fidl_next::Discoverable for EventStream {
9717 const PROTOCOL_NAME: &'static str = "fuchsia.component.EventStream";
9718}
9719
9720pub mod event_stream {
9721 pub mod prelude {
9722 pub use crate::{
9723 EventStream, EventStreamClientHandler, EventStreamServerHandler, event_stream,
9724 };
9725
9726 pub use crate::natural::EventStreamGetNextResponse;
9727 }
9728
9729 pub struct GetNext;
9730
9731 impl ::fidl_next::Method for GetNext {
9732 const ORDINAL: u64 = 4549982840421936006;
9733
9734 type Protocol = crate::EventStream;
9735
9736 type Request = ();
9737
9738 type Response = crate::wire::EventStreamGetNextResponse<'static>;
9739 }
9740
9741 pub struct WaitForReady;
9742
9743 impl ::fidl_next::Method for WaitForReady {
9744 const ORDINAL: u64 = 3545212058508387970;
9745
9746 type Protocol = crate::EventStream;
9747
9748 type Request = ();
9749
9750 type Response = ();
9751 }
9752
9753 mod ___detail {
9754
9755 unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::EventStream
9756 where
9757 ___T: ::fidl_next::Transport,
9758 {
9759 type Client = EventStreamClient<___T>;
9760 type Server = EventStreamServer<___T>;
9761 }
9762
9763 #[repr(transparent)]
9765 pub struct EventStreamClient<___T: ::fidl_next::Transport> {
9766 #[allow(dead_code)]
9767 client: ::fidl_next::protocol::Client<___T>,
9768 }
9769
9770 impl<___T> EventStreamClient<___T>
9771 where
9772 ___T: ::fidl_next::Transport,
9773 {
9774 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
9775 ::fidl_next::TwoWayFuture::from_untyped(
9776 self.client.send_two_way(4549982840421936006, ()),
9777 )
9778 }
9779
9780 #[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"]
9781 pub fn wait_for_ready(
9782 &self,
9783 ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForReady, ___T> {
9784 ::fidl_next::TwoWayFuture::from_untyped(
9785 self.client.send_two_way(3545212058508387970, ()),
9786 )
9787 }
9788 }
9789
9790 #[repr(transparent)]
9792 pub struct EventStreamServer<___T: ::fidl_next::Transport> {
9793 server: ::fidl_next::protocol::Server<___T>,
9794 }
9795
9796 impl<___T> EventStreamServer<___T> where ___T: ::fidl_next::Transport {}
9797 }
9798}
9799
9800pub trait EventStreamClientHandler<
9804 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9805 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9806>
9807{
9808}
9809
9810impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for EventStream
9811where
9812 ___H: EventStreamClientHandler<___T> + ::core::marker::Send,
9813 ___T: ::fidl_next::Transport,
9814 <event_stream::GetNext as ::fidl_next::Method>::Response:
9815 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9816{
9817 async fn on_event(
9818 handler: &mut ___H,
9819 ordinal: u64,
9820 buffer: ___T::RecvBuffer,
9821 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9822 match ordinal {
9823 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
9824 }
9825 }
9826}
9827
9828pub trait EventStreamServerHandler<
9832 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9833 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9834>
9835{
9836 fn get_next(
9837 &mut self,
9838
9839 responder: ::fidl_next::Responder<event_stream::GetNext, ___T>,
9840 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9841
9842 #[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"]
9843 fn wait_for_ready(
9844 &mut self,
9845
9846 responder: ::fidl_next::Responder<event_stream::WaitForReady, ___T>,
9847 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9848}
9849
9850impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for EventStream
9851where
9852 ___H: EventStreamServerHandler<___T> + ::core::marker::Send,
9853 ___T: ::fidl_next::Transport,
9854{
9855 async fn on_one_way(
9856 handler: &mut ___H,
9857 ordinal: u64,
9858 buffer: ___T::RecvBuffer,
9859 ) -> ::core::result::Result<
9860 (),
9861 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9862 > {
9863 match ordinal {
9864 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
9865 }
9866 }
9867
9868 async fn on_two_way(
9869 handler: &mut ___H,
9870 ordinal: u64,
9871 buffer: ___T::RecvBuffer,
9872 responder: ::fidl_next::protocol::Responder<___T>,
9873 ) -> ::core::result::Result<
9874 (),
9875 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9876 > {
9877 match ordinal {
9878 4549982840421936006 => {
9879 let responder = ::fidl_next::Responder::from_untyped(responder);
9880
9881 handler.get_next(responder).await;
9882 Ok(())
9883 }
9884
9885 3545212058508387970 => {
9886 let responder = ::fidl_next::Responder::from_untyped(responder);
9887
9888 handler.wait_for_ready(responder).await;
9889 Ok(())
9890 }
9891
9892 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
9893 }
9894 }
9895}
9896
9897#[derive(PartialEq, Debug)]
9899pub struct ExecutionController;
9900
9901pub mod execution_controller {
9902 pub mod prelude {
9903 pub use crate::{
9904 ExecutionController, ExecutionControllerClientHandler,
9905 ExecutionControllerServerHandler, execution_controller,
9906 };
9907
9908 pub use crate::natural::ExecutionControllerOnStopRequest;
9909 }
9910
9911 pub struct Stop;
9912
9913 impl ::fidl_next::Method for Stop {
9914 const ORDINAL: u64 = 6256129817234858263;
9915
9916 type Protocol = crate::ExecutionController;
9917
9918 type Request = ();
9919
9920 type Response = ::fidl_next::Never;
9921 }
9922
9923 pub struct OnStop;
9924
9925 impl ::fidl_next::Method for OnStop {
9926 const ORDINAL: u64 = 7121600095714604415;
9927
9928 type Protocol = crate::ExecutionController;
9929
9930 type Request = ::fidl_next::Never;
9931
9932 type Response = crate::wire::ExecutionControllerOnStopRequest<'static>;
9933 }
9934
9935 mod ___detail {
9936
9937 pub struct OnStop<T0> {
9938 stopped_payload: T0,
9939 }
9940
9941 impl<T0> ::fidl_next::Encodable for OnStop<T0>
9942 where
9943 T0: ::fidl_next::Encodable<Encoded = crate::wire::StoppedPayload<'static>>,
9944 {
9945 type Encoded = crate::wire::ExecutionControllerOnStopRequest<'static>;
9946 }
9947
9948 unsafe impl<___E, T0> ::fidl_next::Encode<___E> for OnStop<T0>
9949 where
9950 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9951 ___E: ::fidl_next::Encoder,
9952 T0: ::fidl_next::Encode<___E, Encoded = crate::wire::StoppedPayload<'static>>,
9953 {
9954 #[inline]
9955 fn encode(
9956 self,
9957 encoder_: &mut ___E,
9958 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9959 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9960 ::fidl_next::munge! {
9961 let Self::Encoded {
9962 stopped_payload,
9963
9964 } = out_;
9965 }
9966
9967 ::fidl_next::Encode::encode(self.stopped_payload, encoder_, stopped_payload)?;
9968
9969 Ok(())
9970 }
9971 }
9972
9973 unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::ExecutionController
9974 where
9975 ___T: ::fidl_next::Transport,
9976 {
9977 type Client = ExecutionControllerClient<___T>;
9978 type Server = ExecutionControllerServer<___T>;
9979 }
9980
9981 #[repr(transparent)]
9983 pub struct ExecutionControllerClient<___T: ::fidl_next::Transport> {
9984 #[allow(dead_code)]
9985 client: ::fidl_next::protocol::Client<___T>,
9986 }
9987
9988 impl<___T> ExecutionControllerClient<___T>
9989 where
9990 ___T: ::fidl_next::Transport,
9991 {
9992 #[doc = " Initiates a stop action on this component. Once complete, OnStop will be\n called with the stopped payload and this channel is closed.\n\n Note that a component may stop running on its own at any time, so it is\n possible for `OnStop` to be received before `Stop` is called.\n"]
9993 pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
9994 ::fidl_next::SendFuture::from_untyped(
9995 self.client.send_one_way(6256129817234858263, ()),
9996 )
9997 }
9998 }
9999
10000 #[repr(transparent)]
10002 pub struct ExecutionControllerServer<___T: ::fidl_next::Transport> {
10003 server: ::fidl_next::protocol::Server<___T>,
10004 }
10005
10006 impl<___T> ExecutionControllerServer<___T>
10007 where
10008 ___T: ::fidl_next::Transport,
10009 {
10010 #[doc = " When the child is stopped due to `Stop` being called, the child exiting\n on its own, or for any other reason, `OnStop` is called and then this\n channel is closed.\n"]
10011 pub fn on_stop(
10012 &self,
10013
10014 stopped_payload: impl ::fidl_next::Encode<
10015 <___T as ::fidl_next::Transport>::SendBuffer,
10016 Encoded = crate::wire::StoppedPayload<'static>,
10017 >,
10018 ) -> ::fidl_next::SendFuture<'_, ___T>
10019 where
10020 <___T as ::fidl_next::Transport>::SendBuffer:
10021 ::fidl_next::encoder::InternalHandleEncoder,
10022 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10023 {
10024 self.on_stop_with(OnStop { stopped_payload })
10025 }
10026
10027 #[doc = " When the child is stopped due to `Stop` being called, the child exiting\n on its own, or for any other reason, `OnStop` is called and then this\n channel is closed.\n"]
10028
10029 pub fn on_stop_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
10030 where
10031 ___R: ::fidl_next::Encode<
10032 <___T as ::fidl_next::Transport>::SendBuffer,
10033 Encoded = <super::OnStop as ::fidl_next::Method>::Response,
10034 >,
10035 {
10036 ::fidl_next::SendFuture::from_untyped(
10037 self.server.send_event(7121600095714604415, request),
10038 )
10039 }
10040 }
10041 }
10042}
10043
10044pub trait ExecutionControllerClientHandler<
10048 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
10049 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10050>
10051{
10052 #[doc = " When the child is stopped due to `Stop` being called, the child exiting\n on its own, or for any other reason, `OnStop` is called and then this\n channel is closed.\n"]
10053 fn on_stop(
10054 &mut self,
10055
10056 event: ::fidl_next::Response<execution_controller::OnStop, ___T>,
10057 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10058
10059 fn on_unknown_interaction(
10060 &mut self,
10061 ordinal: u64,
10062 ) -> impl ::core::future::Future<
10063 Output = ::core::result::Result<
10064 (),
10065 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10066 >,
10067 > + ::core::marker::Send {
10068 ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
10069 }
10070}
10071
10072impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ExecutionController
10073where
10074 ___H: ExecutionControllerClientHandler<___T> + ::core::marker::Send,
10075 ___T: ::fidl_next::Transport,
10076 <execution_controller::OnStop as ::fidl_next::Method>::Response:
10077 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10078{
10079 async fn on_event(
10080 handler: &mut ___H,
10081 ordinal: u64,
10082 buffer: ___T::RecvBuffer,
10083 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10084 match ordinal {
10085 7121600095714604415 => match ::fidl_next::DecoderExt::decode(buffer) {
10086 Ok(decoded) => {
10087 handler.on_stop(decoded).await;
10088 Ok(())
10089 }
10090 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10091 ordinal: 7121600095714604415,
10092 error,
10093 }),
10094 },
10095
10096 ordinal => handler.on_unknown_interaction(ordinal).await,
10097 }
10098 }
10099}
10100
10101pub trait ExecutionControllerServerHandler<
10105 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
10106 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10107>
10108{
10109 #[doc = " Initiates a stop action on this component. Once complete, OnStop will be\n called with the stopped payload and this channel is closed.\n\n Note that a component may stop running on its own at any time, so it is\n possible for `OnStop` to be received before `Stop` is called.\n"]
10110 fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10111
10112 fn on_unknown_interaction(
10113 &mut self,
10114 ordinal: u64,
10115 ) -> impl ::core::future::Future<
10116 Output = ::core::result::Result<
10117 (),
10118 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10119 >,
10120 > + ::core::marker::Send {
10121 ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
10122 }
10123}
10124
10125impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ExecutionController
10126where
10127 ___H: ExecutionControllerServerHandler<___T> + ::core::marker::Send,
10128 ___T: ::fidl_next::Transport,
10129{
10130 async fn on_one_way(
10131 handler: &mut ___H,
10132 ordinal: u64,
10133 buffer: ___T::RecvBuffer,
10134 ) -> ::core::result::Result<
10135 (),
10136 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10137 > {
10138 match ordinal {
10139 6256129817234858263 => {
10140 handler.stop().await;
10141 Ok(())
10142 }
10143
10144 ordinal => handler.on_unknown_interaction(ordinal).await,
10145 }
10146 }
10147
10148 async fn on_two_way(
10149 handler: &mut ___H,
10150 ordinal: u64,
10151 buffer: ___T::RecvBuffer,
10152 responder: ::fidl_next::protocol::Responder<___T>,
10153 ) -> ::core::result::Result<
10154 (),
10155 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10156 > {
10157 match ordinal {
10158 ordinal => handler.on_unknown_interaction(ordinal).await,
10159 }
10160 }
10161}
10162
10163#[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"]
10165#[derive(PartialEq, Debug)]
10166pub struct Introspector;
10167
10168impl ::fidl_next::Discoverable for Introspector {
10169 const PROTOCOL_NAME: &'static str = "fuchsia.component.Introspector";
10170}
10171
10172pub mod introspector {
10173 pub mod prelude {
10174 pub use crate::{
10175 Introspector, IntrospectorClientHandler, IntrospectorServerHandler, introspector,
10176 };
10177
10178 pub use crate::natural::Error;
10179
10180 pub use crate::natural::IntrospectorGetMonikerRequest;
10181
10182 pub use crate::natural::IntrospectorGetMonikerResponse;
10183 }
10184
10185 pub struct GetMoniker;
10186
10187 impl ::fidl_next::Method for GetMoniker {
10188 const ORDINAL: u64 = 214344082539672664;
10189
10190 type Protocol = crate::Introspector;
10191
10192 type Request = crate::wire::IntrospectorGetMonikerRequest;
10193
10194 type Response = ::fidl_next::WireFlexibleResult<
10195 'static,
10196 crate::wire::IntrospectorGetMonikerResponse<'static>,
10197 crate::wire::Error,
10198 >;
10199 }
10200
10201 mod ___detail {
10202
10203 pub struct GetMoniker<T0> {
10204 component_instance: T0,
10205 }
10206
10207 impl<T0> ::fidl_next::Encodable for GetMoniker<T0>
10208 where
10209 T0: ::fidl_next::Encodable<Encoded = ::fidl_next::fuchsia::WireEvent>,
10210 {
10211 type Encoded = crate::wire::IntrospectorGetMonikerRequest;
10212 }
10213
10214 unsafe impl<___E, T0> ::fidl_next::Encode<___E> for GetMoniker<T0>
10215 where
10216 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10217 ___E: ::fidl_next::fuchsia::HandleEncoder,
10218 T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::fuchsia::WireEvent>,
10219 {
10220 #[inline]
10221 fn encode(
10222 self,
10223 encoder_: &mut ___E,
10224 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10225 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10226 ::fidl_next::munge! {
10227 let Self::Encoded {
10228 component_instance,
10229
10230 } = out_;
10231 }
10232
10233 ::fidl_next::Encode::encode(self.component_instance, encoder_, component_instance)?;
10234
10235 Ok(())
10236 }
10237 }
10238
10239 unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Introspector
10240 where
10241 ___T: ::fidl_next::Transport,
10242 {
10243 type Client = IntrospectorClient<___T>;
10244 type Server = IntrospectorServer<___T>;
10245 }
10246
10247 #[repr(transparent)]
10249 pub struct IntrospectorClient<___T: ::fidl_next::Transport> {
10250 #[allow(dead_code)]
10251 client: ::fidl_next::protocol::Client<___T>,
10252 }
10253
10254 impl<___T> IntrospectorClient<___T>
10255 where
10256 ___T: ::fidl_next::Transport,
10257 {
10258 #[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"]
10259 pub fn get_moniker(
10260 &self,
10261
10262 component_instance: impl ::fidl_next::Encode<
10263 <___T as ::fidl_next::Transport>::SendBuffer,
10264 Encoded = ::fidl_next::fuchsia::WireEvent,
10265 >,
10266 ) -> ::fidl_next::TwoWayFuture<'_, super::GetMoniker, ___T>
10267 where
10268 <___T as ::fidl_next::Transport>::SendBuffer:
10269 ::fidl_next::encoder::InternalHandleEncoder,
10270 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10271 {
10272 self.get_moniker_with(GetMoniker { component_instance })
10273 }
10274
10275 #[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"]
10276 pub fn get_moniker_with<___R>(
10277 &self,
10278 request: ___R,
10279 ) -> ::fidl_next::TwoWayFuture<'_, super::GetMoniker, ___T>
10280 where
10281 ___R: ::fidl_next::Encode<
10282 <___T as ::fidl_next::Transport>::SendBuffer,
10283 Encoded = crate::wire::IntrospectorGetMonikerRequest,
10284 >,
10285 {
10286 ::fidl_next::TwoWayFuture::from_untyped(
10287 self.client.send_two_way(214344082539672664, request),
10288 )
10289 }
10290 }
10291
10292 #[repr(transparent)]
10294 pub struct IntrospectorServer<___T: ::fidl_next::Transport> {
10295 server: ::fidl_next::protocol::Server<___T>,
10296 }
10297
10298 impl<___T> IntrospectorServer<___T> where ___T: ::fidl_next::Transport {}
10299 }
10300}
10301
10302pub trait IntrospectorClientHandler<
10306 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
10307 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10308>
10309{
10310 fn on_unknown_interaction(
10311 &mut self,
10312 ordinal: u64,
10313 ) -> impl ::core::future::Future<
10314 Output = ::core::result::Result<
10315 (),
10316 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10317 >,
10318 > + ::core::marker::Send {
10319 ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
10320 }
10321}
10322
10323impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Introspector
10324where
10325 ___H: IntrospectorClientHandler<___T> + ::core::marker::Send,
10326 ___T: ::fidl_next::Transport,
10327 <introspector::GetMoniker as ::fidl_next::Method>::Response:
10328 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10329{
10330 async fn on_event(
10331 handler: &mut ___H,
10332 ordinal: u64,
10333 buffer: ___T::RecvBuffer,
10334 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10335 match ordinal {
10336 ordinal => handler.on_unknown_interaction(ordinal).await,
10337 }
10338 }
10339}
10340
10341pub trait IntrospectorServerHandler<
10345 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
10346 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10347>
10348{
10349 #[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"]
10350 fn get_moniker(
10351 &mut self,
10352
10353 request: ::fidl_next::Request<introspector::GetMoniker, ___T>,
10354
10355 responder: ::fidl_next::Responder<introspector::GetMoniker, ___T>,
10356 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10357
10358 fn on_unknown_interaction(
10359 &mut self,
10360 ordinal: u64,
10361 ) -> impl ::core::future::Future<
10362 Output = ::core::result::Result<
10363 (),
10364 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10365 >,
10366 > + ::core::marker::Send {
10367 ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
10368 }
10369}
10370
10371impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Introspector
10372where
10373 ___H: IntrospectorServerHandler<___T> + ::core::marker::Send,
10374 ___T: ::fidl_next::Transport,
10375 <introspector::GetMoniker as ::fidl_next::Method>::Request:
10376 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10377{
10378 async fn on_one_way(
10379 handler: &mut ___H,
10380 ordinal: u64,
10381 buffer: ___T::RecvBuffer,
10382 ) -> ::core::result::Result<
10383 (),
10384 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10385 > {
10386 match ordinal {
10387 ordinal => handler.on_unknown_interaction(ordinal).await,
10388 }
10389 }
10390
10391 async fn on_two_way(
10392 handler: &mut ___H,
10393 ordinal: u64,
10394 buffer: ___T::RecvBuffer,
10395 responder: ::fidl_next::protocol::Responder<___T>,
10396 ) -> ::core::result::Result<
10397 (),
10398 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10399 > {
10400 match ordinal {
10401 214344082539672664 => {
10402 let responder = ::fidl_next::Responder::from_untyped(responder);
10403
10404 match ::fidl_next::DecoderExt::decode(buffer) {
10405 Ok(decoded) => {
10406 handler.get_moniker(decoded, responder).await;
10407 Ok(())
10408 }
10409 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10410 ordinal: 214344082539672664,
10411 error,
10412 }),
10413 }
10414 }
10415
10416 ordinal => handler.on_unknown_interaction(ordinal).await,
10417 }
10418 }
10419}
10420
10421#[doc = " The maximum string length of a capability ID.\n This value is currently set arbitrarily.\n"]
10422pub const MAX_CAPABILITY_ID_LENGTH: u64 = 50 as u64;
10423
10424pub const MAX_CHILD_NAME_LENGTH: u32 = 1024 as u32;
10425
10426#[doc = " The maximum string length of an error description.\n"]
10427pub const MAX_ERROR_DESCRIPTION_LENGTH: u64 = 100 as u64;
10428
10429#[doc = " The maximum number of events that a receiver can listen to.\n"]
10430pub const MAX_NUM_EVENTS_RECEIVED: u64 = 100 as u64;
10431
10432#[doc = " The maximum length of a storage instance ID.\n A storage instance ID is a 256-bit UUID, which when encoded\n in hex notation is 64 characters long.\n"]
10433pub const MAX_STORAGE_ID_LENGTH: u32 = 64 as u32;
10434
10435#[doc = " The maximum number of requests per event subscription.\n"]
10436pub const MAX_SUBSCRIPTION_REQUESTS: u32 = 2 as u32;
10437
10438pub const MAX_URL_SCHEME_LENGTH: u64 = 255 as u64;
10439
10440#[doc = " Protocol for performing namespace operations.\n"]
10442#[derive(PartialEq, Debug)]
10443pub struct Namespace;
10444
10445impl ::fidl_next::Discoverable for Namespace {
10446 const PROTOCOL_NAME: &'static str = "fuchsia.component.Namespace";
10447}
10448
10449pub mod namespace {
10450 pub mod prelude {
10451 pub use crate::{Namespace, NamespaceClientHandler, NamespaceServerHandler, namespace};
10452
10453 pub use crate::natural::NamespaceCreateRequest;
10454
10455 pub use crate::natural::NamespaceError;
10456
10457 pub use crate::natural::NamespaceCreateResponse;
10458 }
10459
10460 pub struct Create;
10461
10462 impl ::fidl_next::Method for Create {
10463 const ORDINAL: u64 = 4839678630846501113;
10464
10465 type Protocol = crate::Namespace;
10466
10467 type Request = crate::wire::NamespaceCreateRequest<'static>;
10468
10469 type Response = ::fidl_next::WireFlexibleResult<
10470 'static,
10471 crate::wire::NamespaceCreateResponse<'static>,
10472 crate::wire::NamespaceError,
10473 >;
10474 }
10475
10476 mod ___detail {
10477
10478 pub struct Create<T0> {
10479 entries: T0,
10480 }
10481
10482 impl<T0> ::fidl_next::Encodable for Create<T0>
10483 where
10484 T0: ::fidl_next::Encodable<
10485 Encoded = ::fidl_next::WireVector<
10486 'static,
10487 crate::wire::NamespaceInputEntry<'static>,
10488 >,
10489 >,
10490 {
10491 type Encoded = crate::wire::NamespaceCreateRequest<'static>;
10492 }
10493
10494 unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Create<T0>
10495 where
10496 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10497 ___E: ::fidl_next::Encoder,
10498 ___E: ::fidl_next::fuchsia::HandleEncoder,
10499 T0: ::fidl_next::Encode<
10500 ___E,
10501 Encoded = ::fidl_next::WireVector<
10502 'static,
10503 crate::wire::NamespaceInputEntry<'static>,
10504 >,
10505 >,
10506 {
10507 #[inline]
10508 fn encode(
10509 self,
10510 encoder_: &mut ___E,
10511 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10512 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10513 ::fidl_next::munge! {
10514 let Self::Encoded {
10515 entries,
10516
10517 } = out_;
10518 }
10519
10520 ::fidl_next::Encode::encode(self.entries, encoder_, entries)?;
10521
10522 Ok(())
10523 }
10524 }
10525
10526 unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Namespace
10527 where
10528 ___T: ::fidl_next::Transport,
10529 {
10530 type Client = NamespaceClient<___T>;
10531 type Server = NamespaceServer<___T>;
10532 }
10533
10534 #[repr(transparent)]
10536 pub struct NamespaceClient<___T: ::fidl_next::Transport> {
10537 #[allow(dead_code)]
10538 client: ::fidl_next::protocol::Client<___T>,
10539 }
10540
10541 impl<___T> NamespaceClient<___T>
10542 where
10543 ___T: ::fidl_next::Transport,
10544 {
10545 pub fn create(
10546 &self,
10547
10548 entries: impl ::fidl_next::Encode<
10549 <___T as ::fidl_next::Transport>::SendBuffer,
10550 Encoded = ::fidl_next::WireVector<
10551 'static,
10552 crate::wire::NamespaceInputEntry<'static>,
10553 >,
10554 >,
10555 ) -> ::fidl_next::TwoWayFuture<'_, super::Create, ___T>
10556 where
10557 <___T as ::fidl_next::Transport>::SendBuffer:
10558 ::fidl_next::encoder::InternalHandleEncoder,
10559 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10560 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10561 {
10562 self.create_with(Create { entries })
10563 }
10564
10565 pub fn create_with<___R>(
10566 &self,
10567 request: ___R,
10568 ) -> ::fidl_next::TwoWayFuture<'_, super::Create, ___T>
10569 where
10570 ___R: ::fidl_next::Encode<
10571 <___T as ::fidl_next::Transport>::SendBuffer,
10572 Encoded = crate::wire::NamespaceCreateRequest<'static>,
10573 >,
10574 {
10575 ::fidl_next::TwoWayFuture::from_untyped(
10576 self.client.send_two_way(4839678630846501113, request),
10577 )
10578 }
10579 }
10580
10581 #[repr(transparent)]
10583 pub struct NamespaceServer<___T: ::fidl_next::Transport> {
10584 server: ::fidl_next::protocol::Server<___T>,
10585 }
10586
10587 impl<___T> NamespaceServer<___T> where ___T: ::fidl_next::Transport {}
10588 }
10589}
10590
10591pub trait NamespaceClientHandler<
10595 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
10596 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10597>
10598{
10599 fn on_unknown_interaction(
10600 &mut self,
10601 ordinal: u64,
10602 ) -> impl ::core::future::Future<
10603 Output = ::core::result::Result<
10604 (),
10605 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10606 >,
10607 > + ::core::marker::Send {
10608 ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
10609 }
10610}
10611
10612impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Namespace
10613where
10614 ___H: NamespaceClientHandler<___T> + ::core::marker::Send,
10615 ___T: ::fidl_next::Transport,
10616 <namespace::Create as ::fidl_next::Method>::Response:
10617 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10618{
10619 async fn on_event(
10620 handler: &mut ___H,
10621 ordinal: u64,
10622 buffer: ___T::RecvBuffer,
10623 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10624 match ordinal {
10625 ordinal => handler.on_unknown_interaction(ordinal).await,
10626 }
10627 }
10628}
10629
10630pub trait NamespaceServerHandler<
10634 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
10635 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10636>
10637{
10638 fn create(
10639 &mut self,
10640
10641 request: ::fidl_next::Request<namespace::Create, ___T>,
10642
10643 responder: ::fidl_next::Responder<namespace::Create, ___T>,
10644 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10645
10646 fn on_unknown_interaction(
10647 &mut self,
10648 ordinal: u64,
10649 ) -> impl ::core::future::Future<
10650 Output = ::core::result::Result<
10651 (),
10652 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10653 >,
10654 > + ::core::marker::Send {
10655 ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
10656 }
10657}
10658
10659impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Namespace
10660where
10661 ___H: NamespaceServerHandler<___T> + ::core::marker::Send,
10662 ___T: ::fidl_next::Transport,
10663 <namespace::Create as ::fidl_next::Method>::Request:
10664 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10665{
10666 async fn on_one_way(
10667 handler: &mut ___H,
10668 ordinal: u64,
10669 buffer: ___T::RecvBuffer,
10670 ) -> ::core::result::Result<
10671 (),
10672 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10673 > {
10674 match ordinal {
10675 ordinal => handler.on_unknown_interaction(ordinal).await,
10676 }
10677 }
10678
10679 async fn on_two_way(
10680 handler: &mut ___H,
10681 ordinal: u64,
10682 buffer: ___T::RecvBuffer,
10683 responder: ::fidl_next::protocol::Responder<___T>,
10684 ) -> ::core::result::Result<
10685 (),
10686 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10687 > {
10688 match ordinal {
10689 4839678630846501113 => {
10690 let responder = ::fidl_next::Responder::from_untyped(responder);
10691
10692 match ::fidl_next::DecoderExt::decode(buffer) {
10693 Ok(decoded) => {
10694 handler.create(decoded, responder).await;
10695 Ok(())
10696 }
10697 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10698 ordinal: 4839678630846501113,
10699 error,
10700 }),
10701 }
10702 }
10703
10704 ordinal => handler.on_unknown_interaction(ordinal).await,
10705 }
10706 }
10707}
10708
10709#[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"]
10711#[derive(PartialEq, Debug)]
10712pub struct Realm;
10713
10714impl ::fidl_next::Discoverable for Realm {
10715 const PROTOCOL_NAME: &'static str = "fuchsia.component.Realm";
10716}
10717
10718pub mod realm {
10719 pub mod prelude {
10720 pub use crate::{Realm, RealmClientHandler, RealmServerHandler, realm};
10721
10722 pub use crate::natural::Error;
10723
10724 pub use crate::natural::RealmCreateChildRequest;
10725
10726 pub use crate::natural::RealmDestroyChildRequest;
10727
10728 pub use crate::natural::RealmGetChildOutputDictionaryRequest;
10729
10730 pub use crate::natural::RealmListChildrenRequest;
10731
10732 pub use crate::natural::RealmOpenControllerRequest;
10733
10734 pub use crate::natural::RealmOpenExposedDirRequest;
10735
10736 pub use crate::natural::RealmCreateChildResponse;
10737
10738 pub use crate::natural::RealmDestroyChildResponse;
10739
10740 pub use crate::natural::RealmGetChildOutputDictionaryResponse;
10741
10742 pub use crate::natural::RealmGetResolvedInfoResponse;
10743
10744 pub use crate::natural::RealmListChildrenResponse;
10745
10746 pub use crate::natural::RealmOpenControllerResponse;
10747
10748 pub use crate::natural::RealmOpenExposedDirResponse;
10749 }
10750
10751 pub struct OpenController;
10752
10753 impl ::fidl_next::Method for OpenController {
10754 const ORDINAL: u64 = 8165227925828473216;
10755
10756 type Protocol = crate::Realm;
10757
10758 type Request = crate::wire::RealmOpenControllerRequest<'static>;
10759
10760 type Response = ::fidl_next::WireResult<
10761 'static,
10762 crate::wire::RealmOpenControllerResponse,
10763 crate::wire::Error,
10764 >;
10765 }
10766
10767 pub struct OpenExposedDir;
10768
10769 impl ::fidl_next::Method for OpenExposedDir {
10770 const ORDINAL: u64 = 9194435320863127852;
10771
10772 type Protocol = crate::Realm;
10773
10774 type Request = crate::wire::RealmOpenExposedDirRequest<'static>;
10775
10776 type Response = ::fidl_next::WireResult<
10777 'static,
10778 crate::wire::RealmOpenExposedDirResponse,
10779 crate::wire::Error,
10780 >;
10781 }
10782
10783 pub struct CreateChild;
10784
10785 impl ::fidl_next::Method for CreateChild {
10786 const ORDINAL: u64 = 4892190024503489888;
10787
10788 type Protocol = crate::Realm;
10789
10790 type Request = crate::wire::RealmCreateChildRequest<'static>;
10791
10792 type Response = ::fidl_next::WireResult<
10793 'static,
10794 crate::wire::RealmCreateChildResponse,
10795 crate::wire::Error,
10796 >;
10797 }
10798
10799 pub struct DestroyChild;
10800
10801 impl ::fidl_next::Method for DestroyChild {
10802 const ORDINAL: u64 = 8203529889988252194;
10803
10804 type Protocol = crate::Realm;
10805
10806 type Request = crate::wire::RealmDestroyChildRequest<'static>;
10807
10808 type Response = ::fidl_next::WireResult<
10809 'static,
10810 crate::wire::RealmDestroyChildResponse,
10811 crate::wire::Error,
10812 >;
10813 }
10814
10815 pub struct ListChildren;
10816
10817 impl ::fidl_next::Method for ListChildren {
10818 const ORDINAL: u64 = 7532454435519185057;
10819
10820 type Protocol = crate::Realm;
10821
10822 type Request = crate::wire::RealmListChildrenRequest<'static>;
10823
10824 type Response = ::fidl_next::WireResult<
10825 'static,
10826 crate::wire::RealmListChildrenResponse,
10827 crate::wire::Error,
10828 >;
10829 }
10830
10831 pub struct GetResolvedInfo;
10832
10833 impl ::fidl_next::Method for GetResolvedInfo {
10834 const ORDINAL: u64 = 8308987710372188322;
10835
10836 type Protocol = crate::Realm;
10837
10838 type Request = ();
10839
10840 type Response = ::fidl_next::WireResult<
10841 'static,
10842 crate::wire::RealmGetResolvedInfoResponse<'static>,
10843 crate::wire::Error,
10844 >;
10845 }
10846
10847 pub struct GetChildOutputDictionary;
10848
10849 impl ::fidl_next::Method for GetChildOutputDictionary {
10850 const ORDINAL: u64 = 4781081784078915088;
10851
10852 type Protocol = crate::Realm;
10853
10854 type Request = crate::wire::RealmGetChildOutputDictionaryRequest<'static>;
10855
10856 type Response = ::fidl_next::WireResult<
10857 'static,
10858 crate::wire::RealmGetChildOutputDictionaryResponse,
10859 crate::wire::Error,
10860 >;
10861 }
10862
10863 mod ___detail {
10864
10865 pub struct OpenController<T0, T1> {
10866 child: T0,
10867
10868 controller: T1,
10869 }
10870
10871 impl<T0, T1> ::fidl_next::Encodable for OpenController<T0, T1>
10872 where
10873 T0: ::fidl_next::Encodable<
10874 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
10875 >,
10876 T1: ::fidl_next::Encodable<
10877 Encoded = ::fidl_next::ServerEnd<
10878 crate::Controller,
10879 ::fidl_next::fuchsia::WireChannel,
10880 >,
10881 >,
10882 {
10883 type Encoded = crate::wire::RealmOpenControllerRequest<'static>;
10884 }
10885
10886 unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenController<T0, T1>
10887 where
10888 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10889 ___E: ::fidl_next::Encoder,
10890 ___E: ::fidl_next::fuchsia::HandleEncoder,
10891 T0: ::fidl_next::Encode<
10892 ___E,
10893 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
10894 >,
10895 T1: ::fidl_next::Encode<
10896 ___E,
10897 Encoded = ::fidl_next::ServerEnd<
10898 crate::Controller,
10899 ::fidl_next::fuchsia::WireChannel,
10900 >,
10901 >,
10902 {
10903 #[inline]
10904 fn encode(
10905 self,
10906 encoder_: &mut ___E,
10907 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10908 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10909 ::fidl_next::munge! {
10910 let Self::Encoded {
10911 child,
10912 controller,
10913
10914 } = out_;
10915 }
10916
10917 ::fidl_next::Encode::encode(self.child, encoder_, child)?;
10918
10919 ::fidl_next::Encode::encode(self.controller, encoder_, controller)?;
10920
10921 Ok(())
10922 }
10923 }
10924
10925 pub struct OpenExposedDir<T0, T1> {
10926 child: T0,
10927
10928 exposed_dir: T1,
10929 }
10930
10931 impl<T0, T1> ::fidl_next::Encodable for OpenExposedDir<T0, T1>
10932 where
10933 T0: ::fidl_next::Encodable<
10934 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
10935 >,
10936 T1: ::fidl_next::Encodable<
10937 Encoded = ::fidl_next::ServerEnd<
10938 ::fidl_next_fuchsia_io::Directory,
10939 ::fidl_next::fuchsia::WireChannel,
10940 >,
10941 >,
10942 {
10943 type Encoded = crate::wire::RealmOpenExposedDirRequest<'static>;
10944 }
10945
10946 unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenExposedDir<T0, T1>
10947 where
10948 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10949 ___E: ::fidl_next::Encoder,
10950 ___E: ::fidl_next::fuchsia::HandleEncoder,
10951 T0: ::fidl_next::Encode<
10952 ___E,
10953 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
10954 >,
10955 T1: ::fidl_next::Encode<
10956 ___E,
10957 Encoded = ::fidl_next::ServerEnd<
10958 ::fidl_next_fuchsia_io::Directory,
10959 ::fidl_next::fuchsia::WireChannel,
10960 >,
10961 >,
10962 {
10963 #[inline]
10964 fn encode(
10965 self,
10966 encoder_: &mut ___E,
10967 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10968 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10969 ::fidl_next::munge! {
10970 let Self::Encoded {
10971 child,
10972 exposed_dir,
10973
10974 } = out_;
10975 }
10976
10977 ::fidl_next::Encode::encode(self.child, encoder_, child)?;
10978
10979 ::fidl_next::Encode::encode(self.exposed_dir, encoder_, exposed_dir)?;
10980
10981 Ok(())
10982 }
10983 }
10984
10985 pub struct CreateChild<T0, T1, T2> {
10986 collection: T0,
10987
10988 decl: T1,
10989
10990 args: T2,
10991 }
10992
10993 impl<T0, T1, T2> ::fidl_next::Encodable for CreateChild<T0, T1, T2>
10994 where
10995 T0: ::fidl_next::Encodable<
10996 Encoded = ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
10997 >,
10998 T1: ::fidl_next::Encodable<
10999 Encoded = ::fidl_next_fuchsia_component_decl::wire::Child<'static>,
11000 >,
11001 T2: ::fidl_next::Encodable<Encoded = crate::wire::CreateChildArgs<'static>>,
11002 {
11003 type Encoded = crate::wire::RealmCreateChildRequest<'static>;
11004 }
11005
11006 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<___E> for CreateChild<T0, T1, T2>
11007 where
11008 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11009 ___E: ::fidl_next::Encoder,
11010 ___E: ::fidl_next::fuchsia::HandleEncoder,
11011 T0: ::fidl_next::Encode<
11012 ___E,
11013 Encoded = ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
11014 >,
11015 T1: ::fidl_next::Encode<
11016 ___E,
11017 Encoded = ::fidl_next_fuchsia_component_decl::wire::Child<'static>,
11018 >,
11019 T2: ::fidl_next::Encode<___E, Encoded = crate::wire::CreateChildArgs<'static>>,
11020 {
11021 #[inline]
11022 fn encode(
11023 self,
11024 encoder_: &mut ___E,
11025 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11026 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11027 ::fidl_next::munge! {
11028 let Self::Encoded {
11029 collection,
11030 decl,
11031 args,
11032
11033 } = out_;
11034 }
11035
11036 ::fidl_next::Encode::encode(self.collection, encoder_, collection)?;
11037
11038 ::fidl_next::Encode::encode(self.decl, encoder_, decl)?;
11039
11040 ::fidl_next::Encode::encode(self.args, encoder_, args)?;
11041
11042 Ok(())
11043 }
11044 }
11045
11046 pub struct DestroyChild<T0> {
11047 child: T0,
11048 }
11049
11050 impl<T0> ::fidl_next::Encodable for DestroyChild<T0>
11051 where
11052 T0: ::fidl_next::Encodable<
11053 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
11054 >,
11055 {
11056 type Encoded = crate::wire::RealmDestroyChildRequest<'static>;
11057 }
11058
11059 unsafe impl<___E, T0> ::fidl_next::Encode<___E> for DestroyChild<T0>
11060 where
11061 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11062 ___E: ::fidl_next::Encoder,
11063 T0: ::fidl_next::Encode<
11064 ___E,
11065 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
11066 >,
11067 {
11068 #[inline]
11069 fn encode(
11070 self,
11071 encoder_: &mut ___E,
11072 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11073 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11074 ::fidl_next::munge! {
11075 let Self::Encoded {
11076 child,
11077
11078 } = out_;
11079 }
11080
11081 ::fidl_next::Encode::encode(self.child, encoder_, child)?;
11082
11083 Ok(())
11084 }
11085 }
11086
11087 pub struct ListChildren<T0, T1> {
11088 collection: T0,
11089
11090 iter: T1,
11091 }
11092
11093 impl<T0, T1> ::fidl_next::Encodable for ListChildren<T0, T1>
11094 where
11095 T0: ::fidl_next::Encodable<
11096 Encoded = ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
11097 >,
11098 T1: ::fidl_next::Encodable<
11099 Encoded = ::fidl_next::ServerEnd<
11100 crate::ChildIterator,
11101 ::fidl_next::fuchsia::WireChannel,
11102 >,
11103 >,
11104 {
11105 type Encoded = crate::wire::RealmListChildrenRequest<'static>;
11106 }
11107
11108 unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for ListChildren<T0, T1>
11109 where
11110 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11111 ___E: ::fidl_next::Encoder,
11112 ___E: ::fidl_next::fuchsia::HandleEncoder,
11113 T0: ::fidl_next::Encode<
11114 ___E,
11115 Encoded = ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
11116 >,
11117 T1: ::fidl_next::Encode<
11118 ___E,
11119 Encoded = ::fidl_next::ServerEnd<
11120 crate::ChildIterator,
11121 ::fidl_next::fuchsia::WireChannel,
11122 >,
11123 >,
11124 {
11125 #[inline]
11126 fn encode(
11127 self,
11128 encoder_: &mut ___E,
11129 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11130 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11131 ::fidl_next::munge! {
11132 let Self::Encoded {
11133 collection,
11134 iter,
11135
11136 } = out_;
11137 }
11138
11139 ::fidl_next::Encode::encode(self.collection, encoder_, collection)?;
11140
11141 ::fidl_next::Encode::encode(self.iter, encoder_, iter)?;
11142
11143 Ok(())
11144 }
11145 }
11146
11147 pub struct GetChildOutputDictionary<T0> {
11148 child: T0,
11149 }
11150
11151 impl<T0> ::fidl_next::Encodable for GetChildOutputDictionary<T0>
11152 where
11153 T0: ::fidl_next::Encodable<
11154 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
11155 >,
11156 {
11157 type Encoded = crate::wire::RealmGetChildOutputDictionaryRequest<'static>;
11158 }
11159
11160 unsafe impl<___E, T0> ::fidl_next::Encode<___E> for GetChildOutputDictionary<T0>
11161 where
11162 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11163 ___E: ::fidl_next::Encoder,
11164 ___E: ::fidl_next::fuchsia::HandleEncoder,
11165 T0: ::fidl_next::Encode<
11166 ___E,
11167 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
11168 >,
11169 {
11170 #[inline]
11171 fn encode(
11172 self,
11173 encoder_: &mut ___E,
11174 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11175 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11176 ::fidl_next::munge! {
11177 let Self::Encoded {
11178 child,
11179
11180 } = out_;
11181 }
11182
11183 ::fidl_next::Encode::encode(self.child, encoder_, child)?;
11184
11185 Ok(())
11186 }
11187 }
11188
11189 unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Realm
11190 where
11191 ___T: ::fidl_next::Transport,
11192 {
11193 type Client = RealmClient<___T>;
11194 type Server = RealmServer<___T>;
11195 }
11196
11197 #[repr(transparent)]
11199 pub struct RealmClient<___T: ::fidl_next::Transport> {
11200 #[allow(dead_code)]
11201 client: ::fidl_next::protocol::Client<___T>,
11202 }
11203
11204 impl<___T> RealmClient<___T>
11205 where
11206 ___T: ::fidl_next::Transport,
11207 {
11208 #[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"]
11209 pub fn open_controller(
11210 &self,
11211
11212 child: impl ::fidl_next::Encode<
11213 <___T as ::fidl_next::Transport>::SendBuffer,
11214 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
11215 >,
11216
11217 controller: impl ::fidl_next::Encode<
11218 <___T as ::fidl_next::Transport>::SendBuffer,
11219 Encoded = ::fidl_next::ServerEnd<
11220 crate::Controller,
11221 ::fidl_next::fuchsia::WireChannel,
11222 >,
11223 >,
11224 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenController, ___T>
11225 where
11226 <___T as ::fidl_next::Transport>::SendBuffer:
11227 ::fidl_next::encoder::InternalHandleEncoder,
11228 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11229 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11230 {
11231 self.open_controller_with(OpenController { child, controller })
11232 }
11233
11234 #[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"]
11235 pub fn open_controller_with<___R>(
11236 &self,
11237 request: ___R,
11238 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenController, ___T>
11239 where
11240 ___R: ::fidl_next::Encode<
11241 <___T as ::fidl_next::Transport>::SendBuffer,
11242 Encoded = crate::wire::RealmOpenControllerRequest<'static>,
11243 >,
11244 {
11245 ::fidl_next::TwoWayFuture::from_untyped(
11246 self.client.send_two_way(8165227925828473216, request),
11247 )
11248 }
11249
11250 #[doc = " Opens the exposed directory of a child component instance. When this\n function successfully returns, `exposed_dir` is bound to a directory\n that contains the capabilities which the child exposed to its realm\n via `ComponentDecl.exposes` (specified via \"expose\" declarations in\n the component\'s manifest). The child component will not start as a\n result of this call. Instead, starting will occur iff the parent binds\n to one of the capabilities contained within `exposed_dir`.\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"]
11251 pub fn open_exposed_dir(
11252 &self,
11253
11254 child: impl ::fidl_next::Encode<
11255 <___T as ::fidl_next::Transport>::SendBuffer,
11256 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
11257 >,
11258
11259 exposed_dir: impl ::fidl_next::Encode<
11260 <___T as ::fidl_next::Transport>::SendBuffer,
11261 Encoded = ::fidl_next::ServerEnd<
11262 ::fidl_next_fuchsia_io::Directory,
11263 ::fidl_next::fuchsia::WireChannel,
11264 >,
11265 >,
11266 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
11267 where
11268 <___T as ::fidl_next::Transport>::SendBuffer:
11269 ::fidl_next::encoder::InternalHandleEncoder,
11270 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11271 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11272 {
11273 self.open_exposed_dir_with(OpenExposedDir { child, exposed_dir })
11274 }
11275
11276 #[doc = " Opens the exposed directory of a child component instance. When this\n function successfully returns, `exposed_dir` is bound to a directory\n that contains the capabilities which the child exposed to its realm\n via `ComponentDecl.exposes` (specified via \"expose\" declarations in\n the component\'s manifest). The child component will not start as a\n result of this call. Instead, starting will occur iff the parent binds\n to one of the capabilities contained within `exposed_dir`.\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"]
11277 pub fn open_exposed_dir_with<___R>(
11278 &self,
11279 request: ___R,
11280 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
11281 where
11282 ___R: ::fidl_next::Encode<
11283 <___T as ::fidl_next::Transport>::SendBuffer,
11284 Encoded = crate::wire::RealmOpenExposedDirRequest<'static>,
11285 >,
11286 {
11287 ::fidl_next::TwoWayFuture::from_untyped(
11288 self.client.send_two_way(9194435320863127852, request),
11289 )
11290 }
11291
11292 #[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"]
11293 pub fn create_child(
11294 &self,
11295
11296 collection: impl ::fidl_next::Encode<
11297 <___T as ::fidl_next::Transport>::SendBuffer,
11298 Encoded = ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
11299 >,
11300
11301 decl: impl ::fidl_next::Encode<
11302 <___T as ::fidl_next::Transport>::SendBuffer,
11303 Encoded = ::fidl_next_fuchsia_component_decl::wire::Child<'static>,
11304 >,
11305
11306 args: impl ::fidl_next::Encode<
11307 <___T as ::fidl_next::Transport>::SendBuffer,
11308 Encoded = crate::wire::CreateChildArgs<'static>,
11309 >,
11310 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateChild, ___T>
11311 where
11312 <___T as ::fidl_next::Transport>::SendBuffer:
11313 ::fidl_next::encoder::InternalHandleEncoder,
11314 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11315 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11316 {
11317 self.create_child_with(CreateChild { collection, decl, args })
11318 }
11319
11320 #[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"]
11321 pub fn create_child_with<___R>(
11322 &self,
11323 request: ___R,
11324 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateChild, ___T>
11325 where
11326 ___R: ::fidl_next::Encode<
11327 <___T as ::fidl_next::Transport>::SendBuffer,
11328 Encoded = crate::wire::RealmCreateChildRequest<'static>,
11329 >,
11330 {
11331 ::fidl_next::TwoWayFuture::from_untyped(
11332 self.client.send_two_way(4892190024503489888, request),
11333 )
11334 }
11335
11336 #[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"]
11337 pub fn destroy_child(
11338 &self,
11339
11340 child: impl ::fidl_next::Encode<
11341 <___T as ::fidl_next::Transport>::SendBuffer,
11342 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
11343 >,
11344 ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyChild, ___T>
11345 where
11346 <___T as ::fidl_next::Transport>::SendBuffer:
11347 ::fidl_next::encoder::InternalHandleEncoder,
11348 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11349 {
11350 self.destroy_child_with(DestroyChild { child })
11351 }
11352
11353 #[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"]
11354 pub fn destroy_child_with<___R>(
11355 &self,
11356 request: ___R,
11357 ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyChild, ___T>
11358 where
11359 ___R: ::fidl_next::Encode<
11360 <___T as ::fidl_next::Transport>::SendBuffer,
11361 Encoded = crate::wire::RealmDestroyChildRequest<'static>,
11362 >,
11363 {
11364 ::fidl_next::TwoWayFuture::from_untyped(
11365 self.client.send_two_way(8203529889988252194, request),
11366 )
11367 }
11368
11369 #[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"]
11370 pub fn list_children(
11371 &self,
11372
11373 collection: impl ::fidl_next::Encode<
11374 <___T as ::fidl_next::Transport>::SendBuffer,
11375 Encoded = ::fidl_next_fuchsia_component_decl::wire::CollectionRef<'static>,
11376 >,
11377
11378 iter: impl ::fidl_next::Encode<
11379 <___T as ::fidl_next::Transport>::SendBuffer,
11380 Encoded = ::fidl_next::ServerEnd<
11381 crate::ChildIterator,
11382 ::fidl_next::fuchsia::WireChannel,
11383 >,
11384 >,
11385 ) -> ::fidl_next::TwoWayFuture<'_, super::ListChildren, ___T>
11386 where
11387 <___T as ::fidl_next::Transport>::SendBuffer:
11388 ::fidl_next::encoder::InternalHandleEncoder,
11389 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11390 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11391 {
11392 self.list_children_with(ListChildren { collection, iter })
11393 }
11394
11395 #[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"]
11396 pub fn list_children_with<___R>(
11397 &self,
11398 request: ___R,
11399 ) -> ::fidl_next::TwoWayFuture<'_, super::ListChildren, ___T>
11400 where
11401 ___R: ::fidl_next::Encode<
11402 <___T as ::fidl_next::Transport>::SendBuffer,
11403 Encoded = crate::wire::RealmListChildrenRequest<'static>,
11404 >,
11405 {
11406 ::fidl_next::TwoWayFuture::from_untyped(
11407 self.client.send_two_way(7532454435519185057, request),
11408 )
11409 }
11410
11411 #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
11412 pub fn get_resolved_info(
11413 &self,
11414 ) -> ::fidl_next::TwoWayFuture<'_, super::GetResolvedInfo, ___T> {
11415 ::fidl_next::TwoWayFuture::from_untyped(
11416 self.client.send_two_way(8308987710372188322, ()),
11417 )
11418 }
11419
11420 pub fn get_child_output_dictionary(
11421 &self,
11422
11423 child: impl ::fidl_next::Encode<
11424 <___T as ::fidl_next::Transport>::SendBuffer,
11425 Encoded = ::fidl_next_fuchsia_component_decl::wire::ChildRef<'static>,
11426 >,
11427 ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionary, ___T>
11428 where
11429 <___T as ::fidl_next::Transport>::SendBuffer:
11430 ::fidl_next::encoder::InternalHandleEncoder,
11431 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11432 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11433 {
11434 self.get_child_output_dictionary_with(GetChildOutputDictionary { child })
11435 }
11436
11437 pub fn get_child_output_dictionary_with<___R>(
11438 &self,
11439 request: ___R,
11440 ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionary, ___T>
11441 where
11442 ___R: ::fidl_next::Encode<
11443 <___T as ::fidl_next::Transport>::SendBuffer,
11444 Encoded = crate::wire::RealmGetChildOutputDictionaryRequest<'static>,
11445 >,
11446 {
11447 ::fidl_next::TwoWayFuture::from_untyped(
11448 self.client.send_two_way(4781081784078915088, request),
11449 )
11450 }
11451 }
11452
11453 #[repr(transparent)]
11455 pub struct RealmServer<___T: ::fidl_next::Transport> {
11456 server: ::fidl_next::protocol::Server<___T>,
11457 }
11458
11459 impl<___T> RealmServer<___T> where ___T: ::fidl_next::Transport {}
11460 }
11461}
11462
11463pub trait RealmClientHandler<
11467 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11468 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11469>
11470{
11471}
11472
11473impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Realm
11474where
11475 ___H: RealmClientHandler<___T> + ::core::marker::Send,
11476 ___T: ::fidl_next::Transport,
11477 <realm::OpenController as ::fidl_next::Method>::Response:
11478 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11479 <realm::OpenExposedDir as ::fidl_next::Method>::Response:
11480 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11481 <realm::CreateChild as ::fidl_next::Method>::Response:
11482 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11483 <realm::DestroyChild as ::fidl_next::Method>::Response:
11484 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11485 <realm::ListChildren as ::fidl_next::Method>::Response:
11486 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11487 <realm::GetResolvedInfo as ::fidl_next::Method>::Response:
11488 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11489 <realm::GetChildOutputDictionary as ::fidl_next::Method>::Response:
11490 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11491{
11492 async fn on_event(
11493 handler: &mut ___H,
11494 ordinal: u64,
11495 buffer: ___T::RecvBuffer,
11496 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11497 match ordinal {
11498 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
11499 }
11500 }
11501}
11502
11503pub trait RealmServerHandler<
11507 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11508 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11509>
11510{
11511 #[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"]
11512 fn open_controller(
11513 &mut self,
11514
11515 request: ::fidl_next::Request<realm::OpenController, ___T>,
11516
11517 responder: ::fidl_next::Responder<realm::OpenController, ___T>,
11518 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11519
11520 #[doc = " Opens the exposed directory of a child component instance. When this\n function successfully returns, `exposed_dir` is bound to a directory\n that contains the capabilities which the child exposed to its realm\n via `ComponentDecl.exposes` (specified via \"expose\" declarations in\n the component\'s manifest). The child component will not start as a\n result of this call. Instead, starting will occur iff the parent binds\n to one of the capabilities contained within `exposed_dir`.\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"]
11521 fn open_exposed_dir(
11522 &mut self,
11523
11524 request: ::fidl_next::Request<realm::OpenExposedDir, ___T>,
11525
11526 responder: ::fidl_next::Responder<realm::OpenExposedDir, ___T>,
11527 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11528
11529 #[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"]
11530 fn create_child(
11531 &mut self,
11532
11533 request: ::fidl_next::Request<realm::CreateChild, ___T>,
11534
11535 responder: ::fidl_next::Responder<realm::CreateChild, ___T>,
11536 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11537
11538 #[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"]
11539 fn destroy_child(
11540 &mut self,
11541
11542 request: ::fidl_next::Request<realm::DestroyChild, ___T>,
11543
11544 responder: ::fidl_next::Responder<realm::DestroyChild, ___T>,
11545 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11546
11547 #[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"]
11548 fn list_children(
11549 &mut self,
11550
11551 request: ::fidl_next::Request<realm::ListChildren, ___T>,
11552
11553 responder: ::fidl_next::Responder<realm::ListChildren, ___T>,
11554 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11555
11556 #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
11557 fn get_resolved_info(
11558 &mut self,
11559
11560 responder: ::fidl_next::Responder<realm::GetResolvedInfo, ___T>,
11561 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11562
11563 fn get_child_output_dictionary(
11564 &mut self,
11565
11566 request: ::fidl_next::Request<realm::GetChildOutputDictionary, ___T>,
11567
11568 responder: ::fidl_next::Responder<realm::GetChildOutputDictionary, ___T>,
11569 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11570}
11571
11572impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Realm
11573where
11574 ___H: RealmServerHandler<___T> + ::core::marker::Send,
11575 ___T: ::fidl_next::Transport,
11576 <realm::OpenController as ::fidl_next::Method>::Request:
11577 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11578 <realm::OpenExposedDir as ::fidl_next::Method>::Request:
11579 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11580 <realm::CreateChild as ::fidl_next::Method>::Request:
11581 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11582 <realm::DestroyChild as ::fidl_next::Method>::Request:
11583 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11584 <realm::ListChildren as ::fidl_next::Method>::Request:
11585 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11586 <realm::GetChildOutputDictionary as ::fidl_next::Method>::Request:
11587 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11588{
11589 async fn on_one_way(
11590 handler: &mut ___H,
11591 ordinal: u64,
11592 buffer: ___T::RecvBuffer,
11593 ) -> ::core::result::Result<
11594 (),
11595 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11596 > {
11597 match ordinal {
11598 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
11599 }
11600 }
11601
11602 async fn on_two_way(
11603 handler: &mut ___H,
11604 ordinal: u64,
11605 buffer: ___T::RecvBuffer,
11606 responder: ::fidl_next::protocol::Responder<___T>,
11607 ) -> ::core::result::Result<
11608 (),
11609 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11610 > {
11611 match ordinal {
11612 8165227925828473216 => {
11613 let responder = ::fidl_next::Responder::from_untyped(responder);
11614
11615 match ::fidl_next::DecoderExt::decode(buffer) {
11616 Ok(decoded) => {
11617 handler.open_controller(decoded, responder).await;
11618 Ok(())
11619 }
11620 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11621 ordinal: 8165227925828473216,
11622 error,
11623 }),
11624 }
11625 }
11626
11627 9194435320863127852 => {
11628 let responder = ::fidl_next::Responder::from_untyped(responder);
11629
11630 match ::fidl_next::DecoderExt::decode(buffer) {
11631 Ok(decoded) => {
11632 handler.open_exposed_dir(decoded, responder).await;
11633 Ok(())
11634 }
11635 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11636 ordinal: 9194435320863127852,
11637 error,
11638 }),
11639 }
11640 }
11641
11642 4892190024503489888 => {
11643 let responder = ::fidl_next::Responder::from_untyped(responder);
11644
11645 match ::fidl_next::DecoderExt::decode(buffer) {
11646 Ok(decoded) => {
11647 handler.create_child(decoded, responder).await;
11648 Ok(())
11649 }
11650 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11651 ordinal: 4892190024503489888,
11652 error,
11653 }),
11654 }
11655 }
11656
11657 8203529889988252194 => {
11658 let responder = ::fidl_next::Responder::from_untyped(responder);
11659
11660 match ::fidl_next::DecoderExt::decode(buffer) {
11661 Ok(decoded) => {
11662 handler.destroy_child(decoded, responder).await;
11663 Ok(())
11664 }
11665 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11666 ordinal: 8203529889988252194,
11667 error,
11668 }),
11669 }
11670 }
11671
11672 7532454435519185057 => {
11673 let responder = ::fidl_next::Responder::from_untyped(responder);
11674
11675 match ::fidl_next::DecoderExt::decode(buffer) {
11676 Ok(decoded) => {
11677 handler.list_children(decoded, responder).await;
11678 Ok(())
11679 }
11680 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11681 ordinal: 7532454435519185057,
11682 error,
11683 }),
11684 }
11685 }
11686
11687 8308987710372188322 => {
11688 let responder = ::fidl_next::Responder::from_untyped(responder);
11689
11690 handler.get_resolved_info(responder).await;
11691 Ok(())
11692 }
11693
11694 4781081784078915088 => {
11695 let responder = ::fidl_next::Responder::from_untyped(responder);
11696
11697 match ::fidl_next::DecoderExt::decode(buffer) {
11698 Ok(decoded) => {
11699 handler.get_child_output_dictionary(decoded, responder).await;
11700 Ok(())
11701 }
11702 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11703 ordinal: 4781081784078915088,
11704 error,
11705 }),
11706 }
11707 }
11708
11709 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
11710 }
11711 }
11712}
11713
11714#[derive(PartialEq, Debug)]
11716pub struct StorageAdmin;
11717
11718impl ::fidl_next::Discoverable for StorageAdmin {
11719 const PROTOCOL_NAME: &'static str = "fuchsia.component.StorageAdmin";
11720}
11721
11722pub mod storage_admin {
11723 pub mod prelude {
11724 pub use crate::{
11725 StorageAdmin, StorageAdminClientHandler, StorageAdminServerHandler, storage_admin,
11726 };
11727
11728 pub use crate::natural::DeletionError;
11729
11730 pub use crate::natural::Error;
11731
11732 pub use crate::natural::StatusError;
11733
11734 pub use crate::natural::StorageAdminDeleteComponentStorageRequest;
11735
11736 pub use crate::natural::StorageAdminListStorageInRealmRequest;
11737
11738 pub use crate::natural::StorageAdminOpenComponentStorageByIdRequest;
11739
11740 pub use crate::natural::StorageAdminOpenStorageRequest;
11741
11742 pub use crate::natural::StorageAdminDeleteAllStorageContentsResponse;
11743
11744 pub use crate::natural::StorageAdminDeleteComponentStorageResponse;
11745
11746 pub use crate::natural::StorageAdminListStorageInRealmResponse;
11747
11748 pub use crate::natural::StorageAdminOpenComponentStorageByIdResponse;
11749
11750 pub use crate::natural::StorageAdminOpenStorageResponse;
11751
11752 pub use crate::natural::StorageStatus;
11753 }
11754
11755 pub struct OpenStorage;
11756
11757 impl ::fidl_next::Method for OpenStorage {
11758 const ORDINAL: u64 = 7848267339832116087;
11759
11760 type Protocol = crate::StorageAdmin;
11761
11762 type Request = crate::wire::StorageAdminOpenStorageRequest<'static>;
11763
11764 type Response = ::fidl_next::WireResult<
11765 'static,
11766 crate::wire::StorageAdminOpenStorageResponse,
11767 crate::wire::Error,
11768 >;
11769 }
11770
11771 pub struct ListStorageInRealm;
11772
11773 impl ::fidl_next::Method for ListStorageInRealm {
11774 const ORDINAL: u64 = 8525152599685368827;
11775
11776 type Protocol = crate::StorageAdmin;
11777
11778 type Request = crate::wire::StorageAdminListStorageInRealmRequest<'static>;
11779
11780 type Response = ::fidl_next::WireResult<
11781 'static,
11782 crate::wire::StorageAdminListStorageInRealmResponse,
11783 crate::wire::Error,
11784 >;
11785 }
11786
11787 pub struct OpenComponentStorageById;
11788
11789 impl ::fidl_next::Method for OpenComponentStorageById {
11790 const ORDINAL: u64 = 5188727505160068593;
11791
11792 type Protocol = crate::StorageAdmin;
11793
11794 type Request = crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>;
11795
11796 type Response = ::fidl_next::WireResult<
11797 'static,
11798 crate::wire::StorageAdminOpenComponentStorageByIdResponse,
11799 crate::wire::Error,
11800 >;
11801 }
11802
11803 pub struct DeleteComponentStorage;
11804
11805 impl ::fidl_next::Method for DeleteComponentStorage {
11806 const ORDINAL: u64 = 1618975681517712474;
11807
11808 type Protocol = crate::StorageAdmin;
11809
11810 type Request = crate::wire::StorageAdminDeleteComponentStorageRequest<'static>;
11811
11812 type Response = ::fidl_next::WireResult<
11813 'static,
11814 crate::wire::StorageAdminDeleteComponentStorageResponse,
11815 crate::wire::Error,
11816 >;
11817 }
11818
11819 pub struct GetStatus;
11820
11821 impl ::fidl_next::Method for GetStatus {
11822 const ORDINAL: u64 = 8586643915409794760;
11823
11824 type Protocol = crate::StorageAdmin;
11825
11826 type Request = ();
11827
11828 type Response = ::fidl_next::WireResult<
11829 'static,
11830 crate::wire::StorageStatus<'static>,
11831 crate::wire::StatusError,
11832 >;
11833 }
11834
11835 pub struct DeleteAllStorageContents;
11836
11837 impl ::fidl_next::Method for DeleteAllStorageContents {
11838 const ORDINAL: u64 = 3380374508900862683;
11839
11840 type Protocol = crate::StorageAdmin;
11841
11842 type Request = ();
11843
11844 type Response = ::fidl_next::WireResult<
11845 'static,
11846 crate::wire::StorageAdminDeleteAllStorageContentsResponse,
11847 crate::wire::DeletionError,
11848 >;
11849 }
11850
11851 mod ___detail {
11852
11853 pub struct OpenStorage<T0, T1> {
11854 relative_moniker: T0,
11855
11856 object: T1,
11857 }
11858
11859 impl<T0, T1> ::fidl_next::Encodable for OpenStorage<T0, T1>
11860 where
11861 T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
11862 T1: ::fidl_next::Encodable<
11863 Encoded = ::fidl_next::ServerEnd<
11864 ::fidl_next_fuchsia_io::Node,
11865 ::fidl_next::fuchsia::WireChannel,
11866 >,
11867 >,
11868 {
11869 type Encoded = crate::wire::StorageAdminOpenStorageRequest<'static>;
11870 }
11871
11872 unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenStorage<T0, T1>
11873 where
11874 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11875 ___E: ::fidl_next::Encoder,
11876 ___E: ::fidl_next::fuchsia::HandleEncoder,
11877 T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
11878 T1: ::fidl_next::Encode<
11879 ___E,
11880 Encoded = ::fidl_next::ServerEnd<
11881 ::fidl_next_fuchsia_io::Node,
11882 ::fidl_next::fuchsia::WireChannel,
11883 >,
11884 >,
11885 {
11886 #[inline]
11887 fn encode(
11888 self,
11889 encoder_: &mut ___E,
11890 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11891 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11892 ::fidl_next::munge! {
11893 let Self::Encoded {
11894 relative_moniker,
11895 object,
11896
11897 } = out_;
11898 }
11899
11900 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
11901
11902 ::fidl_next::Encode::encode(self.object, encoder_, object)?;
11903
11904 Ok(())
11905 }
11906 }
11907
11908 pub struct ListStorageInRealm<T0, T1> {
11909 relative_moniker: T0,
11910
11911 iterator: T1,
11912 }
11913
11914 impl<T0, T1> ::fidl_next::Encodable for ListStorageInRealm<T0, T1>
11915 where
11916 T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
11917 T1: ::fidl_next::Encodable<
11918 Encoded = ::fidl_next::ServerEnd<
11919 crate::StorageIterator,
11920 ::fidl_next::fuchsia::WireChannel,
11921 >,
11922 >,
11923 {
11924 type Encoded = crate::wire::StorageAdminListStorageInRealmRequest<'static>;
11925 }
11926
11927 unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for ListStorageInRealm<T0, T1>
11928 where
11929 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11930 ___E: ::fidl_next::Encoder,
11931 ___E: ::fidl_next::fuchsia::HandleEncoder,
11932 T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
11933 T1: ::fidl_next::Encode<
11934 ___E,
11935 Encoded = ::fidl_next::ServerEnd<
11936 crate::StorageIterator,
11937 ::fidl_next::fuchsia::WireChannel,
11938 >,
11939 >,
11940 {
11941 #[inline]
11942 fn encode(
11943 self,
11944 encoder_: &mut ___E,
11945 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11946 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11947 ::fidl_next::munge! {
11948 let Self::Encoded {
11949 relative_moniker,
11950 iterator,
11951
11952 } = out_;
11953 }
11954
11955 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
11956
11957 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator)?;
11958
11959 Ok(())
11960 }
11961 }
11962
11963 pub struct OpenComponentStorageById<T0, T1> {
11964 id: T0,
11965
11966 object: T1,
11967 }
11968
11969 impl<T0, T1> ::fidl_next::Encodable for OpenComponentStorageById<T0, T1>
11970 where
11971 T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
11972 T1: ::fidl_next::Encodable<
11973 Encoded = ::fidl_next::ServerEnd<
11974 ::fidl_next_fuchsia_io::Node,
11975 ::fidl_next::fuchsia::WireChannel,
11976 >,
11977 >,
11978 {
11979 type Encoded = crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>;
11980 }
11981
11982 unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenComponentStorageById<T0, T1>
11983 where
11984 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11985 ___E: ::fidl_next::Encoder,
11986 ___E: ::fidl_next::fuchsia::HandleEncoder,
11987 T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
11988 T1: ::fidl_next::Encode<
11989 ___E,
11990 Encoded = ::fidl_next::ServerEnd<
11991 ::fidl_next_fuchsia_io::Node,
11992 ::fidl_next::fuchsia::WireChannel,
11993 >,
11994 >,
11995 {
11996 #[inline]
11997 fn encode(
11998 self,
11999 encoder_: &mut ___E,
12000 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
12001 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12002 ::fidl_next::munge! {
12003 let Self::Encoded {
12004 id,
12005 object,
12006
12007 } = out_;
12008 }
12009
12010 ::fidl_next::Encode::encode(self.id, encoder_, id)?;
12011
12012 ::fidl_next::Encode::encode(self.object, encoder_, object)?;
12013
12014 Ok(())
12015 }
12016 }
12017
12018 pub struct DeleteComponentStorage<T0> {
12019 relative_moniker: T0,
12020 }
12021
12022 impl<T0> ::fidl_next::Encodable for DeleteComponentStorage<T0>
12023 where
12024 T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
12025 {
12026 type Encoded = crate::wire::StorageAdminDeleteComponentStorageRequest<'static>;
12027 }
12028
12029 unsafe impl<___E, T0> ::fidl_next::Encode<___E> for DeleteComponentStorage<T0>
12030 where
12031 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12032 ___E: ::fidl_next::Encoder,
12033 T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
12034 {
12035 #[inline]
12036 fn encode(
12037 self,
12038 encoder_: &mut ___E,
12039 out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
12040 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12041 ::fidl_next::munge! {
12042 let Self::Encoded {
12043 relative_moniker,
12044
12045 } = out_;
12046 }
12047
12048 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
12049
12050 Ok(())
12051 }
12052 }
12053
12054 unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::StorageAdmin
12055 where
12056 ___T: ::fidl_next::Transport,
12057 {
12058 type Client = StorageAdminClient<___T>;
12059 type Server = StorageAdminServer<___T>;
12060 }
12061
12062 #[repr(transparent)]
12064 pub struct StorageAdminClient<___T: ::fidl_next::Transport> {
12065 #[allow(dead_code)]
12066 client: ::fidl_next::protocol::Client<___T>,
12067 }
12068
12069 impl<___T> StorageAdminClient<___T>
12070 where
12071 ___T: ::fidl_next::Transport,
12072 {
12073 #[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"]
12074 pub fn open_storage(
12075 &self,
12076
12077 relative_moniker: impl ::fidl_next::Encode<
12078 <___T as ::fidl_next::Transport>::SendBuffer,
12079 Encoded = ::fidl_next::WireString<'static>,
12080 >,
12081
12082 object: impl ::fidl_next::Encode<
12083 <___T as ::fidl_next::Transport>::SendBuffer,
12084 Encoded = ::fidl_next::ServerEnd<
12085 ::fidl_next_fuchsia_io::Node,
12086 ::fidl_next::fuchsia::WireChannel,
12087 >,
12088 >,
12089 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenStorage, ___T>
12090 where
12091 <___T as ::fidl_next::Transport>::SendBuffer:
12092 ::fidl_next::encoder::InternalHandleEncoder,
12093 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12094 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12095 {
12096 self.open_storage_with(OpenStorage { relative_moniker, object })
12097 }
12098
12099 #[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"]
12100 pub fn open_storage_with<___R>(
12101 &self,
12102 request: ___R,
12103 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenStorage, ___T>
12104 where
12105 ___R: ::fidl_next::Encode<
12106 <___T as ::fidl_next::Transport>::SendBuffer,
12107 Encoded = crate::wire::StorageAdminOpenStorageRequest<'static>,
12108 >,
12109 {
12110 ::fidl_next::TwoWayFuture::from_untyped(
12111 self.client.send_two_way(7848267339832116087, request),
12112 )
12113 }
12114
12115 #[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"]
12116 pub fn list_storage_in_realm(
12117 &self,
12118
12119 relative_moniker: impl ::fidl_next::Encode<
12120 <___T as ::fidl_next::Transport>::SendBuffer,
12121 Encoded = ::fidl_next::WireString<'static>,
12122 >,
12123
12124 iterator: impl ::fidl_next::Encode<
12125 <___T as ::fidl_next::Transport>::SendBuffer,
12126 Encoded = ::fidl_next::ServerEnd<
12127 crate::StorageIterator,
12128 ::fidl_next::fuchsia::WireChannel,
12129 >,
12130 >,
12131 ) -> ::fidl_next::TwoWayFuture<'_, super::ListStorageInRealm, ___T>
12132 where
12133 <___T as ::fidl_next::Transport>::SendBuffer:
12134 ::fidl_next::encoder::InternalHandleEncoder,
12135 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12136 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12137 {
12138 self.list_storage_in_realm_with(ListStorageInRealm { relative_moniker, iterator })
12139 }
12140
12141 #[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"]
12142 pub fn list_storage_in_realm_with<___R>(
12143 &self,
12144 request: ___R,
12145 ) -> ::fidl_next::TwoWayFuture<'_, super::ListStorageInRealm, ___T>
12146 where
12147 ___R: ::fidl_next::Encode<
12148 <___T as ::fidl_next::Transport>::SendBuffer,
12149 Encoded = crate::wire::StorageAdminListStorageInRealmRequest<'static>,
12150 >,
12151 {
12152 ::fidl_next::TwoWayFuture::from_untyped(
12153 self.client.send_two_way(8525152599685368827, request),
12154 )
12155 }
12156
12157 #[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"]
12158 pub fn open_component_storage_by_id(
12159 &self,
12160
12161 id: impl ::fidl_next::Encode<
12162 <___T as ::fidl_next::Transport>::SendBuffer,
12163 Encoded = ::fidl_next::WireString<'static>,
12164 >,
12165
12166 object: impl ::fidl_next::Encode<
12167 <___T as ::fidl_next::Transport>::SendBuffer,
12168 Encoded = ::fidl_next::ServerEnd<
12169 ::fidl_next_fuchsia_io::Node,
12170 ::fidl_next::fuchsia::WireChannel,
12171 >,
12172 >,
12173 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenComponentStorageById, ___T>
12174 where
12175 <___T as ::fidl_next::Transport>::SendBuffer:
12176 ::fidl_next::encoder::InternalHandleEncoder,
12177 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12178 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12179 {
12180 self.open_component_storage_by_id_with(OpenComponentStorageById { id, object })
12181 }
12182
12183 #[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"]
12184 pub fn open_component_storage_by_id_with<___R>(
12185 &self,
12186 request: ___R,
12187 ) -> ::fidl_next::TwoWayFuture<'_, super::OpenComponentStorageById, ___T>
12188 where
12189 ___R: ::fidl_next::Encode<
12190 <___T as ::fidl_next::Transport>::SendBuffer,
12191 Encoded = crate::wire::StorageAdminOpenComponentStorageByIdRequest<'static>,
12192 >,
12193 {
12194 ::fidl_next::TwoWayFuture::from_untyped(
12195 self.client.send_two_way(5188727505160068593, request),
12196 )
12197 }
12198
12199 #[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"]
12200 pub fn delete_component_storage(
12201 &self,
12202
12203 relative_moniker: impl ::fidl_next::Encode<
12204 <___T as ::fidl_next::Transport>::SendBuffer,
12205 Encoded = ::fidl_next::WireString<'static>,
12206 >,
12207 ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteComponentStorage, ___T>
12208 where
12209 <___T as ::fidl_next::Transport>::SendBuffer:
12210 ::fidl_next::encoder::InternalHandleEncoder,
12211 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12212 {
12213 self.delete_component_storage_with(DeleteComponentStorage { relative_moniker })
12214 }
12215
12216 #[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"]
12217 pub fn delete_component_storage_with<___R>(
12218 &self,
12219 request: ___R,
12220 ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteComponentStorage, ___T>
12221 where
12222 ___R: ::fidl_next::Encode<
12223 <___T as ::fidl_next::Transport>::SendBuffer,
12224 Encoded = crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
12225 >,
12226 {
12227 ::fidl_next::TwoWayFuture::from_untyped(
12228 self.client.send_two_way(1618975681517712474, request),
12229 )
12230 }
12231
12232 #[doc = " Get the current status of the storage.\n"]
12233 pub fn get_status(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetStatus, ___T> {
12234 ::fidl_next::TwoWayFuture::from_untyped(
12235 self.client.send_two_way(8586643915409794760, ()),
12236 )
12237 }
12238
12239 #[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"]
12240 pub fn delete_all_storage_contents(
12241 &self,
12242 ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteAllStorageContents, ___T> {
12243 ::fidl_next::TwoWayFuture::from_untyped(
12244 self.client.send_two_way(3380374508900862683, ()),
12245 )
12246 }
12247 }
12248
12249 #[repr(transparent)]
12251 pub struct StorageAdminServer<___T: ::fidl_next::Transport> {
12252 server: ::fidl_next::protocol::Server<___T>,
12253 }
12254
12255 impl<___T> StorageAdminServer<___T> where ___T: ::fidl_next::Transport {}
12256 }
12257}
12258
12259pub trait StorageAdminClientHandler<
12263 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12264 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12265>
12266{
12267}
12268
12269impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for StorageAdmin
12270where
12271 ___H: StorageAdminClientHandler<___T> + ::core::marker::Send,
12272 ___T: ::fidl_next::Transport,
12273 <storage_admin::OpenStorage as ::fidl_next::Method>::Response:
12274 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12275 <storage_admin::ListStorageInRealm as ::fidl_next::Method>::Response:
12276 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12277 <storage_admin::OpenComponentStorageById as ::fidl_next::Method>::Response:
12278 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12279 <storage_admin::DeleteComponentStorage as ::fidl_next::Method>::Response:
12280 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12281 <storage_admin::GetStatus as ::fidl_next::Method>::Response:
12282 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12283 <storage_admin::DeleteAllStorageContents as ::fidl_next::Method>::Response:
12284 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12285{
12286 async fn on_event(
12287 handler: &mut ___H,
12288 ordinal: u64,
12289 buffer: ___T::RecvBuffer,
12290 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12291 match ordinal {
12292 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12293 }
12294 }
12295}
12296
12297pub trait StorageAdminServerHandler<
12301 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12302 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12303>
12304{
12305 #[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"]
12306 fn open_storage(
12307 &mut self,
12308
12309 request: ::fidl_next::Request<storage_admin::OpenStorage, ___T>,
12310
12311 responder: ::fidl_next::Responder<storage_admin::OpenStorage, ___T>,
12312 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12313
12314 #[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"]
12315 fn list_storage_in_realm(
12316 &mut self,
12317
12318 request: ::fidl_next::Request<storage_admin::ListStorageInRealm, ___T>,
12319
12320 responder: ::fidl_next::Responder<storage_admin::ListStorageInRealm, ___T>,
12321 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12322
12323 #[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"]
12324 fn open_component_storage_by_id(
12325 &mut self,
12326
12327 request: ::fidl_next::Request<storage_admin::OpenComponentStorageById, ___T>,
12328
12329 responder: ::fidl_next::Responder<storage_admin::OpenComponentStorageById, ___T>,
12330 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12331
12332 #[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"]
12333 fn delete_component_storage(
12334 &mut self,
12335
12336 request: ::fidl_next::Request<storage_admin::DeleteComponentStorage, ___T>,
12337
12338 responder: ::fidl_next::Responder<storage_admin::DeleteComponentStorage, ___T>,
12339 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12340
12341 #[doc = " Get the current status of the storage.\n"]
12342 fn get_status(
12343 &mut self,
12344
12345 responder: ::fidl_next::Responder<storage_admin::GetStatus, ___T>,
12346 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12347
12348 #[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"]
12349 fn delete_all_storage_contents(
12350 &mut self,
12351
12352 responder: ::fidl_next::Responder<storage_admin::DeleteAllStorageContents, ___T>,
12353 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12354}
12355
12356impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for StorageAdmin
12357where
12358 ___H: StorageAdminServerHandler<___T> + ::core::marker::Send,
12359 ___T: ::fidl_next::Transport,
12360 <storage_admin::OpenStorage as ::fidl_next::Method>::Request:
12361 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12362 <storage_admin::ListStorageInRealm as ::fidl_next::Method>::Request:
12363 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12364 <storage_admin::OpenComponentStorageById as ::fidl_next::Method>::Request:
12365 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12366 <storage_admin::DeleteComponentStorage as ::fidl_next::Method>::Request:
12367 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12368{
12369 async fn on_one_way(
12370 handler: &mut ___H,
12371 ordinal: u64,
12372 buffer: ___T::RecvBuffer,
12373 ) -> ::core::result::Result<
12374 (),
12375 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12376 > {
12377 match ordinal {
12378 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12379 }
12380 }
12381
12382 async fn on_two_way(
12383 handler: &mut ___H,
12384 ordinal: u64,
12385 buffer: ___T::RecvBuffer,
12386 responder: ::fidl_next::protocol::Responder<___T>,
12387 ) -> ::core::result::Result<
12388 (),
12389 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12390 > {
12391 match ordinal {
12392 7848267339832116087 => {
12393 let responder = ::fidl_next::Responder::from_untyped(responder);
12394
12395 match ::fidl_next::DecoderExt::decode(buffer) {
12396 Ok(decoded) => {
12397 handler.open_storage(decoded, responder).await;
12398 Ok(())
12399 }
12400 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12401 ordinal: 7848267339832116087,
12402 error,
12403 }),
12404 }
12405 }
12406
12407 8525152599685368827 => {
12408 let responder = ::fidl_next::Responder::from_untyped(responder);
12409
12410 match ::fidl_next::DecoderExt::decode(buffer) {
12411 Ok(decoded) => {
12412 handler.list_storage_in_realm(decoded, responder).await;
12413 Ok(())
12414 }
12415 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12416 ordinal: 8525152599685368827,
12417 error,
12418 }),
12419 }
12420 }
12421
12422 5188727505160068593 => {
12423 let responder = ::fidl_next::Responder::from_untyped(responder);
12424
12425 match ::fidl_next::DecoderExt::decode(buffer) {
12426 Ok(decoded) => {
12427 handler.open_component_storage_by_id(decoded, responder).await;
12428 Ok(())
12429 }
12430 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12431 ordinal: 5188727505160068593,
12432 error,
12433 }),
12434 }
12435 }
12436
12437 1618975681517712474 => {
12438 let responder = ::fidl_next::Responder::from_untyped(responder);
12439
12440 match ::fidl_next::DecoderExt::decode(buffer) {
12441 Ok(decoded) => {
12442 handler.delete_component_storage(decoded, responder).await;
12443 Ok(())
12444 }
12445 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12446 ordinal: 1618975681517712474,
12447 error,
12448 }),
12449 }
12450 }
12451
12452 8586643915409794760 => {
12453 let responder = ::fidl_next::Responder::from_untyped(responder);
12454
12455 handler.get_status(responder).await;
12456 Ok(())
12457 }
12458
12459 3380374508900862683 => {
12460 let responder = ::fidl_next::Responder::from_untyped(responder);
12461
12462 handler.delete_all_storage_contents(responder).await;
12463 Ok(())
12464 }
12465
12466 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12467 }
12468 }
12469}
12470
12471#[doc = " An iterator protocol for returning a set of components using a storage\n capability. See |StorageAdmin.ListStorageInRealm| for more information.\n"]
12473#[derive(PartialEq, Debug)]
12474pub struct StorageIterator;
12475
12476pub mod storage_iterator {
12477 pub mod prelude {
12478 pub use crate::{
12479 StorageIterator, StorageIteratorClientHandler, StorageIteratorServerHandler,
12480 storage_iterator,
12481 };
12482
12483 pub use crate::natural::StorageIteratorNextResponse;
12484 }
12485
12486 pub struct Next;
12487
12488 impl ::fidl_next::Method for Next {
12489 const ORDINAL: u64 = 8821181615713557362;
12490
12491 type Protocol = crate::StorageIterator;
12492
12493 type Request = ();
12494
12495 type Response = crate::wire::StorageIteratorNextResponse<'static>;
12496 }
12497
12498 mod ___detail {
12499
12500 unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::StorageIterator
12501 where
12502 ___T: ::fidl_next::Transport,
12503 {
12504 type Client = StorageIteratorClient<___T>;
12505 type Server = StorageIteratorServer<___T>;
12506 }
12507
12508 #[repr(transparent)]
12510 pub struct StorageIteratorClient<___T: ::fidl_next::Transport> {
12511 #[allow(dead_code)]
12512 client: ::fidl_next::protocol::Client<___T>,
12513 }
12514
12515 impl<___T> StorageIteratorClient<___T>
12516 where
12517 ___T: ::fidl_next::Transport,
12518 {
12519 #[doc = " Retrieve the next set of components using the storage capability. The\n returned monikers are relative to the component that declares the\n storage capability. Returns an empty vector after all components have\n been returned.\n"]
12520 pub fn next(&self) -> ::fidl_next::TwoWayFuture<'_, super::Next, ___T> {
12521 ::fidl_next::TwoWayFuture::from_untyped(
12522 self.client.send_two_way(8821181615713557362, ()),
12523 )
12524 }
12525 }
12526
12527 #[repr(transparent)]
12529 pub struct StorageIteratorServer<___T: ::fidl_next::Transport> {
12530 server: ::fidl_next::protocol::Server<___T>,
12531 }
12532
12533 impl<___T> StorageIteratorServer<___T> where ___T: ::fidl_next::Transport {}
12534 }
12535}
12536
12537pub trait StorageIteratorClientHandler<
12541 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12542 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12543>
12544{
12545}
12546
12547impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for StorageIterator
12548where
12549 ___H: StorageIteratorClientHandler<___T> + ::core::marker::Send,
12550 ___T: ::fidl_next::Transport,
12551 <storage_iterator::Next as ::fidl_next::Method>::Response:
12552 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12553{
12554 async fn on_event(
12555 handler: &mut ___H,
12556 ordinal: u64,
12557 buffer: ___T::RecvBuffer,
12558 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12559 match ordinal {
12560 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12561 }
12562 }
12563}
12564
12565pub trait StorageIteratorServerHandler<
12569 #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12570 #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12571>
12572{
12573 #[doc = " Retrieve the next set of components using the storage capability. The\n returned monikers are relative to the component that declares the\n storage capability. Returns an empty vector after all components have\n been returned.\n"]
12574 fn next(
12575 &mut self,
12576
12577 responder: ::fidl_next::Responder<storage_iterator::Next, ___T>,
12578 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12579}
12580
12581impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for StorageIterator
12582where
12583 ___H: StorageIteratorServerHandler<___T> + ::core::marker::Send,
12584 ___T: ::fidl_next::Transport,
12585{
12586 async fn on_one_way(
12587 handler: &mut ___H,
12588 ordinal: u64,
12589 buffer: ___T::RecvBuffer,
12590 ) -> ::core::result::Result<
12591 (),
12592 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12593 > {
12594 match ordinal {
12595 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12596 }
12597 }
12598
12599 async fn on_two_way(
12600 handler: &mut ___H,
12601 ordinal: u64,
12602 buffer: ___T::RecvBuffer,
12603 responder: ::fidl_next::protocol::Responder<___T>,
12604 ) -> ::core::result::Result<
12605 (),
12606 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12607 > {
12608 match ordinal {
12609 8821181615713557362 => {
12610 let responder = ::fidl_next::Responder::from_untyped(responder);
12611
12612 handler.next(responder).await;
12613 Ok(())
12614 }
12615
12616 ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12617 }
12618 }
12619}
12620
12621pub mod compat {
12623
12624 #[cfg(target_os = "fuchsia")]
12625 pub type BinderProxy = ::fidl_next::Client<crate::Binder>;
12628
12629 impl ::fidl_next::CompatFrom<crate::Binder> for ::fidl_fuchsia_component::BinderMarker {
12630 fn compat_from(_: crate::Binder) -> Self {
12631 Self
12632 }
12633 }
12634
12635 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::BinderMarker> for crate::Binder {
12636 fn compat_from(_: ::fidl_fuchsia_component::BinderMarker) -> Self {
12637 Self
12638 }
12639 }
12640
12641 #[cfg(target_os = "fuchsia")]
12642
12643 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::BinderProxy> for crate::Binder {
12644 fn client_compat_from(
12645 proxy: ::fidl_fuchsia_component::BinderProxy,
12646 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
12647 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12648 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12649 ::fidl_next::ClientDispatcher::new(client_end)
12650 }
12651 }
12652
12653 impl ::fidl_next::CompatFrom<crate::CapabilityRequestedPayload>
12654 for ::fidl_fuchsia_component::CapabilityRequestedPayload
12655 {
12656 fn compat_from(value: crate::CapabilityRequestedPayload) -> Self {
12657 Self {
12658 name: ::fidl_next::CompatFrom::compat_from(value.name),
12659
12660 capability: ::fidl_next::CompatFrom::compat_from(value.capability),
12661
12662 __source_breaking: ::fidl::marker::SourceBreaking,
12663 }
12664 }
12665 }
12666
12667 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::CapabilityRequestedPayload>
12668 for crate::CapabilityRequestedPayload
12669 {
12670 fn compat_from(value: ::fidl_fuchsia_component::CapabilityRequestedPayload) -> Self {
12671 Self {
12672 name: ::fidl_next::CompatFrom::compat_from(value.name),
12673
12674 capability: ::fidl_next::CompatFrom::compat_from(value.capability),
12675 }
12676 }
12677 }
12678
12679 impl ::fidl_next::CompatFrom<crate::ChildIteratorNextResponse>
12680 for ::fidl_fuchsia_component::ChildIteratorNextResponse
12681 {
12682 #[inline]
12683 fn compat_from(value: crate::ChildIteratorNextResponse) -> Self {
12684 Self { children: ::fidl_next::CompatFrom::compat_from(value.children) }
12685 }
12686 }
12687
12688 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ChildIteratorNextResponse>
12689 for crate::ChildIteratorNextResponse
12690 {
12691 #[inline]
12692 fn compat_from(value: ::fidl_fuchsia_component::ChildIteratorNextResponse) -> Self {
12693 Self { children: ::fidl_next::CompatFrom::compat_from(value.children) }
12694 }
12695 }
12696
12697 #[cfg(target_os = "fuchsia")]
12698 pub type ChildIteratorProxy = ::fidl_next::Client<crate::ChildIterator>;
12701
12702 impl ::fidl_next::CompatFrom<crate::ChildIterator>
12703 for ::fidl_fuchsia_component::ChildIteratorMarker
12704 {
12705 fn compat_from(_: crate::ChildIterator) -> Self {
12706 Self
12707 }
12708 }
12709
12710 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ChildIteratorMarker>
12711 for crate::ChildIterator
12712 {
12713 fn compat_from(_: ::fidl_fuchsia_component::ChildIteratorMarker) -> Self {
12714 Self
12715 }
12716 }
12717
12718 #[cfg(target_os = "fuchsia")]
12719
12720 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ChildIteratorProxy>
12721 for crate::ChildIterator
12722 {
12723 fn client_compat_from(
12724 proxy: ::fidl_fuchsia_component::ChildIteratorProxy,
12725 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
12726 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12727 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12728 ::fidl_next::ClientDispatcher::new(client_end)
12729 }
12730 }
12731
12732 impl ::fidl_next::CompatFrom<crate::ControllerIsStartedResponse>
12733 for ::fidl_fuchsia_component::ControllerIsStartedResponse
12734 {
12735 #[inline]
12736 fn compat_from(value: crate::ControllerIsStartedResponse) -> Self {
12737 Self { is_started: ::fidl_next::CompatFrom::compat_from(value.is_started) }
12738 }
12739 }
12740
12741 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerIsStartedResponse>
12742 for crate::ControllerIsStartedResponse
12743 {
12744 #[inline]
12745 fn compat_from(value: ::fidl_fuchsia_component::ControllerIsStartedResponse) -> Self {
12746 Self { is_started: ::fidl_next::CompatFrom::compat_from(value.is_started) }
12747 }
12748 }
12749
12750 impl ::fidl_next::CompatFrom<crate::Error> for ::fidl_fuchsia_component::Error {
12751 fn compat_from(value: crate::Error) -> Self {
12752 match value {
12753 crate::Error::Internal => Self::Internal,
12754
12755 crate::Error::InvalidArguments => Self::InvalidArguments,
12756
12757 crate::Error::Unsupported => Self::Unsupported,
12758
12759 crate::Error::AccessDenied => Self::AccessDenied,
12760
12761 crate::Error::InstanceNotFound => Self::InstanceNotFound,
12762
12763 crate::Error::InstanceAlreadyExists => Self::InstanceAlreadyExists,
12764
12765 crate::Error::InstanceCannotStart => Self::InstanceCannotStart,
12766
12767 crate::Error::InstanceCannotResolve => Self::InstanceCannotResolve,
12768
12769 crate::Error::CollectionNotFound => Self::CollectionNotFound,
12770
12771 crate::Error::ResourceUnavailable => Self::ResourceUnavailable,
12772
12773 crate::Error::InstanceDied => Self::InstanceDied,
12774
12775 crate::Error::ResourceNotFound => Self::ResourceNotFound,
12776
12777 crate::Error::InstanceCannotUnresolve => Self::InstanceCannotUnresolve,
12778
12779 crate::Error::InstanceAlreadyStarted => Self::InstanceAlreadyStarted,
12780
12781 crate::Error::DependencyCycle => Self::DependencyCycle,
12782
12783 crate::Error::UnknownOrdinal_(unknown_ordinal) => {
12784 Self::__SourceBreaking { unknown_ordinal }
12785 }
12786 }
12787 }
12788 }
12789
12790 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::Error> for crate::Error {
12791 fn compat_from(value: ::fidl_fuchsia_component::Error) -> Self {
12792 match value {
12793 ::fidl_fuchsia_component::Error::Internal => Self::Internal,
12794
12795 ::fidl_fuchsia_component::Error::InvalidArguments => Self::InvalidArguments,
12796
12797 ::fidl_fuchsia_component::Error::Unsupported => Self::Unsupported,
12798
12799 ::fidl_fuchsia_component::Error::AccessDenied => Self::AccessDenied,
12800
12801 ::fidl_fuchsia_component::Error::InstanceNotFound => Self::InstanceNotFound,
12802
12803 ::fidl_fuchsia_component::Error::InstanceAlreadyExists => {
12804 Self::InstanceAlreadyExists
12805 }
12806
12807 ::fidl_fuchsia_component::Error::InstanceCannotStart => Self::InstanceCannotStart,
12808
12809 ::fidl_fuchsia_component::Error::InstanceCannotResolve => {
12810 Self::InstanceCannotResolve
12811 }
12812
12813 ::fidl_fuchsia_component::Error::CollectionNotFound => Self::CollectionNotFound,
12814
12815 ::fidl_fuchsia_component::Error::ResourceUnavailable => Self::ResourceUnavailable,
12816
12817 ::fidl_fuchsia_component::Error::InstanceDied => Self::InstanceDied,
12818
12819 ::fidl_fuchsia_component::Error::ResourceNotFound => Self::ResourceNotFound,
12820
12821 ::fidl_fuchsia_component::Error::InstanceCannotUnresolve => {
12822 Self::InstanceCannotUnresolve
12823 }
12824
12825 ::fidl_fuchsia_component::Error::InstanceAlreadyStarted => {
12826 Self::InstanceAlreadyStarted
12827 }
12828
12829 ::fidl_fuchsia_component::Error::DependencyCycle => Self::DependencyCycle,
12830
12831 ::fidl_fuchsia_component::Error::__SourceBreaking { unknown_ordinal: value } => {
12832 Self::UnknownOrdinal_(value)
12833 }
12834 }
12835 }
12836 }
12837
12838 impl ::fidl_next::CompatFrom<crate::ControllerGetExposedDictionaryResponse>
12839 for ::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse
12840 {
12841 #[inline]
12842 fn compat_from(value: crate::ControllerGetExposedDictionaryResponse) -> Self {
12843 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
12844 }
12845 }
12846
12847 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse>
12848 for crate::ControllerGetExposedDictionaryResponse
12849 {
12850 #[inline]
12851 fn compat_from(
12852 value: ::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse,
12853 ) -> Self {
12854 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
12855 }
12856 }
12857
12858 impl ::fidl_next::CompatFrom<crate::NamespaceEntry> for ::fidl_fuchsia_component::NamespaceEntry {
12859 fn compat_from(value: crate::NamespaceEntry) -> Self {
12860 Self {
12861 path: ::fidl_next::CompatFrom::compat_from(value.path),
12862
12863 directory: ::fidl_next::CompatFrom::compat_from(value.directory),
12864
12865 __source_breaking: ::fidl::marker::SourceBreaking,
12866 }
12867 }
12868 }
12869
12870 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceEntry> for crate::NamespaceEntry {
12871 fn compat_from(value: ::fidl_fuchsia_component::NamespaceEntry) -> Self {
12872 Self {
12873 path: ::fidl_next::CompatFrom::compat_from(value.path),
12874
12875 directory: ::fidl_next::CompatFrom::compat_from(value.directory),
12876 }
12877 }
12878 }
12879
12880 impl ::fidl_next::CompatFrom<crate::StartChildArgs> for ::fidl_fuchsia_component::StartChildArgs {
12881 fn compat_from(value: crate::StartChildArgs) -> Self {
12882 Self {
12883 numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
12884
12885 namespace_entries: ::fidl_next::CompatFrom::compat_from(value.namespace_entries),
12886
12887 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
12888
12889 __source_breaking: ::fidl::marker::SourceBreaking,
12890 }
12891 }
12892 }
12893
12894 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StartChildArgs> for crate::StartChildArgs {
12895 fn compat_from(value: ::fidl_fuchsia_component::StartChildArgs) -> Self {
12896 Self {
12897 numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
12898
12899 namespace_entries: ::fidl_next::CompatFrom::compat_from(value.namespace_entries),
12900
12901 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
12902 }
12903 }
12904 }
12905
12906 impl ::fidl_next::CompatFrom<crate::ControllerStartRequest>
12907 for ::fidl_fuchsia_component::ControllerStartRequest
12908 {
12909 #[inline]
12910 fn compat_from(value: crate::ControllerStartRequest) -> Self {
12911 Self {
12912 args: ::fidl_next::CompatFrom::compat_from(value.args),
12913
12914 execution_controller: ::fidl_next::CompatFrom::compat_from(
12915 value.execution_controller,
12916 ),
12917 }
12918 }
12919 }
12920
12921 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerStartRequest>
12922 for crate::ControllerStartRequest
12923 {
12924 #[inline]
12925 fn compat_from(value: ::fidl_fuchsia_component::ControllerStartRequest) -> Self {
12926 Self {
12927 args: ::fidl_next::CompatFrom::compat_from(value.args),
12928
12929 execution_controller: ::fidl_next::CompatFrom::compat_from(
12930 value.execution_controller,
12931 ),
12932 }
12933 }
12934 }
12935
12936 #[cfg(target_os = "fuchsia")]
12937 pub type ControllerProxy = ::fidl_next::Client<crate::Controller>;
12940
12941 impl ::fidl_next::CompatFrom<crate::Controller> for ::fidl_fuchsia_component::ControllerMarker {
12942 fn compat_from(_: crate::Controller) -> Self {
12943 Self
12944 }
12945 }
12946
12947 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerMarker> for crate::Controller {
12948 fn compat_from(_: ::fidl_fuchsia_component::ControllerMarker) -> Self {
12949 Self
12950 }
12951 }
12952
12953 #[cfg(target_os = "fuchsia")]
12954
12955 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ControllerProxy>
12956 for crate::Controller
12957 {
12958 fn client_compat_from(
12959 proxy: ::fidl_fuchsia_component::ControllerProxy,
12960 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
12961 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12962 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12963 ::fidl_next::ClientDispatcher::new(client_end)
12964 }
12965 }
12966
12967 impl ::fidl_next::CompatFrom<crate::CreateChildArgs> for ::fidl_fuchsia_component::CreateChildArgs {
12968 fn compat_from(value: crate::CreateChildArgs) -> Self {
12969 Self {
12970 numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
12971
12972 dynamic_offers: ::fidl_next::CompatFrom::compat_from(value.dynamic_offers),
12973
12974 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
12975
12976 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
12977
12978 __source_breaking: ::fidl::marker::SourceBreaking,
12979 }
12980 }
12981 }
12982
12983 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::CreateChildArgs> for crate::CreateChildArgs {
12984 fn compat_from(value: ::fidl_fuchsia_component::CreateChildArgs) -> Self {
12985 Self {
12986 numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
12987
12988 dynamic_offers: ::fidl_next::CompatFrom::compat_from(value.dynamic_offers),
12989
12990 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
12991
12992 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
12993 }
12994 }
12995 }
12996
12997 impl ::fidl_next::CompatFrom<crate::DebugStartedPayload>
12998 for ::fidl_fuchsia_component::DebugStartedPayload
12999 {
13000 fn compat_from(value: crate::DebugStartedPayload) -> Self {
13001 Self {
13002 runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
13003
13004 break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
13005
13006 __source_breaking: ::fidl::marker::SourceBreaking,
13007 }
13008 }
13009 }
13010
13011 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DebugStartedPayload>
13012 for crate::DebugStartedPayload
13013 {
13014 fn compat_from(value: ::fidl_fuchsia_component::DebugStartedPayload) -> Self {
13015 Self {
13016 runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
13017
13018 break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
13019 }
13020 }
13021 }
13022
13023 impl ::fidl_next::CompatFrom<crate::DeletionError> for ::fidl_fuchsia_component::DeletionError {
13024 fn compat_from(value: crate::DeletionError) -> Self {
13025 match value {
13026 crate::DeletionError::Connection => Self::Connection,
13027
13028 crate::DeletionError::Protocol => Self::Protocol,
13029
13030 crate::DeletionError::NoneAvailable => Self::NoneAvailable,
13031
13032 crate::DeletionError::Unsupported => Self::Unsupported,
13033 }
13034 }
13035 }
13036
13037 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DeletionError> for crate::DeletionError {
13038 fn compat_from(value: ::fidl_fuchsia_component::DeletionError) -> Self {
13039 match value {
13040 ::fidl_fuchsia_component::DeletionError::Connection => Self::Connection,
13041
13042 ::fidl_fuchsia_component::DeletionError::Protocol => Self::Protocol,
13043
13044 ::fidl_fuchsia_component::DeletionError::NoneAvailable => Self::NoneAvailable,
13045
13046 ::fidl_fuchsia_component::DeletionError::Unsupported => Self::Unsupported,
13047 }
13048 }
13049 }
13050
13051 impl ::fidl_next::CompatFrom<crate::DestroyedPayload>
13052 for ::fidl_fuchsia_component::DestroyedPayload
13053 {
13054 fn compat_from(value: crate::DestroyedPayload) -> Self {
13055 Self { __source_breaking: ::fidl::marker::SourceBreaking }
13056 }
13057 }
13058
13059 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DestroyedPayload>
13060 for crate::DestroyedPayload
13061 {
13062 fn compat_from(value: ::fidl_fuchsia_component::DestroyedPayload) -> Self {
13063 Self {}
13064 }
13065 }
13066
13067 impl ::fidl_next::CompatFrom<crate::DiscoveredPayload>
13068 for ::fidl_fuchsia_component::DiscoveredPayload
13069 {
13070 fn compat_from(value: crate::DiscoveredPayload) -> Self {
13071 Self { __source_breaking: ::fidl::marker::SourceBreaking }
13072 }
13073 }
13074
13075 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DiscoveredPayload>
13076 for crate::DiscoveredPayload
13077 {
13078 fn compat_from(value: ::fidl_fuchsia_component::DiscoveredPayload) -> Self {
13079 Self {}
13080 }
13081 }
13082
13083 impl ::fidl_next::CompatFrom<crate::PurgedPayload> for ::fidl_fuchsia_component::PurgedPayload {
13084 fn compat_from(value: crate::PurgedPayload) -> Self {
13085 Self { __source_breaking: ::fidl::marker::SourceBreaking }
13086 }
13087 }
13088
13089 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::PurgedPayload> for crate::PurgedPayload {
13090 fn compat_from(value: ::fidl_fuchsia_component::PurgedPayload) -> Self {
13091 Self {}
13092 }
13093 }
13094
13095 impl ::fidl_next::CompatFrom<crate::ResolvedPayload> for ::fidl_fuchsia_component::ResolvedPayload {
13096 fn compat_from(value: crate::ResolvedPayload) -> Self {
13097 Self { __source_breaking: ::fidl::marker::SourceBreaking }
13098 }
13099 }
13100
13101 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ResolvedPayload> for crate::ResolvedPayload {
13102 fn compat_from(value: ::fidl_fuchsia_component::ResolvedPayload) -> Self {
13103 Self {}
13104 }
13105 }
13106
13107 impl ::fidl_next::CompatFrom<crate::StartedPayload> for ::fidl_fuchsia_component::StartedPayload {
13108 fn compat_from(value: crate::StartedPayload) -> Self {
13109 Self { __source_breaking: ::fidl::marker::SourceBreaking }
13110 }
13111 }
13112
13113 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StartedPayload> for crate::StartedPayload {
13114 fn compat_from(value: ::fidl_fuchsia_component::StartedPayload) -> Self {
13115 Self {}
13116 }
13117 }
13118
13119 impl ::fidl_next::CompatFrom<crate::UnresolvedPayload>
13120 for ::fidl_fuchsia_component::UnresolvedPayload
13121 {
13122 fn compat_from(value: crate::UnresolvedPayload) -> Self {
13123 Self { __source_breaking: ::fidl::marker::SourceBreaking }
13124 }
13125 }
13126
13127 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::UnresolvedPayload>
13128 for crate::UnresolvedPayload
13129 {
13130 fn compat_from(value: ::fidl_fuchsia_component::UnresolvedPayload) -> Self {
13131 Self {}
13132 }
13133 }
13134
13135 impl ::fidl_next::CompatFrom<crate::EventType> for ::fidl_fuchsia_component::EventType {
13136 fn compat_from(value: crate::EventType) -> Self {
13137 match value {
13138 crate::EventType::CapabilityRequested => Self::CapabilityRequested,
13139
13140 crate::EventType::Discovered => Self::Discovered,
13141
13142 crate::EventType::Destroyed => Self::Destroyed,
13143
13144 crate::EventType::Resolved => Self::Resolved,
13145
13146 crate::EventType::Started => Self::Started,
13147
13148 crate::EventType::Stopped => Self::Stopped,
13149
13150 crate::EventType::DebugStarted => Self::DebugStarted,
13151
13152 crate::EventType::Unresolved => Self::Unresolved,
13153 }
13154 }
13155 }
13156
13157 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventType> for crate::EventType {
13158 fn compat_from(value: ::fidl_fuchsia_component::EventType) -> Self {
13159 match value {
13160 ::fidl_fuchsia_component::EventType::CapabilityRequested => {
13161 Self::CapabilityRequested
13162 }
13163
13164 ::fidl_fuchsia_component::EventType::Discovered => Self::Discovered,
13165
13166 ::fidl_fuchsia_component::EventType::Destroyed => Self::Destroyed,
13167
13168 ::fidl_fuchsia_component::EventType::Resolved => Self::Resolved,
13169
13170 ::fidl_fuchsia_component::EventType::Started => Self::Started,
13171
13172 ::fidl_fuchsia_component::EventType::Stopped => Self::Stopped,
13173
13174 ::fidl_fuchsia_component::EventType::DebugStarted => Self::DebugStarted,
13175
13176 ::fidl_fuchsia_component::EventType::Unresolved => Self::Unresolved,
13177 }
13178 }
13179 }
13180
13181 impl ::fidl_next::CompatFrom<crate::StoppedPayload> for ::fidl_fuchsia_component::StoppedPayload {
13182 fn compat_from(value: crate::StoppedPayload) -> Self {
13183 Self {
13184 status: ::fidl_next::CompatFrom::compat_from(value.status),
13185
13186 exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
13187
13188 __source_breaking: ::fidl::marker::SourceBreaking,
13189 }
13190 }
13191 }
13192
13193 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StoppedPayload> for crate::StoppedPayload {
13194 fn compat_from(value: ::fidl_fuchsia_component::StoppedPayload) -> Self {
13195 Self {
13196 status: ::fidl_next::CompatFrom::compat_from(value.status),
13197
13198 exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
13199 }
13200 }
13201 }
13202
13203 impl ::fidl_next::CompatFrom<crate::EventHeader> for ::fidl_fuchsia_component::EventHeader {
13204 fn compat_from(value: crate::EventHeader) -> Self {
13205 Self {
13206 event_type: ::fidl_next::CompatFrom::compat_from(value.event_type),
13207
13208 moniker: ::fidl_next::CompatFrom::compat_from(value.moniker),
13209
13210 component_url: ::fidl_next::CompatFrom::compat_from(value.component_url),
13211
13212 timestamp: ::fidl_next::CompatFrom::compat_from(value.timestamp),
13213
13214 __source_breaking: ::fidl::marker::SourceBreaking,
13215 }
13216 }
13217 }
13218
13219 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventHeader> for crate::EventHeader {
13220 fn compat_from(value: ::fidl_fuchsia_component::EventHeader) -> Self {
13221 Self {
13222 event_type: ::fidl_next::CompatFrom::compat_from(value.event_type),
13223
13224 moniker: ::fidl_next::CompatFrom::compat_from(value.moniker),
13225
13226 component_url: ::fidl_next::CompatFrom::compat_from(value.component_url),
13227
13228 timestamp: ::fidl_next::CompatFrom::compat_from(value.timestamp),
13229 }
13230 }
13231 }
13232
13233 impl ::fidl_next::CompatFrom<crate::EventPayload> for ::fidl_fuchsia_component::EventPayload {
13234 fn compat_from(value: crate::EventPayload) -> Self {
13235 match value {
13236 crate::EventPayload::CapabilityRequested(value) => {
13237 Self::CapabilityRequested(::fidl_next::CompatFrom::compat_from(value))
13238 }
13239
13240 crate::EventPayload::Purged(value) => {
13241 Self::Purged(::fidl_next::CompatFrom::compat_from(value))
13242 }
13243
13244 crate::EventPayload::Discovered(value) => {
13245 Self::Discovered(::fidl_next::CompatFrom::compat_from(value))
13246 }
13247
13248 crate::EventPayload::Destroyed(value) => {
13249 Self::Destroyed(::fidl_next::CompatFrom::compat_from(value))
13250 }
13251
13252 crate::EventPayload::Resolved(value) => {
13253 Self::Resolved(::fidl_next::CompatFrom::compat_from(value))
13254 }
13255
13256 crate::EventPayload::Started(value) => {
13257 Self::Started(::fidl_next::CompatFrom::compat_from(value))
13258 }
13259
13260 crate::EventPayload::Stopped(value) => {
13261 Self::Stopped(::fidl_next::CompatFrom::compat_from(value))
13262 }
13263
13264 crate::EventPayload::DebugStarted(value) => {
13265 Self::DebugStarted(::fidl_next::CompatFrom::compat_from(value))
13266 }
13267
13268 crate::EventPayload::Unresolved(value) => {
13269 Self::Unresolved(::fidl_next::CompatFrom::compat_from(value))
13270 }
13271
13272 crate::EventPayload::UnknownOrdinal_(unknown_ordinal) => {
13273 Self::__SourceBreaking { unknown_ordinal }
13274 }
13275 }
13276 }
13277 }
13278
13279 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventPayload> for crate::EventPayload {
13280 fn compat_from(value: ::fidl_fuchsia_component::EventPayload) -> Self {
13281 match value {
13282 ::fidl_fuchsia_component::EventPayload::CapabilityRequested(value) => {
13283 Self::CapabilityRequested(::fidl_next::CompatFrom::compat_from(value))
13284 }
13285
13286 ::fidl_fuchsia_component::EventPayload::Purged(value) => {
13287 Self::Purged(::fidl_next::CompatFrom::compat_from(value))
13288 }
13289
13290 ::fidl_fuchsia_component::EventPayload::Discovered(value) => {
13291 Self::Discovered(::fidl_next::CompatFrom::compat_from(value))
13292 }
13293
13294 ::fidl_fuchsia_component::EventPayload::Destroyed(value) => {
13295 Self::Destroyed(::fidl_next::CompatFrom::compat_from(value))
13296 }
13297
13298 ::fidl_fuchsia_component::EventPayload::Resolved(value) => {
13299 Self::Resolved(::fidl_next::CompatFrom::compat_from(value))
13300 }
13301
13302 ::fidl_fuchsia_component::EventPayload::Started(value) => {
13303 Self::Started(::fidl_next::CompatFrom::compat_from(value))
13304 }
13305
13306 ::fidl_fuchsia_component::EventPayload::Stopped(value) => {
13307 Self::Stopped(::fidl_next::CompatFrom::compat_from(value))
13308 }
13309
13310 ::fidl_fuchsia_component::EventPayload::DebugStarted(value) => {
13311 Self::DebugStarted(::fidl_next::CompatFrom::compat_from(value))
13312 }
13313
13314 ::fidl_fuchsia_component::EventPayload::Unresolved(value) => {
13315 Self::Unresolved(::fidl_next::CompatFrom::compat_from(value))
13316 }
13317
13318 ::fidl_fuchsia_component::EventPayload::__SourceBreaking { unknown_ordinal } => {
13319 Self::UnknownOrdinal_(unknown_ordinal)
13320 }
13321 }
13322 }
13323 }
13324
13325 impl ::fidl_next::CompatFrom<crate::Event> for ::fidl_fuchsia_component::Event {
13326 fn compat_from(value: crate::Event) -> Self {
13327 Self {
13328 header: ::fidl_next::CompatFrom::compat_from(value.header),
13329
13330 payload: ::fidl_next::CompatFrom::compat_from(value.payload),
13331
13332 __source_breaking: ::fidl::marker::SourceBreaking,
13333 }
13334 }
13335 }
13336
13337 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::Event> for crate::Event {
13338 fn compat_from(value: ::fidl_fuchsia_component::Event) -> Self {
13339 Self {
13340 header: ::fidl_next::CompatFrom::compat_from(value.header),
13341
13342 payload: ::fidl_next::CompatFrom::compat_from(value.payload),
13343 }
13344 }
13345 }
13346
13347 impl ::fidl_next::CompatFrom<crate::EventStreamGetNextResponse>
13348 for ::fidl_fuchsia_component::EventStreamGetNextResponse
13349 {
13350 #[inline]
13351 fn compat_from(value: crate::EventStreamGetNextResponse) -> Self {
13352 Self { events: ::fidl_next::CompatFrom::compat_from(value.events) }
13353 }
13354 }
13355
13356 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventStreamGetNextResponse>
13357 for crate::EventStreamGetNextResponse
13358 {
13359 #[inline]
13360 fn compat_from(value: ::fidl_fuchsia_component::EventStreamGetNextResponse) -> Self {
13361 Self { events: ::fidl_next::CompatFrom::compat_from(value.events) }
13362 }
13363 }
13364
13365 #[cfg(target_os = "fuchsia")]
13366 pub type EventStreamProxy = ::fidl_next::Client<crate::EventStream>;
13369
13370 impl ::fidl_next::CompatFrom<crate::EventStream> for ::fidl_fuchsia_component::EventStreamMarker {
13371 fn compat_from(_: crate::EventStream) -> Self {
13372 Self
13373 }
13374 }
13375
13376 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventStreamMarker> for crate::EventStream {
13377 fn compat_from(_: ::fidl_fuchsia_component::EventStreamMarker) -> Self {
13378 Self
13379 }
13380 }
13381
13382 #[cfg(target_os = "fuchsia")]
13383
13384 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::EventStreamProxy>
13385 for crate::EventStream
13386 {
13387 fn client_compat_from(
13388 proxy: ::fidl_fuchsia_component::EventStreamProxy,
13389 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13390 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13391 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13392 ::fidl_next::ClientDispatcher::new(client_end)
13393 }
13394 }
13395
13396 impl ::fidl_next::CompatFrom<crate::ExecutionControllerOnStopRequest>
13397 for ::fidl_fuchsia_component::ExecutionControllerOnStopRequest
13398 {
13399 #[inline]
13400 fn compat_from(value: crate::ExecutionControllerOnStopRequest) -> Self {
13401 Self { stopped_payload: ::fidl_next::CompatFrom::compat_from(value.stopped_payload) }
13402 }
13403 }
13404
13405 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ExecutionControllerOnStopRequest>
13406 for crate::ExecutionControllerOnStopRequest
13407 {
13408 #[inline]
13409 fn compat_from(value: ::fidl_fuchsia_component::ExecutionControllerOnStopRequest) -> Self {
13410 Self { stopped_payload: ::fidl_next::CompatFrom::compat_from(value.stopped_payload) }
13411 }
13412 }
13413
13414 #[cfg(target_os = "fuchsia")]
13415 pub type ExecutionControllerProxy = ::fidl_next::Client<crate::ExecutionController>;
13418
13419 impl ::fidl_next::CompatFrom<crate::ExecutionController>
13420 for ::fidl_fuchsia_component::ExecutionControllerMarker
13421 {
13422 fn compat_from(_: crate::ExecutionController) -> Self {
13423 Self
13424 }
13425 }
13426
13427 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ExecutionControllerMarker>
13428 for crate::ExecutionController
13429 {
13430 fn compat_from(_: ::fidl_fuchsia_component::ExecutionControllerMarker) -> Self {
13431 Self
13432 }
13433 }
13434
13435 #[cfg(target_os = "fuchsia")]
13436
13437 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ExecutionControllerProxy>
13438 for crate::ExecutionController
13439 {
13440 fn client_compat_from(
13441 proxy: ::fidl_fuchsia_component::ExecutionControllerProxy,
13442 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13443 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13444 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13445 ::fidl_next::ClientDispatcher::new(client_end)
13446 }
13447 }
13448
13449 impl ::fidl_next::CompatFrom<crate::IntrospectorGetMonikerRequest>
13450 for ::fidl_fuchsia_component::IntrospectorGetMonikerRequest
13451 {
13452 #[inline]
13453 fn compat_from(value: crate::IntrospectorGetMonikerRequest) -> Self {
13454 Self {
13455 component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
13456 }
13457 }
13458 }
13459
13460 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorGetMonikerRequest>
13461 for crate::IntrospectorGetMonikerRequest
13462 {
13463 #[inline]
13464 fn compat_from(value: ::fidl_fuchsia_component::IntrospectorGetMonikerRequest) -> Self {
13465 Self {
13466 component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
13467 }
13468 }
13469 }
13470
13471 impl ::fidl_next::CompatFrom<crate::IntrospectorGetMonikerResponse>
13472 for ::fidl_fuchsia_component::IntrospectorGetMonikerResponse
13473 {
13474 #[inline]
13475 fn compat_from(value: crate::IntrospectorGetMonikerResponse) -> Self {
13476 Self { moniker: ::fidl_next::CompatFrom::compat_from(value.moniker) }
13477 }
13478 }
13479
13480 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorGetMonikerResponse>
13481 for crate::IntrospectorGetMonikerResponse
13482 {
13483 #[inline]
13484 fn compat_from(value: ::fidl_fuchsia_component::IntrospectorGetMonikerResponse) -> Self {
13485 Self { moniker: ::fidl_next::CompatFrom::compat_from(value.moniker) }
13486 }
13487 }
13488
13489 #[cfg(target_os = "fuchsia")]
13490 pub type IntrospectorProxy = ::fidl_next::Client<crate::Introspector>;
13493
13494 impl ::fidl_next::CompatFrom<crate::Introspector> for ::fidl_fuchsia_component::IntrospectorMarker {
13495 fn compat_from(_: crate::Introspector) -> Self {
13496 Self
13497 }
13498 }
13499
13500 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorMarker> for crate::Introspector {
13501 fn compat_from(_: ::fidl_fuchsia_component::IntrospectorMarker) -> Self {
13502 Self
13503 }
13504 }
13505
13506 #[cfg(target_os = "fuchsia")]
13507
13508 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::IntrospectorProxy>
13509 for crate::Introspector
13510 {
13511 fn client_compat_from(
13512 proxy: ::fidl_fuchsia_component::IntrospectorProxy,
13513 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13514 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13515 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13516 ::fidl_next::ClientDispatcher::new(client_end)
13517 }
13518 }
13519
13520 impl ::fidl_next::CompatFrom<crate::NamespaceInputEntry>
13521 for ::fidl_fuchsia_component::NamespaceInputEntry
13522 {
13523 #[inline]
13524 fn compat_from(value: crate::NamespaceInputEntry) -> Self {
13525 Self {
13526 path: ::fidl_next::CompatFrom::compat_from(value.path),
13527
13528 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
13529 }
13530 }
13531 }
13532
13533 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceInputEntry>
13534 for crate::NamespaceInputEntry
13535 {
13536 #[inline]
13537 fn compat_from(value: ::fidl_fuchsia_component::NamespaceInputEntry) -> Self {
13538 Self {
13539 path: ::fidl_next::CompatFrom::compat_from(value.path),
13540
13541 dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
13542 }
13543 }
13544 }
13545
13546 impl ::fidl_next::CompatFrom<crate::NamespaceCreateRequest>
13547 for ::fidl_fuchsia_component::NamespaceCreateRequest
13548 {
13549 #[inline]
13550 fn compat_from(value: crate::NamespaceCreateRequest) -> Self {
13551 Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
13552 }
13553 }
13554
13555 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceCreateRequest>
13556 for crate::NamespaceCreateRequest
13557 {
13558 #[inline]
13559 fn compat_from(value: ::fidl_fuchsia_component::NamespaceCreateRequest) -> Self {
13560 Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
13561 }
13562 }
13563
13564 impl ::fidl_next::CompatFrom<crate::NamespaceError> for ::fidl_fuchsia_component::NamespaceError {
13565 fn compat_from(value: crate::NamespaceError) -> Self {
13566 match value {
13567 crate::NamespaceError::Shadow => Self::Shadow,
13568
13569 crate::NamespaceError::Duplicate => Self::Duplicate,
13570
13571 crate::NamespaceError::Conversion => Self::Conversion,
13572
13573 crate::NamespaceError::BadEntry => Self::BadEntry,
13574
13575 crate::NamespaceError::DictionaryRead => Self::DictionaryRead,
13576
13577 crate::NamespaceError::UnknownOrdinal_(unknown_ordinal) => {
13578 Self::__SourceBreaking { unknown_ordinal }
13579 }
13580 }
13581 }
13582 }
13583
13584 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceError> for crate::NamespaceError {
13585 fn compat_from(value: ::fidl_fuchsia_component::NamespaceError) -> Self {
13586 match value {
13587 ::fidl_fuchsia_component::NamespaceError::Shadow => Self::Shadow,
13588
13589 ::fidl_fuchsia_component::NamespaceError::Duplicate => Self::Duplicate,
13590
13591 ::fidl_fuchsia_component::NamespaceError::Conversion => Self::Conversion,
13592
13593 ::fidl_fuchsia_component::NamespaceError::BadEntry => Self::BadEntry,
13594
13595 ::fidl_fuchsia_component::NamespaceError::DictionaryRead => Self::DictionaryRead,
13596
13597 ::fidl_fuchsia_component::NamespaceError::__SourceBreaking {
13598 unknown_ordinal: value,
13599 } => Self::UnknownOrdinal_(value),
13600 }
13601 }
13602 }
13603
13604 impl ::fidl_next::CompatFrom<crate::NamespaceCreateResponse>
13605 for ::fidl_fuchsia_component::NamespaceCreateResponse
13606 {
13607 #[inline]
13608 fn compat_from(value: crate::NamespaceCreateResponse) -> Self {
13609 Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
13610 }
13611 }
13612
13613 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceCreateResponse>
13614 for crate::NamespaceCreateResponse
13615 {
13616 #[inline]
13617 fn compat_from(value: ::fidl_fuchsia_component::NamespaceCreateResponse) -> Self {
13618 Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
13619 }
13620 }
13621
13622 #[cfg(target_os = "fuchsia")]
13623 pub type NamespaceProxy = ::fidl_next::Client<crate::Namespace>;
13626
13627 impl ::fidl_next::CompatFrom<crate::Namespace> for ::fidl_fuchsia_component::NamespaceMarker {
13628 fn compat_from(_: crate::Namespace) -> Self {
13629 Self
13630 }
13631 }
13632
13633 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceMarker> for crate::Namespace {
13634 fn compat_from(_: ::fidl_fuchsia_component::NamespaceMarker) -> Self {
13635 Self
13636 }
13637 }
13638
13639 #[cfg(target_os = "fuchsia")]
13640
13641 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::NamespaceProxy> for crate::Namespace {
13642 fn client_compat_from(
13643 proxy: ::fidl_fuchsia_component::NamespaceProxy,
13644 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13645 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13646 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13647 ::fidl_next::ClientDispatcher::new(client_end)
13648 }
13649 }
13650
13651 impl ::fidl_next::CompatFrom<crate::RealmDestroyChildRequest>
13652 for ::fidl_fuchsia_component::RealmDestroyChildRequest
13653 {
13654 #[inline]
13655 fn compat_from(value: crate::RealmDestroyChildRequest) -> Self {
13656 Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
13657 }
13658 }
13659
13660 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmDestroyChildRequest>
13661 for crate::RealmDestroyChildRequest
13662 {
13663 #[inline]
13664 fn compat_from(value: ::fidl_fuchsia_component::RealmDestroyChildRequest) -> Self {
13665 Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
13666 }
13667 }
13668
13669 impl ::fidl_next::CompatFrom<crate::RealmListChildrenRequest>
13670 for ::fidl_fuchsia_component::RealmListChildrenRequest
13671 {
13672 #[inline]
13673 fn compat_from(value: crate::RealmListChildrenRequest) -> Self {
13674 Self {
13675 collection: ::fidl_next::CompatFrom::compat_from(value.collection),
13676
13677 iter: ::fidl_next::CompatFrom::compat_from(value.iter),
13678 }
13679 }
13680 }
13681
13682 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmListChildrenRequest>
13683 for crate::RealmListChildrenRequest
13684 {
13685 #[inline]
13686 fn compat_from(value: ::fidl_fuchsia_component::RealmListChildrenRequest) -> Self {
13687 Self {
13688 collection: ::fidl_next::CompatFrom::compat_from(value.collection),
13689
13690 iter: ::fidl_next::CompatFrom::compat_from(value.iter),
13691 }
13692 }
13693 }
13694
13695 impl ::fidl_next::CompatFrom<crate::RealmGetChildOutputDictionaryRequest>
13696 for ::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest
13697 {
13698 #[inline]
13699 fn compat_from(value: crate::RealmGetChildOutputDictionaryRequest) -> Self {
13700 Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
13701 }
13702 }
13703
13704 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest>
13705 for crate::RealmGetChildOutputDictionaryRequest
13706 {
13707 #[inline]
13708 fn compat_from(
13709 value: ::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest,
13710 ) -> Self {
13711 Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
13712 }
13713 }
13714
13715 impl ::fidl_next::CompatFrom<crate::RealmGetChildOutputDictionaryResponse>
13716 for ::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse
13717 {
13718 #[inline]
13719 fn compat_from(value: crate::RealmGetChildOutputDictionaryResponse) -> Self {
13720 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
13721 }
13722 }
13723
13724 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse>
13725 for crate::RealmGetChildOutputDictionaryResponse
13726 {
13727 #[inline]
13728 fn compat_from(
13729 value: ::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse,
13730 ) -> Self {
13731 Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
13732 }
13733 }
13734
13735 impl ::fidl_next::CompatFrom<crate::RealmOpenControllerRequest>
13736 for ::fidl_fuchsia_component::RealmOpenControllerRequest
13737 {
13738 #[inline]
13739 fn compat_from(value: crate::RealmOpenControllerRequest) -> Self {
13740 Self {
13741 child: ::fidl_next::CompatFrom::compat_from(value.child),
13742
13743 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
13744 }
13745 }
13746 }
13747
13748 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmOpenControllerRequest>
13749 for crate::RealmOpenControllerRequest
13750 {
13751 #[inline]
13752 fn compat_from(value: ::fidl_fuchsia_component::RealmOpenControllerRequest) -> Self {
13753 Self {
13754 child: ::fidl_next::CompatFrom::compat_from(value.child),
13755
13756 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
13757 }
13758 }
13759 }
13760
13761 impl ::fidl_next::CompatFrom<crate::RealmOpenExposedDirRequest>
13762 for ::fidl_fuchsia_component::RealmOpenExposedDirRequest
13763 {
13764 #[inline]
13765 fn compat_from(value: crate::RealmOpenExposedDirRequest) -> Self {
13766 Self {
13767 child: ::fidl_next::CompatFrom::compat_from(value.child),
13768
13769 exposed_dir: ::fidl_next::CompatFrom::compat_from(value.exposed_dir),
13770 }
13771 }
13772 }
13773
13774 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmOpenExposedDirRequest>
13775 for crate::RealmOpenExposedDirRequest
13776 {
13777 #[inline]
13778 fn compat_from(value: ::fidl_fuchsia_component::RealmOpenExposedDirRequest) -> Self {
13779 Self {
13780 child: ::fidl_next::CompatFrom::compat_from(value.child),
13781
13782 exposed_dir: ::fidl_next::CompatFrom::compat_from(value.exposed_dir),
13783 }
13784 }
13785 }
13786
13787 impl ::fidl_next::CompatFrom<crate::RealmCreateChildRequest>
13788 for ::fidl_fuchsia_component::RealmCreateChildRequest
13789 {
13790 #[inline]
13791 fn compat_from(value: crate::RealmCreateChildRequest) -> Self {
13792 Self {
13793 collection: ::fidl_next::CompatFrom::compat_from(value.collection),
13794
13795 decl: ::fidl_next::CompatFrom::compat_from(value.decl),
13796
13797 args: ::fidl_next::CompatFrom::compat_from(value.args),
13798 }
13799 }
13800 }
13801
13802 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmCreateChildRequest>
13803 for crate::RealmCreateChildRequest
13804 {
13805 #[inline]
13806 fn compat_from(value: ::fidl_fuchsia_component::RealmCreateChildRequest) -> Self {
13807 Self {
13808 collection: ::fidl_next::CompatFrom::compat_from(value.collection),
13809
13810 decl: ::fidl_next::CompatFrom::compat_from(value.decl),
13811
13812 args: ::fidl_next::CompatFrom::compat_from(value.args),
13813 }
13814 }
13815 }
13816
13817 impl ::fidl_next::CompatFrom<crate::RealmGetResolvedInfoResponse>
13818 for ::fidl_fuchsia_component::RealmGetResolvedInfoResponse
13819 {
13820 #[inline]
13821 fn compat_from(value: crate::RealmGetResolvedInfoResponse) -> Self {
13822 Self { resolved_info: ::fidl_next::CompatFrom::compat_from(value.resolved_info) }
13823 }
13824 }
13825
13826 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetResolvedInfoResponse>
13827 for crate::RealmGetResolvedInfoResponse
13828 {
13829 #[inline]
13830 fn compat_from(value: ::fidl_fuchsia_component::RealmGetResolvedInfoResponse) -> Self {
13831 Self { resolved_info: ::fidl_next::CompatFrom::compat_from(value.resolved_info) }
13832 }
13833 }
13834
13835 #[cfg(target_os = "fuchsia")]
13836 pub type RealmProxy = ::fidl_next::Client<crate::Realm>;
13839
13840 impl ::fidl_next::CompatFrom<crate::Realm> for ::fidl_fuchsia_component::RealmMarker {
13841 fn compat_from(_: crate::Realm) -> Self {
13842 Self
13843 }
13844 }
13845
13846 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmMarker> for crate::Realm {
13847 fn compat_from(_: ::fidl_fuchsia_component::RealmMarker) -> Self {
13848 Self
13849 }
13850 }
13851
13852 #[cfg(target_os = "fuchsia")]
13853
13854 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::RealmProxy> for crate::Realm {
13855 fn client_compat_from(
13856 proxy: ::fidl_fuchsia_component::RealmProxy,
13857 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13858 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13859 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13860 ::fidl_next::ClientDispatcher::new(client_end)
13861 }
13862 }
13863
13864 impl ::fidl_next::CompatFrom<crate::StatusError> for ::fidl_fuchsia_component::StatusError {
13865 fn compat_from(value: crate::StatusError) -> Self {
13866 match value {
13867 crate::StatusError::Provider => Self::Provider,
13868
13869 crate::StatusError::ResponseInvalid => Self::ResponseInvalid,
13870
13871 crate::StatusError::StatusUnknown => Self::StatusUnknown,
13872
13873 crate::StatusError::Unsupported => Self::Unsupported,
13874 }
13875 }
13876 }
13877
13878 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StatusError> for crate::StatusError {
13879 fn compat_from(value: ::fidl_fuchsia_component::StatusError) -> Self {
13880 match value {
13881 ::fidl_fuchsia_component::StatusError::Provider => Self::Provider,
13882
13883 ::fidl_fuchsia_component::StatusError::ResponseInvalid => Self::ResponseInvalid,
13884
13885 ::fidl_fuchsia_component::StatusError::StatusUnknown => Self::StatusUnknown,
13886
13887 ::fidl_fuchsia_component::StatusError::Unsupported => Self::Unsupported,
13888 }
13889 }
13890 }
13891
13892 impl ::fidl_next::CompatFrom<crate::StorageAdminListStorageInRealmRequest>
13893 for ::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest
13894 {
13895 #[inline]
13896 fn compat_from(value: crate::StorageAdminListStorageInRealmRequest) -> Self {
13897 Self {
13898 relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
13899
13900 iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
13901 }
13902 }
13903 }
13904
13905 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest>
13906 for crate::StorageAdminListStorageInRealmRequest
13907 {
13908 #[inline]
13909 fn compat_from(
13910 value: ::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest,
13911 ) -> Self {
13912 Self {
13913 relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
13914
13915 iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
13916 }
13917 }
13918 }
13919
13920 impl ::fidl_next::CompatFrom<crate::StorageAdminDeleteComponentStorageRequest>
13921 for ::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest
13922 {
13923 #[inline]
13924 fn compat_from(value: crate::StorageAdminDeleteComponentStorageRequest) -> Self {
13925 Self { relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker) }
13926 }
13927 }
13928
13929 impl
13930 ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest>
13931 for crate::StorageAdminDeleteComponentStorageRequest
13932 {
13933 #[inline]
13934 fn compat_from(
13935 value: ::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest,
13936 ) -> Self {
13937 Self { relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker) }
13938 }
13939 }
13940
13941 impl ::fidl_next::CompatFrom<crate::StorageStatus> for ::fidl_fuchsia_component::StorageStatus {
13942 fn compat_from(value: crate::StorageStatus) -> Self {
13943 Self {
13944 total_size: ::fidl_next::CompatFrom::compat_from(value.total_size),
13945
13946 used_size: ::fidl_next::CompatFrom::compat_from(value.used_size),
13947
13948 __source_breaking: ::fidl::marker::SourceBreaking,
13949 }
13950 }
13951 }
13952
13953 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageStatus> for crate::StorageStatus {
13954 fn compat_from(value: ::fidl_fuchsia_component::StorageStatus) -> Self {
13955 Self {
13956 total_size: ::fidl_next::CompatFrom::compat_from(value.total_size),
13957
13958 used_size: ::fidl_next::CompatFrom::compat_from(value.used_size),
13959 }
13960 }
13961 }
13962
13963 impl ::fidl_next::CompatFrom<crate::StorageAdminOpenStorageRequest>
13964 for ::fidl_fuchsia_component::StorageAdminOpenStorageRequest
13965 {
13966 #[inline]
13967 fn compat_from(value: crate::StorageAdminOpenStorageRequest) -> Self {
13968 Self {
13969 relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
13970
13971 object: ::fidl_next::CompatFrom::compat_from(value.object),
13972 }
13973 }
13974 }
13975
13976 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminOpenStorageRequest>
13977 for crate::StorageAdminOpenStorageRequest
13978 {
13979 #[inline]
13980 fn compat_from(value: ::fidl_fuchsia_component::StorageAdminOpenStorageRequest) -> Self {
13981 Self {
13982 relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
13983
13984 object: ::fidl_next::CompatFrom::compat_from(value.object),
13985 }
13986 }
13987 }
13988
13989 impl ::fidl_next::CompatFrom<crate::StorageAdminOpenComponentStorageByIdRequest>
13990 for ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest
13991 {
13992 #[inline]
13993 fn compat_from(value: crate::StorageAdminOpenComponentStorageByIdRequest) -> Self {
13994 Self {
13995 id: ::fidl_next::CompatFrom::compat_from(value.id),
13996
13997 object: ::fidl_next::CompatFrom::compat_from(value.object),
13998 }
13999 }
14000 }
14001
14002 impl
14003 ::fidl_next::CompatFrom<
14004 ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest,
14005 > for crate::StorageAdminOpenComponentStorageByIdRequest
14006 {
14007 #[inline]
14008 fn compat_from(
14009 value: ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest,
14010 ) -> Self {
14011 Self {
14012 id: ::fidl_next::CompatFrom::compat_from(value.id),
14013
14014 object: ::fidl_next::CompatFrom::compat_from(value.object),
14015 }
14016 }
14017 }
14018
14019 #[cfg(target_os = "fuchsia")]
14020 pub type StorageAdminProxy = ::fidl_next::Client<crate::StorageAdmin>;
14023
14024 impl ::fidl_next::CompatFrom<crate::StorageAdmin> for ::fidl_fuchsia_component::StorageAdminMarker {
14025 fn compat_from(_: crate::StorageAdmin) -> Self {
14026 Self
14027 }
14028 }
14029
14030 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminMarker> for crate::StorageAdmin {
14031 fn compat_from(_: ::fidl_fuchsia_component::StorageAdminMarker) -> Self {
14032 Self
14033 }
14034 }
14035
14036 #[cfg(target_os = "fuchsia")]
14037
14038 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::StorageAdminProxy>
14039 for crate::StorageAdmin
14040 {
14041 fn client_compat_from(
14042 proxy: ::fidl_fuchsia_component::StorageAdminProxy,
14043 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
14044 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
14045 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
14046 ::fidl_next::ClientDispatcher::new(client_end)
14047 }
14048 }
14049
14050 impl ::fidl_next::CompatFrom<crate::StorageIteratorNextResponse>
14051 for ::fidl_fuchsia_component::StorageIteratorNextResponse
14052 {
14053 #[inline]
14054 fn compat_from(value: crate::StorageIteratorNextResponse) -> Self {
14055 Self {
14056 relative_monikers: ::fidl_next::CompatFrom::compat_from(value.relative_monikers),
14057 }
14058 }
14059 }
14060
14061 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageIteratorNextResponse>
14062 for crate::StorageIteratorNextResponse
14063 {
14064 #[inline]
14065 fn compat_from(value: ::fidl_fuchsia_component::StorageIteratorNextResponse) -> Self {
14066 Self {
14067 relative_monikers: ::fidl_next::CompatFrom::compat_from(value.relative_monikers),
14068 }
14069 }
14070 }
14071
14072 #[cfg(target_os = "fuchsia")]
14073 pub type StorageIteratorProxy = ::fidl_next::Client<crate::StorageIterator>;
14076
14077 impl ::fidl_next::CompatFrom<crate::StorageIterator>
14078 for ::fidl_fuchsia_component::StorageIteratorMarker
14079 {
14080 fn compat_from(_: crate::StorageIterator) -> Self {
14081 Self
14082 }
14083 }
14084
14085 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageIteratorMarker>
14086 for crate::StorageIterator
14087 {
14088 fn compat_from(_: ::fidl_fuchsia_component::StorageIteratorMarker) -> Self {
14089 Self
14090 }
14091 }
14092
14093 #[cfg(target_os = "fuchsia")]
14094
14095 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::StorageIteratorProxy>
14096 for crate::StorageIterator
14097 {
14098 fn client_compat_from(
14099 proxy: ::fidl_fuchsia_component::StorageIteratorProxy,
14100 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
14101 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
14102 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
14103 ::fidl_next::ClientDispatcher::new(client_end)
14104 }
14105 }
14106}