1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11pub const MAX_ELEMENT_NAME_LEN: u8 = 64;
12
13#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
15pub enum AcquireWakeLeaseError {
16 Internal,
18 InvalidName,
20 #[doc(hidden)]
21 __SourceBreaking { unknown_ordinal: u32 },
22}
23
24#[macro_export]
26macro_rules! AcquireWakeLeaseErrorUnknown {
27 () => {
28 _
29 };
30}
31
32impl AcquireWakeLeaseError {
33 #[inline]
34 pub fn from_primitive(prim: u32) -> Option<Self> {
35 match prim {
36 1 => Some(Self::Internal),
37 2 => Some(Self::InvalidName),
38 _ => None,
39 }
40 }
41
42 #[inline]
43 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
44 match prim {
45 1 => Self::Internal,
46 2 => Self::InvalidName,
47 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
48 }
49 }
50
51 #[inline]
52 pub fn unknown() -> Self {
53 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
54 }
55
56 #[inline]
57 pub const fn into_primitive(self) -> u32 {
58 match self {
59 Self::Internal => 1,
60 Self::InvalidName => 2,
61 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
62 }
63 }
64
65 #[inline]
66 pub fn is_unknown(&self) -> bool {
67 match self {
68 Self::__SourceBreaking { unknown_ordinal: _ } => true,
69 _ => false,
70 }
71 }
72}
73
74#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
77pub enum AddExecutionStateDependencyError {
78 InvalidArgs,
80 BadState,
82 #[doc(hidden)]
83 __SourceBreaking { unknown_ordinal: u32 },
84}
85
86#[macro_export]
88macro_rules! AddExecutionStateDependencyErrorUnknown {
89 () => {
90 _
91 };
92}
93
94impl AddExecutionStateDependencyError {
95 #[inline]
96 pub fn from_primitive(prim: u32) -> Option<Self> {
97 match prim {
98 1 => Some(Self::InvalidArgs),
99 2 => Some(Self::BadState),
100 _ => None,
101 }
102 }
103
104 #[inline]
105 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
106 match prim {
107 1 => Self::InvalidArgs,
108 2 => Self::BadState,
109 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
110 }
111 }
112
113 #[inline]
114 pub fn unknown() -> Self {
115 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
116 }
117
118 #[inline]
119 pub const fn into_primitive(self) -> u32 {
120 match self {
121 Self::InvalidArgs => 1,
122 Self::BadState => 2,
123 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
124 }
125 }
126
127 #[inline]
128 pub fn is_unknown(&self) -> bool {
129 match self {
130 Self::__SourceBreaking { unknown_ordinal: _ } => true,
131 _ => false,
132 }
133 }
134}
135
136#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
143pub enum ApplicationActivityLevel {
144 Inactive,
145 Active,
146 #[doc(hidden)]
147 __SourceBreaking {
148 unknown_ordinal: u8,
149 },
150}
151
152#[macro_export]
154macro_rules! ApplicationActivityLevelUnknown {
155 () => {
156 _
157 };
158}
159
160impl ApplicationActivityLevel {
161 #[inline]
162 pub fn from_primitive(prim: u8) -> Option<Self> {
163 match prim {
164 0 => Some(Self::Inactive),
165 1 => Some(Self::Active),
166 _ => None,
167 }
168 }
169
170 #[inline]
171 pub fn from_primitive_allow_unknown(prim: u8) -> Self {
172 match prim {
173 0 => Self::Inactive,
174 1 => Self::Active,
175 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
176 }
177 }
178
179 #[inline]
180 pub fn unknown() -> Self {
181 Self::__SourceBreaking { unknown_ordinal: 0xff }
182 }
183
184 #[inline]
185 pub const fn into_primitive(self) -> u8 {
186 match self {
187 Self::Inactive => 0,
188 Self::Active => 1,
189 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
190 }
191 }
192
193 #[inline]
194 pub fn is_unknown(&self) -> bool {
195 match self {
196 Self::__SourceBreaking { unknown_ordinal: _ } => true,
197 _ => false,
198 }
199 }
200}
201
202#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
207pub enum CpuLevel {
208 Inactive,
209 Active,
210 #[doc(hidden)]
211 __SourceBreaking {
212 unknown_ordinal: u8,
213 },
214}
215
216#[macro_export]
218macro_rules! CpuLevelUnknown {
219 () => {
220 _
221 };
222}
223
224impl CpuLevel {
225 #[inline]
226 pub fn from_primitive(prim: u8) -> Option<Self> {
227 match prim {
228 0 => Some(Self::Inactive),
229 1 => Some(Self::Active),
230 _ => None,
231 }
232 }
233
234 #[inline]
235 pub fn from_primitive_allow_unknown(prim: u8) -> Self {
236 match prim {
237 0 => Self::Inactive,
238 1 => Self::Active,
239 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
240 }
241 }
242
243 #[inline]
244 pub fn unknown() -> Self {
245 Self::__SourceBreaking { unknown_ordinal: 0xff }
246 }
247
248 #[inline]
249 pub const fn into_primitive(self) -> u8 {
250 match self {
251 Self::Inactive => 0,
252 Self::Active => 1,
253 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
254 }
255 }
256
257 #[inline]
258 pub fn is_unknown(&self) -> bool {
259 match self {
260 Self::__SourceBreaking { unknown_ordinal: _ } => true,
261 _ => false,
262 }
263 }
264}
265
266#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
278pub enum ExecutionStateLevel {
279 Inactive,
280 Suspending,
281 Active,
282 #[doc(hidden)]
283 __SourceBreaking {
284 unknown_ordinal: u8,
285 },
286}
287
288#[macro_export]
290macro_rules! ExecutionStateLevelUnknown {
291 () => {
292 _
293 };
294}
295
296impl ExecutionStateLevel {
297 #[inline]
298 pub fn from_primitive(prim: u8) -> Option<Self> {
299 match prim {
300 0 => Some(Self::Inactive),
301 1 => Some(Self::Suspending),
302 2 => Some(Self::Active),
303 _ => None,
304 }
305 }
306
307 #[inline]
308 pub fn from_primitive_allow_unknown(prim: u8) -> Self {
309 match prim {
310 0 => Self::Inactive,
311 1 => Self::Suspending,
312 2 => Self::Active,
313 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
314 }
315 }
316
317 #[inline]
318 pub fn unknown() -> Self {
319 Self::__SourceBreaking { unknown_ordinal: 0xff }
320 }
321
322 #[inline]
323 pub const fn into_primitive(self) -> u8 {
324 match self {
325 Self::Inactive => 0,
326 Self::Suspending => 1,
327 Self::Active => 2,
328 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
329 }
330 }
331
332 #[inline]
333 pub fn is_unknown(&self) -> bool {
334 match self {
335 Self::__SourceBreaking { unknown_ordinal: _ } => true,
336 _ => false,
337 }
338 }
339}
340
341#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
342pub struct ActivityGovernorAcquireWakeLeaseRequest {
343 pub name: String,
347}
348
349impl fidl::Persistable for ActivityGovernorAcquireWakeLeaseRequest {}
350
351#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
352pub struct ActivityGovernorTakeApplicationActivityLeaseRequest {
353 pub name: String,
357}
358
359impl fidl::Persistable for ActivityGovernorTakeApplicationActivityLeaseRequest {}
360
361#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
362pub struct ActivityGovernorTakeWakeLeaseRequest {
363 pub name: String,
367}
368
369impl fidl::Persistable for ActivityGovernorTakeWakeLeaseRequest {}
370
371mod internal {
372 use super::*;
373 unsafe impl fidl::encoding::TypeMarker for AcquireWakeLeaseError {
374 type Owned = Self;
375
376 #[inline(always)]
377 fn inline_align(_context: fidl::encoding::Context) -> usize {
378 std::mem::align_of::<u32>()
379 }
380
381 #[inline(always)]
382 fn inline_size(_context: fidl::encoding::Context) -> usize {
383 std::mem::size_of::<u32>()
384 }
385
386 #[inline(always)]
387 fn encode_is_copy() -> bool {
388 false
389 }
390
391 #[inline(always)]
392 fn decode_is_copy() -> bool {
393 false
394 }
395 }
396
397 impl fidl::encoding::ValueTypeMarker for AcquireWakeLeaseError {
398 type Borrowed<'a> = Self;
399 #[inline(always)]
400 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
401 *value
402 }
403 }
404
405 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
406 for AcquireWakeLeaseError
407 {
408 #[inline]
409 unsafe fn encode(
410 self,
411 encoder: &mut fidl::encoding::Encoder<'_, D>,
412 offset: usize,
413 _depth: fidl::encoding::Depth,
414 ) -> fidl::Result<()> {
415 encoder.debug_check_bounds::<Self>(offset);
416 encoder.write_num(self.into_primitive(), offset);
417 Ok(())
418 }
419 }
420
421 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AcquireWakeLeaseError {
422 #[inline(always)]
423 fn new_empty() -> Self {
424 Self::unknown()
425 }
426
427 #[inline]
428 unsafe fn decode(
429 &mut self,
430 decoder: &mut fidl::encoding::Decoder<'_, D>,
431 offset: usize,
432 _depth: fidl::encoding::Depth,
433 ) -> fidl::Result<()> {
434 decoder.debug_check_bounds::<Self>(offset);
435 let prim = decoder.read_num::<u32>(offset);
436
437 *self = Self::from_primitive_allow_unknown(prim);
438 Ok(())
439 }
440 }
441 unsafe impl fidl::encoding::TypeMarker for AddExecutionStateDependencyError {
442 type Owned = Self;
443
444 #[inline(always)]
445 fn inline_align(_context: fidl::encoding::Context) -> usize {
446 std::mem::align_of::<u32>()
447 }
448
449 #[inline(always)]
450 fn inline_size(_context: fidl::encoding::Context) -> usize {
451 std::mem::size_of::<u32>()
452 }
453
454 #[inline(always)]
455 fn encode_is_copy() -> bool {
456 false
457 }
458
459 #[inline(always)]
460 fn decode_is_copy() -> bool {
461 false
462 }
463 }
464
465 impl fidl::encoding::ValueTypeMarker for AddExecutionStateDependencyError {
466 type Borrowed<'a> = Self;
467 #[inline(always)]
468 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
469 *value
470 }
471 }
472
473 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
474 for AddExecutionStateDependencyError
475 {
476 #[inline]
477 unsafe fn encode(
478 self,
479 encoder: &mut fidl::encoding::Encoder<'_, D>,
480 offset: usize,
481 _depth: fidl::encoding::Depth,
482 ) -> fidl::Result<()> {
483 encoder.debug_check_bounds::<Self>(offset);
484 encoder.write_num(self.into_primitive(), offset);
485 Ok(())
486 }
487 }
488
489 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
490 for AddExecutionStateDependencyError
491 {
492 #[inline(always)]
493 fn new_empty() -> Self {
494 Self::unknown()
495 }
496
497 #[inline]
498 unsafe fn decode(
499 &mut self,
500 decoder: &mut fidl::encoding::Decoder<'_, D>,
501 offset: usize,
502 _depth: fidl::encoding::Depth,
503 ) -> fidl::Result<()> {
504 decoder.debug_check_bounds::<Self>(offset);
505 let prim = decoder.read_num::<u32>(offset);
506
507 *self = Self::from_primitive_allow_unknown(prim);
508 Ok(())
509 }
510 }
511 unsafe impl fidl::encoding::TypeMarker for ApplicationActivityLevel {
512 type Owned = Self;
513
514 #[inline(always)]
515 fn inline_align(_context: fidl::encoding::Context) -> usize {
516 std::mem::align_of::<u8>()
517 }
518
519 #[inline(always)]
520 fn inline_size(_context: fidl::encoding::Context) -> usize {
521 std::mem::size_of::<u8>()
522 }
523
524 #[inline(always)]
525 fn encode_is_copy() -> bool {
526 false
527 }
528
529 #[inline(always)]
530 fn decode_is_copy() -> bool {
531 false
532 }
533 }
534
535 impl fidl::encoding::ValueTypeMarker for ApplicationActivityLevel {
536 type Borrowed<'a> = Self;
537 #[inline(always)]
538 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
539 *value
540 }
541 }
542
543 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
544 for ApplicationActivityLevel
545 {
546 #[inline]
547 unsafe fn encode(
548 self,
549 encoder: &mut fidl::encoding::Encoder<'_, D>,
550 offset: usize,
551 _depth: fidl::encoding::Depth,
552 ) -> fidl::Result<()> {
553 encoder.debug_check_bounds::<Self>(offset);
554 encoder.write_num(self.into_primitive(), offset);
555 Ok(())
556 }
557 }
558
559 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
560 for ApplicationActivityLevel
561 {
562 #[inline(always)]
563 fn new_empty() -> Self {
564 Self::unknown()
565 }
566
567 #[inline]
568 unsafe fn decode(
569 &mut self,
570 decoder: &mut fidl::encoding::Decoder<'_, D>,
571 offset: usize,
572 _depth: fidl::encoding::Depth,
573 ) -> fidl::Result<()> {
574 decoder.debug_check_bounds::<Self>(offset);
575 let prim = decoder.read_num::<u8>(offset);
576
577 *self = Self::from_primitive_allow_unknown(prim);
578 Ok(())
579 }
580 }
581 unsafe impl fidl::encoding::TypeMarker for CpuLevel {
582 type Owned = Self;
583
584 #[inline(always)]
585 fn inline_align(_context: fidl::encoding::Context) -> usize {
586 std::mem::align_of::<u8>()
587 }
588
589 #[inline(always)]
590 fn inline_size(_context: fidl::encoding::Context) -> usize {
591 std::mem::size_of::<u8>()
592 }
593
594 #[inline(always)]
595 fn encode_is_copy() -> bool {
596 false
597 }
598
599 #[inline(always)]
600 fn decode_is_copy() -> bool {
601 false
602 }
603 }
604
605 impl fidl::encoding::ValueTypeMarker for CpuLevel {
606 type Borrowed<'a> = Self;
607 #[inline(always)]
608 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
609 *value
610 }
611 }
612
613 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CpuLevel {
614 #[inline]
615 unsafe fn encode(
616 self,
617 encoder: &mut fidl::encoding::Encoder<'_, D>,
618 offset: usize,
619 _depth: fidl::encoding::Depth,
620 ) -> fidl::Result<()> {
621 encoder.debug_check_bounds::<Self>(offset);
622 encoder.write_num(self.into_primitive(), offset);
623 Ok(())
624 }
625 }
626
627 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CpuLevel {
628 #[inline(always)]
629 fn new_empty() -> Self {
630 Self::unknown()
631 }
632
633 #[inline]
634 unsafe fn decode(
635 &mut self,
636 decoder: &mut fidl::encoding::Decoder<'_, D>,
637 offset: usize,
638 _depth: fidl::encoding::Depth,
639 ) -> fidl::Result<()> {
640 decoder.debug_check_bounds::<Self>(offset);
641 let prim = decoder.read_num::<u8>(offset);
642
643 *self = Self::from_primitive_allow_unknown(prim);
644 Ok(())
645 }
646 }
647 unsafe impl fidl::encoding::TypeMarker for ExecutionStateLevel {
648 type Owned = Self;
649
650 #[inline(always)]
651 fn inline_align(_context: fidl::encoding::Context) -> usize {
652 std::mem::align_of::<u8>()
653 }
654
655 #[inline(always)]
656 fn inline_size(_context: fidl::encoding::Context) -> usize {
657 std::mem::size_of::<u8>()
658 }
659
660 #[inline(always)]
661 fn encode_is_copy() -> bool {
662 false
663 }
664
665 #[inline(always)]
666 fn decode_is_copy() -> bool {
667 false
668 }
669 }
670
671 impl fidl::encoding::ValueTypeMarker for ExecutionStateLevel {
672 type Borrowed<'a> = Self;
673 #[inline(always)]
674 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
675 *value
676 }
677 }
678
679 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
680 for ExecutionStateLevel
681 {
682 #[inline]
683 unsafe fn encode(
684 self,
685 encoder: &mut fidl::encoding::Encoder<'_, D>,
686 offset: usize,
687 _depth: fidl::encoding::Depth,
688 ) -> fidl::Result<()> {
689 encoder.debug_check_bounds::<Self>(offset);
690 encoder.write_num(self.into_primitive(), offset);
691 Ok(())
692 }
693 }
694
695 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ExecutionStateLevel {
696 #[inline(always)]
697 fn new_empty() -> Self {
698 Self::unknown()
699 }
700
701 #[inline]
702 unsafe fn decode(
703 &mut self,
704 decoder: &mut fidl::encoding::Decoder<'_, D>,
705 offset: usize,
706 _depth: fidl::encoding::Depth,
707 ) -> fidl::Result<()> {
708 decoder.debug_check_bounds::<Self>(offset);
709 let prim = decoder.read_num::<u8>(offset);
710
711 *self = Self::from_primitive_allow_unknown(prim);
712 Ok(())
713 }
714 }
715
716 impl fidl::encoding::ValueTypeMarker for ActivityGovernorAcquireWakeLeaseRequest {
717 type Borrowed<'a> = &'a Self;
718 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
719 value
720 }
721 }
722
723 unsafe impl fidl::encoding::TypeMarker for ActivityGovernorAcquireWakeLeaseRequest {
724 type Owned = Self;
725
726 #[inline(always)]
727 fn inline_align(_context: fidl::encoding::Context) -> usize {
728 8
729 }
730
731 #[inline(always)]
732 fn inline_size(_context: fidl::encoding::Context) -> usize {
733 16
734 }
735 }
736
737 unsafe impl<D: fidl::encoding::ResourceDialect>
738 fidl::encoding::Encode<ActivityGovernorAcquireWakeLeaseRequest, D>
739 for &ActivityGovernorAcquireWakeLeaseRequest
740 {
741 #[inline]
742 unsafe fn encode(
743 self,
744 encoder: &mut fidl::encoding::Encoder<'_, D>,
745 offset: usize,
746 _depth: fidl::encoding::Depth,
747 ) -> fidl::Result<()> {
748 encoder.debug_check_bounds::<ActivityGovernorAcquireWakeLeaseRequest>(offset);
749 fidl::encoding::Encode::<ActivityGovernorAcquireWakeLeaseRequest, D>::encode(
751 (<fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
752 &self.name,
753 ),),
754 encoder,
755 offset,
756 _depth,
757 )
758 }
759 }
760 unsafe impl<
761 D: fidl::encoding::ResourceDialect,
762 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
763 > fidl::encoding::Encode<ActivityGovernorAcquireWakeLeaseRequest, D> for (T0,)
764 {
765 #[inline]
766 unsafe fn encode(
767 self,
768 encoder: &mut fidl::encoding::Encoder<'_, D>,
769 offset: usize,
770 depth: fidl::encoding::Depth,
771 ) -> fidl::Result<()> {
772 encoder.debug_check_bounds::<ActivityGovernorAcquireWakeLeaseRequest>(offset);
773 self.0.encode(encoder, offset + 0, depth)?;
777 Ok(())
778 }
779 }
780
781 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
782 for ActivityGovernorAcquireWakeLeaseRequest
783 {
784 #[inline(always)]
785 fn new_empty() -> Self {
786 Self { name: fidl::new_empty!(fidl::encoding::BoundedString<64>, D) }
787 }
788
789 #[inline]
790 unsafe fn decode(
791 &mut self,
792 decoder: &mut fidl::encoding::Decoder<'_, D>,
793 offset: usize,
794 _depth: fidl::encoding::Depth,
795 ) -> fidl::Result<()> {
796 decoder.debug_check_bounds::<Self>(offset);
797 fidl::decode!(
799 fidl::encoding::BoundedString<64>,
800 D,
801 &mut self.name,
802 decoder,
803 offset + 0,
804 _depth
805 )?;
806 Ok(())
807 }
808 }
809
810 impl fidl::encoding::ValueTypeMarker for ActivityGovernorTakeApplicationActivityLeaseRequest {
811 type Borrowed<'a> = &'a Self;
812 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
813 value
814 }
815 }
816
817 unsafe impl fidl::encoding::TypeMarker for ActivityGovernorTakeApplicationActivityLeaseRequest {
818 type Owned = Self;
819
820 #[inline(always)]
821 fn inline_align(_context: fidl::encoding::Context) -> usize {
822 8
823 }
824
825 #[inline(always)]
826 fn inline_size(_context: fidl::encoding::Context) -> usize {
827 16
828 }
829 }
830
831 unsafe impl<D: fidl::encoding::ResourceDialect>
832 fidl::encoding::Encode<ActivityGovernorTakeApplicationActivityLeaseRequest, D>
833 for &ActivityGovernorTakeApplicationActivityLeaseRequest
834 {
835 #[inline]
836 unsafe fn encode(
837 self,
838 encoder: &mut fidl::encoding::Encoder<'_, D>,
839 offset: usize,
840 _depth: fidl::encoding::Depth,
841 ) -> fidl::Result<()> {
842 encoder
843 .debug_check_bounds::<ActivityGovernorTakeApplicationActivityLeaseRequest>(offset);
844 fidl::encoding::Encode::<ActivityGovernorTakeApplicationActivityLeaseRequest, D>::encode(
846 (<fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
847 &self.name,
848 ),),
849 encoder,
850 offset,
851 _depth,
852 )
853 }
854 }
855 unsafe impl<
856 D: fidl::encoding::ResourceDialect,
857 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
858 > fidl::encoding::Encode<ActivityGovernorTakeApplicationActivityLeaseRequest, D> for (T0,)
859 {
860 #[inline]
861 unsafe fn encode(
862 self,
863 encoder: &mut fidl::encoding::Encoder<'_, D>,
864 offset: usize,
865 depth: fidl::encoding::Depth,
866 ) -> fidl::Result<()> {
867 encoder
868 .debug_check_bounds::<ActivityGovernorTakeApplicationActivityLeaseRequest>(offset);
869 self.0.encode(encoder, offset + 0, depth)?;
873 Ok(())
874 }
875 }
876
877 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
878 for ActivityGovernorTakeApplicationActivityLeaseRequest
879 {
880 #[inline(always)]
881 fn new_empty() -> Self {
882 Self { name: fidl::new_empty!(fidl::encoding::BoundedString<64>, D) }
883 }
884
885 #[inline]
886 unsafe fn decode(
887 &mut self,
888 decoder: &mut fidl::encoding::Decoder<'_, D>,
889 offset: usize,
890 _depth: fidl::encoding::Depth,
891 ) -> fidl::Result<()> {
892 decoder.debug_check_bounds::<Self>(offset);
893 fidl::decode!(
895 fidl::encoding::BoundedString<64>,
896 D,
897 &mut self.name,
898 decoder,
899 offset + 0,
900 _depth
901 )?;
902 Ok(())
903 }
904 }
905
906 impl fidl::encoding::ValueTypeMarker for ActivityGovernorTakeWakeLeaseRequest {
907 type Borrowed<'a> = &'a Self;
908 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
909 value
910 }
911 }
912
913 unsafe impl fidl::encoding::TypeMarker for ActivityGovernorTakeWakeLeaseRequest {
914 type Owned = Self;
915
916 #[inline(always)]
917 fn inline_align(_context: fidl::encoding::Context) -> usize {
918 8
919 }
920
921 #[inline(always)]
922 fn inline_size(_context: fidl::encoding::Context) -> usize {
923 16
924 }
925 }
926
927 unsafe impl<D: fidl::encoding::ResourceDialect>
928 fidl::encoding::Encode<ActivityGovernorTakeWakeLeaseRequest, D>
929 for &ActivityGovernorTakeWakeLeaseRequest
930 {
931 #[inline]
932 unsafe fn encode(
933 self,
934 encoder: &mut fidl::encoding::Encoder<'_, D>,
935 offset: usize,
936 _depth: fidl::encoding::Depth,
937 ) -> fidl::Result<()> {
938 encoder.debug_check_bounds::<ActivityGovernorTakeWakeLeaseRequest>(offset);
939 fidl::encoding::Encode::<ActivityGovernorTakeWakeLeaseRequest, D>::encode(
941 (<fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
942 &self.name,
943 ),),
944 encoder,
945 offset,
946 _depth,
947 )
948 }
949 }
950 unsafe impl<
951 D: fidl::encoding::ResourceDialect,
952 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
953 > fidl::encoding::Encode<ActivityGovernorTakeWakeLeaseRequest, D> for (T0,)
954 {
955 #[inline]
956 unsafe fn encode(
957 self,
958 encoder: &mut fidl::encoding::Encoder<'_, D>,
959 offset: usize,
960 depth: fidl::encoding::Depth,
961 ) -> fidl::Result<()> {
962 encoder.debug_check_bounds::<ActivityGovernorTakeWakeLeaseRequest>(offset);
963 self.0.encode(encoder, offset + 0, depth)?;
967 Ok(())
968 }
969 }
970
971 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
972 for ActivityGovernorTakeWakeLeaseRequest
973 {
974 #[inline(always)]
975 fn new_empty() -> Self {
976 Self { name: fidl::new_empty!(fidl::encoding::BoundedString<64>, D) }
977 }
978
979 #[inline]
980 unsafe fn decode(
981 &mut self,
982 decoder: &mut fidl::encoding::Decoder<'_, D>,
983 offset: usize,
984 _depth: fidl::encoding::Depth,
985 ) -> fidl::Result<()> {
986 decoder.debug_check_bounds::<Self>(offset);
987 fidl::decode!(
989 fidl::encoding::BoundedString<64>,
990 D,
991 &mut self.name,
992 decoder,
993 offset + 0,
994 _depth
995 )?;
996 Ok(())
997 }
998 }
999}