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