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