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
11#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
13pub enum DomainControllerError {
14 Internal,
15 InvalidArguments,
16 #[doc(hidden)]
17 __SourceBreaking {
18 unknown_ordinal: u32,
19 },
20}
21
22#[macro_export]
24macro_rules! DomainControllerErrorUnknown {
25 () => {
26 _
27 };
28}
29
30impl DomainControllerError {
31 #[inline]
32 pub fn from_primitive(prim: u32) -> Option<Self> {
33 match prim {
34 1 => Some(Self::Internal),
35 2 => Some(Self::InvalidArguments),
36 _ => None,
37 }
38 }
39
40 #[inline]
41 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
42 match prim {
43 1 => Self::Internal,
44 2 => Self::InvalidArguments,
45 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
46 }
47 }
48
49 #[inline]
50 pub fn unknown() -> Self {
51 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
52 }
53
54 #[inline]
55 pub const fn into_primitive(self) -> u32 {
56 match self {
57 Self::Internal => 1,
58 Self::InvalidArguments => 2,
59 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
60 }
61 }
62
63 #[inline]
64 pub fn is_unknown(&self) -> bool {
65 match self {
66 Self::__SourceBreaking { unknown_ordinal: _ } => true,
67 _ => false,
68 }
69 }
70}
71
72#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
73#[repr(C)]
74pub struct DomainControllerClearMaxFrequencyRequest {
75 pub domain_id: u64,
76}
77
78impl fidl::Persistable for DomainControllerClearMaxFrequencyRequest {}
79
80#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
81#[repr(C)]
82pub struct DomainControllerGetMaxFrequencyRequest {
83 pub domain_id: u64,
84}
85
86impl fidl::Persistable for DomainControllerGetMaxFrequencyRequest {}
87
88#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89#[repr(C)]
90pub struct DomainControllerGetMinFrequencyRequest {
91 pub domain_id: u64,
92}
93
94impl fidl::Persistable for DomainControllerGetMinFrequencyRequest {}
95
96#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
97pub struct DomainControllerLeaseMaxFrequencyRequest {
98 pub domain_id: u64,
99 pub frequency_index: u64,
100 pub lease_name: String,
101}
102
103impl fidl::Persistable for DomainControllerLeaseMaxFrequencyRequest {}
104
105#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
106pub struct DomainControllerLeaseMinFrequencyRequest {
107 pub domain_id: u64,
108 pub frequency_index: u64,
109 pub lease_name: String,
110}
111
112impl fidl::Persistable for DomainControllerLeaseMinFrequencyRequest {}
113
114#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
115#[repr(C)]
116pub struct DomainControllerSetMaxFrequencyRequest {
117 pub domain_id: u64,
118 pub frequency_index: u64,
119}
120
121impl fidl::Persistable for DomainControllerSetMaxFrequencyRequest {}
122
123#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
124#[repr(C)]
125pub struct DomainControllerGetMaxFrequencyResponse {
126 pub max_frequency_index: u64,
127}
128
129impl fidl::Persistable for DomainControllerGetMaxFrequencyResponse {}
130
131#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
132#[repr(C)]
133pub struct DomainControllerGetMinFrequencyResponse {
134 pub min_frequency_index: u64,
135}
136
137impl fidl::Persistable for DomainControllerGetMinFrequencyResponse {}
138
139#[derive(Clone, Debug, PartialEq)]
140pub struct DomainControllerListDomainsResponse {
141 pub domains: Vec<DomainInfo>,
142}
143
144impl fidl::Persistable for DomainControllerListDomainsResponse {}
145
146#[derive(Clone, Debug, Default, PartialEq)]
147pub struct DomainInfo {
148 pub id: Option<u64>,
149 pub core_ids: Option<Vec<u64>>,
150 pub available_frequencies_hz: Option<Vec<u64>>,
151 pub name: Option<String>,
152 #[doc(hidden)]
153 pub __source_breaking: fidl::marker::SourceBreaking,
154}
155
156impl fidl::Persistable for DomainInfo {}
157
158pub mod domain_controller_ordinals {
159 pub const LIST_DOMAINS: u64 = 0x3dfa728011b3ee0c;
160 pub const GET_MAX_FREQUENCY: u64 = 0x6c8cc16cbd270f62;
161 pub const SET_MAX_FREQUENCY: u64 = 0x427d7a45e538939e;
162 pub const CLEAR_MAX_FREQUENCY: u64 = 0x738116a31e202ba5;
163 pub const GET_MIN_FREQUENCY: u64 = 0x69f0bd89c925321c;
164 pub const LEASE_MAX_FREQUENCY: u64 = 0x5ea676204a21a276;
165 pub const LEASE_MIN_FREQUENCY: u64 = 0x544abd141e121407;
166}
167
168mod internal {
169 use super::*;
170 unsafe impl fidl::encoding::TypeMarker for DomainControllerError {
171 type Owned = Self;
172
173 #[inline(always)]
174 fn inline_align(_context: fidl::encoding::Context) -> usize {
175 std::mem::align_of::<u32>()
176 }
177
178 #[inline(always)]
179 fn inline_size(_context: fidl::encoding::Context) -> usize {
180 std::mem::size_of::<u32>()
181 }
182
183 #[inline(always)]
184 fn encode_is_copy() -> bool {
185 false
186 }
187
188 #[inline(always)]
189 fn decode_is_copy() -> bool {
190 false
191 }
192 }
193
194 impl fidl::encoding::ValueTypeMarker for DomainControllerError {
195 type Borrowed<'a> = Self;
196 #[inline(always)]
197 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
198 *value
199 }
200 }
201
202 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
203 for DomainControllerError
204 {
205 #[inline]
206 unsafe fn encode(
207 self,
208 encoder: &mut fidl::encoding::Encoder<'_, D>,
209 offset: usize,
210 _depth: fidl::encoding::Depth,
211 ) -> fidl::Result<()> {
212 encoder.debug_check_bounds::<Self>(offset);
213 encoder.write_num(self.into_primitive(), offset);
214 Ok(())
215 }
216 }
217
218 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DomainControllerError {
219 #[inline(always)]
220 fn new_empty() -> Self {
221 Self::unknown()
222 }
223
224 #[inline]
225 unsafe fn decode(
226 &mut self,
227 decoder: &mut fidl::encoding::Decoder<'_, D>,
228 offset: usize,
229 _depth: fidl::encoding::Depth,
230 ) -> fidl::Result<()> {
231 decoder.debug_check_bounds::<Self>(offset);
232 let prim = decoder.read_num::<u32>(offset);
233
234 *self = Self::from_primitive_allow_unknown(prim);
235 Ok(())
236 }
237 }
238
239 impl fidl::encoding::ValueTypeMarker for DomainControllerClearMaxFrequencyRequest {
240 type Borrowed<'a> = &'a Self;
241 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
242 value
243 }
244 }
245
246 unsafe impl fidl::encoding::TypeMarker for DomainControllerClearMaxFrequencyRequest {
247 type Owned = Self;
248
249 #[inline(always)]
250 fn inline_align(_context: fidl::encoding::Context) -> usize {
251 8
252 }
253
254 #[inline(always)]
255 fn inline_size(_context: fidl::encoding::Context) -> usize {
256 8
257 }
258 #[inline(always)]
259 fn encode_is_copy() -> bool {
260 true
261 }
262
263 #[inline(always)]
264 fn decode_is_copy() -> bool {
265 true
266 }
267 }
268
269 unsafe impl<D: fidl::encoding::ResourceDialect>
270 fidl::encoding::Encode<DomainControllerClearMaxFrequencyRequest, D>
271 for &DomainControllerClearMaxFrequencyRequest
272 {
273 #[inline]
274 unsafe fn encode(
275 self,
276 encoder: &mut fidl::encoding::Encoder<'_, D>,
277 offset: usize,
278 _depth: fidl::encoding::Depth,
279 ) -> fidl::Result<()> {
280 encoder.debug_check_bounds::<DomainControllerClearMaxFrequencyRequest>(offset);
281 unsafe {
282 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
284 (buf_ptr as *mut DomainControllerClearMaxFrequencyRequest).write_unaligned(
285 (self as *const DomainControllerClearMaxFrequencyRequest).read(),
286 );
287 }
290 Ok(())
291 }
292 }
293 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
294 fidl::encoding::Encode<DomainControllerClearMaxFrequencyRequest, D> for (T0,)
295 {
296 #[inline]
297 unsafe fn encode(
298 self,
299 encoder: &mut fidl::encoding::Encoder<'_, D>,
300 offset: usize,
301 depth: fidl::encoding::Depth,
302 ) -> fidl::Result<()> {
303 encoder.debug_check_bounds::<DomainControllerClearMaxFrequencyRequest>(offset);
304 self.0.encode(encoder, offset + 0, depth)?;
308 Ok(())
309 }
310 }
311
312 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
313 for DomainControllerClearMaxFrequencyRequest
314 {
315 #[inline(always)]
316 fn new_empty() -> Self {
317 Self { domain_id: fidl::new_empty!(u64, D) }
318 }
319
320 #[inline]
321 unsafe fn decode(
322 &mut self,
323 decoder: &mut fidl::encoding::Decoder<'_, D>,
324 offset: usize,
325 _depth: fidl::encoding::Depth,
326 ) -> fidl::Result<()> {
327 decoder.debug_check_bounds::<Self>(offset);
328 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
329 unsafe {
332 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
333 }
334 Ok(())
335 }
336 }
337
338 impl fidl::encoding::ValueTypeMarker for DomainControllerGetMaxFrequencyRequest {
339 type Borrowed<'a> = &'a Self;
340 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
341 value
342 }
343 }
344
345 unsafe impl fidl::encoding::TypeMarker for DomainControllerGetMaxFrequencyRequest {
346 type Owned = Self;
347
348 #[inline(always)]
349 fn inline_align(_context: fidl::encoding::Context) -> usize {
350 8
351 }
352
353 #[inline(always)]
354 fn inline_size(_context: fidl::encoding::Context) -> usize {
355 8
356 }
357 #[inline(always)]
358 fn encode_is_copy() -> bool {
359 true
360 }
361
362 #[inline(always)]
363 fn decode_is_copy() -> bool {
364 true
365 }
366 }
367
368 unsafe impl<D: fidl::encoding::ResourceDialect>
369 fidl::encoding::Encode<DomainControllerGetMaxFrequencyRequest, D>
370 for &DomainControllerGetMaxFrequencyRequest
371 {
372 #[inline]
373 unsafe fn encode(
374 self,
375 encoder: &mut fidl::encoding::Encoder<'_, D>,
376 offset: usize,
377 _depth: fidl::encoding::Depth,
378 ) -> fidl::Result<()> {
379 encoder.debug_check_bounds::<DomainControllerGetMaxFrequencyRequest>(offset);
380 unsafe {
381 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
383 (buf_ptr as *mut DomainControllerGetMaxFrequencyRequest).write_unaligned(
384 (self as *const DomainControllerGetMaxFrequencyRequest).read(),
385 );
386 }
389 Ok(())
390 }
391 }
392 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
393 fidl::encoding::Encode<DomainControllerGetMaxFrequencyRequest, D> for (T0,)
394 {
395 #[inline]
396 unsafe fn encode(
397 self,
398 encoder: &mut fidl::encoding::Encoder<'_, D>,
399 offset: usize,
400 depth: fidl::encoding::Depth,
401 ) -> fidl::Result<()> {
402 encoder.debug_check_bounds::<DomainControllerGetMaxFrequencyRequest>(offset);
403 self.0.encode(encoder, offset + 0, depth)?;
407 Ok(())
408 }
409 }
410
411 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
412 for DomainControllerGetMaxFrequencyRequest
413 {
414 #[inline(always)]
415 fn new_empty() -> Self {
416 Self { domain_id: fidl::new_empty!(u64, D) }
417 }
418
419 #[inline]
420 unsafe fn decode(
421 &mut self,
422 decoder: &mut fidl::encoding::Decoder<'_, D>,
423 offset: usize,
424 _depth: fidl::encoding::Depth,
425 ) -> fidl::Result<()> {
426 decoder.debug_check_bounds::<Self>(offset);
427 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
428 unsafe {
431 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
432 }
433 Ok(())
434 }
435 }
436
437 impl fidl::encoding::ValueTypeMarker for DomainControllerGetMinFrequencyRequest {
438 type Borrowed<'a> = &'a Self;
439 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
440 value
441 }
442 }
443
444 unsafe impl fidl::encoding::TypeMarker for DomainControllerGetMinFrequencyRequest {
445 type Owned = Self;
446
447 #[inline(always)]
448 fn inline_align(_context: fidl::encoding::Context) -> usize {
449 8
450 }
451
452 #[inline(always)]
453 fn inline_size(_context: fidl::encoding::Context) -> usize {
454 8
455 }
456 #[inline(always)]
457 fn encode_is_copy() -> bool {
458 true
459 }
460
461 #[inline(always)]
462 fn decode_is_copy() -> bool {
463 true
464 }
465 }
466
467 unsafe impl<D: fidl::encoding::ResourceDialect>
468 fidl::encoding::Encode<DomainControllerGetMinFrequencyRequest, D>
469 for &DomainControllerGetMinFrequencyRequest
470 {
471 #[inline]
472 unsafe fn encode(
473 self,
474 encoder: &mut fidl::encoding::Encoder<'_, D>,
475 offset: usize,
476 _depth: fidl::encoding::Depth,
477 ) -> fidl::Result<()> {
478 encoder.debug_check_bounds::<DomainControllerGetMinFrequencyRequest>(offset);
479 unsafe {
480 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
482 (buf_ptr as *mut DomainControllerGetMinFrequencyRequest).write_unaligned(
483 (self as *const DomainControllerGetMinFrequencyRequest).read(),
484 );
485 }
488 Ok(())
489 }
490 }
491 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
492 fidl::encoding::Encode<DomainControllerGetMinFrequencyRequest, D> for (T0,)
493 {
494 #[inline]
495 unsafe fn encode(
496 self,
497 encoder: &mut fidl::encoding::Encoder<'_, D>,
498 offset: usize,
499 depth: fidl::encoding::Depth,
500 ) -> fidl::Result<()> {
501 encoder.debug_check_bounds::<DomainControllerGetMinFrequencyRequest>(offset);
502 self.0.encode(encoder, offset + 0, depth)?;
506 Ok(())
507 }
508 }
509
510 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
511 for DomainControllerGetMinFrequencyRequest
512 {
513 #[inline(always)]
514 fn new_empty() -> Self {
515 Self { domain_id: fidl::new_empty!(u64, D) }
516 }
517
518 #[inline]
519 unsafe fn decode(
520 &mut self,
521 decoder: &mut fidl::encoding::Decoder<'_, D>,
522 offset: usize,
523 _depth: fidl::encoding::Depth,
524 ) -> fidl::Result<()> {
525 decoder.debug_check_bounds::<Self>(offset);
526 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
527 unsafe {
530 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
531 }
532 Ok(())
533 }
534 }
535
536 impl fidl::encoding::ValueTypeMarker for DomainControllerLeaseMaxFrequencyRequest {
537 type Borrowed<'a> = &'a Self;
538 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
539 value
540 }
541 }
542
543 unsafe impl fidl::encoding::TypeMarker for DomainControllerLeaseMaxFrequencyRequest {
544 type Owned = Self;
545
546 #[inline(always)]
547 fn inline_align(_context: fidl::encoding::Context) -> usize {
548 8
549 }
550
551 #[inline(always)]
552 fn inline_size(_context: fidl::encoding::Context) -> usize {
553 32
554 }
555 }
556
557 unsafe impl<D: fidl::encoding::ResourceDialect>
558 fidl::encoding::Encode<DomainControllerLeaseMaxFrequencyRequest, D>
559 for &DomainControllerLeaseMaxFrequencyRequest
560 {
561 #[inline]
562 unsafe fn encode(
563 self,
564 encoder: &mut fidl::encoding::Encoder<'_, D>,
565 offset: usize,
566 _depth: fidl::encoding::Depth,
567 ) -> fidl::Result<()> {
568 encoder.debug_check_bounds::<DomainControllerLeaseMaxFrequencyRequest>(offset);
569 fidl::encoding::Encode::<DomainControllerLeaseMaxFrequencyRequest, D>::encode(
571 (
572 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.domain_id),
573 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.frequency_index),
574 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
575 &self.lease_name,
576 ),
577 ),
578 encoder,
579 offset,
580 _depth,
581 )
582 }
583 }
584 unsafe impl<
585 D: fidl::encoding::ResourceDialect,
586 T0: fidl::encoding::Encode<u64, D>,
587 T1: fidl::encoding::Encode<u64, D>,
588 T2: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
589 > fidl::encoding::Encode<DomainControllerLeaseMaxFrequencyRequest, D> for (T0, T1, T2)
590 {
591 #[inline]
592 unsafe fn encode(
593 self,
594 encoder: &mut fidl::encoding::Encoder<'_, D>,
595 offset: usize,
596 depth: fidl::encoding::Depth,
597 ) -> fidl::Result<()> {
598 encoder.debug_check_bounds::<DomainControllerLeaseMaxFrequencyRequest>(offset);
599 self.0.encode(encoder, offset + 0, depth)?;
603 self.1.encode(encoder, offset + 8, depth)?;
604 self.2.encode(encoder, offset + 16, depth)?;
605 Ok(())
606 }
607 }
608
609 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
610 for DomainControllerLeaseMaxFrequencyRequest
611 {
612 #[inline(always)]
613 fn new_empty() -> Self {
614 Self {
615 domain_id: fidl::new_empty!(u64, D),
616 frequency_index: fidl::new_empty!(u64, D),
617 lease_name: fidl::new_empty!(fidl::encoding::BoundedString<64>, D),
618 }
619 }
620
621 #[inline]
622 unsafe fn decode(
623 &mut self,
624 decoder: &mut fidl::encoding::Decoder<'_, D>,
625 offset: usize,
626 _depth: fidl::encoding::Depth,
627 ) -> fidl::Result<()> {
628 decoder.debug_check_bounds::<Self>(offset);
629 fidl::decode!(u64, D, &mut self.domain_id, decoder, offset + 0, _depth)?;
631 fidl::decode!(u64, D, &mut self.frequency_index, decoder, offset + 8, _depth)?;
632 fidl::decode!(
633 fidl::encoding::BoundedString<64>,
634 D,
635 &mut self.lease_name,
636 decoder,
637 offset + 16,
638 _depth
639 )?;
640 Ok(())
641 }
642 }
643
644 impl fidl::encoding::ValueTypeMarker for DomainControllerLeaseMinFrequencyRequest {
645 type Borrowed<'a> = &'a Self;
646 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
647 value
648 }
649 }
650
651 unsafe impl fidl::encoding::TypeMarker for DomainControllerLeaseMinFrequencyRequest {
652 type Owned = Self;
653
654 #[inline(always)]
655 fn inline_align(_context: fidl::encoding::Context) -> usize {
656 8
657 }
658
659 #[inline(always)]
660 fn inline_size(_context: fidl::encoding::Context) -> usize {
661 32
662 }
663 }
664
665 unsafe impl<D: fidl::encoding::ResourceDialect>
666 fidl::encoding::Encode<DomainControllerLeaseMinFrequencyRequest, D>
667 for &DomainControllerLeaseMinFrequencyRequest
668 {
669 #[inline]
670 unsafe fn encode(
671 self,
672 encoder: &mut fidl::encoding::Encoder<'_, D>,
673 offset: usize,
674 _depth: fidl::encoding::Depth,
675 ) -> fidl::Result<()> {
676 encoder.debug_check_bounds::<DomainControllerLeaseMinFrequencyRequest>(offset);
677 fidl::encoding::Encode::<DomainControllerLeaseMinFrequencyRequest, D>::encode(
679 (
680 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.domain_id),
681 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.frequency_index),
682 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
683 &self.lease_name,
684 ),
685 ),
686 encoder,
687 offset,
688 _depth,
689 )
690 }
691 }
692 unsafe impl<
693 D: fidl::encoding::ResourceDialect,
694 T0: fidl::encoding::Encode<u64, D>,
695 T1: fidl::encoding::Encode<u64, D>,
696 T2: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
697 > fidl::encoding::Encode<DomainControllerLeaseMinFrequencyRequest, D> for (T0, T1, T2)
698 {
699 #[inline]
700 unsafe fn encode(
701 self,
702 encoder: &mut fidl::encoding::Encoder<'_, D>,
703 offset: usize,
704 depth: fidl::encoding::Depth,
705 ) -> fidl::Result<()> {
706 encoder.debug_check_bounds::<DomainControllerLeaseMinFrequencyRequest>(offset);
707 self.0.encode(encoder, offset + 0, depth)?;
711 self.1.encode(encoder, offset + 8, depth)?;
712 self.2.encode(encoder, offset + 16, depth)?;
713 Ok(())
714 }
715 }
716
717 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
718 for DomainControllerLeaseMinFrequencyRequest
719 {
720 #[inline(always)]
721 fn new_empty() -> Self {
722 Self {
723 domain_id: fidl::new_empty!(u64, D),
724 frequency_index: fidl::new_empty!(u64, D),
725 lease_name: fidl::new_empty!(fidl::encoding::BoundedString<64>, D),
726 }
727 }
728
729 #[inline]
730 unsafe fn decode(
731 &mut self,
732 decoder: &mut fidl::encoding::Decoder<'_, D>,
733 offset: usize,
734 _depth: fidl::encoding::Depth,
735 ) -> fidl::Result<()> {
736 decoder.debug_check_bounds::<Self>(offset);
737 fidl::decode!(u64, D, &mut self.domain_id, decoder, offset + 0, _depth)?;
739 fidl::decode!(u64, D, &mut self.frequency_index, decoder, offset + 8, _depth)?;
740 fidl::decode!(
741 fidl::encoding::BoundedString<64>,
742 D,
743 &mut self.lease_name,
744 decoder,
745 offset + 16,
746 _depth
747 )?;
748 Ok(())
749 }
750 }
751
752 impl fidl::encoding::ValueTypeMarker for DomainControllerSetMaxFrequencyRequest {
753 type Borrowed<'a> = &'a Self;
754 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
755 value
756 }
757 }
758
759 unsafe impl fidl::encoding::TypeMarker for DomainControllerSetMaxFrequencyRequest {
760 type Owned = Self;
761
762 #[inline(always)]
763 fn inline_align(_context: fidl::encoding::Context) -> usize {
764 8
765 }
766
767 #[inline(always)]
768 fn inline_size(_context: fidl::encoding::Context) -> usize {
769 16
770 }
771 #[inline(always)]
772 fn encode_is_copy() -> bool {
773 true
774 }
775
776 #[inline(always)]
777 fn decode_is_copy() -> bool {
778 true
779 }
780 }
781
782 unsafe impl<D: fidl::encoding::ResourceDialect>
783 fidl::encoding::Encode<DomainControllerSetMaxFrequencyRequest, D>
784 for &DomainControllerSetMaxFrequencyRequest
785 {
786 #[inline]
787 unsafe fn encode(
788 self,
789 encoder: &mut fidl::encoding::Encoder<'_, D>,
790 offset: usize,
791 _depth: fidl::encoding::Depth,
792 ) -> fidl::Result<()> {
793 encoder.debug_check_bounds::<DomainControllerSetMaxFrequencyRequest>(offset);
794 unsafe {
795 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
797 (buf_ptr as *mut DomainControllerSetMaxFrequencyRequest).write_unaligned(
798 (self as *const DomainControllerSetMaxFrequencyRequest).read(),
799 );
800 }
803 Ok(())
804 }
805 }
806 unsafe impl<
807 D: fidl::encoding::ResourceDialect,
808 T0: fidl::encoding::Encode<u64, D>,
809 T1: fidl::encoding::Encode<u64, D>,
810 > fidl::encoding::Encode<DomainControllerSetMaxFrequencyRequest, D> for (T0, T1)
811 {
812 #[inline]
813 unsafe fn encode(
814 self,
815 encoder: &mut fidl::encoding::Encoder<'_, D>,
816 offset: usize,
817 depth: fidl::encoding::Depth,
818 ) -> fidl::Result<()> {
819 encoder.debug_check_bounds::<DomainControllerSetMaxFrequencyRequest>(offset);
820 self.0.encode(encoder, offset + 0, depth)?;
824 self.1.encode(encoder, offset + 8, depth)?;
825 Ok(())
826 }
827 }
828
829 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
830 for DomainControllerSetMaxFrequencyRequest
831 {
832 #[inline(always)]
833 fn new_empty() -> Self {
834 Self { domain_id: fidl::new_empty!(u64, D), frequency_index: fidl::new_empty!(u64, D) }
835 }
836
837 #[inline]
838 unsafe fn decode(
839 &mut self,
840 decoder: &mut fidl::encoding::Decoder<'_, D>,
841 offset: usize,
842 _depth: fidl::encoding::Depth,
843 ) -> fidl::Result<()> {
844 decoder.debug_check_bounds::<Self>(offset);
845 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
846 unsafe {
849 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
850 }
851 Ok(())
852 }
853 }
854
855 impl fidl::encoding::ValueTypeMarker for DomainControllerGetMaxFrequencyResponse {
856 type Borrowed<'a> = &'a Self;
857 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
858 value
859 }
860 }
861
862 unsafe impl fidl::encoding::TypeMarker for DomainControllerGetMaxFrequencyResponse {
863 type Owned = Self;
864
865 #[inline(always)]
866 fn inline_align(_context: fidl::encoding::Context) -> usize {
867 8
868 }
869
870 #[inline(always)]
871 fn inline_size(_context: fidl::encoding::Context) -> usize {
872 8
873 }
874 #[inline(always)]
875 fn encode_is_copy() -> bool {
876 true
877 }
878
879 #[inline(always)]
880 fn decode_is_copy() -> bool {
881 true
882 }
883 }
884
885 unsafe impl<D: fidl::encoding::ResourceDialect>
886 fidl::encoding::Encode<DomainControllerGetMaxFrequencyResponse, D>
887 for &DomainControllerGetMaxFrequencyResponse
888 {
889 #[inline]
890 unsafe fn encode(
891 self,
892 encoder: &mut fidl::encoding::Encoder<'_, D>,
893 offset: usize,
894 _depth: fidl::encoding::Depth,
895 ) -> fidl::Result<()> {
896 encoder.debug_check_bounds::<DomainControllerGetMaxFrequencyResponse>(offset);
897 unsafe {
898 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
900 (buf_ptr as *mut DomainControllerGetMaxFrequencyResponse).write_unaligned(
901 (self as *const DomainControllerGetMaxFrequencyResponse).read(),
902 );
903 }
906 Ok(())
907 }
908 }
909 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
910 fidl::encoding::Encode<DomainControllerGetMaxFrequencyResponse, D> for (T0,)
911 {
912 #[inline]
913 unsafe fn encode(
914 self,
915 encoder: &mut fidl::encoding::Encoder<'_, D>,
916 offset: usize,
917 depth: fidl::encoding::Depth,
918 ) -> fidl::Result<()> {
919 encoder.debug_check_bounds::<DomainControllerGetMaxFrequencyResponse>(offset);
920 self.0.encode(encoder, offset + 0, depth)?;
924 Ok(())
925 }
926 }
927
928 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
929 for DomainControllerGetMaxFrequencyResponse
930 {
931 #[inline(always)]
932 fn new_empty() -> Self {
933 Self { max_frequency_index: fidl::new_empty!(u64, D) }
934 }
935
936 #[inline]
937 unsafe fn decode(
938 &mut self,
939 decoder: &mut fidl::encoding::Decoder<'_, D>,
940 offset: usize,
941 _depth: fidl::encoding::Depth,
942 ) -> fidl::Result<()> {
943 decoder.debug_check_bounds::<Self>(offset);
944 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
945 unsafe {
948 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
949 }
950 Ok(())
951 }
952 }
953
954 impl fidl::encoding::ValueTypeMarker for DomainControllerGetMinFrequencyResponse {
955 type Borrowed<'a> = &'a Self;
956 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
957 value
958 }
959 }
960
961 unsafe impl fidl::encoding::TypeMarker for DomainControllerGetMinFrequencyResponse {
962 type Owned = Self;
963
964 #[inline(always)]
965 fn inline_align(_context: fidl::encoding::Context) -> usize {
966 8
967 }
968
969 #[inline(always)]
970 fn inline_size(_context: fidl::encoding::Context) -> usize {
971 8
972 }
973 #[inline(always)]
974 fn encode_is_copy() -> bool {
975 true
976 }
977
978 #[inline(always)]
979 fn decode_is_copy() -> bool {
980 true
981 }
982 }
983
984 unsafe impl<D: fidl::encoding::ResourceDialect>
985 fidl::encoding::Encode<DomainControllerGetMinFrequencyResponse, D>
986 for &DomainControllerGetMinFrequencyResponse
987 {
988 #[inline]
989 unsafe fn encode(
990 self,
991 encoder: &mut fidl::encoding::Encoder<'_, D>,
992 offset: usize,
993 _depth: fidl::encoding::Depth,
994 ) -> fidl::Result<()> {
995 encoder.debug_check_bounds::<DomainControllerGetMinFrequencyResponse>(offset);
996 unsafe {
997 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
999 (buf_ptr as *mut DomainControllerGetMinFrequencyResponse).write_unaligned(
1000 (self as *const DomainControllerGetMinFrequencyResponse).read(),
1001 );
1002 }
1005 Ok(())
1006 }
1007 }
1008 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1009 fidl::encoding::Encode<DomainControllerGetMinFrequencyResponse, D> for (T0,)
1010 {
1011 #[inline]
1012 unsafe fn encode(
1013 self,
1014 encoder: &mut fidl::encoding::Encoder<'_, D>,
1015 offset: usize,
1016 depth: fidl::encoding::Depth,
1017 ) -> fidl::Result<()> {
1018 encoder.debug_check_bounds::<DomainControllerGetMinFrequencyResponse>(offset);
1019 self.0.encode(encoder, offset + 0, depth)?;
1023 Ok(())
1024 }
1025 }
1026
1027 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1028 for DomainControllerGetMinFrequencyResponse
1029 {
1030 #[inline(always)]
1031 fn new_empty() -> Self {
1032 Self { min_frequency_index: fidl::new_empty!(u64, D) }
1033 }
1034
1035 #[inline]
1036 unsafe fn decode(
1037 &mut self,
1038 decoder: &mut fidl::encoding::Decoder<'_, D>,
1039 offset: usize,
1040 _depth: fidl::encoding::Depth,
1041 ) -> fidl::Result<()> {
1042 decoder.debug_check_bounds::<Self>(offset);
1043 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1044 unsafe {
1047 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1048 }
1049 Ok(())
1050 }
1051 }
1052
1053 impl fidl::encoding::ValueTypeMarker for DomainControllerListDomainsResponse {
1054 type Borrowed<'a> = &'a Self;
1055 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1056 value
1057 }
1058 }
1059
1060 unsafe impl fidl::encoding::TypeMarker for DomainControllerListDomainsResponse {
1061 type Owned = Self;
1062
1063 #[inline(always)]
1064 fn inline_align(_context: fidl::encoding::Context) -> usize {
1065 8
1066 }
1067
1068 #[inline(always)]
1069 fn inline_size(_context: fidl::encoding::Context) -> usize {
1070 16
1071 }
1072 }
1073
1074 unsafe impl<D: fidl::encoding::ResourceDialect>
1075 fidl::encoding::Encode<DomainControllerListDomainsResponse, D>
1076 for &DomainControllerListDomainsResponse
1077 {
1078 #[inline]
1079 unsafe fn encode(
1080 self,
1081 encoder: &mut fidl::encoding::Encoder<'_, D>,
1082 offset: usize,
1083 _depth: fidl::encoding::Depth,
1084 ) -> fidl::Result<()> {
1085 encoder.debug_check_bounds::<DomainControllerListDomainsResponse>(offset);
1086 fidl::encoding::Encode::<DomainControllerListDomainsResponse, D>::encode(
1088 (
1089 <fidl::encoding::UnboundedVector<DomainInfo> as fidl::encoding::ValueTypeMarker>::borrow(&self.domains),
1090 ),
1091 encoder, offset, _depth
1092 )
1093 }
1094 }
1095 unsafe impl<
1096 D: fidl::encoding::ResourceDialect,
1097 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<DomainInfo>, D>,
1098 > fidl::encoding::Encode<DomainControllerListDomainsResponse, D> for (T0,)
1099 {
1100 #[inline]
1101 unsafe fn encode(
1102 self,
1103 encoder: &mut fidl::encoding::Encoder<'_, D>,
1104 offset: usize,
1105 depth: fidl::encoding::Depth,
1106 ) -> fidl::Result<()> {
1107 encoder.debug_check_bounds::<DomainControllerListDomainsResponse>(offset);
1108 self.0.encode(encoder, offset + 0, depth)?;
1112 Ok(())
1113 }
1114 }
1115
1116 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1117 for DomainControllerListDomainsResponse
1118 {
1119 #[inline(always)]
1120 fn new_empty() -> Self {
1121 Self { domains: fidl::new_empty!(fidl::encoding::UnboundedVector<DomainInfo>, D) }
1122 }
1123
1124 #[inline]
1125 unsafe fn decode(
1126 &mut self,
1127 decoder: &mut fidl::encoding::Decoder<'_, D>,
1128 offset: usize,
1129 _depth: fidl::encoding::Depth,
1130 ) -> fidl::Result<()> {
1131 decoder.debug_check_bounds::<Self>(offset);
1132 fidl::decode!(
1134 fidl::encoding::UnboundedVector<DomainInfo>,
1135 D,
1136 &mut self.domains,
1137 decoder,
1138 offset + 0,
1139 _depth
1140 )?;
1141 Ok(())
1142 }
1143 }
1144
1145 impl DomainInfo {
1146 #[inline(always)]
1147 fn max_ordinal_present(&self) -> u64 {
1148 if let Some(_) = self.name {
1149 return 4;
1150 }
1151 if let Some(_) = self.available_frequencies_hz {
1152 return 3;
1153 }
1154 if let Some(_) = self.core_ids {
1155 return 2;
1156 }
1157 if let Some(_) = self.id {
1158 return 1;
1159 }
1160 0
1161 }
1162 }
1163
1164 impl fidl::encoding::ValueTypeMarker for DomainInfo {
1165 type Borrowed<'a> = &'a Self;
1166 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1167 value
1168 }
1169 }
1170
1171 unsafe impl fidl::encoding::TypeMarker for DomainInfo {
1172 type Owned = Self;
1173
1174 #[inline(always)]
1175 fn inline_align(_context: fidl::encoding::Context) -> usize {
1176 8
1177 }
1178
1179 #[inline(always)]
1180 fn inline_size(_context: fidl::encoding::Context) -> usize {
1181 16
1182 }
1183 }
1184
1185 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DomainInfo, D>
1186 for &DomainInfo
1187 {
1188 unsafe fn encode(
1189 self,
1190 encoder: &mut fidl::encoding::Encoder<'_, D>,
1191 offset: usize,
1192 mut depth: fidl::encoding::Depth,
1193 ) -> fidl::Result<()> {
1194 encoder.debug_check_bounds::<DomainInfo>(offset);
1195 let max_ordinal: u64 = self.max_ordinal_present();
1197 encoder.write_num(max_ordinal, offset);
1198 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1199 if max_ordinal == 0 {
1201 return Ok(());
1202 }
1203 depth.increment()?;
1204 let envelope_size = 8;
1205 let bytes_len = max_ordinal as usize * envelope_size;
1206 #[allow(unused_variables)]
1207 let offset = encoder.out_of_line_offset(bytes_len);
1208 let mut _prev_end_offset: usize = 0;
1209 if 1 > max_ordinal {
1210 return Ok(());
1211 }
1212
1213 let cur_offset: usize = (1 - 1) * envelope_size;
1216
1217 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1219
1220 fidl::encoding::encode_in_envelope_optional::<u64, D>(
1225 self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
1226 encoder,
1227 offset + cur_offset,
1228 depth,
1229 )?;
1230
1231 _prev_end_offset = cur_offset + envelope_size;
1232 if 2 > max_ordinal {
1233 return Ok(());
1234 }
1235
1236 let cur_offset: usize = (2 - 1) * envelope_size;
1239
1240 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1242
1243 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u64>, D>(
1248 self.core_ids.as_ref().map(<fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow),
1249 encoder, offset + cur_offset, depth
1250 )?;
1251
1252 _prev_end_offset = cur_offset + envelope_size;
1253 if 3 > max_ordinal {
1254 return Ok(());
1255 }
1256
1257 let cur_offset: usize = (3 - 1) * envelope_size;
1260
1261 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1263
1264 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u64>, D>(
1269 self.available_frequencies_hz.as_ref().map(<fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow),
1270 encoder, offset + cur_offset, depth
1271 )?;
1272
1273 _prev_end_offset = cur_offset + envelope_size;
1274 if 4 > max_ordinal {
1275 return Ok(());
1276 }
1277
1278 let cur_offset: usize = (4 - 1) * envelope_size;
1281
1282 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1284
1285 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
1290 self.name.as_ref().map(
1291 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
1292 ),
1293 encoder,
1294 offset + cur_offset,
1295 depth,
1296 )?;
1297
1298 _prev_end_offset = cur_offset + envelope_size;
1299
1300 Ok(())
1301 }
1302 }
1303
1304 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DomainInfo {
1305 #[inline(always)]
1306 fn new_empty() -> Self {
1307 Self::default()
1308 }
1309
1310 unsafe fn decode(
1311 &mut self,
1312 decoder: &mut fidl::encoding::Decoder<'_, D>,
1313 offset: usize,
1314 mut depth: fidl::encoding::Depth,
1315 ) -> fidl::Result<()> {
1316 decoder.debug_check_bounds::<Self>(offset);
1317 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1318 None => return Err(fidl::Error::NotNullable),
1319 Some(len) => len,
1320 };
1321 if len == 0 {
1323 return Ok(());
1324 };
1325 depth.increment()?;
1326 let envelope_size = 8;
1327 let bytes_len = len * envelope_size;
1328 let offset = decoder.out_of_line_offset(bytes_len)?;
1329 let mut _next_ordinal_to_read = 0;
1331 let mut next_offset = offset;
1332 let end_offset = offset + bytes_len;
1333 _next_ordinal_to_read += 1;
1334 if next_offset >= end_offset {
1335 return Ok(());
1336 }
1337
1338 while _next_ordinal_to_read < 1 {
1340 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1341 _next_ordinal_to_read += 1;
1342 next_offset += envelope_size;
1343 }
1344
1345 let next_out_of_line = decoder.next_out_of_line();
1346 let handles_before = decoder.remaining_handles();
1347 if let Some((inlined, num_bytes, num_handles)) =
1348 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1349 {
1350 let member_inline_size =
1351 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1352 if inlined != (member_inline_size <= 4) {
1353 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1354 }
1355 let inner_offset;
1356 let mut inner_depth = depth.clone();
1357 if inlined {
1358 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1359 inner_offset = next_offset;
1360 } else {
1361 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1362 inner_depth.increment()?;
1363 }
1364 let val_ref = self.id.get_or_insert_with(|| fidl::new_empty!(u64, D));
1365 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
1366 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1367 {
1368 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1369 }
1370 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1371 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1372 }
1373 }
1374
1375 next_offset += envelope_size;
1376 _next_ordinal_to_read += 1;
1377 if next_offset >= end_offset {
1378 return Ok(());
1379 }
1380
1381 while _next_ordinal_to_read < 2 {
1383 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1384 _next_ordinal_to_read += 1;
1385 next_offset += envelope_size;
1386 }
1387
1388 let next_out_of_line = decoder.next_out_of_line();
1389 let handles_before = decoder.remaining_handles();
1390 if let Some((inlined, num_bytes, num_handles)) =
1391 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1392 {
1393 let member_inline_size = <fidl::encoding::UnboundedVector<u64> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1394 if inlined != (member_inline_size <= 4) {
1395 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1396 }
1397 let inner_offset;
1398 let mut inner_depth = depth.clone();
1399 if inlined {
1400 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1401 inner_offset = next_offset;
1402 } else {
1403 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1404 inner_depth.increment()?;
1405 }
1406 let val_ref = self.core_ids.get_or_insert_with(|| {
1407 fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D)
1408 });
1409 fidl::decode!(
1410 fidl::encoding::UnboundedVector<u64>,
1411 D,
1412 val_ref,
1413 decoder,
1414 inner_offset,
1415 inner_depth
1416 )?;
1417 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1418 {
1419 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1420 }
1421 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1422 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1423 }
1424 }
1425
1426 next_offset += envelope_size;
1427 _next_ordinal_to_read += 1;
1428 if next_offset >= end_offset {
1429 return Ok(());
1430 }
1431
1432 while _next_ordinal_to_read < 3 {
1434 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1435 _next_ordinal_to_read += 1;
1436 next_offset += envelope_size;
1437 }
1438
1439 let next_out_of_line = decoder.next_out_of_line();
1440 let handles_before = decoder.remaining_handles();
1441 if let Some((inlined, num_bytes, num_handles)) =
1442 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1443 {
1444 let member_inline_size = <fidl::encoding::UnboundedVector<u64> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1445 if inlined != (member_inline_size <= 4) {
1446 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1447 }
1448 let inner_offset;
1449 let mut inner_depth = depth.clone();
1450 if inlined {
1451 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1452 inner_offset = next_offset;
1453 } else {
1454 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1455 inner_depth.increment()?;
1456 }
1457 let val_ref = self.available_frequencies_hz.get_or_insert_with(|| {
1458 fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D)
1459 });
1460 fidl::decode!(
1461 fidl::encoding::UnboundedVector<u64>,
1462 D,
1463 val_ref,
1464 decoder,
1465 inner_offset,
1466 inner_depth
1467 )?;
1468 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1469 {
1470 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1471 }
1472 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1473 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1474 }
1475 }
1476
1477 next_offset += envelope_size;
1478 _next_ordinal_to_read += 1;
1479 if next_offset >= end_offset {
1480 return Ok(());
1481 }
1482
1483 while _next_ordinal_to_read < 4 {
1485 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1486 _next_ordinal_to_read += 1;
1487 next_offset += envelope_size;
1488 }
1489
1490 let next_out_of_line = decoder.next_out_of_line();
1491 let handles_before = decoder.remaining_handles();
1492 if let Some((inlined, num_bytes, num_handles)) =
1493 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1494 {
1495 let member_inline_size =
1496 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
1497 decoder.context,
1498 );
1499 if inlined != (member_inline_size <= 4) {
1500 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1501 }
1502 let inner_offset;
1503 let mut inner_depth = depth.clone();
1504 if inlined {
1505 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1506 inner_offset = next_offset;
1507 } else {
1508 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1509 inner_depth.increment()?;
1510 }
1511 let val_ref = self
1512 .name
1513 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
1514 fidl::decode!(
1515 fidl::encoding::UnboundedString,
1516 D,
1517 val_ref,
1518 decoder,
1519 inner_offset,
1520 inner_depth
1521 )?;
1522 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1523 {
1524 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1525 }
1526 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1527 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1528 }
1529 }
1530
1531 next_offset += envelope_size;
1532
1533 while next_offset < end_offset {
1535 _next_ordinal_to_read += 1;
1536 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1537 next_offset += envelope_size;
1538 }
1539
1540 Ok(())
1541 }
1542 }
1543}