Skip to main content

fidl_next_common_fuchsia_power_system/
fidl_next_common_fuchsia_power_system.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    #[doc = " Errors returned by `ActivityGovernor/AcquireWakeLease`.\n"]
8    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9    #[repr(u32)]
10    pub enum AcquireWakeLeaseError {
11        Internal = 1,
12        InvalidName = 2,
13        UnknownOrdinal_(u32) = 3,
14    }
15    impl ::std::convert::From<u32> for AcquireWakeLeaseError {
16        fn from(value: u32) -> Self {
17            match value {
18                1 => Self::Internal,
19                2 => Self::InvalidName,
20
21                _ => Self::UnknownOrdinal_(value),
22            }
23        }
24    }
25
26    unsafe impl<___E> ::fidl_next::Encode<crate::wire::AcquireWakeLeaseError, ___E>
27        for AcquireWakeLeaseError
28    where
29        ___E: ?Sized,
30    {
31        #[inline]
32        fn encode(
33            self,
34            encoder: &mut ___E,
35            out: &mut ::core::mem::MaybeUninit<crate::wire::AcquireWakeLeaseError>,
36            _: (),
37        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
38            ::fidl_next::Encode::encode(&self, encoder, out, ())
39        }
40    }
41
42    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AcquireWakeLeaseError, ___E>
43        for &'a AcquireWakeLeaseError
44    where
45        ___E: ?Sized,
46    {
47        #[inline]
48        fn encode(
49            self,
50            encoder: &mut ___E,
51            out: &mut ::core::mem::MaybeUninit<crate::wire::AcquireWakeLeaseError>,
52            _: (),
53        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
54            ::fidl_next::munge!(let crate::wire::AcquireWakeLeaseError { value } = out);
55            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
56                AcquireWakeLeaseError::Internal => 1,
57
58                AcquireWakeLeaseError::InvalidName => 2,
59
60                AcquireWakeLeaseError::UnknownOrdinal_(value) => value,
61            }));
62
63            Ok(())
64        }
65    }
66
67    impl ::core::convert::From<crate::wire::AcquireWakeLeaseError> for AcquireWakeLeaseError {
68        fn from(wire: crate::wire::AcquireWakeLeaseError) -> Self {
69            match u32::from(wire.value) {
70                1 => Self::Internal,
71
72                2 => Self::InvalidName,
73
74                value => Self::UnknownOrdinal_(value),
75            }
76        }
77    }
78
79    impl ::fidl_next::FromWire<crate::wire::AcquireWakeLeaseError> for AcquireWakeLeaseError {
80        #[inline]
81        fn from_wire(wire: crate::wire::AcquireWakeLeaseError) -> Self {
82            Self::from(wire)
83        }
84    }
85
86    impl ::fidl_next::FromWireRef<crate::wire::AcquireWakeLeaseError> for AcquireWakeLeaseError {
87        #[inline]
88        fn from_wire_ref(wire: &crate::wire::AcquireWakeLeaseError) -> Self {
89            Self::from(*wire)
90        }
91    }
92
93    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
94    pub struct ActivityGovernorAcquireWakeLeaseRequest {
95        pub name: ::std::string::String,
96    }
97
98    unsafe impl<___E>
99        ::fidl_next::Encode<crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>, ___E>
100        for ActivityGovernorAcquireWakeLeaseRequest
101    where
102        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
103        ___E: ::fidl_next::Encoder,
104    {
105        #[inline]
106        fn encode(
107            self,
108            encoder_: &mut ___E,
109            out_: &mut ::core::mem::MaybeUninit<
110                crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>,
111            >,
112            _: (),
113        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
114            ::fidl_next::munge! {
115                let crate::wire::ActivityGovernorAcquireWakeLeaseRequest {
116                    name,
117
118                } = out_;
119            }
120
121            ::fidl_next::Encode::encode(self.name, encoder_, name, 64)?;
122
123            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
124            ::fidl_next::Constrained::validate(_field, 64)?;
125
126            Ok(())
127        }
128    }
129
130    unsafe impl<'a, ___E>
131        ::fidl_next::Encode<crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>, ___E>
132        for &'a ActivityGovernorAcquireWakeLeaseRequest
133    where
134        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
135        ___E: ::fidl_next::Encoder,
136    {
137        #[inline]
138        fn encode(
139            self,
140            encoder_: &mut ___E,
141            out_: &mut ::core::mem::MaybeUninit<
142                crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>,
143            >,
144            _: (),
145        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
146            ::fidl_next::munge! {
147                let crate::wire::ActivityGovernorAcquireWakeLeaseRequest {
148                    name,
149
150                } = out_;
151            }
152
153            ::fidl_next::Encode::encode(&self.name, encoder_, name, 64)?;
154
155            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
156            ::fidl_next::Constrained::validate(_field, 64)?;
157
158            Ok(())
159        }
160    }
161
162    unsafe impl<___E>
163        ::fidl_next::EncodeOption<
164            ::fidl_next::wire::Box<
165                'static,
166                crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>,
167            >,
168            ___E,
169        > for ActivityGovernorAcquireWakeLeaseRequest
170    where
171        ___E: ::fidl_next::Encoder + ?Sized,
172        ActivityGovernorAcquireWakeLeaseRequest: ::fidl_next::Encode<crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>, ___E>,
173    {
174        #[inline]
175        fn encode_option(
176            this: ::core::option::Option<Self>,
177            encoder: &mut ___E,
178            out: &mut ::core::mem::MaybeUninit<
179                ::fidl_next::wire::Box<
180                    'static,
181                    crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>,
182                >,
183            >,
184            _: (),
185        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
186            if let Some(inner) = this {
187                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
188                ::fidl_next::wire::Box::encode_present(out);
189            } else {
190                ::fidl_next::wire::Box::encode_absent(out);
191            }
192
193            Ok(())
194        }
195    }
196
197    unsafe impl<'a, ___E>
198        ::fidl_next::EncodeOption<
199            ::fidl_next::wire::Box<
200                'static,
201                crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>,
202            >,
203            ___E,
204        > for &'a ActivityGovernorAcquireWakeLeaseRequest
205    where
206        ___E: ::fidl_next::Encoder + ?Sized,
207        &'a ActivityGovernorAcquireWakeLeaseRequest: ::fidl_next::Encode<crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>, ___E>,
208    {
209        #[inline]
210        fn encode_option(
211            this: ::core::option::Option<Self>,
212            encoder: &mut ___E,
213            out: &mut ::core::mem::MaybeUninit<
214                ::fidl_next::wire::Box<
215                    'static,
216                    crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>,
217                >,
218            >,
219            _: (),
220        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
221            if let Some(inner) = this {
222                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
223                ::fidl_next::wire::Box::encode_present(out);
224            } else {
225                ::fidl_next::wire::Box::encode_absent(out);
226            }
227
228            Ok(())
229        }
230    }
231
232    impl<'de> ::fidl_next::FromWire<crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'de>>
233        for ActivityGovernorAcquireWakeLeaseRequest
234    {
235        #[inline]
236        fn from_wire(wire: crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'de>) -> Self {
237            Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
238        }
239    }
240
241    impl<'de> ::fidl_next::FromWireRef<crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'de>>
242        for ActivityGovernorAcquireWakeLeaseRequest
243    {
244        #[inline]
245        fn from_wire_ref(wire: &crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'de>) -> Self {
246            Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
247        }
248    }
249
250    #[doc = " Error codes for responses from `RegisterSuspendBlocker` in\n [`fuchsia.power.system/ActivityGovernor`].\n"]
251    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
252    #[repr(u32)]
253    pub enum RegisterSuspendBlockerError {
254        Internal = 1,
255        InvalidArgs = 2,
256        UnknownOrdinal_(u32) = 3,
257    }
258    impl ::std::convert::From<u32> for RegisterSuspendBlockerError {
259        fn from(value: u32) -> Self {
260            match value {
261                1 => Self::Internal,
262                2 => Self::InvalidArgs,
263
264                _ => Self::UnknownOrdinal_(value),
265            }
266        }
267    }
268
269    unsafe impl<___E> ::fidl_next::Encode<crate::wire::RegisterSuspendBlockerError, ___E>
270        for RegisterSuspendBlockerError
271    where
272        ___E: ?Sized,
273    {
274        #[inline]
275        fn encode(
276            self,
277            encoder: &mut ___E,
278            out: &mut ::core::mem::MaybeUninit<crate::wire::RegisterSuspendBlockerError>,
279            _: (),
280        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
281            ::fidl_next::Encode::encode(&self, encoder, out, ())
282        }
283    }
284
285    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RegisterSuspendBlockerError, ___E>
286        for &'a RegisterSuspendBlockerError
287    where
288        ___E: ?Sized,
289    {
290        #[inline]
291        fn encode(
292            self,
293            encoder: &mut ___E,
294            out: &mut ::core::mem::MaybeUninit<crate::wire::RegisterSuspendBlockerError>,
295            _: (),
296        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
297            ::fidl_next::munge!(let crate::wire::RegisterSuspendBlockerError { value } = out);
298            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
299                RegisterSuspendBlockerError::Internal => 1,
300
301                RegisterSuspendBlockerError::InvalidArgs => 2,
302
303                RegisterSuspendBlockerError::UnknownOrdinal_(value) => value,
304            }));
305
306            Ok(())
307        }
308    }
309
310    impl ::core::convert::From<crate::wire::RegisterSuspendBlockerError>
311        for RegisterSuspendBlockerError
312    {
313        fn from(wire: crate::wire::RegisterSuspendBlockerError) -> Self {
314            match u32::from(wire.value) {
315                1 => Self::Internal,
316
317                2 => Self::InvalidArgs,
318
319                value => Self::UnknownOrdinal_(value),
320            }
321        }
322    }
323
324    impl ::fidl_next::FromWire<crate::wire::RegisterSuspendBlockerError>
325        for RegisterSuspendBlockerError
326    {
327        #[inline]
328        fn from_wire(wire: crate::wire::RegisterSuspendBlockerError) -> Self {
329            Self::from(wire)
330        }
331    }
332
333    impl ::fidl_next::FromWireRef<crate::wire::RegisterSuspendBlockerError>
334        for RegisterSuspendBlockerError
335    {
336        #[inline]
337        fn from_wire_ref(wire: &crate::wire::RegisterSuspendBlockerError) -> Self {
338            Self::from(*wire)
339        }
340    }
341
342    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
343    pub struct ActivityGovernorTakeWakeLeaseRequest {
344        pub name: ::std::string::String,
345    }
346
347    unsafe impl<___E>
348        ::fidl_next::Encode<crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>, ___E>
349        for ActivityGovernorTakeWakeLeaseRequest
350    where
351        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
352        ___E: ::fidl_next::Encoder,
353    {
354        #[inline]
355        fn encode(
356            self,
357            encoder_: &mut ___E,
358            out_: &mut ::core::mem::MaybeUninit<
359                crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>,
360            >,
361            _: (),
362        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
363            ::fidl_next::munge! {
364                let crate::wire::ActivityGovernorTakeWakeLeaseRequest {
365                    name,
366
367                } = out_;
368            }
369
370            ::fidl_next::Encode::encode(self.name, encoder_, name, 64)?;
371
372            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
373            ::fidl_next::Constrained::validate(_field, 64)?;
374
375            Ok(())
376        }
377    }
378
379    unsafe impl<'a, ___E>
380        ::fidl_next::Encode<crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>, ___E>
381        for &'a ActivityGovernorTakeWakeLeaseRequest
382    where
383        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
384        ___E: ::fidl_next::Encoder,
385    {
386        #[inline]
387        fn encode(
388            self,
389            encoder_: &mut ___E,
390            out_: &mut ::core::mem::MaybeUninit<
391                crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>,
392            >,
393            _: (),
394        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
395            ::fidl_next::munge! {
396                let crate::wire::ActivityGovernorTakeWakeLeaseRequest {
397                    name,
398
399                } = out_;
400            }
401
402            ::fidl_next::Encode::encode(&self.name, encoder_, name, 64)?;
403
404            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
405            ::fidl_next::Constrained::validate(_field, 64)?;
406
407            Ok(())
408        }
409    }
410
411    unsafe impl<___E>
412        ::fidl_next::EncodeOption<
413            ::fidl_next::wire::Box<
414                'static,
415                crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>,
416            >,
417            ___E,
418        > for ActivityGovernorTakeWakeLeaseRequest
419    where
420        ___E: ::fidl_next::Encoder + ?Sized,
421        ActivityGovernorTakeWakeLeaseRequest:
422            ::fidl_next::Encode<crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>, ___E>,
423    {
424        #[inline]
425        fn encode_option(
426            this: ::core::option::Option<Self>,
427            encoder: &mut ___E,
428            out: &mut ::core::mem::MaybeUninit<
429                ::fidl_next::wire::Box<
430                    'static,
431                    crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>,
432                >,
433            >,
434            _: (),
435        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
436            if let Some(inner) = this {
437                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
438                ::fidl_next::wire::Box::encode_present(out);
439            } else {
440                ::fidl_next::wire::Box::encode_absent(out);
441            }
442
443            Ok(())
444        }
445    }
446
447    unsafe impl<'a, ___E>
448        ::fidl_next::EncodeOption<
449            ::fidl_next::wire::Box<
450                'static,
451                crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>,
452            >,
453            ___E,
454        > for &'a ActivityGovernorTakeWakeLeaseRequest
455    where
456        ___E: ::fidl_next::Encoder + ?Sized,
457        &'a ActivityGovernorTakeWakeLeaseRequest:
458            ::fidl_next::Encode<crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>, ___E>,
459    {
460        #[inline]
461        fn encode_option(
462            this: ::core::option::Option<Self>,
463            encoder: &mut ___E,
464            out: &mut ::core::mem::MaybeUninit<
465                ::fidl_next::wire::Box<
466                    'static,
467                    crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>,
468                >,
469            >,
470            _: (),
471        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
472            if let Some(inner) = this {
473                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
474                ::fidl_next::wire::Box::encode_present(out);
475            } else {
476                ::fidl_next::wire::Box::encode_absent(out);
477            }
478
479            Ok(())
480        }
481    }
482
483    impl<'de> ::fidl_next::FromWire<crate::wire::ActivityGovernorTakeWakeLeaseRequest<'de>>
484        for ActivityGovernorTakeWakeLeaseRequest
485    {
486        #[inline]
487        fn from_wire(wire: crate::wire::ActivityGovernorTakeWakeLeaseRequest<'de>) -> Self {
488            Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
489        }
490    }
491
492    impl<'de> ::fidl_next::FromWireRef<crate::wire::ActivityGovernorTakeWakeLeaseRequest<'de>>
493        for ActivityGovernorTakeWakeLeaseRequest
494    {
495        #[inline]
496        fn from_wire_ref(wire: &crate::wire::ActivityGovernorTakeWakeLeaseRequest<'de>) -> Self {
497            Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
498        }
499    }
500
501    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
502    pub struct ActivityGovernorAcquireLongWakeLeaseRequest {
503        pub name: ::std::string::String,
504    }
505
506    unsafe impl<___E>
507        ::fidl_next::Encode<crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>, ___E>
508        for ActivityGovernorAcquireLongWakeLeaseRequest
509    where
510        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
511        ___E: ::fidl_next::Encoder,
512    {
513        #[inline]
514        fn encode(
515            self,
516            encoder_: &mut ___E,
517            out_: &mut ::core::mem::MaybeUninit<
518                crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>,
519            >,
520            _: (),
521        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
522            ::fidl_next::munge! {
523                let crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest {
524                    name,
525
526                } = out_;
527            }
528
529            ::fidl_next::Encode::encode(self.name, encoder_, name, 64)?;
530
531            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
532            ::fidl_next::Constrained::validate(_field, 64)?;
533
534            Ok(())
535        }
536    }
537
538    unsafe impl<'a, ___E>
539        ::fidl_next::Encode<crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>, ___E>
540        for &'a ActivityGovernorAcquireLongWakeLeaseRequest
541    where
542        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
543        ___E: ::fidl_next::Encoder,
544    {
545        #[inline]
546        fn encode(
547            self,
548            encoder_: &mut ___E,
549            out_: &mut ::core::mem::MaybeUninit<
550                crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>,
551            >,
552            _: (),
553        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
554            ::fidl_next::munge! {
555                let crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest {
556                    name,
557
558                } = out_;
559            }
560
561            ::fidl_next::Encode::encode(&self.name, encoder_, name, 64)?;
562
563            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
564            ::fidl_next::Constrained::validate(_field, 64)?;
565
566            Ok(())
567        }
568    }
569
570    unsafe impl<___E>
571        ::fidl_next::EncodeOption<
572            ::fidl_next::wire::Box<
573                'static,
574                crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>,
575            >,
576            ___E,
577        > for ActivityGovernorAcquireLongWakeLeaseRequest
578    where
579        ___E: ::fidl_next::Encoder + ?Sized,
580        ActivityGovernorAcquireLongWakeLeaseRequest: ::fidl_next::Encode<
581                crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>,
582                ___E,
583            >,
584    {
585        #[inline]
586        fn encode_option(
587            this: ::core::option::Option<Self>,
588            encoder: &mut ___E,
589            out: &mut ::core::mem::MaybeUninit<
590                ::fidl_next::wire::Box<
591                    'static,
592                    crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>,
593                >,
594            >,
595            _: (),
596        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
597            if let Some(inner) = this {
598                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
599                ::fidl_next::wire::Box::encode_present(out);
600            } else {
601                ::fidl_next::wire::Box::encode_absent(out);
602            }
603
604            Ok(())
605        }
606    }
607
608    unsafe impl<'a, ___E>
609        ::fidl_next::EncodeOption<
610            ::fidl_next::wire::Box<
611                'static,
612                crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>,
613            >,
614            ___E,
615        > for &'a ActivityGovernorAcquireLongWakeLeaseRequest
616    where
617        ___E: ::fidl_next::Encoder + ?Sized,
618        &'a ActivityGovernorAcquireLongWakeLeaseRequest: ::fidl_next::Encode<
619                crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>,
620                ___E,
621            >,
622    {
623        #[inline]
624        fn encode_option(
625            this: ::core::option::Option<Self>,
626            encoder: &mut ___E,
627            out: &mut ::core::mem::MaybeUninit<
628                ::fidl_next::wire::Box<
629                    'static,
630                    crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>,
631                >,
632            >,
633            _: (),
634        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
635            if let Some(inner) = this {
636                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
637                ::fidl_next::wire::Box::encode_present(out);
638            } else {
639                ::fidl_next::wire::Box::encode_absent(out);
640            }
641
642            Ok(())
643        }
644    }
645
646    impl<'de> ::fidl_next::FromWire<crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'de>>
647        for ActivityGovernorAcquireLongWakeLeaseRequest
648    {
649        #[inline]
650        fn from_wire(wire: crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'de>) -> Self {
651            Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
652        }
653    }
654
655    impl<'de>
656        ::fidl_next::FromWireRef<crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'de>>
657        for ActivityGovernorAcquireLongWakeLeaseRequest
658    {
659        #[inline]
660        fn from_wire_ref(
661            wire: &crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'de>,
662        ) -> Self {
663            Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
664        }
665    }
666
667    pub type ActivityGovernorAcquireWakeLeaseWithTokenResponse = ();
668
669    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
670    pub struct ActivityGovernorTakeApplicationActivityLeaseRequest {
671        pub name: ::std::string::String,
672    }
673
674    unsafe impl<___E>
675        ::fidl_next::Encode<
676            crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
677            ___E,
678        > for ActivityGovernorTakeApplicationActivityLeaseRequest
679    where
680        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
681        ___E: ::fidl_next::Encoder,
682    {
683        #[inline]
684        fn encode(
685            self,
686            encoder_: &mut ___E,
687            out_: &mut ::core::mem::MaybeUninit<
688                crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
689            >,
690            _: (),
691        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
692            ::fidl_next::munge! {
693                let crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest {
694                    name,
695
696                } = out_;
697            }
698
699            ::fidl_next::Encode::encode(self.name, encoder_, name, 64)?;
700
701            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
702            ::fidl_next::Constrained::validate(_field, 64)?;
703
704            Ok(())
705        }
706    }
707
708    unsafe impl<'a, ___E>
709        ::fidl_next::Encode<
710            crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
711            ___E,
712        > for &'a ActivityGovernorTakeApplicationActivityLeaseRequest
713    where
714        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
715        ___E: ::fidl_next::Encoder,
716    {
717        #[inline]
718        fn encode(
719            self,
720            encoder_: &mut ___E,
721            out_: &mut ::core::mem::MaybeUninit<
722                crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
723            >,
724            _: (),
725        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
726            ::fidl_next::munge! {
727                let crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest {
728                    name,
729
730                } = out_;
731            }
732
733            ::fidl_next::Encode::encode(&self.name, encoder_, name, 64)?;
734
735            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
736            ::fidl_next::Constrained::validate(_field, 64)?;
737
738            Ok(())
739        }
740    }
741
742    unsafe impl<___E>
743        ::fidl_next::EncodeOption<
744            ::fidl_next::wire::Box<
745                'static,
746                crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
747            >,
748            ___E,
749        > for ActivityGovernorTakeApplicationActivityLeaseRequest
750    where
751        ___E: ::fidl_next::Encoder + ?Sized,
752        ActivityGovernorTakeApplicationActivityLeaseRequest: ::fidl_next::Encode<
753                crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
754                ___E,
755            >,
756    {
757        #[inline]
758        fn encode_option(
759            this: ::core::option::Option<Self>,
760            encoder: &mut ___E,
761            out: &mut ::core::mem::MaybeUninit<
762                ::fidl_next::wire::Box<
763                    'static,
764                    crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
765                >,
766            >,
767            _: (),
768        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
769            if let Some(inner) = this {
770                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
771                ::fidl_next::wire::Box::encode_present(out);
772            } else {
773                ::fidl_next::wire::Box::encode_absent(out);
774            }
775
776            Ok(())
777        }
778    }
779
780    unsafe impl<'a, ___E>
781        ::fidl_next::EncodeOption<
782            ::fidl_next::wire::Box<
783                'static,
784                crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
785            >,
786            ___E,
787        > for &'a ActivityGovernorTakeApplicationActivityLeaseRequest
788    where
789        ___E: ::fidl_next::Encoder + ?Sized,
790        &'a ActivityGovernorTakeApplicationActivityLeaseRequest: ::fidl_next::Encode<
791                crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
792                ___E,
793            >,
794    {
795        #[inline]
796        fn encode_option(
797            this: ::core::option::Option<Self>,
798            encoder: &mut ___E,
799            out: &mut ::core::mem::MaybeUninit<
800                ::fidl_next::wire::Box<
801                    'static,
802                    crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
803                >,
804            >,
805            _: (),
806        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
807            if let Some(inner) = this {
808                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
809                ::fidl_next::wire::Box::encode_present(out);
810            } else {
811                ::fidl_next::wire::Box::encode_absent(out);
812            }
813
814            Ok(())
815        }
816    }
817
818    impl<'de>
819        ::fidl_next::FromWire<crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'de>>
820        for ActivityGovernorTakeApplicationActivityLeaseRequest
821    {
822        #[inline]
823        fn from_wire(
824            wire: crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'de>,
825        ) -> Self {
826            Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
827        }
828    }
829
830    impl<'de>
831        ::fidl_next::FromWireRef<
832            crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'de>,
833        > for ActivityGovernorTakeApplicationActivityLeaseRequest
834    {
835        #[inline]
836        fn from_wire_ref(
837            wire: &crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'de>,
838        ) -> Self {
839            Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
840        }
841    }
842
843    #[doc = " Error codes for responses from `AddExecutionStateDependency` in\n [`fuchsia.power.system/CpuElementManager`].\n"]
844    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
845    #[repr(u32)]
846    pub enum AddExecutionStateDependencyError {
847        InvalidArgs = 1,
848        BadState = 2,
849        UnknownOrdinal_(u32) = 3,
850    }
851    impl ::std::convert::From<u32> for AddExecutionStateDependencyError {
852        fn from(value: u32) -> Self {
853            match value {
854                1 => Self::InvalidArgs,
855                2 => Self::BadState,
856
857                _ => Self::UnknownOrdinal_(value),
858            }
859        }
860    }
861
862    unsafe impl<___E> ::fidl_next::Encode<crate::wire::AddExecutionStateDependencyError, ___E>
863        for AddExecutionStateDependencyError
864    where
865        ___E: ?Sized,
866    {
867        #[inline]
868        fn encode(
869            self,
870            encoder: &mut ___E,
871            out: &mut ::core::mem::MaybeUninit<crate::wire::AddExecutionStateDependencyError>,
872            _: (),
873        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
874            ::fidl_next::Encode::encode(&self, encoder, out, ())
875        }
876    }
877
878    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AddExecutionStateDependencyError, ___E>
879        for &'a AddExecutionStateDependencyError
880    where
881        ___E: ?Sized,
882    {
883        #[inline]
884        fn encode(
885            self,
886            encoder: &mut ___E,
887            out: &mut ::core::mem::MaybeUninit<crate::wire::AddExecutionStateDependencyError>,
888            _: (),
889        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
890            ::fidl_next::munge!(let crate::wire::AddExecutionStateDependencyError { value } = out);
891            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
892                AddExecutionStateDependencyError::InvalidArgs => 1,
893
894                AddExecutionStateDependencyError::BadState => 2,
895
896                AddExecutionStateDependencyError::UnknownOrdinal_(value) => value,
897            }));
898
899            Ok(())
900        }
901    }
902
903    impl ::core::convert::From<crate::wire::AddExecutionStateDependencyError>
904        for AddExecutionStateDependencyError
905    {
906        fn from(wire: crate::wire::AddExecutionStateDependencyError) -> Self {
907            match u32::from(wire.value) {
908                1 => Self::InvalidArgs,
909
910                2 => Self::BadState,
911
912                value => Self::UnknownOrdinal_(value),
913            }
914        }
915    }
916
917    impl ::fidl_next::FromWire<crate::wire::AddExecutionStateDependencyError>
918        for AddExecutionStateDependencyError
919    {
920        #[inline]
921        fn from_wire(wire: crate::wire::AddExecutionStateDependencyError) -> Self {
922            Self::from(wire)
923        }
924    }
925
926    impl ::fidl_next::FromWireRef<crate::wire::AddExecutionStateDependencyError>
927        for AddExecutionStateDependencyError
928    {
929        #[inline]
930        fn from_wire_ref(wire: &crate::wire::AddExecutionStateDependencyError) -> Self {
931            Self::from(*wire)
932        }
933    }
934
935    #[doc = " Application activity power levels\n\n Elements that need to keep the system from suspending should take an assertive\n dependency on `ApplicationActivityLevel::ACTIVE`. When these components are\n performing work, they should request a lease to ensure the system remains\n active, and drop the lease when they are done.\n"]
936    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
937    #[repr(u8)]
938    pub enum ApplicationActivityLevel {
939        Inactive = 0,
940        Active = 1,
941        UnknownOrdinal_(u8) = 2,
942    }
943    impl ::std::convert::From<u8> for ApplicationActivityLevel {
944        fn from(value: u8) -> Self {
945            match value {
946                0 => Self::Inactive,
947                1 => Self::Active,
948
949                _ => Self::UnknownOrdinal_(value),
950            }
951        }
952    }
953
954    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ApplicationActivityLevel, ___E>
955        for ApplicationActivityLevel
956    where
957        ___E: ?Sized,
958    {
959        #[inline]
960        fn encode(
961            self,
962            encoder: &mut ___E,
963            out: &mut ::core::mem::MaybeUninit<crate::wire::ApplicationActivityLevel>,
964            _: (),
965        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
966            ::fidl_next::Encode::encode(&self, encoder, out, ())
967        }
968    }
969
970    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ApplicationActivityLevel, ___E>
971        for &'a ApplicationActivityLevel
972    where
973        ___E: ?Sized,
974    {
975        #[inline]
976        fn encode(
977            self,
978            encoder: &mut ___E,
979            out: &mut ::core::mem::MaybeUninit<crate::wire::ApplicationActivityLevel>,
980            _: (),
981        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
982            ::fidl_next::munge!(let crate::wire::ApplicationActivityLevel { value } = out);
983            let _ = value.write(u8::from(match *self {
984                ApplicationActivityLevel::Inactive => 0,
985
986                ApplicationActivityLevel::Active => 1,
987
988                ApplicationActivityLevel::UnknownOrdinal_(value) => value,
989            }));
990
991            Ok(())
992        }
993    }
994
995    impl ::core::convert::From<crate::wire::ApplicationActivityLevel> for ApplicationActivityLevel {
996        fn from(wire: crate::wire::ApplicationActivityLevel) -> Self {
997            match u8::from(wire.value) {
998                0 => Self::Inactive,
999
1000                1 => Self::Active,
1001
1002                value => Self::UnknownOrdinal_(value),
1003            }
1004        }
1005    }
1006
1007    impl ::fidl_next::FromWire<crate::wire::ApplicationActivityLevel> for ApplicationActivityLevel {
1008        #[inline]
1009        fn from_wire(wire: crate::wire::ApplicationActivityLevel) -> Self {
1010            Self::from(wire)
1011        }
1012    }
1013
1014    impl ::fidl_next::FromWireRef<crate::wire::ApplicationActivityLevel> for ApplicationActivityLevel {
1015        #[inline]
1016        fn from_wire_ref(wire: &crate::wire::ApplicationActivityLevel) -> Self {
1017            Self::from(*wire)
1018        }
1019    }
1020
1021    pub type BootControlSetBootCompleteResponse = ();
1022
1023    pub type CpuElementManagerAddExecutionStateDependencyResponse = ();
1024
1025    #[doc = " CPU power levels\n\n Elements should take an assertive dependency on `CpuLevel::ACTIVE`\n to ensure that the element will be suspended before the CPU suspends.\n"]
1026    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1027    #[repr(u8)]
1028    pub enum CpuLevel {
1029        Inactive = 0,
1030        Active = 1,
1031        UnknownOrdinal_(u8) = 2,
1032    }
1033    impl ::std::convert::From<u8> for CpuLevel {
1034        fn from(value: u8) -> Self {
1035            match value {
1036                0 => Self::Inactive,
1037                1 => Self::Active,
1038
1039                _ => Self::UnknownOrdinal_(value),
1040            }
1041        }
1042    }
1043
1044    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CpuLevel, ___E> for CpuLevel
1045    where
1046        ___E: ?Sized,
1047    {
1048        #[inline]
1049        fn encode(
1050            self,
1051            encoder: &mut ___E,
1052            out: &mut ::core::mem::MaybeUninit<crate::wire::CpuLevel>,
1053            _: (),
1054        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1055            ::fidl_next::Encode::encode(&self, encoder, out, ())
1056        }
1057    }
1058
1059    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::CpuLevel, ___E> for &'a CpuLevel
1060    where
1061        ___E: ?Sized,
1062    {
1063        #[inline]
1064        fn encode(
1065            self,
1066            encoder: &mut ___E,
1067            out: &mut ::core::mem::MaybeUninit<crate::wire::CpuLevel>,
1068            _: (),
1069        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1070            ::fidl_next::munge!(let crate::wire::CpuLevel { value } = out);
1071            let _ = value.write(u8::from(match *self {
1072                CpuLevel::Inactive => 0,
1073
1074                CpuLevel::Active => 1,
1075
1076                CpuLevel::UnknownOrdinal_(value) => value,
1077            }));
1078
1079            Ok(())
1080        }
1081    }
1082
1083    impl ::core::convert::From<crate::wire::CpuLevel> for CpuLevel {
1084        fn from(wire: crate::wire::CpuLevel) -> Self {
1085            match u8::from(wire.value) {
1086                0 => Self::Inactive,
1087
1088                1 => Self::Active,
1089
1090                value => Self::UnknownOrdinal_(value),
1091            }
1092        }
1093    }
1094
1095    impl ::fidl_next::FromWire<crate::wire::CpuLevel> for CpuLevel {
1096        #[inline]
1097        fn from_wire(wire: crate::wire::CpuLevel) -> Self {
1098            Self::from(wire)
1099        }
1100    }
1101
1102    impl ::fidl_next::FromWireRef<crate::wire::CpuLevel> for CpuLevel {
1103        #[inline]
1104        fn from_wire_ref(wire: &crate::wire::CpuLevel) -> Self {
1105            Self::from(*wire)
1106        }
1107    }
1108
1109    #[doc = " Execution state power levels\n\n Elements should take an opportunistic dependency on `ExecutionStateLevel::ACTIVE`\n to ensure that the element will be suspended when the rest of the system\n suspends.\n\n Drivers can take an opportunistic dependency on either\n `ExecutionStateLevel::SUSPENDING` or `ExecutionStateLevel::ACTIVE` and\n request a persistent lease on this state to ensure that their element\'s\n power level is always activated when the system comes out of a suspend\n state.\n"]
1110    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1111    #[repr(u8)]
1112    pub enum ExecutionStateLevel {
1113        Inactive = 0,
1114        Suspending = 1,
1115        Active = 2,
1116        UnknownOrdinal_(u8) = 3,
1117    }
1118    impl ::std::convert::From<u8> for ExecutionStateLevel {
1119        fn from(value: u8) -> Self {
1120            match value {
1121                0 => Self::Inactive,
1122                1 => Self::Suspending,
1123                2 => Self::Active,
1124
1125                _ => Self::UnknownOrdinal_(value),
1126            }
1127        }
1128    }
1129
1130    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ExecutionStateLevel, ___E>
1131        for ExecutionStateLevel
1132    where
1133        ___E: ?Sized,
1134    {
1135        #[inline]
1136        fn encode(
1137            self,
1138            encoder: &mut ___E,
1139            out: &mut ::core::mem::MaybeUninit<crate::wire::ExecutionStateLevel>,
1140            _: (),
1141        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1142            ::fidl_next::Encode::encode(&self, encoder, out, ())
1143        }
1144    }
1145
1146    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ExecutionStateLevel, ___E>
1147        for &'a ExecutionStateLevel
1148    where
1149        ___E: ?Sized,
1150    {
1151        #[inline]
1152        fn encode(
1153            self,
1154            encoder: &mut ___E,
1155            out: &mut ::core::mem::MaybeUninit<crate::wire::ExecutionStateLevel>,
1156            _: (),
1157        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1158            ::fidl_next::munge!(let crate::wire::ExecutionStateLevel { value } = out);
1159            let _ = value.write(u8::from(match *self {
1160                ExecutionStateLevel::Inactive => 0,
1161
1162                ExecutionStateLevel::Suspending => 1,
1163
1164                ExecutionStateLevel::Active => 2,
1165
1166                ExecutionStateLevel::UnknownOrdinal_(value) => value,
1167            }));
1168
1169            Ok(())
1170        }
1171    }
1172
1173    impl ::core::convert::From<crate::wire::ExecutionStateLevel> for ExecutionStateLevel {
1174        fn from(wire: crate::wire::ExecutionStateLevel) -> Self {
1175            match u8::from(wire.value) {
1176                0 => Self::Inactive,
1177
1178                1 => Self::Suspending,
1179
1180                2 => Self::Active,
1181
1182                value => Self::UnknownOrdinal_(value),
1183            }
1184        }
1185    }
1186
1187    impl ::fidl_next::FromWire<crate::wire::ExecutionStateLevel> for ExecutionStateLevel {
1188        #[inline]
1189        fn from_wire(wire: crate::wire::ExecutionStateLevel) -> Self {
1190            Self::from(wire)
1191        }
1192    }
1193
1194    impl ::fidl_next::FromWireRef<crate::wire::ExecutionStateLevel> for ExecutionStateLevel {
1195        #[inline]
1196        fn from_wire_ref(wire: &crate::wire::ExecutionStateLevel) -> Self {
1197            Self::from(*wire)
1198        }
1199    }
1200
1201    pub type SuspendBlockerBeforeSuspendResponse = ();
1202
1203    pub type SuspendBlockerAfterResumeResponse = ();
1204}
1205
1206pub mod wire {
1207
1208    /// The wire type corresponding to [`AcquireWakeLeaseError`].
1209    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1210    #[repr(transparent)]
1211    pub struct AcquireWakeLeaseError {
1212        pub(crate) value: ::fidl_next::wire::Uint32,
1213    }
1214
1215    impl ::fidl_next::Constrained for AcquireWakeLeaseError {
1216        type Constraint = ();
1217
1218        fn validate(
1219            _: ::fidl_next::Slot<'_, Self>,
1220            _: Self::Constraint,
1221        ) -> Result<(), ::fidl_next::ValidationError> {
1222            Ok(())
1223        }
1224    }
1225
1226    unsafe impl ::fidl_next::Wire for AcquireWakeLeaseError {
1227        type Narrowed<'de> = Self;
1228
1229        #[inline]
1230        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1231            // Wire enums have no padding
1232        }
1233    }
1234
1235    impl AcquireWakeLeaseError {
1236        pub const INTERNAL: AcquireWakeLeaseError =
1237            AcquireWakeLeaseError { value: ::fidl_next::wire::Uint32(1) };
1238
1239        pub const INVALID_NAME: AcquireWakeLeaseError =
1240            AcquireWakeLeaseError { value: ::fidl_next::wire::Uint32(2) };
1241    }
1242
1243    unsafe impl<___D> ::fidl_next::Decode<___D> for AcquireWakeLeaseError
1244    where
1245        ___D: ?Sized,
1246    {
1247        fn decode(
1248            slot: ::fidl_next::Slot<'_, Self>,
1249            _: &mut ___D,
1250            _: (),
1251        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1252            Ok(())
1253        }
1254    }
1255
1256    impl ::core::convert::From<crate::natural::AcquireWakeLeaseError> for AcquireWakeLeaseError {
1257        fn from(natural: crate::natural::AcquireWakeLeaseError) -> Self {
1258            match natural {
1259                crate::natural::AcquireWakeLeaseError::Internal => AcquireWakeLeaseError::INTERNAL,
1260
1261                crate::natural::AcquireWakeLeaseError::InvalidName => {
1262                    AcquireWakeLeaseError::INVALID_NAME
1263                }
1264
1265                crate::natural::AcquireWakeLeaseError::UnknownOrdinal_(value) => {
1266                    AcquireWakeLeaseError { value: ::fidl_next::wire::Uint32::from(value) }
1267                }
1268            }
1269        }
1270    }
1271
1272    impl ::fidl_next::IntoNatural for AcquireWakeLeaseError {
1273        type Natural = crate::natural::AcquireWakeLeaseError;
1274    }
1275
1276    /// The wire type corresponding to [`ActivityGovernorAcquireWakeLeaseRequest`].
1277    #[derive(Debug)]
1278    #[repr(C)]
1279    pub struct ActivityGovernorAcquireWakeLeaseRequest<'de> {
1280        pub name: ::fidl_next::wire::String<'de>,
1281    }
1282
1283    static_assertions::const_assert_eq!(
1284        std::mem::size_of::<ActivityGovernorAcquireWakeLeaseRequest<'_>>(),
1285        16
1286    );
1287    static_assertions::const_assert_eq!(
1288        std::mem::align_of::<ActivityGovernorAcquireWakeLeaseRequest<'_>>(),
1289        8
1290    );
1291
1292    static_assertions::const_assert_eq!(
1293        std::mem::offset_of!(ActivityGovernorAcquireWakeLeaseRequest<'_>, name),
1294        0
1295    );
1296
1297    impl ::fidl_next::Constrained for ActivityGovernorAcquireWakeLeaseRequest<'_> {
1298        type Constraint = ();
1299
1300        fn validate(
1301            _: ::fidl_next::Slot<'_, Self>,
1302            _: Self::Constraint,
1303        ) -> Result<(), ::fidl_next::ValidationError> {
1304            Ok(())
1305        }
1306    }
1307
1308    unsafe impl ::fidl_next::Wire for ActivityGovernorAcquireWakeLeaseRequest<'static> {
1309        type Narrowed<'de> = ActivityGovernorAcquireWakeLeaseRequest<'de>;
1310
1311        #[inline]
1312        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1313            ::fidl_next::munge! {
1314                let Self {
1315                    name,
1316
1317                } = &mut *out_;
1318            }
1319
1320            ::fidl_next::Wire::zero_padding(name);
1321        }
1322    }
1323
1324    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ActivityGovernorAcquireWakeLeaseRequest<'de>
1325    where
1326        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1327        ___D: ::fidl_next::Decoder<'de>,
1328    {
1329        fn decode(
1330            slot_: ::fidl_next::Slot<'_, Self>,
1331            decoder_: &mut ___D,
1332            _: (),
1333        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1334            ::fidl_next::munge! {
1335                let Self {
1336                    mut name,
1337
1338                } = slot_;
1339            }
1340
1341            let _field = name.as_mut();
1342            ::fidl_next::Constrained::validate(_field, 64)?;
1343            ::fidl_next::Decode::decode(name.as_mut(), decoder_, 64)?;
1344
1345            let name = unsafe { name.deref_unchecked() };
1346
1347            if name.len() > 64 {
1348                return Err(::fidl_next::DecodeError::VectorTooLong {
1349                    size: name.len() as u64,
1350                    limit: 64,
1351                });
1352            }
1353
1354            Ok(())
1355        }
1356    }
1357
1358    impl<'de> ::fidl_next::IntoNatural for ActivityGovernorAcquireWakeLeaseRequest<'de> {
1359        type Natural = crate::natural::ActivityGovernorAcquireWakeLeaseRequest;
1360    }
1361
1362    /// The wire type corresponding to [`RegisterSuspendBlockerError`].
1363    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1364    #[repr(transparent)]
1365    pub struct RegisterSuspendBlockerError {
1366        pub(crate) value: ::fidl_next::wire::Uint32,
1367    }
1368
1369    impl ::fidl_next::Constrained for RegisterSuspendBlockerError {
1370        type Constraint = ();
1371
1372        fn validate(
1373            _: ::fidl_next::Slot<'_, Self>,
1374            _: Self::Constraint,
1375        ) -> Result<(), ::fidl_next::ValidationError> {
1376            Ok(())
1377        }
1378    }
1379
1380    unsafe impl ::fidl_next::Wire for RegisterSuspendBlockerError {
1381        type Narrowed<'de> = Self;
1382
1383        #[inline]
1384        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1385            // Wire enums have no padding
1386        }
1387    }
1388
1389    impl RegisterSuspendBlockerError {
1390        pub const INTERNAL: RegisterSuspendBlockerError =
1391            RegisterSuspendBlockerError { value: ::fidl_next::wire::Uint32(1) };
1392
1393        pub const INVALID_ARGS: RegisterSuspendBlockerError =
1394            RegisterSuspendBlockerError { value: ::fidl_next::wire::Uint32(2) };
1395    }
1396
1397    unsafe impl<___D> ::fidl_next::Decode<___D> for RegisterSuspendBlockerError
1398    where
1399        ___D: ?Sized,
1400    {
1401        fn decode(
1402            slot: ::fidl_next::Slot<'_, Self>,
1403            _: &mut ___D,
1404            _: (),
1405        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1406            Ok(())
1407        }
1408    }
1409
1410    impl ::core::convert::From<crate::natural::RegisterSuspendBlockerError>
1411        for RegisterSuspendBlockerError
1412    {
1413        fn from(natural: crate::natural::RegisterSuspendBlockerError) -> Self {
1414            match natural {
1415                crate::natural::RegisterSuspendBlockerError::Internal => {
1416                    RegisterSuspendBlockerError::INTERNAL
1417                }
1418
1419                crate::natural::RegisterSuspendBlockerError::InvalidArgs => {
1420                    RegisterSuspendBlockerError::INVALID_ARGS
1421                }
1422
1423                crate::natural::RegisterSuspendBlockerError::UnknownOrdinal_(value) => {
1424                    RegisterSuspendBlockerError { value: ::fidl_next::wire::Uint32::from(value) }
1425                }
1426            }
1427        }
1428    }
1429
1430    impl ::fidl_next::IntoNatural for RegisterSuspendBlockerError {
1431        type Natural = crate::natural::RegisterSuspendBlockerError;
1432    }
1433
1434    /// The wire type corresponding to [`ActivityGovernorTakeWakeLeaseRequest`].
1435    #[derive(Debug)]
1436    #[repr(C)]
1437    pub struct ActivityGovernorTakeWakeLeaseRequest<'de> {
1438        pub name: ::fidl_next::wire::String<'de>,
1439    }
1440
1441    static_assertions::const_assert_eq!(
1442        std::mem::size_of::<ActivityGovernorTakeWakeLeaseRequest<'_>>(),
1443        16
1444    );
1445    static_assertions::const_assert_eq!(
1446        std::mem::align_of::<ActivityGovernorTakeWakeLeaseRequest<'_>>(),
1447        8
1448    );
1449
1450    static_assertions::const_assert_eq!(
1451        std::mem::offset_of!(ActivityGovernorTakeWakeLeaseRequest<'_>, name),
1452        0
1453    );
1454
1455    impl ::fidl_next::Constrained for ActivityGovernorTakeWakeLeaseRequest<'_> {
1456        type Constraint = ();
1457
1458        fn validate(
1459            _: ::fidl_next::Slot<'_, Self>,
1460            _: Self::Constraint,
1461        ) -> Result<(), ::fidl_next::ValidationError> {
1462            Ok(())
1463        }
1464    }
1465
1466    unsafe impl ::fidl_next::Wire for ActivityGovernorTakeWakeLeaseRequest<'static> {
1467        type Narrowed<'de> = ActivityGovernorTakeWakeLeaseRequest<'de>;
1468
1469        #[inline]
1470        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1471            ::fidl_next::munge! {
1472                let Self {
1473                    name,
1474
1475                } = &mut *out_;
1476            }
1477
1478            ::fidl_next::Wire::zero_padding(name);
1479        }
1480    }
1481
1482    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ActivityGovernorTakeWakeLeaseRequest<'de>
1483    where
1484        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1485        ___D: ::fidl_next::Decoder<'de>,
1486    {
1487        fn decode(
1488            slot_: ::fidl_next::Slot<'_, Self>,
1489            decoder_: &mut ___D,
1490            _: (),
1491        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1492            ::fidl_next::munge! {
1493                let Self {
1494                    mut name,
1495
1496                } = slot_;
1497            }
1498
1499            let _field = name.as_mut();
1500            ::fidl_next::Constrained::validate(_field, 64)?;
1501            ::fidl_next::Decode::decode(name.as_mut(), decoder_, 64)?;
1502
1503            let name = unsafe { name.deref_unchecked() };
1504
1505            if name.len() > 64 {
1506                return Err(::fidl_next::DecodeError::VectorTooLong {
1507                    size: name.len() as u64,
1508                    limit: 64,
1509                });
1510            }
1511
1512            Ok(())
1513        }
1514    }
1515
1516    impl<'de> ::fidl_next::IntoNatural for ActivityGovernorTakeWakeLeaseRequest<'de> {
1517        type Natural = crate::natural::ActivityGovernorTakeWakeLeaseRequest;
1518    }
1519
1520    /// The wire type corresponding to [`ActivityGovernorAcquireLongWakeLeaseRequest`].
1521    #[derive(Debug)]
1522    #[repr(C)]
1523    pub struct ActivityGovernorAcquireLongWakeLeaseRequest<'de> {
1524        pub name: ::fidl_next::wire::String<'de>,
1525    }
1526
1527    static_assertions::const_assert_eq!(
1528        std::mem::size_of::<ActivityGovernorAcquireLongWakeLeaseRequest<'_>>(),
1529        16
1530    );
1531    static_assertions::const_assert_eq!(
1532        std::mem::align_of::<ActivityGovernorAcquireLongWakeLeaseRequest<'_>>(),
1533        8
1534    );
1535
1536    static_assertions::const_assert_eq!(
1537        std::mem::offset_of!(ActivityGovernorAcquireLongWakeLeaseRequest<'_>, name),
1538        0
1539    );
1540
1541    impl ::fidl_next::Constrained for ActivityGovernorAcquireLongWakeLeaseRequest<'_> {
1542        type Constraint = ();
1543
1544        fn validate(
1545            _: ::fidl_next::Slot<'_, Self>,
1546            _: Self::Constraint,
1547        ) -> Result<(), ::fidl_next::ValidationError> {
1548            Ok(())
1549        }
1550    }
1551
1552    unsafe impl ::fidl_next::Wire for ActivityGovernorAcquireLongWakeLeaseRequest<'static> {
1553        type Narrowed<'de> = ActivityGovernorAcquireLongWakeLeaseRequest<'de>;
1554
1555        #[inline]
1556        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1557            ::fidl_next::munge! {
1558                let Self {
1559                    name,
1560
1561                } = &mut *out_;
1562            }
1563
1564            ::fidl_next::Wire::zero_padding(name);
1565        }
1566    }
1567
1568    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
1569        for ActivityGovernorAcquireLongWakeLeaseRequest<'de>
1570    where
1571        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1572        ___D: ::fidl_next::Decoder<'de>,
1573    {
1574        fn decode(
1575            slot_: ::fidl_next::Slot<'_, Self>,
1576            decoder_: &mut ___D,
1577            _: (),
1578        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1579            ::fidl_next::munge! {
1580                let Self {
1581                    mut name,
1582
1583                } = slot_;
1584            }
1585
1586            let _field = name.as_mut();
1587            ::fidl_next::Constrained::validate(_field, 64)?;
1588            ::fidl_next::Decode::decode(name.as_mut(), decoder_, 64)?;
1589
1590            let name = unsafe { name.deref_unchecked() };
1591
1592            if name.len() > 64 {
1593                return Err(::fidl_next::DecodeError::VectorTooLong {
1594                    size: name.len() as u64,
1595                    limit: 64,
1596                });
1597            }
1598
1599            Ok(())
1600        }
1601    }
1602
1603    impl<'de> ::fidl_next::IntoNatural for ActivityGovernorAcquireLongWakeLeaseRequest<'de> {
1604        type Natural = crate::natural::ActivityGovernorAcquireLongWakeLeaseRequest;
1605    }
1606
1607    /// The wire type corresponding to [`ActivityGovernorAcquireWakeLeaseWithTokenResponse`].
1608    pub type ActivityGovernorAcquireWakeLeaseWithTokenResponse = ::fidl_next::wire::Unit;
1609
1610    /// The wire type corresponding to [`ActivityGovernorTakeApplicationActivityLeaseRequest`].
1611    #[derive(Debug)]
1612    #[repr(C)]
1613    pub struct ActivityGovernorTakeApplicationActivityLeaseRequest<'de> {
1614        pub name: ::fidl_next::wire::String<'de>,
1615    }
1616
1617    static_assertions::const_assert_eq!(
1618        std::mem::size_of::<ActivityGovernorTakeApplicationActivityLeaseRequest<'_>>(),
1619        16
1620    );
1621    static_assertions::const_assert_eq!(
1622        std::mem::align_of::<ActivityGovernorTakeApplicationActivityLeaseRequest<'_>>(),
1623        8
1624    );
1625
1626    static_assertions::const_assert_eq!(
1627        std::mem::offset_of!(ActivityGovernorTakeApplicationActivityLeaseRequest<'_>, name),
1628        0
1629    );
1630
1631    impl ::fidl_next::Constrained for ActivityGovernorTakeApplicationActivityLeaseRequest<'_> {
1632        type Constraint = ();
1633
1634        fn validate(
1635            _: ::fidl_next::Slot<'_, Self>,
1636            _: Self::Constraint,
1637        ) -> Result<(), ::fidl_next::ValidationError> {
1638            Ok(())
1639        }
1640    }
1641
1642    unsafe impl ::fidl_next::Wire for ActivityGovernorTakeApplicationActivityLeaseRequest<'static> {
1643        type Narrowed<'de> = ActivityGovernorTakeApplicationActivityLeaseRequest<'de>;
1644
1645        #[inline]
1646        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1647            ::fidl_next::munge! {
1648                let Self {
1649                    name,
1650
1651                } = &mut *out_;
1652            }
1653
1654            ::fidl_next::Wire::zero_padding(name);
1655        }
1656    }
1657
1658    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
1659        for ActivityGovernorTakeApplicationActivityLeaseRequest<'de>
1660    where
1661        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1662        ___D: ::fidl_next::Decoder<'de>,
1663    {
1664        fn decode(
1665            slot_: ::fidl_next::Slot<'_, Self>,
1666            decoder_: &mut ___D,
1667            _: (),
1668        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1669            ::fidl_next::munge! {
1670                let Self {
1671                    mut name,
1672
1673                } = slot_;
1674            }
1675
1676            let _field = name.as_mut();
1677            ::fidl_next::Constrained::validate(_field, 64)?;
1678            ::fidl_next::Decode::decode(name.as_mut(), decoder_, 64)?;
1679
1680            let name = unsafe { name.deref_unchecked() };
1681
1682            if name.len() > 64 {
1683                return Err(::fidl_next::DecodeError::VectorTooLong {
1684                    size: name.len() as u64,
1685                    limit: 64,
1686                });
1687            }
1688
1689            Ok(())
1690        }
1691    }
1692
1693    impl<'de> ::fidl_next::IntoNatural for ActivityGovernorTakeApplicationActivityLeaseRequest<'de> {
1694        type Natural = crate::natural::ActivityGovernorTakeApplicationActivityLeaseRequest;
1695    }
1696
1697    /// The wire type corresponding to [`AddExecutionStateDependencyError`].
1698    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1699    #[repr(transparent)]
1700    pub struct AddExecutionStateDependencyError {
1701        pub(crate) value: ::fidl_next::wire::Uint32,
1702    }
1703
1704    impl ::fidl_next::Constrained for AddExecutionStateDependencyError {
1705        type Constraint = ();
1706
1707        fn validate(
1708            _: ::fidl_next::Slot<'_, Self>,
1709            _: Self::Constraint,
1710        ) -> Result<(), ::fidl_next::ValidationError> {
1711            Ok(())
1712        }
1713    }
1714
1715    unsafe impl ::fidl_next::Wire for AddExecutionStateDependencyError {
1716        type Narrowed<'de> = Self;
1717
1718        #[inline]
1719        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1720            // Wire enums have no padding
1721        }
1722    }
1723
1724    impl AddExecutionStateDependencyError {
1725        pub const INVALID_ARGS: AddExecutionStateDependencyError =
1726            AddExecutionStateDependencyError { value: ::fidl_next::wire::Uint32(1) };
1727
1728        pub const BAD_STATE: AddExecutionStateDependencyError =
1729            AddExecutionStateDependencyError { value: ::fidl_next::wire::Uint32(2) };
1730    }
1731
1732    unsafe impl<___D> ::fidl_next::Decode<___D> for AddExecutionStateDependencyError
1733    where
1734        ___D: ?Sized,
1735    {
1736        fn decode(
1737            slot: ::fidl_next::Slot<'_, Self>,
1738            _: &mut ___D,
1739            _: (),
1740        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1741            Ok(())
1742        }
1743    }
1744
1745    impl ::core::convert::From<crate::natural::AddExecutionStateDependencyError>
1746        for AddExecutionStateDependencyError
1747    {
1748        fn from(natural: crate::natural::AddExecutionStateDependencyError) -> Self {
1749            match natural {
1750                crate::natural::AddExecutionStateDependencyError::InvalidArgs => {
1751                    AddExecutionStateDependencyError::INVALID_ARGS
1752                }
1753
1754                crate::natural::AddExecutionStateDependencyError::BadState => {
1755                    AddExecutionStateDependencyError::BAD_STATE
1756                }
1757
1758                crate::natural::AddExecutionStateDependencyError::UnknownOrdinal_(value) => {
1759                    AddExecutionStateDependencyError {
1760                        value: ::fidl_next::wire::Uint32::from(value),
1761                    }
1762                }
1763            }
1764        }
1765    }
1766
1767    impl ::fidl_next::IntoNatural for AddExecutionStateDependencyError {
1768        type Natural = crate::natural::AddExecutionStateDependencyError;
1769    }
1770
1771    /// The wire type corresponding to [`ApplicationActivityLevel`].
1772    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1773    #[repr(transparent)]
1774    pub struct ApplicationActivityLevel {
1775        pub(crate) value: u8,
1776    }
1777
1778    impl ::fidl_next::Constrained for ApplicationActivityLevel {
1779        type Constraint = ();
1780
1781        fn validate(
1782            _: ::fidl_next::Slot<'_, Self>,
1783            _: Self::Constraint,
1784        ) -> Result<(), ::fidl_next::ValidationError> {
1785            Ok(())
1786        }
1787    }
1788
1789    unsafe impl ::fidl_next::Wire for ApplicationActivityLevel {
1790        type Narrowed<'de> = Self;
1791
1792        #[inline]
1793        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1794            // Wire enums have no padding
1795        }
1796    }
1797
1798    impl ApplicationActivityLevel {
1799        pub const INACTIVE: ApplicationActivityLevel = ApplicationActivityLevel { value: 0 };
1800
1801        pub const ACTIVE: ApplicationActivityLevel = ApplicationActivityLevel { value: 1 };
1802    }
1803
1804    unsafe impl<___D> ::fidl_next::Decode<___D> for ApplicationActivityLevel
1805    where
1806        ___D: ?Sized,
1807    {
1808        fn decode(
1809            slot: ::fidl_next::Slot<'_, Self>,
1810            _: &mut ___D,
1811            _: (),
1812        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1813            Ok(())
1814        }
1815    }
1816
1817    impl ::core::convert::From<crate::natural::ApplicationActivityLevel> for ApplicationActivityLevel {
1818        fn from(natural: crate::natural::ApplicationActivityLevel) -> Self {
1819            match natural {
1820                crate::natural::ApplicationActivityLevel::Inactive => {
1821                    ApplicationActivityLevel::INACTIVE
1822                }
1823
1824                crate::natural::ApplicationActivityLevel::Active => {
1825                    ApplicationActivityLevel::ACTIVE
1826                }
1827
1828                crate::natural::ApplicationActivityLevel::UnknownOrdinal_(value) => {
1829                    ApplicationActivityLevel { value: u8::from(value) }
1830                }
1831            }
1832        }
1833    }
1834
1835    impl ::fidl_next::IntoNatural for ApplicationActivityLevel {
1836        type Natural = crate::natural::ApplicationActivityLevel;
1837    }
1838
1839    /// The wire type corresponding to [`BootControlSetBootCompleteResponse`].
1840    pub type BootControlSetBootCompleteResponse = ::fidl_next::wire::Unit;
1841
1842    /// The wire type corresponding to [`CpuElementManagerAddExecutionStateDependencyResponse`].
1843    pub type CpuElementManagerAddExecutionStateDependencyResponse = ::fidl_next::wire::Unit;
1844
1845    /// The wire type corresponding to [`CpuLevel`].
1846    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1847    #[repr(transparent)]
1848    pub struct CpuLevel {
1849        pub(crate) value: u8,
1850    }
1851
1852    impl ::fidl_next::Constrained for CpuLevel {
1853        type Constraint = ();
1854
1855        fn validate(
1856            _: ::fidl_next::Slot<'_, Self>,
1857            _: Self::Constraint,
1858        ) -> Result<(), ::fidl_next::ValidationError> {
1859            Ok(())
1860        }
1861    }
1862
1863    unsafe impl ::fidl_next::Wire for CpuLevel {
1864        type Narrowed<'de> = Self;
1865
1866        #[inline]
1867        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1868            // Wire enums have no padding
1869        }
1870    }
1871
1872    impl CpuLevel {
1873        pub const INACTIVE: CpuLevel = CpuLevel { value: 0 };
1874
1875        pub const ACTIVE: CpuLevel = CpuLevel { value: 1 };
1876    }
1877
1878    unsafe impl<___D> ::fidl_next::Decode<___D> for CpuLevel
1879    where
1880        ___D: ?Sized,
1881    {
1882        fn decode(
1883            slot: ::fidl_next::Slot<'_, Self>,
1884            _: &mut ___D,
1885            _: (),
1886        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1887            Ok(())
1888        }
1889    }
1890
1891    impl ::core::convert::From<crate::natural::CpuLevel> for CpuLevel {
1892        fn from(natural: crate::natural::CpuLevel) -> Self {
1893            match natural {
1894                crate::natural::CpuLevel::Inactive => CpuLevel::INACTIVE,
1895
1896                crate::natural::CpuLevel::Active => CpuLevel::ACTIVE,
1897
1898                crate::natural::CpuLevel::UnknownOrdinal_(value) => {
1899                    CpuLevel { value: u8::from(value) }
1900                }
1901            }
1902        }
1903    }
1904
1905    impl ::fidl_next::IntoNatural for CpuLevel {
1906        type Natural = crate::natural::CpuLevel;
1907    }
1908
1909    /// The wire type corresponding to [`ExecutionStateLevel`].
1910    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1911    #[repr(transparent)]
1912    pub struct ExecutionStateLevel {
1913        pub(crate) value: u8,
1914    }
1915
1916    impl ::fidl_next::Constrained for ExecutionStateLevel {
1917        type Constraint = ();
1918
1919        fn validate(
1920            _: ::fidl_next::Slot<'_, Self>,
1921            _: Self::Constraint,
1922        ) -> Result<(), ::fidl_next::ValidationError> {
1923            Ok(())
1924        }
1925    }
1926
1927    unsafe impl ::fidl_next::Wire for ExecutionStateLevel {
1928        type Narrowed<'de> = Self;
1929
1930        #[inline]
1931        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1932            // Wire enums have no padding
1933        }
1934    }
1935
1936    impl ExecutionStateLevel {
1937        pub const INACTIVE: ExecutionStateLevel = ExecutionStateLevel { value: 0 };
1938
1939        pub const SUSPENDING: ExecutionStateLevel = ExecutionStateLevel { value: 1 };
1940
1941        pub const ACTIVE: ExecutionStateLevel = ExecutionStateLevel { value: 2 };
1942    }
1943
1944    unsafe impl<___D> ::fidl_next::Decode<___D> for ExecutionStateLevel
1945    where
1946        ___D: ?Sized,
1947    {
1948        fn decode(
1949            slot: ::fidl_next::Slot<'_, Self>,
1950            _: &mut ___D,
1951            _: (),
1952        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1953            Ok(())
1954        }
1955    }
1956
1957    impl ::core::convert::From<crate::natural::ExecutionStateLevel> for ExecutionStateLevel {
1958        fn from(natural: crate::natural::ExecutionStateLevel) -> Self {
1959            match natural {
1960                crate::natural::ExecutionStateLevel::Inactive => ExecutionStateLevel::INACTIVE,
1961
1962                crate::natural::ExecutionStateLevel::Suspending => ExecutionStateLevel::SUSPENDING,
1963
1964                crate::natural::ExecutionStateLevel::Active => ExecutionStateLevel::ACTIVE,
1965
1966                crate::natural::ExecutionStateLevel::UnknownOrdinal_(value) => {
1967                    ExecutionStateLevel { value: u8::from(value) }
1968                }
1969            }
1970        }
1971    }
1972
1973    impl ::fidl_next::IntoNatural for ExecutionStateLevel {
1974        type Natural = crate::natural::ExecutionStateLevel;
1975    }
1976
1977    /// The wire type corresponding to [`SuspendBlockerBeforeSuspendResponse`].
1978    pub type SuspendBlockerBeforeSuspendResponse = ::fidl_next::wire::Unit;
1979
1980    /// The wire type corresponding to [`SuspendBlockerAfterResumeResponse`].
1981    pub type SuspendBlockerAfterResumeResponse = ::fidl_next::wire::Unit;
1982}
1983
1984pub mod wire_optional {}
1985
1986pub mod generic {
1987
1988    /// The generic type corresponding to [`ActivityGovernorAcquireWakeLeaseRequest`].
1989    pub struct ActivityGovernorAcquireWakeLeaseRequest<T0> {
1990        pub name: T0,
1991    }
1992
1993    unsafe impl<___E, T0>
1994        ::fidl_next::Encode<crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>, ___E>
1995        for ActivityGovernorAcquireWakeLeaseRequest<T0>
1996    where
1997        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1998        ___E: ::fidl_next::Encoder,
1999        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
2000    {
2001        #[inline]
2002        fn encode(
2003            self,
2004            encoder_: &mut ___E,
2005            out_: &mut ::core::mem::MaybeUninit<
2006                crate::wire::ActivityGovernorAcquireWakeLeaseRequest<'static>,
2007            >,
2008            _: (),
2009        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2010            ::fidl_next::munge! {
2011                let crate::wire::ActivityGovernorAcquireWakeLeaseRequest {
2012                    name,
2013
2014                } = out_;
2015            }
2016
2017            ::fidl_next::Encode::encode(self.name, encoder_, name, 64)?;
2018
2019            Ok(())
2020        }
2021    }
2022
2023    /// The generic type corresponding to [`ActivityGovernorTakeWakeLeaseRequest`].
2024    pub struct ActivityGovernorTakeWakeLeaseRequest<T0> {
2025        pub name: T0,
2026    }
2027
2028    unsafe impl<___E, T0>
2029        ::fidl_next::Encode<crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>, ___E>
2030        for ActivityGovernorTakeWakeLeaseRequest<T0>
2031    where
2032        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2033        ___E: ::fidl_next::Encoder,
2034        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
2035    {
2036        #[inline]
2037        fn encode(
2038            self,
2039            encoder_: &mut ___E,
2040            out_: &mut ::core::mem::MaybeUninit<
2041                crate::wire::ActivityGovernorTakeWakeLeaseRequest<'static>,
2042            >,
2043            _: (),
2044        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2045            ::fidl_next::munge! {
2046                let crate::wire::ActivityGovernorTakeWakeLeaseRequest {
2047                    name,
2048
2049                } = out_;
2050            }
2051
2052            ::fidl_next::Encode::encode(self.name, encoder_, name, 64)?;
2053
2054            Ok(())
2055        }
2056    }
2057
2058    /// The generic type corresponding to [`ActivityGovernorAcquireLongWakeLeaseRequest`].
2059    pub struct ActivityGovernorAcquireLongWakeLeaseRequest<T0> {
2060        pub name: T0,
2061    }
2062
2063    unsafe impl<___E, T0>
2064        ::fidl_next::Encode<crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>, ___E>
2065        for ActivityGovernorAcquireLongWakeLeaseRequest<T0>
2066    where
2067        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2068        ___E: ::fidl_next::Encoder,
2069        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
2070    {
2071        #[inline]
2072        fn encode(
2073            self,
2074            encoder_: &mut ___E,
2075            out_: &mut ::core::mem::MaybeUninit<
2076                crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest<'static>,
2077            >,
2078            _: (),
2079        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2080            ::fidl_next::munge! {
2081                let crate::wire::ActivityGovernorAcquireLongWakeLeaseRequest {
2082                    name,
2083
2084                } = out_;
2085            }
2086
2087            ::fidl_next::Encode::encode(self.name, encoder_, name, 64)?;
2088
2089            Ok(())
2090        }
2091    }
2092
2093    /// The generic type corresponding to [`ActivityGovernorAcquireWakeLeaseWithTokenResponse`].
2094    pub type ActivityGovernorAcquireWakeLeaseWithTokenResponse = ();
2095
2096    /// The generic type corresponding to [`ActivityGovernorTakeApplicationActivityLeaseRequest`].
2097    pub struct ActivityGovernorTakeApplicationActivityLeaseRequest<T0> {
2098        pub name: T0,
2099    }
2100
2101    unsafe impl<___E, T0>
2102        ::fidl_next::Encode<
2103            crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
2104            ___E,
2105        > for ActivityGovernorTakeApplicationActivityLeaseRequest<T0>
2106    where
2107        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2108        ___E: ::fidl_next::Encoder,
2109        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
2110    {
2111        #[inline]
2112        fn encode(
2113            self,
2114            encoder_: &mut ___E,
2115            out_: &mut ::core::mem::MaybeUninit<
2116                crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest<'static>,
2117            >,
2118            _: (),
2119        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2120            ::fidl_next::munge! {
2121                let crate::wire::ActivityGovernorTakeApplicationActivityLeaseRequest {
2122                    name,
2123
2124                } = out_;
2125            }
2126
2127            ::fidl_next::Encode::encode(self.name, encoder_, name, 64)?;
2128
2129            Ok(())
2130        }
2131    }
2132
2133    /// The generic type corresponding to [`BootControlSetBootCompleteResponse`].
2134    pub type BootControlSetBootCompleteResponse = ();
2135
2136    /// The generic type corresponding to [`CpuElementManagerAddExecutionStateDependencyResponse`].
2137    pub type CpuElementManagerAddExecutionStateDependencyResponse = ();
2138
2139    /// The generic type corresponding to [`SuspendBlockerBeforeSuspendResponse`].
2140    pub type SuspendBlockerBeforeSuspendResponse = ();
2141
2142    /// The generic type corresponding to [`SuspendBlockerAfterResumeResponse`].
2143    pub type SuspendBlockerAfterResumeResponse = ();
2144}
2145
2146pub use self::natural::*;
2147
2148pub const MAX_ELEMENT_NAME_LEN: u8 = 64 as u8;
2149
2150/// The type corresponding to the BootControl protocol.
2151#[doc = " A service that processes notification about the system boot state.\n"]
2152#[derive(PartialEq, Debug)]
2153pub struct BootControl;
2154
2155impl ::fidl_next::Discoverable for BootControl {
2156    const PROTOCOL_NAME: &'static str = "fuchsia.power.system.BootControl";
2157}
2158
2159#[cfg(target_os = "fuchsia")]
2160impl ::fidl_next::HasTransport for BootControl {
2161    type Transport = ::fidl_next::fuchsia::zx::Channel;
2162}
2163
2164pub mod boot_control {
2165    pub mod prelude {
2166        pub use crate::{
2167            BootControl, BootControlClientHandler, BootControlLocalClientHandler,
2168            BootControlLocalServerHandler, BootControlServerHandler, boot_control,
2169        };
2170
2171        pub use crate::natural::BootControlSetBootCompleteResponse;
2172    }
2173
2174    pub struct SetBootComplete;
2175
2176    impl ::fidl_next::Method for SetBootComplete {
2177        const ORDINAL: u64 = 4367259243539899061;
2178        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2179            ::fidl_next::protocol::Flexibility::Flexible;
2180
2181        type Protocol = crate::BootControl;
2182
2183        type Request = ::fidl_next::wire::EmptyMessageBody;
2184    }
2185
2186    impl ::fidl_next::TwoWayMethod for SetBootComplete {
2187        type Response =
2188            ::fidl_next::wire::Flexible<'static, crate::wire::BootControlSetBootCompleteResponse>;
2189    }
2190
2191    impl<___R> ::fidl_next::Respond<___R> for SetBootComplete {
2192        type Output = ::fidl_next::Flexible<___R>;
2193
2194        fn respond(response: ___R) -> Self::Output {
2195            ::fidl_next::Flexible::Ok(response)
2196        }
2197    }
2198
2199    mod ___detail {
2200        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::BootControl
2201        where
2202            ___T: ::fidl_next::Transport,
2203        {
2204            type Client = BootControlClient<___T>;
2205            type Server = BootControlServer<___T>;
2206        }
2207
2208        /// The client for the `BootControl` protocol.
2209        #[repr(transparent)]
2210        pub struct BootControlClient<___T: ::fidl_next::Transport> {
2211            #[allow(dead_code)]
2212            client: ::fidl_next::protocol::Client<___T>,
2213        }
2214
2215        impl<___T> BootControlClient<___T>
2216        where
2217            ___T: ::fidl_next::Transport,
2218        {
2219            #[doc = " Notify the SAG that the system has booted. SAG will not suspend the\n hardware platform until this method is called at least once per boot.\n"]
2220            pub fn set_boot_complete(
2221                &self,
2222            ) -> ::fidl_next::TwoWayFuture<'_, super::SetBootComplete, ___T> {
2223                ::fidl_next::TwoWayFuture::from_untyped(
2224                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
2225                        4367259243539899061,
2226                        <super::SetBootComplete as ::fidl_next::Method>::FLEXIBILITY,
2227                        (),
2228                    ),
2229                )
2230            }
2231        }
2232
2233        /// The server for the `BootControl` protocol.
2234        #[repr(transparent)]
2235        pub struct BootControlServer<___T: ::fidl_next::Transport> {
2236            server: ::fidl_next::protocol::Server<___T>,
2237        }
2238
2239        impl<___T> BootControlServer<___T> where ___T: ::fidl_next::Transport {}
2240    }
2241}
2242
2243#[diagnostic::on_unimplemented(
2244    note = "If {Self} implements the non-local BootControlClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
2245)]
2246
2247/// A client handler for the BootControl protocol.
2248///
2249/// See [`BootControl`] for more details.
2250pub trait BootControlLocalClientHandler<
2251    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2252    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2253>
2254{
2255    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
2256        ::core::future::ready(())
2257    }
2258}
2259
2260impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for BootControl
2261where
2262    ___H: BootControlLocalClientHandler<___T>,
2263    ___T: ::fidl_next::Transport,
2264{
2265    async fn on_event(
2266        handler: &mut ___H,
2267        ordinal: u64,
2268        flexibility: ::fidl_next::protocol::Flexibility,
2269        body: ::fidl_next::Body<___T>,
2270    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2271        match ordinal {
2272            ordinal => {
2273                handler.on_unknown_interaction(ordinal).await;
2274                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2275                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2276                } else {
2277                    Ok(())
2278                }
2279            }
2280        }
2281    }
2282}
2283
2284#[diagnostic::on_unimplemented(
2285    note = "If {Self} implements the non-local BootControlServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2286)]
2287
2288/// A server handler for the BootControl protocol.
2289///
2290/// See [`BootControl`] for more details.
2291pub trait BootControlLocalServerHandler<
2292    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2293    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2294>
2295{
2296    #[doc = " Notify the SAG that the system has booted. SAG will not suspend the\n hardware platform until this method is called at least once per boot.\n"]
2297    fn set_boot_complete(
2298        &mut self,
2299
2300        responder: ::fidl_next::Responder<boot_control::SetBootComplete, ___T>,
2301    ) -> impl ::core::future::Future<Output = ()>;
2302
2303    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
2304        ::core::future::ready(())
2305    }
2306}
2307
2308impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for BootControl
2309where
2310    ___H: BootControlLocalServerHandler<___T>,
2311    ___T: ::fidl_next::Transport,
2312{
2313    async fn on_one_way(
2314        handler: &mut ___H,
2315        ordinal: u64,
2316        flexibility: ::fidl_next::protocol::Flexibility,
2317        body: ::fidl_next::Body<___T>,
2318    ) -> ::core::result::Result<
2319        (),
2320        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2321    > {
2322        match ordinal {
2323            ordinal => {
2324                handler.on_unknown_interaction(ordinal).await;
2325                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2326                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2327                } else {
2328                    Ok(())
2329                }
2330            }
2331        }
2332    }
2333
2334    async fn on_two_way(
2335        handler: &mut ___H,
2336        ordinal: u64,
2337        flexibility: ::fidl_next::protocol::Flexibility,
2338        body: ::fidl_next::Body<___T>,
2339        responder: ::fidl_next::protocol::Responder<___T>,
2340    ) -> ::core::result::Result<
2341        (),
2342        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2343    > {
2344        match ordinal {
2345            4367259243539899061 => {
2346                let responder = ::fidl_next::Responder::from_untyped(responder);
2347
2348                handler.set_boot_complete(responder).await;
2349                Ok(())
2350            }
2351
2352            ordinal => {
2353                handler.on_unknown_interaction(ordinal).await;
2354                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2355                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2356                } else {
2357                    responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
2358                                ordinal,
2359                                flexibility,
2360                                ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
2361                            )
2362                            .expect("encoding a framework error should never fail")
2363                            .await?;
2364                    Ok(())
2365                }
2366            }
2367        }
2368    }
2369}
2370
2371/// A client handler for the BootControl protocol.
2372///
2373/// See [`BootControl`] for more details.
2374pub trait BootControlClientHandler<
2375    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2376    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2377>
2378{
2379    fn on_unknown_interaction(
2380        &mut self,
2381        ordinal: u64,
2382    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2383        ::core::future::ready(())
2384    }
2385}
2386
2387impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for BootControl
2388where
2389    ___H: BootControlClientHandler<___T> + ::core::marker::Send,
2390    ___T: ::fidl_next::Transport,
2391{
2392    async fn on_event(
2393        handler: &mut ___H,
2394        ordinal: u64,
2395        flexibility: ::fidl_next::protocol::Flexibility,
2396        body: ::fidl_next::Body<___T>,
2397    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2398        match ordinal {
2399            ordinal => {
2400                handler.on_unknown_interaction(ordinal).await;
2401                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2402                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2403                } else {
2404                    Ok(())
2405                }
2406            }
2407        }
2408    }
2409}
2410
2411/// A server handler for the BootControl protocol.
2412///
2413/// See [`BootControl`] for more details.
2414pub trait BootControlServerHandler<
2415    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2416    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2417>
2418{
2419    #[doc = " Notify the SAG that the system has booted. SAG will not suspend the\n hardware platform until this method is called at least once per boot.\n"]
2420    fn set_boot_complete(
2421        &mut self,
2422
2423        responder: ::fidl_next::Responder<boot_control::SetBootComplete, ___T>,
2424    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2425
2426    fn on_unknown_interaction(
2427        &mut self,
2428        ordinal: u64,
2429    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2430        ::core::future::ready(())
2431    }
2432}
2433
2434impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for BootControl
2435where
2436    ___H: BootControlServerHandler<___T> + ::core::marker::Send,
2437    ___T: ::fidl_next::Transport,
2438{
2439    async fn on_one_way(
2440        handler: &mut ___H,
2441        ordinal: u64,
2442        flexibility: ::fidl_next::protocol::Flexibility,
2443        body: ::fidl_next::Body<___T>,
2444    ) -> ::core::result::Result<
2445        (),
2446        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2447    > {
2448        match ordinal {
2449            ordinal => {
2450                handler.on_unknown_interaction(ordinal).await;
2451                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2452                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2453                } else {
2454                    Ok(())
2455                }
2456            }
2457        }
2458    }
2459
2460    async fn on_two_way(
2461        handler: &mut ___H,
2462        ordinal: u64,
2463        flexibility: ::fidl_next::protocol::Flexibility,
2464        body: ::fidl_next::Body<___T>,
2465        responder: ::fidl_next::protocol::Responder<___T>,
2466    ) -> ::core::result::Result<
2467        (),
2468        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2469    > {
2470        match ordinal {
2471            4367259243539899061 => {
2472                let responder = ::fidl_next::Responder::from_untyped(responder);
2473
2474                handler.set_boot_complete(responder).await;
2475                Ok(())
2476            }
2477
2478            ordinal => {
2479                handler.on_unknown_interaction(ordinal).await;
2480                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2481                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2482                } else {
2483                    responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
2484                                ordinal,
2485                                flexibility,
2486                                ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
2487                            )
2488                            .expect("encoding a framework error should never fail")
2489                            .await?;
2490                    Ok(())
2491                }
2492            }
2493        }
2494    }
2495}
2496
2497impl<___T> BootControlClientHandler<___T> for ::fidl_next::IgnoreEvents
2498where
2499    ___T: ::fidl_next::Transport,
2500{
2501    async fn on_unknown_interaction(&mut self, _: u64) {}
2502}
2503
2504impl<___H, ___T> BootControlLocalClientHandler<___T> for ::fidl_next::Local<___H>
2505where
2506    ___H: BootControlClientHandler<___T>,
2507    ___T: ::fidl_next::Transport,
2508{
2509    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2510        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2511    }
2512}
2513
2514impl<___H, ___T> BootControlLocalServerHandler<___T> for ::fidl_next::Local<___H>
2515where
2516    ___H: BootControlServerHandler<___T>,
2517    ___T: ::fidl_next::Transport,
2518{
2519    async fn set_boot_complete(
2520        &mut self,
2521
2522        responder: ::fidl_next::Responder<boot_control::SetBootComplete, ___T>,
2523    ) {
2524        ___H::set_boot_complete(&mut self.0, responder).await
2525    }
2526
2527    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2528        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2529    }
2530}
2531
2532/// The type corresponding to the SuspendBlocker protocol.
2533#[doc = " An entity that blocks suspend until it handles transitions across hardware\n platform suspend and resume.\n"]
2534#[derive(PartialEq, Debug)]
2535pub struct SuspendBlocker;
2536
2537#[cfg(target_os = "fuchsia")]
2538impl ::fidl_next::HasTransport for SuspendBlocker {
2539    type Transport = ::fidl_next::fuchsia::zx::Channel;
2540}
2541
2542pub mod suspend_blocker {
2543    pub mod prelude {
2544        pub use crate::{
2545            SuspendBlocker, SuspendBlockerClientHandler, SuspendBlockerLocalClientHandler,
2546            SuspendBlockerLocalServerHandler, SuspendBlockerServerHandler, suspend_blocker,
2547        };
2548
2549        pub use crate::natural::SuspendBlockerAfterResumeResponse;
2550
2551        pub use crate::natural::SuspendBlockerBeforeSuspendResponse;
2552    }
2553
2554    pub struct BeforeSuspend;
2555
2556    impl ::fidl_next::Method for BeforeSuspend {
2557        const ORDINAL: u64 = 7734531672310967680;
2558        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2559            ::fidl_next::protocol::Flexibility::Flexible;
2560
2561        type Protocol = crate::SuspendBlocker;
2562
2563        type Request = ::fidl_next::wire::EmptyMessageBody;
2564    }
2565
2566    impl ::fidl_next::TwoWayMethod for BeforeSuspend {
2567        type Response =
2568            ::fidl_next::wire::Flexible<'static, crate::wire::SuspendBlockerBeforeSuspendResponse>;
2569    }
2570
2571    impl<___R> ::fidl_next::Respond<___R> for BeforeSuspend {
2572        type Output = ::fidl_next::Flexible<___R>;
2573
2574        fn respond(response: ___R) -> Self::Output {
2575            ::fidl_next::Flexible::Ok(response)
2576        }
2577    }
2578
2579    pub struct AfterResume;
2580
2581    impl ::fidl_next::Method for AfterResume {
2582        const ORDINAL: u64 = 7652351326344392170;
2583        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2584            ::fidl_next::protocol::Flexibility::Flexible;
2585
2586        type Protocol = crate::SuspendBlocker;
2587
2588        type Request = ::fidl_next::wire::EmptyMessageBody;
2589    }
2590
2591    impl ::fidl_next::TwoWayMethod for AfterResume {
2592        type Response =
2593            ::fidl_next::wire::Flexible<'static, crate::wire::SuspendBlockerAfterResumeResponse>;
2594    }
2595
2596    impl<___R> ::fidl_next::Respond<___R> for AfterResume {
2597        type Output = ::fidl_next::Flexible<___R>;
2598
2599        fn respond(response: ___R) -> Self::Output {
2600            ::fidl_next::Flexible::Ok(response)
2601        }
2602    }
2603
2604    mod ___detail {
2605        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::SuspendBlocker
2606        where
2607            ___T: ::fidl_next::Transport,
2608        {
2609            type Client = SuspendBlockerClient<___T>;
2610            type Server = SuspendBlockerServer<___T>;
2611        }
2612
2613        /// The client for the `SuspendBlocker` protocol.
2614        #[repr(transparent)]
2615        pub struct SuspendBlockerClient<___T: ::fidl_next::Transport> {
2616            #[allow(dead_code)]
2617            client: ::fidl_next::protocol::Client<___T>,
2618        }
2619
2620        impl<___T> SuspendBlockerClient<___T>
2621        where
2622            ___T: ::fidl_next::Transport,
2623        {
2624            #[doc = " Called after system activity governor begins operations to suspend the\n hardware platform.\n\n The server is expected to respond once it has performed the operations\n it needs to prepare itself for suspend, if any. All dependencies of\n `ExecutionStateLevel::SUSPENDING` are guaranteed to be satisified for\n the duration of this call and may be revoked once the server replies.\n\n Operations to suspend the hardware platform may vary between different\n hardware platforms and product configurations. At a minimum, the client\n and server MUST assume that general code execution continues\n until a reply to this call is received by the client. If the\n SuspendBlocker wants to preempt suspend operations, it MUST call\n `ActivityGovernor.AcquireWakeLease` before replying to this call.\n\n ExecutionState will be at its SUSPENDING level for the duration of this\n call. Consequently, a SuspendBlocker MUST NOT call\n `ActivityGovernor.TakeApplicationActivityLease` nor perform any other\n  action that blocks on Execution State reaching a level other than\n INACTIVE. Doing so will result in a deadlock. (However, AcquireWakeLease\n does _not_ block in this way and is safe to call.)\n"]
2625            pub fn before_suspend(
2626                &self,
2627            ) -> ::fidl_next::TwoWayFuture<'_, super::BeforeSuspend, ___T> {
2628                ::fidl_next::TwoWayFuture::from_untyped(
2629                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
2630                        7734531672310967680,
2631                        <super::BeforeSuspend as ::fidl_next::Method>::FLEXIBILITY,
2632                        (),
2633                    ),
2634                )
2635            }
2636
2637            #[doc = " Called after system activity governor is aware that the hardware\n platform has resumed.\n\n For the duration of this call, ExecutionState is at level INACTIVE,\n but all dependencies of `ExecutionStateLevel::SUSPENDING` are guaranteed\n be satisified.\n\n Consequently, a SuspendBlocker MUST NOT call\n `ActivityGovernor.TakeApplicationActivityLease` nor perform any other\n  action that blocks on Execution State reaching a level other than\n INACTIVE. Doing so will result in a deadlock. (However, AcquireWakeLease\n does _not_ block in this way and is safe to call.)\n"]
2638            pub fn after_resume(&self) -> ::fidl_next::TwoWayFuture<'_, super::AfterResume, ___T> {
2639                ::fidl_next::TwoWayFuture::from_untyped(
2640                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
2641                        7652351326344392170,
2642                        <super::AfterResume as ::fidl_next::Method>::FLEXIBILITY,
2643                        (),
2644                    ),
2645                )
2646            }
2647        }
2648
2649        /// The server for the `SuspendBlocker` protocol.
2650        #[repr(transparent)]
2651        pub struct SuspendBlockerServer<___T: ::fidl_next::Transport> {
2652            server: ::fidl_next::protocol::Server<___T>,
2653        }
2654
2655        impl<___T> SuspendBlockerServer<___T> where ___T: ::fidl_next::Transport {}
2656    }
2657}
2658
2659#[diagnostic::on_unimplemented(
2660    note = "If {Self} implements the non-local SuspendBlockerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
2661)]
2662
2663/// A client handler for the SuspendBlocker protocol.
2664///
2665/// See [`SuspendBlocker`] for more details.
2666pub trait SuspendBlockerLocalClientHandler<
2667    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2668    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2669>
2670{
2671    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
2672        ::core::future::ready(())
2673    }
2674}
2675
2676impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for SuspendBlocker
2677where
2678    ___H: SuspendBlockerLocalClientHandler<___T>,
2679    ___T: ::fidl_next::Transport,
2680{
2681    async fn on_event(
2682        handler: &mut ___H,
2683        ordinal: u64,
2684        flexibility: ::fidl_next::protocol::Flexibility,
2685        body: ::fidl_next::Body<___T>,
2686    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2687        match ordinal {
2688            ordinal => {
2689                handler.on_unknown_interaction(ordinal).await;
2690                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2691                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2692                } else {
2693                    Ok(())
2694                }
2695            }
2696        }
2697    }
2698}
2699
2700#[diagnostic::on_unimplemented(
2701    note = "If {Self} implements the non-local SuspendBlockerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2702)]
2703
2704/// A server handler for the SuspendBlocker protocol.
2705///
2706/// See [`SuspendBlocker`] for more details.
2707pub trait SuspendBlockerLocalServerHandler<
2708    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2709    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2710>
2711{
2712    #[doc = " Called after system activity governor begins operations to suspend the\n hardware platform.\n\n The server is expected to respond once it has performed the operations\n it needs to prepare itself for suspend, if any. All dependencies of\n `ExecutionStateLevel::SUSPENDING` are guaranteed to be satisified for\n the duration of this call and may be revoked once the server replies.\n\n Operations to suspend the hardware platform may vary between different\n hardware platforms and product configurations. At a minimum, the client\n and server MUST assume that general code execution continues\n until a reply to this call is received by the client. If the\n SuspendBlocker wants to preempt suspend operations, it MUST call\n `ActivityGovernor.AcquireWakeLease` before replying to this call.\n\n ExecutionState will be at its SUSPENDING level for the duration of this\n call. Consequently, a SuspendBlocker MUST NOT call\n `ActivityGovernor.TakeApplicationActivityLease` nor perform any other\n  action that blocks on Execution State reaching a level other than\n INACTIVE. Doing so will result in a deadlock. (However, AcquireWakeLease\n does _not_ block in this way and is safe to call.)\n"]
2713    fn before_suspend(
2714        &mut self,
2715
2716        responder: ::fidl_next::Responder<suspend_blocker::BeforeSuspend, ___T>,
2717    ) -> impl ::core::future::Future<Output = ()>;
2718
2719    #[doc = " Called after system activity governor is aware that the hardware\n platform has resumed.\n\n For the duration of this call, ExecutionState is at level INACTIVE,\n but all dependencies of `ExecutionStateLevel::SUSPENDING` are guaranteed\n be satisified.\n\n Consequently, a SuspendBlocker MUST NOT call\n `ActivityGovernor.TakeApplicationActivityLease` nor perform any other\n  action that blocks on Execution State reaching a level other than\n INACTIVE. Doing so will result in a deadlock. (However, AcquireWakeLease\n does _not_ block in this way and is safe to call.)\n"]
2720    fn after_resume(
2721        &mut self,
2722
2723        responder: ::fidl_next::Responder<suspend_blocker::AfterResume, ___T>,
2724    ) -> impl ::core::future::Future<Output = ()>;
2725
2726    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
2727        ::core::future::ready(())
2728    }
2729}
2730
2731impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for SuspendBlocker
2732where
2733    ___H: SuspendBlockerLocalServerHandler<___T>,
2734    ___T: ::fidl_next::Transport,
2735{
2736    async fn on_one_way(
2737        handler: &mut ___H,
2738        ordinal: u64,
2739        flexibility: ::fidl_next::protocol::Flexibility,
2740        body: ::fidl_next::Body<___T>,
2741    ) -> ::core::result::Result<
2742        (),
2743        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2744    > {
2745        match ordinal {
2746            ordinal => {
2747                handler.on_unknown_interaction(ordinal).await;
2748                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2749                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2750                } else {
2751                    Ok(())
2752                }
2753            }
2754        }
2755    }
2756
2757    async fn on_two_way(
2758        handler: &mut ___H,
2759        ordinal: u64,
2760        flexibility: ::fidl_next::protocol::Flexibility,
2761        body: ::fidl_next::Body<___T>,
2762        responder: ::fidl_next::protocol::Responder<___T>,
2763    ) -> ::core::result::Result<
2764        (),
2765        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2766    > {
2767        match ordinal {
2768            7734531672310967680 => {
2769                let responder = ::fidl_next::Responder::from_untyped(responder);
2770
2771                handler.before_suspend(responder).await;
2772                Ok(())
2773            }
2774
2775            7652351326344392170 => {
2776                let responder = ::fidl_next::Responder::from_untyped(responder);
2777
2778                handler.after_resume(responder).await;
2779                Ok(())
2780            }
2781
2782            ordinal => {
2783                handler.on_unknown_interaction(ordinal).await;
2784                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2785                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2786                } else {
2787                    responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
2788                                ordinal,
2789                                flexibility,
2790                                ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
2791                            )
2792                            .expect("encoding a framework error should never fail")
2793                            .await?;
2794                    Ok(())
2795                }
2796            }
2797        }
2798    }
2799}
2800
2801/// A client handler for the SuspendBlocker protocol.
2802///
2803/// See [`SuspendBlocker`] for more details.
2804pub trait SuspendBlockerClientHandler<
2805    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2806    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2807>
2808{
2809    fn on_unknown_interaction(
2810        &mut self,
2811        ordinal: u64,
2812    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2813        ::core::future::ready(())
2814    }
2815}
2816
2817impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for SuspendBlocker
2818where
2819    ___H: SuspendBlockerClientHandler<___T> + ::core::marker::Send,
2820    ___T: ::fidl_next::Transport,
2821{
2822    async fn on_event(
2823        handler: &mut ___H,
2824        ordinal: u64,
2825        flexibility: ::fidl_next::protocol::Flexibility,
2826        body: ::fidl_next::Body<___T>,
2827    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2828        match ordinal {
2829            ordinal => {
2830                handler.on_unknown_interaction(ordinal).await;
2831                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2832                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2833                } else {
2834                    Ok(())
2835                }
2836            }
2837        }
2838    }
2839}
2840
2841/// A server handler for the SuspendBlocker protocol.
2842///
2843/// See [`SuspendBlocker`] for more details.
2844pub trait SuspendBlockerServerHandler<
2845    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2846    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2847>
2848{
2849    #[doc = " Called after system activity governor begins operations to suspend the\n hardware platform.\n\n The server is expected to respond once it has performed the operations\n it needs to prepare itself for suspend, if any. All dependencies of\n `ExecutionStateLevel::SUSPENDING` are guaranteed to be satisified for\n the duration of this call and may be revoked once the server replies.\n\n Operations to suspend the hardware platform may vary between different\n hardware platforms and product configurations. At a minimum, the client\n and server MUST assume that general code execution continues\n until a reply to this call is received by the client. If the\n SuspendBlocker wants to preempt suspend operations, it MUST call\n `ActivityGovernor.AcquireWakeLease` before replying to this call.\n\n ExecutionState will be at its SUSPENDING level for the duration of this\n call. Consequently, a SuspendBlocker MUST NOT call\n `ActivityGovernor.TakeApplicationActivityLease` nor perform any other\n  action that blocks on Execution State reaching a level other than\n INACTIVE. Doing so will result in a deadlock. (However, AcquireWakeLease\n does _not_ block in this way and is safe to call.)\n"]
2850    fn before_suspend(
2851        &mut self,
2852
2853        responder: ::fidl_next::Responder<suspend_blocker::BeforeSuspend, ___T>,
2854    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2855
2856    #[doc = " Called after system activity governor is aware that the hardware\n platform has resumed.\n\n For the duration of this call, ExecutionState is at level INACTIVE,\n but all dependencies of `ExecutionStateLevel::SUSPENDING` are guaranteed\n be satisified.\n\n Consequently, a SuspendBlocker MUST NOT call\n `ActivityGovernor.TakeApplicationActivityLease` nor perform any other\n  action that blocks on Execution State reaching a level other than\n INACTIVE. Doing so will result in a deadlock. (However, AcquireWakeLease\n does _not_ block in this way and is safe to call.)\n"]
2857    fn after_resume(
2858        &mut self,
2859
2860        responder: ::fidl_next::Responder<suspend_blocker::AfterResume, ___T>,
2861    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2862
2863    fn on_unknown_interaction(
2864        &mut self,
2865        ordinal: u64,
2866    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2867        ::core::future::ready(())
2868    }
2869}
2870
2871impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for SuspendBlocker
2872where
2873    ___H: SuspendBlockerServerHandler<___T> + ::core::marker::Send,
2874    ___T: ::fidl_next::Transport,
2875{
2876    async fn on_one_way(
2877        handler: &mut ___H,
2878        ordinal: u64,
2879        flexibility: ::fidl_next::protocol::Flexibility,
2880        body: ::fidl_next::Body<___T>,
2881    ) -> ::core::result::Result<
2882        (),
2883        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2884    > {
2885        match ordinal {
2886            ordinal => {
2887                handler.on_unknown_interaction(ordinal).await;
2888                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2889                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2890                } else {
2891                    Ok(())
2892                }
2893            }
2894        }
2895    }
2896
2897    async fn on_two_way(
2898        handler: &mut ___H,
2899        ordinal: u64,
2900        flexibility: ::fidl_next::protocol::Flexibility,
2901        body: ::fidl_next::Body<___T>,
2902        responder: ::fidl_next::protocol::Responder<___T>,
2903    ) -> ::core::result::Result<
2904        (),
2905        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2906    > {
2907        match ordinal {
2908            7734531672310967680 => {
2909                let responder = ::fidl_next::Responder::from_untyped(responder);
2910
2911                handler.before_suspend(responder).await;
2912                Ok(())
2913            }
2914
2915            7652351326344392170 => {
2916                let responder = ::fidl_next::Responder::from_untyped(responder);
2917
2918                handler.after_resume(responder).await;
2919                Ok(())
2920            }
2921
2922            ordinal => {
2923                handler.on_unknown_interaction(ordinal).await;
2924                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
2925                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2926                } else {
2927                    responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
2928                                ordinal,
2929                                flexibility,
2930                                ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
2931                            )
2932                            .expect("encoding a framework error should never fail")
2933                            .await?;
2934                    Ok(())
2935                }
2936            }
2937        }
2938    }
2939}
2940
2941impl<___T> SuspendBlockerClientHandler<___T> for ::fidl_next::IgnoreEvents
2942where
2943    ___T: ::fidl_next::Transport,
2944{
2945    async fn on_unknown_interaction(&mut self, _: u64) {}
2946}
2947
2948impl<___H, ___T> SuspendBlockerLocalClientHandler<___T> for ::fidl_next::Local<___H>
2949where
2950    ___H: SuspendBlockerClientHandler<___T>,
2951    ___T: ::fidl_next::Transport,
2952{
2953    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2954        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2955    }
2956}
2957
2958impl<___H, ___T> SuspendBlockerLocalServerHandler<___T> for ::fidl_next::Local<___H>
2959where
2960    ___H: SuspendBlockerServerHandler<___T>,
2961    ___T: ::fidl_next::Transport,
2962{
2963    async fn before_suspend(
2964        &mut self,
2965
2966        responder: ::fidl_next::Responder<suspend_blocker::BeforeSuspend, ___T>,
2967    ) {
2968        ___H::before_suspend(&mut self.0, responder).await
2969    }
2970
2971    async fn after_resume(
2972        &mut self,
2973
2974        responder: ::fidl_next::Responder<suspend_blocker::AfterResume, ___T>,
2975    ) {
2976        ___H::after_resume(&mut self.0, responder).await
2977    }
2978
2979    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2980        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2981    }
2982}