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 DEVICE_OPERATING_POINT_P0: u32 = 0;
12
13pub const FREQUENCY_UNKNOWN: i64 = -1;
17
18pub const VOLTAGE_UNKNOWN: i64 = -1;
19
20#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22#[repr(C)]
23pub struct CpuOperatingPointInfo {
24 pub frequency_hz: i64,
25 pub voltage_uv: i64,
26}
27
28impl fidl::Persistable for CpuOperatingPointInfo {}
29
30#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31#[repr(C)]
32pub struct DeviceGetCurrentOperatingPointResponse {
33 pub out_opp: u32,
34}
35
36impl fidl::Persistable for DeviceGetCurrentOperatingPointResponse {}
37
38#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39#[repr(C)]
40pub struct DeviceGetDomainIdResponse {
41 pub domain_id: u32,
42}
43
44impl fidl::Persistable for DeviceGetDomainIdResponse {}
45
46#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
47#[repr(C)]
48pub struct DeviceGetLogicalCoreIdRequest {
49 pub index: u64,
50}
51
52impl fidl::Persistable for DeviceGetLogicalCoreIdRequest {}
53
54#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
55#[repr(C)]
56pub struct DeviceGetLogicalCoreIdResponse {
57 pub id: u64,
58}
59
60impl fidl::Persistable for DeviceGetLogicalCoreIdResponse {}
61
62#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
63#[repr(C)]
64pub struct DeviceGetNumLogicalCoresResponse {
65 pub count: u64,
66}
67
68impl fidl::Persistable for DeviceGetNumLogicalCoresResponse {}
69
70#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
71#[repr(C)]
72pub struct DeviceGetOperatingPointInfoRequest {
73 pub opp: u32,
74}
75
76impl fidl::Persistable for DeviceGetOperatingPointInfoRequest {}
77
78#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
79#[repr(C)]
80pub struct DeviceSetCurrentOperatingPointRequest {
81 pub requested_opp: u32,
82}
83
84impl fidl::Persistable for DeviceSetCurrentOperatingPointRequest {}
85
86#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
87#[repr(C)]
88pub struct DeviceSetMaximumOperatingPointLimitRequest {
89 pub maximum_opp: u32,
90}
91
92impl fidl::Persistable for DeviceSetMaximumOperatingPointLimitRequest {}
93
94#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
95#[repr(C)]
96pub struct DeviceSetMinimumOperatingPointLimitRequest {
97 pub minimum_opp: u32,
98}
99
100impl fidl::Persistable for DeviceSetMinimumOperatingPointLimitRequest {}
101
102#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
103#[repr(C)]
104pub struct DeviceSetOperatingPointLimitsRequest {
105 pub minimum_opp: u32,
106 pub maximum_opp: u32,
107}
108
109impl fidl::Persistable for DeviceSetOperatingPointLimitsRequest {}
110
111#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
112#[repr(C)]
113pub struct DeviceGetCurrentOperatingPointLimitsResponse {
114 pub minimum_opp: u32,
115 pub maximum_opp: u32,
116}
117
118impl fidl::Persistable for DeviceGetCurrentOperatingPointLimitsResponse {}
119
120#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
121#[repr(C)]
122pub struct DeviceGetOperatingPointCountResponse {
123 pub count: u32,
124}
125
126impl fidl::Persistable for DeviceGetOperatingPointCountResponse {}
127
128#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
129#[repr(C)]
130pub struct DeviceGetOperatingPointInfoResponse {
131 pub info: CpuOperatingPointInfo,
132}
133
134impl fidl::Persistable for DeviceGetOperatingPointInfoResponse {}
135
136#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
137#[repr(C)]
138pub struct DeviceGetRelativePerformance2Response {
139 pub relative_performance: u64,
140}
141
142impl fidl::Persistable for DeviceGetRelativePerformance2Response {}
143
144#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
145#[repr(C)]
146pub struct DeviceGetRelativePerformanceResponse {
147 pub relative_performance: u8,
148}
149
150impl fidl::Persistable for DeviceGetRelativePerformanceResponse {}
151
152#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
153#[repr(C)]
154pub struct DeviceSetCurrentOperatingPointResponse {
155 pub out_opp: u32,
156}
157
158impl fidl::Persistable for DeviceSetCurrentOperatingPointResponse {}
159
160pub mod device_ordinals {
161 pub const GET_OPERATING_POINT_INFO: u64 = 0x6594a9234fc958e2;
162 pub const GET_CURRENT_OPERATING_POINT: u64 = 0x52de67a5993f5fe1;
163 pub const SET_CURRENT_OPERATING_POINT: u64 = 0x34a7828b5ca53fd;
164 pub const SET_MINIMUM_OPERATING_POINT_LIMIT: u64 = 0x5467de86fa3fdfe7;
165 pub const SET_MAXIMUM_OPERATING_POINT_LIMIT: u64 = 0x385fa4d74481fbfd;
166 pub const SET_OPERATING_POINT_LIMITS: u64 = 0x30aa7514dd598b23;
167 pub const GET_CURRENT_OPERATING_POINT_LIMITS: u64 = 0x7aefe3d765cfc6a7;
168 pub const GET_OPERATING_POINT_COUNT: u64 = 0x13e70ec7131889ba;
169 pub const GET_NUM_LOGICAL_CORES: u64 = 0x74e304c90ca165c5;
170 pub const GET_LOGICAL_CORE_ID: u64 = 0x7168f98ddbd26058;
171 pub const GET_DOMAIN_ID: u64 = 0x3030f85bdc1ef321;
172 pub const GET_RELATIVE_PERFORMANCE: u64 = 0x41c37eaf0c26a3d3;
173 pub const GET_RELATIVE_PERFORMANCE2: u64 = 0x48831ad9a7fc2e38;
174}
175
176mod internal {
177 use super::*;
178
179 impl fidl::encoding::ValueTypeMarker for CpuOperatingPointInfo {
180 type Borrowed<'a> = &'a Self;
181 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
182 value
183 }
184 }
185
186 unsafe impl fidl::encoding::TypeMarker for CpuOperatingPointInfo {
187 type Owned = Self;
188
189 #[inline(always)]
190 fn inline_align(_context: fidl::encoding::Context) -> usize {
191 8
192 }
193
194 #[inline(always)]
195 fn inline_size(_context: fidl::encoding::Context) -> usize {
196 16
197 }
198 #[inline(always)]
199 fn encode_is_copy() -> bool {
200 true
201 }
202
203 #[inline(always)]
204 fn decode_is_copy() -> bool {
205 true
206 }
207 }
208
209 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CpuOperatingPointInfo, D>
210 for &CpuOperatingPointInfo
211 {
212 #[inline]
213 unsafe fn encode(
214 self,
215 encoder: &mut fidl::encoding::Encoder<'_, D>,
216 offset: usize,
217 _depth: fidl::encoding::Depth,
218 ) -> fidl::Result<()> {
219 encoder.debug_check_bounds::<CpuOperatingPointInfo>(offset);
220 unsafe {
221 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
223 (buf_ptr as *mut CpuOperatingPointInfo)
224 .write_unaligned((self as *const CpuOperatingPointInfo).read());
225 }
228 Ok(())
229 }
230 }
231 unsafe impl<
232 D: fidl::encoding::ResourceDialect,
233 T0: fidl::encoding::Encode<i64, D>,
234 T1: fidl::encoding::Encode<i64, D>,
235 > fidl::encoding::Encode<CpuOperatingPointInfo, D> for (T0, T1)
236 {
237 #[inline]
238 unsafe fn encode(
239 self,
240 encoder: &mut fidl::encoding::Encoder<'_, D>,
241 offset: usize,
242 depth: fidl::encoding::Depth,
243 ) -> fidl::Result<()> {
244 encoder.debug_check_bounds::<CpuOperatingPointInfo>(offset);
245 self.0.encode(encoder, offset + 0, depth)?;
249 self.1.encode(encoder, offset + 8, depth)?;
250 Ok(())
251 }
252 }
253
254 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CpuOperatingPointInfo {
255 #[inline(always)]
256 fn new_empty() -> Self {
257 Self { frequency_hz: fidl::new_empty!(i64, D), voltage_uv: fidl::new_empty!(i64, D) }
258 }
259
260 #[inline]
261 unsafe fn decode(
262 &mut self,
263 decoder: &mut fidl::encoding::Decoder<'_, D>,
264 offset: usize,
265 _depth: fidl::encoding::Depth,
266 ) -> fidl::Result<()> {
267 decoder.debug_check_bounds::<Self>(offset);
268 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
269 unsafe {
272 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
273 }
274 Ok(())
275 }
276 }
277
278 impl fidl::encoding::ValueTypeMarker for DeviceGetCurrentOperatingPointResponse {
279 type Borrowed<'a> = &'a Self;
280 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
281 value
282 }
283 }
284
285 unsafe impl fidl::encoding::TypeMarker for DeviceGetCurrentOperatingPointResponse {
286 type Owned = Self;
287
288 #[inline(always)]
289 fn inline_align(_context: fidl::encoding::Context) -> usize {
290 4
291 }
292
293 #[inline(always)]
294 fn inline_size(_context: fidl::encoding::Context) -> usize {
295 4
296 }
297 #[inline(always)]
298 fn encode_is_copy() -> bool {
299 true
300 }
301
302 #[inline(always)]
303 fn decode_is_copy() -> bool {
304 true
305 }
306 }
307
308 unsafe impl<D: fidl::encoding::ResourceDialect>
309 fidl::encoding::Encode<DeviceGetCurrentOperatingPointResponse, D>
310 for &DeviceGetCurrentOperatingPointResponse
311 {
312 #[inline]
313 unsafe fn encode(
314 self,
315 encoder: &mut fidl::encoding::Encoder<'_, D>,
316 offset: usize,
317 _depth: fidl::encoding::Depth,
318 ) -> fidl::Result<()> {
319 encoder.debug_check_bounds::<DeviceGetCurrentOperatingPointResponse>(offset);
320 unsafe {
321 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
323 (buf_ptr as *mut DeviceGetCurrentOperatingPointResponse).write_unaligned(
324 (self as *const DeviceGetCurrentOperatingPointResponse).read(),
325 );
326 }
329 Ok(())
330 }
331 }
332 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
333 fidl::encoding::Encode<DeviceGetCurrentOperatingPointResponse, D> for (T0,)
334 {
335 #[inline]
336 unsafe fn encode(
337 self,
338 encoder: &mut fidl::encoding::Encoder<'_, D>,
339 offset: usize,
340 depth: fidl::encoding::Depth,
341 ) -> fidl::Result<()> {
342 encoder.debug_check_bounds::<DeviceGetCurrentOperatingPointResponse>(offset);
343 self.0.encode(encoder, offset + 0, depth)?;
347 Ok(())
348 }
349 }
350
351 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
352 for DeviceGetCurrentOperatingPointResponse
353 {
354 #[inline(always)]
355 fn new_empty() -> Self {
356 Self { out_opp: fidl::new_empty!(u32, D) }
357 }
358
359 #[inline]
360 unsafe fn decode(
361 &mut self,
362 decoder: &mut fidl::encoding::Decoder<'_, D>,
363 offset: usize,
364 _depth: fidl::encoding::Depth,
365 ) -> fidl::Result<()> {
366 decoder.debug_check_bounds::<Self>(offset);
367 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
368 unsafe {
371 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
372 }
373 Ok(())
374 }
375 }
376
377 impl fidl::encoding::ValueTypeMarker for DeviceGetDomainIdResponse {
378 type Borrowed<'a> = &'a Self;
379 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
380 value
381 }
382 }
383
384 unsafe impl fidl::encoding::TypeMarker for DeviceGetDomainIdResponse {
385 type Owned = Self;
386
387 #[inline(always)]
388 fn inline_align(_context: fidl::encoding::Context) -> usize {
389 4
390 }
391
392 #[inline(always)]
393 fn inline_size(_context: fidl::encoding::Context) -> usize {
394 4
395 }
396 #[inline(always)]
397 fn encode_is_copy() -> bool {
398 true
399 }
400
401 #[inline(always)]
402 fn decode_is_copy() -> bool {
403 true
404 }
405 }
406
407 unsafe impl<D: fidl::encoding::ResourceDialect>
408 fidl::encoding::Encode<DeviceGetDomainIdResponse, D> for &DeviceGetDomainIdResponse
409 {
410 #[inline]
411 unsafe fn encode(
412 self,
413 encoder: &mut fidl::encoding::Encoder<'_, D>,
414 offset: usize,
415 _depth: fidl::encoding::Depth,
416 ) -> fidl::Result<()> {
417 encoder.debug_check_bounds::<DeviceGetDomainIdResponse>(offset);
418 unsafe {
419 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
421 (buf_ptr as *mut DeviceGetDomainIdResponse)
422 .write_unaligned((self as *const DeviceGetDomainIdResponse).read());
423 }
426 Ok(())
427 }
428 }
429 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
430 fidl::encoding::Encode<DeviceGetDomainIdResponse, D> for (T0,)
431 {
432 #[inline]
433 unsafe fn encode(
434 self,
435 encoder: &mut fidl::encoding::Encoder<'_, D>,
436 offset: usize,
437 depth: fidl::encoding::Depth,
438 ) -> fidl::Result<()> {
439 encoder.debug_check_bounds::<DeviceGetDomainIdResponse>(offset);
440 self.0.encode(encoder, offset + 0, depth)?;
444 Ok(())
445 }
446 }
447
448 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
449 for DeviceGetDomainIdResponse
450 {
451 #[inline(always)]
452 fn new_empty() -> Self {
453 Self { domain_id: fidl::new_empty!(u32, D) }
454 }
455
456 #[inline]
457 unsafe fn decode(
458 &mut self,
459 decoder: &mut fidl::encoding::Decoder<'_, D>,
460 offset: usize,
461 _depth: fidl::encoding::Depth,
462 ) -> fidl::Result<()> {
463 decoder.debug_check_bounds::<Self>(offset);
464 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
465 unsafe {
468 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
469 }
470 Ok(())
471 }
472 }
473
474 impl fidl::encoding::ValueTypeMarker for DeviceGetLogicalCoreIdRequest {
475 type Borrowed<'a> = &'a Self;
476 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
477 value
478 }
479 }
480
481 unsafe impl fidl::encoding::TypeMarker for DeviceGetLogicalCoreIdRequest {
482 type Owned = Self;
483
484 #[inline(always)]
485 fn inline_align(_context: fidl::encoding::Context) -> usize {
486 8
487 }
488
489 #[inline(always)]
490 fn inline_size(_context: fidl::encoding::Context) -> usize {
491 8
492 }
493 #[inline(always)]
494 fn encode_is_copy() -> bool {
495 true
496 }
497
498 #[inline(always)]
499 fn decode_is_copy() -> bool {
500 true
501 }
502 }
503
504 unsafe impl<D: fidl::encoding::ResourceDialect>
505 fidl::encoding::Encode<DeviceGetLogicalCoreIdRequest, D>
506 for &DeviceGetLogicalCoreIdRequest
507 {
508 #[inline]
509 unsafe fn encode(
510 self,
511 encoder: &mut fidl::encoding::Encoder<'_, D>,
512 offset: usize,
513 _depth: fidl::encoding::Depth,
514 ) -> fidl::Result<()> {
515 encoder.debug_check_bounds::<DeviceGetLogicalCoreIdRequest>(offset);
516 unsafe {
517 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
519 (buf_ptr as *mut DeviceGetLogicalCoreIdRequest)
520 .write_unaligned((self as *const DeviceGetLogicalCoreIdRequest).read());
521 }
524 Ok(())
525 }
526 }
527 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
528 fidl::encoding::Encode<DeviceGetLogicalCoreIdRequest, D> for (T0,)
529 {
530 #[inline]
531 unsafe fn encode(
532 self,
533 encoder: &mut fidl::encoding::Encoder<'_, D>,
534 offset: usize,
535 depth: fidl::encoding::Depth,
536 ) -> fidl::Result<()> {
537 encoder.debug_check_bounds::<DeviceGetLogicalCoreIdRequest>(offset);
538 self.0.encode(encoder, offset + 0, depth)?;
542 Ok(())
543 }
544 }
545
546 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
547 for DeviceGetLogicalCoreIdRequest
548 {
549 #[inline(always)]
550 fn new_empty() -> Self {
551 Self { index: fidl::new_empty!(u64, D) }
552 }
553
554 #[inline]
555 unsafe fn decode(
556 &mut self,
557 decoder: &mut fidl::encoding::Decoder<'_, D>,
558 offset: usize,
559 _depth: fidl::encoding::Depth,
560 ) -> fidl::Result<()> {
561 decoder.debug_check_bounds::<Self>(offset);
562 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
563 unsafe {
566 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
567 }
568 Ok(())
569 }
570 }
571
572 impl fidl::encoding::ValueTypeMarker for DeviceGetLogicalCoreIdResponse {
573 type Borrowed<'a> = &'a Self;
574 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
575 value
576 }
577 }
578
579 unsafe impl fidl::encoding::TypeMarker for DeviceGetLogicalCoreIdResponse {
580 type Owned = Self;
581
582 #[inline(always)]
583 fn inline_align(_context: fidl::encoding::Context) -> usize {
584 8
585 }
586
587 #[inline(always)]
588 fn inline_size(_context: fidl::encoding::Context) -> usize {
589 8
590 }
591 #[inline(always)]
592 fn encode_is_copy() -> bool {
593 true
594 }
595
596 #[inline(always)]
597 fn decode_is_copy() -> bool {
598 true
599 }
600 }
601
602 unsafe impl<D: fidl::encoding::ResourceDialect>
603 fidl::encoding::Encode<DeviceGetLogicalCoreIdResponse, D>
604 for &DeviceGetLogicalCoreIdResponse
605 {
606 #[inline]
607 unsafe fn encode(
608 self,
609 encoder: &mut fidl::encoding::Encoder<'_, D>,
610 offset: usize,
611 _depth: fidl::encoding::Depth,
612 ) -> fidl::Result<()> {
613 encoder.debug_check_bounds::<DeviceGetLogicalCoreIdResponse>(offset);
614 unsafe {
615 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
617 (buf_ptr as *mut DeviceGetLogicalCoreIdResponse)
618 .write_unaligned((self as *const DeviceGetLogicalCoreIdResponse).read());
619 }
622 Ok(())
623 }
624 }
625 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
626 fidl::encoding::Encode<DeviceGetLogicalCoreIdResponse, D> for (T0,)
627 {
628 #[inline]
629 unsafe fn encode(
630 self,
631 encoder: &mut fidl::encoding::Encoder<'_, D>,
632 offset: usize,
633 depth: fidl::encoding::Depth,
634 ) -> fidl::Result<()> {
635 encoder.debug_check_bounds::<DeviceGetLogicalCoreIdResponse>(offset);
636 self.0.encode(encoder, offset + 0, depth)?;
640 Ok(())
641 }
642 }
643
644 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
645 for DeviceGetLogicalCoreIdResponse
646 {
647 #[inline(always)]
648 fn new_empty() -> Self {
649 Self { id: fidl::new_empty!(u64, D) }
650 }
651
652 #[inline]
653 unsafe fn decode(
654 &mut self,
655 decoder: &mut fidl::encoding::Decoder<'_, D>,
656 offset: usize,
657 _depth: fidl::encoding::Depth,
658 ) -> fidl::Result<()> {
659 decoder.debug_check_bounds::<Self>(offset);
660 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
661 unsafe {
664 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
665 }
666 Ok(())
667 }
668 }
669
670 impl fidl::encoding::ValueTypeMarker for DeviceGetNumLogicalCoresResponse {
671 type Borrowed<'a> = &'a Self;
672 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
673 value
674 }
675 }
676
677 unsafe impl fidl::encoding::TypeMarker for DeviceGetNumLogicalCoresResponse {
678 type Owned = Self;
679
680 #[inline(always)]
681 fn inline_align(_context: fidl::encoding::Context) -> usize {
682 8
683 }
684
685 #[inline(always)]
686 fn inline_size(_context: fidl::encoding::Context) -> usize {
687 8
688 }
689 #[inline(always)]
690 fn encode_is_copy() -> bool {
691 true
692 }
693
694 #[inline(always)]
695 fn decode_is_copy() -> bool {
696 true
697 }
698 }
699
700 unsafe impl<D: fidl::encoding::ResourceDialect>
701 fidl::encoding::Encode<DeviceGetNumLogicalCoresResponse, D>
702 for &DeviceGetNumLogicalCoresResponse
703 {
704 #[inline]
705 unsafe fn encode(
706 self,
707 encoder: &mut fidl::encoding::Encoder<'_, D>,
708 offset: usize,
709 _depth: fidl::encoding::Depth,
710 ) -> fidl::Result<()> {
711 encoder.debug_check_bounds::<DeviceGetNumLogicalCoresResponse>(offset);
712 unsafe {
713 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
715 (buf_ptr as *mut DeviceGetNumLogicalCoresResponse)
716 .write_unaligned((self as *const DeviceGetNumLogicalCoresResponse).read());
717 }
720 Ok(())
721 }
722 }
723 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
724 fidl::encoding::Encode<DeviceGetNumLogicalCoresResponse, D> for (T0,)
725 {
726 #[inline]
727 unsafe fn encode(
728 self,
729 encoder: &mut fidl::encoding::Encoder<'_, D>,
730 offset: usize,
731 depth: fidl::encoding::Depth,
732 ) -> fidl::Result<()> {
733 encoder.debug_check_bounds::<DeviceGetNumLogicalCoresResponse>(offset);
734 self.0.encode(encoder, offset + 0, depth)?;
738 Ok(())
739 }
740 }
741
742 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
743 for DeviceGetNumLogicalCoresResponse
744 {
745 #[inline(always)]
746 fn new_empty() -> Self {
747 Self { count: fidl::new_empty!(u64, D) }
748 }
749
750 #[inline]
751 unsafe fn decode(
752 &mut self,
753 decoder: &mut fidl::encoding::Decoder<'_, D>,
754 offset: usize,
755 _depth: fidl::encoding::Depth,
756 ) -> fidl::Result<()> {
757 decoder.debug_check_bounds::<Self>(offset);
758 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
759 unsafe {
762 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
763 }
764 Ok(())
765 }
766 }
767
768 impl fidl::encoding::ValueTypeMarker for DeviceGetOperatingPointInfoRequest {
769 type Borrowed<'a> = &'a Self;
770 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
771 value
772 }
773 }
774
775 unsafe impl fidl::encoding::TypeMarker for DeviceGetOperatingPointInfoRequest {
776 type Owned = Self;
777
778 #[inline(always)]
779 fn inline_align(_context: fidl::encoding::Context) -> usize {
780 4
781 }
782
783 #[inline(always)]
784 fn inline_size(_context: fidl::encoding::Context) -> usize {
785 4
786 }
787 #[inline(always)]
788 fn encode_is_copy() -> bool {
789 true
790 }
791
792 #[inline(always)]
793 fn decode_is_copy() -> bool {
794 true
795 }
796 }
797
798 unsafe impl<D: fidl::encoding::ResourceDialect>
799 fidl::encoding::Encode<DeviceGetOperatingPointInfoRequest, D>
800 for &DeviceGetOperatingPointInfoRequest
801 {
802 #[inline]
803 unsafe fn encode(
804 self,
805 encoder: &mut fidl::encoding::Encoder<'_, D>,
806 offset: usize,
807 _depth: fidl::encoding::Depth,
808 ) -> fidl::Result<()> {
809 encoder.debug_check_bounds::<DeviceGetOperatingPointInfoRequest>(offset);
810 unsafe {
811 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
813 (buf_ptr as *mut DeviceGetOperatingPointInfoRequest)
814 .write_unaligned((self as *const DeviceGetOperatingPointInfoRequest).read());
815 }
818 Ok(())
819 }
820 }
821 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
822 fidl::encoding::Encode<DeviceGetOperatingPointInfoRequest, D> for (T0,)
823 {
824 #[inline]
825 unsafe fn encode(
826 self,
827 encoder: &mut fidl::encoding::Encoder<'_, D>,
828 offset: usize,
829 depth: fidl::encoding::Depth,
830 ) -> fidl::Result<()> {
831 encoder.debug_check_bounds::<DeviceGetOperatingPointInfoRequest>(offset);
832 self.0.encode(encoder, offset + 0, depth)?;
836 Ok(())
837 }
838 }
839
840 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
841 for DeviceGetOperatingPointInfoRequest
842 {
843 #[inline(always)]
844 fn new_empty() -> Self {
845 Self { opp: fidl::new_empty!(u32, D) }
846 }
847
848 #[inline]
849 unsafe fn decode(
850 &mut self,
851 decoder: &mut fidl::encoding::Decoder<'_, D>,
852 offset: usize,
853 _depth: fidl::encoding::Depth,
854 ) -> fidl::Result<()> {
855 decoder.debug_check_bounds::<Self>(offset);
856 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
857 unsafe {
860 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
861 }
862 Ok(())
863 }
864 }
865
866 impl fidl::encoding::ValueTypeMarker for DeviceSetCurrentOperatingPointRequest {
867 type Borrowed<'a> = &'a Self;
868 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
869 value
870 }
871 }
872
873 unsafe impl fidl::encoding::TypeMarker for DeviceSetCurrentOperatingPointRequest {
874 type Owned = Self;
875
876 #[inline(always)]
877 fn inline_align(_context: fidl::encoding::Context) -> usize {
878 4
879 }
880
881 #[inline(always)]
882 fn inline_size(_context: fidl::encoding::Context) -> usize {
883 4
884 }
885 #[inline(always)]
886 fn encode_is_copy() -> bool {
887 true
888 }
889
890 #[inline(always)]
891 fn decode_is_copy() -> bool {
892 true
893 }
894 }
895
896 unsafe impl<D: fidl::encoding::ResourceDialect>
897 fidl::encoding::Encode<DeviceSetCurrentOperatingPointRequest, D>
898 for &DeviceSetCurrentOperatingPointRequest
899 {
900 #[inline]
901 unsafe fn encode(
902 self,
903 encoder: &mut fidl::encoding::Encoder<'_, D>,
904 offset: usize,
905 _depth: fidl::encoding::Depth,
906 ) -> fidl::Result<()> {
907 encoder.debug_check_bounds::<DeviceSetCurrentOperatingPointRequest>(offset);
908 unsafe {
909 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
911 (buf_ptr as *mut DeviceSetCurrentOperatingPointRequest)
912 .write_unaligned((self as *const DeviceSetCurrentOperatingPointRequest).read());
913 }
916 Ok(())
917 }
918 }
919 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
920 fidl::encoding::Encode<DeviceSetCurrentOperatingPointRequest, D> for (T0,)
921 {
922 #[inline]
923 unsafe fn encode(
924 self,
925 encoder: &mut fidl::encoding::Encoder<'_, D>,
926 offset: usize,
927 depth: fidl::encoding::Depth,
928 ) -> fidl::Result<()> {
929 encoder.debug_check_bounds::<DeviceSetCurrentOperatingPointRequest>(offset);
930 self.0.encode(encoder, offset + 0, depth)?;
934 Ok(())
935 }
936 }
937
938 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
939 for DeviceSetCurrentOperatingPointRequest
940 {
941 #[inline(always)]
942 fn new_empty() -> Self {
943 Self { requested_opp: fidl::new_empty!(u32, D) }
944 }
945
946 #[inline]
947 unsafe fn decode(
948 &mut self,
949 decoder: &mut fidl::encoding::Decoder<'_, D>,
950 offset: usize,
951 _depth: fidl::encoding::Depth,
952 ) -> fidl::Result<()> {
953 decoder.debug_check_bounds::<Self>(offset);
954 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
955 unsafe {
958 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
959 }
960 Ok(())
961 }
962 }
963
964 impl fidl::encoding::ValueTypeMarker for DeviceSetMaximumOperatingPointLimitRequest {
965 type Borrowed<'a> = &'a Self;
966 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
967 value
968 }
969 }
970
971 unsafe impl fidl::encoding::TypeMarker for DeviceSetMaximumOperatingPointLimitRequest {
972 type Owned = Self;
973
974 #[inline(always)]
975 fn inline_align(_context: fidl::encoding::Context) -> usize {
976 4
977 }
978
979 #[inline(always)]
980 fn inline_size(_context: fidl::encoding::Context) -> usize {
981 4
982 }
983 #[inline(always)]
984 fn encode_is_copy() -> bool {
985 true
986 }
987
988 #[inline(always)]
989 fn decode_is_copy() -> bool {
990 true
991 }
992 }
993
994 unsafe impl<D: fidl::encoding::ResourceDialect>
995 fidl::encoding::Encode<DeviceSetMaximumOperatingPointLimitRequest, D>
996 for &DeviceSetMaximumOperatingPointLimitRequest
997 {
998 #[inline]
999 unsafe fn encode(
1000 self,
1001 encoder: &mut fidl::encoding::Encoder<'_, D>,
1002 offset: usize,
1003 _depth: fidl::encoding::Depth,
1004 ) -> fidl::Result<()> {
1005 encoder.debug_check_bounds::<DeviceSetMaximumOperatingPointLimitRequest>(offset);
1006 unsafe {
1007 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1009 (buf_ptr as *mut DeviceSetMaximumOperatingPointLimitRequest).write_unaligned(
1010 (self as *const DeviceSetMaximumOperatingPointLimitRequest).read(),
1011 );
1012 }
1015 Ok(())
1016 }
1017 }
1018 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1019 fidl::encoding::Encode<DeviceSetMaximumOperatingPointLimitRequest, D> for (T0,)
1020 {
1021 #[inline]
1022 unsafe fn encode(
1023 self,
1024 encoder: &mut fidl::encoding::Encoder<'_, D>,
1025 offset: usize,
1026 depth: fidl::encoding::Depth,
1027 ) -> fidl::Result<()> {
1028 encoder.debug_check_bounds::<DeviceSetMaximumOperatingPointLimitRequest>(offset);
1029 self.0.encode(encoder, offset + 0, depth)?;
1033 Ok(())
1034 }
1035 }
1036
1037 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1038 for DeviceSetMaximumOperatingPointLimitRequest
1039 {
1040 #[inline(always)]
1041 fn new_empty() -> Self {
1042 Self { maximum_opp: fidl::new_empty!(u32, D) }
1043 }
1044
1045 #[inline]
1046 unsafe fn decode(
1047 &mut self,
1048 decoder: &mut fidl::encoding::Decoder<'_, D>,
1049 offset: usize,
1050 _depth: fidl::encoding::Depth,
1051 ) -> fidl::Result<()> {
1052 decoder.debug_check_bounds::<Self>(offset);
1053 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1054 unsafe {
1057 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1058 }
1059 Ok(())
1060 }
1061 }
1062
1063 impl fidl::encoding::ValueTypeMarker for DeviceSetMinimumOperatingPointLimitRequest {
1064 type Borrowed<'a> = &'a Self;
1065 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1066 value
1067 }
1068 }
1069
1070 unsafe impl fidl::encoding::TypeMarker for DeviceSetMinimumOperatingPointLimitRequest {
1071 type Owned = Self;
1072
1073 #[inline(always)]
1074 fn inline_align(_context: fidl::encoding::Context) -> usize {
1075 4
1076 }
1077
1078 #[inline(always)]
1079 fn inline_size(_context: fidl::encoding::Context) -> usize {
1080 4
1081 }
1082 #[inline(always)]
1083 fn encode_is_copy() -> bool {
1084 true
1085 }
1086
1087 #[inline(always)]
1088 fn decode_is_copy() -> bool {
1089 true
1090 }
1091 }
1092
1093 unsafe impl<D: fidl::encoding::ResourceDialect>
1094 fidl::encoding::Encode<DeviceSetMinimumOperatingPointLimitRequest, D>
1095 for &DeviceSetMinimumOperatingPointLimitRequest
1096 {
1097 #[inline]
1098 unsafe fn encode(
1099 self,
1100 encoder: &mut fidl::encoding::Encoder<'_, D>,
1101 offset: usize,
1102 _depth: fidl::encoding::Depth,
1103 ) -> fidl::Result<()> {
1104 encoder.debug_check_bounds::<DeviceSetMinimumOperatingPointLimitRequest>(offset);
1105 unsafe {
1106 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1108 (buf_ptr as *mut DeviceSetMinimumOperatingPointLimitRequest).write_unaligned(
1109 (self as *const DeviceSetMinimumOperatingPointLimitRequest).read(),
1110 );
1111 }
1114 Ok(())
1115 }
1116 }
1117 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1118 fidl::encoding::Encode<DeviceSetMinimumOperatingPointLimitRequest, D> for (T0,)
1119 {
1120 #[inline]
1121 unsafe fn encode(
1122 self,
1123 encoder: &mut fidl::encoding::Encoder<'_, D>,
1124 offset: usize,
1125 depth: fidl::encoding::Depth,
1126 ) -> fidl::Result<()> {
1127 encoder.debug_check_bounds::<DeviceSetMinimumOperatingPointLimitRequest>(offset);
1128 self.0.encode(encoder, offset + 0, depth)?;
1132 Ok(())
1133 }
1134 }
1135
1136 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1137 for DeviceSetMinimumOperatingPointLimitRequest
1138 {
1139 #[inline(always)]
1140 fn new_empty() -> Self {
1141 Self { minimum_opp: fidl::new_empty!(u32, D) }
1142 }
1143
1144 #[inline]
1145 unsafe fn decode(
1146 &mut self,
1147 decoder: &mut fidl::encoding::Decoder<'_, D>,
1148 offset: usize,
1149 _depth: fidl::encoding::Depth,
1150 ) -> fidl::Result<()> {
1151 decoder.debug_check_bounds::<Self>(offset);
1152 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1153 unsafe {
1156 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1157 }
1158 Ok(())
1159 }
1160 }
1161
1162 impl fidl::encoding::ValueTypeMarker for DeviceSetOperatingPointLimitsRequest {
1163 type Borrowed<'a> = &'a Self;
1164 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1165 value
1166 }
1167 }
1168
1169 unsafe impl fidl::encoding::TypeMarker for DeviceSetOperatingPointLimitsRequest {
1170 type Owned = Self;
1171
1172 #[inline(always)]
1173 fn inline_align(_context: fidl::encoding::Context) -> usize {
1174 4
1175 }
1176
1177 #[inline(always)]
1178 fn inline_size(_context: fidl::encoding::Context) -> usize {
1179 8
1180 }
1181 #[inline(always)]
1182 fn encode_is_copy() -> bool {
1183 true
1184 }
1185
1186 #[inline(always)]
1187 fn decode_is_copy() -> bool {
1188 true
1189 }
1190 }
1191
1192 unsafe impl<D: fidl::encoding::ResourceDialect>
1193 fidl::encoding::Encode<DeviceSetOperatingPointLimitsRequest, D>
1194 for &DeviceSetOperatingPointLimitsRequest
1195 {
1196 #[inline]
1197 unsafe fn encode(
1198 self,
1199 encoder: &mut fidl::encoding::Encoder<'_, D>,
1200 offset: usize,
1201 _depth: fidl::encoding::Depth,
1202 ) -> fidl::Result<()> {
1203 encoder.debug_check_bounds::<DeviceSetOperatingPointLimitsRequest>(offset);
1204 unsafe {
1205 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1207 (buf_ptr as *mut DeviceSetOperatingPointLimitsRequest)
1208 .write_unaligned((self as *const DeviceSetOperatingPointLimitsRequest).read());
1209 }
1212 Ok(())
1213 }
1214 }
1215 unsafe impl<
1216 D: fidl::encoding::ResourceDialect,
1217 T0: fidl::encoding::Encode<u32, D>,
1218 T1: fidl::encoding::Encode<u32, D>,
1219 > fidl::encoding::Encode<DeviceSetOperatingPointLimitsRequest, D> for (T0, T1)
1220 {
1221 #[inline]
1222 unsafe fn encode(
1223 self,
1224 encoder: &mut fidl::encoding::Encoder<'_, D>,
1225 offset: usize,
1226 depth: fidl::encoding::Depth,
1227 ) -> fidl::Result<()> {
1228 encoder.debug_check_bounds::<DeviceSetOperatingPointLimitsRequest>(offset);
1229 self.0.encode(encoder, offset + 0, depth)?;
1233 self.1.encode(encoder, offset + 4, depth)?;
1234 Ok(())
1235 }
1236 }
1237
1238 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1239 for DeviceSetOperatingPointLimitsRequest
1240 {
1241 #[inline(always)]
1242 fn new_empty() -> Self {
1243 Self { minimum_opp: fidl::new_empty!(u32, D), maximum_opp: fidl::new_empty!(u32, D) }
1244 }
1245
1246 #[inline]
1247 unsafe fn decode(
1248 &mut self,
1249 decoder: &mut fidl::encoding::Decoder<'_, D>,
1250 offset: usize,
1251 _depth: fidl::encoding::Depth,
1252 ) -> fidl::Result<()> {
1253 decoder.debug_check_bounds::<Self>(offset);
1254 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1255 unsafe {
1258 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1259 }
1260 Ok(())
1261 }
1262 }
1263
1264 impl fidl::encoding::ValueTypeMarker for DeviceGetCurrentOperatingPointLimitsResponse {
1265 type Borrowed<'a> = &'a Self;
1266 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1267 value
1268 }
1269 }
1270
1271 unsafe impl fidl::encoding::TypeMarker for DeviceGetCurrentOperatingPointLimitsResponse {
1272 type Owned = Self;
1273
1274 #[inline(always)]
1275 fn inline_align(_context: fidl::encoding::Context) -> usize {
1276 4
1277 }
1278
1279 #[inline(always)]
1280 fn inline_size(_context: fidl::encoding::Context) -> usize {
1281 8
1282 }
1283 #[inline(always)]
1284 fn encode_is_copy() -> bool {
1285 true
1286 }
1287
1288 #[inline(always)]
1289 fn decode_is_copy() -> bool {
1290 true
1291 }
1292 }
1293
1294 unsafe impl<D: fidl::encoding::ResourceDialect>
1295 fidl::encoding::Encode<DeviceGetCurrentOperatingPointLimitsResponse, D>
1296 for &DeviceGetCurrentOperatingPointLimitsResponse
1297 {
1298 #[inline]
1299 unsafe fn encode(
1300 self,
1301 encoder: &mut fidl::encoding::Encoder<'_, D>,
1302 offset: usize,
1303 _depth: fidl::encoding::Depth,
1304 ) -> fidl::Result<()> {
1305 encoder.debug_check_bounds::<DeviceGetCurrentOperatingPointLimitsResponse>(offset);
1306 unsafe {
1307 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1309 (buf_ptr as *mut DeviceGetCurrentOperatingPointLimitsResponse).write_unaligned(
1310 (self as *const DeviceGetCurrentOperatingPointLimitsResponse).read(),
1311 );
1312 }
1315 Ok(())
1316 }
1317 }
1318 unsafe impl<
1319 D: fidl::encoding::ResourceDialect,
1320 T0: fidl::encoding::Encode<u32, D>,
1321 T1: fidl::encoding::Encode<u32, D>,
1322 > fidl::encoding::Encode<DeviceGetCurrentOperatingPointLimitsResponse, D> for (T0, T1)
1323 {
1324 #[inline]
1325 unsafe fn encode(
1326 self,
1327 encoder: &mut fidl::encoding::Encoder<'_, D>,
1328 offset: usize,
1329 depth: fidl::encoding::Depth,
1330 ) -> fidl::Result<()> {
1331 encoder.debug_check_bounds::<DeviceGetCurrentOperatingPointLimitsResponse>(offset);
1332 self.0.encode(encoder, offset + 0, depth)?;
1336 self.1.encode(encoder, offset + 4, depth)?;
1337 Ok(())
1338 }
1339 }
1340
1341 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1342 for DeviceGetCurrentOperatingPointLimitsResponse
1343 {
1344 #[inline(always)]
1345 fn new_empty() -> Self {
1346 Self { minimum_opp: fidl::new_empty!(u32, D), maximum_opp: fidl::new_empty!(u32, D) }
1347 }
1348
1349 #[inline]
1350 unsafe fn decode(
1351 &mut self,
1352 decoder: &mut fidl::encoding::Decoder<'_, D>,
1353 offset: usize,
1354 _depth: fidl::encoding::Depth,
1355 ) -> fidl::Result<()> {
1356 decoder.debug_check_bounds::<Self>(offset);
1357 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1358 unsafe {
1361 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1362 }
1363 Ok(())
1364 }
1365 }
1366
1367 impl fidl::encoding::ValueTypeMarker for DeviceGetOperatingPointCountResponse {
1368 type Borrowed<'a> = &'a Self;
1369 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1370 value
1371 }
1372 }
1373
1374 unsafe impl fidl::encoding::TypeMarker for DeviceGetOperatingPointCountResponse {
1375 type Owned = Self;
1376
1377 #[inline(always)]
1378 fn inline_align(_context: fidl::encoding::Context) -> usize {
1379 4
1380 }
1381
1382 #[inline(always)]
1383 fn inline_size(_context: fidl::encoding::Context) -> usize {
1384 4
1385 }
1386 #[inline(always)]
1387 fn encode_is_copy() -> bool {
1388 true
1389 }
1390
1391 #[inline(always)]
1392 fn decode_is_copy() -> bool {
1393 true
1394 }
1395 }
1396
1397 unsafe impl<D: fidl::encoding::ResourceDialect>
1398 fidl::encoding::Encode<DeviceGetOperatingPointCountResponse, D>
1399 for &DeviceGetOperatingPointCountResponse
1400 {
1401 #[inline]
1402 unsafe fn encode(
1403 self,
1404 encoder: &mut fidl::encoding::Encoder<'_, D>,
1405 offset: usize,
1406 _depth: fidl::encoding::Depth,
1407 ) -> fidl::Result<()> {
1408 encoder.debug_check_bounds::<DeviceGetOperatingPointCountResponse>(offset);
1409 unsafe {
1410 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1412 (buf_ptr as *mut DeviceGetOperatingPointCountResponse)
1413 .write_unaligned((self as *const DeviceGetOperatingPointCountResponse).read());
1414 }
1417 Ok(())
1418 }
1419 }
1420 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1421 fidl::encoding::Encode<DeviceGetOperatingPointCountResponse, D> for (T0,)
1422 {
1423 #[inline]
1424 unsafe fn encode(
1425 self,
1426 encoder: &mut fidl::encoding::Encoder<'_, D>,
1427 offset: usize,
1428 depth: fidl::encoding::Depth,
1429 ) -> fidl::Result<()> {
1430 encoder.debug_check_bounds::<DeviceGetOperatingPointCountResponse>(offset);
1431 self.0.encode(encoder, offset + 0, depth)?;
1435 Ok(())
1436 }
1437 }
1438
1439 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1440 for DeviceGetOperatingPointCountResponse
1441 {
1442 #[inline(always)]
1443 fn new_empty() -> Self {
1444 Self { count: fidl::new_empty!(u32, D) }
1445 }
1446
1447 #[inline]
1448 unsafe fn decode(
1449 &mut self,
1450 decoder: &mut fidl::encoding::Decoder<'_, D>,
1451 offset: usize,
1452 _depth: fidl::encoding::Depth,
1453 ) -> fidl::Result<()> {
1454 decoder.debug_check_bounds::<Self>(offset);
1455 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1456 unsafe {
1459 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1460 }
1461 Ok(())
1462 }
1463 }
1464
1465 impl fidl::encoding::ValueTypeMarker for DeviceGetOperatingPointInfoResponse {
1466 type Borrowed<'a> = &'a Self;
1467 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1468 value
1469 }
1470 }
1471
1472 unsafe impl fidl::encoding::TypeMarker for DeviceGetOperatingPointInfoResponse {
1473 type Owned = Self;
1474
1475 #[inline(always)]
1476 fn inline_align(_context: fidl::encoding::Context) -> usize {
1477 8
1478 }
1479
1480 #[inline(always)]
1481 fn inline_size(_context: fidl::encoding::Context) -> usize {
1482 16
1483 }
1484 #[inline(always)]
1485 fn encode_is_copy() -> bool {
1486 true
1487 }
1488
1489 #[inline(always)]
1490 fn decode_is_copy() -> bool {
1491 true
1492 }
1493 }
1494
1495 unsafe impl<D: fidl::encoding::ResourceDialect>
1496 fidl::encoding::Encode<DeviceGetOperatingPointInfoResponse, D>
1497 for &DeviceGetOperatingPointInfoResponse
1498 {
1499 #[inline]
1500 unsafe fn encode(
1501 self,
1502 encoder: &mut fidl::encoding::Encoder<'_, D>,
1503 offset: usize,
1504 _depth: fidl::encoding::Depth,
1505 ) -> fidl::Result<()> {
1506 encoder.debug_check_bounds::<DeviceGetOperatingPointInfoResponse>(offset);
1507 unsafe {
1508 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1510 (buf_ptr as *mut DeviceGetOperatingPointInfoResponse)
1511 .write_unaligned((self as *const DeviceGetOperatingPointInfoResponse).read());
1512 }
1515 Ok(())
1516 }
1517 }
1518 unsafe impl<
1519 D: fidl::encoding::ResourceDialect,
1520 T0: fidl::encoding::Encode<CpuOperatingPointInfo, D>,
1521 > fidl::encoding::Encode<DeviceGetOperatingPointInfoResponse, D> for (T0,)
1522 {
1523 #[inline]
1524 unsafe fn encode(
1525 self,
1526 encoder: &mut fidl::encoding::Encoder<'_, D>,
1527 offset: usize,
1528 depth: fidl::encoding::Depth,
1529 ) -> fidl::Result<()> {
1530 encoder.debug_check_bounds::<DeviceGetOperatingPointInfoResponse>(offset);
1531 self.0.encode(encoder, offset + 0, depth)?;
1535 Ok(())
1536 }
1537 }
1538
1539 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1540 for DeviceGetOperatingPointInfoResponse
1541 {
1542 #[inline(always)]
1543 fn new_empty() -> Self {
1544 Self { info: fidl::new_empty!(CpuOperatingPointInfo, D) }
1545 }
1546
1547 #[inline]
1548 unsafe fn decode(
1549 &mut self,
1550 decoder: &mut fidl::encoding::Decoder<'_, D>,
1551 offset: usize,
1552 _depth: fidl::encoding::Depth,
1553 ) -> fidl::Result<()> {
1554 decoder.debug_check_bounds::<Self>(offset);
1555 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1556 unsafe {
1559 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
1560 }
1561 Ok(())
1562 }
1563 }
1564
1565 impl fidl::encoding::ValueTypeMarker for DeviceGetRelativePerformance2Response {
1566 type Borrowed<'a> = &'a Self;
1567 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1568 value
1569 }
1570 }
1571
1572 unsafe impl fidl::encoding::TypeMarker for DeviceGetRelativePerformance2Response {
1573 type Owned = Self;
1574
1575 #[inline(always)]
1576 fn inline_align(_context: fidl::encoding::Context) -> usize {
1577 8
1578 }
1579
1580 #[inline(always)]
1581 fn inline_size(_context: fidl::encoding::Context) -> usize {
1582 8
1583 }
1584 #[inline(always)]
1585 fn encode_is_copy() -> bool {
1586 true
1587 }
1588
1589 #[inline(always)]
1590 fn decode_is_copy() -> bool {
1591 true
1592 }
1593 }
1594
1595 unsafe impl<D: fidl::encoding::ResourceDialect>
1596 fidl::encoding::Encode<DeviceGetRelativePerformance2Response, D>
1597 for &DeviceGetRelativePerformance2Response
1598 {
1599 #[inline]
1600 unsafe fn encode(
1601 self,
1602 encoder: &mut fidl::encoding::Encoder<'_, D>,
1603 offset: usize,
1604 _depth: fidl::encoding::Depth,
1605 ) -> fidl::Result<()> {
1606 encoder.debug_check_bounds::<DeviceGetRelativePerformance2Response>(offset);
1607 unsafe {
1608 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1610 (buf_ptr as *mut DeviceGetRelativePerformance2Response)
1611 .write_unaligned((self as *const DeviceGetRelativePerformance2Response).read());
1612 }
1615 Ok(())
1616 }
1617 }
1618 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1619 fidl::encoding::Encode<DeviceGetRelativePerformance2Response, D> for (T0,)
1620 {
1621 #[inline]
1622 unsafe fn encode(
1623 self,
1624 encoder: &mut fidl::encoding::Encoder<'_, D>,
1625 offset: usize,
1626 depth: fidl::encoding::Depth,
1627 ) -> fidl::Result<()> {
1628 encoder.debug_check_bounds::<DeviceGetRelativePerformance2Response>(offset);
1629 self.0.encode(encoder, offset + 0, depth)?;
1633 Ok(())
1634 }
1635 }
1636
1637 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1638 for DeviceGetRelativePerformance2Response
1639 {
1640 #[inline(always)]
1641 fn new_empty() -> Self {
1642 Self { relative_performance: fidl::new_empty!(u64, D) }
1643 }
1644
1645 #[inline]
1646 unsafe fn decode(
1647 &mut self,
1648 decoder: &mut fidl::encoding::Decoder<'_, D>,
1649 offset: usize,
1650 _depth: fidl::encoding::Depth,
1651 ) -> fidl::Result<()> {
1652 decoder.debug_check_bounds::<Self>(offset);
1653 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1654 unsafe {
1657 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1658 }
1659 Ok(())
1660 }
1661 }
1662
1663 impl fidl::encoding::ValueTypeMarker for DeviceGetRelativePerformanceResponse {
1664 type Borrowed<'a> = &'a Self;
1665 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1666 value
1667 }
1668 }
1669
1670 unsafe impl fidl::encoding::TypeMarker for DeviceGetRelativePerformanceResponse {
1671 type Owned = Self;
1672
1673 #[inline(always)]
1674 fn inline_align(_context: fidl::encoding::Context) -> usize {
1675 1
1676 }
1677
1678 #[inline(always)]
1679 fn inline_size(_context: fidl::encoding::Context) -> usize {
1680 1
1681 }
1682 #[inline(always)]
1683 fn encode_is_copy() -> bool {
1684 true
1685 }
1686
1687 #[inline(always)]
1688 fn decode_is_copy() -> bool {
1689 true
1690 }
1691 }
1692
1693 unsafe impl<D: fidl::encoding::ResourceDialect>
1694 fidl::encoding::Encode<DeviceGetRelativePerformanceResponse, D>
1695 for &DeviceGetRelativePerformanceResponse
1696 {
1697 #[inline]
1698 unsafe fn encode(
1699 self,
1700 encoder: &mut fidl::encoding::Encoder<'_, D>,
1701 offset: usize,
1702 _depth: fidl::encoding::Depth,
1703 ) -> fidl::Result<()> {
1704 encoder.debug_check_bounds::<DeviceGetRelativePerformanceResponse>(offset);
1705 unsafe {
1706 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1708 (buf_ptr as *mut DeviceGetRelativePerformanceResponse)
1709 .write_unaligned((self as *const DeviceGetRelativePerformanceResponse).read());
1710 }
1713 Ok(())
1714 }
1715 }
1716 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
1717 fidl::encoding::Encode<DeviceGetRelativePerformanceResponse, D> for (T0,)
1718 {
1719 #[inline]
1720 unsafe fn encode(
1721 self,
1722 encoder: &mut fidl::encoding::Encoder<'_, D>,
1723 offset: usize,
1724 depth: fidl::encoding::Depth,
1725 ) -> fidl::Result<()> {
1726 encoder.debug_check_bounds::<DeviceGetRelativePerformanceResponse>(offset);
1727 self.0.encode(encoder, offset + 0, depth)?;
1731 Ok(())
1732 }
1733 }
1734
1735 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1736 for DeviceGetRelativePerformanceResponse
1737 {
1738 #[inline(always)]
1739 fn new_empty() -> Self {
1740 Self { relative_performance: fidl::new_empty!(u8, D) }
1741 }
1742
1743 #[inline]
1744 unsafe fn decode(
1745 &mut self,
1746 decoder: &mut fidl::encoding::Decoder<'_, D>,
1747 offset: usize,
1748 _depth: fidl::encoding::Depth,
1749 ) -> fidl::Result<()> {
1750 decoder.debug_check_bounds::<Self>(offset);
1751 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1752 unsafe {
1755 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
1756 }
1757 Ok(())
1758 }
1759 }
1760
1761 impl fidl::encoding::ValueTypeMarker for DeviceSetCurrentOperatingPointResponse {
1762 type Borrowed<'a> = &'a Self;
1763 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1764 value
1765 }
1766 }
1767
1768 unsafe impl fidl::encoding::TypeMarker for DeviceSetCurrentOperatingPointResponse {
1769 type Owned = Self;
1770
1771 #[inline(always)]
1772 fn inline_align(_context: fidl::encoding::Context) -> usize {
1773 4
1774 }
1775
1776 #[inline(always)]
1777 fn inline_size(_context: fidl::encoding::Context) -> usize {
1778 4
1779 }
1780 #[inline(always)]
1781 fn encode_is_copy() -> bool {
1782 true
1783 }
1784
1785 #[inline(always)]
1786 fn decode_is_copy() -> bool {
1787 true
1788 }
1789 }
1790
1791 unsafe impl<D: fidl::encoding::ResourceDialect>
1792 fidl::encoding::Encode<DeviceSetCurrentOperatingPointResponse, D>
1793 for &DeviceSetCurrentOperatingPointResponse
1794 {
1795 #[inline]
1796 unsafe fn encode(
1797 self,
1798 encoder: &mut fidl::encoding::Encoder<'_, D>,
1799 offset: usize,
1800 _depth: fidl::encoding::Depth,
1801 ) -> fidl::Result<()> {
1802 encoder.debug_check_bounds::<DeviceSetCurrentOperatingPointResponse>(offset);
1803 unsafe {
1804 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1806 (buf_ptr as *mut DeviceSetCurrentOperatingPointResponse).write_unaligned(
1807 (self as *const DeviceSetCurrentOperatingPointResponse).read(),
1808 );
1809 }
1812 Ok(())
1813 }
1814 }
1815 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1816 fidl::encoding::Encode<DeviceSetCurrentOperatingPointResponse, D> for (T0,)
1817 {
1818 #[inline]
1819 unsafe fn encode(
1820 self,
1821 encoder: &mut fidl::encoding::Encoder<'_, D>,
1822 offset: usize,
1823 depth: fidl::encoding::Depth,
1824 ) -> fidl::Result<()> {
1825 encoder.debug_check_bounds::<DeviceSetCurrentOperatingPointResponse>(offset);
1826 self.0.encode(encoder, offset + 0, depth)?;
1830 Ok(())
1831 }
1832 }
1833
1834 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1835 for DeviceSetCurrentOperatingPointResponse
1836 {
1837 #[inline(always)]
1838 fn new_empty() -> Self {
1839 Self { out_opp: fidl::new_empty!(u32, D) }
1840 }
1841
1842 #[inline]
1843 unsafe fn decode(
1844 &mut self,
1845 decoder: &mut fidl::encoding::Decoder<'_, D>,
1846 offset: usize,
1847 _depth: fidl::encoding::Depth,
1848 ) -> fidl::Result<()> {
1849 decoder.debug_check_bounds::<Self>(offset);
1850 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1851 unsafe {
1854 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1855 }
1856 Ok(())
1857 }
1858 }
1859}