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_NUM_RATES: u8 = 12;
12
13#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
15#[repr(u32)]
16pub enum Capability {
17 ShortPreamble = 32,
18 SpectrumMgmt = 256,
19 Qos = 512,
20 ShortSlotTime = 1024,
21 RadioMsmt = 4096,
22 SimultaneousClientAp = 65536,
23}
24
25impl Capability {
26 #[inline]
27 pub fn from_primitive(prim: u32) -> Option<Self> {
28 match prim {
29 32 => Some(Self::ShortPreamble),
30 256 => Some(Self::SpectrumMgmt),
31 512 => Some(Self::Qos),
32 1024 => Some(Self::ShortSlotTime),
33 4096 => Some(Self::RadioMsmt),
34 65536 => Some(Self::SimultaneousClientAp),
35 _ => None,
36 }
37 }
38
39 #[inline]
40 pub const fn into_primitive(self) -> u32 {
41 self as u32
42 }
43}
44
45#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
46#[repr(u8)]
47pub enum CriticalErrorReason {
48 FwCrash = 1,
53}
54
55impl CriticalErrorReason {
56 #[inline]
57 pub fn from_primitive(prim: u8) -> Option<Self> {
58 match prim {
59 1 => Some(Self::FwCrash),
60 _ => None,
61 }
62 }
63
64 #[inline]
65 pub const fn into_primitive(self) -> u8 {
66 self as u8
67 }
68}
69
70#[derive(Clone, Debug, PartialEq)]
71pub struct BandInfo {
72 pub band: fidl_fuchsia_wlan_ieee80211_common::WlanBand,
73 pub ht_caps: Option<Box<fidl_fuchsia_wlan_ieee80211_common::HtCapabilities>>,
74 pub vht_caps: Option<Box<fidl_fuchsia_wlan_ieee80211_common::VhtCapabilities>>,
75 pub rates: Vec<u8>,
76 pub operating_channels: Vec<u8>,
77}
78
79impl fidl::Persistable for BandInfo {}
80
81#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
84#[repr(C)]
85pub struct CountryCode {
86 pub alpha2: [u8; 2],
87}
88
89impl fidl::Persistable for CountryCode {}
90
91#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
92#[repr(C)]
93pub struct DestroyIfaceRequest {
94 pub id: u16,
95}
96
97impl fidl::Persistable for DestroyIfaceRequest {}
98
99#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
100#[repr(C)]
101pub struct PhyClearCountryResponse {
102 pub status: i32,
103}
104
105impl fidl::Persistable for PhyClearCountryResponse {}
106
107#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
108#[repr(C)]
109pub struct PhyDestroyIfaceRequest {
110 pub req: DestroyIfaceRequest,
111}
112
113impl fidl::Persistable for PhyDestroyIfaceRequest {}
114
115#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
116#[repr(C)]
117pub struct PhyOnCountryCodeChangeRequest {
118 pub ind: CountryCode,
119}
120
121impl fidl::Persistable for PhyOnCountryCodeChangeRequest {}
122
123#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
124pub struct PhyOnCriticalErrorRequest {
125 pub reason_code: CriticalErrorReason,
126}
127
128impl fidl::Persistable for PhyOnCriticalErrorRequest {}
129
130#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
131pub struct PhySetBtCoexistenceModeRequest {
132 pub mode: fidl_fuchsia_wlan_internal_common::BtCoexistenceMode,
133}
134
135impl fidl::Persistable for PhySetBtCoexistenceModeRequest {}
136
137#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
138#[repr(C)]
139pub struct PhySetCountryRequest {
140 pub req: CountryCode,
141}
142
143impl fidl::Persistable for PhySetCountryRequest {}
144
145#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
146#[repr(C)]
147pub struct PhySetCountryResponse {
148 pub status: i32,
149}
150
151impl fidl::Persistable for PhySetCountryResponse {}
152
153#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
154pub struct PhySetPowerSaveModeRequest {
155 pub req: fidl_fuchsia_wlan_common_common::PowerSaveType,
156}
157
158impl fidl::Persistable for PhySetPowerSaveModeRequest {}
159
160#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
161#[repr(C)]
162pub struct PhySetPowerSaveModeResponse {
163 pub status: i32,
164}
165
166impl fidl::Persistable for PhySetPowerSaveModeResponse {}
167
168#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
169pub struct PhySetTxPowerScenarioRequest {
170 pub scenario: fidl_fuchsia_wlan_internal_common::TxPowerScenario,
171}
172
173impl fidl::Persistable for PhySetTxPowerScenarioRequest {}
174
175#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
176#[repr(C)]
177pub struct PhyCreateIfaceResponse {
178 pub iface_id: u16,
179}
180
181impl fidl::Persistable for PhyCreateIfaceResponse {}
182
183#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
184#[repr(C)]
185pub struct PhyGetCountryResponse {
186 pub resp: CountryCode,
187}
188
189impl fidl::Persistable for PhyGetCountryResponse {}
190
191#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
192pub struct PhyGetPowerSaveModeResponse {
193 pub resp: fidl_fuchsia_wlan_common_common::PowerSaveType,
194}
195
196impl fidl::Persistable for PhyGetPowerSaveModeResponse {}
197
198#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
199pub struct PhyGetPowerStateResponse {
200 pub power_on: bool,
201}
202
203impl fidl::Persistable for PhyGetPowerStateResponse {}
204
205#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
206pub struct PhyGetSupportedMacRolesResponse {
207 pub supported_mac_roles: Vec<fidl_fuchsia_wlan_common_common::WlanMacRole>,
208}
209
210impl fidl::Persistable for PhyGetSupportedMacRolesResponse {}
211
212#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
213pub struct PhyGetTxPowerScenarioResponse {
214 pub scenario: fidl_fuchsia_wlan_internal_common::TxPowerScenario,
215}
216
217impl fidl::Persistable for PhyGetTxPowerScenarioResponse {}
218
219pub mod connector_ordinals {
220 pub const CONNECT: u64 = 0x2dd039e4ba3a4d26;
221}
222
223pub mod phy_ordinals {
224 pub const GET_SUPPORTED_MAC_ROLES: u64 = 0x18f6b9091aa8a44;
225 pub const CREATE_IFACE: u64 = 0x665940c7aa4b9785;
226 pub const DESTROY_IFACE: u64 = 0x75a3048ae01942e8;
227 pub const SET_COUNTRY: u64 = 0x1367e9997ba00806;
228 pub const GET_COUNTRY: u64 = 0x3ed3281ce6feab3e;
229 pub const CLEAR_COUNTRY: u64 = 0x4ea9b83a9c494c95;
230 pub const SET_POWER_SAVE_MODE: u64 = 0x56be34b2f3abe17f;
231 pub const GET_POWER_SAVE_MODE: u64 = 0x3f7019c3672bc798;
232 pub const POWER_DOWN: u64 = 0x56bcae4b27a564d2;
233 pub const POWER_UP: u64 = 0x7aad8e525738b946;
234 pub const RESET: u64 = 0x647cdcc9def3db87;
235 pub const GET_POWER_STATE: u64 = 0xcddef2b16c7f00f;
236 pub const SET_BT_COEXISTENCE_MODE: u64 = 0x76c66d8313e73996;
237 pub const SET_TX_POWER_SCENARIO: u64 = 0x22748ccac6d497df;
238 pub const RESET_TX_POWER_SCENARIO: u64 = 0x4f9b16347768b8dd;
239 pub const GET_TX_POWER_SCENARIO: u64 = 0x3f6681e6458c14c2;
240 pub const ON_CRITICAL_ERROR: u64 = 0x7c82e274966111ab;
241 pub const ON_COUNTRY_CODE_CHANGE: u64 = 0x270d3151e0ff139f;
242}
243
244mod internal {
245 use super::*;
246 unsafe impl fidl::encoding::TypeMarker for Capability {
247 type Owned = Self;
248
249 #[inline(always)]
250 fn inline_align(_context: fidl::encoding::Context) -> usize {
251 std::mem::align_of::<u32>()
252 }
253
254 #[inline(always)]
255 fn inline_size(_context: fidl::encoding::Context) -> usize {
256 std::mem::size_of::<u32>()
257 }
258
259 #[inline(always)]
260 fn encode_is_copy() -> bool {
261 true
262 }
263
264 #[inline(always)]
265 fn decode_is_copy() -> bool {
266 false
267 }
268 }
269
270 impl fidl::encoding::ValueTypeMarker for Capability {
271 type Borrowed<'a> = Self;
272 #[inline(always)]
273 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
274 *value
275 }
276 }
277
278 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Capability {
279 #[inline]
280 unsafe fn encode(
281 self,
282 encoder: &mut fidl::encoding::Encoder<'_, D>,
283 offset: usize,
284 _depth: fidl::encoding::Depth,
285 ) -> fidl::Result<()> {
286 encoder.debug_check_bounds::<Self>(offset);
287 encoder.write_num(self.into_primitive(), offset);
288 Ok(())
289 }
290 }
291
292 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Capability {
293 #[inline(always)]
294 fn new_empty() -> Self {
295 Self::ShortPreamble
296 }
297
298 #[inline]
299 unsafe fn decode(
300 &mut self,
301 decoder: &mut fidl::encoding::Decoder<'_, D>,
302 offset: usize,
303 _depth: fidl::encoding::Depth,
304 ) -> fidl::Result<()> {
305 decoder.debug_check_bounds::<Self>(offset);
306 let prim = decoder.read_num::<u32>(offset);
307
308 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
309 Ok(())
310 }
311 }
312 unsafe impl fidl::encoding::TypeMarker for CriticalErrorReason {
313 type Owned = Self;
314
315 #[inline(always)]
316 fn inline_align(_context: fidl::encoding::Context) -> usize {
317 std::mem::align_of::<u8>()
318 }
319
320 #[inline(always)]
321 fn inline_size(_context: fidl::encoding::Context) -> usize {
322 std::mem::size_of::<u8>()
323 }
324
325 #[inline(always)]
326 fn encode_is_copy() -> bool {
327 true
328 }
329
330 #[inline(always)]
331 fn decode_is_copy() -> bool {
332 false
333 }
334 }
335
336 impl fidl::encoding::ValueTypeMarker for CriticalErrorReason {
337 type Borrowed<'a> = Self;
338 #[inline(always)]
339 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
340 *value
341 }
342 }
343
344 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
345 for CriticalErrorReason
346 {
347 #[inline]
348 unsafe fn encode(
349 self,
350 encoder: &mut fidl::encoding::Encoder<'_, D>,
351 offset: usize,
352 _depth: fidl::encoding::Depth,
353 ) -> fidl::Result<()> {
354 encoder.debug_check_bounds::<Self>(offset);
355 encoder.write_num(self.into_primitive(), offset);
356 Ok(())
357 }
358 }
359
360 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CriticalErrorReason {
361 #[inline(always)]
362 fn new_empty() -> Self {
363 Self::FwCrash
364 }
365
366 #[inline]
367 unsafe fn decode(
368 &mut self,
369 decoder: &mut fidl::encoding::Decoder<'_, D>,
370 offset: usize,
371 _depth: fidl::encoding::Depth,
372 ) -> fidl::Result<()> {
373 decoder.debug_check_bounds::<Self>(offset);
374 let prim = decoder.read_num::<u8>(offset);
375
376 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
377 Ok(())
378 }
379 }
380
381 impl fidl::encoding::ValueTypeMarker for BandInfo {
382 type Borrowed<'a> = &'a Self;
383 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
384 value
385 }
386 }
387
388 unsafe impl fidl::encoding::TypeMarker for BandInfo {
389 type Owned = Self;
390
391 #[inline(always)]
392 fn inline_align(_context: fidl::encoding::Context) -> usize {
393 8
394 }
395
396 #[inline(always)]
397 fn inline_size(_context: fidl::encoding::Context) -> usize {
398 56
399 }
400 }
401
402 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BandInfo, D> for &BandInfo {
403 #[inline]
404 unsafe fn encode(
405 self,
406 encoder: &mut fidl::encoding::Encoder<'_, D>,
407 offset: usize,
408 _depth: fidl::encoding::Depth,
409 ) -> fidl::Result<()> {
410 encoder.debug_check_bounds::<BandInfo>(offset);
411 fidl::encoding::Encode::<BandInfo, D>::encode(
413 (
414 <fidl_fuchsia_wlan_ieee80211_common::WlanBand as fidl::encoding::ValueTypeMarker>::borrow(&self.band),
415 <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::HtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.ht_caps),
416 <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::VhtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.vht_caps),
417 <fidl::encoding::Vector<u8, 12> as fidl::encoding::ValueTypeMarker>::borrow(&self.rates),
418 <fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.operating_channels),
419 ),
420 encoder, offset, _depth
421 )
422 }
423 }
424 unsafe impl<
425 D: fidl::encoding::ResourceDialect,
426 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::WlanBand, D>,
427 T1: fidl::encoding::Encode<
428 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::HtCapabilities>,
429 D,
430 >,
431 T2: fidl::encoding::Encode<
432 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::VhtCapabilities>,
433 D,
434 >,
435 T3: fidl::encoding::Encode<fidl::encoding::Vector<u8, 12>, D>,
436 T4: fidl::encoding::Encode<fidl::encoding::Vector<u8, 256>, D>,
437 > fidl::encoding::Encode<BandInfo, D> for (T0, T1, T2, T3, T4)
438 {
439 #[inline]
440 unsafe fn encode(
441 self,
442 encoder: &mut fidl::encoding::Encoder<'_, D>,
443 offset: usize,
444 depth: fidl::encoding::Depth,
445 ) -> fidl::Result<()> {
446 encoder.debug_check_bounds::<BandInfo>(offset);
447 unsafe {
450 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
451 (ptr as *mut u64).write_unaligned(0);
452 }
453 self.0.encode(encoder, offset + 0, depth)?;
455 self.1.encode(encoder, offset + 8, depth)?;
456 self.2.encode(encoder, offset + 16, depth)?;
457 self.3.encode(encoder, offset + 24, depth)?;
458 self.4.encode(encoder, offset + 40, depth)?;
459 Ok(())
460 }
461 }
462
463 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BandInfo {
464 #[inline(always)]
465 fn new_empty() -> Self {
466 Self {
467 band: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211_common::WlanBand, D),
468 ht_caps: fidl::new_empty!(
469 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::HtCapabilities>,
470 D
471 ),
472 vht_caps: fidl::new_empty!(
473 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::VhtCapabilities>,
474 D
475 ),
476 rates: fidl::new_empty!(fidl::encoding::Vector<u8, 12>, D),
477 operating_channels: fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D),
478 }
479 }
480
481 #[inline]
482 unsafe fn decode(
483 &mut self,
484 decoder: &mut fidl::encoding::Decoder<'_, D>,
485 offset: usize,
486 _depth: fidl::encoding::Depth,
487 ) -> fidl::Result<()> {
488 decoder.debug_check_bounds::<Self>(offset);
489 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
491 let padval = unsafe { (ptr as *const u64).read_unaligned() };
492 let mask = 0xffffffffffffff00u64;
493 let maskedval = padval & mask;
494 if maskedval != 0 {
495 return Err(fidl::Error::NonZeroPadding {
496 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
497 });
498 }
499 fidl::decode!(
500 fidl_fuchsia_wlan_ieee80211_common::WlanBand,
501 D,
502 &mut self.band,
503 decoder,
504 offset + 0,
505 _depth
506 )?;
507 fidl::decode!(
508 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::HtCapabilities>,
509 D,
510 &mut self.ht_caps,
511 decoder,
512 offset + 8,
513 _depth
514 )?;
515 fidl::decode!(
516 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::VhtCapabilities>,
517 D,
518 &mut self.vht_caps,
519 decoder,
520 offset + 16,
521 _depth
522 )?;
523 fidl::decode!(fidl::encoding::Vector<u8, 12>, D, &mut self.rates, decoder, offset + 24, _depth)?;
524 fidl::decode!(fidl::encoding::Vector<u8, 256>, D, &mut self.operating_channels, decoder, offset + 40, _depth)?;
525 Ok(())
526 }
527 }
528
529 impl fidl::encoding::ValueTypeMarker for CountryCode {
530 type Borrowed<'a> = &'a Self;
531 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
532 value
533 }
534 }
535
536 unsafe impl fidl::encoding::TypeMarker for CountryCode {
537 type Owned = Self;
538
539 #[inline(always)]
540 fn inline_align(_context: fidl::encoding::Context) -> usize {
541 1
542 }
543
544 #[inline(always)]
545 fn inline_size(_context: fidl::encoding::Context) -> usize {
546 2
547 }
548 #[inline(always)]
549 fn encode_is_copy() -> bool {
550 true
551 }
552
553 #[inline(always)]
554 fn decode_is_copy() -> bool {
555 true
556 }
557 }
558
559 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CountryCode, D>
560 for &CountryCode
561 {
562 #[inline]
563 unsafe fn encode(
564 self,
565 encoder: &mut fidl::encoding::Encoder<'_, D>,
566 offset: usize,
567 _depth: fidl::encoding::Depth,
568 ) -> fidl::Result<()> {
569 encoder.debug_check_bounds::<CountryCode>(offset);
570 unsafe {
571 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
573 (buf_ptr as *mut CountryCode).write_unaligned((self as *const CountryCode).read());
574 }
577 Ok(())
578 }
579 }
580 unsafe impl<
581 D: fidl::encoding::ResourceDialect,
582 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 2>, D>,
583 > fidl::encoding::Encode<CountryCode, D> for (T0,)
584 {
585 #[inline]
586 unsafe fn encode(
587 self,
588 encoder: &mut fidl::encoding::Encoder<'_, D>,
589 offset: usize,
590 depth: fidl::encoding::Depth,
591 ) -> fidl::Result<()> {
592 encoder.debug_check_bounds::<CountryCode>(offset);
593 self.0.encode(encoder, offset + 0, depth)?;
597 Ok(())
598 }
599 }
600
601 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CountryCode {
602 #[inline(always)]
603 fn new_empty() -> Self {
604 Self { alpha2: fidl::new_empty!(fidl::encoding::Array<u8, 2>, D) }
605 }
606
607 #[inline]
608 unsafe fn decode(
609 &mut self,
610 decoder: &mut fidl::encoding::Decoder<'_, D>,
611 offset: usize,
612 _depth: fidl::encoding::Depth,
613 ) -> fidl::Result<()> {
614 decoder.debug_check_bounds::<Self>(offset);
615 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
616 unsafe {
619 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
620 }
621 Ok(())
622 }
623 }
624
625 impl fidl::encoding::ValueTypeMarker for DestroyIfaceRequest {
626 type Borrowed<'a> = &'a Self;
627 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
628 value
629 }
630 }
631
632 unsafe impl fidl::encoding::TypeMarker for DestroyIfaceRequest {
633 type Owned = Self;
634
635 #[inline(always)]
636 fn inline_align(_context: fidl::encoding::Context) -> usize {
637 2
638 }
639
640 #[inline(always)]
641 fn inline_size(_context: fidl::encoding::Context) -> usize {
642 2
643 }
644 #[inline(always)]
645 fn encode_is_copy() -> bool {
646 true
647 }
648
649 #[inline(always)]
650 fn decode_is_copy() -> bool {
651 true
652 }
653 }
654
655 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DestroyIfaceRequest, D>
656 for &DestroyIfaceRequest
657 {
658 #[inline]
659 unsafe fn encode(
660 self,
661 encoder: &mut fidl::encoding::Encoder<'_, D>,
662 offset: usize,
663 _depth: fidl::encoding::Depth,
664 ) -> fidl::Result<()> {
665 encoder.debug_check_bounds::<DestroyIfaceRequest>(offset);
666 unsafe {
667 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
669 (buf_ptr as *mut DestroyIfaceRequest)
670 .write_unaligned((self as *const DestroyIfaceRequest).read());
671 }
674 Ok(())
675 }
676 }
677 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
678 fidl::encoding::Encode<DestroyIfaceRequest, D> for (T0,)
679 {
680 #[inline]
681 unsafe fn encode(
682 self,
683 encoder: &mut fidl::encoding::Encoder<'_, D>,
684 offset: usize,
685 depth: fidl::encoding::Depth,
686 ) -> fidl::Result<()> {
687 encoder.debug_check_bounds::<DestroyIfaceRequest>(offset);
688 self.0.encode(encoder, offset + 0, depth)?;
692 Ok(())
693 }
694 }
695
696 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DestroyIfaceRequest {
697 #[inline(always)]
698 fn new_empty() -> Self {
699 Self { id: fidl::new_empty!(u16, D) }
700 }
701
702 #[inline]
703 unsafe fn decode(
704 &mut self,
705 decoder: &mut fidl::encoding::Decoder<'_, D>,
706 offset: usize,
707 _depth: fidl::encoding::Depth,
708 ) -> fidl::Result<()> {
709 decoder.debug_check_bounds::<Self>(offset);
710 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
711 unsafe {
714 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
715 }
716 Ok(())
717 }
718 }
719
720 impl fidl::encoding::ValueTypeMarker for PhyClearCountryResponse {
721 type Borrowed<'a> = &'a Self;
722 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
723 value
724 }
725 }
726
727 unsafe impl fidl::encoding::TypeMarker for PhyClearCountryResponse {
728 type Owned = Self;
729
730 #[inline(always)]
731 fn inline_align(_context: fidl::encoding::Context) -> usize {
732 4
733 }
734
735 #[inline(always)]
736 fn inline_size(_context: fidl::encoding::Context) -> usize {
737 4
738 }
739 #[inline(always)]
740 fn encode_is_copy() -> bool {
741 true
742 }
743
744 #[inline(always)]
745 fn decode_is_copy() -> bool {
746 true
747 }
748 }
749
750 unsafe impl<D: fidl::encoding::ResourceDialect>
751 fidl::encoding::Encode<PhyClearCountryResponse, D> for &PhyClearCountryResponse
752 {
753 #[inline]
754 unsafe fn encode(
755 self,
756 encoder: &mut fidl::encoding::Encoder<'_, D>,
757 offset: usize,
758 _depth: fidl::encoding::Depth,
759 ) -> fidl::Result<()> {
760 encoder.debug_check_bounds::<PhyClearCountryResponse>(offset);
761 unsafe {
762 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
764 (buf_ptr as *mut PhyClearCountryResponse)
765 .write_unaligned((self as *const PhyClearCountryResponse).read());
766 }
769 Ok(())
770 }
771 }
772 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
773 fidl::encoding::Encode<PhyClearCountryResponse, D> for (T0,)
774 {
775 #[inline]
776 unsafe fn encode(
777 self,
778 encoder: &mut fidl::encoding::Encoder<'_, D>,
779 offset: usize,
780 depth: fidl::encoding::Depth,
781 ) -> fidl::Result<()> {
782 encoder.debug_check_bounds::<PhyClearCountryResponse>(offset);
783 self.0.encode(encoder, offset + 0, depth)?;
787 Ok(())
788 }
789 }
790
791 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
792 for PhyClearCountryResponse
793 {
794 #[inline(always)]
795 fn new_empty() -> Self {
796 Self { status: fidl::new_empty!(i32, D) }
797 }
798
799 #[inline]
800 unsafe fn decode(
801 &mut self,
802 decoder: &mut fidl::encoding::Decoder<'_, D>,
803 offset: usize,
804 _depth: fidl::encoding::Depth,
805 ) -> fidl::Result<()> {
806 decoder.debug_check_bounds::<Self>(offset);
807 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
808 unsafe {
811 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
812 }
813 Ok(())
814 }
815 }
816
817 impl fidl::encoding::ValueTypeMarker for PhyDestroyIfaceRequest {
818 type Borrowed<'a> = &'a Self;
819 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
820 value
821 }
822 }
823
824 unsafe impl fidl::encoding::TypeMarker for PhyDestroyIfaceRequest {
825 type Owned = Self;
826
827 #[inline(always)]
828 fn inline_align(_context: fidl::encoding::Context) -> usize {
829 2
830 }
831
832 #[inline(always)]
833 fn inline_size(_context: fidl::encoding::Context) -> usize {
834 2
835 }
836 #[inline(always)]
837 fn encode_is_copy() -> bool {
838 true
839 }
840
841 #[inline(always)]
842 fn decode_is_copy() -> bool {
843 true
844 }
845 }
846
847 unsafe impl<D: fidl::encoding::ResourceDialect>
848 fidl::encoding::Encode<PhyDestroyIfaceRequest, D> for &PhyDestroyIfaceRequest
849 {
850 #[inline]
851 unsafe fn encode(
852 self,
853 encoder: &mut fidl::encoding::Encoder<'_, D>,
854 offset: usize,
855 _depth: fidl::encoding::Depth,
856 ) -> fidl::Result<()> {
857 encoder.debug_check_bounds::<PhyDestroyIfaceRequest>(offset);
858 unsafe {
859 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
861 (buf_ptr as *mut PhyDestroyIfaceRequest)
862 .write_unaligned((self as *const PhyDestroyIfaceRequest).read());
863 }
866 Ok(())
867 }
868 }
869 unsafe impl<
870 D: fidl::encoding::ResourceDialect,
871 T0: fidl::encoding::Encode<DestroyIfaceRequest, D>,
872 > fidl::encoding::Encode<PhyDestroyIfaceRequest, D> for (T0,)
873 {
874 #[inline]
875 unsafe fn encode(
876 self,
877 encoder: &mut fidl::encoding::Encoder<'_, D>,
878 offset: usize,
879 depth: fidl::encoding::Depth,
880 ) -> fidl::Result<()> {
881 encoder.debug_check_bounds::<PhyDestroyIfaceRequest>(offset);
882 self.0.encode(encoder, offset + 0, depth)?;
886 Ok(())
887 }
888 }
889
890 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
891 for PhyDestroyIfaceRequest
892 {
893 #[inline(always)]
894 fn new_empty() -> Self {
895 Self { req: fidl::new_empty!(DestroyIfaceRequest, D) }
896 }
897
898 #[inline]
899 unsafe fn decode(
900 &mut self,
901 decoder: &mut fidl::encoding::Decoder<'_, D>,
902 offset: usize,
903 _depth: fidl::encoding::Depth,
904 ) -> fidl::Result<()> {
905 decoder.debug_check_bounds::<Self>(offset);
906 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
907 unsafe {
910 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
911 }
912 Ok(())
913 }
914 }
915
916 impl fidl::encoding::ValueTypeMarker for PhyOnCountryCodeChangeRequest {
917 type Borrowed<'a> = &'a Self;
918 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
919 value
920 }
921 }
922
923 unsafe impl fidl::encoding::TypeMarker for PhyOnCountryCodeChangeRequest {
924 type Owned = Self;
925
926 #[inline(always)]
927 fn inline_align(_context: fidl::encoding::Context) -> usize {
928 1
929 }
930
931 #[inline(always)]
932 fn inline_size(_context: fidl::encoding::Context) -> usize {
933 2
934 }
935 #[inline(always)]
936 fn encode_is_copy() -> bool {
937 true
938 }
939
940 #[inline(always)]
941 fn decode_is_copy() -> bool {
942 true
943 }
944 }
945
946 unsafe impl<D: fidl::encoding::ResourceDialect>
947 fidl::encoding::Encode<PhyOnCountryCodeChangeRequest, D>
948 for &PhyOnCountryCodeChangeRequest
949 {
950 #[inline]
951 unsafe fn encode(
952 self,
953 encoder: &mut fidl::encoding::Encoder<'_, D>,
954 offset: usize,
955 _depth: fidl::encoding::Depth,
956 ) -> fidl::Result<()> {
957 encoder.debug_check_bounds::<PhyOnCountryCodeChangeRequest>(offset);
958 unsafe {
959 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
961 (buf_ptr as *mut PhyOnCountryCodeChangeRequest)
962 .write_unaligned((self as *const PhyOnCountryCodeChangeRequest).read());
963 }
966 Ok(())
967 }
968 }
969 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<CountryCode, D>>
970 fidl::encoding::Encode<PhyOnCountryCodeChangeRequest, D> for (T0,)
971 {
972 #[inline]
973 unsafe fn encode(
974 self,
975 encoder: &mut fidl::encoding::Encoder<'_, D>,
976 offset: usize,
977 depth: fidl::encoding::Depth,
978 ) -> fidl::Result<()> {
979 encoder.debug_check_bounds::<PhyOnCountryCodeChangeRequest>(offset);
980 self.0.encode(encoder, offset + 0, depth)?;
984 Ok(())
985 }
986 }
987
988 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
989 for PhyOnCountryCodeChangeRequest
990 {
991 #[inline(always)]
992 fn new_empty() -> Self {
993 Self { ind: fidl::new_empty!(CountryCode, D) }
994 }
995
996 #[inline]
997 unsafe fn decode(
998 &mut self,
999 decoder: &mut fidl::encoding::Decoder<'_, D>,
1000 offset: usize,
1001 _depth: fidl::encoding::Depth,
1002 ) -> fidl::Result<()> {
1003 decoder.debug_check_bounds::<Self>(offset);
1004 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1005 unsafe {
1008 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1009 }
1010 Ok(())
1011 }
1012 }
1013
1014 impl fidl::encoding::ValueTypeMarker for PhyOnCriticalErrorRequest {
1015 type Borrowed<'a> = &'a Self;
1016 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1017 value
1018 }
1019 }
1020
1021 unsafe impl fidl::encoding::TypeMarker for PhyOnCriticalErrorRequest {
1022 type Owned = Self;
1023
1024 #[inline(always)]
1025 fn inline_align(_context: fidl::encoding::Context) -> usize {
1026 1
1027 }
1028
1029 #[inline(always)]
1030 fn inline_size(_context: fidl::encoding::Context) -> usize {
1031 1
1032 }
1033 }
1034
1035 unsafe impl<D: fidl::encoding::ResourceDialect>
1036 fidl::encoding::Encode<PhyOnCriticalErrorRequest, D> for &PhyOnCriticalErrorRequest
1037 {
1038 #[inline]
1039 unsafe fn encode(
1040 self,
1041 encoder: &mut fidl::encoding::Encoder<'_, D>,
1042 offset: usize,
1043 _depth: fidl::encoding::Depth,
1044 ) -> fidl::Result<()> {
1045 encoder.debug_check_bounds::<PhyOnCriticalErrorRequest>(offset);
1046 fidl::encoding::Encode::<PhyOnCriticalErrorRequest, D>::encode(
1048 (<CriticalErrorReason as fidl::encoding::ValueTypeMarker>::borrow(
1049 &self.reason_code,
1050 ),),
1051 encoder,
1052 offset,
1053 _depth,
1054 )
1055 }
1056 }
1057 unsafe impl<
1058 D: fidl::encoding::ResourceDialect,
1059 T0: fidl::encoding::Encode<CriticalErrorReason, D>,
1060 > fidl::encoding::Encode<PhyOnCriticalErrorRequest, D> for (T0,)
1061 {
1062 #[inline]
1063 unsafe fn encode(
1064 self,
1065 encoder: &mut fidl::encoding::Encoder<'_, D>,
1066 offset: usize,
1067 depth: fidl::encoding::Depth,
1068 ) -> fidl::Result<()> {
1069 encoder.debug_check_bounds::<PhyOnCriticalErrorRequest>(offset);
1070 self.0.encode(encoder, offset + 0, depth)?;
1074 Ok(())
1075 }
1076 }
1077
1078 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1079 for PhyOnCriticalErrorRequest
1080 {
1081 #[inline(always)]
1082 fn new_empty() -> Self {
1083 Self { reason_code: fidl::new_empty!(CriticalErrorReason, D) }
1084 }
1085
1086 #[inline]
1087 unsafe fn decode(
1088 &mut self,
1089 decoder: &mut fidl::encoding::Decoder<'_, D>,
1090 offset: usize,
1091 _depth: fidl::encoding::Depth,
1092 ) -> fidl::Result<()> {
1093 decoder.debug_check_bounds::<Self>(offset);
1094 fidl::decode!(
1096 CriticalErrorReason,
1097 D,
1098 &mut self.reason_code,
1099 decoder,
1100 offset + 0,
1101 _depth
1102 )?;
1103 Ok(())
1104 }
1105 }
1106
1107 impl fidl::encoding::ValueTypeMarker for PhySetBtCoexistenceModeRequest {
1108 type Borrowed<'a> = &'a Self;
1109 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1110 value
1111 }
1112 }
1113
1114 unsafe impl fidl::encoding::TypeMarker for PhySetBtCoexistenceModeRequest {
1115 type Owned = Self;
1116
1117 #[inline(always)]
1118 fn inline_align(_context: fidl::encoding::Context) -> usize {
1119 4
1120 }
1121
1122 #[inline(always)]
1123 fn inline_size(_context: fidl::encoding::Context) -> usize {
1124 4
1125 }
1126 }
1127
1128 unsafe impl<D: fidl::encoding::ResourceDialect>
1129 fidl::encoding::Encode<PhySetBtCoexistenceModeRequest, D>
1130 for &PhySetBtCoexistenceModeRequest
1131 {
1132 #[inline]
1133 unsafe fn encode(
1134 self,
1135 encoder: &mut fidl::encoding::Encoder<'_, D>,
1136 offset: usize,
1137 _depth: fidl::encoding::Depth,
1138 ) -> fidl::Result<()> {
1139 encoder.debug_check_bounds::<PhySetBtCoexistenceModeRequest>(offset);
1140 fidl::encoding::Encode::<PhySetBtCoexistenceModeRequest, D>::encode(
1142 (
1143 <fidl_fuchsia_wlan_internal_common::BtCoexistenceMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
1144 ),
1145 encoder, offset, _depth
1146 )
1147 }
1148 }
1149 unsafe impl<
1150 D: fidl::encoding::ResourceDialect,
1151 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal_common::BtCoexistenceMode, D>,
1152 > fidl::encoding::Encode<PhySetBtCoexistenceModeRequest, D> for (T0,)
1153 {
1154 #[inline]
1155 unsafe fn encode(
1156 self,
1157 encoder: &mut fidl::encoding::Encoder<'_, D>,
1158 offset: usize,
1159 depth: fidl::encoding::Depth,
1160 ) -> fidl::Result<()> {
1161 encoder.debug_check_bounds::<PhySetBtCoexistenceModeRequest>(offset);
1162 self.0.encode(encoder, offset + 0, depth)?;
1166 Ok(())
1167 }
1168 }
1169
1170 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1171 for PhySetBtCoexistenceModeRequest
1172 {
1173 #[inline(always)]
1174 fn new_empty() -> Self {
1175 Self { mode: fidl::new_empty!(fidl_fuchsia_wlan_internal_common::BtCoexistenceMode, D) }
1176 }
1177
1178 #[inline]
1179 unsafe fn decode(
1180 &mut self,
1181 decoder: &mut fidl::encoding::Decoder<'_, D>,
1182 offset: usize,
1183 _depth: fidl::encoding::Depth,
1184 ) -> fidl::Result<()> {
1185 decoder.debug_check_bounds::<Self>(offset);
1186 fidl::decode!(
1188 fidl_fuchsia_wlan_internal_common::BtCoexistenceMode,
1189 D,
1190 &mut self.mode,
1191 decoder,
1192 offset + 0,
1193 _depth
1194 )?;
1195 Ok(())
1196 }
1197 }
1198
1199 impl fidl::encoding::ValueTypeMarker for PhySetCountryRequest {
1200 type Borrowed<'a> = &'a Self;
1201 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1202 value
1203 }
1204 }
1205
1206 unsafe impl fidl::encoding::TypeMarker for PhySetCountryRequest {
1207 type Owned = Self;
1208
1209 #[inline(always)]
1210 fn inline_align(_context: fidl::encoding::Context) -> usize {
1211 1
1212 }
1213
1214 #[inline(always)]
1215 fn inline_size(_context: fidl::encoding::Context) -> usize {
1216 2
1217 }
1218 #[inline(always)]
1219 fn encode_is_copy() -> bool {
1220 true
1221 }
1222
1223 #[inline(always)]
1224 fn decode_is_copy() -> bool {
1225 true
1226 }
1227 }
1228
1229 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PhySetCountryRequest, D>
1230 for &PhySetCountryRequest
1231 {
1232 #[inline]
1233 unsafe fn encode(
1234 self,
1235 encoder: &mut fidl::encoding::Encoder<'_, D>,
1236 offset: usize,
1237 _depth: fidl::encoding::Depth,
1238 ) -> fidl::Result<()> {
1239 encoder.debug_check_bounds::<PhySetCountryRequest>(offset);
1240 unsafe {
1241 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1243 (buf_ptr as *mut PhySetCountryRequest)
1244 .write_unaligned((self as *const PhySetCountryRequest).read());
1245 }
1248 Ok(())
1249 }
1250 }
1251 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<CountryCode, D>>
1252 fidl::encoding::Encode<PhySetCountryRequest, D> for (T0,)
1253 {
1254 #[inline]
1255 unsafe fn encode(
1256 self,
1257 encoder: &mut fidl::encoding::Encoder<'_, D>,
1258 offset: usize,
1259 depth: fidl::encoding::Depth,
1260 ) -> fidl::Result<()> {
1261 encoder.debug_check_bounds::<PhySetCountryRequest>(offset);
1262 self.0.encode(encoder, offset + 0, depth)?;
1266 Ok(())
1267 }
1268 }
1269
1270 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PhySetCountryRequest {
1271 #[inline(always)]
1272 fn new_empty() -> Self {
1273 Self { req: fidl::new_empty!(CountryCode, D) }
1274 }
1275
1276 #[inline]
1277 unsafe fn decode(
1278 &mut self,
1279 decoder: &mut fidl::encoding::Decoder<'_, D>,
1280 offset: usize,
1281 _depth: fidl::encoding::Depth,
1282 ) -> fidl::Result<()> {
1283 decoder.debug_check_bounds::<Self>(offset);
1284 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1285 unsafe {
1288 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1289 }
1290 Ok(())
1291 }
1292 }
1293
1294 impl fidl::encoding::ValueTypeMarker for PhySetCountryResponse {
1295 type Borrowed<'a> = &'a Self;
1296 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1297 value
1298 }
1299 }
1300
1301 unsafe impl fidl::encoding::TypeMarker for PhySetCountryResponse {
1302 type Owned = Self;
1303
1304 #[inline(always)]
1305 fn inline_align(_context: fidl::encoding::Context) -> usize {
1306 4
1307 }
1308
1309 #[inline(always)]
1310 fn inline_size(_context: fidl::encoding::Context) -> usize {
1311 4
1312 }
1313 #[inline(always)]
1314 fn encode_is_copy() -> bool {
1315 true
1316 }
1317
1318 #[inline(always)]
1319 fn decode_is_copy() -> bool {
1320 true
1321 }
1322 }
1323
1324 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PhySetCountryResponse, D>
1325 for &PhySetCountryResponse
1326 {
1327 #[inline]
1328 unsafe fn encode(
1329 self,
1330 encoder: &mut fidl::encoding::Encoder<'_, D>,
1331 offset: usize,
1332 _depth: fidl::encoding::Depth,
1333 ) -> fidl::Result<()> {
1334 encoder.debug_check_bounds::<PhySetCountryResponse>(offset);
1335 unsafe {
1336 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1338 (buf_ptr as *mut PhySetCountryResponse)
1339 .write_unaligned((self as *const PhySetCountryResponse).read());
1340 }
1343 Ok(())
1344 }
1345 }
1346 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
1347 fidl::encoding::Encode<PhySetCountryResponse, D> for (T0,)
1348 {
1349 #[inline]
1350 unsafe fn encode(
1351 self,
1352 encoder: &mut fidl::encoding::Encoder<'_, D>,
1353 offset: usize,
1354 depth: fidl::encoding::Depth,
1355 ) -> fidl::Result<()> {
1356 encoder.debug_check_bounds::<PhySetCountryResponse>(offset);
1357 self.0.encode(encoder, offset + 0, depth)?;
1361 Ok(())
1362 }
1363 }
1364
1365 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PhySetCountryResponse {
1366 #[inline(always)]
1367 fn new_empty() -> Self {
1368 Self { status: fidl::new_empty!(i32, D) }
1369 }
1370
1371 #[inline]
1372 unsafe fn decode(
1373 &mut self,
1374 decoder: &mut fidl::encoding::Decoder<'_, D>,
1375 offset: usize,
1376 _depth: fidl::encoding::Depth,
1377 ) -> fidl::Result<()> {
1378 decoder.debug_check_bounds::<Self>(offset);
1379 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1380 unsafe {
1383 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1384 }
1385 Ok(())
1386 }
1387 }
1388
1389 impl fidl::encoding::ValueTypeMarker for PhySetPowerSaveModeRequest {
1390 type Borrowed<'a> = &'a Self;
1391 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1392 value
1393 }
1394 }
1395
1396 unsafe impl fidl::encoding::TypeMarker for PhySetPowerSaveModeRequest {
1397 type Owned = Self;
1398
1399 #[inline(always)]
1400 fn inline_align(_context: fidl::encoding::Context) -> usize {
1401 4
1402 }
1403
1404 #[inline(always)]
1405 fn inline_size(_context: fidl::encoding::Context) -> usize {
1406 4
1407 }
1408 }
1409
1410 unsafe impl<D: fidl::encoding::ResourceDialect>
1411 fidl::encoding::Encode<PhySetPowerSaveModeRequest, D> for &PhySetPowerSaveModeRequest
1412 {
1413 #[inline]
1414 unsafe fn encode(
1415 self,
1416 encoder: &mut fidl::encoding::Encoder<'_, D>,
1417 offset: usize,
1418 _depth: fidl::encoding::Depth,
1419 ) -> fidl::Result<()> {
1420 encoder.debug_check_bounds::<PhySetPowerSaveModeRequest>(offset);
1421 fidl::encoding::Encode::<PhySetPowerSaveModeRequest, D>::encode(
1423 (
1424 <fidl_fuchsia_wlan_common_common::PowerSaveType as fidl::encoding::ValueTypeMarker>::borrow(&self.req),
1425 ),
1426 encoder, offset, _depth
1427 )
1428 }
1429 }
1430 unsafe impl<
1431 D: fidl::encoding::ResourceDialect,
1432 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common_common::PowerSaveType, D>,
1433 > fidl::encoding::Encode<PhySetPowerSaveModeRequest, D> for (T0,)
1434 {
1435 #[inline]
1436 unsafe fn encode(
1437 self,
1438 encoder: &mut fidl::encoding::Encoder<'_, D>,
1439 offset: usize,
1440 depth: fidl::encoding::Depth,
1441 ) -> fidl::Result<()> {
1442 encoder.debug_check_bounds::<PhySetPowerSaveModeRequest>(offset);
1443 self.0.encode(encoder, offset + 0, depth)?;
1447 Ok(())
1448 }
1449 }
1450
1451 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1452 for PhySetPowerSaveModeRequest
1453 {
1454 #[inline(always)]
1455 fn new_empty() -> Self {
1456 Self { req: fidl::new_empty!(fidl_fuchsia_wlan_common_common::PowerSaveType, D) }
1457 }
1458
1459 #[inline]
1460 unsafe fn decode(
1461 &mut self,
1462 decoder: &mut fidl::encoding::Decoder<'_, D>,
1463 offset: usize,
1464 _depth: fidl::encoding::Depth,
1465 ) -> fidl::Result<()> {
1466 decoder.debug_check_bounds::<Self>(offset);
1467 fidl::decode!(
1469 fidl_fuchsia_wlan_common_common::PowerSaveType,
1470 D,
1471 &mut self.req,
1472 decoder,
1473 offset + 0,
1474 _depth
1475 )?;
1476 Ok(())
1477 }
1478 }
1479
1480 impl fidl::encoding::ValueTypeMarker for PhySetPowerSaveModeResponse {
1481 type Borrowed<'a> = &'a Self;
1482 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1483 value
1484 }
1485 }
1486
1487 unsafe impl fidl::encoding::TypeMarker for PhySetPowerSaveModeResponse {
1488 type Owned = Self;
1489
1490 #[inline(always)]
1491 fn inline_align(_context: fidl::encoding::Context) -> usize {
1492 4
1493 }
1494
1495 #[inline(always)]
1496 fn inline_size(_context: fidl::encoding::Context) -> usize {
1497 4
1498 }
1499 #[inline(always)]
1500 fn encode_is_copy() -> bool {
1501 true
1502 }
1503
1504 #[inline(always)]
1505 fn decode_is_copy() -> bool {
1506 true
1507 }
1508 }
1509
1510 unsafe impl<D: fidl::encoding::ResourceDialect>
1511 fidl::encoding::Encode<PhySetPowerSaveModeResponse, D> for &PhySetPowerSaveModeResponse
1512 {
1513 #[inline]
1514 unsafe fn encode(
1515 self,
1516 encoder: &mut fidl::encoding::Encoder<'_, D>,
1517 offset: usize,
1518 _depth: fidl::encoding::Depth,
1519 ) -> fidl::Result<()> {
1520 encoder.debug_check_bounds::<PhySetPowerSaveModeResponse>(offset);
1521 unsafe {
1522 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1524 (buf_ptr as *mut PhySetPowerSaveModeResponse)
1525 .write_unaligned((self as *const PhySetPowerSaveModeResponse).read());
1526 }
1529 Ok(())
1530 }
1531 }
1532 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
1533 fidl::encoding::Encode<PhySetPowerSaveModeResponse, D> for (T0,)
1534 {
1535 #[inline]
1536 unsafe fn encode(
1537 self,
1538 encoder: &mut fidl::encoding::Encoder<'_, D>,
1539 offset: usize,
1540 depth: fidl::encoding::Depth,
1541 ) -> fidl::Result<()> {
1542 encoder.debug_check_bounds::<PhySetPowerSaveModeResponse>(offset);
1543 self.0.encode(encoder, offset + 0, depth)?;
1547 Ok(())
1548 }
1549 }
1550
1551 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1552 for PhySetPowerSaveModeResponse
1553 {
1554 #[inline(always)]
1555 fn new_empty() -> Self {
1556 Self { status: fidl::new_empty!(i32, D) }
1557 }
1558
1559 #[inline]
1560 unsafe fn decode(
1561 &mut self,
1562 decoder: &mut fidl::encoding::Decoder<'_, D>,
1563 offset: usize,
1564 _depth: fidl::encoding::Depth,
1565 ) -> fidl::Result<()> {
1566 decoder.debug_check_bounds::<Self>(offset);
1567 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1568 unsafe {
1571 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1572 }
1573 Ok(())
1574 }
1575 }
1576
1577 impl fidl::encoding::ValueTypeMarker for PhySetTxPowerScenarioRequest {
1578 type Borrowed<'a> = &'a Self;
1579 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1580 value
1581 }
1582 }
1583
1584 unsafe impl fidl::encoding::TypeMarker for PhySetTxPowerScenarioRequest {
1585 type Owned = Self;
1586
1587 #[inline(always)]
1588 fn inline_align(_context: fidl::encoding::Context) -> usize {
1589 4
1590 }
1591
1592 #[inline(always)]
1593 fn inline_size(_context: fidl::encoding::Context) -> usize {
1594 4
1595 }
1596 }
1597
1598 unsafe impl<D: fidl::encoding::ResourceDialect>
1599 fidl::encoding::Encode<PhySetTxPowerScenarioRequest, D> for &PhySetTxPowerScenarioRequest
1600 {
1601 #[inline]
1602 unsafe fn encode(
1603 self,
1604 encoder: &mut fidl::encoding::Encoder<'_, D>,
1605 offset: usize,
1606 _depth: fidl::encoding::Depth,
1607 ) -> fidl::Result<()> {
1608 encoder.debug_check_bounds::<PhySetTxPowerScenarioRequest>(offset);
1609 fidl::encoding::Encode::<PhySetTxPowerScenarioRequest, D>::encode(
1611 (
1612 <fidl_fuchsia_wlan_internal_common::TxPowerScenario as fidl::encoding::ValueTypeMarker>::borrow(&self.scenario),
1613 ),
1614 encoder, offset, _depth
1615 )
1616 }
1617 }
1618 unsafe impl<
1619 D: fidl::encoding::ResourceDialect,
1620 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal_common::TxPowerScenario, D>,
1621 > fidl::encoding::Encode<PhySetTxPowerScenarioRequest, D> for (T0,)
1622 {
1623 #[inline]
1624 unsafe fn encode(
1625 self,
1626 encoder: &mut fidl::encoding::Encoder<'_, D>,
1627 offset: usize,
1628 depth: fidl::encoding::Depth,
1629 ) -> fidl::Result<()> {
1630 encoder.debug_check_bounds::<PhySetTxPowerScenarioRequest>(offset);
1631 self.0.encode(encoder, offset + 0, depth)?;
1635 Ok(())
1636 }
1637 }
1638
1639 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1640 for PhySetTxPowerScenarioRequest
1641 {
1642 #[inline(always)]
1643 fn new_empty() -> Self {
1644 Self {
1645 scenario: fidl::new_empty!(fidl_fuchsia_wlan_internal_common::TxPowerScenario, D),
1646 }
1647 }
1648
1649 #[inline]
1650 unsafe fn decode(
1651 &mut self,
1652 decoder: &mut fidl::encoding::Decoder<'_, D>,
1653 offset: usize,
1654 _depth: fidl::encoding::Depth,
1655 ) -> fidl::Result<()> {
1656 decoder.debug_check_bounds::<Self>(offset);
1657 fidl::decode!(
1659 fidl_fuchsia_wlan_internal_common::TxPowerScenario,
1660 D,
1661 &mut self.scenario,
1662 decoder,
1663 offset + 0,
1664 _depth
1665 )?;
1666 Ok(())
1667 }
1668 }
1669
1670 impl fidl::encoding::ValueTypeMarker for PhyCreateIfaceResponse {
1671 type Borrowed<'a> = &'a Self;
1672 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1673 value
1674 }
1675 }
1676
1677 unsafe impl fidl::encoding::TypeMarker for PhyCreateIfaceResponse {
1678 type Owned = Self;
1679
1680 #[inline(always)]
1681 fn inline_align(_context: fidl::encoding::Context) -> usize {
1682 2
1683 }
1684
1685 #[inline(always)]
1686 fn inline_size(_context: fidl::encoding::Context) -> usize {
1687 2
1688 }
1689 #[inline(always)]
1690 fn encode_is_copy() -> bool {
1691 true
1692 }
1693
1694 #[inline(always)]
1695 fn decode_is_copy() -> bool {
1696 true
1697 }
1698 }
1699
1700 unsafe impl<D: fidl::encoding::ResourceDialect>
1701 fidl::encoding::Encode<PhyCreateIfaceResponse, D> for &PhyCreateIfaceResponse
1702 {
1703 #[inline]
1704 unsafe fn encode(
1705 self,
1706 encoder: &mut fidl::encoding::Encoder<'_, D>,
1707 offset: usize,
1708 _depth: fidl::encoding::Depth,
1709 ) -> fidl::Result<()> {
1710 encoder.debug_check_bounds::<PhyCreateIfaceResponse>(offset);
1711 unsafe {
1712 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1714 (buf_ptr as *mut PhyCreateIfaceResponse)
1715 .write_unaligned((self as *const PhyCreateIfaceResponse).read());
1716 }
1719 Ok(())
1720 }
1721 }
1722 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
1723 fidl::encoding::Encode<PhyCreateIfaceResponse, D> for (T0,)
1724 {
1725 #[inline]
1726 unsafe fn encode(
1727 self,
1728 encoder: &mut fidl::encoding::Encoder<'_, D>,
1729 offset: usize,
1730 depth: fidl::encoding::Depth,
1731 ) -> fidl::Result<()> {
1732 encoder.debug_check_bounds::<PhyCreateIfaceResponse>(offset);
1733 self.0.encode(encoder, offset + 0, depth)?;
1737 Ok(())
1738 }
1739 }
1740
1741 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1742 for PhyCreateIfaceResponse
1743 {
1744 #[inline(always)]
1745 fn new_empty() -> Self {
1746 Self { iface_id: fidl::new_empty!(u16, D) }
1747 }
1748
1749 #[inline]
1750 unsafe fn decode(
1751 &mut self,
1752 decoder: &mut fidl::encoding::Decoder<'_, D>,
1753 offset: usize,
1754 _depth: fidl::encoding::Depth,
1755 ) -> fidl::Result<()> {
1756 decoder.debug_check_bounds::<Self>(offset);
1757 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1758 unsafe {
1761 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1762 }
1763 Ok(())
1764 }
1765 }
1766
1767 impl fidl::encoding::ValueTypeMarker for PhyGetCountryResponse {
1768 type Borrowed<'a> = &'a Self;
1769 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1770 value
1771 }
1772 }
1773
1774 unsafe impl fidl::encoding::TypeMarker for PhyGetCountryResponse {
1775 type Owned = Self;
1776
1777 #[inline(always)]
1778 fn inline_align(_context: fidl::encoding::Context) -> usize {
1779 1
1780 }
1781
1782 #[inline(always)]
1783 fn inline_size(_context: fidl::encoding::Context) -> usize {
1784 2
1785 }
1786 #[inline(always)]
1787 fn encode_is_copy() -> bool {
1788 true
1789 }
1790
1791 #[inline(always)]
1792 fn decode_is_copy() -> bool {
1793 true
1794 }
1795 }
1796
1797 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PhyGetCountryResponse, D>
1798 for &PhyGetCountryResponse
1799 {
1800 #[inline]
1801 unsafe fn encode(
1802 self,
1803 encoder: &mut fidl::encoding::Encoder<'_, D>,
1804 offset: usize,
1805 _depth: fidl::encoding::Depth,
1806 ) -> fidl::Result<()> {
1807 encoder.debug_check_bounds::<PhyGetCountryResponse>(offset);
1808 unsafe {
1809 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1811 (buf_ptr as *mut PhyGetCountryResponse)
1812 .write_unaligned((self as *const PhyGetCountryResponse).read());
1813 }
1816 Ok(())
1817 }
1818 }
1819 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<CountryCode, D>>
1820 fidl::encoding::Encode<PhyGetCountryResponse, D> for (T0,)
1821 {
1822 #[inline]
1823 unsafe fn encode(
1824 self,
1825 encoder: &mut fidl::encoding::Encoder<'_, D>,
1826 offset: usize,
1827 depth: fidl::encoding::Depth,
1828 ) -> fidl::Result<()> {
1829 encoder.debug_check_bounds::<PhyGetCountryResponse>(offset);
1830 self.0.encode(encoder, offset + 0, depth)?;
1834 Ok(())
1835 }
1836 }
1837
1838 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PhyGetCountryResponse {
1839 #[inline(always)]
1840 fn new_empty() -> Self {
1841 Self { resp: fidl::new_empty!(CountryCode, D) }
1842 }
1843
1844 #[inline]
1845 unsafe fn decode(
1846 &mut self,
1847 decoder: &mut fidl::encoding::Decoder<'_, D>,
1848 offset: usize,
1849 _depth: fidl::encoding::Depth,
1850 ) -> fidl::Result<()> {
1851 decoder.debug_check_bounds::<Self>(offset);
1852 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1853 unsafe {
1856 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1857 }
1858 Ok(())
1859 }
1860 }
1861
1862 impl fidl::encoding::ValueTypeMarker for PhyGetPowerSaveModeResponse {
1863 type Borrowed<'a> = &'a Self;
1864 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1865 value
1866 }
1867 }
1868
1869 unsafe impl fidl::encoding::TypeMarker for PhyGetPowerSaveModeResponse {
1870 type Owned = Self;
1871
1872 #[inline(always)]
1873 fn inline_align(_context: fidl::encoding::Context) -> usize {
1874 4
1875 }
1876
1877 #[inline(always)]
1878 fn inline_size(_context: fidl::encoding::Context) -> usize {
1879 4
1880 }
1881 }
1882
1883 unsafe impl<D: fidl::encoding::ResourceDialect>
1884 fidl::encoding::Encode<PhyGetPowerSaveModeResponse, D> for &PhyGetPowerSaveModeResponse
1885 {
1886 #[inline]
1887 unsafe fn encode(
1888 self,
1889 encoder: &mut fidl::encoding::Encoder<'_, D>,
1890 offset: usize,
1891 _depth: fidl::encoding::Depth,
1892 ) -> fidl::Result<()> {
1893 encoder.debug_check_bounds::<PhyGetPowerSaveModeResponse>(offset);
1894 fidl::encoding::Encode::<PhyGetPowerSaveModeResponse, D>::encode(
1896 (
1897 <fidl_fuchsia_wlan_common_common::PowerSaveType as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
1898 ),
1899 encoder, offset, _depth
1900 )
1901 }
1902 }
1903 unsafe impl<
1904 D: fidl::encoding::ResourceDialect,
1905 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common_common::PowerSaveType, D>,
1906 > fidl::encoding::Encode<PhyGetPowerSaveModeResponse, D> for (T0,)
1907 {
1908 #[inline]
1909 unsafe fn encode(
1910 self,
1911 encoder: &mut fidl::encoding::Encoder<'_, D>,
1912 offset: usize,
1913 depth: fidl::encoding::Depth,
1914 ) -> fidl::Result<()> {
1915 encoder.debug_check_bounds::<PhyGetPowerSaveModeResponse>(offset);
1916 self.0.encode(encoder, offset + 0, depth)?;
1920 Ok(())
1921 }
1922 }
1923
1924 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1925 for PhyGetPowerSaveModeResponse
1926 {
1927 #[inline(always)]
1928 fn new_empty() -> Self {
1929 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common_common::PowerSaveType, D) }
1930 }
1931
1932 #[inline]
1933 unsafe fn decode(
1934 &mut self,
1935 decoder: &mut fidl::encoding::Decoder<'_, D>,
1936 offset: usize,
1937 _depth: fidl::encoding::Depth,
1938 ) -> fidl::Result<()> {
1939 decoder.debug_check_bounds::<Self>(offset);
1940 fidl::decode!(
1942 fidl_fuchsia_wlan_common_common::PowerSaveType,
1943 D,
1944 &mut self.resp,
1945 decoder,
1946 offset + 0,
1947 _depth
1948 )?;
1949 Ok(())
1950 }
1951 }
1952
1953 impl fidl::encoding::ValueTypeMarker for PhyGetPowerStateResponse {
1954 type Borrowed<'a> = &'a Self;
1955 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1956 value
1957 }
1958 }
1959
1960 unsafe impl fidl::encoding::TypeMarker for PhyGetPowerStateResponse {
1961 type Owned = Self;
1962
1963 #[inline(always)]
1964 fn inline_align(_context: fidl::encoding::Context) -> usize {
1965 1
1966 }
1967
1968 #[inline(always)]
1969 fn inline_size(_context: fidl::encoding::Context) -> usize {
1970 1
1971 }
1972 }
1973
1974 unsafe impl<D: fidl::encoding::ResourceDialect>
1975 fidl::encoding::Encode<PhyGetPowerStateResponse, D> for &PhyGetPowerStateResponse
1976 {
1977 #[inline]
1978 unsafe fn encode(
1979 self,
1980 encoder: &mut fidl::encoding::Encoder<'_, D>,
1981 offset: usize,
1982 _depth: fidl::encoding::Depth,
1983 ) -> fidl::Result<()> {
1984 encoder.debug_check_bounds::<PhyGetPowerStateResponse>(offset);
1985 fidl::encoding::Encode::<PhyGetPowerStateResponse, D>::encode(
1987 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.power_on),),
1988 encoder,
1989 offset,
1990 _depth,
1991 )
1992 }
1993 }
1994 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
1995 fidl::encoding::Encode<PhyGetPowerStateResponse, D> for (T0,)
1996 {
1997 #[inline]
1998 unsafe fn encode(
1999 self,
2000 encoder: &mut fidl::encoding::Encoder<'_, D>,
2001 offset: usize,
2002 depth: fidl::encoding::Depth,
2003 ) -> fidl::Result<()> {
2004 encoder.debug_check_bounds::<PhyGetPowerStateResponse>(offset);
2005 self.0.encode(encoder, offset + 0, depth)?;
2009 Ok(())
2010 }
2011 }
2012
2013 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2014 for PhyGetPowerStateResponse
2015 {
2016 #[inline(always)]
2017 fn new_empty() -> Self {
2018 Self { power_on: fidl::new_empty!(bool, D) }
2019 }
2020
2021 #[inline]
2022 unsafe fn decode(
2023 &mut self,
2024 decoder: &mut fidl::encoding::Decoder<'_, D>,
2025 offset: usize,
2026 _depth: fidl::encoding::Depth,
2027 ) -> fidl::Result<()> {
2028 decoder.debug_check_bounds::<Self>(offset);
2029 fidl::decode!(bool, D, &mut self.power_on, decoder, offset + 0, _depth)?;
2031 Ok(())
2032 }
2033 }
2034
2035 impl fidl::encoding::ValueTypeMarker for PhyGetSupportedMacRolesResponse {
2036 type Borrowed<'a> = &'a Self;
2037 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2038 value
2039 }
2040 }
2041
2042 unsafe impl fidl::encoding::TypeMarker for PhyGetSupportedMacRolesResponse {
2043 type Owned = Self;
2044
2045 #[inline(always)]
2046 fn inline_align(_context: fidl::encoding::Context) -> usize {
2047 8
2048 }
2049
2050 #[inline(always)]
2051 fn inline_size(_context: fidl::encoding::Context) -> usize {
2052 16
2053 }
2054 }
2055
2056 unsafe impl<D: fidl::encoding::ResourceDialect>
2057 fidl::encoding::Encode<PhyGetSupportedMacRolesResponse, D>
2058 for &PhyGetSupportedMacRolesResponse
2059 {
2060 #[inline]
2061 unsafe fn encode(
2062 self,
2063 encoder: &mut fidl::encoding::Encoder<'_, D>,
2064 offset: usize,
2065 _depth: fidl::encoding::Depth,
2066 ) -> fidl::Result<()> {
2067 encoder.debug_check_bounds::<PhyGetSupportedMacRolesResponse>(offset);
2068 fidl::encoding::Encode::<PhyGetSupportedMacRolesResponse, D>::encode(
2070 (
2071 <fidl::encoding::Vector<fidl_fuchsia_wlan_common_common::WlanMacRole, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.supported_mac_roles),
2072 ),
2073 encoder, offset, _depth
2074 )
2075 }
2076 }
2077 unsafe impl<
2078 D: fidl::encoding::ResourceDialect,
2079 T0: fidl::encoding::Encode<
2080 fidl::encoding::Vector<fidl_fuchsia_wlan_common_common::WlanMacRole, 16>,
2081 D,
2082 >,
2083 > fidl::encoding::Encode<PhyGetSupportedMacRolesResponse, D> for (T0,)
2084 {
2085 #[inline]
2086 unsafe fn encode(
2087 self,
2088 encoder: &mut fidl::encoding::Encoder<'_, D>,
2089 offset: usize,
2090 depth: fidl::encoding::Depth,
2091 ) -> fidl::Result<()> {
2092 encoder.debug_check_bounds::<PhyGetSupportedMacRolesResponse>(offset);
2093 self.0.encode(encoder, offset + 0, depth)?;
2097 Ok(())
2098 }
2099 }
2100
2101 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2102 for PhyGetSupportedMacRolesResponse
2103 {
2104 #[inline(always)]
2105 fn new_empty() -> Self {
2106 Self {
2107 supported_mac_roles: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_common_common::WlanMacRole, 16>, D),
2108 }
2109 }
2110
2111 #[inline]
2112 unsafe fn decode(
2113 &mut self,
2114 decoder: &mut fidl::encoding::Decoder<'_, D>,
2115 offset: usize,
2116 _depth: fidl::encoding::Depth,
2117 ) -> fidl::Result<()> {
2118 decoder.debug_check_bounds::<Self>(offset);
2119 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_common_common::WlanMacRole, 16>, D, &mut self.supported_mac_roles, decoder, offset + 0, _depth)?;
2121 Ok(())
2122 }
2123 }
2124
2125 impl fidl::encoding::ValueTypeMarker for PhyGetTxPowerScenarioResponse {
2126 type Borrowed<'a> = &'a Self;
2127 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2128 value
2129 }
2130 }
2131
2132 unsafe impl fidl::encoding::TypeMarker for PhyGetTxPowerScenarioResponse {
2133 type Owned = Self;
2134
2135 #[inline(always)]
2136 fn inline_align(_context: fidl::encoding::Context) -> usize {
2137 4
2138 }
2139
2140 #[inline(always)]
2141 fn inline_size(_context: fidl::encoding::Context) -> usize {
2142 4
2143 }
2144 }
2145
2146 unsafe impl<D: fidl::encoding::ResourceDialect>
2147 fidl::encoding::Encode<PhyGetTxPowerScenarioResponse, D>
2148 for &PhyGetTxPowerScenarioResponse
2149 {
2150 #[inline]
2151 unsafe fn encode(
2152 self,
2153 encoder: &mut fidl::encoding::Encoder<'_, D>,
2154 offset: usize,
2155 _depth: fidl::encoding::Depth,
2156 ) -> fidl::Result<()> {
2157 encoder.debug_check_bounds::<PhyGetTxPowerScenarioResponse>(offset);
2158 fidl::encoding::Encode::<PhyGetTxPowerScenarioResponse, D>::encode(
2160 (
2161 <fidl_fuchsia_wlan_internal_common::TxPowerScenario as fidl::encoding::ValueTypeMarker>::borrow(&self.scenario),
2162 ),
2163 encoder, offset, _depth
2164 )
2165 }
2166 }
2167 unsafe impl<
2168 D: fidl::encoding::ResourceDialect,
2169 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal_common::TxPowerScenario, D>,
2170 > fidl::encoding::Encode<PhyGetTxPowerScenarioResponse, D> for (T0,)
2171 {
2172 #[inline]
2173 unsafe fn encode(
2174 self,
2175 encoder: &mut fidl::encoding::Encoder<'_, D>,
2176 offset: usize,
2177 depth: fidl::encoding::Depth,
2178 ) -> fidl::Result<()> {
2179 encoder.debug_check_bounds::<PhyGetTxPowerScenarioResponse>(offset);
2180 self.0.encode(encoder, offset + 0, depth)?;
2184 Ok(())
2185 }
2186 }
2187
2188 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2189 for PhyGetTxPowerScenarioResponse
2190 {
2191 #[inline(always)]
2192 fn new_empty() -> Self {
2193 Self {
2194 scenario: fidl::new_empty!(fidl_fuchsia_wlan_internal_common::TxPowerScenario, D),
2195 }
2196 }
2197
2198 #[inline]
2199 unsafe fn decode(
2200 &mut self,
2201 decoder: &mut fidl::encoding::Decoder<'_, D>,
2202 offset: usize,
2203 _depth: fidl::encoding::Depth,
2204 ) -> fidl::Result<()> {
2205 decoder.debug_check_bounds::<Self>(offset);
2206 fidl::decode!(
2208 fidl_fuchsia_wlan_internal_common::TxPowerScenario,
2209 D,
2210 &mut self.scenario,
2211 decoder,
2212 offset + 0,
2213 _depth
2214 )?;
2215 Ok(())
2216 }
2217 }
2218}