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 #[derive(Debug, PartialEq)]
10 pub struct ChildIteratorNextResponse {
11 pub children: ::std::vec::Vec<::fidl_next_common_fuchsia_component_decl::natural::ChildRef>,
12 }
13
14 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChildIteratorNextResponse<'static>, ___E>
15 for ChildIteratorNextResponse
16 where
17 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18 ___E: ::fidl_next::Encoder,
19 {
20 #[inline]
21 fn encode(
22 self,
23 encoder_: &mut ___E,
24 out_: &mut ::core::mem::MaybeUninit<crate::wire::ChildIteratorNextResponse<'static>>,
25 _: (),
26 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
27 ::fidl_next::munge! {
28 let crate::wire::ChildIteratorNextResponse {
29 children,
30
31 } = out_;
32 }
33
34 ::fidl_next::Encode::encode(self.children, encoder_, children, (128, ()))?;
35
36 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(children.as_mut_ptr()) };
37 ::fidl_next::Constrained::validate(_field, (128, ()))?;
38
39 Ok(())
40 }
41 }
42
43 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChildIteratorNextResponse<'static>, ___E>
44 for &'a ChildIteratorNextResponse
45 where
46 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
47 ___E: ::fidl_next::Encoder,
48 {
49 #[inline]
50 fn encode(
51 self,
52 encoder_: &mut ___E,
53 out_: &mut ::core::mem::MaybeUninit<crate::wire::ChildIteratorNextResponse<'static>>,
54 _: (),
55 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
56 ::fidl_next::munge! {
57 let crate::wire::ChildIteratorNextResponse {
58
59 children,
60
61 } = out_;
62 }
63
64 ::fidl_next::Encode::encode(&self.children, encoder_, children, (128, ()))?;
65
66 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(children.as_mut_ptr()) };
67 ::fidl_next::Constrained::validate(_field, (128, ()))?;
68
69 Ok(())
70 }
71 }
72
73 unsafe impl<___E>
74 ::fidl_next::EncodeOption<
75 ::fidl_next::wire::Box<'static, crate::wire::ChildIteratorNextResponse<'static>>,
76 ___E,
77 > for ChildIteratorNextResponse
78 where
79 ___E: ::fidl_next::Encoder + ?Sized,
80 ChildIteratorNextResponse:
81 ::fidl_next::Encode<crate::wire::ChildIteratorNextResponse<'static>, ___E>,
82 {
83 #[inline]
84 fn encode_option(
85 this: ::core::option::Option<Self>,
86 encoder: &mut ___E,
87 out: &mut ::core::mem::MaybeUninit<
88 ::fidl_next::wire::Box<'static, crate::wire::ChildIteratorNextResponse<'static>>,
89 >,
90 _: (),
91 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
92 if let Some(inner) = this {
93 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
94 ::fidl_next::wire::Box::encode_present(out);
95 } else {
96 ::fidl_next::wire::Box::encode_absent(out);
97 }
98
99 Ok(())
100 }
101 }
102
103 unsafe impl<'a, ___E>
104 ::fidl_next::EncodeOption<
105 ::fidl_next::wire::Box<'static, crate::wire::ChildIteratorNextResponse<'static>>,
106 ___E,
107 > for &'a ChildIteratorNextResponse
108 where
109 ___E: ::fidl_next::Encoder + ?Sized,
110 &'a ChildIteratorNextResponse:
111 ::fidl_next::Encode<crate::wire::ChildIteratorNextResponse<'static>, ___E>,
112 {
113 #[inline]
114 fn encode_option(
115 this: ::core::option::Option<Self>,
116 encoder: &mut ___E,
117 out: &mut ::core::mem::MaybeUninit<
118 ::fidl_next::wire::Box<'static, crate::wire::ChildIteratorNextResponse<'static>>,
119 >,
120 _: (),
121 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
122 if let Some(inner) = this {
123 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
124 ::fidl_next::wire::Box::encode_present(out);
125 } else {
126 ::fidl_next::wire::Box::encode_absent(out);
127 }
128
129 Ok(())
130 }
131 }
132
133 impl<'de> ::fidl_next::FromWire<crate::wire::ChildIteratorNextResponse<'de>>
134 for ChildIteratorNextResponse
135 {
136 #[inline]
137 fn from_wire(wire: crate::wire::ChildIteratorNextResponse<'de>) -> Self {
138 Self { children: ::fidl_next::FromWire::from_wire(wire.children) }
139 }
140 }
141
142 impl<'de> ::fidl_next::FromWireRef<crate::wire::ChildIteratorNextResponse<'de>>
143 for ChildIteratorNextResponse
144 {
145 #[inline]
146 fn from_wire_ref(wire: &crate::wire::ChildIteratorNextResponse<'de>) -> Self {
147 Self { children: ::fidl_next::FromWireRef::from_wire_ref(&wire.children) }
148 }
149 }
150
151 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
152 #[repr(C)]
153 pub struct ControllerStartResponse {}
154
155 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ControllerStartResponse, ___E>
156 for ControllerStartResponse
157 where
158 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
159 {
160 #[inline]
161 fn encode(
162 self,
163 encoder_: &mut ___E,
164 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerStartResponse>,
165 _: (),
166 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
167 ::fidl_next::munge! {
168 let crate::wire::ControllerStartResponse {
169
170 _empty,
171
172 } = out_;
173 }
174
175 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
176
177 Ok(())
178 }
179 }
180
181 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ControllerStartResponse, ___E>
182 for &'a ControllerStartResponse
183 where
184 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
185 {
186 #[inline]
187 fn encode(
188 self,
189 encoder_: &mut ___E,
190 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerStartResponse>,
191 _: (),
192 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
193 ::fidl_next::munge! {
194 let crate::wire::ControllerStartResponse {
195
196 _empty,
197
198
199 } = out_;
200 }
201
202 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
203
204 Ok(())
205 }
206 }
207
208 unsafe impl<___E>
209 ::fidl_next::EncodeOption<
210 ::fidl_next::wire::Box<'static, crate::wire::ControllerStartResponse>,
211 ___E,
212 > for ControllerStartResponse
213 where
214 ___E: ::fidl_next::Encoder + ?Sized,
215 ControllerStartResponse: ::fidl_next::Encode<crate::wire::ControllerStartResponse, ___E>,
216 {
217 #[inline]
218 fn encode_option(
219 this: ::core::option::Option<Self>,
220 encoder: &mut ___E,
221 out: &mut ::core::mem::MaybeUninit<
222 ::fidl_next::wire::Box<'static, crate::wire::ControllerStartResponse>,
223 >,
224 _: (),
225 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
226 if let Some(inner) = this {
227 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
228 ::fidl_next::wire::Box::encode_present(out);
229 } else {
230 ::fidl_next::wire::Box::encode_absent(out);
231 }
232
233 Ok(())
234 }
235 }
236
237 unsafe impl<'a, ___E>
238 ::fidl_next::EncodeOption<
239 ::fidl_next::wire::Box<'static, crate::wire::ControllerStartResponse>,
240 ___E,
241 > for &'a ControllerStartResponse
242 where
243 ___E: ::fidl_next::Encoder + ?Sized,
244 &'a ControllerStartResponse:
245 ::fidl_next::Encode<crate::wire::ControllerStartResponse, ___E>,
246 {
247 #[inline]
248 fn encode_option(
249 this: ::core::option::Option<Self>,
250 encoder: &mut ___E,
251 out: &mut ::core::mem::MaybeUninit<
252 ::fidl_next::wire::Box<'static, crate::wire::ControllerStartResponse>,
253 >,
254 _: (),
255 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
256 if let Some(inner) = this {
257 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
258 ::fidl_next::wire::Box::encode_present(out);
259 } else {
260 ::fidl_next::wire::Box::encode_absent(out);
261 }
262
263 Ok(())
264 }
265 }
266
267 impl ::fidl_next::FromWire<crate::wire::ControllerStartResponse> for ControllerStartResponse {
268 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
269 crate::wire::ControllerStartResponse,
270 Self,
271 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
272
273 #[inline]
274 fn from_wire(wire: crate::wire::ControllerStartResponse) -> Self {
275 Self {}
276 }
277 }
278
279 impl ::fidl_next::FromWireRef<crate::wire::ControllerStartResponse> for ControllerStartResponse {
280 #[inline]
281 fn from_wire_ref(wire: &crate::wire::ControllerStartResponse) -> Self {
282 Self {}
283 }
284 }
285
286 #[doc = " Standard error codes for component framework protocols.\n"]
287 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
288 #[repr(u32)]
289 pub enum Error {
290 Internal = 1,
291 InvalidArguments = 2,
292 Unsupported = 3,
293 AccessDenied = 4,
294 InstanceNotFound = 5,
295 InstanceAlreadyExists = 6,
296 InstanceCannotStart = 7,
297 InstanceCannotResolve = 8,
298 CollectionNotFound = 9,
299 ResourceUnavailable = 10,
300 InstanceDied = 11,
301 ResourceNotFound = 12,
302 InstanceCannotUnresolve = 13,
303 InstanceAlreadyStarted = 14,
304 DependencyCycle = 15,
305 UnknownOrdinal_(u32) = 16,
306 }
307 impl ::std::convert::From<u32> for Error {
308 fn from(value: u32) -> Self {
309 match value {
310 1 => Self::Internal,
311 2 => Self::InvalidArguments,
312 3 => Self::Unsupported,
313 4 => Self::AccessDenied,
314 5 => Self::InstanceNotFound,
315 6 => Self::InstanceAlreadyExists,
316 7 => Self::InstanceCannotStart,
317 8 => Self::InstanceCannotResolve,
318 9 => Self::CollectionNotFound,
319 10 => Self::ResourceUnavailable,
320 11 => Self::InstanceDied,
321 12 => Self::ResourceNotFound,
322 13 => Self::InstanceCannotUnresolve,
323 14 => Self::InstanceAlreadyStarted,
324 15 => Self::DependencyCycle,
325
326 _ => Self::UnknownOrdinal_(value),
327 }
328 }
329 }
330
331 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Error, ___E> for Error
332 where
333 ___E: ?Sized,
334 {
335 #[inline]
336 fn encode(
337 self,
338 encoder: &mut ___E,
339 out: &mut ::core::mem::MaybeUninit<crate::wire::Error>,
340 _: (),
341 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
342 ::fidl_next::Encode::encode(&self, encoder, out, ())
343 }
344 }
345
346 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Error, ___E> for &'a Error
347 where
348 ___E: ?Sized,
349 {
350 #[inline]
351 fn encode(
352 self,
353 encoder: &mut ___E,
354 out: &mut ::core::mem::MaybeUninit<crate::wire::Error>,
355 _: (),
356 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
357 ::fidl_next::munge!(let crate::wire::Error { value } = out);
358 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
359 Error::Internal => 1,
360
361 Error::InvalidArguments => 2,
362
363 Error::Unsupported => 3,
364
365 Error::AccessDenied => 4,
366
367 Error::InstanceNotFound => 5,
368
369 Error::InstanceAlreadyExists => 6,
370
371 Error::InstanceCannotStart => 7,
372
373 Error::InstanceCannotResolve => 8,
374
375 Error::CollectionNotFound => 9,
376
377 Error::ResourceUnavailable => 10,
378
379 Error::InstanceDied => 11,
380
381 Error::ResourceNotFound => 12,
382
383 Error::InstanceCannotUnresolve => 13,
384
385 Error::InstanceAlreadyStarted => 14,
386
387 Error::DependencyCycle => 15,
388
389 Error::UnknownOrdinal_(value) => value,
390 }));
391
392 Ok(())
393 }
394 }
395
396 impl ::core::convert::From<crate::wire::Error> for Error {
397 fn from(wire: crate::wire::Error) -> Self {
398 match u32::from(wire.value) {
399 1 => Self::Internal,
400
401 2 => Self::InvalidArguments,
402
403 3 => Self::Unsupported,
404
405 4 => Self::AccessDenied,
406
407 5 => Self::InstanceNotFound,
408
409 6 => Self::InstanceAlreadyExists,
410
411 7 => Self::InstanceCannotStart,
412
413 8 => Self::InstanceCannotResolve,
414
415 9 => Self::CollectionNotFound,
416
417 10 => Self::ResourceUnavailable,
418
419 11 => Self::InstanceDied,
420
421 12 => Self::ResourceNotFound,
422
423 13 => Self::InstanceCannotUnresolve,
424
425 14 => Self::InstanceAlreadyStarted,
426
427 15 => Self::DependencyCycle,
428
429 value => Self::UnknownOrdinal_(value),
430 }
431 }
432 }
433
434 impl ::fidl_next::FromWire<crate::wire::Error> for Error {
435 #[inline]
436 fn from_wire(wire: crate::wire::Error) -> Self {
437 Self::from(wire)
438 }
439 }
440
441 impl ::fidl_next::FromWireRef<crate::wire::Error> for Error {
442 #[inline]
443 fn from_wire_ref(wire: &crate::wire::Error) -> Self {
444 Self::from(*wire)
445 }
446 }
447
448 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
449 #[repr(C)]
450 pub struct ControllerOpenExposedDirResponse {}
451
452 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ControllerOpenExposedDirResponse, ___E>
453 for ControllerOpenExposedDirResponse
454 where
455 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
456 {
457 #[inline]
458 fn encode(
459 self,
460 encoder_: &mut ___E,
461 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerOpenExposedDirResponse>,
462 _: (),
463 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
464 ::fidl_next::munge! {
465 let crate::wire::ControllerOpenExposedDirResponse {
466
467 _empty,
468
469 } = out_;
470 }
471
472 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
473
474 Ok(())
475 }
476 }
477
478 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ControllerOpenExposedDirResponse, ___E>
479 for &'a ControllerOpenExposedDirResponse
480 where
481 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
482 {
483 #[inline]
484 fn encode(
485 self,
486 encoder_: &mut ___E,
487 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerOpenExposedDirResponse>,
488 _: (),
489 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
490 ::fidl_next::munge! {
491 let crate::wire::ControllerOpenExposedDirResponse {
492
493 _empty,
494
495
496 } = out_;
497 }
498
499 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
500
501 Ok(())
502 }
503 }
504
505 unsafe impl<___E>
506 ::fidl_next::EncodeOption<
507 ::fidl_next::wire::Box<'static, crate::wire::ControllerOpenExposedDirResponse>,
508 ___E,
509 > for ControllerOpenExposedDirResponse
510 where
511 ___E: ::fidl_next::Encoder + ?Sized,
512 ControllerOpenExposedDirResponse:
513 ::fidl_next::Encode<crate::wire::ControllerOpenExposedDirResponse, ___E>,
514 {
515 #[inline]
516 fn encode_option(
517 this: ::core::option::Option<Self>,
518 encoder: &mut ___E,
519 out: &mut ::core::mem::MaybeUninit<
520 ::fidl_next::wire::Box<'static, crate::wire::ControllerOpenExposedDirResponse>,
521 >,
522 _: (),
523 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
524 if let Some(inner) = this {
525 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
526 ::fidl_next::wire::Box::encode_present(out);
527 } else {
528 ::fidl_next::wire::Box::encode_absent(out);
529 }
530
531 Ok(())
532 }
533 }
534
535 unsafe impl<'a, ___E>
536 ::fidl_next::EncodeOption<
537 ::fidl_next::wire::Box<'static, crate::wire::ControllerOpenExposedDirResponse>,
538 ___E,
539 > for &'a ControllerOpenExposedDirResponse
540 where
541 ___E: ::fidl_next::Encoder + ?Sized,
542 &'a ControllerOpenExposedDirResponse:
543 ::fidl_next::Encode<crate::wire::ControllerOpenExposedDirResponse, ___E>,
544 {
545 #[inline]
546 fn encode_option(
547 this: ::core::option::Option<Self>,
548 encoder: &mut ___E,
549 out: &mut ::core::mem::MaybeUninit<
550 ::fidl_next::wire::Box<'static, crate::wire::ControllerOpenExposedDirResponse>,
551 >,
552 _: (),
553 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
554 if let Some(inner) = this {
555 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
556 ::fidl_next::wire::Box::encode_present(out);
557 } else {
558 ::fidl_next::wire::Box::encode_absent(out);
559 }
560
561 Ok(())
562 }
563 }
564
565 impl ::fidl_next::FromWire<crate::wire::ControllerOpenExposedDirResponse>
566 for ControllerOpenExposedDirResponse
567 {
568 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
569 crate::wire::ControllerOpenExposedDirResponse,
570 Self,
571 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
572
573 #[inline]
574 fn from_wire(wire: crate::wire::ControllerOpenExposedDirResponse) -> Self {
575 Self {}
576 }
577 }
578
579 impl ::fidl_next::FromWireRef<crate::wire::ControllerOpenExposedDirResponse>
580 for ControllerOpenExposedDirResponse
581 {
582 #[inline]
583 fn from_wire_ref(wire: &crate::wire::ControllerOpenExposedDirResponse) -> Self {
584 Self {}
585 }
586 }
587
588 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
589 #[repr(C)]
590 pub struct ControllerDestroyResponse {}
591
592 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ControllerDestroyResponse, ___E>
593 for ControllerDestroyResponse
594 where
595 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
596 {
597 #[inline]
598 fn encode(
599 self,
600 encoder_: &mut ___E,
601 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerDestroyResponse>,
602 _: (),
603 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
604 ::fidl_next::munge! {
605 let crate::wire::ControllerDestroyResponse {
606
607 _empty,
608
609 } = out_;
610 }
611
612 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
613
614 Ok(())
615 }
616 }
617
618 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ControllerDestroyResponse, ___E>
619 for &'a ControllerDestroyResponse
620 where
621 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
622 {
623 #[inline]
624 fn encode(
625 self,
626 encoder_: &mut ___E,
627 out_: &mut ::core::mem::MaybeUninit<crate::wire::ControllerDestroyResponse>,
628 _: (),
629 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
630 ::fidl_next::munge! {
631 let crate::wire::ControllerDestroyResponse {
632
633 _empty,
634
635
636 } = out_;
637 }
638
639 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
640
641 Ok(())
642 }
643 }
644
645 unsafe impl<___E>
646 ::fidl_next::EncodeOption<
647 ::fidl_next::wire::Box<'static, crate::wire::ControllerDestroyResponse>,
648 ___E,
649 > for ControllerDestroyResponse
650 where
651 ___E: ::fidl_next::Encoder + ?Sized,
652 ControllerDestroyResponse:
653 ::fidl_next::Encode<crate::wire::ControllerDestroyResponse, ___E>,
654 {
655 #[inline]
656 fn encode_option(
657 this: ::core::option::Option<Self>,
658 encoder: &mut ___E,
659 out: &mut ::core::mem::MaybeUninit<
660 ::fidl_next::wire::Box<'static, crate::wire::ControllerDestroyResponse>,
661 >,
662 _: (),
663 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
664 if let Some(inner) = this {
665 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
666 ::fidl_next::wire::Box::encode_present(out);
667 } else {
668 ::fidl_next::wire::Box::encode_absent(out);
669 }
670
671 Ok(())
672 }
673 }
674
675 unsafe impl<'a, ___E>
676 ::fidl_next::EncodeOption<
677 ::fidl_next::wire::Box<'static, crate::wire::ControllerDestroyResponse>,
678 ___E,
679 > for &'a ControllerDestroyResponse
680 where
681 ___E: ::fidl_next::Encoder + ?Sized,
682 &'a ControllerDestroyResponse:
683 ::fidl_next::Encode<crate::wire::ControllerDestroyResponse, ___E>,
684 {
685 #[inline]
686 fn encode_option(
687 this: ::core::option::Option<Self>,
688 encoder: &mut ___E,
689 out: &mut ::core::mem::MaybeUninit<
690 ::fidl_next::wire::Box<'static, crate::wire::ControllerDestroyResponse>,
691 >,
692 _: (),
693 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
694 if let Some(inner) = this {
695 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
696 ::fidl_next::wire::Box::encode_present(out);
697 } else {
698 ::fidl_next::wire::Box::encode_absent(out);
699 }
700
701 Ok(())
702 }
703 }
704
705 impl ::fidl_next::FromWire<crate::wire::ControllerDestroyResponse> for ControllerDestroyResponse {
706 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
707 crate::wire::ControllerDestroyResponse,
708 Self,
709 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
710
711 #[inline]
712 fn from_wire(wire: crate::wire::ControllerDestroyResponse) -> Self {
713 Self {}
714 }
715 }
716
717 impl ::fidl_next::FromWireRef<crate::wire::ControllerDestroyResponse>
718 for ControllerDestroyResponse
719 {
720 #[inline]
721 fn from_wire_ref(wire: &crate::wire::ControllerDestroyResponse) -> Self {
722 Self {}
723 }
724 }
725
726 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
727 #[repr(u32)]
728 pub enum DeletionError {
729 Connection = 1,
730 Protocol = 2,
731 NoneAvailable = 3,
732 Unsupported = 4,
733 }
734 impl ::core::convert::TryFrom<u32> for DeletionError {
735 type Error = ::fidl_next::UnknownStrictEnumMemberError;
736 fn try_from(
737 value: u32,
738 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
739 match value {
740 1 => Ok(Self::Connection),
741 2 => Ok(Self::Protocol),
742 3 => Ok(Self::NoneAvailable),
743 4 => Ok(Self::Unsupported),
744
745 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
746 }
747 }
748 }
749
750 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeletionError, ___E> for DeletionError
751 where
752 ___E: ?Sized,
753 {
754 #[inline]
755 fn encode(
756 self,
757 encoder: &mut ___E,
758 out: &mut ::core::mem::MaybeUninit<crate::wire::DeletionError>,
759 _: (),
760 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
761 ::fidl_next::Encode::encode(&self, encoder, out, ())
762 }
763 }
764
765 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeletionError, ___E> for &'a DeletionError
766 where
767 ___E: ?Sized,
768 {
769 #[inline]
770 fn encode(
771 self,
772 encoder: &mut ___E,
773 out: &mut ::core::mem::MaybeUninit<crate::wire::DeletionError>,
774 _: (),
775 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
776 ::fidl_next::munge!(let crate::wire::DeletionError { value } = out);
777 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
778 DeletionError::Connection => 1,
779
780 DeletionError::Protocol => 2,
781
782 DeletionError::NoneAvailable => 3,
783
784 DeletionError::Unsupported => 4,
785 }));
786
787 Ok(())
788 }
789 }
790
791 impl ::core::convert::From<crate::wire::DeletionError> for DeletionError {
792 fn from(wire: crate::wire::DeletionError) -> Self {
793 match u32::from(wire.value) {
794 1 => Self::Connection,
795
796 2 => Self::Protocol,
797
798 3 => Self::NoneAvailable,
799
800 4 => Self::Unsupported,
801
802 _ => unsafe { ::core::hint::unreachable_unchecked() },
803 }
804 }
805 }
806
807 impl ::fidl_next::FromWire<crate::wire::DeletionError> for DeletionError {
808 #[inline]
809 fn from_wire(wire: crate::wire::DeletionError) -> Self {
810 Self::from(wire)
811 }
812 }
813
814 impl ::fidl_next::FromWireRef<crate::wire::DeletionError> for DeletionError {
815 #[inline]
816 fn from_wire_ref(wire: &crate::wire::DeletionError) -> Self {
817 Self::from(*wire)
818 }
819 }
820
821 #[doc = " Payload for Destroyed events.\n"]
822 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
823 pub struct DestroyedPayload {}
824
825 impl DestroyedPayload {
826 fn __max_ordinal(&self) -> usize {
827 0
828 }
829 }
830
831 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DestroyedPayload<'static>, ___E>
832 for DestroyedPayload
833 where
834 ___E: ::fidl_next::Encoder + ?Sized,
835 {
836 #[inline]
837 fn encode(
838 mut self,
839 encoder: &mut ___E,
840 out: &mut ::core::mem::MaybeUninit<crate::wire::DestroyedPayload<'static>>,
841 _: (),
842 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
843 ::fidl_next::munge!(let crate::wire::DestroyedPayload { table } = out);
844
845 let max_ord = self.__max_ordinal();
846
847 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
848 ::fidl_next::Wire::zero_padding(&mut out);
849
850 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
851 ::fidl_next::wire::Envelope,
852 >(encoder, max_ord);
853
854 for i in 1..=max_ord {
855 match i {
856 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
857 }
858 unsafe {
859 preallocated.write_next(out.assume_init_ref());
860 }
861 }
862
863 ::fidl_next::wire::Table::encode_len(table, max_ord);
864
865 Ok(())
866 }
867 }
868
869 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DestroyedPayload<'static>, ___E>
870 for &'a DestroyedPayload
871 where
872 ___E: ::fidl_next::Encoder + ?Sized,
873 {
874 #[inline]
875 fn encode(
876 self,
877 encoder: &mut ___E,
878 out: &mut ::core::mem::MaybeUninit<crate::wire::DestroyedPayload<'static>>,
879 _: (),
880 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
881 ::fidl_next::munge!(let crate::wire::DestroyedPayload { table } = out);
882
883 let max_ord = self.__max_ordinal();
884
885 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
886 ::fidl_next::Wire::zero_padding(&mut out);
887
888 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
889 ::fidl_next::wire::Envelope,
890 >(encoder, max_ord);
891
892 for i in 1..=max_ord {
893 match i {
894 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
895 }
896 unsafe {
897 preallocated.write_next(out.assume_init_ref());
898 }
899 }
900
901 ::fidl_next::wire::Table::encode_len(table, max_ord);
902
903 Ok(())
904 }
905 }
906
907 impl<'de> ::fidl_next::FromWire<crate::wire::DestroyedPayload<'de>> for DestroyedPayload {
908 #[inline]
909 fn from_wire(wire_: crate::wire::DestroyedPayload<'de>) -> Self {
910 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
911
912 Self {}
913 }
914 }
915
916 impl<'de> ::fidl_next::FromWireRef<crate::wire::DestroyedPayload<'de>> for DestroyedPayload {
917 #[inline]
918 fn from_wire_ref(wire: &crate::wire::DestroyedPayload<'de>) -> Self {
919 Self {}
920 }
921 }
922
923 #[doc = " Payload for Discovered events.\n"]
924 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
925 pub struct DiscoveredPayload {}
926
927 impl DiscoveredPayload {
928 fn __max_ordinal(&self) -> usize {
929 0
930 }
931 }
932
933 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DiscoveredPayload<'static>, ___E>
934 for DiscoveredPayload
935 where
936 ___E: ::fidl_next::Encoder + ?Sized,
937 {
938 #[inline]
939 fn encode(
940 mut self,
941 encoder: &mut ___E,
942 out: &mut ::core::mem::MaybeUninit<crate::wire::DiscoveredPayload<'static>>,
943 _: (),
944 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
945 ::fidl_next::munge!(let crate::wire::DiscoveredPayload { table } = out);
946
947 let max_ord = self.__max_ordinal();
948
949 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
950 ::fidl_next::Wire::zero_padding(&mut out);
951
952 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
953 ::fidl_next::wire::Envelope,
954 >(encoder, max_ord);
955
956 for i in 1..=max_ord {
957 match i {
958 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
959 }
960 unsafe {
961 preallocated.write_next(out.assume_init_ref());
962 }
963 }
964
965 ::fidl_next::wire::Table::encode_len(table, max_ord);
966
967 Ok(())
968 }
969 }
970
971 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DiscoveredPayload<'static>, ___E>
972 for &'a DiscoveredPayload
973 where
974 ___E: ::fidl_next::Encoder + ?Sized,
975 {
976 #[inline]
977 fn encode(
978 self,
979 encoder: &mut ___E,
980 out: &mut ::core::mem::MaybeUninit<crate::wire::DiscoveredPayload<'static>>,
981 _: (),
982 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
983 ::fidl_next::munge!(let crate::wire::DiscoveredPayload { table } = out);
984
985 let max_ord = self.__max_ordinal();
986
987 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
988 ::fidl_next::Wire::zero_padding(&mut out);
989
990 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
991 ::fidl_next::wire::Envelope,
992 >(encoder, max_ord);
993
994 for i in 1..=max_ord {
995 match i {
996 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
997 }
998 unsafe {
999 preallocated.write_next(out.assume_init_ref());
1000 }
1001 }
1002
1003 ::fidl_next::wire::Table::encode_len(table, max_ord);
1004
1005 Ok(())
1006 }
1007 }
1008
1009 impl<'de> ::fidl_next::FromWire<crate::wire::DiscoveredPayload<'de>> for DiscoveredPayload {
1010 #[inline]
1011 fn from_wire(wire_: crate::wire::DiscoveredPayload<'de>) -> Self {
1012 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1013
1014 Self {}
1015 }
1016 }
1017
1018 impl<'de> ::fidl_next::FromWireRef<crate::wire::DiscoveredPayload<'de>> for DiscoveredPayload {
1019 #[inline]
1020 fn from_wire_ref(wire: &crate::wire::DiscoveredPayload<'de>) -> Self {
1021 Self {}
1022 }
1023 }
1024
1025 #[doc = " Payload for Purged events.\n"]
1026 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1027 pub struct PurgedPayload {}
1028
1029 impl PurgedPayload {
1030 fn __max_ordinal(&self) -> usize {
1031 0
1032 }
1033 }
1034
1035 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PurgedPayload<'static>, ___E> for PurgedPayload
1036 where
1037 ___E: ::fidl_next::Encoder + ?Sized,
1038 {
1039 #[inline]
1040 fn encode(
1041 mut self,
1042 encoder: &mut ___E,
1043 out: &mut ::core::mem::MaybeUninit<crate::wire::PurgedPayload<'static>>,
1044 _: (),
1045 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1046 ::fidl_next::munge!(let crate::wire::PurgedPayload { table } = out);
1047
1048 let max_ord = self.__max_ordinal();
1049
1050 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1051 ::fidl_next::Wire::zero_padding(&mut out);
1052
1053 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1054 ::fidl_next::wire::Envelope,
1055 >(encoder, max_ord);
1056
1057 for i in 1..=max_ord {
1058 match i {
1059 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1060 }
1061 unsafe {
1062 preallocated.write_next(out.assume_init_ref());
1063 }
1064 }
1065
1066 ::fidl_next::wire::Table::encode_len(table, max_ord);
1067
1068 Ok(())
1069 }
1070 }
1071
1072 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PurgedPayload<'static>, ___E>
1073 for &'a PurgedPayload
1074 where
1075 ___E: ::fidl_next::Encoder + ?Sized,
1076 {
1077 #[inline]
1078 fn encode(
1079 self,
1080 encoder: &mut ___E,
1081 out: &mut ::core::mem::MaybeUninit<crate::wire::PurgedPayload<'static>>,
1082 _: (),
1083 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1084 ::fidl_next::munge!(let crate::wire::PurgedPayload { table } = out);
1085
1086 let max_ord = self.__max_ordinal();
1087
1088 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1089 ::fidl_next::Wire::zero_padding(&mut out);
1090
1091 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1092 ::fidl_next::wire::Envelope,
1093 >(encoder, max_ord);
1094
1095 for i in 1..=max_ord {
1096 match i {
1097 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1098 }
1099 unsafe {
1100 preallocated.write_next(out.assume_init_ref());
1101 }
1102 }
1103
1104 ::fidl_next::wire::Table::encode_len(table, max_ord);
1105
1106 Ok(())
1107 }
1108 }
1109
1110 impl<'de> ::fidl_next::FromWire<crate::wire::PurgedPayload<'de>> for PurgedPayload {
1111 #[inline]
1112 fn from_wire(wire_: crate::wire::PurgedPayload<'de>) -> Self {
1113 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1114
1115 Self {}
1116 }
1117 }
1118
1119 impl<'de> ::fidl_next::FromWireRef<crate::wire::PurgedPayload<'de>> for PurgedPayload {
1120 #[inline]
1121 fn from_wire_ref(wire: &crate::wire::PurgedPayload<'de>) -> Self {
1122 Self {}
1123 }
1124 }
1125
1126 #[doc = " Payload for Resolved events.\n"]
1127 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1128 pub struct ResolvedPayload {}
1129
1130 impl ResolvedPayload {
1131 fn __max_ordinal(&self) -> usize {
1132 0
1133 }
1134 }
1135
1136 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ResolvedPayload<'static>, ___E>
1137 for ResolvedPayload
1138 where
1139 ___E: ::fidl_next::Encoder + ?Sized,
1140 {
1141 #[inline]
1142 fn encode(
1143 mut self,
1144 encoder: &mut ___E,
1145 out: &mut ::core::mem::MaybeUninit<crate::wire::ResolvedPayload<'static>>,
1146 _: (),
1147 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1148 ::fidl_next::munge!(let crate::wire::ResolvedPayload { table } = out);
1149
1150 let max_ord = self.__max_ordinal();
1151
1152 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1153 ::fidl_next::Wire::zero_padding(&mut out);
1154
1155 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1156 ::fidl_next::wire::Envelope,
1157 >(encoder, max_ord);
1158
1159 for i in 1..=max_ord {
1160 match i {
1161 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1162 }
1163 unsafe {
1164 preallocated.write_next(out.assume_init_ref());
1165 }
1166 }
1167
1168 ::fidl_next::wire::Table::encode_len(table, max_ord);
1169
1170 Ok(())
1171 }
1172 }
1173
1174 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ResolvedPayload<'static>, ___E>
1175 for &'a ResolvedPayload
1176 where
1177 ___E: ::fidl_next::Encoder + ?Sized,
1178 {
1179 #[inline]
1180 fn encode(
1181 self,
1182 encoder: &mut ___E,
1183 out: &mut ::core::mem::MaybeUninit<crate::wire::ResolvedPayload<'static>>,
1184 _: (),
1185 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1186 ::fidl_next::munge!(let crate::wire::ResolvedPayload { table } = out);
1187
1188 let max_ord = self.__max_ordinal();
1189
1190 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1191 ::fidl_next::Wire::zero_padding(&mut out);
1192
1193 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1194 ::fidl_next::wire::Envelope,
1195 >(encoder, max_ord);
1196
1197 for i in 1..=max_ord {
1198 match i {
1199 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1200 }
1201 unsafe {
1202 preallocated.write_next(out.assume_init_ref());
1203 }
1204 }
1205
1206 ::fidl_next::wire::Table::encode_len(table, max_ord);
1207
1208 Ok(())
1209 }
1210 }
1211
1212 impl<'de> ::fidl_next::FromWire<crate::wire::ResolvedPayload<'de>> for ResolvedPayload {
1213 #[inline]
1214 fn from_wire(wire_: crate::wire::ResolvedPayload<'de>) -> Self {
1215 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1216
1217 Self {}
1218 }
1219 }
1220
1221 impl<'de> ::fidl_next::FromWireRef<crate::wire::ResolvedPayload<'de>> for ResolvedPayload {
1222 #[inline]
1223 fn from_wire_ref(wire: &crate::wire::ResolvedPayload<'de>) -> Self {
1224 Self {}
1225 }
1226 }
1227
1228 #[doc = " Payload for Started events.\n"]
1229 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1230 pub struct StartedPayload {}
1231
1232 impl StartedPayload {
1233 fn __max_ordinal(&self) -> usize {
1234 0
1235 }
1236 }
1237
1238 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StartedPayload<'static>, ___E> for StartedPayload
1239 where
1240 ___E: ::fidl_next::Encoder + ?Sized,
1241 {
1242 #[inline]
1243 fn encode(
1244 mut self,
1245 encoder: &mut ___E,
1246 out: &mut ::core::mem::MaybeUninit<crate::wire::StartedPayload<'static>>,
1247 _: (),
1248 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1249 ::fidl_next::munge!(let crate::wire::StartedPayload { table } = out);
1250
1251 let max_ord = self.__max_ordinal();
1252
1253 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1254 ::fidl_next::Wire::zero_padding(&mut out);
1255
1256 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1257 ::fidl_next::wire::Envelope,
1258 >(encoder, max_ord);
1259
1260 for i in 1..=max_ord {
1261 match i {
1262 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1263 }
1264 unsafe {
1265 preallocated.write_next(out.assume_init_ref());
1266 }
1267 }
1268
1269 ::fidl_next::wire::Table::encode_len(table, max_ord);
1270
1271 Ok(())
1272 }
1273 }
1274
1275 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::StartedPayload<'static>, ___E>
1276 for &'a StartedPayload
1277 where
1278 ___E: ::fidl_next::Encoder + ?Sized,
1279 {
1280 #[inline]
1281 fn encode(
1282 self,
1283 encoder: &mut ___E,
1284 out: &mut ::core::mem::MaybeUninit<crate::wire::StartedPayload<'static>>,
1285 _: (),
1286 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1287 ::fidl_next::munge!(let crate::wire::StartedPayload { table } = out);
1288
1289 let max_ord = self.__max_ordinal();
1290
1291 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1292 ::fidl_next::Wire::zero_padding(&mut out);
1293
1294 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1295 ::fidl_next::wire::Envelope,
1296 >(encoder, max_ord);
1297
1298 for i in 1..=max_ord {
1299 match i {
1300 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1301 }
1302 unsafe {
1303 preallocated.write_next(out.assume_init_ref());
1304 }
1305 }
1306
1307 ::fidl_next::wire::Table::encode_len(table, max_ord);
1308
1309 Ok(())
1310 }
1311 }
1312
1313 impl<'de> ::fidl_next::FromWire<crate::wire::StartedPayload<'de>> for StartedPayload {
1314 #[inline]
1315 fn from_wire(wire_: crate::wire::StartedPayload<'de>) -> Self {
1316 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1317
1318 Self {}
1319 }
1320 }
1321
1322 impl<'de> ::fidl_next::FromWireRef<crate::wire::StartedPayload<'de>> for StartedPayload {
1323 #[inline]
1324 fn from_wire_ref(wire: &crate::wire::StartedPayload<'de>) -> Self {
1325 Self {}
1326 }
1327 }
1328
1329 #[doc = " Payload for Unresolved events.\n"]
1330 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1331 pub struct UnresolvedPayload {}
1332
1333 impl UnresolvedPayload {
1334 fn __max_ordinal(&self) -> usize {
1335 0
1336 }
1337 }
1338
1339 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnresolvedPayload<'static>, ___E>
1340 for UnresolvedPayload
1341 where
1342 ___E: ::fidl_next::Encoder + ?Sized,
1343 {
1344 #[inline]
1345 fn encode(
1346 mut self,
1347 encoder: &mut ___E,
1348 out: &mut ::core::mem::MaybeUninit<crate::wire::UnresolvedPayload<'static>>,
1349 _: (),
1350 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1351 ::fidl_next::munge!(let crate::wire::UnresolvedPayload { table } = out);
1352
1353 let max_ord = self.__max_ordinal();
1354
1355 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1356 ::fidl_next::Wire::zero_padding(&mut out);
1357
1358 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1359 ::fidl_next::wire::Envelope,
1360 >(encoder, max_ord);
1361
1362 for i in 1..=max_ord {
1363 match i {
1364 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1365 }
1366 unsafe {
1367 preallocated.write_next(out.assume_init_ref());
1368 }
1369 }
1370
1371 ::fidl_next::wire::Table::encode_len(table, max_ord);
1372
1373 Ok(())
1374 }
1375 }
1376
1377 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnresolvedPayload<'static>, ___E>
1378 for &'a UnresolvedPayload
1379 where
1380 ___E: ::fidl_next::Encoder + ?Sized,
1381 {
1382 #[inline]
1383 fn encode(
1384 self,
1385 encoder: &mut ___E,
1386 out: &mut ::core::mem::MaybeUninit<crate::wire::UnresolvedPayload<'static>>,
1387 _: (),
1388 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1389 ::fidl_next::munge!(let crate::wire::UnresolvedPayload { table } = out);
1390
1391 let max_ord = self.__max_ordinal();
1392
1393 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1394 ::fidl_next::Wire::zero_padding(&mut out);
1395
1396 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1397 ::fidl_next::wire::Envelope,
1398 >(encoder, max_ord);
1399
1400 for i in 1..=max_ord {
1401 match i {
1402 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1403 }
1404 unsafe {
1405 preallocated.write_next(out.assume_init_ref());
1406 }
1407 }
1408
1409 ::fidl_next::wire::Table::encode_len(table, max_ord);
1410
1411 Ok(())
1412 }
1413 }
1414
1415 impl<'de> ::fidl_next::FromWire<crate::wire::UnresolvedPayload<'de>> for UnresolvedPayload {
1416 #[inline]
1417 fn from_wire(wire_: crate::wire::UnresolvedPayload<'de>) -> Self {
1418 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1419
1420 Self {}
1421 }
1422 }
1423
1424 impl<'de> ::fidl_next::FromWireRef<crate::wire::UnresolvedPayload<'de>> for UnresolvedPayload {
1425 #[inline]
1426 fn from_wire_ref(wire: &crate::wire::UnresolvedPayload<'de>) -> Self {
1427 Self {}
1428 }
1429 }
1430
1431 #[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"]
1432 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1433 #[repr(u32)]
1434 pub enum EventType {
1435 CapabilityRequested = 1,
1436 Discovered = 3,
1437 Destroyed = 4,
1438 Resolved = 5,
1439 Started = 6,
1440 Stopped = 7,
1441 DebugStarted = 8,
1442 Unresolved = 9,
1443 }
1444 impl ::core::convert::TryFrom<u32> for EventType {
1445 type Error = ::fidl_next::UnknownStrictEnumMemberError;
1446 fn try_from(
1447 value: u32,
1448 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
1449 match value {
1450 1 => Ok(Self::CapabilityRequested),
1451 3 => Ok(Self::Discovered),
1452 4 => Ok(Self::Destroyed),
1453 5 => Ok(Self::Resolved),
1454 6 => Ok(Self::Started),
1455 7 => Ok(Self::Stopped),
1456 8 => Ok(Self::DebugStarted),
1457 9 => Ok(Self::Unresolved),
1458
1459 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
1460 }
1461 }
1462 }
1463
1464 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EventType, ___E> for EventType
1465 where
1466 ___E: ?Sized,
1467 {
1468 #[inline]
1469 fn encode(
1470 self,
1471 encoder: &mut ___E,
1472 out: &mut ::core::mem::MaybeUninit<crate::wire::EventType>,
1473 _: (),
1474 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1475 ::fidl_next::Encode::encode(&self, encoder, out, ())
1476 }
1477 }
1478
1479 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::EventType, ___E> for &'a EventType
1480 where
1481 ___E: ?Sized,
1482 {
1483 #[inline]
1484 fn encode(
1485 self,
1486 encoder: &mut ___E,
1487 out: &mut ::core::mem::MaybeUninit<crate::wire::EventType>,
1488 _: (),
1489 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1490 ::fidl_next::munge!(let crate::wire::EventType { value } = out);
1491 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1492 EventType::CapabilityRequested => 1,
1493
1494 EventType::Discovered => 3,
1495
1496 EventType::Destroyed => 4,
1497
1498 EventType::Resolved => 5,
1499
1500 EventType::Started => 6,
1501
1502 EventType::Stopped => 7,
1503
1504 EventType::DebugStarted => 8,
1505
1506 EventType::Unresolved => 9,
1507 }));
1508
1509 Ok(())
1510 }
1511 }
1512
1513 impl ::core::convert::From<crate::wire::EventType> for EventType {
1514 fn from(wire: crate::wire::EventType) -> Self {
1515 match u32::from(wire.value) {
1516 1 => Self::CapabilityRequested,
1517
1518 3 => Self::Discovered,
1519
1520 4 => Self::Destroyed,
1521
1522 5 => Self::Resolved,
1523
1524 6 => Self::Started,
1525
1526 7 => Self::Stopped,
1527
1528 8 => Self::DebugStarted,
1529
1530 9 => Self::Unresolved,
1531
1532 _ => unsafe { ::core::hint::unreachable_unchecked() },
1533 }
1534 }
1535 }
1536
1537 impl ::fidl_next::FromWire<crate::wire::EventType> for EventType {
1538 #[inline]
1539 fn from_wire(wire: crate::wire::EventType) -> Self {
1540 Self::from(wire)
1541 }
1542 }
1543
1544 impl ::fidl_next::FromWireRef<crate::wire::EventType> for EventType {
1545 #[inline]
1546 fn from_wire_ref(wire: &crate::wire::EventType) -> Self {
1547 Self::from(*wire)
1548 }
1549 }
1550
1551 #[doc = " Payload for Stopped events.\n"]
1552 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1553 pub struct StoppedPayload {
1554 pub status: ::core::option::Option<i32>,
1555
1556 pub exit_code: ::core::option::Option<i64>,
1557 }
1558
1559 impl StoppedPayload {
1560 fn __max_ordinal(&self) -> usize {
1561 if self.exit_code.is_some() {
1562 return 2;
1563 }
1564
1565 if self.status.is_some() {
1566 return 1;
1567 }
1568
1569 0
1570 }
1571 }
1572
1573 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StoppedPayload<'static>, ___E> for StoppedPayload
1574 where
1575 ___E: ::fidl_next::Encoder + ?Sized,
1576 {
1577 #[inline]
1578 fn encode(
1579 mut self,
1580 encoder: &mut ___E,
1581 out: &mut ::core::mem::MaybeUninit<crate::wire::StoppedPayload<'static>>,
1582 _: (),
1583 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1584 ::fidl_next::munge!(let crate::wire::StoppedPayload { table } = out);
1585
1586 let max_ord = self.__max_ordinal();
1587
1588 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1589 ::fidl_next::Wire::zero_padding(&mut out);
1590
1591 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1592 ::fidl_next::wire::Envelope,
1593 >(encoder, max_ord);
1594
1595 for i in 1..=max_ord {
1596 match i {
1597 2 => {
1598 if let Some(value) = self.exit_code.take() {
1599 ::fidl_next::wire::Envelope::encode_value::<
1600 ::fidl_next::wire::Int64,
1601 ___E,
1602 >(
1603 value, preallocated.encoder, &mut out, ()
1604 )?;
1605 } else {
1606 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1607 }
1608 }
1609
1610 1 => {
1611 if let Some(value) = self.status.take() {
1612 ::fidl_next::wire::Envelope::encode_value::<
1613 ::fidl_next::wire::Int32,
1614 ___E,
1615 >(
1616 value, preallocated.encoder, &mut out, ()
1617 )?;
1618 } else {
1619 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1620 }
1621 }
1622
1623 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1624 }
1625 unsafe {
1626 preallocated.write_next(out.assume_init_ref());
1627 }
1628 }
1629
1630 ::fidl_next::wire::Table::encode_len(table, max_ord);
1631
1632 Ok(())
1633 }
1634 }
1635
1636 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::StoppedPayload<'static>, ___E>
1637 for &'a StoppedPayload
1638 where
1639 ___E: ::fidl_next::Encoder + ?Sized,
1640 {
1641 #[inline]
1642 fn encode(
1643 self,
1644 encoder: &mut ___E,
1645 out: &mut ::core::mem::MaybeUninit<crate::wire::StoppedPayload<'static>>,
1646 _: (),
1647 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1648 ::fidl_next::munge!(let crate::wire::StoppedPayload { table } = out);
1649
1650 let max_ord = self.__max_ordinal();
1651
1652 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1653 ::fidl_next::Wire::zero_padding(&mut out);
1654
1655 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1656 ::fidl_next::wire::Envelope,
1657 >(encoder, max_ord);
1658
1659 for i in 1..=max_ord {
1660 match i {
1661 2 => {
1662 if let Some(value) = &self.exit_code {
1663 ::fidl_next::wire::Envelope::encode_value::<
1664 ::fidl_next::wire::Int64,
1665 ___E,
1666 >(
1667 value, preallocated.encoder, &mut out, ()
1668 )?;
1669 } else {
1670 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1671 }
1672 }
1673
1674 1 => {
1675 if let Some(value) = &self.status {
1676 ::fidl_next::wire::Envelope::encode_value::<
1677 ::fidl_next::wire::Int32,
1678 ___E,
1679 >(
1680 value, preallocated.encoder, &mut out, ()
1681 )?;
1682 } else {
1683 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1684 }
1685 }
1686
1687 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1688 }
1689 unsafe {
1690 preallocated.write_next(out.assume_init_ref());
1691 }
1692 }
1693
1694 ::fidl_next::wire::Table::encode_len(table, max_ord);
1695
1696 Ok(())
1697 }
1698 }
1699
1700 impl<'de> ::fidl_next::FromWire<crate::wire::StoppedPayload<'de>> for StoppedPayload {
1701 #[inline]
1702 fn from_wire(wire_: crate::wire::StoppedPayload<'de>) -> Self {
1703 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1704
1705 let status = wire_.table.get(1);
1706
1707 let exit_code = wire_.table.get(2);
1708
1709 Self {
1710 status: status.map(|envelope| {
1711 ::fidl_next::FromWire::from_wire(unsafe {
1712 envelope.read_unchecked::<::fidl_next::wire::Int32>()
1713 })
1714 }),
1715
1716 exit_code: exit_code.map(|envelope| {
1717 ::fidl_next::FromWire::from_wire(unsafe {
1718 envelope.read_unchecked::<::fidl_next::wire::Int64>()
1719 })
1720 }),
1721 }
1722 }
1723 }
1724
1725 impl<'de> ::fidl_next::FromWireRef<crate::wire::StoppedPayload<'de>> for StoppedPayload {
1726 #[inline]
1727 fn from_wire_ref(wire: &crate::wire::StoppedPayload<'de>) -> Self {
1728 Self {
1729 status: wire.table.get(1).map(|envelope| {
1730 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1731 envelope.deref_unchecked::<::fidl_next::wire::Int32>()
1732 })
1733 }),
1734
1735 exit_code: wire.table.get(2).map(|envelope| {
1736 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1737 envelope.deref_unchecked::<::fidl_next::wire::Int64>()
1738 })
1739 }),
1740 }
1741 }
1742 }
1743
1744 #[doc = " A head providing metadata about a target component instance.\n"]
1745 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1746 pub struct EventHeader {
1747 pub event_type: ::core::option::Option<crate::natural::EventType>,
1748
1749 pub moniker: ::core::option::Option<::std::string::String>,
1750
1751 pub component_url: ::core::option::Option<::std::string::String>,
1752
1753 pub timestamp: ::core::option::Option<i64>,
1754 }
1755
1756 impl EventHeader {
1757 fn __max_ordinal(&self) -> usize {
1758 if self.timestamp.is_some() {
1759 return 4;
1760 }
1761
1762 if self.component_url.is_some() {
1763 return 3;
1764 }
1765
1766 if self.moniker.is_some() {
1767 return 2;
1768 }
1769
1770 if self.event_type.is_some() {
1771 return 1;
1772 }
1773
1774 0
1775 }
1776 }
1777
1778 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EventHeader<'static>, ___E> for EventHeader
1779 where
1780 ___E: ::fidl_next::Encoder + ?Sized,
1781 {
1782 #[inline]
1783 fn encode(
1784 mut self,
1785 encoder: &mut ___E,
1786 out: &mut ::core::mem::MaybeUninit<crate::wire::EventHeader<'static>>,
1787 _: (),
1788 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1789 ::fidl_next::munge!(let crate::wire::EventHeader { table } = out);
1790
1791 let max_ord = self.__max_ordinal();
1792
1793 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1794 ::fidl_next::Wire::zero_padding(&mut out);
1795
1796 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1797 ::fidl_next::wire::Envelope,
1798 >(encoder, max_ord);
1799
1800 for i in 1..=max_ord {
1801 match i {
1802 4 => {
1803 if let Some(value) = self.timestamp.take() {
1804 ::fidl_next::wire::Envelope::encode_value::<
1805 ::fidl_next::wire::Int64,
1806 ___E,
1807 >(
1808 value, preallocated.encoder, &mut out, ()
1809 )?;
1810 } else {
1811 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1812 }
1813 }
1814
1815 3 => {
1816 if let Some(value) = self.component_url.take() {
1817 ::fidl_next::wire::Envelope::encode_value::<
1818 ::fidl_next::wire::String<'static>,
1819 ___E,
1820 >(
1821 value, preallocated.encoder, &mut out, 4096
1822 )?;
1823 } else {
1824 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1825 }
1826 }
1827
1828 2 => {
1829 if let Some(value) = self.moniker.take() {
1830 ::fidl_next::wire::Envelope::encode_value::<
1831 ::fidl_next::wire::String<'static>,
1832 ___E,
1833 >(
1834 value, preallocated.encoder, &mut out, 4096
1835 )?;
1836 } else {
1837 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1838 }
1839 }
1840
1841 1 => {
1842 if let Some(value) = self.event_type.take() {
1843 ::fidl_next::wire::Envelope::encode_value::<
1844 crate::wire::EventType,
1845 ___E,
1846 >(
1847 value, preallocated.encoder, &mut out, ()
1848 )?;
1849 } else {
1850 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1851 }
1852 }
1853
1854 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1855 }
1856 unsafe {
1857 preallocated.write_next(out.assume_init_ref());
1858 }
1859 }
1860
1861 ::fidl_next::wire::Table::encode_len(table, max_ord);
1862
1863 Ok(())
1864 }
1865 }
1866
1867 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::EventHeader<'static>, ___E>
1868 for &'a EventHeader
1869 where
1870 ___E: ::fidl_next::Encoder + ?Sized,
1871 {
1872 #[inline]
1873 fn encode(
1874 self,
1875 encoder: &mut ___E,
1876 out: &mut ::core::mem::MaybeUninit<crate::wire::EventHeader<'static>>,
1877 _: (),
1878 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1879 ::fidl_next::munge!(let crate::wire::EventHeader { table } = out);
1880
1881 let max_ord = self.__max_ordinal();
1882
1883 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1884 ::fidl_next::Wire::zero_padding(&mut out);
1885
1886 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1887 ::fidl_next::wire::Envelope,
1888 >(encoder, max_ord);
1889
1890 for i in 1..=max_ord {
1891 match i {
1892 4 => {
1893 if let Some(value) = &self.timestamp {
1894 ::fidl_next::wire::Envelope::encode_value::<
1895 ::fidl_next::wire::Int64,
1896 ___E,
1897 >(
1898 value, preallocated.encoder, &mut out, ()
1899 )?;
1900 } else {
1901 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1902 }
1903 }
1904
1905 3 => {
1906 if let Some(value) = &self.component_url {
1907 ::fidl_next::wire::Envelope::encode_value::<
1908 ::fidl_next::wire::String<'static>,
1909 ___E,
1910 >(
1911 value, preallocated.encoder, &mut out, 4096
1912 )?;
1913 } else {
1914 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1915 }
1916 }
1917
1918 2 => {
1919 if let Some(value) = &self.moniker {
1920 ::fidl_next::wire::Envelope::encode_value::<
1921 ::fidl_next::wire::String<'static>,
1922 ___E,
1923 >(
1924 value, preallocated.encoder, &mut out, 4096
1925 )?;
1926 } else {
1927 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1928 }
1929 }
1930
1931 1 => {
1932 if let Some(value) = &self.event_type {
1933 ::fidl_next::wire::Envelope::encode_value::<
1934 crate::wire::EventType,
1935 ___E,
1936 >(
1937 value, preallocated.encoder, &mut out, ()
1938 )?;
1939 } else {
1940 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1941 }
1942 }
1943
1944 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1945 }
1946 unsafe {
1947 preallocated.write_next(out.assume_init_ref());
1948 }
1949 }
1950
1951 ::fidl_next::wire::Table::encode_len(table, max_ord);
1952
1953 Ok(())
1954 }
1955 }
1956
1957 impl<'de> ::fidl_next::FromWire<crate::wire::EventHeader<'de>> for EventHeader {
1958 #[inline]
1959 fn from_wire(wire_: crate::wire::EventHeader<'de>) -> Self {
1960 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1961
1962 let event_type = wire_.table.get(1);
1963
1964 let moniker = wire_.table.get(2);
1965
1966 let component_url = wire_.table.get(3);
1967
1968 let timestamp = wire_.table.get(4);
1969
1970 Self {
1971 event_type: event_type.map(|envelope| {
1972 ::fidl_next::FromWire::from_wire(unsafe {
1973 envelope.read_unchecked::<crate::wire::EventType>()
1974 })
1975 }),
1976
1977 moniker: moniker.map(|envelope| {
1978 ::fidl_next::FromWire::from_wire(unsafe {
1979 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
1980 })
1981 }),
1982
1983 component_url: component_url.map(|envelope| {
1984 ::fidl_next::FromWire::from_wire(unsafe {
1985 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
1986 })
1987 }),
1988
1989 timestamp: timestamp.map(|envelope| {
1990 ::fidl_next::FromWire::from_wire(unsafe {
1991 envelope.read_unchecked::<::fidl_next::wire::Int64>()
1992 })
1993 }),
1994 }
1995 }
1996 }
1997
1998 impl<'de> ::fidl_next::FromWireRef<crate::wire::EventHeader<'de>> for EventHeader {
1999 #[inline]
2000 fn from_wire_ref(wire: &crate::wire::EventHeader<'de>) -> Self {
2001 Self {
2002 event_type: wire.table.get(1).map(|envelope| {
2003 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2004 envelope.deref_unchecked::<crate::wire::EventType>()
2005 })
2006 }),
2007
2008 moniker: wire.table.get(2).map(|envelope| {
2009 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2010 envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
2011 })
2012 }),
2013
2014 component_url: wire.table.get(3).map(|envelope| {
2015 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2016 envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
2017 })
2018 }),
2019
2020 timestamp: wire.table.get(4).map(|envelope| {
2021 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2022 envelope.deref_unchecked::<::fidl_next::wire::Int64>()
2023 })
2024 }),
2025 }
2026 }
2027 }
2028
2029 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2030 pub struct ExecutionControllerOnStopRequest {
2031 pub stopped_payload: crate::natural::StoppedPayload,
2032 }
2033
2034 unsafe impl<___E>
2035 ::fidl_next::Encode<crate::wire::ExecutionControllerOnStopRequest<'static>, ___E>
2036 for ExecutionControllerOnStopRequest
2037 where
2038 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2039 ___E: ::fidl_next::Encoder,
2040 {
2041 #[inline]
2042 fn encode(
2043 self,
2044 encoder_: &mut ___E,
2045 out_: &mut ::core::mem::MaybeUninit<
2046 crate::wire::ExecutionControllerOnStopRequest<'static>,
2047 >,
2048 _: (),
2049 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2050 ::fidl_next::munge! {
2051 let crate::wire::ExecutionControllerOnStopRequest {
2052 stopped_payload,
2053
2054 } = out_;
2055 }
2056
2057 ::fidl_next::Encode::encode(self.stopped_payload, encoder_, stopped_payload, ())?;
2058
2059 let mut _field =
2060 unsafe { ::fidl_next::Slot::new_unchecked(stopped_payload.as_mut_ptr()) };
2061
2062 Ok(())
2063 }
2064 }
2065
2066 unsafe impl<'a, ___E>
2067 ::fidl_next::Encode<crate::wire::ExecutionControllerOnStopRequest<'static>, ___E>
2068 for &'a ExecutionControllerOnStopRequest
2069 where
2070 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2071 ___E: ::fidl_next::Encoder,
2072 {
2073 #[inline]
2074 fn encode(
2075 self,
2076 encoder_: &mut ___E,
2077 out_: &mut ::core::mem::MaybeUninit<
2078 crate::wire::ExecutionControllerOnStopRequest<'static>,
2079 >,
2080 _: (),
2081 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2082 ::fidl_next::munge! {
2083 let crate::wire::ExecutionControllerOnStopRequest {
2084
2085 stopped_payload,
2086
2087 } = out_;
2088 }
2089
2090 ::fidl_next::Encode::encode(&self.stopped_payload, encoder_, stopped_payload, ())?;
2091
2092 let mut _field =
2093 unsafe { ::fidl_next::Slot::new_unchecked(stopped_payload.as_mut_ptr()) };
2094
2095 Ok(())
2096 }
2097 }
2098
2099 unsafe impl<___E>
2100 ::fidl_next::EncodeOption<
2101 ::fidl_next::wire::Box<'static, crate::wire::ExecutionControllerOnStopRequest<'static>>,
2102 ___E,
2103 > for ExecutionControllerOnStopRequest
2104 where
2105 ___E: ::fidl_next::Encoder + ?Sized,
2106 ExecutionControllerOnStopRequest:
2107 ::fidl_next::Encode<crate::wire::ExecutionControllerOnStopRequest<'static>, ___E>,
2108 {
2109 #[inline]
2110 fn encode_option(
2111 this: ::core::option::Option<Self>,
2112 encoder: &mut ___E,
2113 out: &mut ::core::mem::MaybeUninit<
2114 ::fidl_next::wire::Box<
2115 'static,
2116 crate::wire::ExecutionControllerOnStopRequest<'static>,
2117 >,
2118 >,
2119 _: (),
2120 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2121 if let Some(inner) = this {
2122 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2123 ::fidl_next::wire::Box::encode_present(out);
2124 } else {
2125 ::fidl_next::wire::Box::encode_absent(out);
2126 }
2127
2128 Ok(())
2129 }
2130 }
2131
2132 unsafe impl<'a, ___E>
2133 ::fidl_next::EncodeOption<
2134 ::fidl_next::wire::Box<'static, crate::wire::ExecutionControllerOnStopRequest<'static>>,
2135 ___E,
2136 > for &'a ExecutionControllerOnStopRequest
2137 where
2138 ___E: ::fidl_next::Encoder + ?Sized,
2139 &'a ExecutionControllerOnStopRequest:
2140 ::fidl_next::Encode<crate::wire::ExecutionControllerOnStopRequest<'static>, ___E>,
2141 {
2142 #[inline]
2143 fn encode_option(
2144 this: ::core::option::Option<Self>,
2145 encoder: &mut ___E,
2146 out: &mut ::core::mem::MaybeUninit<
2147 ::fidl_next::wire::Box<
2148 'static,
2149 crate::wire::ExecutionControllerOnStopRequest<'static>,
2150 >,
2151 >,
2152 _: (),
2153 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2154 if let Some(inner) = this {
2155 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2156 ::fidl_next::wire::Box::encode_present(out);
2157 } else {
2158 ::fidl_next::wire::Box::encode_absent(out);
2159 }
2160
2161 Ok(())
2162 }
2163 }
2164
2165 impl<'de> ::fidl_next::FromWire<crate::wire::ExecutionControllerOnStopRequest<'de>>
2166 for ExecutionControllerOnStopRequest
2167 {
2168 #[inline]
2169 fn from_wire(wire: crate::wire::ExecutionControllerOnStopRequest<'de>) -> Self {
2170 Self { stopped_payload: ::fidl_next::FromWire::from_wire(wire.stopped_payload) }
2171 }
2172 }
2173
2174 impl<'de> ::fidl_next::FromWireRef<crate::wire::ExecutionControllerOnStopRequest<'de>>
2175 for ExecutionControllerOnStopRequest
2176 {
2177 #[inline]
2178 fn from_wire_ref(wire: &crate::wire::ExecutionControllerOnStopRequest<'de>) -> Self {
2179 Self { stopped_payload: ::fidl_next::FromWireRef::from_wire_ref(&wire.stopped_payload) }
2180 }
2181 }
2182
2183 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2184 pub struct IntrospectorGetMonikerResponse {
2185 pub moniker: ::std::string::String,
2186 }
2187
2188 unsafe impl<___E>
2189 ::fidl_next::Encode<crate::wire::IntrospectorGetMonikerResponse<'static>, ___E>
2190 for IntrospectorGetMonikerResponse
2191 where
2192 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2193 ___E: ::fidl_next::Encoder,
2194 {
2195 #[inline]
2196 fn encode(
2197 self,
2198 encoder_: &mut ___E,
2199 out_: &mut ::core::mem::MaybeUninit<
2200 crate::wire::IntrospectorGetMonikerResponse<'static>,
2201 >,
2202 _: (),
2203 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2204 ::fidl_next::munge! {
2205 let crate::wire::IntrospectorGetMonikerResponse {
2206 moniker,
2207
2208 } = out_;
2209 }
2210
2211 ::fidl_next::Encode::encode(self.moniker, encoder_, moniker, 4096)?;
2212
2213 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(moniker.as_mut_ptr()) };
2214 ::fidl_next::Constrained::validate(_field, 4096)?;
2215
2216 Ok(())
2217 }
2218 }
2219
2220 unsafe impl<'a, ___E>
2221 ::fidl_next::Encode<crate::wire::IntrospectorGetMonikerResponse<'static>, ___E>
2222 for &'a IntrospectorGetMonikerResponse
2223 where
2224 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2225 ___E: ::fidl_next::Encoder,
2226 {
2227 #[inline]
2228 fn encode(
2229 self,
2230 encoder_: &mut ___E,
2231 out_: &mut ::core::mem::MaybeUninit<
2232 crate::wire::IntrospectorGetMonikerResponse<'static>,
2233 >,
2234 _: (),
2235 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2236 ::fidl_next::munge! {
2237 let crate::wire::IntrospectorGetMonikerResponse {
2238
2239 moniker,
2240
2241 } = out_;
2242 }
2243
2244 ::fidl_next::Encode::encode(&self.moniker, encoder_, moniker, 4096)?;
2245
2246 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(moniker.as_mut_ptr()) };
2247 ::fidl_next::Constrained::validate(_field, 4096)?;
2248
2249 Ok(())
2250 }
2251 }
2252
2253 unsafe impl<___E>
2254 ::fidl_next::EncodeOption<
2255 ::fidl_next::wire::Box<'static, crate::wire::IntrospectorGetMonikerResponse<'static>>,
2256 ___E,
2257 > for IntrospectorGetMonikerResponse
2258 where
2259 ___E: ::fidl_next::Encoder + ?Sized,
2260 IntrospectorGetMonikerResponse:
2261 ::fidl_next::Encode<crate::wire::IntrospectorGetMonikerResponse<'static>, ___E>,
2262 {
2263 #[inline]
2264 fn encode_option(
2265 this: ::core::option::Option<Self>,
2266 encoder: &mut ___E,
2267 out: &mut ::core::mem::MaybeUninit<
2268 ::fidl_next::wire::Box<
2269 'static,
2270 crate::wire::IntrospectorGetMonikerResponse<'static>,
2271 >,
2272 >,
2273 _: (),
2274 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2275 if let Some(inner) = this {
2276 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2277 ::fidl_next::wire::Box::encode_present(out);
2278 } else {
2279 ::fidl_next::wire::Box::encode_absent(out);
2280 }
2281
2282 Ok(())
2283 }
2284 }
2285
2286 unsafe impl<'a, ___E>
2287 ::fidl_next::EncodeOption<
2288 ::fidl_next::wire::Box<'static, crate::wire::IntrospectorGetMonikerResponse<'static>>,
2289 ___E,
2290 > for &'a IntrospectorGetMonikerResponse
2291 where
2292 ___E: ::fidl_next::Encoder + ?Sized,
2293 &'a IntrospectorGetMonikerResponse:
2294 ::fidl_next::Encode<crate::wire::IntrospectorGetMonikerResponse<'static>, ___E>,
2295 {
2296 #[inline]
2297 fn encode_option(
2298 this: ::core::option::Option<Self>,
2299 encoder: &mut ___E,
2300 out: &mut ::core::mem::MaybeUninit<
2301 ::fidl_next::wire::Box<
2302 'static,
2303 crate::wire::IntrospectorGetMonikerResponse<'static>,
2304 >,
2305 >,
2306 _: (),
2307 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2308 if let Some(inner) = this {
2309 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2310 ::fidl_next::wire::Box::encode_present(out);
2311 } else {
2312 ::fidl_next::wire::Box::encode_absent(out);
2313 }
2314
2315 Ok(())
2316 }
2317 }
2318
2319 impl<'de> ::fidl_next::FromWire<crate::wire::IntrospectorGetMonikerResponse<'de>>
2320 for IntrospectorGetMonikerResponse
2321 {
2322 #[inline]
2323 fn from_wire(wire: crate::wire::IntrospectorGetMonikerResponse<'de>) -> Self {
2324 Self { moniker: ::fidl_next::FromWire::from_wire(wire.moniker) }
2325 }
2326 }
2327
2328 impl<'de> ::fidl_next::FromWireRef<crate::wire::IntrospectorGetMonikerResponse<'de>>
2329 for IntrospectorGetMonikerResponse
2330 {
2331 #[inline]
2332 fn from_wire_ref(wire: &crate::wire::IntrospectorGetMonikerResponse<'de>) -> Self {
2333 Self { moniker: ::fidl_next::FromWireRef::from_wire_ref(&wire.moniker) }
2334 }
2335 }
2336
2337 #[doc = " Error returned from methods in [`Namespace`].\n"]
2338 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2339 #[repr(u32)]
2340 pub enum NamespaceError {
2341 Shadow = 1,
2342 Duplicate = 2,
2343 Conversion = 3,
2344 BadEntry = 4,
2345 DictionaryRead = 5,
2346 UnknownOrdinal_(u32) = 6,
2347 }
2348 impl ::std::convert::From<u32> for NamespaceError {
2349 fn from(value: u32) -> Self {
2350 match value {
2351 1 => Self::Shadow,
2352 2 => Self::Duplicate,
2353 3 => Self::Conversion,
2354 4 => Self::BadEntry,
2355 5 => Self::DictionaryRead,
2356
2357 _ => Self::UnknownOrdinal_(value),
2358 }
2359 }
2360 }
2361
2362 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NamespaceError, ___E> for NamespaceError
2363 where
2364 ___E: ?Sized,
2365 {
2366 #[inline]
2367 fn encode(
2368 self,
2369 encoder: &mut ___E,
2370 out: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceError>,
2371 _: (),
2372 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2373 ::fidl_next::Encode::encode(&self, encoder, out, ())
2374 }
2375 }
2376
2377 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NamespaceError, ___E> for &'a NamespaceError
2378 where
2379 ___E: ?Sized,
2380 {
2381 #[inline]
2382 fn encode(
2383 self,
2384 encoder: &mut ___E,
2385 out: &mut ::core::mem::MaybeUninit<crate::wire::NamespaceError>,
2386 _: (),
2387 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2388 ::fidl_next::munge!(let crate::wire::NamespaceError { value } = out);
2389 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2390 NamespaceError::Shadow => 1,
2391
2392 NamespaceError::Duplicate => 2,
2393
2394 NamespaceError::Conversion => 3,
2395
2396 NamespaceError::BadEntry => 4,
2397
2398 NamespaceError::DictionaryRead => 5,
2399
2400 NamespaceError::UnknownOrdinal_(value) => value,
2401 }));
2402
2403 Ok(())
2404 }
2405 }
2406
2407 impl ::core::convert::From<crate::wire::NamespaceError> for NamespaceError {
2408 fn from(wire: crate::wire::NamespaceError) -> Self {
2409 match u32::from(wire.value) {
2410 1 => Self::Shadow,
2411
2412 2 => Self::Duplicate,
2413
2414 3 => Self::Conversion,
2415
2416 4 => Self::BadEntry,
2417
2418 5 => Self::DictionaryRead,
2419
2420 value => Self::UnknownOrdinal_(value),
2421 }
2422 }
2423 }
2424
2425 impl ::fidl_next::FromWire<crate::wire::NamespaceError> for NamespaceError {
2426 #[inline]
2427 fn from_wire(wire: crate::wire::NamespaceError) -> Self {
2428 Self::from(wire)
2429 }
2430 }
2431
2432 impl ::fidl_next::FromWireRef<crate::wire::NamespaceError> for NamespaceError {
2433 #[inline]
2434 fn from_wire_ref(wire: &crate::wire::NamespaceError) -> Self {
2435 Self::from(*wire)
2436 }
2437 }
2438
2439 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2440 #[repr(C)]
2441 pub struct RealmOpenExposedDirResponse {}
2442
2443 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmOpenExposedDirResponse, ___E>
2444 for RealmOpenExposedDirResponse
2445 where
2446 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2447 {
2448 #[inline]
2449 fn encode(
2450 self,
2451 encoder_: &mut ___E,
2452 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmOpenExposedDirResponse>,
2453 _: (),
2454 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2455 ::fidl_next::munge! {
2456 let crate::wire::RealmOpenExposedDirResponse {
2457
2458 _empty,
2459
2460 } = out_;
2461 }
2462
2463 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
2464
2465 Ok(())
2466 }
2467 }
2468
2469 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RealmOpenExposedDirResponse, ___E>
2470 for &'a RealmOpenExposedDirResponse
2471 where
2472 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2473 {
2474 #[inline]
2475 fn encode(
2476 self,
2477 encoder_: &mut ___E,
2478 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmOpenExposedDirResponse>,
2479 _: (),
2480 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2481 ::fidl_next::munge! {
2482 let crate::wire::RealmOpenExposedDirResponse {
2483
2484 _empty,
2485
2486
2487 } = out_;
2488 }
2489
2490 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
2491
2492 Ok(())
2493 }
2494 }
2495
2496 unsafe impl<___E>
2497 ::fidl_next::EncodeOption<
2498 ::fidl_next::wire::Box<'static, crate::wire::RealmOpenExposedDirResponse>,
2499 ___E,
2500 > for RealmOpenExposedDirResponse
2501 where
2502 ___E: ::fidl_next::Encoder + ?Sized,
2503 RealmOpenExposedDirResponse:
2504 ::fidl_next::Encode<crate::wire::RealmOpenExposedDirResponse, ___E>,
2505 {
2506 #[inline]
2507 fn encode_option(
2508 this: ::core::option::Option<Self>,
2509 encoder: &mut ___E,
2510 out: &mut ::core::mem::MaybeUninit<
2511 ::fidl_next::wire::Box<'static, crate::wire::RealmOpenExposedDirResponse>,
2512 >,
2513 _: (),
2514 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2515 if let Some(inner) = this {
2516 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2517 ::fidl_next::wire::Box::encode_present(out);
2518 } else {
2519 ::fidl_next::wire::Box::encode_absent(out);
2520 }
2521
2522 Ok(())
2523 }
2524 }
2525
2526 unsafe impl<'a, ___E>
2527 ::fidl_next::EncodeOption<
2528 ::fidl_next::wire::Box<'static, crate::wire::RealmOpenExposedDirResponse>,
2529 ___E,
2530 > for &'a RealmOpenExposedDirResponse
2531 where
2532 ___E: ::fidl_next::Encoder + ?Sized,
2533 &'a RealmOpenExposedDirResponse:
2534 ::fidl_next::Encode<crate::wire::RealmOpenExposedDirResponse, ___E>,
2535 {
2536 #[inline]
2537 fn encode_option(
2538 this: ::core::option::Option<Self>,
2539 encoder: &mut ___E,
2540 out: &mut ::core::mem::MaybeUninit<
2541 ::fidl_next::wire::Box<'static, crate::wire::RealmOpenExposedDirResponse>,
2542 >,
2543 _: (),
2544 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2545 if let Some(inner) = this {
2546 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2547 ::fidl_next::wire::Box::encode_present(out);
2548 } else {
2549 ::fidl_next::wire::Box::encode_absent(out);
2550 }
2551
2552 Ok(())
2553 }
2554 }
2555
2556 impl ::fidl_next::FromWire<crate::wire::RealmOpenExposedDirResponse>
2557 for RealmOpenExposedDirResponse
2558 {
2559 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2560 crate::wire::RealmOpenExposedDirResponse,
2561 Self,
2562 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
2563
2564 #[inline]
2565 fn from_wire(wire: crate::wire::RealmOpenExposedDirResponse) -> Self {
2566 Self {}
2567 }
2568 }
2569
2570 impl ::fidl_next::FromWireRef<crate::wire::RealmOpenExposedDirResponse>
2571 for RealmOpenExposedDirResponse
2572 {
2573 #[inline]
2574 fn from_wire_ref(wire: &crate::wire::RealmOpenExposedDirResponse) -> Self {
2575 Self {}
2576 }
2577 }
2578
2579 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2580 #[repr(C)]
2581 pub struct RealmCreateChildResponse {}
2582
2583 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmCreateChildResponse, ___E>
2584 for RealmCreateChildResponse
2585 where
2586 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2587 {
2588 #[inline]
2589 fn encode(
2590 self,
2591 encoder_: &mut ___E,
2592 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmCreateChildResponse>,
2593 _: (),
2594 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2595 ::fidl_next::munge! {
2596 let crate::wire::RealmCreateChildResponse {
2597
2598 _empty,
2599
2600 } = out_;
2601 }
2602
2603 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
2604
2605 Ok(())
2606 }
2607 }
2608
2609 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RealmCreateChildResponse, ___E>
2610 for &'a RealmCreateChildResponse
2611 where
2612 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2613 {
2614 #[inline]
2615 fn encode(
2616 self,
2617 encoder_: &mut ___E,
2618 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmCreateChildResponse>,
2619 _: (),
2620 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2621 ::fidl_next::munge! {
2622 let crate::wire::RealmCreateChildResponse {
2623
2624 _empty,
2625
2626
2627 } = out_;
2628 }
2629
2630 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
2631
2632 Ok(())
2633 }
2634 }
2635
2636 unsafe impl<___E>
2637 ::fidl_next::EncodeOption<
2638 ::fidl_next::wire::Box<'static, crate::wire::RealmCreateChildResponse>,
2639 ___E,
2640 > for RealmCreateChildResponse
2641 where
2642 ___E: ::fidl_next::Encoder + ?Sized,
2643 RealmCreateChildResponse: ::fidl_next::Encode<crate::wire::RealmCreateChildResponse, ___E>,
2644 {
2645 #[inline]
2646 fn encode_option(
2647 this: ::core::option::Option<Self>,
2648 encoder: &mut ___E,
2649 out: &mut ::core::mem::MaybeUninit<
2650 ::fidl_next::wire::Box<'static, crate::wire::RealmCreateChildResponse>,
2651 >,
2652 _: (),
2653 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2654 if let Some(inner) = this {
2655 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2656 ::fidl_next::wire::Box::encode_present(out);
2657 } else {
2658 ::fidl_next::wire::Box::encode_absent(out);
2659 }
2660
2661 Ok(())
2662 }
2663 }
2664
2665 unsafe impl<'a, ___E>
2666 ::fidl_next::EncodeOption<
2667 ::fidl_next::wire::Box<'static, crate::wire::RealmCreateChildResponse>,
2668 ___E,
2669 > for &'a RealmCreateChildResponse
2670 where
2671 ___E: ::fidl_next::Encoder + ?Sized,
2672 &'a RealmCreateChildResponse:
2673 ::fidl_next::Encode<crate::wire::RealmCreateChildResponse, ___E>,
2674 {
2675 #[inline]
2676 fn encode_option(
2677 this: ::core::option::Option<Self>,
2678 encoder: &mut ___E,
2679 out: &mut ::core::mem::MaybeUninit<
2680 ::fidl_next::wire::Box<'static, crate::wire::RealmCreateChildResponse>,
2681 >,
2682 _: (),
2683 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2684 if let Some(inner) = this {
2685 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2686 ::fidl_next::wire::Box::encode_present(out);
2687 } else {
2688 ::fidl_next::wire::Box::encode_absent(out);
2689 }
2690
2691 Ok(())
2692 }
2693 }
2694
2695 impl ::fidl_next::FromWire<crate::wire::RealmCreateChildResponse> for RealmCreateChildResponse {
2696 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2697 crate::wire::RealmCreateChildResponse,
2698 Self,
2699 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
2700
2701 #[inline]
2702 fn from_wire(wire: crate::wire::RealmCreateChildResponse) -> Self {
2703 Self {}
2704 }
2705 }
2706
2707 impl ::fidl_next::FromWireRef<crate::wire::RealmCreateChildResponse> for RealmCreateChildResponse {
2708 #[inline]
2709 fn from_wire_ref(wire: &crate::wire::RealmCreateChildResponse) -> Self {
2710 Self {}
2711 }
2712 }
2713
2714 #[derive(Debug, PartialEq)]
2715 pub struct RealmDestroyChildRequest {
2716 pub child: ::fidl_next_common_fuchsia_component_decl::natural::ChildRef,
2717 }
2718
2719 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmDestroyChildRequest<'static>, ___E>
2720 for RealmDestroyChildRequest
2721 where
2722 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2723 ___E: ::fidl_next::Encoder,
2724 {
2725 #[inline]
2726 fn encode(
2727 self,
2728 encoder_: &mut ___E,
2729 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmDestroyChildRequest<'static>>,
2730 _: (),
2731 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2732 ::fidl_next::munge! {
2733 let crate::wire::RealmDestroyChildRequest {
2734 child,
2735
2736 } = out_;
2737 }
2738
2739 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
2740
2741 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(child.as_mut_ptr()) };
2742
2743 Ok(())
2744 }
2745 }
2746
2747 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RealmDestroyChildRequest<'static>, ___E>
2748 for &'a RealmDestroyChildRequest
2749 where
2750 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2751 ___E: ::fidl_next::Encoder,
2752 {
2753 #[inline]
2754 fn encode(
2755 self,
2756 encoder_: &mut ___E,
2757 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmDestroyChildRequest<'static>>,
2758 _: (),
2759 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2760 ::fidl_next::munge! {
2761 let crate::wire::RealmDestroyChildRequest {
2762
2763 child,
2764
2765 } = out_;
2766 }
2767
2768 ::fidl_next::Encode::encode(&self.child, encoder_, child, ())?;
2769
2770 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(child.as_mut_ptr()) };
2771
2772 Ok(())
2773 }
2774 }
2775
2776 unsafe impl<___E>
2777 ::fidl_next::EncodeOption<
2778 ::fidl_next::wire::Box<'static, crate::wire::RealmDestroyChildRequest<'static>>,
2779 ___E,
2780 > for RealmDestroyChildRequest
2781 where
2782 ___E: ::fidl_next::Encoder + ?Sized,
2783 RealmDestroyChildRequest:
2784 ::fidl_next::Encode<crate::wire::RealmDestroyChildRequest<'static>, ___E>,
2785 {
2786 #[inline]
2787 fn encode_option(
2788 this: ::core::option::Option<Self>,
2789 encoder: &mut ___E,
2790 out: &mut ::core::mem::MaybeUninit<
2791 ::fidl_next::wire::Box<'static, crate::wire::RealmDestroyChildRequest<'static>>,
2792 >,
2793 _: (),
2794 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2795 if let Some(inner) = this {
2796 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2797 ::fidl_next::wire::Box::encode_present(out);
2798 } else {
2799 ::fidl_next::wire::Box::encode_absent(out);
2800 }
2801
2802 Ok(())
2803 }
2804 }
2805
2806 unsafe impl<'a, ___E>
2807 ::fidl_next::EncodeOption<
2808 ::fidl_next::wire::Box<'static, crate::wire::RealmDestroyChildRequest<'static>>,
2809 ___E,
2810 > for &'a RealmDestroyChildRequest
2811 where
2812 ___E: ::fidl_next::Encoder + ?Sized,
2813 &'a RealmDestroyChildRequest:
2814 ::fidl_next::Encode<crate::wire::RealmDestroyChildRequest<'static>, ___E>,
2815 {
2816 #[inline]
2817 fn encode_option(
2818 this: ::core::option::Option<Self>,
2819 encoder: &mut ___E,
2820 out: &mut ::core::mem::MaybeUninit<
2821 ::fidl_next::wire::Box<'static, crate::wire::RealmDestroyChildRequest<'static>>,
2822 >,
2823 _: (),
2824 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2825 if let Some(inner) = this {
2826 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2827 ::fidl_next::wire::Box::encode_present(out);
2828 } else {
2829 ::fidl_next::wire::Box::encode_absent(out);
2830 }
2831
2832 Ok(())
2833 }
2834 }
2835
2836 impl<'de> ::fidl_next::FromWire<crate::wire::RealmDestroyChildRequest<'de>>
2837 for RealmDestroyChildRequest
2838 {
2839 #[inline]
2840 fn from_wire(wire: crate::wire::RealmDestroyChildRequest<'de>) -> Self {
2841 Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
2842 }
2843 }
2844
2845 impl<'de> ::fidl_next::FromWireRef<crate::wire::RealmDestroyChildRequest<'de>>
2846 for RealmDestroyChildRequest
2847 {
2848 #[inline]
2849 fn from_wire_ref(wire: &crate::wire::RealmDestroyChildRequest<'de>) -> Self {
2850 Self { child: ::fidl_next::FromWireRef::from_wire_ref(&wire.child) }
2851 }
2852 }
2853
2854 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2855 #[repr(C)]
2856 pub struct RealmDestroyChildResponse {}
2857
2858 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmDestroyChildResponse, ___E>
2859 for RealmDestroyChildResponse
2860 where
2861 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2862 {
2863 #[inline]
2864 fn encode(
2865 self,
2866 encoder_: &mut ___E,
2867 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmDestroyChildResponse>,
2868 _: (),
2869 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2870 ::fidl_next::munge! {
2871 let crate::wire::RealmDestroyChildResponse {
2872
2873 _empty,
2874
2875 } = out_;
2876 }
2877
2878 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
2879
2880 Ok(())
2881 }
2882 }
2883
2884 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RealmDestroyChildResponse, ___E>
2885 for &'a RealmDestroyChildResponse
2886 where
2887 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2888 {
2889 #[inline]
2890 fn encode(
2891 self,
2892 encoder_: &mut ___E,
2893 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmDestroyChildResponse>,
2894 _: (),
2895 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2896 ::fidl_next::munge! {
2897 let crate::wire::RealmDestroyChildResponse {
2898
2899 _empty,
2900
2901
2902 } = out_;
2903 }
2904
2905 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
2906
2907 Ok(())
2908 }
2909 }
2910
2911 unsafe impl<___E>
2912 ::fidl_next::EncodeOption<
2913 ::fidl_next::wire::Box<'static, crate::wire::RealmDestroyChildResponse>,
2914 ___E,
2915 > for RealmDestroyChildResponse
2916 where
2917 ___E: ::fidl_next::Encoder + ?Sized,
2918 RealmDestroyChildResponse:
2919 ::fidl_next::Encode<crate::wire::RealmDestroyChildResponse, ___E>,
2920 {
2921 #[inline]
2922 fn encode_option(
2923 this: ::core::option::Option<Self>,
2924 encoder: &mut ___E,
2925 out: &mut ::core::mem::MaybeUninit<
2926 ::fidl_next::wire::Box<'static, crate::wire::RealmDestroyChildResponse>,
2927 >,
2928 _: (),
2929 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2930 if let Some(inner) = this {
2931 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2932 ::fidl_next::wire::Box::encode_present(out);
2933 } else {
2934 ::fidl_next::wire::Box::encode_absent(out);
2935 }
2936
2937 Ok(())
2938 }
2939 }
2940
2941 unsafe impl<'a, ___E>
2942 ::fidl_next::EncodeOption<
2943 ::fidl_next::wire::Box<'static, crate::wire::RealmDestroyChildResponse>,
2944 ___E,
2945 > for &'a RealmDestroyChildResponse
2946 where
2947 ___E: ::fidl_next::Encoder + ?Sized,
2948 &'a RealmDestroyChildResponse:
2949 ::fidl_next::Encode<crate::wire::RealmDestroyChildResponse, ___E>,
2950 {
2951 #[inline]
2952 fn encode_option(
2953 this: ::core::option::Option<Self>,
2954 encoder: &mut ___E,
2955 out: &mut ::core::mem::MaybeUninit<
2956 ::fidl_next::wire::Box<'static, crate::wire::RealmDestroyChildResponse>,
2957 >,
2958 _: (),
2959 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2960 if let Some(inner) = this {
2961 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2962 ::fidl_next::wire::Box::encode_present(out);
2963 } else {
2964 ::fidl_next::wire::Box::encode_absent(out);
2965 }
2966
2967 Ok(())
2968 }
2969 }
2970
2971 impl ::fidl_next::FromWire<crate::wire::RealmDestroyChildResponse> for RealmDestroyChildResponse {
2972 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2973 crate::wire::RealmDestroyChildResponse,
2974 Self,
2975 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
2976
2977 #[inline]
2978 fn from_wire(wire: crate::wire::RealmDestroyChildResponse) -> Self {
2979 Self {}
2980 }
2981 }
2982
2983 impl ::fidl_next::FromWireRef<crate::wire::RealmDestroyChildResponse>
2984 for RealmDestroyChildResponse
2985 {
2986 #[inline]
2987 fn from_wire_ref(wire: &crate::wire::RealmDestroyChildResponse) -> Self {
2988 Self {}
2989 }
2990 }
2991
2992 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2993 #[repr(C)]
2994 pub struct RealmListChildrenResponse {}
2995
2996 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmListChildrenResponse, ___E>
2997 for RealmListChildrenResponse
2998 where
2999 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3000 {
3001 #[inline]
3002 fn encode(
3003 self,
3004 encoder_: &mut ___E,
3005 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmListChildrenResponse>,
3006 _: (),
3007 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3008 ::fidl_next::munge! {
3009 let crate::wire::RealmListChildrenResponse {
3010
3011 _empty,
3012
3013 } = out_;
3014 }
3015
3016 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
3017
3018 Ok(())
3019 }
3020 }
3021
3022 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RealmListChildrenResponse, ___E>
3023 for &'a RealmListChildrenResponse
3024 where
3025 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3026 {
3027 #[inline]
3028 fn encode(
3029 self,
3030 encoder_: &mut ___E,
3031 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmListChildrenResponse>,
3032 _: (),
3033 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3034 ::fidl_next::munge! {
3035 let crate::wire::RealmListChildrenResponse {
3036
3037 _empty,
3038
3039
3040 } = out_;
3041 }
3042
3043 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
3044
3045 Ok(())
3046 }
3047 }
3048
3049 unsafe impl<___E>
3050 ::fidl_next::EncodeOption<
3051 ::fidl_next::wire::Box<'static, crate::wire::RealmListChildrenResponse>,
3052 ___E,
3053 > for RealmListChildrenResponse
3054 where
3055 ___E: ::fidl_next::Encoder + ?Sized,
3056 RealmListChildrenResponse:
3057 ::fidl_next::Encode<crate::wire::RealmListChildrenResponse, ___E>,
3058 {
3059 #[inline]
3060 fn encode_option(
3061 this: ::core::option::Option<Self>,
3062 encoder: &mut ___E,
3063 out: &mut ::core::mem::MaybeUninit<
3064 ::fidl_next::wire::Box<'static, crate::wire::RealmListChildrenResponse>,
3065 >,
3066 _: (),
3067 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3068 if let Some(inner) = this {
3069 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3070 ::fidl_next::wire::Box::encode_present(out);
3071 } else {
3072 ::fidl_next::wire::Box::encode_absent(out);
3073 }
3074
3075 Ok(())
3076 }
3077 }
3078
3079 unsafe impl<'a, ___E>
3080 ::fidl_next::EncodeOption<
3081 ::fidl_next::wire::Box<'static, crate::wire::RealmListChildrenResponse>,
3082 ___E,
3083 > for &'a RealmListChildrenResponse
3084 where
3085 ___E: ::fidl_next::Encoder + ?Sized,
3086 &'a RealmListChildrenResponse:
3087 ::fidl_next::Encode<crate::wire::RealmListChildrenResponse, ___E>,
3088 {
3089 #[inline]
3090 fn encode_option(
3091 this: ::core::option::Option<Self>,
3092 encoder: &mut ___E,
3093 out: &mut ::core::mem::MaybeUninit<
3094 ::fidl_next::wire::Box<'static, crate::wire::RealmListChildrenResponse>,
3095 >,
3096 _: (),
3097 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3098 if let Some(inner) = this {
3099 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3100 ::fidl_next::wire::Box::encode_present(out);
3101 } else {
3102 ::fidl_next::wire::Box::encode_absent(out);
3103 }
3104
3105 Ok(())
3106 }
3107 }
3108
3109 impl ::fidl_next::FromWire<crate::wire::RealmListChildrenResponse> for RealmListChildrenResponse {
3110 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3111 crate::wire::RealmListChildrenResponse,
3112 Self,
3113 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3114
3115 #[inline]
3116 fn from_wire(wire: crate::wire::RealmListChildrenResponse) -> Self {
3117 Self {}
3118 }
3119 }
3120
3121 impl ::fidl_next::FromWireRef<crate::wire::RealmListChildrenResponse>
3122 for RealmListChildrenResponse
3123 {
3124 #[inline]
3125 fn from_wire_ref(wire: &crate::wire::RealmListChildrenResponse) -> Self {
3126 Self {}
3127 }
3128 }
3129
3130 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3131 #[repr(C)]
3132 pub struct RealmOpenControllerResponse {}
3133
3134 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RealmOpenControllerResponse, ___E>
3135 for RealmOpenControllerResponse
3136 where
3137 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3138 {
3139 #[inline]
3140 fn encode(
3141 self,
3142 encoder_: &mut ___E,
3143 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmOpenControllerResponse>,
3144 _: (),
3145 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3146 ::fidl_next::munge! {
3147 let crate::wire::RealmOpenControllerResponse {
3148
3149 _empty,
3150
3151 } = out_;
3152 }
3153
3154 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
3155
3156 Ok(())
3157 }
3158 }
3159
3160 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RealmOpenControllerResponse, ___E>
3161 for &'a RealmOpenControllerResponse
3162 where
3163 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3164 {
3165 #[inline]
3166 fn encode(
3167 self,
3168 encoder_: &mut ___E,
3169 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmOpenControllerResponse>,
3170 _: (),
3171 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3172 ::fidl_next::munge! {
3173 let crate::wire::RealmOpenControllerResponse {
3174
3175 _empty,
3176
3177
3178 } = out_;
3179 }
3180
3181 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
3182
3183 Ok(())
3184 }
3185 }
3186
3187 unsafe impl<___E>
3188 ::fidl_next::EncodeOption<
3189 ::fidl_next::wire::Box<'static, crate::wire::RealmOpenControllerResponse>,
3190 ___E,
3191 > for RealmOpenControllerResponse
3192 where
3193 ___E: ::fidl_next::Encoder + ?Sized,
3194 RealmOpenControllerResponse:
3195 ::fidl_next::Encode<crate::wire::RealmOpenControllerResponse, ___E>,
3196 {
3197 #[inline]
3198 fn encode_option(
3199 this: ::core::option::Option<Self>,
3200 encoder: &mut ___E,
3201 out: &mut ::core::mem::MaybeUninit<
3202 ::fidl_next::wire::Box<'static, crate::wire::RealmOpenControllerResponse>,
3203 >,
3204 _: (),
3205 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3206 if let Some(inner) = this {
3207 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3208 ::fidl_next::wire::Box::encode_present(out);
3209 } else {
3210 ::fidl_next::wire::Box::encode_absent(out);
3211 }
3212
3213 Ok(())
3214 }
3215 }
3216
3217 unsafe impl<'a, ___E>
3218 ::fidl_next::EncodeOption<
3219 ::fidl_next::wire::Box<'static, crate::wire::RealmOpenControllerResponse>,
3220 ___E,
3221 > for &'a RealmOpenControllerResponse
3222 where
3223 ___E: ::fidl_next::Encoder + ?Sized,
3224 &'a RealmOpenControllerResponse:
3225 ::fidl_next::Encode<crate::wire::RealmOpenControllerResponse, ___E>,
3226 {
3227 #[inline]
3228 fn encode_option(
3229 this: ::core::option::Option<Self>,
3230 encoder: &mut ___E,
3231 out: &mut ::core::mem::MaybeUninit<
3232 ::fidl_next::wire::Box<'static, crate::wire::RealmOpenControllerResponse>,
3233 >,
3234 _: (),
3235 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3236 if let Some(inner) = this {
3237 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3238 ::fidl_next::wire::Box::encode_present(out);
3239 } else {
3240 ::fidl_next::wire::Box::encode_absent(out);
3241 }
3242
3243 Ok(())
3244 }
3245 }
3246
3247 impl ::fidl_next::FromWire<crate::wire::RealmOpenControllerResponse>
3248 for RealmOpenControllerResponse
3249 {
3250 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3251 crate::wire::RealmOpenControllerResponse,
3252 Self,
3253 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3254
3255 #[inline]
3256 fn from_wire(wire: crate::wire::RealmOpenControllerResponse) -> Self {
3257 Self {}
3258 }
3259 }
3260
3261 impl ::fidl_next::FromWireRef<crate::wire::RealmOpenControllerResponse>
3262 for RealmOpenControllerResponse
3263 {
3264 #[inline]
3265 fn from_wire_ref(wire: &crate::wire::RealmOpenControllerResponse) -> Self {
3266 Self {}
3267 }
3268 }
3269
3270 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3271 #[repr(u32)]
3272 pub enum StatusError {
3273 Provider = 1,
3274 ResponseInvalid = 2,
3275 StatusUnknown = 3,
3276 Unsupported = 4,
3277 }
3278 impl ::core::convert::TryFrom<u32> for StatusError {
3279 type Error = ::fidl_next::UnknownStrictEnumMemberError;
3280 fn try_from(
3281 value: u32,
3282 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
3283 match value {
3284 1 => Ok(Self::Provider),
3285 2 => Ok(Self::ResponseInvalid),
3286 3 => Ok(Self::StatusUnknown),
3287 4 => Ok(Self::Unsupported),
3288
3289 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
3290 }
3291 }
3292 }
3293
3294 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StatusError, ___E> for StatusError
3295 where
3296 ___E: ?Sized,
3297 {
3298 #[inline]
3299 fn encode(
3300 self,
3301 encoder: &mut ___E,
3302 out: &mut ::core::mem::MaybeUninit<crate::wire::StatusError>,
3303 _: (),
3304 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3305 ::fidl_next::Encode::encode(&self, encoder, out, ())
3306 }
3307 }
3308
3309 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::StatusError, ___E> for &'a StatusError
3310 where
3311 ___E: ?Sized,
3312 {
3313 #[inline]
3314 fn encode(
3315 self,
3316 encoder: &mut ___E,
3317 out: &mut ::core::mem::MaybeUninit<crate::wire::StatusError>,
3318 _: (),
3319 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3320 ::fidl_next::munge!(let crate::wire::StatusError { value } = out);
3321 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
3322 StatusError::Provider => 1,
3323
3324 StatusError::ResponseInvalid => 2,
3325
3326 StatusError::StatusUnknown => 3,
3327
3328 StatusError::Unsupported => 4,
3329 }));
3330
3331 Ok(())
3332 }
3333 }
3334
3335 impl ::core::convert::From<crate::wire::StatusError> for StatusError {
3336 fn from(wire: crate::wire::StatusError) -> Self {
3337 match u32::from(wire.value) {
3338 1 => Self::Provider,
3339
3340 2 => Self::ResponseInvalid,
3341
3342 3 => Self::StatusUnknown,
3343
3344 4 => Self::Unsupported,
3345
3346 _ => unsafe { ::core::hint::unreachable_unchecked() },
3347 }
3348 }
3349 }
3350
3351 impl ::fidl_next::FromWire<crate::wire::StatusError> for StatusError {
3352 #[inline]
3353 fn from_wire(wire: crate::wire::StatusError) -> Self {
3354 Self::from(wire)
3355 }
3356 }
3357
3358 impl ::fidl_next::FromWireRef<crate::wire::StatusError> for StatusError {
3359 #[inline]
3360 fn from_wire_ref(wire: &crate::wire::StatusError) -> Self {
3361 Self::from(*wire)
3362 }
3363 }
3364
3365 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3366 #[repr(C)]
3367 pub struct StorageAdminOpenStorageResponse {}
3368
3369 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StorageAdminOpenStorageResponse, ___E>
3370 for StorageAdminOpenStorageResponse
3371 where
3372 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3373 {
3374 #[inline]
3375 fn encode(
3376 self,
3377 encoder_: &mut ___E,
3378 out_: &mut ::core::mem::MaybeUninit<crate::wire::StorageAdminOpenStorageResponse>,
3379 _: (),
3380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3381 ::fidl_next::munge! {
3382 let crate::wire::StorageAdminOpenStorageResponse {
3383
3384 _empty,
3385
3386 } = out_;
3387 }
3388
3389 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
3390
3391 Ok(())
3392 }
3393 }
3394
3395 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::StorageAdminOpenStorageResponse, ___E>
3396 for &'a StorageAdminOpenStorageResponse
3397 where
3398 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3399 {
3400 #[inline]
3401 fn encode(
3402 self,
3403 encoder_: &mut ___E,
3404 out_: &mut ::core::mem::MaybeUninit<crate::wire::StorageAdminOpenStorageResponse>,
3405 _: (),
3406 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3407 ::fidl_next::munge! {
3408 let crate::wire::StorageAdminOpenStorageResponse {
3409
3410 _empty,
3411
3412
3413 } = out_;
3414 }
3415
3416 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
3417
3418 Ok(())
3419 }
3420 }
3421
3422 unsafe impl<___E>
3423 ::fidl_next::EncodeOption<
3424 ::fidl_next::wire::Box<'static, crate::wire::StorageAdminOpenStorageResponse>,
3425 ___E,
3426 > for StorageAdminOpenStorageResponse
3427 where
3428 ___E: ::fidl_next::Encoder + ?Sized,
3429 StorageAdminOpenStorageResponse:
3430 ::fidl_next::Encode<crate::wire::StorageAdminOpenStorageResponse, ___E>,
3431 {
3432 #[inline]
3433 fn encode_option(
3434 this: ::core::option::Option<Self>,
3435 encoder: &mut ___E,
3436 out: &mut ::core::mem::MaybeUninit<
3437 ::fidl_next::wire::Box<'static, crate::wire::StorageAdminOpenStorageResponse>,
3438 >,
3439 _: (),
3440 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3441 if let Some(inner) = this {
3442 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3443 ::fidl_next::wire::Box::encode_present(out);
3444 } else {
3445 ::fidl_next::wire::Box::encode_absent(out);
3446 }
3447
3448 Ok(())
3449 }
3450 }
3451
3452 unsafe impl<'a, ___E>
3453 ::fidl_next::EncodeOption<
3454 ::fidl_next::wire::Box<'static, crate::wire::StorageAdminOpenStorageResponse>,
3455 ___E,
3456 > for &'a StorageAdminOpenStorageResponse
3457 where
3458 ___E: ::fidl_next::Encoder + ?Sized,
3459 &'a StorageAdminOpenStorageResponse:
3460 ::fidl_next::Encode<crate::wire::StorageAdminOpenStorageResponse, ___E>,
3461 {
3462 #[inline]
3463 fn encode_option(
3464 this: ::core::option::Option<Self>,
3465 encoder: &mut ___E,
3466 out: &mut ::core::mem::MaybeUninit<
3467 ::fidl_next::wire::Box<'static, crate::wire::StorageAdminOpenStorageResponse>,
3468 >,
3469 _: (),
3470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3471 if let Some(inner) = this {
3472 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3473 ::fidl_next::wire::Box::encode_present(out);
3474 } else {
3475 ::fidl_next::wire::Box::encode_absent(out);
3476 }
3477
3478 Ok(())
3479 }
3480 }
3481
3482 impl ::fidl_next::FromWire<crate::wire::StorageAdminOpenStorageResponse>
3483 for StorageAdminOpenStorageResponse
3484 {
3485 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3486 crate::wire::StorageAdminOpenStorageResponse,
3487 Self,
3488 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3489
3490 #[inline]
3491 fn from_wire(wire: crate::wire::StorageAdminOpenStorageResponse) -> Self {
3492 Self {}
3493 }
3494 }
3495
3496 impl ::fidl_next::FromWireRef<crate::wire::StorageAdminOpenStorageResponse>
3497 for StorageAdminOpenStorageResponse
3498 {
3499 #[inline]
3500 fn from_wire_ref(wire: &crate::wire::StorageAdminOpenStorageResponse) -> Self {
3501 Self {}
3502 }
3503 }
3504
3505 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3506 #[repr(C)]
3507 pub struct StorageAdminListStorageInRealmResponse {}
3508
3509 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StorageAdminListStorageInRealmResponse, ___E>
3510 for StorageAdminListStorageInRealmResponse
3511 where
3512 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3513 {
3514 #[inline]
3515 fn encode(
3516 self,
3517 encoder_: &mut ___E,
3518 out_: &mut ::core::mem::MaybeUninit<
3519 crate::wire::StorageAdminListStorageInRealmResponse,
3520 >,
3521 _: (),
3522 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3523 ::fidl_next::munge! {
3524 let crate::wire::StorageAdminListStorageInRealmResponse {
3525
3526 _empty,
3527
3528 } = out_;
3529 }
3530
3531 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
3532
3533 Ok(())
3534 }
3535 }
3536
3537 unsafe impl<'a, ___E>
3538 ::fidl_next::Encode<crate::wire::StorageAdminListStorageInRealmResponse, ___E>
3539 for &'a StorageAdminListStorageInRealmResponse
3540 where
3541 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3542 {
3543 #[inline]
3544 fn encode(
3545 self,
3546 encoder_: &mut ___E,
3547 out_: &mut ::core::mem::MaybeUninit<
3548 crate::wire::StorageAdminListStorageInRealmResponse,
3549 >,
3550 _: (),
3551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3552 ::fidl_next::munge! {
3553 let crate::wire::StorageAdminListStorageInRealmResponse {
3554
3555 _empty,
3556
3557
3558 } = out_;
3559 }
3560
3561 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
3562
3563 Ok(())
3564 }
3565 }
3566
3567 unsafe impl<___E>
3568 ::fidl_next::EncodeOption<
3569 ::fidl_next::wire::Box<'static, crate::wire::StorageAdminListStorageInRealmResponse>,
3570 ___E,
3571 > for StorageAdminListStorageInRealmResponse
3572 where
3573 ___E: ::fidl_next::Encoder + ?Sized,
3574 StorageAdminListStorageInRealmResponse:
3575 ::fidl_next::Encode<crate::wire::StorageAdminListStorageInRealmResponse, ___E>,
3576 {
3577 #[inline]
3578 fn encode_option(
3579 this: ::core::option::Option<Self>,
3580 encoder: &mut ___E,
3581 out: &mut ::core::mem::MaybeUninit<
3582 ::fidl_next::wire::Box<
3583 'static,
3584 crate::wire::StorageAdminListStorageInRealmResponse,
3585 >,
3586 >,
3587 _: (),
3588 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3589 if let Some(inner) = this {
3590 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3591 ::fidl_next::wire::Box::encode_present(out);
3592 } else {
3593 ::fidl_next::wire::Box::encode_absent(out);
3594 }
3595
3596 Ok(())
3597 }
3598 }
3599
3600 unsafe impl<'a, ___E>
3601 ::fidl_next::EncodeOption<
3602 ::fidl_next::wire::Box<'static, crate::wire::StorageAdminListStorageInRealmResponse>,
3603 ___E,
3604 > for &'a StorageAdminListStorageInRealmResponse
3605 where
3606 ___E: ::fidl_next::Encoder + ?Sized,
3607 &'a StorageAdminListStorageInRealmResponse:
3608 ::fidl_next::Encode<crate::wire::StorageAdminListStorageInRealmResponse, ___E>,
3609 {
3610 #[inline]
3611 fn encode_option(
3612 this: ::core::option::Option<Self>,
3613 encoder: &mut ___E,
3614 out: &mut ::core::mem::MaybeUninit<
3615 ::fidl_next::wire::Box<
3616 'static,
3617 crate::wire::StorageAdminListStorageInRealmResponse,
3618 >,
3619 >,
3620 _: (),
3621 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3622 if let Some(inner) = this {
3623 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3624 ::fidl_next::wire::Box::encode_present(out);
3625 } else {
3626 ::fidl_next::wire::Box::encode_absent(out);
3627 }
3628
3629 Ok(())
3630 }
3631 }
3632
3633 impl ::fidl_next::FromWire<crate::wire::StorageAdminListStorageInRealmResponse>
3634 for StorageAdminListStorageInRealmResponse
3635 {
3636 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3637 crate::wire::StorageAdminListStorageInRealmResponse,
3638 Self,
3639 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3640
3641 #[inline]
3642 fn from_wire(wire: crate::wire::StorageAdminListStorageInRealmResponse) -> Self {
3643 Self {}
3644 }
3645 }
3646
3647 impl ::fidl_next::FromWireRef<crate::wire::StorageAdminListStorageInRealmResponse>
3648 for StorageAdminListStorageInRealmResponse
3649 {
3650 #[inline]
3651 fn from_wire_ref(wire: &crate::wire::StorageAdminListStorageInRealmResponse) -> Self {
3652 Self {}
3653 }
3654 }
3655
3656 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3657 #[repr(C)]
3658 pub struct StorageAdminOpenComponentStorageByIdResponse {}
3659
3660 unsafe impl<___E>
3661 ::fidl_next::Encode<crate::wire::StorageAdminOpenComponentStorageByIdResponse, ___E>
3662 for StorageAdminOpenComponentStorageByIdResponse
3663 where
3664 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3665 {
3666 #[inline]
3667 fn encode(
3668 self,
3669 encoder_: &mut ___E,
3670 out_: &mut ::core::mem::MaybeUninit<
3671 crate::wire::StorageAdminOpenComponentStorageByIdResponse,
3672 >,
3673 _: (),
3674 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3675 ::fidl_next::munge! {
3676 let crate::wire::StorageAdminOpenComponentStorageByIdResponse {
3677
3678 _empty,
3679
3680 } = out_;
3681 }
3682
3683 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
3684
3685 Ok(())
3686 }
3687 }
3688
3689 unsafe impl<'a, ___E>
3690 ::fidl_next::Encode<crate::wire::StorageAdminOpenComponentStorageByIdResponse, ___E>
3691 for &'a StorageAdminOpenComponentStorageByIdResponse
3692 where
3693 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3694 {
3695 #[inline]
3696 fn encode(
3697 self,
3698 encoder_: &mut ___E,
3699 out_: &mut ::core::mem::MaybeUninit<
3700 crate::wire::StorageAdminOpenComponentStorageByIdResponse,
3701 >,
3702 _: (),
3703 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3704 ::fidl_next::munge! {
3705 let crate::wire::StorageAdminOpenComponentStorageByIdResponse {
3706
3707 _empty,
3708
3709
3710 } = out_;
3711 }
3712
3713 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
3714
3715 Ok(())
3716 }
3717 }
3718
3719 unsafe impl<___E>
3720 ::fidl_next::EncodeOption<
3721 ::fidl_next::wire::Box<
3722 'static,
3723 crate::wire::StorageAdminOpenComponentStorageByIdResponse,
3724 >,
3725 ___E,
3726 > for StorageAdminOpenComponentStorageByIdResponse
3727 where
3728 ___E: ::fidl_next::Encoder + ?Sized,
3729 StorageAdminOpenComponentStorageByIdResponse:
3730 ::fidl_next::Encode<crate::wire::StorageAdminOpenComponentStorageByIdResponse, ___E>,
3731 {
3732 #[inline]
3733 fn encode_option(
3734 this: ::core::option::Option<Self>,
3735 encoder: &mut ___E,
3736 out: &mut ::core::mem::MaybeUninit<
3737 ::fidl_next::wire::Box<
3738 'static,
3739 crate::wire::StorageAdminOpenComponentStorageByIdResponse,
3740 >,
3741 >,
3742 _: (),
3743 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3744 if let Some(inner) = this {
3745 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3746 ::fidl_next::wire::Box::encode_present(out);
3747 } else {
3748 ::fidl_next::wire::Box::encode_absent(out);
3749 }
3750
3751 Ok(())
3752 }
3753 }
3754
3755 unsafe impl<'a, ___E>
3756 ::fidl_next::EncodeOption<
3757 ::fidl_next::wire::Box<
3758 'static,
3759 crate::wire::StorageAdminOpenComponentStorageByIdResponse,
3760 >,
3761 ___E,
3762 > for &'a StorageAdminOpenComponentStorageByIdResponse
3763 where
3764 ___E: ::fidl_next::Encoder + ?Sized,
3765 &'a StorageAdminOpenComponentStorageByIdResponse:
3766 ::fidl_next::Encode<crate::wire::StorageAdminOpenComponentStorageByIdResponse, ___E>,
3767 {
3768 #[inline]
3769 fn encode_option(
3770 this: ::core::option::Option<Self>,
3771 encoder: &mut ___E,
3772 out: &mut ::core::mem::MaybeUninit<
3773 ::fidl_next::wire::Box<
3774 'static,
3775 crate::wire::StorageAdminOpenComponentStorageByIdResponse,
3776 >,
3777 >,
3778 _: (),
3779 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3780 if let Some(inner) = this {
3781 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3782 ::fidl_next::wire::Box::encode_present(out);
3783 } else {
3784 ::fidl_next::wire::Box::encode_absent(out);
3785 }
3786
3787 Ok(())
3788 }
3789 }
3790
3791 impl ::fidl_next::FromWire<crate::wire::StorageAdminOpenComponentStorageByIdResponse>
3792 for StorageAdminOpenComponentStorageByIdResponse
3793 {
3794 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3795 crate::wire::StorageAdminOpenComponentStorageByIdResponse,
3796 Self,
3797 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3798
3799 #[inline]
3800 fn from_wire(wire: crate::wire::StorageAdminOpenComponentStorageByIdResponse) -> Self {
3801 Self {}
3802 }
3803 }
3804
3805 impl ::fidl_next::FromWireRef<crate::wire::StorageAdminOpenComponentStorageByIdResponse>
3806 for StorageAdminOpenComponentStorageByIdResponse
3807 {
3808 #[inline]
3809 fn from_wire_ref(wire: &crate::wire::StorageAdminOpenComponentStorageByIdResponse) -> Self {
3810 Self {}
3811 }
3812 }
3813
3814 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3815 pub struct StorageAdminDeleteComponentStorageRequest {
3816 pub relative_moniker: ::std::string::String,
3817 }
3818
3819 unsafe impl<___E>
3820 ::fidl_next::Encode<crate::wire::StorageAdminDeleteComponentStorageRequest<'static>, ___E>
3821 for StorageAdminDeleteComponentStorageRequest
3822 where
3823 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3824 ___E: ::fidl_next::Encoder,
3825 {
3826 #[inline]
3827 fn encode(
3828 self,
3829 encoder_: &mut ___E,
3830 out_: &mut ::core::mem::MaybeUninit<
3831 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
3832 >,
3833 _: (),
3834 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3835 ::fidl_next::munge! {
3836 let crate::wire::StorageAdminDeleteComponentStorageRequest {
3837 relative_moniker,
3838
3839 } = out_;
3840 }
3841
3842 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker, 4096)?;
3843
3844 let mut _field =
3845 unsafe { ::fidl_next::Slot::new_unchecked(relative_moniker.as_mut_ptr()) };
3846 ::fidl_next::Constrained::validate(_field, 4096)?;
3847
3848 Ok(())
3849 }
3850 }
3851
3852 unsafe impl<'a, ___E>
3853 ::fidl_next::Encode<crate::wire::StorageAdminDeleteComponentStorageRequest<'static>, ___E>
3854 for &'a StorageAdminDeleteComponentStorageRequest
3855 where
3856 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3857 ___E: ::fidl_next::Encoder,
3858 {
3859 #[inline]
3860 fn encode(
3861 self,
3862 encoder_: &mut ___E,
3863 out_: &mut ::core::mem::MaybeUninit<
3864 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
3865 >,
3866 _: (),
3867 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3868 ::fidl_next::munge! {
3869 let crate::wire::StorageAdminDeleteComponentStorageRequest {
3870
3871 relative_moniker,
3872
3873 } = out_;
3874 }
3875
3876 ::fidl_next::Encode::encode(&self.relative_moniker, encoder_, relative_moniker, 4096)?;
3877
3878 let mut _field =
3879 unsafe { ::fidl_next::Slot::new_unchecked(relative_moniker.as_mut_ptr()) };
3880 ::fidl_next::Constrained::validate(_field, 4096)?;
3881
3882 Ok(())
3883 }
3884 }
3885
3886 unsafe impl<___E>
3887 ::fidl_next::EncodeOption<
3888 ::fidl_next::wire::Box<
3889 'static,
3890 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
3891 >,
3892 ___E,
3893 > for StorageAdminDeleteComponentStorageRequest
3894 where
3895 ___E: ::fidl_next::Encoder + ?Sized,
3896 StorageAdminDeleteComponentStorageRequest: ::fidl_next::Encode<
3897 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
3898 ___E,
3899 >,
3900 {
3901 #[inline]
3902 fn encode_option(
3903 this: ::core::option::Option<Self>,
3904 encoder: &mut ___E,
3905 out: &mut ::core::mem::MaybeUninit<
3906 ::fidl_next::wire::Box<
3907 'static,
3908 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
3909 >,
3910 >,
3911 _: (),
3912 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3913 if let Some(inner) = this {
3914 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3915 ::fidl_next::wire::Box::encode_present(out);
3916 } else {
3917 ::fidl_next::wire::Box::encode_absent(out);
3918 }
3919
3920 Ok(())
3921 }
3922 }
3923
3924 unsafe impl<'a, ___E>
3925 ::fidl_next::EncodeOption<
3926 ::fidl_next::wire::Box<
3927 'static,
3928 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
3929 >,
3930 ___E,
3931 > for &'a StorageAdminDeleteComponentStorageRequest
3932 where
3933 ___E: ::fidl_next::Encoder + ?Sized,
3934 &'a StorageAdminDeleteComponentStorageRequest: ::fidl_next::Encode<
3935 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
3936 ___E,
3937 >,
3938 {
3939 #[inline]
3940 fn encode_option(
3941 this: ::core::option::Option<Self>,
3942 encoder: &mut ___E,
3943 out: &mut ::core::mem::MaybeUninit<
3944 ::fidl_next::wire::Box<
3945 'static,
3946 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
3947 >,
3948 >,
3949 _: (),
3950 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3951 if let Some(inner) = this {
3952 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3953 ::fidl_next::wire::Box::encode_present(out);
3954 } else {
3955 ::fidl_next::wire::Box::encode_absent(out);
3956 }
3957
3958 Ok(())
3959 }
3960 }
3961
3962 impl<'de> ::fidl_next::FromWire<crate::wire::StorageAdminDeleteComponentStorageRequest<'de>>
3963 for StorageAdminDeleteComponentStorageRequest
3964 {
3965 #[inline]
3966 fn from_wire(wire: crate::wire::StorageAdminDeleteComponentStorageRequest<'de>) -> Self {
3967 Self { relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker) }
3968 }
3969 }
3970
3971 impl<'de> ::fidl_next::FromWireRef<crate::wire::StorageAdminDeleteComponentStorageRequest<'de>>
3972 for StorageAdminDeleteComponentStorageRequest
3973 {
3974 #[inline]
3975 fn from_wire_ref(
3976 wire: &crate::wire::StorageAdminDeleteComponentStorageRequest<'de>,
3977 ) -> Self {
3978 Self {
3979 relative_moniker: ::fidl_next::FromWireRef::from_wire_ref(&wire.relative_moniker),
3980 }
3981 }
3982 }
3983
3984 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3985 #[repr(C)]
3986 pub struct StorageAdminDeleteComponentStorageResponse {}
3987
3988 unsafe impl<___E>
3989 ::fidl_next::Encode<crate::wire::StorageAdminDeleteComponentStorageResponse, ___E>
3990 for StorageAdminDeleteComponentStorageResponse
3991 where
3992 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3993 {
3994 #[inline]
3995 fn encode(
3996 self,
3997 encoder_: &mut ___E,
3998 out_: &mut ::core::mem::MaybeUninit<
3999 crate::wire::StorageAdminDeleteComponentStorageResponse,
4000 >,
4001 _: (),
4002 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4003 ::fidl_next::munge! {
4004 let crate::wire::StorageAdminDeleteComponentStorageResponse {
4005
4006 _empty,
4007
4008 } = out_;
4009 }
4010
4011 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
4012
4013 Ok(())
4014 }
4015 }
4016
4017 unsafe impl<'a, ___E>
4018 ::fidl_next::Encode<crate::wire::StorageAdminDeleteComponentStorageResponse, ___E>
4019 for &'a StorageAdminDeleteComponentStorageResponse
4020 where
4021 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4022 {
4023 #[inline]
4024 fn encode(
4025 self,
4026 encoder_: &mut ___E,
4027 out_: &mut ::core::mem::MaybeUninit<
4028 crate::wire::StorageAdminDeleteComponentStorageResponse,
4029 >,
4030 _: (),
4031 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4032 ::fidl_next::munge! {
4033 let crate::wire::StorageAdminDeleteComponentStorageResponse {
4034
4035 _empty,
4036
4037
4038 } = out_;
4039 }
4040
4041 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
4042
4043 Ok(())
4044 }
4045 }
4046
4047 unsafe impl<___E>
4048 ::fidl_next::EncodeOption<
4049 ::fidl_next::wire::Box<
4050 'static,
4051 crate::wire::StorageAdminDeleteComponentStorageResponse,
4052 >,
4053 ___E,
4054 > for StorageAdminDeleteComponentStorageResponse
4055 where
4056 ___E: ::fidl_next::Encoder + ?Sized,
4057 StorageAdminDeleteComponentStorageResponse:
4058 ::fidl_next::Encode<crate::wire::StorageAdminDeleteComponentStorageResponse, ___E>,
4059 {
4060 #[inline]
4061 fn encode_option(
4062 this: ::core::option::Option<Self>,
4063 encoder: &mut ___E,
4064 out: &mut ::core::mem::MaybeUninit<
4065 ::fidl_next::wire::Box<
4066 'static,
4067 crate::wire::StorageAdminDeleteComponentStorageResponse,
4068 >,
4069 >,
4070 _: (),
4071 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4072 if let Some(inner) = this {
4073 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4074 ::fidl_next::wire::Box::encode_present(out);
4075 } else {
4076 ::fidl_next::wire::Box::encode_absent(out);
4077 }
4078
4079 Ok(())
4080 }
4081 }
4082
4083 unsafe impl<'a, ___E>
4084 ::fidl_next::EncodeOption<
4085 ::fidl_next::wire::Box<
4086 'static,
4087 crate::wire::StorageAdminDeleteComponentStorageResponse,
4088 >,
4089 ___E,
4090 > for &'a StorageAdminDeleteComponentStorageResponse
4091 where
4092 ___E: ::fidl_next::Encoder + ?Sized,
4093 &'a StorageAdminDeleteComponentStorageResponse:
4094 ::fidl_next::Encode<crate::wire::StorageAdminDeleteComponentStorageResponse, ___E>,
4095 {
4096 #[inline]
4097 fn encode_option(
4098 this: ::core::option::Option<Self>,
4099 encoder: &mut ___E,
4100 out: &mut ::core::mem::MaybeUninit<
4101 ::fidl_next::wire::Box<
4102 'static,
4103 crate::wire::StorageAdminDeleteComponentStorageResponse,
4104 >,
4105 >,
4106 _: (),
4107 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4108 if let Some(inner) = this {
4109 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4110 ::fidl_next::wire::Box::encode_present(out);
4111 } else {
4112 ::fidl_next::wire::Box::encode_absent(out);
4113 }
4114
4115 Ok(())
4116 }
4117 }
4118
4119 impl ::fidl_next::FromWire<crate::wire::StorageAdminDeleteComponentStorageResponse>
4120 for StorageAdminDeleteComponentStorageResponse
4121 {
4122 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4123 crate::wire::StorageAdminDeleteComponentStorageResponse,
4124 Self,
4125 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
4126
4127 #[inline]
4128 fn from_wire(wire: crate::wire::StorageAdminDeleteComponentStorageResponse) -> Self {
4129 Self {}
4130 }
4131 }
4132
4133 impl ::fidl_next::FromWireRef<crate::wire::StorageAdminDeleteComponentStorageResponse>
4134 for StorageAdminDeleteComponentStorageResponse
4135 {
4136 #[inline]
4137 fn from_wire_ref(wire: &crate::wire::StorageAdminDeleteComponentStorageResponse) -> Self {
4138 Self {}
4139 }
4140 }
4141
4142 #[doc = " Metadata about status of the storage\n"]
4143 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4144 pub struct StorageStatus {
4145 pub total_size: ::core::option::Option<u64>,
4146
4147 pub used_size: ::core::option::Option<u64>,
4148 }
4149
4150 impl StorageStatus {
4151 fn __max_ordinal(&self) -> usize {
4152 if self.used_size.is_some() {
4153 return 2;
4154 }
4155
4156 if self.total_size.is_some() {
4157 return 1;
4158 }
4159
4160 0
4161 }
4162 }
4163
4164 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StorageStatus<'static>, ___E> for StorageStatus
4165 where
4166 ___E: ::fidl_next::Encoder + ?Sized,
4167 {
4168 #[inline]
4169 fn encode(
4170 mut self,
4171 encoder: &mut ___E,
4172 out: &mut ::core::mem::MaybeUninit<crate::wire::StorageStatus<'static>>,
4173 _: (),
4174 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4175 ::fidl_next::munge!(let crate::wire::StorageStatus { table } = out);
4176
4177 let max_ord = self.__max_ordinal();
4178
4179 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4180 ::fidl_next::Wire::zero_padding(&mut out);
4181
4182 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4183 ::fidl_next::wire::Envelope,
4184 >(encoder, max_ord);
4185
4186 for i in 1..=max_ord {
4187 match i {
4188 2 => {
4189 if let Some(value) = self.used_size.take() {
4190 ::fidl_next::wire::Envelope::encode_value::<
4191 ::fidl_next::wire::Uint64,
4192 ___E,
4193 >(
4194 value, preallocated.encoder, &mut out, ()
4195 )?;
4196 } else {
4197 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4198 }
4199 }
4200
4201 1 => {
4202 if let Some(value) = self.total_size.take() {
4203 ::fidl_next::wire::Envelope::encode_value::<
4204 ::fidl_next::wire::Uint64,
4205 ___E,
4206 >(
4207 value, preallocated.encoder, &mut out, ()
4208 )?;
4209 } else {
4210 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4211 }
4212 }
4213
4214 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4215 }
4216 unsafe {
4217 preallocated.write_next(out.assume_init_ref());
4218 }
4219 }
4220
4221 ::fidl_next::wire::Table::encode_len(table, max_ord);
4222
4223 Ok(())
4224 }
4225 }
4226
4227 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::StorageStatus<'static>, ___E>
4228 for &'a StorageStatus
4229 where
4230 ___E: ::fidl_next::Encoder + ?Sized,
4231 {
4232 #[inline]
4233 fn encode(
4234 self,
4235 encoder: &mut ___E,
4236 out: &mut ::core::mem::MaybeUninit<crate::wire::StorageStatus<'static>>,
4237 _: (),
4238 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4239 ::fidl_next::munge!(let crate::wire::StorageStatus { table } = out);
4240
4241 let max_ord = self.__max_ordinal();
4242
4243 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4244 ::fidl_next::Wire::zero_padding(&mut out);
4245
4246 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4247 ::fidl_next::wire::Envelope,
4248 >(encoder, max_ord);
4249
4250 for i in 1..=max_ord {
4251 match i {
4252 2 => {
4253 if let Some(value) = &self.used_size {
4254 ::fidl_next::wire::Envelope::encode_value::<
4255 ::fidl_next::wire::Uint64,
4256 ___E,
4257 >(
4258 value, preallocated.encoder, &mut out, ()
4259 )?;
4260 } else {
4261 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4262 }
4263 }
4264
4265 1 => {
4266 if let Some(value) = &self.total_size {
4267 ::fidl_next::wire::Envelope::encode_value::<
4268 ::fidl_next::wire::Uint64,
4269 ___E,
4270 >(
4271 value, preallocated.encoder, &mut out, ()
4272 )?;
4273 } else {
4274 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4275 }
4276 }
4277
4278 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4279 }
4280 unsafe {
4281 preallocated.write_next(out.assume_init_ref());
4282 }
4283 }
4284
4285 ::fidl_next::wire::Table::encode_len(table, max_ord);
4286
4287 Ok(())
4288 }
4289 }
4290
4291 impl<'de> ::fidl_next::FromWire<crate::wire::StorageStatus<'de>> for StorageStatus {
4292 #[inline]
4293 fn from_wire(wire_: crate::wire::StorageStatus<'de>) -> Self {
4294 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4295
4296 let total_size = wire_.table.get(1);
4297
4298 let used_size = wire_.table.get(2);
4299
4300 Self {
4301 total_size: total_size.map(|envelope| {
4302 ::fidl_next::FromWire::from_wire(unsafe {
4303 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
4304 })
4305 }),
4306
4307 used_size: used_size.map(|envelope| {
4308 ::fidl_next::FromWire::from_wire(unsafe {
4309 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
4310 })
4311 }),
4312 }
4313 }
4314 }
4315
4316 impl<'de> ::fidl_next::FromWireRef<crate::wire::StorageStatus<'de>> for StorageStatus {
4317 #[inline]
4318 fn from_wire_ref(wire: &crate::wire::StorageStatus<'de>) -> Self {
4319 Self {
4320 total_size: wire.table.get(1).map(|envelope| {
4321 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4322 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
4323 })
4324 }),
4325
4326 used_size: wire.table.get(2).map(|envelope| {
4327 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4328 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
4329 })
4330 }),
4331 }
4332 }
4333 }
4334
4335 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4336 #[repr(C)]
4337 pub struct StorageAdminDeleteAllStorageContentsResponse {}
4338
4339 unsafe impl<___E>
4340 ::fidl_next::Encode<crate::wire::StorageAdminDeleteAllStorageContentsResponse, ___E>
4341 for StorageAdminDeleteAllStorageContentsResponse
4342 where
4343 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4344 {
4345 #[inline]
4346 fn encode(
4347 self,
4348 encoder_: &mut ___E,
4349 out_: &mut ::core::mem::MaybeUninit<
4350 crate::wire::StorageAdminDeleteAllStorageContentsResponse,
4351 >,
4352 _: (),
4353 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4354 ::fidl_next::munge! {
4355 let crate::wire::StorageAdminDeleteAllStorageContentsResponse {
4356
4357 _empty,
4358
4359 } = out_;
4360 }
4361
4362 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
4363
4364 Ok(())
4365 }
4366 }
4367
4368 unsafe impl<'a, ___E>
4369 ::fidl_next::Encode<crate::wire::StorageAdminDeleteAllStorageContentsResponse, ___E>
4370 for &'a StorageAdminDeleteAllStorageContentsResponse
4371 where
4372 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4373 {
4374 #[inline]
4375 fn encode(
4376 self,
4377 encoder_: &mut ___E,
4378 out_: &mut ::core::mem::MaybeUninit<
4379 crate::wire::StorageAdminDeleteAllStorageContentsResponse,
4380 >,
4381 _: (),
4382 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4383 ::fidl_next::munge! {
4384 let crate::wire::StorageAdminDeleteAllStorageContentsResponse {
4385
4386 _empty,
4387
4388
4389 } = out_;
4390 }
4391
4392 let _ = _empty.write(::fidl_next::wire::EmptyStruct::Zero);
4393
4394 Ok(())
4395 }
4396 }
4397
4398 unsafe impl<___E>
4399 ::fidl_next::EncodeOption<
4400 ::fidl_next::wire::Box<
4401 'static,
4402 crate::wire::StorageAdminDeleteAllStorageContentsResponse,
4403 >,
4404 ___E,
4405 > for StorageAdminDeleteAllStorageContentsResponse
4406 where
4407 ___E: ::fidl_next::Encoder + ?Sized,
4408 StorageAdminDeleteAllStorageContentsResponse:
4409 ::fidl_next::Encode<crate::wire::StorageAdminDeleteAllStorageContentsResponse, ___E>,
4410 {
4411 #[inline]
4412 fn encode_option(
4413 this: ::core::option::Option<Self>,
4414 encoder: &mut ___E,
4415 out: &mut ::core::mem::MaybeUninit<
4416 ::fidl_next::wire::Box<
4417 'static,
4418 crate::wire::StorageAdminDeleteAllStorageContentsResponse,
4419 >,
4420 >,
4421 _: (),
4422 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4423 if let Some(inner) = this {
4424 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4425 ::fidl_next::wire::Box::encode_present(out);
4426 } else {
4427 ::fidl_next::wire::Box::encode_absent(out);
4428 }
4429
4430 Ok(())
4431 }
4432 }
4433
4434 unsafe impl<'a, ___E>
4435 ::fidl_next::EncodeOption<
4436 ::fidl_next::wire::Box<
4437 'static,
4438 crate::wire::StorageAdminDeleteAllStorageContentsResponse,
4439 >,
4440 ___E,
4441 > for &'a StorageAdminDeleteAllStorageContentsResponse
4442 where
4443 ___E: ::fidl_next::Encoder + ?Sized,
4444 &'a StorageAdminDeleteAllStorageContentsResponse:
4445 ::fidl_next::Encode<crate::wire::StorageAdminDeleteAllStorageContentsResponse, ___E>,
4446 {
4447 #[inline]
4448 fn encode_option(
4449 this: ::core::option::Option<Self>,
4450 encoder: &mut ___E,
4451 out: &mut ::core::mem::MaybeUninit<
4452 ::fidl_next::wire::Box<
4453 'static,
4454 crate::wire::StorageAdminDeleteAllStorageContentsResponse,
4455 >,
4456 >,
4457 _: (),
4458 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4459 if let Some(inner) = this {
4460 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4461 ::fidl_next::wire::Box::encode_present(out);
4462 } else {
4463 ::fidl_next::wire::Box::encode_absent(out);
4464 }
4465
4466 Ok(())
4467 }
4468 }
4469
4470 impl ::fidl_next::FromWire<crate::wire::StorageAdminDeleteAllStorageContentsResponse>
4471 for StorageAdminDeleteAllStorageContentsResponse
4472 {
4473 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4474 crate::wire::StorageAdminDeleteAllStorageContentsResponse,
4475 Self,
4476 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
4477
4478 #[inline]
4479 fn from_wire(wire: crate::wire::StorageAdminDeleteAllStorageContentsResponse) -> Self {
4480 Self {}
4481 }
4482 }
4483
4484 impl ::fidl_next::FromWireRef<crate::wire::StorageAdminDeleteAllStorageContentsResponse>
4485 for StorageAdminDeleteAllStorageContentsResponse
4486 {
4487 #[inline]
4488 fn from_wire_ref(wire: &crate::wire::StorageAdminDeleteAllStorageContentsResponse) -> Self {
4489 Self {}
4490 }
4491 }
4492
4493 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4494 pub struct StorageIteratorNextResponse {
4495 pub relative_monikers: ::std::vec::Vec<::std::string::String>,
4496 }
4497
4498 unsafe impl<___E> ::fidl_next::Encode<crate::wire::StorageIteratorNextResponse<'static>, ___E>
4499 for StorageIteratorNextResponse
4500 where
4501 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4502 ___E: ::fidl_next::Encoder,
4503 {
4504 #[inline]
4505 fn encode(
4506 self,
4507 encoder_: &mut ___E,
4508 out_: &mut ::core::mem::MaybeUninit<crate::wire::StorageIteratorNextResponse<'static>>,
4509 _: (),
4510 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4511 ::fidl_next::munge! {
4512 let crate::wire::StorageIteratorNextResponse {
4513 relative_monikers,
4514
4515 } = out_;
4516 }
4517
4518 ::fidl_next::Encode::encode(
4519 self.relative_monikers,
4520 encoder_,
4521 relative_monikers,
4522 (4294967295, 4096),
4523 )?;
4524
4525 let mut _field =
4526 unsafe { ::fidl_next::Slot::new_unchecked(relative_monikers.as_mut_ptr()) };
4527 ::fidl_next::Constrained::validate(_field, (4294967295, 4096))?;
4528
4529 Ok(())
4530 }
4531 }
4532
4533 unsafe impl<'a, ___E>
4534 ::fidl_next::Encode<crate::wire::StorageIteratorNextResponse<'static>, ___E>
4535 for &'a StorageIteratorNextResponse
4536 where
4537 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4538 ___E: ::fidl_next::Encoder,
4539 {
4540 #[inline]
4541 fn encode(
4542 self,
4543 encoder_: &mut ___E,
4544 out_: &mut ::core::mem::MaybeUninit<crate::wire::StorageIteratorNextResponse<'static>>,
4545 _: (),
4546 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4547 ::fidl_next::munge! {
4548 let crate::wire::StorageIteratorNextResponse {
4549
4550 relative_monikers,
4551
4552 } = out_;
4553 }
4554
4555 ::fidl_next::Encode::encode(
4556 &self.relative_monikers,
4557 encoder_,
4558 relative_monikers,
4559 (4294967295, 4096),
4560 )?;
4561
4562 let mut _field =
4563 unsafe { ::fidl_next::Slot::new_unchecked(relative_monikers.as_mut_ptr()) };
4564 ::fidl_next::Constrained::validate(_field, (4294967295, 4096))?;
4565
4566 Ok(())
4567 }
4568 }
4569
4570 unsafe impl<___E>
4571 ::fidl_next::EncodeOption<
4572 ::fidl_next::wire::Box<'static, crate::wire::StorageIteratorNextResponse<'static>>,
4573 ___E,
4574 > for StorageIteratorNextResponse
4575 where
4576 ___E: ::fidl_next::Encoder + ?Sized,
4577 StorageIteratorNextResponse:
4578 ::fidl_next::Encode<crate::wire::StorageIteratorNextResponse<'static>, ___E>,
4579 {
4580 #[inline]
4581 fn encode_option(
4582 this: ::core::option::Option<Self>,
4583 encoder: &mut ___E,
4584 out: &mut ::core::mem::MaybeUninit<
4585 ::fidl_next::wire::Box<'static, crate::wire::StorageIteratorNextResponse<'static>>,
4586 >,
4587 _: (),
4588 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4589 if let Some(inner) = this {
4590 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4591 ::fidl_next::wire::Box::encode_present(out);
4592 } else {
4593 ::fidl_next::wire::Box::encode_absent(out);
4594 }
4595
4596 Ok(())
4597 }
4598 }
4599
4600 unsafe impl<'a, ___E>
4601 ::fidl_next::EncodeOption<
4602 ::fidl_next::wire::Box<'static, crate::wire::StorageIteratorNextResponse<'static>>,
4603 ___E,
4604 > for &'a StorageIteratorNextResponse
4605 where
4606 ___E: ::fidl_next::Encoder + ?Sized,
4607 &'a StorageIteratorNextResponse:
4608 ::fidl_next::Encode<crate::wire::StorageIteratorNextResponse<'static>, ___E>,
4609 {
4610 #[inline]
4611 fn encode_option(
4612 this: ::core::option::Option<Self>,
4613 encoder: &mut ___E,
4614 out: &mut ::core::mem::MaybeUninit<
4615 ::fidl_next::wire::Box<'static, crate::wire::StorageIteratorNextResponse<'static>>,
4616 >,
4617 _: (),
4618 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4619 if let Some(inner) = this {
4620 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4621 ::fidl_next::wire::Box::encode_present(out);
4622 } else {
4623 ::fidl_next::wire::Box::encode_absent(out);
4624 }
4625
4626 Ok(())
4627 }
4628 }
4629
4630 impl<'de> ::fidl_next::FromWire<crate::wire::StorageIteratorNextResponse<'de>>
4631 for StorageIteratorNextResponse
4632 {
4633 #[inline]
4634 fn from_wire(wire: crate::wire::StorageIteratorNextResponse<'de>) -> Self {
4635 Self { relative_monikers: ::fidl_next::FromWire::from_wire(wire.relative_monikers) }
4636 }
4637 }
4638
4639 impl<'de> ::fidl_next::FromWireRef<crate::wire::StorageIteratorNextResponse<'de>>
4640 for StorageIteratorNextResponse
4641 {
4642 #[inline]
4643 fn from_wire_ref(wire: &crate::wire::StorageIteratorNextResponse<'de>) -> Self {
4644 Self {
4645 relative_monikers: ::fidl_next::FromWireRef::from_wire_ref(&wire.relative_monikers),
4646 }
4647 }
4648 }
4649
4650 pub type ChildName = ::std::string::String;
4651
4652 pub type UrlScheme = ::std::string::String;
4653}
4654
4655pub mod wire {
4656
4657 pub type Name<'de> = ::fidl_next::wire::String<'de>;
4659
4660 #[derive(Debug)]
4662 #[repr(C)]
4663 pub struct ChildIteratorNextResponse<'de> {
4664 pub children: ::fidl_next::wire::Vector<
4665 'de,
4666 ::fidl_next_common_fuchsia_component_decl::wire::ChildRef<'de>,
4667 >,
4668 }
4669
4670 static_assertions::const_assert_eq!(std::mem::size_of::<ChildIteratorNextResponse<'_>>(), 16);
4671 static_assertions::const_assert_eq!(std::mem::align_of::<ChildIteratorNextResponse<'_>>(), 8);
4672
4673 static_assertions::const_assert_eq!(
4674 std::mem::offset_of!(ChildIteratorNextResponse<'_>, children),
4675 0
4676 );
4677
4678 impl ::fidl_next::Constrained for ChildIteratorNextResponse<'_> {
4679 type Constraint = ();
4680
4681 fn validate(
4682 _: ::fidl_next::Slot<'_, Self>,
4683 _: Self::Constraint,
4684 ) -> Result<(), ::fidl_next::ValidationError> {
4685 Ok(())
4686 }
4687 }
4688
4689 unsafe impl ::fidl_next::Wire for ChildIteratorNextResponse<'static> {
4690 type Narrowed<'de> = ChildIteratorNextResponse<'de>;
4691
4692 #[inline]
4693 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4694 ::fidl_next::munge! {
4695 let Self {
4696
4697 children,
4698
4699 } = &mut *out_;
4700 }
4701
4702 ::fidl_next::Wire::zero_padding(children);
4703 }
4704 }
4705
4706 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ChildIteratorNextResponse<'de>
4707 where
4708 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4709 ___D: ::fidl_next::Decoder<'de>,
4710 {
4711 fn decode(
4712 slot_: ::fidl_next::Slot<'_, Self>,
4713 decoder_: &mut ___D,
4714 _: (),
4715 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4716 ::fidl_next::munge! {
4717 let Self {
4718
4719 mut children,
4720
4721 } = slot_;
4722 }
4723
4724 let _field = children.as_mut();
4725 ::fidl_next::Constrained::validate(_field, (128, ()))?;
4726 ::fidl_next::Decode::decode(children.as_mut(), decoder_, (128, ()))?;
4727
4728 let children = unsafe { children.deref_unchecked() };
4729
4730 if children.len() > 128 {
4731 return Err(::fidl_next::DecodeError::VectorTooLong {
4732 size: children.len() as u64,
4733 limit: 128,
4734 });
4735 }
4736
4737 Ok(())
4738 }
4739 }
4740
4741 impl<'de> ::fidl_next::IntoNatural for ChildIteratorNextResponse<'de> {
4742 type Natural = crate::natural::ChildIteratorNextResponse;
4743 }
4744
4745 #[derive(Clone, Debug)]
4747 #[repr(C)]
4748 pub struct ControllerStartResponse {
4749 pub(crate) _empty: fidl_next::wire::EmptyStruct,
4750 }
4751
4752 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerStartResponse>(), 1);
4753 static_assertions::const_assert_eq!(std::mem::align_of::<ControllerStartResponse>(), 1);
4754
4755 impl ::fidl_next::Constrained for ControllerStartResponse {
4756 type Constraint = ();
4757
4758 fn validate(
4759 _: ::fidl_next::Slot<'_, Self>,
4760 _: Self::Constraint,
4761 ) -> Result<(), ::fidl_next::ValidationError> {
4762 Ok(())
4763 }
4764 }
4765
4766 unsafe impl ::fidl_next::Wire for ControllerStartResponse {
4767 type Narrowed<'de> = ControllerStartResponse;
4768
4769 #[inline]
4770 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4771 ::fidl_next::munge! {
4772 let Self {
4773
4774 _empty,
4775
4776
4777 } = &mut *out_;
4778 }
4779 }
4780 }
4781
4782 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerStartResponse
4783 where
4784 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4785 {
4786 fn decode(
4787 slot_: ::fidl_next::Slot<'_, Self>,
4788 decoder_: &mut ___D,
4789 _: (),
4790 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4791 ::fidl_next::munge! {
4792 let Self {
4793
4794 mut _empty,
4795
4796
4797 } = slot_;
4798 }
4799
4800 if _empty.as_bytes() != &[0u8] {
4801 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
4802 }
4803
4804 Ok(())
4805 }
4806 }
4807
4808 impl ::fidl_next::IntoNatural for ControllerStartResponse {
4809 type Natural = crate::natural::ControllerStartResponse;
4810 }
4811
4812 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
4814 #[repr(transparent)]
4815 pub struct Error {
4816 pub(crate) value: ::fidl_next::wire::Uint32,
4817 }
4818
4819 impl ::fidl_next::Constrained for Error {
4820 type Constraint = ();
4821
4822 fn validate(
4823 _: ::fidl_next::Slot<'_, Self>,
4824 _: Self::Constraint,
4825 ) -> Result<(), ::fidl_next::ValidationError> {
4826 Ok(())
4827 }
4828 }
4829
4830 unsafe impl ::fidl_next::Wire for Error {
4831 type Narrowed<'de> = Self;
4832
4833 #[inline]
4834 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
4835 }
4837 }
4838
4839 impl Error {
4840 pub const INTERNAL: Error = Error { value: ::fidl_next::wire::Uint32(1) };
4841
4842 pub const INVALID_ARGUMENTS: Error = Error { value: ::fidl_next::wire::Uint32(2) };
4843
4844 pub const UNSUPPORTED: Error = Error { value: ::fidl_next::wire::Uint32(3) };
4845
4846 pub const ACCESS_DENIED: Error = Error { value: ::fidl_next::wire::Uint32(4) };
4847
4848 pub const INSTANCE_NOT_FOUND: Error = Error { value: ::fidl_next::wire::Uint32(5) };
4849
4850 pub const INSTANCE_ALREADY_EXISTS: Error = Error { value: ::fidl_next::wire::Uint32(6) };
4851
4852 pub const INSTANCE_CANNOT_START: Error = Error { value: ::fidl_next::wire::Uint32(7) };
4853
4854 pub const INSTANCE_CANNOT_RESOLVE: Error = Error { value: ::fidl_next::wire::Uint32(8) };
4855
4856 pub const COLLECTION_NOT_FOUND: Error = Error { value: ::fidl_next::wire::Uint32(9) };
4857
4858 pub const RESOURCE_UNAVAILABLE: Error = Error { value: ::fidl_next::wire::Uint32(10) };
4859
4860 pub const INSTANCE_DIED: Error = Error { value: ::fidl_next::wire::Uint32(11) };
4861
4862 pub const RESOURCE_NOT_FOUND: Error = Error { value: ::fidl_next::wire::Uint32(12) };
4863
4864 pub const INSTANCE_CANNOT_UNRESOLVE: Error = Error { value: ::fidl_next::wire::Uint32(13) };
4865
4866 pub const INSTANCE_ALREADY_STARTED: Error = Error { value: ::fidl_next::wire::Uint32(14) };
4867
4868 pub const DEPENDENCY_CYCLE: Error = Error { value: ::fidl_next::wire::Uint32(15) };
4869 }
4870
4871 unsafe impl<___D> ::fidl_next::Decode<___D> for Error
4872 where
4873 ___D: ?Sized,
4874 {
4875 fn decode(
4876 slot: ::fidl_next::Slot<'_, Self>,
4877 _: &mut ___D,
4878 _: (),
4879 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4880 Ok(())
4881 }
4882 }
4883
4884 impl ::core::convert::From<crate::natural::Error> for Error {
4885 fn from(natural: crate::natural::Error) -> Self {
4886 match natural {
4887 crate::natural::Error::Internal => Error::INTERNAL,
4888
4889 crate::natural::Error::InvalidArguments => Error::INVALID_ARGUMENTS,
4890
4891 crate::natural::Error::Unsupported => Error::UNSUPPORTED,
4892
4893 crate::natural::Error::AccessDenied => Error::ACCESS_DENIED,
4894
4895 crate::natural::Error::InstanceNotFound => Error::INSTANCE_NOT_FOUND,
4896
4897 crate::natural::Error::InstanceAlreadyExists => Error::INSTANCE_ALREADY_EXISTS,
4898
4899 crate::natural::Error::InstanceCannotStart => Error::INSTANCE_CANNOT_START,
4900
4901 crate::natural::Error::InstanceCannotResolve => Error::INSTANCE_CANNOT_RESOLVE,
4902
4903 crate::natural::Error::CollectionNotFound => Error::COLLECTION_NOT_FOUND,
4904
4905 crate::natural::Error::ResourceUnavailable => Error::RESOURCE_UNAVAILABLE,
4906
4907 crate::natural::Error::InstanceDied => Error::INSTANCE_DIED,
4908
4909 crate::natural::Error::ResourceNotFound => Error::RESOURCE_NOT_FOUND,
4910
4911 crate::natural::Error::InstanceCannotUnresolve => Error::INSTANCE_CANNOT_UNRESOLVE,
4912
4913 crate::natural::Error::InstanceAlreadyStarted => Error::INSTANCE_ALREADY_STARTED,
4914
4915 crate::natural::Error::DependencyCycle => Error::DEPENDENCY_CYCLE,
4916
4917 crate::natural::Error::UnknownOrdinal_(value) => {
4918 Error { value: ::fidl_next::wire::Uint32::from(value) }
4919 }
4920 }
4921 }
4922 }
4923
4924 impl ::fidl_next::IntoNatural for Error {
4925 type Natural = crate::natural::Error;
4926 }
4927
4928 #[derive(Clone, Debug)]
4930 #[repr(C)]
4931 pub struct ControllerOpenExposedDirResponse {
4932 pub(crate) _empty: fidl_next::wire::EmptyStruct,
4933 }
4934
4935 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerOpenExposedDirResponse>(), 1);
4936 static_assertions::const_assert_eq!(
4937 std::mem::align_of::<ControllerOpenExposedDirResponse>(),
4938 1
4939 );
4940
4941 impl ::fidl_next::Constrained for ControllerOpenExposedDirResponse {
4942 type Constraint = ();
4943
4944 fn validate(
4945 _: ::fidl_next::Slot<'_, Self>,
4946 _: Self::Constraint,
4947 ) -> Result<(), ::fidl_next::ValidationError> {
4948 Ok(())
4949 }
4950 }
4951
4952 unsafe impl ::fidl_next::Wire for ControllerOpenExposedDirResponse {
4953 type Narrowed<'de> = ControllerOpenExposedDirResponse;
4954
4955 #[inline]
4956 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4957 ::fidl_next::munge! {
4958 let Self {
4959
4960 _empty,
4961
4962
4963 } = &mut *out_;
4964 }
4965 }
4966 }
4967
4968 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerOpenExposedDirResponse
4969 where
4970 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4971 {
4972 fn decode(
4973 slot_: ::fidl_next::Slot<'_, Self>,
4974 decoder_: &mut ___D,
4975 _: (),
4976 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4977 ::fidl_next::munge! {
4978 let Self {
4979
4980 mut _empty,
4981
4982
4983 } = slot_;
4984 }
4985
4986 if _empty.as_bytes() != &[0u8] {
4987 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
4988 }
4989
4990 Ok(())
4991 }
4992 }
4993
4994 impl ::fidl_next::IntoNatural for ControllerOpenExposedDirResponse {
4995 type Natural = crate::natural::ControllerOpenExposedDirResponse;
4996 }
4997
4998 #[derive(Clone, Debug)]
5000 #[repr(C)]
5001 pub struct ControllerDestroyResponse {
5002 pub(crate) _empty: fidl_next::wire::EmptyStruct,
5003 }
5004
5005 static_assertions::const_assert_eq!(std::mem::size_of::<ControllerDestroyResponse>(), 1);
5006 static_assertions::const_assert_eq!(std::mem::align_of::<ControllerDestroyResponse>(), 1);
5007
5008 impl ::fidl_next::Constrained for ControllerDestroyResponse {
5009 type Constraint = ();
5010
5011 fn validate(
5012 _: ::fidl_next::Slot<'_, Self>,
5013 _: Self::Constraint,
5014 ) -> Result<(), ::fidl_next::ValidationError> {
5015 Ok(())
5016 }
5017 }
5018
5019 unsafe impl ::fidl_next::Wire for ControllerDestroyResponse {
5020 type Narrowed<'de> = ControllerDestroyResponse;
5021
5022 #[inline]
5023 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5024 ::fidl_next::munge! {
5025 let Self {
5026
5027 _empty,
5028
5029
5030 } = &mut *out_;
5031 }
5032 }
5033 }
5034
5035 unsafe impl<___D> ::fidl_next::Decode<___D> for ControllerDestroyResponse
5036 where
5037 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5038 {
5039 fn decode(
5040 slot_: ::fidl_next::Slot<'_, Self>,
5041 decoder_: &mut ___D,
5042 _: (),
5043 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5044 ::fidl_next::munge! {
5045 let Self {
5046
5047 mut _empty,
5048
5049
5050 } = slot_;
5051 }
5052
5053 if _empty.as_bytes() != &[0u8] {
5054 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
5055 }
5056
5057 Ok(())
5058 }
5059 }
5060
5061 impl ::fidl_next::IntoNatural for ControllerDestroyResponse {
5062 type Natural = crate::natural::ControllerDestroyResponse;
5063 }
5064
5065 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
5067 #[repr(transparent)]
5068 pub struct DeletionError {
5069 pub(crate) value: ::fidl_next::wire::Uint32,
5070 }
5071
5072 impl ::fidl_next::Constrained for DeletionError {
5073 type Constraint = ();
5074
5075 fn validate(
5076 _: ::fidl_next::Slot<'_, Self>,
5077 _: Self::Constraint,
5078 ) -> Result<(), ::fidl_next::ValidationError> {
5079 Ok(())
5080 }
5081 }
5082
5083 unsafe impl ::fidl_next::Wire for DeletionError {
5084 type Narrowed<'de> = Self;
5085
5086 #[inline]
5087 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
5088 }
5090 }
5091
5092 impl DeletionError {
5093 pub const CONNECTION: DeletionError = DeletionError { value: ::fidl_next::wire::Uint32(1) };
5094
5095 pub const PROTOCOL: DeletionError = DeletionError { value: ::fidl_next::wire::Uint32(2) };
5096
5097 pub const NONE_AVAILABLE: DeletionError =
5098 DeletionError { value: ::fidl_next::wire::Uint32(3) };
5099
5100 pub const UNSUPPORTED: DeletionError =
5101 DeletionError { value: ::fidl_next::wire::Uint32(4) };
5102 }
5103
5104 unsafe impl<___D> ::fidl_next::Decode<___D> for DeletionError
5105 where
5106 ___D: ?Sized,
5107 {
5108 fn decode(
5109 slot: ::fidl_next::Slot<'_, Self>,
5110 _: &mut ___D,
5111 _: (),
5112 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5113 ::fidl_next::munge!(let Self { value } = slot);
5114
5115 match u32::from(*value) {
5116 1 | 2 | 3 | 4 => (),
5117 unknown => {
5118 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
5119 }
5120 }
5121
5122 Ok(())
5123 }
5124 }
5125
5126 impl ::core::convert::From<crate::natural::DeletionError> for DeletionError {
5127 fn from(natural: crate::natural::DeletionError) -> Self {
5128 match natural {
5129 crate::natural::DeletionError::Connection => DeletionError::CONNECTION,
5130
5131 crate::natural::DeletionError::Protocol => DeletionError::PROTOCOL,
5132
5133 crate::natural::DeletionError::NoneAvailable => DeletionError::NONE_AVAILABLE,
5134
5135 crate::natural::DeletionError::Unsupported => DeletionError::UNSUPPORTED,
5136 }
5137 }
5138 }
5139
5140 impl ::fidl_next::IntoNatural for DeletionError {
5141 type Natural = crate::natural::DeletionError;
5142 }
5143
5144 #[repr(C)]
5146 pub struct DestroyedPayload<'de> {
5147 pub(crate) table: ::fidl_next::wire::Table<'de>,
5148 }
5149
5150 impl<'de> Drop for DestroyedPayload<'de> {
5151 fn drop(&mut self) {}
5152 }
5153
5154 impl ::fidl_next::Constrained for DestroyedPayload<'_> {
5155 type Constraint = ();
5156
5157 fn validate(
5158 _: ::fidl_next::Slot<'_, Self>,
5159 _: Self::Constraint,
5160 ) -> Result<(), ::fidl_next::ValidationError> {
5161 Ok(())
5162 }
5163 }
5164
5165 unsafe impl ::fidl_next::Wire for DestroyedPayload<'static> {
5166 type Narrowed<'de> = DestroyedPayload<'de>;
5167
5168 #[inline]
5169 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5170 ::fidl_next::munge!(let Self { table } = out);
5171 ::fidl_next::wire::Table::zero_padding(table);
5172 }
5173 }
5174
5175 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DestroyedPayload<'de>
5176 where
5177 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5178 {
5179 fn decode(
5180 slot: ::fidl_next::Slot<'_, Self>,
5181 decoder: &mut ___D,
5182 _: (),
5183 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5184 ::fidl_next::munge!(let Self { table } = slot);
5185
5186 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5187 match ordinal {
5188 0 => unsafe { ::core::hint::unreachable_unchecked() },
5189
5190 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5191 }
5192 })
5193 }
5194 }
5195
5196 impl<'de> DestroyedPayload<'de> {}
5197
5198 impl<'de> ::core::fmt::Debug for DestroyedPayload<'de> {
5199 fn fmt(
5200 &self,
5201 f: &mut ::core::fmt::Formatter<'_>,
5202 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5203 f.debug_struct("DestroyedPayload").finish()
5204 }
5205 }
5206
5207 impl<'de> ::fidl_next::IntoNatural for DestroyedPayload<'de> {
5208 type Natural = crate::natural::DestroyedPayload;
5209 }
5210
5211 #[repr(C)]
5213 pub struct DiscoveredPayload<'de> {
5214 pub(crate) table: ::fidl_next::wire::Table<'de>,
5215 }
5216
5217 impl<'de> Drop for DiscoveredPayload<'de> {
5218 fn drop(&mut self) {}
5219 }
5220
5221 impl ::fidl_next::Constrained for DiscoveredPayload<'_> {
5222 type Constraint = ();
5223
5224 fn validate(
5225 _: ::fidl_next::Slot<'_, Self>,
5226 _: Self::Constraint,
5227 ) -> Result<(), ::fidl_next::ValidationError> {
5228 Ok(())
5229 }
5230 }
5231
5232 unsafe impl ::fidl_next::Wire for DiscoveredPayload<'static> {
5233 type Narrowed<'de> = DiscoveredPayload<'de>;
5234
5235 #[inline]
5236 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5237 ::fidl_next::munge!(let Self { table } = out);
5238 ::fidl_next::wire::Table::zero_padding(table);
5239 }
5240 }
5241
5242 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DiscoveredPayload<'de>
5243 where
5244 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5245 {
5246 fn decode(
5247 slot: ::fidl_next::Slot<'_, Self>,
5248 decoder: &mut ___D,
5249 _: (),
5250 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5251 ::fidl_next::munge!(let Self { table } = slot);
5252
5253 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5254 match ordinal {
5255 0 => unsafe { ::core::hint::unreachable_unchecked() },
5256
5257 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5258 }
5259 })
5260 }
5261 }
5262
5263 impl<'de> DiscoveredPayload<'de> {}
5264
5265 impl<'de> ::core::fmt::Debug for DiscoveredPayload<'de> {
5266 fn fmt(
5267 &self,
5268 f: &mut ::core::fmt::Formatter<'_>,
5269 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5270 f.debug_struct("DiscoveredPayload").finish()
5271 }
5272 }
5273
5274 impl<'de> ::fidl_next::IntoNatural for DiscoveredPayload<'de> {
5275 type Natural = crate::natural::DiscoveredPayload;
5276 }
5277
5278 #[repr(C)]
5280 pub struct PurgedPayload<'de> {
5281 pub(crate) table: ::fidl_next::wire::Table<'de>,
5282 }
5283
5284 impl<'de> Drop for PurgedPayload<'de> {
5285 fn drop(&mut self) {}
5286 }
5287
5288 impl ::fidl_next::Constrained for PurgedPayload<'_> {
5289 type Constraint = ();
5290
5291 fn validate(
5292 _: ::fidl_next::Slot<'_, Self>,
5293 _: Self::Constraint,
5294 ) -> Result<(), ::fidl_next::ValidationError> {
5295 Ok(())
5296 }
5297 }
5298
5299 unsafe impl ::fidl_next::Wire for PurgedPayload<'static> {
5300 type Narrowed<'de> = PurgedPayload<'de>;
5301
5302 #[inline]
5303 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5304 ::fidl_next::munge!(let Self { table } = out);
5305 ::fidl_next::wire::Table::zero_padding(table);
5306 }
5307 }
5308
5309 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for PurgedPayload<'de>
5310 where
5311 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5312 {
5313 fn decode(
5314 slot: ::fidl_next::Slot<'_, Self>,
5315 decoder: &mut ___D,
5316 _: (),
5317 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5318 ::fidl_next::munge!(let Self { table } = slot);
5319
5320 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5321 match ordinal {
5322 0 => unsafe { ::core::hint::unreachable_unchecked() },
5323
5324 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5325 }
5326 })
5327 }
5328 }
5329
5330 impl<'de> PurgedPayload<'de> {}
5331
5332 impl<'de> ::core::fmt::Debug for PurgedPayload<'de> {
5333 fn fmt(
5334 &self,
5335 f: &mut ::core::fmt::Formatter<'_>,
5336 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5337 f.debug_struct("PurgedPayload").finish()
5338 }
5339 }
5340
5341 impl<'de> ::fidl_next::IntoNatural for PurgedPayload<'de> {
5342 type Natural = crate::natural::PurgedPayload;
5343 }
5344
5345 #[repr(C)]
5347 pub struct ResolvedPayload<'de> {
5348 pub(crate) table: ::fidl_next::wire::Table<'de>,
5349 }
5350
5351 impl<'de> Drop for ResolvedPayload<'de> {
5352 fn drop(&mut self) {}
5353 }
5354
5355 impl ::fidl_next::Constrained for ResolvedPayload<'_> {
5356 type Constraint = ();
5357
5358 fn validate(
5359 _: ::fidl_next::Slot<'_, Self>,
5360 _: Self::Constraint,
5361 ) -> Result<(), ::fidl_next::ValidationError> {
5362 Ok(())
5363 }
5364 }
5365
5366 unsafe impl ::fidl_next::Wire for ResolvedPayload<'static> {
5367 type Narrowed<'de> = ResolvedPayload<'de>;
5368
5369 #[inline]
5370 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5371 ::fidl_next::munge!(let Self { table } = out);
5372 ::fidl_next::wire::Table::zero_padding(table);
5373 }
5374 }
5375
5376 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ResolvedPayload<'de>
5377 where
5378 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5379 {
5380 fn decode(
5381 slot: ::fidl_next::Slot<'_, Self>,
5382 decoder: &mut ___D,
5383 _: (),
5384 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5385 ::fidl_next::munge!(let Self { table } = slot);
5386
5387 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5388 match ordinal {
5389 0 => unsafe { ::core::hint::unreachable_unchecked() },
5390
5391 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5392 }
5393 })
5394 }
5395 }
5396
5397 impl<'de> ResolvedPayload<'de> {}
5398
5399 impl<'de> ::core::fmt::Debug for ResolvedPayload<'de> {
5400 fn fmt(
5401 &self,
5402 f: &mut ::core::fmt::Formatter<'_>,
5403 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5404 f.debug_struct("ResolvedPayload").finish()
5405 }
5406 }
5407
5408 impl<'de> ::fidl_next::IntoNatural for ResolvedPayload<'de> {
5409 type Natural = crate::natural::ResolvedPayload;
5410 }
5411
5412 #[repr(C)]
5414 pub struct StartedPayload<'de> {
5415 pub(crate) table: ::fidl_next::wire::Table<'de>,
5416 }
5417
5418 impl<'de> Drop for StartedPayload<'de> {
5419 fn drop(&mut self) {}
5420 }
5421
5422 impl ::fidl_next::Constrained for StartedPayload<'_> {
5423 type Constraint = ();
5424
5425 fn validate(
5426 _: ::fidl_next::Slot<'_, Self>,
5427 _: Self::Constraint,
5428 ) -> Result<(), ::fidl_next::ValidationError> {
5429 Ok(())
5430 }
5431 }
5432
5433 unsafe impl ::fidl_next::Wire for StartedPayload<'static> {
5434 type Narrowed<'de> = StartedPayload<'de>;
5435
5436 #[inline]
5437 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5438 ::fidl_next::munge!(let Self { table } = out);
5439 ::fidl_next::wire::Table::zero_padding(table);
5440 }
5441 }
5442
5443 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StartedPayload<'de>
5444 where
5445 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5446 {
5447 fn decode(
5448 slot: ::fidl_next::Slot<'_, Self>,
5449 decoder: &mut ___D,
5450 _: (),
5451 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5452 ::fidl_next::munge!(let Self { table } = slot);
5453
5454 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5455 match ordinal {
5456 0 => unsafe { ::core::hint::unreachable_unchecked() },
5457
5458 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5459 }
5460 })
5461 }
5462 }
5463
5464 impl<'de> StartedPayload<'de> {}
5465
5466 impl<'de> ::core::fmt::Debug for StartedPayload<'de> {
5467 fn fmt(
5468 &self,
5469 f: &mut ::core::fmt::Formatter<'_>,
5470 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5471 f.debug_struct("StartedPayload").finish()
5472 }
5473 }
5474
5475 impl<'de> ::fidl_next::IntoNatural for StartedPayload<'de> {
5476 type Natural = crate::natural::StartedPayload;
5477 }
5478
5479 #[repr(C)]
5481 pub struct UnresolvedPayload<'de> {
5482 pub(crate) table: ::fidl_next::wire::Table<'de>,
5483 }
5484
5485 impl<'de> Drop for UnresolvedPayload<'de> {
5486 fn drop(&mut self) {}
5487 }
5488
5489 impl ::fidl_next::Constrained for UnresolvedPayload<'_> {
5490 type Constraint = ();
5491
5492 fn validate(
5493 _: ::fidl_next::Slot<'_, Self>,
5494 _: Self::Constraint,
5495 ) -> Result<(), ::fidl_next::ValidationError> {
5496 Ok(())
5497 }
5498 }
5499
5500 unsafe impl ::fidl_next::Wire for UnresolvedPayload<'static> {
5501 type Narrowed<'de> = UnresolvedPayload<'de>;
5502
5503 #[inline]
5504 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5505 ::fidl_next::munge!(let Self { table } = out);
5506 ::fidl_next::wire::Table::zero_padding(table);
5507 }
5508 }
5509
5510 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnresolvedPayload<'de>
5511 where
5512 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5513 {
5514 fn decode(
5515 slot: ::fidl_next::Slot<'_, Self>,
5516 decoder: &mut ___D,
5517 _: (),
5518 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5519 ::fidl_next::munge!(let Self { table } = slot);
5520
5521 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5522 match ordinal {
5523 0 => unsafe { ::core::hint::unreachable_unchecked() },
5524
5525 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5526 }
5527 })
5528 }
5529 }
5530
5531 impl<'de> UnresolvedPayload<'de> {}
5532
5533 impl<'de> ::core::fmt::Debug for UnresolvedPayload<'de> {
5534 fn fmt(
5535 &self,
5536 f: &mut ::core::fmt::Formatter<'_>,
5537 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5538 f.debug_struct("UnresolvedPayload").finish()
5539 }
5540 }
5541
5542 impl<'de> ::fidl_next::IntoNatural for UnresolvedPayload<'de> {
5543 type Natural = crate::natural::UnresolvedPayload;
5544 }
5545
5546 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
5548 #[repr(transparent)]
5549 pub struct EventType {
5550 pub(crate) value: ::fidl_next::wire::Uint32,
5551 }
5552
5553 impl ::fidl_next::Constrained for EventType {
5554 type Constraint = ();
5555
5556 fn validate(
5557 _: ::fidl_next::Slot<'_, Self>,
5558 _: Self::Constraint,
5559 ) -> Result<(), ::fidl_next::ValidationError> {
5560 Ok(())
5561 }
5562 }
5563
5564 unsafe impl ::fidl_next::Wire for EventType {
5565 type Narrowed<'de> = Self;
5566
5567 #[inline]
5568 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
5569 }
5571 }
5572
5573 impl EventType {
5574 pub const CAPABILITY_REQUESTED: EventType =
5575 EventType { value: ::fidl_next::wire::Uint32(1) };
5576
5577 pub const DISCOVERED: EventType = EventType { value: ::fidl_next::wire::Uint32(3) };
5578
5579 pub const DESTROYED: EventType = EventType { value: ::fidl_next::wire::Uint32(4) };
5580
5581 pub const RESOLVED: EventType = EventType { value: ::fidl_next::wire::Uint32(5) };
5582
5583 pub const STARTED: EventType = EventType { value: ::fidl_next::wire::Uint32(6) };
5584
5585 pub const STOPPED: EventType = EventType { value: ::fidl_next::wire::Uint32(7) };
5586
5587 pub const DEBUG_STARTED: EventType = EventType { value: ::fidl_next::wire::Uint32(8) };
5588
5589 pub const UNRESOLVED: EventType = EventType { value: ::fidl_next::wire::Uint32(9) };
5590 }
5591
5592 unsafe impl<___D> ::fidl_next::Decode<___D> for EventType
5593 where
5594 ___D: ?Sized,
5595 {
5596 fn decode(
5597 slot: ::fidl_next::Slot<'_, Self>,
5598 _: &mut ___D,
5599 _: (),
5600 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5601 ::fidl_next::munge!(let Self { value } = slot);
5602
5603 match u32::from(*value) {
5604 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 => (),
5605 unknown => {
5606 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
5607 }
5608 }
5609
5610 Ok(())
5611 }
5612 }
5613
5614 impl ::core::convert::From<crate::natural::EventType> for EventType {
5615 fn from(natural: crate::natural::EventType) -> Self {
5616 match natural {
5617 crate::natural::EventType::CapabilityRequested => EventType::CAPABILITY_REQUESTED,
5618
5619 crate::natural::EventType::Discovered => EventType::DISCOVERED,
5620
5621 crate::natural::EventType::Destroyed => EventType::DESTROYED,
5622
5623 crate::natural::EventType::Resolved => EventType::RESOLVED,
5624
5625 crate::natural::EventType::Started => EventType::STARTED,
5626
5627 crate::natural::EventType::Stopped => EventType::STOPPED,
5628
5629 crate::natural::EventType::DebugStarted => EventType::DEBUG_STARTED,
5630
5631 crate::natural::EventType::Unresolved => EventType::UNRESOLVED,
5632 }
5633 }
5634 }
5635
5636 impl ::fidl_next::IntoNatural for EventType {
5637 type Natural = crate::natural::EventType;
5638 }
5639
5640 #[repr(C)]
5642 pub struct StoppedPayload<'de> {
5643 pub(crate) table: ::fidl_next::wire::Table<'de>,
5644 }
5645
5646 impl<'de> Drop for StoppedPayload<'de> {
5647 fn drop(&mut self) {
5648 let _ = self
5649 .table
5650 .get(1)
5651 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int32>() });
5652
5653 let _ = self
5654 .table
5655 .get(2)
5656 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
5657 }
5658 }
5659
5660 impl ::fidl_next::Constrained for StoppedPayload<'_> {
5661 type Constraint = ();
5662
5663 fn validate(
5664 _: ::fidl_next::Slot<'_, Self>,
5665 _: Self::Constraint,
5666 ) -> Result<(), ::fidl_next::ValidationError> {
5667 Ok(())
5668 }
5669 }
5670
5671 unsafe impl ::fidl_next::Wire for StoppedPayload<'static> {
5672 type Narrowed<'de> = StoppedPayload<'de>;
5673
5674 #[inline]
5675 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5676 ::fidl_next::munge!(let Self { table } = out);
5677 ::fidl_next::wire::Table::zero_padding(table);
5678 }
5679 }
5680
5681 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StoppedPayload<'de>
5682 where
5683 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5684 {
5685 fn decode(
5686 slot: ::fidl_next::Slot<'_, Self>,
5687 decoder: &mut ___D,
5688 _: (),
5689 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5690 ::fidl_next::munge!(let Self { table } = slot);
5691
5692 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5693 match ordinal {
5694 0 => unsafe { ::core::hint::unreachable_unchecked() },
5695
5696 1 => {
5697 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int32>(
5698 slot.as_mut(),
5699 decoder,
5700 (),
5701 )?;
5702
5703 Ok(())
5704 }
5705
5706 2 => {
5707 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
5708 slot.as_mut(),
5709 decoder,
5710 (),
5711 )?;
5712
5713 Ok(())
5714 }
5715
5716 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5717 }
5718 })
5719 }
5720 }
5721
5722 impl<'de> StoppedPayload<'de> {
5723 pub fn status(&self) -> ::core::option::Option<&::fidl_next::wire::Int32> {
5724 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5725 }
5726
5727 pub fn exit_code(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
5728 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5729 }
5730 }
5731
5732 impl<'de> ::core::fmt::Debug for StoppedPayload<'de> {
5733 fn fmt(
5734 &self,
5735 f: &mut ::core::fmt::Formatter<'_>,
5736 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5737 f.debug_struct("StoppedPayload")
5738 .field("status", &self.status())
5739 .field("exit_code", &self.exit_code())
5740 .finish()
5741 }
5742 }
5743
5744 impl<'de> ::fidl_next::IntoNatural for StoppedPayload<'de> {
5745 type Natural = crate::natural::StoppedPayload;
5746 }
5747
5748 #[repr(C)]
5750 pub struct EventHeader<'de> {
5751 pub(crate) table: ::fidl_next::wire::Table<'de>,
5752 }
5753
5754 impl<'de> Drop for EventHeader<'de> {
5755 fn drop(&mut self) {
5756 let _ = self
5757 .table
5758 .get(1)
5759 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::EventType>() });
5760
5761 let _ = self.table.get(2).map(|envelope| unsafe {
5762 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
5763 });
5764
5765 let _ = self.table.get(3).map(|envelope| unsafe {
5766 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
5767 });
5768
5769 let _ = self
5770 .table
5771 .get(4)
5772 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
5773 }
5774 }
5775
5776 impl ::fidl_next::Constrained for EventHeader<'_> {
5777 type Constraint = ();
5778
5779 fn validate(
5780 _: ::fidl_next::Slot<'_, Self>,
5781 _: Self::Constraint,
5782 ) -> Result<(), ::fidl_next::ValidationError> {
5783 Ok(())
5784 }
5785 }
5786
5787 unsafe impl ::fidl_next::Wire for EventHeader<'static> {
5788 type Narrowed<'de> = EventHeader<'de>;
5789
5790 #[inline]
5791 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5792 ::fidl_next::munge!(let Self { table } = out);
5793 ::fidl_next::wire::Table::zero_padding(table);
5794 }
5795 }
5796
5797 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EventHeader<'de>
5798 where
5799 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5800 {
5801 fn decode(
5802 slot: ::fidl_next::Slot<'_, Self>,
5803 decoder: &mut ___D,
5804 _: (),
5805 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5806 ::fidl_next::munge!(let Self { table } = slot);
5807
5808 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5809 match ordinal {
5810 0 => unsafe { ::core::hint::unreachable_unchecked() },
5811
5812 1 => {
5813 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::EventType>(
5814 slot.as_mut(),
5815 decoder,
5816 (),
5817 )?;
5818
5819 Ok(())
5820 }
5821
5822 2 => {
5823 ::fidl_next::wire::Envelope::decode_as::<
5824 ___D,
5825 ::fidl_next::wire::String<'de>,
5826 >(slot.as_mut(), decoder, 4096)?;
5827
5828 let value = unsafe {
5829 slot.deref_unchecked()
5830 .deref_unchecked::<::fidl_next::wire::String<'_>>()
5831 };
5832
5833 if value.len() > 4096 {
5834 return Err(::fidl_next::DecodeError::VectorTooLong {
5835 size: value.len() as u64,
5836 limit: 4096,
5837 });
5838 }
5839
5840 Ok(())
5841 }
5842
5843 3 => {
5844 ::fidl_next::wire::Envelope::decode_as::<
5845 ___D,
5846 ::fidl_next::wire::String<'de>,
5847 >(slot.as_mut(), decoder, 4096)?;
5848
5849 let value = unsafe {
5850 slot.deref_unchecked()
5851 .deref_unchecked::<::fidl_next::wire::String<'_>>()
5852 };
5853
5854 if value.len() > 4096 {
5855 return Err(::fidl_next::DecodeError::VectorTooLong {
5856 size: value.len() as u64,
5857 limit: 4096,
5858 });
5859 }
5860
5861 Ok(())
5862 }
5863
5864 4 => {
5865 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
5866 slot.as_mut(),
5867 decoder,
5868 (),
5869 )?;
5870
5871 Ok(())
5872 }
5873
5874 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5875 }
5876 })
5877 }
5878 }
5879
5880 impl<'de> EventHeader<'de> {
5881 pub fn event_type(&self) -> ::core::option::Option<&crate::wire::EventType> {
5882 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5883 }
5884
5885 pub fn moniker(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
5886 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5887 }
5888
5889 pub fn component_url(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
5890 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
5891 }
5892
5893 pub fn timestamp(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
5894 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
5895 }
5896 }
5897
5898 impl<'de> ::core::fmt::Debug for EventHeader<'de> {
5899 fn fmt(
5900 &self,
5901 f: &mut ::core::fmt::Formatter<'_>,
5902 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5903 f.debug_struct("EventHeader")
5904 .field("event_type", &self.event_type())
5905 .field("moniker", &self.moniker())
5906 .field("component_url", &self.component_url())
5907 .field("timestamp", &self.timestamp())
5908 .finish()
5909 }
5910 }
5911
5912 impl<'de> ::fidl_next::IntoNatural for EventHeader<'de> {
5913 type Natural = crate::natural::EventHeader;
5914 }
5915
5916 #[derive(Debug)]
5918 #[repr(C)]
5919 pub struct ExecutionControllerOnStopRequest<'de> {
5920 pub stopped_payload: crate::wire::StoppedPayload<'de>,
5921 }
5922
5923 static_assertions::const_assert_eq!(
5924 std::mem::size_of::<ExecutionControllerOnStopRequest<'_>>(),
5925 16
5926 );
5927 static_assertions::const_assert_eq!(
5928 std::mem::align_of::<ExecutionControllerOnStopRequest<'_>>(),
5929 8
5930 );
5931
5932 static_assertions::const_assert_eq!(
5933 std::mem::offset_of!(ExecutionControllerOnStopRequest<'_>, stopped_payload),
5934 0
5935 );
5936
5937 impl ::fidl_next::Constrained for ExecutionControllerOnStopRequest<'_> {
5938 type Constraint = ();
5939
5940 fn validate(
5941 _: ::fidl_next::Slot<'_, Self>,
5942 _: Self::Constraint,
5943 ) -> Result<(), ::fidl_next::ValidationError> {
5944 Ok(())
5945 }
5946 }
5947
5948 unsafe impl ::fidl_next::Wire for ExecutionControllerOnStopRequest<'static> {
5949 type Narrowed<'de> = ExecutionControllerOnStopRequest<'de>;
5950
5951 #[inline]
5952 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5953 ::fidl_next::munge! {
5954 let Self {
5955
5956 stopped_payload,
5957
5958 } = &mut *out_;
5959 }
5960
5961 ::fidl_next::Wire::zero_padding(stopped_payload);
5962 }
5963 }
5964
5965 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExecutionControllerOnStopRequest<'de>
5966 where
5967 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5968 ___D: ::fidl_next::Decoder<'de>,
5969 {
5970 fn decode(
5971 slot_: ::fidl_next::Slot<'_, Self>,
5972 decoder_: &mut ___D,
5973 _: (),
5974 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5975 ::fidl_next::munge! {
5976 let Self {
5977
5978 mut stopped_payload,
5979
5980 } = slot_;
5981 }
5982
5983 let _field = stopped_payload.as_mut();
5984
5985 ::fidl_next::Decode::decode(stopped_payload.as_mut(), decoder_, ())?;
5986
5987 Ok(())
5988 }
5989 }
5990
5991 impl<'de> ::fidl_next::IntoNatural for ExecutionControllerOnStopRequest<'de> {
5992 type Natural = crate::natural::ExecutionControllerOnStopRequest;
5993 }
5994
5995 #[derive(Debug)]
5997 #[repr(C)]
5998 pub struct IntrospectorGetMonikerResponse<'de> {
5999 pub moniker: ::fidl_next::wire::String<'de>,
6000 }
6001
6002 static_assertions::const_assert_eq!(
6003 std::mem::size_of::<IntrospectorGetMonikerResponse<'_>>(),
6004 16
6005 );
6006 static_assertions::const_assert_eq!(
6007 std::mem::align_of::<IntrospectorGetMonikerResponse<'_>>(),
6008 8
6009 );
6010
6011 static_assertions::const_assert_eq!(
6012 std::mem::offset_of!(IntrospectorGetMonikerResponse<'_>, moniker),
6013 0
6014 );
6015
6016 impl ::fidl_next::Constrained for IntrospectorGetMonikerResponse<'_> {
6017 type Constraint = ();
6018
6019 fn validate(
6020 _: ::fidl_next::Slot<'_, Self>,
6021 _: Self::Constraint,
6022 ) -> Result<(), ::fidl_next::ValidationError> {
6023 Ok(())
6024 }
6025 }
6026
6027 unsafe impl ::fidl_next::Wire for IntrospectorGetMonikerResponse<'static> {
6028 type Narrowed<'de> = IntrospectorGetMonikerResponse<'de>;
6029
6030 #[inline]
6031 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6032 ::fidl_next::munge! {
6033 let Self {
6034
6035 moniker,
6036
6037 } = &mut *out_;
6038 }
6039
6040 ::fidl_next::Wire::zero_padding(moniker);
6041 }
6042 }
6043
6044 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for IntrospectorGetMonikerResponse<'de>
6045 where
6046 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6047 ___D: ::fidl_next::Decoder<'de>,
6048 {
6049 fn decode(
6050 slot_: ::fidl_next::Slot<'_, Self>,
6051 decoder_: &mut ___D,
6052 _: (),
6053 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6054 ::fidl_next::munge! {
6055 let Self {
6056
6057 mut moniker,
6058
6059 } = slot_;
6060 }
6061
6062 let _field = moniker.as_mut();
6063 ::fidl_next::Constrained::validate(_field, 4096)?;
6064 ::fidl_next::Decode::decode(moniker.as_mut(), decoder_, 4096)?;
6065
6066 let moniker = unsafe { moniker.deref_unchecked() };
6067
6068 if moniker.len() > 4096 {
6069 return Err(::fidl_next::DecodeError::VectorTooLong {
6070 size: moniker.len() as u64,
6071 limit: 4096,
6072 });
6073 }
6074
6075 Ok(())
6076 }
6077 }
6078
6079 impl<'de> ::fidl_next::IntoNatural for IntrospectorGetMonikerResponse<'de> {
6080 type Natural = crate::natural::IntrospectorGetMonikerResponse;
6081 }
6082
6083 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6085 #[repr(transparent)]
6086 pub struct NamespaceError {
6087 pub(crate) value: ::fidl_next::wire::Uint32,
6088 }
6089
6090 impl ::fidl_next::Constrained for NamespaceError {
6091 type Constraint = ();
6092
6093 fn validate(
6094 _: ::fidl_next::Slot<'_, Self>,
6095 _: Self::Constraint,
6096 ) -> Result<(), ::fidl_next::ValidationError> {
6097 Ok(())
6098 }
6099 }
6100
6101 unsafe impl ::fidl_next::Wire for NamespaceError {
6102 type Narrowed<'de> = Self;
6103
6104 #[inline]
6105 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6106 }
6108 }
6109
6110 impl NamespaceError {
6111 pub const SHADOW: NamespaceError = NamespaceError { value: ::fidl_next::wire::Uint32(1) };
6112
6113 pub const DUPLICATE: NamespaceError =
6114 NamespaceError { value: ::fidl_next::wire::Uint32(2) };
6115
6116 pub const CONVERSION: NamespaceError =
6117 NamespaceError { value: ::fidl_next::wire::Uint32(3) };
6118
6119 pub const BAD_ENTRY: NamespaceError =
6120 NamespaceError { value: ::fidl_next::wire::Uint32(4) };
6121
6122 pub const DICTIONARY_READ: NamespaceError =
6123 NamespaceError { value: ::fidl_next::wire::Uint32(5) };
6124 }
6125
6126 unsafe impl<___D> ::fidl_next::Decode<___D> for NamespaceError
6127 where
6128 ___D: ?Sized,
6129 {
6130 fn decode(
6131 slot: ::fidl_next::Slot<'_, Self>,
6132 _: &mut ___D,
6133 _: (),
6134 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6135 Ok(())
6136 }
6137 }
6138
6139 impl ::core::convert::From<crate::natural::NamespaceError> for NamespaceError {
6140 fn from(natural: crate::natural::NamespaceError) -> Self {
6141 match natural {
6142 crate::natural::NamespaceError::Shadow => NamespaceError::SHADOW,
6143
6144 crate::natural::NamespaceError::Duplicate => NamespaceError::DUPLICATE,
6145
6146 crate::natural::NamespaceError::Conversion => NamespaceError::CONVERSION,
6147
6148 crate::natural::NamespaceError::BadEntry => NamespaceError::BAD_ENTRY,
6149
6150 crate::natural::NamespaceError::DictionaryRead => NamespaceError::DICTIONARY_READ,
6151
6152 crate::natural::NamespaceError::UnknownOrdinal_(value) => {
6153 NamespaceError { value: ::fidl_next::wire::Uint32::from(value) }
6154 }
6155 }
6156 }
6157 }
6158
6159 impl ::fidl_next::IntoNatural for NamespaceError {
6160 type Natural = crate::natural::NamespaceError;
6161 }
6162
6163 #[derive(Clone, Debug)]
6165 #[repr(C)]
6166 pub struct RealmOpenExposedDirResponse {
6167 pub(crate) _empty: fidl_next::wire::EmptyStruct,
6168 }
6169
6170 static_assertions::const_assert_eq!(std::mem::size_of::<RealmOpenExposedDirResponse>(), 1);
6171 static_assertions::const_assert_eq!(std::mem::align_of::<RealmOpenExposedDirResponse>(), 1);
6172
6173 impl ::fidl_next::Constrained for RealmOpenExposedDirResponse {
6174 type Constraint = ();
6175
6176 fn validate(
6177 _: ::fidl_next::Slot<'_, Self>,
6178 _: Self::Constraint,
6179 ) -> Result<(), ::fidl_next::ValidationError> {
6180 Ok(())
6181 }
6182 }
6183
6184 unsafe impl ::fidl_next::Wire for RealmOpenExposedDirResponse {
6185 type Narrowed<'de> = RealmOpenExposedDirResponse;
6186
6187 #[inline]
6188 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6189 ::fidl_next::munge! {
6190 let Self {
6191
6192 _empty,
6193
6194
6195 } = &mut *out_;
6196 }
6197 }
6198 }
6199
6200 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmOpenExposedDirResponse
6201 where
6202 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6203 {
6204 fn decode(
6205 slot_: ::fidl_next::Slot<'_, Self>,
6206 decoder_: &mut ___D,
6207 _: (),
6208 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6209 ::fidl_next::munge! {
6210 let Self {
6211
6212 mut _empty,
6213
6214
6215 } = slot_;
6216 }
6217
6218 if _empty.as_bytes() != &[0u8] {
6219 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
6220 }
6221
6222 Ok(())
6223 }
6224 }
6225
6226 impl ::fidl_next::IntoNatural for RealmOpenExposedDirResponse {
6227 type Natural = crate::natural::RealmOpenExposedDirResponse;
6228 }
6229
6230 #[derive(Clone, Debug)]
6232 #[repr(C)]
6233 pub struct RealmCreateChildResponse {
6234 pub(crate) _empty: fidl_next::wire::EmptyStruct,
6235 }
6236
6237 static_assertions::const_assert_eq!(std::mem::size_of::<RealmCreateChildResponse>(), 1);
6238 static_assertions::const_assert_eq!(std::mem::align_of::<RealmCreateChildResponse>(), 1);
6239
6240 impl ::fidl_next::Constrained for RealmCreateChildResponse {
6241 type Constraint = ();
6242
6243 fn validate(
6244 _: ::fidl_next::Slot<'_, Self>,
6245 _: Self::Constraint,
6246 ) -> Result<(), ::fidl_next::ValidationError> {
6247 Ok(())
6248 }
6249 }
6250
6251 unsafe impl ::fidl_next::Wire for RealmCreateChildResponse {
6252 type Narrowed<'de> = RealmCreateChildResponse;
6253
6254 #[inline]
6255 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6256 ::fidl_next::munge! {
6257 let Self {
6258
6259 _empty,
6260
6261
6262 } = &mut *out_;
6263 }
6264 }
6265 }
6266
6267 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmCreateChildResponse
6268 where
6269 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6270 {
6271 fn decode(
6272 slot_: ::fidl_next::Slot<'_, Self>,
6273 decoder_: &mut ___D,
6274 _: (),
6275 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6276 ::fidl_next::munge! {
6277 let Self {
6278
6279 mut _empty,
6280
6281
6282 } = slot_;
6283 }
6284
6285 if _empty.as_bytes() != &[0u8] {
6286 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
6287 }
6288
6289 Ok(())
6290 }
6291 }
6292
6293 impl ::fidl_next::IntoNatural for RealmCreateChildResponse {
6294 type Natural = crate::natural::RealmCreateChildResponse;
6295 }
6296
6297 #[derive(Debug)]
6299 #[repr(C)]
6300 pub struct RealmDestroyChildRequest<'de> {
6301 pub child: ::fidl_next_common_fuchsia_component_decl::wire::ChildRef<'de>,
6302 }
6303
6304 static_assertions::const_assert_eq!(std::mem::size_of::<RealmDestroyChildRequest<'_>>(), 32);
6305 static_assertions::const_assert_eq!(std::mem::align_of::<RealmDestroyChildRequest<'_>>(), 8);
6306
6307 static_assertions::const_assert_eq!(
6308 std::mem::offset_of!(RealmDestroyChildRequest<'_>, child),
6309 0
6310 );
6311
6312 impl ::fidl_next::Constrained for RealmDestroyChildRequest<'_> {
6313 type Constraint = ();
6314
6315 fn validate(
6316 _: ::fidl_next::Slot<'_, Self>,
6317 _: Self::Constraint,
6318 ) -> Result<(), ::fidl_next::ValidationError> {
6319 Ok(())
6320 }
6321 }
6322
6323 unsafe impl ::fidl_next::Wire for RealmDestroyChildRequest<'static> {
6324 type Narrowed<'de> = RealmDestroyChildRequest<'de>;
6325
6326 #[inline]
6327 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6328 ::fidl_next::munge! {
6329 let Self {
6330
6331 child,
6332
6333 } = &mut *out_;
6334 }
6335
6336 ::fidl_next::Wire::zero_padding(child);
6337 }
6338 }
6339
6340 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RealmDestroyChildRequest<'de>
6341 where
6342 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6343 ___D: ::fidl_next::Decoder<'de>,
6344 {
6345 fn decode(
6346 slot_: ::fidl_next::Slot<'_, Self>,
6347 decoder_: &mut ___D,
6348 _: (),
6349 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6350 ::fidl_next::munge! {
6351 let Self {
6352
6353 mut child,
6354
6355 } = slot_;
6356 }
6357
6358 let _field = child.as_mut();
6359
6360 ::fidl_next::Decode::decode(child.as_mut(), decoder_, ())?;
6361
6362 Ok(())
6363 }
6364 }
6365
6366 impl<'de> ::fidl_next::IntoNatural for RealmDestroyChildRequest<'de> {
6367 type Natural = crate::natural::RealmDestroyChildRequest;
6368 }
6369
6370 #[derive(Clone, Debug)]
6372 #[repr(C)]
6373 pub struct RealmDestroyChildResponse {
6374 pub(crate) _empty: fidl_next::wire::EmptyStruct,
6375 }
6376
6377 static_assertions::const_assert_eq!(std::mem::size_of::<RealmDestroyChildResponse>(), 1);
6378 static_assertions::const_assert_eq!(std::mem::align_of::<RealmDestroyChildResponse>(), 1);
6379
6380 impl ::fidl_next::Constrained for RealmDestroyChildResponse {
6381 type Constraint = ();
6382
6383 fn validate(
6384 _: ::fidl_next::Slot<'_, Self>,
6385 _: Self::Constraint,
6386 ) -> Result<(), ::fidl_next::ValidationError> {
6387 Ok(())
6388 }
6389 }
6390
6391 unsafe impl ::fidl_next::Wire for RealmDestroyChildResponse {
6392 type Narrowed<'de> = RealmDestroyChildResponse;
6393
6394 #[inline]
6395 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6396 ::fidl_next::munge! {
6397 let Self {
6398
6399 _empty,
6400
6401
6402 } = &mut *out_;
6403 }
6404 }
6405 }
6406
6407 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmDestroyChildResponse
6408 where
6409 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6410 {
6411 fn decode(
6412 slot_: ::fidl_next::Slot<'_, Self>,
6413 decoder_: &mut ___D,
6414 _: (),
6415 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6416 ::fidl_next::munge! {
6417 let Self {
6418
6419 mut _empty,
6420
6421
6422 } = slot_;
6423 }
6424
6425 if _empty.as_bytes() != &[0u8] {
6426 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
6427 }
6428
6429 Ok(())
6430 }
6431 }
6432
6433 impl ::fidl_next::IntoNatural for RealmDestroyChildResponse {
6434 type Natural = crate::natural::RealmDestroyChildResponse;
6435 }
6436
6437 #[derive(Clone, Debug)]
6439 #[repr(C)]
6440 pub struct RealmListChildrenResponse {
6441 pub(crate) _empty: fidl_next::wire::EmptyStruct,
6442 }
6443
6444 static_assertions::const_assert_eq!(std::mem::size_of::<RealmListChildrenResponse>(), 1);
6445 static_assertions::const_assert_eq!(std::mem::align_of::<RealmListChildrenResponse>(), 1);
6446
6447 impl ::fidl_next::Constrained for RealmListChildrenResponse {
6448 type Constraint = ();
6449
6450 fn validate(
6451 _: ::fidl_next::Slot<'_, Self>,
6452 _: Self::Constraint,
6453 ) -> Result<(), ::fidl_next::ValidationError> {
6454 Ok(())
6455 }
6456 }
6457
6458 unsafe impl ::fidl_next::Wire for RealmListChildrenResponse {
6459 type Narrowed<'de> = RealmListChildrenResponse;
6460
6461 #[inline]
6462 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6463 ::fidl_next::munge! {
6464 let Self {
6465
6466 _empty,
6467
6468
6469 } = &mut *out_;
6470 }
6471 }
6472 }
6473
6474 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmListChildrenResponse
6475 where
6476 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6477 {
6478 fn decode(
6479 slot_: ::fidl_next::Slot<'_, Self>,
6480 decoder_: &mut ___D,
6481 _: (),
6482 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6483 ::fidl_next::munge! {
6484 let Self {
6485
6486 mut _empty,
6487
6488
6489 } = slot_;
6490 }
6491
6492 if _empty.as_bytes() != &[0u8] {
6493 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
6494 }
6495
6496 Ok(())
6497 }
6498 }
6499
6500 impl ::fidl_next::IntoNatural for RealmListChildrenResponse {
6501 type Natural = crate::natural::RealmListChildrenResponse;
6502 }
6503
6504 #[derive(Clone, Debug)]
6506 #[repr(C)]
6507 pub struct RealmOpenControllerResponse {
6508 pub(crate) _empty: fidl_next::wire::EmptyStruct,
6509 }
6510
6511 static_assertions::const_assert_eq!(std::mem::size_of::<RealmOpenControllerResponse>(), 1);
6512 static_assertions::const_assert_eq!(std::mem::align_of::<RealmOpenControllerResponse>(), 1);
6513
6514 impl ::fidl_next::Constrained for RealmOpenControllerResponse {
6515 type Constraint = ();
6516
6517 fn validate(
6518 _: ::fidl_next::Slot<'_, Self>,
6519 _: Self::Constraint,
6520 ) -> Result<(), ::fidl_next::ValidationError> {
6521 Ok(())
6522 }
6523 }
6524
6525 unsafe impl ::fidl_next::Wire for RealmOpenControllerResponse {
6526 type Narrowed<'de> = RealmOpenControllerResponse;
6527
6528 #[inline]
6529 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6530 ::fidl_next::munge! {
6531 let Self {
6532
6533 _empty,
6534
6535
6536 } = &mut *out_;
6537 }
6538 }
6539 }
6540
6541 unsafe impl<___D> ::fidl_next::Decode<___D> for RealmOpenControllerResponse
6542 where
6543 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6544 {
6545 fn decode(
6546 slot_: ::fidl_next::Slot<'_, Self>,
6547 decoder_: &mut ___D,
6548 _: (),
6549 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6550 ::fidl_next::munge! {
6551 let Self {
6552
6553 mut _empty,
6554
6555
6556 } = slot_;
6557 }
6558
6559 if _empty.as_bytes() != &[0u8] {
6560 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
6561 }
6562
6563 Ok(())
6564 }
6565 }
6566
6567 impl ::fidl_next::IntoNatural for RealmOpenControllerResponse {
6568 type Natural = crate::natural::RealmOpenControllerResponse;
6569 }
6570
6571 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6573 #[repr(transparent)]
6574 pub struct StatusError {
6575 pub(crate) value: ::fidl_next::wire::Uint32,
6576 }
6577
6578 impl ::fidl_next::Constrained for StatusError {
6579 type Constraint = ();
6580
6581 fn validate(
6582 _: ::fidl_next::Slot<'_, Self>,
6583 _: Self::Constraint,
6584 ) -> Result<(), ::fidl_next::ValidationError> {
6585 Ok(())
6586 }
6587 }
6588
6589 unsafe impl ::fidl_next::Wire for StatusError {
6590 type Narrowed<'de> = Self;
6591
6592 #[inline]
6593 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6594 }
6596 }
6597
6598 impl StatusError {
6599 pub const PROVIDER: StatusError = StatusError { value: ::fidl_next::wire::Uint32(1) };
6600
6601 pub const RESPONSE_INVALID: StatusError =
6602 StatusError { value: ::fidl_next::wire::Uint32(2) };
6603
6604 pub const STATUS_UNKNOWN: StatusError = StatusError { value: ::fidl_next::wire::Uint32(3) };
6605
6606 pub const UNSUPPORTED: StatusError = StatusError { value: ::fidl_next::wire::Uint32(4) };
6607 }
6608
6609 unsafe impl<___D> ::fidl_next::Decode<___D> for StatusError
6610 where
6611 ___D: ?Sized,
6612 {
6613 fn decode(
6614 slot: ::fidl_next::Slot<'_, Self>,
6615 _: &mut ___D,
6616 _: (),
6617 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6618 ::fidl_next::munge!(let Self { value } = slot);
6619
6620 match u32::from(*value) {
6621 1 | 2 | 3 | 4 => (),
6622 unknown => {
6623 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
6624 }
6625 }
6626
6627 Ok(())
6628 }
6629 }
6630
6631 impl ::core::convert::From<crate::natural::StatusError> for StatusError {
6632 fn from(natural: crate::natural::StatusError) -> Self {
6633 match natural {
6634 crate::natural::StatusError::Provider => StatusError::PROVIDER,
6635
6636 crate::natural::StatusError::ResponseInvalid => StatusError::RESPONSE_INVALID,
6637
6638 crate::natural::StatusError::StatusUnknown => StatusError::STATUS_UNKNOWN,
6639
6640 crate::natural::StatusError::Unsupported => StatusError::UNSUPPORTED,
6641 }
6642 }
6643 }
6644
6645 impl ::fidl_next::IntoNatural for StatusError {
6646 type Natural = crate::natural::StatusError;
6647 }
6648
6649 #[derive(Clone, Debug)]
6651 #[repr(C)]
6652 pub struct StorageAdminOpenStorageResponse {
6653 pub(crate) _empty: fidl_next::wire::EmptyStruct,
6654 }
6655
6656 static_assertions::const_assert_eq!(std::mem::size_of::<StorageAdminOpenStorageResponse>(), 1);
6657 static_assertions::const_assert_eq!(std::mem::align_of::<StorageAdminOpenStorageResponse>(), 1);
6658
6659 impl ::fidl_next::Constrained for StorageAdminOpenStorageResponse {
6660 type Constraint = ();
6661
6662 fn validate(
6663 _: ::fidl_next::Slot<'_, Self>,
6664 _: Self::Constraint,
6665 ) -> Result<(), ::fidl_next::ValidationError> {
6666 Ok(())
6667 }
6668 }
6669
6670 unsafe impl ::fidl_next::Wire for StorageAdminOpenStorageResponse {
6671 type Narrowed<'de> = StorageAdminOpenStorageResponse;
6672
6673 #[inline]
6674 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6675 ::fidl_next::munge! {
6676 let Self {
6677
6678 _empty,
6679
6680
6681 } = &mut *out_;
6682 }
6683 }
6684 }
6685
6686 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminOpenStorageResponse
6687 where
6688 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6689 {
6690 fn decode(
6691 slot_: ::fidl_next::Slot<'_, Self>,
6692 decoder_: &mut ___D,
6693 _: (),
6694 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6695 ::fidl_next::munge! {
6696 let Self {
6697
6698 mut _empty,
6699
6700
6701 } = slot_;
6702 }
6703
6704 if _empty.as_bytes() != &[0u8] {
6705 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
6706 }
6707
6708 Ok(())
6709 }
6710 }
6711
6712 impl ::fidl_next::IntoNatural for StorageAdminOpenStorageResponse {
6713 type Natural = crate::natural::StorageAdminOpenStorageResponse;
6714 }
6715
6716 #[derive(Clone, Debug)]
6718 #[repr(C)]
6719 pub struct StorageAdminListStorageInRealmResponse {
6720 pub(crate) _empty: fidl_next::wire::EmptyStruct,
6721 }
6722
6723 static_assertions::const_assert_eq!(
6724 std::mem::size_of::<StorageAdminListStorageInRealmResponse>(),
6725 1
6726 );
6727 static_assertions::const_assert_eq!(
6728 std::mem::align_of::<StorageAdminListStorageInRealmResponse>(),
6729 1
6730 );
6731
6732 impl ::fidl_next::Constrained for StorageAdminListStorageInRealmResponse {
6733 type Constraint = ();
6734
6735 fn validate(
6736 _: ::fidl_next::Slot<'_, Self>,
6737 _: Self::Constraint,
6738 ) -> Result<(), ::fidl_next::ValidationError> {
6739 Ok(())
6740 }
6741 }
6742
6743 unsafe impl ::fidl_next::Wire for StorageAdminListStorageInRealmResponse {
6744 type Narrowed<'de> = StorageAdminListStorageInRealmResponse;
6745
6746 #[inline]
6747 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6748 ::fidl_next::munge! {
6749 let Self {
6750
6751 _empty,
6752
6753
6754 } = &mut *out_;
6755 }
6756 }
6757 }
6758
6759 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminListStorageInRealmResponse
6760 where
6761 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6762 {
6763 fn decode(
6764 slot_: ::fidl_next::Slot<'_, Self>,
6765 decoder_: &mut ___D,
6766 _: (),
6767 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6768 ::fidl_next::munge! {
6769 let Self {
6770
6771 mut _empty,
6772
6773
6774 } = slot_;
6775 }
6776
6777 if _empty.as_bytes() != &[0u8] {
6778 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
6779 }
6780
6781 Ok(())
6782 }
6783 }
6784
6785 impl ::fidl_next::IntoNatural for StorageAdminListStorageInRealmResponse {
6786 type Natural = crate::natural::StorageAdminListStorageInRealmResponse;
6787 }
6788
6789 #[derive(Clone, Debug)]
6791 #[repr(C)]
6792 pub struct StorageAdminOpenComponentStorageByIdResponse {
6793 pub(crate) _empty: fidl_next::wire::EmptyStruct,
6794 }
6795
6796 static_assertions::const_assert_eq!(
6797 std::mem::size_of::<StorageAdminOpenComponentStorageByIdResponse>(),
6798 1
6799 );
6800 static_assertions::const_assert_eq!(
6801 std::mem::align_of::<StorageAdminOpenComponentStorageByIdResponse>(),
6802 1
6803 );
6804
6805 impl ::fidl_next::Constrained for StorageAdminOpenComponentStorageByIdResponse {
6806 type Constraint = ();
6807
6808 fn validate(
6809 _: ::fidl_next::Slot<'_, Self>,
6810 _: Self::Constraint,
6811 ) -> Result<(), ::fidl_next::ValidationError> {
6812 Ok(())
6813 }
6814 }
6815
6816 unsafe impl ::fidl_next::Wire for StorageAdminOpenComponentStorageByIdResponse {
6817 type Narrowed<'de> = StorageAdminOpenComponentStorageByIdResponse;
6818
6819 #[inline]
6820 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6821 ::fidl_next::munge! {
6822 let Self {
6823
6824 _empty,
6825
6826
6827 } = &mut *out_;
6828 }
6829 }
6830 }
6831
6832 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminOpenComponentStorageByIdResponse
6833 where
6834 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6835 {
6836 fn decode(
6837 slot_: ::fidl_next::Slot<'_, Self>,
6838 decoder_: &mut ___D,
6839 _: (),
6840 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6841 ::fidl_next::munge! {
6842 let Self {
6843
6844 mut _empty,
6845
6846
6847 } = slot_;
6848 }
6849
6850 if _empty.as_bytes() != &[0u8] {
6851 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
6852 }
6853
6854 Ok(())
6855 }
6856 }
6857
6858 impl ::fidl_next::IntoNatural for StorageAdminOpenComponentStorageByIdResponse {
6859 type Natural = crate::natural::StorageAdminOpenComponentStorageByIdResponse;
6860 }
6861
6862 #[derive(Debug)]
6864 #[repr(C)]
6865 pub struct StorageAdminDeleteComponentStorageRequest<'de> {
6866 pub relative_moniker: ::fidl_next::wire::String<'de>,
6867 }
6868
6869 static_assertions::const_assert_eq!(
6870 std::mem::size_of::<StorageAdminDeleteComponentStorageRequest<'_>>(),
6871 16
6872 );
6873 static_assertions::const_assert_eq!(
6874 std::mem::align_of::<StorageAdminDeleteComponentStorageRequest<'_>>(),
6875 8
6876 );
6877
6878 static_assertions::const_assert_eq!(
6879 std::mem::offset_of!(StorageAdminDeleteComponentStorageRequest<'_>, relative_moniker),
6880 0
6881 );
6882
6883 impl ::fidl_next::Constrained for StorageAdminDeleteComponentStorageRequest<'_> {
6884 type Constraint = ();
6885
6886 fn validate(
6887 _: ::fidl_next::Slot<'_, Self>,
6888 _: Self::Constraint,
6889 ) -> Result<(), ::fidl_next::ValidationError> {
6890 Ok(())
6891 }
6892 }
6893
6894 unsafe impl ::fidl_next::Wire for StorageAdminDeleteComponentStorageRequest<'static> {
6895 type Narrowed<'de> = StorageAdminDeleteComponentStorageRequest<'de>;
6896
6897 #[inline]
6898 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6899 ::fidl_next::munge! {
6900 let Self {
6901
6902 relative_moniker,
6903
6904 } = &mut *out_;
6905 }
6906
6907 ::fidl_next::Wire::zero_padding(relative_moniker);
6908 }
6909 }
6910
6911 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StorageAdminDeleteComponentStorageRequest<'de>
6912 where
6913 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6914 ___D: ::fidl_next::Decoder<'de>,
6915 {
6916 fn decode(
6917 slot_: ::fidl_next::Slot<'_, Self>,
6918 decoder_: &mut ___D,
6919 _: (),
6920 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6921 ::fidl_next::munge! {
6922 let Self {
6923
6924 mut relative_moniker,
6925
6926 } = slot_;
6927 }
6928
6929 let _field = relative_moniker.as_mut();
6930 ::fidl_next::Constrained::validate(_field, 4096)?;
6931 ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_, 4096)?;
6932
6933 let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
6934
6935 if relative_moniker.len() > 4096 {
6936 return Err(::fidl_next::DecodeError::VectorTooLong {
6937 size: relative_moniker.len() as u64,
6938 limit: 4096,
6939 });
6940 }
6941
6942 Ok(())
6943 }
6944 }
6945
6946 impl<'de> ::fidl_next::IntoNatural for StorageAdminDeleteComponentStorageRequest<'de> {
6947 type Natural = crate::natural::StorageAdminDeleteComponentStorageRequest;
6948 }
6949
6950 #[derive(Clone, Debug)]
6952 #[repr(C)]
6953 pub struct StorageAdminDeleteComponentStorageResponse {
6954 pub(crate) _empty: fidl_next::wire::EmptyStruct,
6955 }
6956
6957 static_assertions::const_assert_eq!(
6958 std::mem::size_of::<StorageAdminDeleteComponentStorageResponse>(),
6959 1
6960 );
6961 static_assertions::const_assert_eq!(
6962 std::mem::align_of::<StorageAdminDeleteComponentStorageResponse>(),
6963 1
6964 );
6965
6966 impl ::fidl_next::Constrained for StorageAdminDeleteComponentStorageResponse {
6967 type Constraint = ();
6968
6969 fn validate(
6970 _: ::fidl_next::Slot<'_, Self>,
6971 _: Self::Constraint,
6972 ) -> Result<(), ::fidl_next::ValidationError> {
6973 Ok(())
6974 }
6975 }
6976
6977 unsafe impl ::fidl_next::Wire for StorageAdminDeleteComponentStorageResponse {
6978 type Narrowed<'de> = StorageAdminDeleteComponentStorageResponse;
6979
6980 #[inline]
6981 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6982 ::fidl_next::munge! {
6983 let Self {
6984
6985 _empty,
6986
6987
6988 } = &mut *out_;
6989 }
6990 }
6991 }
6992
6993 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminDeleteComponentStorageResponse
6994 where
6995 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6996 {
6997 fn decode(
6998 slot_: ::fidl_next::Slot<'_, Self>,
6999 decoder_: &mut ___D,
7000 _: (),
7001 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7002 ::fidl_next::munge! {
7003 let Self {
7004
7005 mut _empty,
7006
7007
7008 } = slot_;
7009 }
7010
7011 if _empty.as_bytes() != &[0u8] {
7012 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
7013 }
7014
7015 Ok(())
7016 }
7017 }
7018
7019 impl ::fidl_next::IntoNatural for StorageAdminDeleteComponentStorageResponse {
7020 type Natural = crate::natural::StorageAdminDeleteComponentStorageResponse;
7021 }
7022
7023 #[repr(C)]
7025 pub struct StorageStatus<'de> {
7026 pub(crate) table: ::fidl_next::wire::Table<'de>,
7027 }
7028
7029 impl<'de> Drop for StorageStatus<'de> {
7030 fn drop(&mut self) {
7031 let _ = self
7032 .table
7033 .get(1)
7034 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
7035
7036 let _ = self
7037 .table
7038 .get(2)
7039 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
7040 }
7041 }
7042
7043 impl ::fidl_next::Constrained for StorageStatus<'_> {
7044 type Constraint = ();
7045
7046 fn validate(
7047 _: ::fidl_next::Slot<'_, Self>,
7048 _: Self::Constraint,
7049 ) -> Result<(), ::fidl_next::ValidationError> {
7050 Ok(())
7051 }
7052 }
7053
7054 unsafe impl ::fidl_next::Wire for StorageStatus<'static> {
7055 type Narrowed<'de> = StorageStatus<'de>;
7056
7057 #[inline]
7058 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7059 ::fidl_next::munge!(let Self { table } = out);
7060 ::fidl_next::wire::Table::zero_padding(table);
7061 }
7062 }
7063
7064 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StorageStatus<'de>
7065 where
7066 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7067 {
7068 fn decode(
7069 slot: ::fidl_next::Slot<'_, Self>,
7070 decoder: &mut ___D,
7071 _: (),
7072 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7073 ::fidl_next::munge!(let Self { table } = slot);
7074
7075 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7076 match ordinal {
7077 0 => unsafe { ::core::hint::unreachable_unchecked() },
7078
7079 1 => {
7080 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
7081 slot.as_mut(),
7082 decoder,
7083 (),
7084 )?;
7085
7086 Ok(())
7087 }
7088
7089 2 => {
7090 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
7091 slot.as_mut(),
7092 decoder,
7093 (),
7094 )?;
7095
7096 Ok(())
7097 }
7098
7099 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7100 }
7101 })
7102 }
7103 }
7104
7105 impl<'de> StorageStatus<'de> {
7106 pub fn total_size(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
7107 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7108 }
7109
7110 pub fn used_size(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
7111 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7112 }
7113 }
7114
7115 impl<'de> ::core::fmt::Debug for StorageStatus<'de> {
7116 fn fmt(
7117 &self,
7118 f: &mut ::core::fmt::Formatter<'_>,
7119 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7120 f.debug_struct("StorageStatus")
7121 .field("total_size", &self.total_size())
7122 .field("used_size", &self.used_size())
7123 .finish()
7124 }
7125 }
7126
7127 impl<'de> ::fidl_next::IntoNatural for StorageStatus<'de> {
7128 type Natural = crate::natural::StorageStatus;
7129 }
7130
7131 #[derive(Clone, Debug)]
7133 #[repr(C)]
7134 pub struct StorageAdminDeleteAllStorageContentsResponse {
7135 pub(crate) _empty: fidl_next::wire::EmptyStruct,
7136 }
7137
7138 static_assertions::const_assert_eq!(
7139 std::mem::size_of::<StorageAdminDeleteAllStorageContentsResponse>(),
7140 1
7141 );
7142 static_assertions::const_assert_eq!(
7143 std::mem::align_of::<StorageAdminDeleteAllStorageContentsResponse>(),
7144 1
7145 );
7146
7147 impl ::fidl_next::Constrained for StorageAdminDeleteAllStorageContentsResponse {
7148 type Constraint = ();
7149
7150 fn validate(
7151 _: ::fidl_next::Slot<'_, Self>,
7152 _: Self::Constraint,
7153 ) -> Result<(), ::fidl_next::ValidationError> {
7154 Ok(())
7155 }
7156 }
7157
7158 unsafe impl ::fidl_next::Wire for StorageAdminDeleteAllStorageContentsResponse {
7159 type Narrowed<'de> = StorageAdminDeleteAllStorageContentsResponse;
7160
7161 #[inline]
7162 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7163 ::fidl_next::munge! {
7164 let Self {
7165
7166 _empty,
7167
7168
7169 } = &mut *out_;
7170 }
7171 }
7172 }
7173
7174 unsafe impl<___D> ::fidl_next::Decode<___D> for StorageAdminDeleteAllStorageContentsResponse
7175 where
7176 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7177 {
7178 fn decode(
7179 slot_: ::fidl_next::Slot<'_, Self>,
7180 decoder_: &mut ___D,
7181 _: (),
7182 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7183 ::fidl_next::munge! {
7184 let Self {
7185
7186 mut _empty,
7187
7188
7189 } = slot_;
7190 }
7191
7192 if _empty.as_bytes() != &[0u8] {
7193 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
7194 }
7195
7196 Ok(())
7197 }
7198 }
7199
7200 impl ::fidl_next::IntoNatural for StorageAdminDeleteAllStorageContentsResponse {
7201 type Natural = crate::natural::StorageAdminDeleteAllStorageContentsResponse;
7202 }
7203
7204 #[derive(Debug)]
7206 #[repr(C)]
7207 pub struct StorageIteratorNextResponse<'de> {
7208 pub relative_monikers: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
7209 }
7210
7211 static_assertions::const_assert_eq!(std::mem::size_of::<StorageIteratorNextResponse<'_>>(), 16);
7212 static_assertions::const_assert_eq!(std::mem::align_of::<StorageIteratorNextResponse<'_>>(), 8);
7213
7214 static_assertions::const_assert_eq!(
7215 std::mem::offset_of!(StorageIteratorNextResponse<'_>, relative_monikers),
7216 0
7217 );
7218
7219 impl ::fidl_next::Constrained for StorageIteratorNextResponse<'_> {
7220 type Constraint = ();
7221
7222 fn validate(
7223 _: ::fidl_next::Slot<'_, Self>,
7224 _: Self::Constraint,
7225 ) -> Result<(), ::fidl_next::ValidationError> {
7226 Ok(())
7227 }
7228 }
7229
7230 unsafe impl ::fidl_next::Wire for StorageIteratorNextResponse<'static> {
7231 type Narrowed<'de> = StorageIteratorNextResponse<'de>;
7232
7233 #[inline]
7234 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7235 ::fidl_next::munge! {
7236 let Self {
7237
7238 relative_monikers,
7239
7240 } = &mut *out_;
7241 }
7242
7243 ::fidl_next::Wire::zero_padding(relative_monikers);
7244 }
7245 }
7246
7247 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StorageIteratorNextResponse<'de>
7248 where
7249 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7250 ___D: ::fidl_next::Decoder<'de>,
7251 {
7252 fn decode(
7253 slot_: ::fidl_next::Slot<'_, Self>,
7254 decoder_: &mut ___D,
7255 _: (),
7256 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7257 ::fidl_next::munge! {
7258 let Self {
7259
7260 mut relative_monikers,
7261
7262 } = slot_;
7263 }
7264
7265 let _field = relative_monikers.as_mut();
7266 ::fidl_next::Constrained::validate(_field, (4294967295, 4096))?;
7267 ::fidl_next::Decode::decode(relative_monikers.as_mut(), decoder_, (4294967295, 4096))?;
7268
7269 Ok(())
7270 }
7271 }
7272
7273 impl<'de> ::fidl_next::IntoNatural for StorageIteratorNextResponse<'de> {
7274 type Natural = crate::natural::StorageIteratorNextResponse;
7275 }
7276
7277 pub type ChildName<'de> = ::fidl_next::wire::String<'de>;
7279
7280 pub type UrlScheme<'de> = ::fidl_next::wire::String<'de>;
7282}
7283
7284pub mod wire_optional {}
7285
7286pub mod generic {
7287
7288 pub struct ChildIteratorNextResponse<T0> {
7289 pub children: T0,
7290 }
7291
7292 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ChildIteratorNextResponse<'static>, ___E>
7293 for ChildIteratorNextResponse<T0>
7294 where
7295 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7296 ___E: ::fidl_next::Encoder,
7297 T0: ::fidl_next::Encode<
7298 ::fidl_next::wire::Vector<
7299 'static,
7300 ::fidl_next_common_fuchsia_component_decl::wire::ChildRef<'static>,
7301 >,
7302 ___E,
7303 >,
7304 {
7305 #[inline]
7306 fn encode(
7307 self,
7308 encoder_: &mut ___E,
7309 out_: &mut ::core::mem::MaybeUninit<crate::wire::ChildIteratorNextResponse<'static>>,
7310 _: (),
7311 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7312 ::fidl_next::munge! {
7313 let crate::wire::ChildIteratorNextResponse {
7314
7315 children,
7316
7317 } = out_;
7318 }
7319
7320 ::fidl_next::Encode::encode(self.children, encoder_, children, (128, ()))?;
7321
7322 Ok(())
7323 }
7324 }
7325
7326 pub struct ExecutionControllerOnStopRequest<T0> {
7327 pub stopped_payload: T0,
7328 }
7329
7330 unsafe impl<___E, T0>
7331 ::fidl_next::Encode<crate::wire::ExecutionControllerOnStopRequest<'static>, ___E>
7332 for ExecutionControllerOnStopRequest<T0>
7333 where
7334 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7335 ___E: ::fidl_next::Encoder,
7336 T0: ::fidl_next::Encode<crate::wire::StoppedPayload<'static>, ___E>,
7337 {
7338 #[inline]
7339 fn encode(
7340 self,
7341 encoder_: &mut ___E,
7342 out_: &mut ::core::mem::MaybeUninit<
7343 crate::wire::ExecutionControllerOnStopRequest<'static>,
7344 >,
7345 _: (),
7346 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7347 ::fidl_next::munge! {
7348 let crate::wire::ExecutionControllerOnStopRequest {
7349
7350 stopped_payload,
7351
7352 } = out_;
7353 }
7354
7355 ::fidl_next::Encode::encode(self.stopped_payload, encoder_, stopped_payload, ())?;
7356
7357 Ok(())
7358 }
7359 }
7360
7361 pub struct IntrospectorGetMonikerResponse<T0> {
7362 pub moniker: T0,
7363 }
7364
7365 unsafe impl<___E, T0>
7366 ::fidl_next::Encode<crate::wire::IntrospectorGetMonikerResponse<'static>, ___E>
7367 for IntrospectorGetMonikerResponse<T0>
7368 where
7369 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7370 ___E: ::fidl_next::Encoder,
7371 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
7372 {
7373 #[inline]
7374 fn encode(
7375 self,
7376 encoder_: &mut ___E,
7377 out_: &mut ::core::mem::MaybeUninit<
7378 crate::wire::IntrospectorGetMonikerResponse<'static>,
7379 >,
7380 _: (),
7381 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7382 ::fidl_next::munge! {
7383 let crate::wire::IntrospectorGetMonikerResponse {
7384
7385 moniker,
7386
7387 } = out_;
7388 }
7389
7390 ::fidl_next::Encode::encode(self.moniker, encoder_, moniker, 4096)?;
7391
7392 Ok(())
7393 }
7394 }
7395
7396 pub struct RealmDestroyChildRequest<T0> {
7397 pub child: T0,
7398 }
7399
7400 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::RealmDestroyChildRequest<'static>, ___E>
7401 for RealmDestroyChildRequest<T0>
7402 where
7403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7404 ___E: ::fidl_next::Encoder,
7405 T0: ::fidl_next::Encode<
7406 ::fidl_next_common_fuchsia_component_decl::wire::ChildRef<'static>,
7407 ___E,
7408 >,
7409 {
7410 #[inline]
7411 fn encode(
7412 self,
7413 encoder_: &mut ___E,
7414 out_: &mut ::core::mem::MaybeUninit<crate::wire::RealmDestroyChildRequest<'static>>,
7415 _: (),
7416 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7417 ::fidl_next::munge! {
7418 let crate::wire::RealmDestroyChildRequest {
7419
7420 child,
7421
7422 } = out_;
7423 }
7424
7425 ::fidl_next::Encode::encode(self.child, encoder_, child, ())?;
7426
7427 Ok(())
7428 }
7429 }
7430
7431 pub struct StorageAdminDeleteComponentStorageRequest<T0> {
7432 pub relative_moniker: T0,
7433 }
7434
7435 unsafe impl<___E, T0>
7436 ::fidl_next::Encode<crate::wire::StorageAdminDeleteComponentStorageRequest<'static>, ___E>
7437 for StorageAdminDeleteComponentStorageRequest<T0>
7438 where
7439 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7440 ___E: ::fidl_next::Encoder,
7441 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
7442 {
7443 #[inline]
7444 fn encode(
7445 self,
7446 encoder_: &mut ___E,
7447 out_: &mut ::core::mem::MaybeUninit<
7448 crate::wire::StorageAdminDeleteComponentStorageRequest<'static>,
7449 >,
7450 _: (),
7451 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7452 ::fidl_next::munge! {
7453 let crate::wire::StorageAdminDeleteComponentStorageRequest {
7454
7455 relative_moniker,
7456
7457 } = out_;
7458 }
7459
7460 ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker, 4096)?;
7461
7462 Ok(())
7463 }
7464 }
7465
7466 pub struct StorageIteratorNextResponse<T0> {
7467 pub relative_monikers: T0,
7468 }
7469
7470 unsafe impl<___E, T0>
7471 ::fidl_next::Encode<crate::wire::StorageIteratorNextResponse<'static>, ___E>
7472 for StorageIteratorNextResponse<T0>
7473 where
7474 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7475 ___E: ::fidl_next::Encoder,
7476 T0: ::fidl_next::Encode<
7477 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
7478 ___E,
7479 >,
7480 {
7481 #[inline]
7482 fn encode(
7483 self,
7484 encoder_: &mut ___E,
7485 out_: &mut ::core::mem::MaybeUninit<crate::wire::StorageIteratorNextResponse<'static>>,
7486 _: (),
7487 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7488 ::fidl_next::munge! {
7489 let crate::wire::StorageIteratorNextResponse {
7490
7491 relative_monikers,
7492
7493 } = out_;
7494 }
7495
7496 ::fidl_next::Encode::encode(
7497 self.relative_monikers,
7498 encoder_,
7499 relative_monikers,
7500 (4294967295, 4096),
7501 )?;
7502
7503 Ok(())
7504 }
7505 }
7506}
7507
7508pub use self::natural::*;
7509
7510#[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"]
7512#[derive(PartialEq, Debug)]
7513pub struct Binder;
7514
7515impl ::fidl_next::Discoverable for Binder {
7516 const PROTOCOL_NAME: &'static str = "fuchsia.component.Binder";
7517}
7518
7519#[cfg(target_os = "fuchsia")]
7520impl ::fidl_next::HasTransport for Binder {
7521 type Transport = ::fidl_next::fuchsia::zx::Channel;
7522}
7523
7524pub mod binder {
7525 pub mod prelude {
7526 pub use crate::{Binder, BinderClientHandler, BinderServerHandler, binder};
7527 }
7528
7529 mod ___detail {
7530 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Binder
7531 where
7532 ___T: ::fidl_next::Transport,
7533 {
7534 type Client = BinderClient<___T>;
7535 type Server = BinderServer<___T>;
7536 }
7537
7538 #[repr(transparent)]
7540 pub struct BinderClient<___T: ::fidl_next::Transport> {
7541 #[allow(dead_code)]
7542 client: ::fidl_next::protocol::Client<___T>,
7543 }
7544
7545 impl<___T> BinderClient<___T> where ___T: ::fidl_next::Transport {}
7546
7547 #[repr(transparent)]
7549 pub struct BinderServer<___T: ::fidl_next::Transport> {
7550 server: ::fidl_next::protocol::Server<___T>,
7551 }
7552
7553 impl<___T> BinderServer<___T> where ___T: ::fidl_next::Transport {}
7554 }
7555}
7556
7557pub trait BinderClientHandler<
7561 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7562 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7563>
7564{
7565}
7566
7567impl<___T> BinderClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport
7568{}
7569
7570impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Binder
7571where
7572 ___H: BinderClientHandler<___T> + ::core::marker::Send,
7573 ___T: ::fidl_next::Transport,
7574{
7575 async fn on_event(
7576 handler: &mut ___H,
7577 ordinal: u64,
7578 flexibility: ::fidl_next::protocol::Flexibility,
7579 body: ::fidl_next::Body<___T>,
7580 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7581 match ordinal {
7582 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7583 }
7584 }
7585}
7586
7587pub trait BinderServerHandler<
7591 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7592 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7593>
7594{
7595}
7596
7597impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Binder
7598where
7599 ___H: BinderServerHandler<___T> + ::core::marker::Send,
7600 ___T: ::fidl_next::Transport,
7601{
7602 async fn on_one_way(
7603 handler: &mut ___H,
7604 ordinal: u64,
7605 flexibility: ::fidl_next::protocol::Flexibility,
7606 body: ::fidl_next::Body<___T>,
7607 ) -> ::core::result::Result<
7608 (),
7609 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7610 > {
7611 match ordinal {
7612 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7613 }
7614 }
7615
7616 async fn on_two_way(
7617 handler: &mut ___H,
7618 ordinal: u64,
7619 flexibility: ::fidl_next::protocol::Flexibility,
7620 body: ::fidl_next::Body<___T>,
7621 responder: ::fidl_next::protocol::Responder<___T>,
7622 ) -> ::core::result::Result<
7623 (),
7624 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7625 > {
7626 match ordinal {
7627 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7628 }
7629 }
7630}
7631
7632pub const MAX_NAME_LENGTH: u64 = 255 as u64;
7633
7634#[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"]
7635pub const MAX_CHILD_COUNT: u32 = 128 as u32;
7636
7637#[doc = " A protocol to iterate over the list of children in a realm.\n"]
7639#[derive(PartialEq, Debug)]
7640pub struct ChildIterator;
7641
7642#[cfg(target_os = "fuchsia")]
7643impl ::fidl_next::HasTransport for ChildIterator {
7644 type Transport = ::fidl_next::fuchsia::zx::Channel;
7645}
7646
7647pub mod child_iterator {
7648 pub mod prelude {
7649 pub use crate::{
7650 ChildIterator, ChildIteratorClientHandler, ChildIteratorServerHandler, child_iterator,
7651 };
7652
7653 pub use crate::natural::ChildIteratorNextResponse;
7654 }
7655
7656 pub struct Next;
7657
7658 impl ::fidl_next::Method for Next {
7659 const ORDINAL: u64 = 4676077302722137352;
7660 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7661 ::fidl_next::protocol::Flexibility::Strict;
7662
7663 type Protocol = crate::ChildIterator;
7664
7665 type Request = ();
7666 }
7667
7668 impl ::fidl_next::TwoWayMethod for Next {
7669 type Response = crate::wire::ChildIteratorNextResponse<'static>;
7670 }
7671
7672 impl<___R> ::fidl_next::Respond<___R> for Next {
7673 type Output = crate::generic::ChildIteratorNextResponse<___R>;
7674
7675 fn respond(response: ___R) -> Self::Output {
7676 crate::generic::ChildIteratorNextResponse { children: response }
7677 }
7678 }
7679
7680 mod ___detail {
7681 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ChildIterator
7682 where
7683 ___T: ::fidl_next::Transport,
7684 {
7685 type Client = ChildIteratorClient<___T>;
7686 type Server = ChildIteratorServer<___T>;
7687 }
7688
7689 #[repr(transparent)]
7691 pub struct ChildIteratorClient<___T: ::fidl_next::Transport> {
7692 #[allow(dead_code)]
7693 client: ::fidl_next::protocol::Client<___T>,
7694 }
7695
7696 impl<___T> ChildIteratorClient<___T>
7697 where
7698 ___T: ::fidl_next::Transport,
7699 {
7700 #[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"]
7701 pub fn next(&self) -> ::fidl_next::TwoWayFuture<'_, super::Next, ___T> {
7702 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7703 4676077302722137352,
7704 <super::Next as ::fidl_next::Method>::FLEXIBILITY,
7705 (),
7706 ))
7707 }
7708 }
7709
7710 #[repr(transparent)]
7712 pub struct ChildIteratorServer<___T: ::fidl_next::Transport> {
7713 server: ::fidl_next::protocol::Server<___T>,
7714 }
7715
7716 impl<___T> ChildIteratorServer<___T> where ___T: ::fidl_next::Transport {}
7717 }
7718}
7719
7720pub trait ChildIteratorClientHandler<
7724 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7725 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7726>
7727{
7728}
7729
7730impl<___T> ChildIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents where
7731 ___T: ::fidl_next::Transport
7732{
7733}
7734
7735impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ChildIterator
7736where
7737 ___H: ChildIteratorClientHandler<___T> + ::core::marker::Send,
7738 ___T: ::fidl_next::Transport,
7739{
7740 async fn on_event(
7741 handler: &mut ___H,
7742 ordinal: u64,
7743 flexibility: ::fidl_next::protocol::Flexibility,
7744 body: ::fidl_next::Body<___T>,
7745 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7746 match ordinal {
7747 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7748 }
7749 }
7750}
7751
7752pub trait ChildIteratorServerHandler<
7756 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7757 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7758>
7759{
7760 #[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"]
7761 fn next(
7762 &mut self,
7763
7764 responder: ::fidl_next::Responder<child_iterator::Next, ___T>,
7765 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7766}
7767
7768impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ChildIterator
7769where
7770 ___H: ChildIteratorServerHandler<___T> + ::core::marker::Send,
7771 ___T: ::fidl_next::Transport,
7772{
7773 async fn on_one_way(
7774 handler: &mut ___H,
7775 ordinal: u64,
7776 flexibility: ::fidl_next::protocol::Flexibility,
7777 body: ::fidl_next::Body<___T>,
7778 ) -> ::core::result::Result<
7779 (),
7780 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7781 > {
7782 match ordinal {
7783 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7784 }
7785 }
7786
7787 async fn on_two_way(
7788 handler: &mut ___H,
7789 ordinal: u64,
7790 flexibility: ::fidl_next::protocol::Flexibility,
7791 body: ::fidl_next::Body<___T>,
7792 responder: ::fidl_next::protocol::Responder<___T>,
7793 ) -> ::core::result::Result<
7794 (),
7795 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7796 > {
7797 match ordinal {
7798 4676077302722137352 => {
7799 let responder = ::fidl_next::Responder::from_untyped(responder);
7800
7801 handler.next(responder).await;
7802 Ok(())
7803 }
7804
7805 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7806 }
7807 }
7808}
7809
7810#[doc = " The maximum number of handles that can be passed to a created component.\n"]
7811pub const MAX_HANDLE_COUNT: u32 = 128 as u32;
7812
7813pub const MAX_NAMESPACE_COUNT: u32 = 32 as u32;
7814
7815pub const MAX_PATH_LENGTH: u64 = 4095 as u64;
7816
7817#[doc = " The maximum number of dynamic offers that can target a created component.\n"]
7818pub const MAX_DYNAMIC_OFFER_COUNT: u32 = 128 as u32;
7819
7820pub const MAX_MONIKER_LENGTH: u32 = 4096 as u32;
7821
7822#[derive(PartialEq, Debug)]
7824pub struct ExecutionController;
7825
7826#[cfg(target_os = "fuchsia")]
7827impl ::fidl_next::HasTransport for ExecutionController {
7828 type Transport = ::fidl_next::fuchsia::zx::Channel;
7829}
7830
7831pub mod execution_controller {
7832 pub mod prelude {
7833 pub use crate::{
7834 ExecutionController, ExecutionControllerClientHandler,
7835 ExecutionControllerServerHandler, execution_controller,
7836 };
7837
7838 pub use crate::natural::ExecutionControllerOnStopRequest;
7839 }
7840
7841 pub struct Stop;
7842
7843 impl ::fidl_next::Method for Stop {
7844 const ORDINAL: u64 = 6256129817234858263;
7845 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7846 ::fidl_next::protocol::Flexibility::Flexible;
7847
7848 type Protocol = crate::ExecutionController;
7849
7850 type Request = ();
7851 }
7852
7853 pub struct OnStop;
7854
7855 impl ::fidl_next::Method for OnStop {
7856 const ORDINAL: u64 = 7121600095714604415;
7857 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7858 ::fidl_next::protocol::Flexibility::Flexible;
7859
7860 type Protocol = crate::ExecutionController;
7861
7862 type Request = crate::wire::ExecutionControllerOnStopRequest<'static>;
7863 }
7864
7865 mod ___detail {
7866 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ExecutionController
7867 where
7868 ___T: ::fidl_next::Transport,
7869 {
7870 type Client = ExecutionControllerClient<___T>;
7871 type Server = ExecutionControllerServer<___T>;
7872 }
7873
7874 #[repr(transparent)]
7876 pub struct ExecutionControllerClient<___T: ::fidl_next::Transport> {
7877 #[allow(dead_code)]
7878 client: ::fidl_next::protocol::Client<___T>,
7879 }
7880
7881 impl<___T> ExecutionControllerClient<___T>
7882 where
7883 ___T: ::fidl_next::Transport,
7884 {
7885 #[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"]
7886 pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
7887 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7888 6256129817234858263,
7889 <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
7890 (),
7891 ))
7892 }
7893 }
7894
7895 #[repr(transparent)]
7897 pub struct ExecutionControllerServer<___T: ::fidl_next::Transport> {
7898 server: ::fidl_next::protocol::Server<___T>,
7899 }
7900
7901 impl<___T> ExecutionControllerServer<___T>
7902 where
7903 ___T: ::fidl_next::Transport,
7904 {
7905 #[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"]
7906 pub fn on_stop(
7907 &self,
7908
7909 stopped_payload: impl ::fidl_next::Encode<
7910 crate::wire::StoppedPayload<'static>,
7911 <___T as ::fidl_next::Transport>::SendBuffer,
7912 >,
7913 ) -> ::fidl_next::SendFuture<'_, ___T>
7914 where
7915 <___T as ::fidl_next::Transport>::SendBuffer:
7916 ::fidl_next::encoder::InternalHandleEncoder,
7917 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7918 {
7919 self.on_stop_with(crate::generic::ExecutionControllerOnStopRequest {
7920 stopped_payload,
7921 })
7922 }
7923
7924 #[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"]
7925
7926 pub fn on_stop_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
7927 where
7928 ___R: ::fidl_next::Encode<
7929 <super::OnStop as ::fidl_next::Method>::Request,
7930 <___T as ::fidl_next::Transport>::SendBuffer,
7931 >,
7932 {
7933 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
7934 7121600095714604415,
7935 <super::OnStop as ::fidl_next::Method>::FLEXIBILITY,
7936 request,
7937 ))
7938 }
7939 }
7940 }
7941}
7942
7943pub trait ExecutionControllerClientHandler<
7947 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7948 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7949>
7950{
7951 #[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"]
7952 fn on_stop(
7953 &mut self,
7954
7955 request: ::fidl_next::Request<execution_controller::OnStop, ___T>,
7956 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7957
7958 fn on_unknown_interaction(
7959 &mut self,
7960 ordinal: u64,
7961 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7962 ::core::future::ready(())
7963 }
7964}
7965
7966impl<___T> ExecutionControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
7967where
7968 ___T: ::fidl_next::Transport,
7969{
7970 async fn on_stop(&mut self, _: ::fidl_next::Request<execution_controller::OnStop, ___T>) {}
7971
7972 async fn on_unknown_interaction(&mut self, _: u64) {}
7973}
7974
7975impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ExecutionController
7976where
7977 ___H: ExecutionControllerClientHandler<___T> + ::core::marker::Send,
7978 ___T: ::fidl_next::Transport,
7979 for<'de> crate::wire::ExecutionControllerOnStopRequest<'de>: ::fidl_next::Decode<
7980 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7981 Constraint = (),
7982 >,
7983{
7984 async fn on_event(
7985 handler: &mut ___H,
7986 ordinal: u64,
7987 flexibility: ::fidl_next::protocol::Flexibility,
7988 body: ::fidl_next::Body<___T>,
7989 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7990 match ordinal {
7991 7121600095714604415 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7992 Ok(decoded) => {
7993 handler.on_stop(::fidl_next::Request::from_decoded(decoded)).await;
7994 Ok(())
7995 }
7996 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7997 ordinal: 7121600095714604415,
7998 error,
7999 }),
8000 },
8001
8002 ordinal => {
8003 handler.on_unknown_interaction(ordinal).await;
8004 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
8005 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8006 } else {
8007 Ok(())
8008 }
8009 }
8010 }
8011 }
8012}
8013
8014pub trait ExecutionControllerServerHandler<
8018 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8019 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8020>
8021{
8022 #[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"]
8023 fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8024
8025 fn on_unknown_interaction(
8026 &mut self,
8027 ordinal: u64,
8028 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8029 ::core::future::ready(())
8030 }
8031}
8032
8033impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ExecutionController
8034where
8035 ___H: ExecutionControllerServerHandler<___T> + ::core::marker::Send,
8036 ___T: ::fidl_next::Transport,
8037{
8038 async fn on_one_way(
8039 handler: &mut ___H,
8040 ordinal: u64,
8041 flexibility: ::fidl_next::protocol::Flexibility,
8042 body: ::fidl_next::Body<___T>,
8043 ) -> ::core::result::Result<
8044 (),
8045 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8046 > {
8047 match ordinal {
8048 6256129817234858263 => {
8049 handler.stop().await;
8050 Ok(())
8051 }
8052
8053 ordinal => {
8054 handler.on_unknown_interaction(ordinal).await;
8055 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
8056 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8057 } else {
8058 Ok(())
8059 }
8060 }
8061 }
8062 }
8063
8064 async fn on_two_way(
8065 handler: &mut ___H,
8066 ordinal: u64,
8067 flexibility: ::fidl_next::protocol::Flexibility,
8068 body: ::fidl_next::Body<___T>,
8069 responder: ::fidl_next::protocol::Responder<___T>,
8070 ) -> ::core::result::Result<
8071 (),
8072 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8073 > {
8074 match ordinal {
8075 ordinal => {
8076 handler.on_unknown_interaction(ordinal).await;
8077 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
8078 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8079 } else {
8080 responder
8081 .respond(
8082 ordinal,
8083 flexibility,
8084 ::fidl_next::Flexible::<()>::FrameworkErr(
8085 ::fidl_next::FrameworkError::UnknownMethod,
8086 ),
8087 )
8088 .expect("encoding a framework error should never fail")
8089 .await?;
8090 Ok(())
8091 }
8092 }
8093 }
8094 }
8095}
8096
8097#[doc = " The maximum string length of a capability ID.\n This value is currently set arbitrarily.\n"]
8098pub const MAX_CAPABILITY_ID_LENGTH: u64 = 50 as u64;
8099
8100pub const MAX_CHILD_NAME_LENGTH: u32 = 1024 as u32;
8101
8102#[doc = " The maximum string length of an error description.\n"]
8103pub const MAX_ERROR_DESCRIPTION_LENGTH: u64 = 100 as u64;
8104
8105#[doc = " The maximum number of events that a receiver can listen to.\n"]
8106pub const MAX_NUM_EVENTS_RECEIVED: u64 = 100 as u64;
8107
8108#[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"]
8109pub const MAX_STORAGE_ID_LENGTH: u32 = 64 as u32;
8110
8111#[doc = " The maximum number of requests per event subscription.\n"]
8112pub const MAX_SUBSCRIPTION_REQUESTS: u32 = 2 as u32;
8113
8114pub const MAX_URL_SCHEME_LENGTH: u64 = 255 as u64;
8115
8116#[doc = " An iterator protocol for returning a set of components using a storage\n capability. See |StorageAdmin.ListStorageInRealm| for more information.\n"]
8118#[derive(PartialEq, Debug)]
8119pub struct StorageIterator;
8120
8121#[cfg(target_os = "fuchsia")]
8122impl ::fidl_next::HasTransport for StorageIterator {
8123 type Transport = ::fidl_next::fuchsia::zx::Channel;
8124}
8125
8126pub mod storage_iterator {
8127 pub mod prelude {
8128 pub use crate::{
8129 StorageIterator, StorageIteratorClientHandler, StorageIteratorServerHandler,
8130 storage_iterator,
8131 };
8132
8133 pub use crate::natural::StorageIteratorNextResponse;
8134 }
8135
8136 pub struct Next;
8137
8138 impl ::fidl_next::Method for Next {
8139 const ORDINAL: u64 = 8821181615713557362;
8140 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8141 ::fidl_next::protocol::Flexibility::Strict;
8142
8143 type Protocol = crate::StorageIterator;
8144
8145 type Request = ();
8146 }
8147
8148 impl ::fidl_next::TwoWayMethod for Next {
8149 type Response = crate::wire::StorageIteratorNextResponse<'static>;
8150 }
8151
8152 impl<___R> ::fidl_next::Respond<___R> for Next {
8153 type Output = crate::generic::StorageIteratorNextResponse<___R>;
8154
8155 fn respond(response: ___R) -> Self::Output {
8156 crate::generic::StorageIteratorNextResponse { relative_monikers: response }
8157 }
8158 }
8159
8160 mod ___detail {
8161 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::StorageIterator
8162 where
8163 ___T: ::fidl_next::Transport,
8164 {
8165 type Client = StorageIteratorClient<___T>;
8166 type Server = StorageIteratorServer<___T>;
8167 }
8168
8169 #[repr(transparent)]
8171 pub struct StorageIteratorClient<___T: ::fidl_next::Transport> {
8172 #[allow(dead_code)]
8173 client: ::fidl_next::protocol::Client<___T>,
8174 }
8175
8176 impl<___T> StorageIteratorClient<___T>
8177 where
8178 ___T: ::fidl_next::Transport,
8179 {
8180 #[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"]
8181 pub fn next(&self) -> ::fidl_next::TwoWayFuture<'_, super::Next, ___T> {
8182 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8183 8821181615713557362,
8184 <super::Next as ::fidl_next::Method>::FLEXIBILITY,
8185 (),
8186 ))
8187 }
8188 }
8189
8190 #[repr(transparent)]
8192 pub struct StorageIteratorServer<___T: ::fidl_next::Transport> {
8193 server: ::fidl_next::protocol::Server<___T>,
8194 }
8195
8196 impl<___T> StorageIteratorServer<___T> where ___T: ::fidl_next::Transport {}
8197 }
8198}
8199
8200pub trait StorageIteratorClientHandler<
8204 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8205 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8206>
8207{
8208}
8209
8210impl<___T> StorageIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents where
8211 ___T: ::fidl_next::Transport
8212{
8213}
8214
8215impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for StorageIterator
8216where
8217 ___H: StorageIteratorClientHandler<___T> + ::core::marker::Send,
8218 ___T: ::fidl_next::Transport,
8219{
8220 async fn on_event(
8221 handler: &mut ___H,
8222 ordinal: u64,
8223 flexibility: ::fidl_next::protocol::Flexibility,
8224 body: ::fidl_next::Body<___T>,
8225 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
8226 match ordinal {
8227 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8228 }
8229 }
8230}
8231
8232pub trait StorageIteratorServerHandler<
8236 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8237 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8238>
8239{
8240 #[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"]
8241 fn next(
8242 &mut self,
8243
8244 responder: ::fidl_next::Responder<storage_iterator::Next, ___T>,
8245 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8246}
8247
8248impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for StorageIterator
8249where
8250 ___H: StorageIteratorServerHandler<___T> + ::core::marker::Send,
8251 ___T: ::fidl_next::Transport,
8252{
8253 async fn on_one_way(
8254 handler: &mut ___H,
8255 ordinal: u64,
8256 flexibility: ::fidl_next::protocol::Flexibility,
8257 body: ::fidl_next::Body<___T>,
8258 ) -> ::core::result::Result<
8259 (),
8260 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8261 > {
8262 match ordinal {
8263 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8264 }
8265 }
8266
8267 async fn on_two_way(
8268 handler: &mut ___H,
8269 ordinal: u64,
8270 flexibility: ::fidl_next::protocol::Flexibility,
8271 body: ::fidl_next::Body<___T>,
8272 responder: ::fidl_next::protocol::Responder<___T>,
8273 ) -> ::core::result::Result<
8274 (),
8275 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8276 > {
8277 match ordinal {
8278 8821181615713557362 => {
8279 let responder = ::fidl_next::Responder::from_untyped(responder);
8280
8281 handler.next(responder).await;
8282 Ok(())
8283 }
8284
8285 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8286 }
8287 }
8288}
8289
8290pub mod compat {
8292
8293 #[cfg(target_os = "fuchsia")]
8294 pub type BinderProxy = ::fidl_next::Client<crate::Binder>;
8297
8298 impl ::fidl_next::CompatFrom<crate::Binder> for ::fidl_fuchsia_component::BinderMarker {
8299 fn compat_from(_: crate::Binder) -> Self {
8300 Self
8301 }
8302 }
8303
8304 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::BinderMarker> for crate::Binder {
8305 fn compat_from(_: ::fidl_fuchsia_component::BinderMarker) -> Self {
8306 Self
8307 }
8308 }
8309
8310 #[cfg(target_os = "fuchsia")]
8311
8312 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::BinderProxy> for crate::Binder {
8313 fn client_compat_from(
8314 proxy: ::fidl_fuchsia_component::BinderProxy,
8315 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
8316 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
8317 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
8318 ::fidl_next::ClientDispatcher::new(client_end)
8319 }
8320 }
8321
8322 impl ::fidl_next::CompatFrom<crate::ChildIteratorNextResponse>
8323 for ::fidl_fuchsia_component::ChildIteratorNextResponse
8324 {
8325 #[inline]
8326 fn compat_from(value: crate::ChildIteratorNextResponse) -> Self {
8327 Self { children: ::fidl_next::CompatFrom::compat_from(value.children) }
8328 }
8329 }
8330
8331 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ChildIteratorNextResponse>
8332 for crate::ChildIteratorNextResponse
8333 {
8334 #[inline]
8335 fn compat_from(value: ::fidl_fuchsia_component::ChildIteratorNextResponse) -> Self {
8336 Self { children: ::fidl_next::CompatFrom::compat_from(value.children) }
8337 }
8338 }
8339
8340 #[cfg(target_os = "fuchsia")]
8341 pub type ChildIteratorProxy = ::fidl_next::Client<crate::ChildIterator>;
8344
8345 impl ::fidl_next::CompatFrom<crate::ChildIterator>
8346 for ::fidl_fuchsia_component::ChildIteratorMarker
8347 {
8348 fn compat_from(_: crate::ChildIterator) -> Self {
8349 Self
8350 }
8351 }
8352
8353 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ChildIteratorMarker>
8354 for crate::ChildIterator
8355 {
8356 fn compat_from(_: ::fidl_fuchsia_component::ChildIteratorMarker) -> Self {
8357 Self
8358 }
8359 }
8360
8361 #[cfg(target_os = "fuchsia")]
8362
8363 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ChildIteratorProxy>
8364 for crate::ChildIterator
8365 {
8366 fn client_compat_from(
8367 proxy: ::fidl_fuchsia_component::ChildIteratorProxy,
8368 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
8369 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
8370 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
8371 ::fidl_next::ClientDispatcher::new(client_end)
8372 }
8373 }
8374
8375 impl ::fidl_next::CompatFrom<crate::Error> for ::fidl_fuchsia_component::Error {
8376 fn compat_from(value: crate::Error) -> Self {
8377 match value {
8378 crate::Error::Internal => Self::Internal,
8379
8380 crate::Error::InvalidArguments => Self::InvalidArguments,
8381
8382 crate::Error::Unsupported => Self::Unsupported,
8383
8384 crate::Error::AccessDenied => Self::AccessDenied,
8385
8386 crate::Error::InstanceNotFound => Self::InstanceNotFound,
8387
8388 crate::Error::InstanceAlreadyExists => Self::InstanceAlreadyExists,
8389
8390 crate::Error::InstanceCannotStart => Self::InstanceCannotStart,
8391
8392 crate::Error::InstanceCannotResolve => Self::InstanceCannotResolve,
8393
8394 crate::Error::CollectionNotFound => Self::CollectionNotFound,
8395
8396 crate::Error::ResourceUnavailable => Self::ResourceUnavailable,
8397
8398 crate::Error::InstanceDied => Self::InstanceDied,
8399
8400 crate::Error::ResourceNotFound => Self::ResourceNotFound,
8401
8402 crate::Error::InstanceCannotUnresolve => Self::InstanceCannotUnresolve,
8403
8404 crate::Error::InstanceAlreadyStarted => Self::InstanceAlreadyStarted,
8405
8406 crate::Error::DependencyCycle => Self::DependencyCycle,
8407
8408 crate::Error::UnknownOrdinal_(unknown_ordinal) => {
8409 Self::__SourceBreaking { unknown_ordinal }
8410 }
8411 }
8412 }
8413 }
8414
8415 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::Error> for crate::Error {
8416 fn compat_from(value: ::fidl_fuchsia_component::Error) -> Self {
8417 match value {
8418 ::fidl_fuchsia_component::Error::Internal => Self::Internal,
8419
8420 ::fidl_fuchsia_component::Error::InvalidArguments => Self::InvalidArguments,
8421
8422 ::fidl_fuchsia_component::Error::Unsupported => Self::Unsupported,
8423
8424 ::fidl_fuchsia_component::Error::AccessDenied => Self::AccessDenied,
8425
8426 ::fidl_fuchsia_component::Error::InstanceNotFound => Self::InstanceNotFound,
8427
8428 ::fidl_fuchsia_component::Error::InstanceAlreadyExists => {
8429 Self::InstanceAlreadyExists
8430 }
8431
8432 ::fidl_fuchsia_component::Error::InstanceCannotStart => Self::InstanceCannotStart,
8433
8434 ::fidl_fuchsia_component::Error::InstanceCannotResolve => {
8435 Self::InstanceCannotResolve
8436 }
8437
8438 ::fidl_fuchsia_component::Error::CollectionNotFound => Self::CollectionNotFound,
8439
8440 ::fidl_fuchsia_component::Error::ResourceUnavailable => Self::ResourceUnavailable,
8441
8442 ::fidl_fuchsia_component::Error::InstanceDied => Self::InstanceDied,
8443
8444 ::fidl_fuchsia_component::Error::ResourceNotFound => Self::ResourceNotFound,
8445
8446 ::fidl_fuchsia_component::Error::InstanceCannotUnresolve => {
8447 Self::InstanceCannotUnresolve
8448 }
8449
8450 ::fidl_fuchsia_component::Error::InstanceAlreadyStarted => {
8451 Self::InstanceAlreadyStarted
8452 }
8453
8454 ::fidl_fuchsia_component::Error::DependencyCycle => Self::DependencyCycle,
8455
8456 ::fidl_fuchsia_component::Error::__SourceBreaking { unknown_ordinal: value } => {
8457 Self::UnknownOrdinal_(value)
8458 }
8459 }
8460 }
8461 }
8462
8463 impl ::fidl_next::CompatFrom<crate::DeletionError> for ::fidl_fuchsia_component::DeletionError {
8464 fn compat_from(value: crate::DeletionError) -> Self {
8465 match value {
8466 crate::DeletionError::Connection => Self::Connection,
8467
8468 crate::DeletionError::Protocol => Self::Protocol,
8469
8470 crate::DeletionError::NoneAvailable => Self::NoneAvailable,
8471
8472 crate::DeletionError::Unsupported => Self::Unsupported,
8473 }
8474 }
8475 }
8476
8477 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DeletionError> for crate::DeletionError {
8478 fn compat_from(value: ::fidl_fuchsia_component::DeletionError) -> Self {
8479 match value {
8480 ::fidl_fuchsia_component::DeletionError::Connection => Self::Connection,
8481
8482 ::fidl_fuchsia_component::DeletionError::Protocol => Self::Protocol,
8483
8484 ::fidl_fuchsia_component::DeletionError::NoneAvailable => Self::NoneAvailable,
8485
8486 ::fidl_fuchsia_component::DeletionError::Unsupported => Self::Unsupported,
8487 }
8488 }
8489 }
8490
8491 impl ::fidl_next::CompatFrom<crate::DestroyedPayload>
8492 for ::fidl_fuchsia_component::DestroyedPayload
8493 {
8494 fn compat_from(value: crate::DestroyedPayload) -> Self {
8495 Self { __source_breaking: ::fidl::marker::SourceBreaking }
8496 }
8497 }
8498
8499 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DestroyedPayload>
8500 for crate::DestroyedPayload
8501 {
8502 fn compat_from(value: ::fidl_fuchsia_component::DestroyedPayload) -> Self {
8503 Self {}
8504 }
8505 }
8506
8507 impl ::fidl_next::CompatFrom<crate::DiscoveredPayload>
8508 for ::fidl_fuchsia_component::DiscoveredPayload
8509 {
8510 fn compat_from(value: crate::DiscoveredPayload) -> Self {
8511 Self { __source_breaking: ::fidl::marker::SourceBreaking }
8512 }
8513 }
8514
8515 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DiscoveredPayload>
8516 for crate::DiscoveredPayload
8517 {
8518 fn compat_from(value: ::fidl_fuchsia_component::DiscoveredPayload) -> Self {
8519 Self {}
8520 }
8521 }
8522
8523 impl ::fidl_next::CompatFrom<crate::PurgedPayload> for ::fidl_fuchsia_component::PurgedPayload {
8524 fn compat_from(value: crate::PurgedPayload) -> Self {
8525 Self { __source_breaking: ::fidl::marker::SourceBreaking }
8526 }
8527 }
8528
8529 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::PurgedPayload> for crate::PurgedPayload {
8530 fn compat_from(value: ::fidl_fuchsia_component::PurgedPayload) -> Self {
8531 Self {}
8532 }
8533 }
8534
8535 impl ::fidl_next::CompatFrom<crate::ResolvedPayload> for ::fidl_fuchsia_component::ResolvedPayload {
8536 fn compat_from(value: crate::ResolvedPayload) -> Self {
8537 Self { __source_breaking: ::fidl::marker::SourceBreaking }
8538 }
8539 }
8540
8541 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ResolvedPayload> for crate::ResolvedPayload {
8542 fn compat_from(value: ::fidl_fuchsia_component::ResolvedPayload) -> Self {
8543 Self {}
8544 }
8545 }
8546
8547 impl ::fidl_next::CompatFrom<crate::StartedPayload> for ::fidl_fuchsia_component::StartedPayload {
8548 fn compat_from(value: crate::StartedPayload) -> Self {
8549 Self { __source_breaking: ::fidl::marker::SourceBreaking }
8550 }
8551 }
8552
8553 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StartedPayload> for crate::StartedPayload {
8554 fn compat_from(value: ::fidl_fuchsia_component::StartedPayload) -> Self {
8555 Self {}
8556 }
8557 }
8558
8559 impl ::fidl_next::CompatFrom<crate::UnresolvedPayload>
8560 for ::fidl_fuchsia_component::UnresolvedPayload
8561 {
8562 fn compat_from(value: crate::UnresolvedPayload) -> Self {
8563 Self { __source_breaking: ::fidl::marker::SourceBreaking }
8564 }
8565 }
8566
8567 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::UnresolvedPayload>
8568 for crate::UnresolvedPayload
8569 {
8570 fn compat_from(value: ::fidl_fuchsia_component::UnresolvedPayload) -> Self {
8571 Self {}
8572 }
8573 }
8574
8575 impl ::fidl_next::CompatFrom<crate::EventType> for ::fidl_fuchsia_component::EventType {
8576 fn compat_from(value: crate::EventType) -> Self {
8577 match value {
8578 crate::EventType::CapabilityRequested => Self::CapabilityRequested,
8579
8580 crate::EventType::Discovered => Self::Discovered,
8581
8582 crate::EventType::Destroyed => Self::Destroyed,
8583
8584 crate::EventType::Resolved => Self::Resolved,
8585
8586 crate::EventType::Started => Self::Started,
8587
8588 crate::EventType::Stopped => Self::Stopped,
8589
8590 crate::EventType::DebugStarted => Self::DebugStarted,
8591
8592 crate::EventType::Unresolved => Self::Unresolved,
8593 }
8594 }
8595 }
8596
8597 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventType> for crate::EventType {
8598 fn compat_from(value: ::fidl_fuchsia_component::EventType) -> Self {
8599 match value {
8600 ::fidl_fuchsia_component::EventType::CapabilityRequested => {
8601 Self::CapabilityRequested
8602 }
8603
8604 ::fidl_fuchsia_component::EventType::Discovered => Self::Discovered,
8605
8606 ::fidl_fuchsia_component::EventType::Destroyed => Self::Destroyed,
8607
8608 ::fidl_fuchsia_component::EventType::Resolved => Self::Resolved,
8609
8610 ::fidl_fuchsia_component::EventType::Started => Self::Started,
8611
8612 ::fidl_fuchsia_component::EventType::Stopped => Self::Stopped,
8613
8614 ::fidl_fuchsia_component::EventType::DebugStarted => Self::DebugStarted,
8615
8616 ::fidl_fuchsia_component::EventType::Unresolved => Self::Unresolved,
8617 }
8618 }
8619 }
8620
8621 impl ::fidl_next::CompatFrom<crate::StoppedPayload> for ::fidl_fuchsia_component::StoppedPayload {
8622 fn compat_from(value: crate::StoppedPayload) -> Self {
8623 Self {
8624 status: ::fidl_next::CompatFrom::compat_from(value.status),
8625
8626 exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
8627
8628 __source_breaking: ::fidl::marker::SourceBreaking,
8629 }
8630 }
8631 }
8632
8633 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StoppedPayload> for crate::StoppedPayload {
8634 fn compat_from(value: ::fidl_fuchsia_component::StoppedPayload) -> Self {
8635 Self {
8636 status: ::fidl_next::CompatFrom::compat_from(value.status),
8637
8638 exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
8639 }
8640 }
8641 }
8642
8643 impl ::fidl_next::CompatFrom<crate::EventHeader> for ::fidl_fuchsia_component::EventHeader {
8644 fn compat_from(value: crate::EventHeader) -> Self {
8645 Self {
8646 event_type: ::fidl_next::CompatFrom::compat_from(value.event_type),
8647
8648 moniker: ::fidl_next::CompatFrom::compat_from(value.moniker),
8649
8650 component_url: ::fidl_next::CompatFrom::compat_from(value.component_url),
8651
8652 timestamp: ::fidl_next::CompatFrom::compat_from(value.timestamp),
8653
8654 __source_breaking: ::fidl::marker::SourceBreaking,
8655 }
8656 }
8657 }
8658
8659 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventHeader> for crate::EventHeader {
8660 fn compat_from(value: ::fidl_fuchsia_component::EventHeader) -> Self {
8661 Self {
8662 event_type: ::fidl_next::CompatFrom::compat_from(value.event_type),
8663
8664 moniker: ::fidl_next::CompatFrom::compat_from(value.moniker),
8665
8666 component_url: ::fidl_next::CompatFrom::compat_from(value.component_url),
8667
8668 timestamp: ::fidl_next::CompatFrom::compat_from(value.timestamp),
8669 }
8670 }
8671 }
8672
8673 impl ::fidl_next::CompatFrom<crate::ExecutionControllerOnStopRequest>
8674 for ::fidl_fuchsia_component::ExecutionControllerOnStopRequest
8675 {
8676 #[inline]
8677 fn compat_from(value: crate::ExecutionControllerOnStopRequest) -> Self {
8678 Self { stopped_payload: ::fidl_next::CompatFrom::compat_from(value.stopped_payload) }
8679 }
8680 }
8681
8682 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ExecutionControllerOnStopRequest>
8683 for crate::ExecutionControllerOnStopRequest
8684 {
8685 #[inline]
8686 fn compat_from(value: ::fidl_fuchsia_component::ExecutionControllerOnStopRequest) -> Self {
8687 Self { stopped_payload: ::fidl_next::CompatFrom::compat_from(value.stopped_payload) }
8688 }
8689 }
8690
8691 #[cfg(target_os = "fuchsia")]
8692 pub type ExecutionControllerProxy = ::fidl_next::Client<crate::ExecutionController>;
8695
8696 impl ::fidl_next::CompatFrom<crate::ExecutionController>
8697 for ::fidl_fuchsia_component::ExecutionControllerMarker
8698 {
8699 fn compat_from(_: crate::ExecutionController) -> Self {
8700 Self
8701 }
8702 }
8703
8704 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ExecutionControllerMarker>
8705 for crate::ExecutionController
8706 {
8707 fn compat_from(_: ::fidl_fuchsia_component::ExecutionControllerMarker) -> Self {
8708 Self
8709 }
8710 }
8711
8712 #[cfg(target_os = "fuchsia")]
8713
8714 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ExecutionControllerProxy>
8715 for crate::ExecutionController
8716 {
8717 fn client_compat_from(
8718 proxy: ::fidl_fuchsia_component::ExecutionControllerProxy,
8719 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
8720 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
8721 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
8722 ::fidl_next::ClientDispatcher::new(client_end)
8723 }
8724 }
8725
8726 impl ::fidl_next::CompatFrom<crate::IntrospectorGetMonikerResponse>
8727 for ::fidl_fuchsia_component::IntrospectorGetMonikerResponse
8728 {
8729 #[inline]
8730 fn compat_from(value: crate::IntrospectorGetMonikerResponse) -> Self {
8731 Self { moniker: ::fidl_next::CompatFrom::compat_from(value.moniker) }
8732 }
8733 }
8734
8735 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorGetMonikerResponse>
8736 for crate::IntrospectorGetMonikerResponse
8737 {
8738 #[inline]
8739 fn compat_from(value: ::fidl_fuchsia_component::IntrospectorGetMonikerResponse) -> Self {
8740 Self { moniker: ::fidl_next::CompatFrom::compat_from(value.moniker) }
8741 }
8742 }
8743
8744 impl ::fidl_next::CompatFrom<crate::NamespaceError> for ::fidl_fuchsia_component::NamespaceError {
8745 fn compat_from(value: crate::NamespaceError) -> Self {
8746 match value {
8747 crate::NamespaceError::Shadow => Self::Shadow,
8748
8749 crate::NamespaceError::Duplicate => Self::Duplicate,
8750
8751 crate::NamespaceError::Conversion => Self::Conversion,
8752
8753 crate::NamespaceError::BadEntry => Self::BadEntry,
8754
8755 crate::NamespaceError::DictionaryRead => Self::DictionaryRead,
8756
8757 crate::NamespaceError::UnknownOrdinal_(unknown_ordinal) => {
8758 Self::__SourceBreaking { unknown_ordinal }
8759 }
8760 }
8761 }
8762 }
8763
8764 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceError> for crate::NamespaceError {
8765 fn compat_from(value: ::fidl_fuchsia_component::NamespaceError) -> Self {
8766 match value {
8767 ::fidl_fuchsia_component::NamespaceError::Shadow => Self::Shadow,
8768
8769 ::fidl_fuchsia_component::NamespaceError::Duplicate => Self::Duplicate,
8770
8771 ::fidl_fuchsia_component::NamespaceError::Conversion => Self::Conversion,
8772
8773 ::fidl_fuchsia_component::NamespaceError::BadEntry => Self::BadEntry,
8774
8775 ::fidl_fuchsia_component::NamespaceError::DictionaryRead => Self::DictionaryRead,
8776
8777 ::fidl_fuchsia_component::NamespaceError::__SourceBreaking {
8778 unknown_ordinal: value,
8779 } => Self::UnknownOrdinal_(value),
8780 }
8781 }
8782 }
8783
8784 impl ::fidl_next::CompatFrom<crate::RealmDestroyChildRequest>
8785 for ::fidl_fuchsia_component::RealmDestroyChildRequest
8786 {
8787 #[inline]
8788 fn compat_from(value: crate::RealmDestroyChildRequest) -> Self {
8789 Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
8790 }
8791 }
8792
8793 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmDestroyChildRequest>
8794 for crate::RealmDestroyChildRequest
8795 {
8796 #[inline]
8797 fn compat_from(value: ::fidl_fuchsia_component::RealmDestroyChildRequest) -> Self {
8798 Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
8799 }
8800 }
8801
8802 impl ::fidl_next::CompatFrom<crate::StatusError> for ::fidl_fuchsia_component::StatusError {
8803 fn compat_from(value: crate::StatusError) -> Self {
8804 match value {
8805 crate::StatusError::Provider => Self::Provider,
8806
8807 crate::StatusError::ResponseInvalid => Self::ResponseInvalid,
8808
8809 crate::StatusError::StatusUnknown => Self::StatusUnknown,
8810
8811 crate::StatusError::Unsupported => Self::Unsupported,
8812 }
8813 }
8814 }
8815
8816 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StatusError> for crate::StatusError {
8817 fn compat_from(value: ::fidl_fuchsia_component::StatusError) -> Self {
8818 match value {
8819 ::fidl_fuchsia_component::StatusError::Provider => Self::Provider,
8820
8821 ::fidl_fuchsia_component::StatusError::ResponseInvalid => Self::ResponseInvalid,
8822
8823 ::fidl_fuchsia_component::StatusError::StatusUnknown => Self::StatusUnknown,
8824
8825 ::fidl_fuchsia_component::StatusError::Unsupported => Self::Unsupported,
8826 }
8827 }
8828 }
8829
8830 impl ::fidl_next::CompatFrom<crate::StorageAdminDeleteComponentStorageRequest>
8831 for ::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest
8832 {
8833 #[inline]
8834 fn compat_from(value: crate::StorageAdminDeleteComponentStorageRequest) -> Self {
8835 Self { relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker) }
8836 }
8837 }
8838
8839 impl
8840 ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest>
8841 for crate::StorageAdminDeleteComponentStorageRequest
8842 {
8843 #[inline]
8844 fn compat_from(
8845 value: ::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest,
8846 ) -> Self {
8847 Self { relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker) }
8848 }
8849 }
8850
8851 impl ::fidl_next::CompatFrom<crate::StorageStatus> for ::fidl_fuchsia_component::StorageStatus {
8852 fn compat_from(value: crate::StorageStatus) -> Self {
8853 Self {
8854 total_size: ::fidl_next::CompatFrom::compat_from(value.total_size),
8855
8856 used_size: ::fidl_next::CompatFrom::compat_from(value.used_size),
8857
8858 __source_breaking: ::fidl::marker::SourceBreaking,
8859 }
8860 }
8861 }
8862
8863 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageStatus> for crate::StorageStatus {
8864 fn compat_from(value: ::fidl_fuchsia_component::StorageStatus) -> Self {
8865 Self {
8866 total_size: ::fidl_next::CompatFrom::compat_from(value.total_size),
8867
8868 used_size: ::fidl_next::CompatFrom::compat_from(value.used_size),
8869 }
8870 }
8871 }
8872
8873 impl ::fidl_next::CompatFrom<crate::StorageIteratorNextResponse>
8874 for ::fidl_fuchsia_component::StorageIteratorNextResponse
8875 {
8876 #[inline]
8877 fn compat_from(value: crate::StorageIteratorNextResponse) -> Self {
8878 Self {
8879 relative_monikers: ::fidl_next::CompatFrom::compat_from(value.relative_monikers),
8880 }
8881 }
8882 }
8883
8884 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageIteratorNextResponse>
8885 for crate::StorageIteratorNextResponse
8886 {
8887 #[inline]
8888 fn compat_from(value: ::fidl_fuchsia_component::StorageIteratorNextResponse) -> Self {
8889 Self {
8890 relative_monikers: ::fidl_next::CompatFrom::compat_from(value.relative_monikers),
8891 }
8892 }
8893 }
8894
8895 #[cfg(target_os = "fuchsia")]
8896 pub type StorageIteratorProxy = ::fidl_next::Client<crate::StorageIterator>;
8899
8900 impl ::fidl_next::CompatFrom<crate::StorageIterator>
8901 for ::fidl_fuchsia_component::StorageIteratorMarker
8902 {
8903 fn compat_from(_: crate::StorageIterator) -> Self {
8904 Self
8905 }
8906 }
8907
8908 impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageIteratorMarker>
8909 for crate::StorageIterator
8910 {
8911 fn compat_from(_: ::fidl_fuchsia_component::StorageIteratorMarker) -> Self {
8912 Self
8913 }
8914 }
8915
8916 #[cfg(target_os = "fuchsia")]
8917
8918 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::StorageIteratorProxy>
8919 for crate::StorageIterator
8920 {
8921 fn client_compat_from(
8922 proxy: ::fidl_fuchsia_component::StorageIteratorProxy,
8923 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
8924 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
8925 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
8926 ::fidl_next::ClientDispatcher::new(client_end)
8927 }
8928 }
8929}