1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 #[doc = " WLAN security protocols.\n\n WPA protocols are additionally enumerated by their authentication suite\n (i.e., Personal vs. Enterprise).\n"]
8 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9 #[repr(u32)]
10 pub enum Protocol {
11 Open = 1,
12 Wep = 2,
13 Wpa1 = 3,
14 Wpa2Personal = 4,
15 Wpa2Enterprise = 5,
16 Wpa3Personal = 6,
17 Wpa3Enterprise = 7,
18 Owe = 8,
19 UnknownOrdinal_(u32) = 9,
20 }
21 impl ::std::convert::From<u32> for Protocol {
22 fn from(value: u32) -> Self {
23 match value {
24 1 => Self::Open,
25 2 => Self::Wep,
26 3 => Self::Wpa1,
27 4 => Self::Wpa2Personal,
28 5 => Self::Wpa2Enterprise,
29 6 => Self::Wpa3Personal,
30 7 => Self::Wpa3Enterprise,
31 8 => Self::Owe,
32
33 _ => Self::UnknownOrdinal_(value),
34 }
35 }
36 }
37
38 impl ::std::convert::From<Protocol> for u32 {
39 fn from(value: Protocol) -> Self {
40 match value {
41 Protocol::Open => 1,
42 Protocol::Wep => 2,
43 Protocol::Wpa1 => 3,
44 Protocol::Wpa2Personal => 4,
45 Protocol::Wpa2Enterprise => 5,
46 Protocol::Wpa3Personal => 6,
47 Protocol::Wpa3Enterprise => 7,
48 Protocol::Owe => 8,
49
50 Protocol::UnknownOrdinal_(value) => value,
51 }
52 }
53 }
54
55 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Protocol, ___E> for Protocol
56 where
57 ___E: ?Sized,
58 {
59 #[inline]
60 fn encode(
61 self,
62 encoder: &mut ___E,
63 out: &mut ::core::mem::MaybeUninit<crate::wire::Protocol>,
64 _: (),
65 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
66 ::fidl_next::Encode::encode(&self, encoder, out, ())
67 }
68 }
69
70 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Protocol, ___E> for &'a Protocol
71 where
72 ___E: ?Sized,
73 {
74 #[inline]
75 fn encode(
76 self,
77 encoder: &mut ___E,
78 out: &mut ::core::mem::MaybeUninit<crate::wire::Protocol>,
79 _: (),
80 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
81 ::fidl_next::munge!(let crate::wire::Protocol { value } = out);
82 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
83 Protocol::Open => 1,
84
85 Protocol::Wep => 2,
86
87 Protocol::Wpa1 => 3,
88
89 Protocol::Wpa2Personal => 4,
90
91 Protocol::Wpa2Enterprise => 5,
92
93 Protocol::Wpa3Personal => 6,
94
95 Protocol::Wpa3Enterprise => 7,
96
97 Protocol::Owe => 8,
98
99 Protocol::UnknownOrdinal_(value) => value,
100 }));
101
102 Ok(())
103 }
104 }
105
106 impl ::core::convert::From<crate::wire::Protocol> for Protocol {
107 fn from(wire: crate::wire::Protocol) -> Self {
108 match u32::from(wire.value) {
109 1 => Self::Open,
110
111 2 => Self::Wep,
112
113 3 => Self::Wpa1,
114
115 4 => Self::Wpa2Personal,
116
117 5 => Self::Wpa2Enterprise,
118
119 6 => Self::Wpa3Personal,
120
121 7 => Self::Wpa3Enterprise,
122
123 8 => Self::Owe,
124
125 value => Self::UnknownOrdinal_(value),
126 }
127 }
128 }
129
130 impl ::fidl_next::FromWire<crate::wire::Protocol> for Protocol {
131 #[inline]
132 fn from_wire(wire: crate::wire::Protocol) -> Self {
133 Self::from(wire)
134 }
135 }
136
137 impl ::fidl_next::FromWireRef<crate::wire::Protocol> for Protocol {
138 #[inline]
139 fn from_wire_ref(wire: &crate::wire::Protocol) -> Self {
140 Self::from(*wire)
141 }
142 }
143
144 #[doc = " Pairs credentials with a particular security protocol. This type requires\n validation, as `Protocol` and `Credentials` may disagree. FIDL APIs that use\n this type generally restrict authentication to `protocol`.\n"]
145 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
146 pub struct Authentication {
147 pub protocol: crate::natural::Protocol,
148
149 pub credentials: ::core::option::Option<::std::boxed::Box<crate::natural::Credentials>>,
150 }
151
152 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E> for Authentication
153 where
154 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
155 ___E: ::fidl_next::Encoder,
156 {
157 #[inline]
158 fn encode(
159 self,
160 encoder_: &mut ___E,
161 out_: &mut ::core::mem::MaybeUninit<crate::wire::Authentication<'static>>,
162 _: (),
163 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
164 ::fidl_next::munge! {
165 let crate::wire::Authentication {
166 protocol,
167 credentials,
168
169 } = out_;
170 }
171
172 ::fidl_next::Encode::encode(self.protocol, encoder_, protocol, ())?;
173
174 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(protocol.as_mut_ptr()) };
175
176 ::fidl_next::Encode::encode(self.credentials, encoder_, credentials, ())?;
177
178 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(credentials.as_mut_ptr()) };
179
180 Ok(())
181 }
182 }
183
184 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E>
185 for &'a Authentication
186 where
187 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
188 ___E: ::fidl_next::Encoder,
189 {
190 #[inline]
191 fn encode(
192 self,
193 encoder_: &mut ___E,
194 out_: &mut ::core::mem::MaybeUninit<crate::wire::Authentication<'static>>,
195 _: (),
196 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
197 ::fidl_next::munge! {
198 let crate::wire::Authentication {
199 protocol,
200 credentials,
201
202 } = out_;
203 }
204
205 ::fidl_next::Encode::encode(&self.protocol, encoder_, protocol, ())?;
206
207 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(protocol.as_mut_ptr()) };
208
209 ::fidl_next::Encode::encode(&self.credentials, encoder_, credentials, ())?;
210
211 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(credentials.as_mut_ptr()) };
212
213 Ok(())
214 }
215 }
216
217 unsafe impl<___E>
218 ::fidl_next::EncodeOption<
219 ::fidl_next::wire::Box<'static, crate::wire::Authentication<'static>>,
220 ___E,
221 > for Authentication
222 where
223 ___E: ::fidl_next::Encoder + ?Sized,
224 Authentication: ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E>,
225 {
226 #[inline]
227 fn encode_option(
228 this: ::core::option::Option<Self>,
229 encoder: &mut ___E,
230 out: &mut ::core::mem::MaybeUninit<
231 ::fidl_next::wire::Box<'static, crate::wire::Authentication<'static>>,
232 >,
233 _: (),
234 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
235 if let Some(inner) = this {
236 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
237 ::fidl_next::wire::Box::encode_present(out);
238 } else {
239 ::fidl_next::wire::Box::encode_absent(out);
240 }
241
242 Ok(())
243 }
244 }
245
246 unsafe impl<'a, ___E>
247 ::fidl_next::EncodeOption<
248 ::fidl_next::wire::Box<'static, crate::wire::Authentication<'static>>,
249 ___E,
250 > for &'a Authentication
251 where
252 ___E: ::fidl_next::Encoder + ?Sized,
253 &'a Authentication: ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E>,
254 {
255 #[inline]
256 fn encode_option(
257 this: ::core::option::Option<Self>,
258 encoder: &mut ___E,
259 out: &mut ::core::mem::MaybeUninit<
260 ::fidl_next::wire::Box<'static, crate::wire::Authentication<'static>>,
261 >,
262 _: (),
263 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
264 if let Some(inner) = this {
265 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
266 ::fidl_next::wire::Box::encode_present(out);
267 } else {
268 ::fidl_next::wire::Box::encode_absent(out);
269 }
270
271 Ok(())
272 }
273 }
274
275 impl<'de> ::fidl_next::FromWire<crate::wire::Authentication<'de>> for Authentication {
276 #[inline]
277 fn from_wire(wire: crate::wire::Authentication<'de>) -> Self {
278 Self {
279 protocol: ::fidl_next::FromWire::from_wire(wire.protocol),
280
281 credentials: ::fidl_next::FromWire::from_wire(wire.credentials),
282 }
283 }
284 }
285
286 impl<'de> ::fidl_next::FromWireRef<crate::wire::Authentication<'de>> for Authentication {
287 #[inline]
288 fn from_wire_ref(wire: &crate::wire::Authentication<'de>) -> Self {
289 Self {
290 protocol: ::fidl_next::FromWireRef::from_wire_ref(&wire.protocol),
291
292 credentials: ::fidl_next::FromWireRef::from_wire_ref(&wire.credentials),
293 }
294 }
295 }
296
297 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
298 #[repr(u32)]
299 pub enum BtCoexistenceMode {
300 ModeAuto = 1,
301 ModeOff = 2,
302 }
303 impl ::core::convert::TryFrom<u32> for BtCoexistenceMode {
304 type Error = ::fidl_next::UnknownStrictEnumMemberError;
305 fn try_from(
306 value: u32,
307 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
308 match value {
309 1 => Ok(Self::ModeAuto),
310 2 => Ok(Self::ModeOff),
311
312 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
313 }
314 }
315 }
316
317 impl ::std::convert::From<BtCoexistenceMode> for u32 {
318 fn from(value: BtCoexistenceMode) -> Self {
319 match value {
320 BtCoexistenceMode::ModeAuto => 1,
321 BtCoexistenceMode::ModeOff => 2,
322 }
323 }
324 }
325
326 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BtCoexistenceMode, ___E> for BtCoexistenceMode
327 where
328 ___E: ?Sized,
329 {
330 #[inline]
331 fn encode(
332 self,
333 encoder: &mut ___E,
334 out: &mut ::core::mem::MaybeUninit<crate::wire::BtCoexistenceMode>,
335 _: (),
336 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
337 ::fidl_next::Encode::encode(&self, encoder, out, ())
338 }
339 }
340
341 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::BtCoexistenceMode, ___E>
342 for &'a BtCoexistenceMode
343 where
344 ___E: ?Sized,
345 {
346 #[inline]
347 fn encode(
348 self,
349 encoder: &mut ___E,
350 out: &mut ::core::mem::MaybeUninit<crate::wire::BtCoexistenceMode>,
351 _: (),
352 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
353 ::fidl_next::munge!(let crate::wire::BtCoexistenceMode { value } = out);
354 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
355 BtCoexistenceMode::ModeAuto => 1,
356
357 BtCoexistenceMode::ModeOff => 2,
358 }));
359
360 Ok(())
361 }
362 }
363
364 impl ::core::convert::From<crate::wire::BtCoexistenceMode> for BtCoexistenceMode {
365 fn from(wire: crate::wire::BtCoexistenceMode) -> Self {
366 match u32::from(wire.value) {
367 1 => Self::ModeAuto,
368
369 2 => Self::ModeOff,
370
371 _ => unsafe { ::core::hint::unreachable_unchecked() },
372 }
373 }
374 }
375
376 impl ::fidl_next::FromWire<crate::wire::BtCoexistenceMode> for BtCoexistenceMode {
377 #[inline]
378 fn from_wire(wire: crate::wire::BtCoexistenceMode) -> Self {
379 Self::from(wire)
380 }
381 }
382
383 impl ::fidl_next::FromWireRef<crate::wire::BtCoexistenceMode> for BtCoexistenceMode {
384 #[inline]
385 fn from_wire_ref(wire: &crate::wire::BtCoexistenceMode) -> Self {
386 Self::from(*wire)
387 }
388 }
389
390 #[derive(Debug, Clone, PartialEq)]
391 pub struct ChannelSwitchInfo {
392 pub new_primary_channel: ::fidl_next_common_fuchsia_wlan_ieee80211::natural::ChannelNumber,
393
394 pub bandwidth: ::fidl_next_common_fuchsia_wlan_ieee80211::natural::ChannelBandwidth,
395
396 pub vht_secondary_80_channel:
397 ::fidl_next_common_fuchsia_wlan_ieee80211::natural::ChannelNumber,
398 }
399
400 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E> for ChannelSwitchInfo
401 where
402 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
403 {
404 #[inline]
405 fn encode(
406 self,
407 encoder_: &mut ___E,
408 out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSwitchInfo>,
409 _: (),
410 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
411 ::fidl_next::munge! {
412 let crate::wire::ChannelSwitchInfo {
413 new_primary_channel,
414 bandwidth,
415 vht_secondary_80_channel,
416
417 } = out_;
418 }
419
420 ::fidl_next::Encode::encode(
421 self.new_primary_channel,
422 encoder_,
423 new_primary_channel,
424 (),
425 )?;
426
427 let mut _field =
428 unsafe { ::fidl_next::Slot::new_unchecked(new_primary_channel.as_mut_ptr()) };
429
430 ::fidl_next::Encode::encode(self.bandwidth, encoder_, bandwidth, ())?;
431
432 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bandwidth.as_mut_ptr()) };
433
434 ::fidl_next::Encode::encode(
435 self.vht_secondary_80_channel,
436 encoder_,
437 vht_secondary_80_channel,
438 (),
439 )?;
440
441 let mut _field =
442 unsafe { ::fidl_next::Slot::new_unchecked(vht_secondary_80_channel.as_mut_ptr()) };
443
444 Ok(())
445 }
446 }
447
448 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E>
449 for &'a ChannelSwitchInfo
450 where
451 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
452 {
453 #[inline]
454 fn encode(
455 self,
456 encoder_: &mut ___E,
457 out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSwitchInfo>,
458 _: (),
459 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
460 ::fidl_next::munge! {
461 let crate::wire::ChannelSwitchInfo {
462 new_primary_channel,
463 bandwidth,
464 vht_secondary_80_channel,
465
466 } = out_;
467 }
468
469 ::fidl_next::Encode::encode(
470 &self.new_primary_channel,
471 encoder_,
472 new_primary_channel,
473 (),
474 )?;
475
476 let mut _field =
477 unsafe { ::fidl_next::Slot::new_unchecked(new_primary_channel.as_mut_ptr()) };
478
479 ::fidl_next::Encode::encode(&self.bandwidth, encoder_, bandwidth, ())?;
480
481 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bandwidth.as_mut_ptr()) };
482
483 ::fidl_next::Encode::encode(
484 &self.vht_secondary_80_channel,
485 encoder_,
486 vht_secondary_80_channel,
487 (),
488 )?;
489
490 let mut _field =
491 unsafe { ::fidl_next::Slot::new_unchecked(vht_secondary_80_channel.as_mut_ptr()) };
492
493 Ok(())
494 }
495 }
496
497 unsafe impl<___E>
498 ::fidl_next::EncodeOption<
499 ::fidl_next::wire::Box<'static, crate::wire::ChannelSwitchInfo>,
500 ___E,
501 > for ChannelSwitchInfo
502 where
503 ___E: ::fidl_next::Encoder + ?Sized,
504 ChannelSwitchInfo: ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E>,
505 {
506 #[inline]
507 fn encode_option(
508 this: ::core::option::Option<Self>,
509 encoder: &mut ___E,
510 out: &mut ::core::mem::MaybeUninit<
511 ::fidl_next::wire::Box<'static, crate::wire::ChannelSwitchInfo>,
512 >,
513 _: (),
514 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
515 if let Some(inner) = this {
516 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
517 ::fidl_next::wire::Box::encode_present(out);
518 } else {
519 ::fidl_next::wire::Box::encode_absent(out);
520 }
521
522 Ok(())
523 }
524 }
525
526 unsafe impl<'a, ___E>
527 ::fidl_next::EncodeOption<
528 ::fidl_next::wire::Box<'static, crate::wire::ChannelSwitchInfo>,
529 ___E,
530 > for &'a ChannelSwitchInfo
531 where
532 ___E: ::fidl_next::Encoder + ?Sized,
533 &'a ChannelSwitchInfo: ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E>,
534 {
535 #[inline]
536 fn encode_option(
537 this: ::core::option::Option<Self>,
538 encoder: &mut ___E,
539 out: &mut ::core::mem::MaybeUninit<
540 ::fidl_next::wire::Box<'static, crate::wire::ChannelSwitchInfo>,
541 >,
542 _: (),
543 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
544 if let Some(inner) = this {
545 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
546 ::fidl_next::wire::Box::encode_present(out);
547 } else {
548 ::fidl_next::wire::Box::encode_absent(out);
549 }
550
551 Ok(())
552 }
553 }
554
555 impl ::fidl_next::FromWire<crate::wire::ChannelSwitchInfo> for ChannelSwitchInfo {
556 #[inline]
557 fn from_wire(wire: crate::wire::ChannelSwitchInfo) -> Self {
558 Self {
559 new_primary_channel: ::fidl_next::FromWire::from_wire(wire.new_primary_channel),
560
561 bandwidth: ::fidl_next::FromWire::from_wire(wire.bandwidth),
562
563 vht_secondary_80_channel: ::fidl_next::FromWire::from_wire(
564 wire.vht_secondary_80_channel,
565 ),
566 }
567 }
568 }
569
570 impl ::fidl_next::FromWireRef<crate::wire::ChannelSwitchInfo> for ChannelSwitchInfo {
571 #[inline]
572 fn from_wire_ref(wire: &crate::wire::ChannelSwitchInfo) -> Self {
573 Self {
574 new_primary_channel: ::fidl_next::FromWireRef::from_wire_ref(
575 &wire.new_primary_channel,
576 ),
577
578 bandwidth: ::fidl_next::FromWireRef::from_wire_ref(&wire.bandwidth),
579
580 vht_secondary_80_channel: ::fidl_next::FromWireRef::from_wire_ref(
581 &wire.vht_secondary_80_channel,
582 ),
583 }
584 }
585 }
586
587 #[doc = " WEP credentials.\n"]
588 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
589 pub struct WepCredentials {
590 pub key: ::std::vec::Vec<u8>,
591 }
592
593 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E> for WepCredentials
594 where
595 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
596 ___E: ::fidl_next::Encoder,
597 {
598 #[inline]
599 fn encode(
600 self,
601 encoder_: &mut ___E,
602 out_: &mut ::core::mem::MaybeUninit<crate::wire::WepCredentials<'static>>,
603 _: (),
604 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
605 ::fidl_next::munge! {
606 let crate::wire::WepCredentials {
607 key,
608
609 } = out_;
610 }
611
612 ::fidl_next::Encode::encode(self.key, encoder_, key, (4294967295, ()))?;
613
614 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
615 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
616
617 Ok(())
618 }
619 }
620
621 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E>
622 for &'a WepCredentials
623 where
624 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
625 ___E: ::fidl_next::Encoder,
626 {
627 #[inline]
628 fn encode(
629 self,
630 encoder_: &mut ___E,
631 out_: &mut ::core::mem::MaybeUninit<crate::wire::WepCredentials<'static>>,
632 _: (),
633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
634 ::fidl_next::munge! {
635 let crate::wire::WepCredentials {
636 key,
637
638 } = out_;
639 }
640
641 ::fidl_next::Encode::encode(&self.key, encoder_, key, (4294967295, ()))?;
642
643 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
644 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
645
646 Ok(())
647 }
648 }
649
650 unsafe impl<___E>
651 ::fidl_next::EncodeOption<
652 ::fidl_next::wire::Box<'static, crate::wire::WepCredentials<'static>>,
653 ___E,
654 > for WepCredentials
655 where
656 ___E: ::fidl_next::Encoder + ?Sized,
657 WepCredentials: ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E>,
658 {
659 #[inline]
660 fn encode_option(
661 this: ::core::option::Option<Self>,
662 encoder: &mut ___E,
663 out: &mut ::core::mem::MaybeUninit<
664 ::fidl_next::wire::Box<'static, crate::wire::WepCredentials<'static>>,
665 >,
666 _: (),
667 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
668 if let Some(inner) = this {
669 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
670 ::fidl_next::wire::Box::encode_present(out);
671 } else {
672 ::fidl_next::wire::Box::encode_absent(out);
673 }
674
675 Ok(())
676 }
677 }
678
679 unsafe impl<'a, ___E>
680 ::fidl_next::EncodeOption<
681 ::fidl_next::wire::Box<'static, crate::wire::WepCredentials<'static>>,
682 ___E,
683 > for &'a WepCredentials
684 where
685 ___E: ::fidl_next::Encoder + ?Sized,
686 &'a WepCredentials: ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E>,
687 {
688 #[inline]
689 fn encode_option(
690 this: ::core::option::Option<Self>,
691 encoder: &mut ___E,
692 out: &mut ::core::mem::MaybeUninit<
693 ::fidl_next::wire::Box<'static, crate::wire::WepCredentials<'static>>,
694 >,
695 _: (),
696 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
697 if let Some(inner) = this {
698 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
699 ::fidl_next::wire::Box::encode_present(out);
700 } else {
701 ::fidl_next::wire::Box::encode_absent(out);
702 }
703
704 Ok(())
705 }
706 }
707
708 impl<'de> ::fidl_next::FromWire<crate::wire::WepCredentials<'de>> for WepCredentials {
709 #[inline]
710 fn from_wire(wire: crate::wire::WepCredentials<'de>) -> Self {
711 Self { key: ::fidl_next::FromWire::from_wire(wire.key) }
712 }
713 }
714
715 impl<'de> ::fidl_next::FromWireRef<crate::wire::WepCredentials<'de>> for WepCredentials {
716 #[inline]
717 fn from_wire_ref(wire: &crate::wire::WepCredentials<'de>) -> Self {
718 Self { key: ::fidl_next::FromWireRef::from_wire_ref(&wire.key) }
719 }
720 }
721
722 #[doc = " WPA credentials.\n"]
723 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
724 pub enum WpaCredentials {
725 Psk([u8; 32]),
726
727 Passphrase(::std::vec::Vec<u8>),
728
729 UnknownOrdinal_(u64),
730 }
731
732 impl WpaCredentials {
733 pub fn is_unknown(&self) -> bool {
734 #[allow(unreachable_patterns)]
735 match self {
736 Self::UnknownOrdinal_(_) => true,
737 _ => false,
738 }
739 }
740 }
741
742 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WpaCredentials<'static>, ___E> for WpaCredentials
743 where
744 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
745 ___E: ::fidl_next::Encoder,
746 {
747 #[inline]
748 fn encode(
749 self,
750 encoder: &mut ___E,
751 out: &mut ::core::mem::MaybeUninit<crate::wire::WpaCredentials<'static>>,
752 _: (),
753 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
754 ::fidl_next::munge!(let crate::wire::WpaCredentials { raw, _phantom: _ } = out);
755
756 match self {
757 Self::Psk(value) => ::fidl_next::wire::Union::encode_as::<___E, [u8; 32]>(
758 value,
759 1,
760 encoder,
761 raw,
762 (),
763 )?,
764
765 Self::Passphrase(value) => ::fidl_next::wire::Union::encode_as::<
766 ___E,
767 ::fidl_next::wire::Vector<'static, u8>,
768 >(value, 2, encoder, raw, (63, ()))?,
769
770 Self::UnknownOrdinal_(ordinal) => {
771 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
772 }
773 }
774
775 Ok(())
776 }
777 }
778
779 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WpaCredentials<'static>, ___E>
780 for &'a WpaCredentials
781 where
782 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
783 ___E: ::fidl_next::Encoder,
784 {
785 #[inline]
786 fn encode(
787 self,
788 encoder: &mut ___E,
789 out: &mut ::core::mem::MaybeUninit<crate::wire::WpaCredentials<'static>>,
790 _: (),
791 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
792 ::fidl_next::munge!(let crate::wire::WpaCredentials { raw, _phantom: _ } = out);
793
794 match self {
795 WpaCredentials::Psk(value) => {
796 ::fidl_next::wire::Union::encode_as::<___E, [u8; 32]>(
797 value,
798 1,
799 encoder,
800 raw,
801 (),
802 )?
803 }
804
805 WpaCredentials::Passphrase(value) => {
806 ::fidl_next::wire::Union::encode_as::<
807 ___E,
808 ::fidl_next::wire::Vector<'static, u8>,
809 >(value, 2, encoder, raw, (63, ()))?
810 }
811
812 WpaCredentials::UnknownOrdinal_(ordinal) => {
813 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
814 }
815 }
816
817 Ok(())
818 }
819 }
820
821 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::WpaCredentials<'static>, ___E>
822 for WpaCredentials
823 where
824 ___E: ?Sized,
825 WpaCredentials: ::fidl_next::Encode<crate::wire::WpaCredentials<'static>, ___E>,
826 {
827 #[inline]
828 fn encode_option(
829 this: ::core::option::Option<Self>,
830 encoder: &mut ___E,
831 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::WpaCredentials<'static>>,
832 _: (),
833 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
834 ::fidl_next::munge!(let crate::wire_optional::WpaCredentials { raw, _phantom: _ } = &mut *out);
835
836 if let Some(inner) = this {
837 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
838 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
839 } else {
840 ::fidl_next::wire::Union::encode_absent(raw);
841 }
842
843 Ok(())
844 }
845 }
846
847 unsafe impl<'a, ___E>
848 ::fidl_next::EncodeOption<crate::wire_optional::WpaCredentials<'static>, ___E>
849 for &'a WpaCredentials
850 where
851 ___E: ?Sized,
852 &'a WpaCredentials: ::fidl_next::Encode<crate::wire::WpaCredentials<'static>, ___E>,
853 {
854 #[inline]
855 fn encode_option(
856 this: ::core::option::Option<Self>,
857 encoder: &mut ___E,
858 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::WpaCredentials<'static>>,
859 _: (),
860 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
861 ::fidl_next::munge!(let crate::wire_optional::WpaCredentials { raw, _phantom: _ } = &mut *out);
862
863 if let Some(inner) = this {
864 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
865 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
866 } else {
867 ::fidl_next::wire::Union::encode_absent(raw);
868 }
869
870 Ok(())
871 }
872 }
873
874 impl<'de> ::fidl_next::FromWire<crate::wire::WpaCredentials<'de>> for WpaCredentials {
875 #[inline]
876 fn from_wire(wire: crate::wire::WpaCredentials<'de>) -> Self {
877 let wire = ::core::mem::ManuallyDrop::new(wire);
878 match wire.raw.ordinal() {
879 1 => Self::Psk(::fidl_next::FromWire::from_wire(unsafe {
880 wire.raw.get().read_unchecked::<[u8; 32]>()
881 })),
882
883 2 => Self::Passphrase(::fidl_next::FromWire::from_wire(unsafe {
884 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
885 })),
886
887 ord => return Self::UnknownOrdinal_(ord as u64),
888 }
889 }
890 }
891
892 impl<'de> ::fidl_next::FromWireRef<crate::wire::WpaCredentials<'de>> for WpaCredentials {
893 #[inline]
894 fn from_wire_ref(wire: &crate::wire::WpaCredentials<'de>) -> Self {
895 match wire.raw.ordinal() {
896 1 => Self::Psk(::fidl_next::FromWireRef::from_wire_ref(unsafe {
897 wire.raw.get().deref_unchecked::<[u8; 32]>()
898 })),
899
900 2 => Self::Passphrase(::fidl_next::FromWireRef::from_wire_ref(unsafe {
901 wire.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
902 })),
903
904 ord => return Self::UnknownOrdinal_(ord as u64),
905 }
906 }
907 }
908
909 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::WpaCredentials<'de>>
910 for WpaCredentials
911 {
912 #[inline]
913 fn from_wire_option(
914 wire: crate::wire_optional::WpaCredentials<'de>,
915 ) -> ::core::option::Option<Self> {
916 if let Some(inner) = wire.into_option() {
917 Some(::fidl_next::FromWire::from_wire(inner))
918 } else {
919 None
920 }
921 }
922 }
923
924 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::WpaCredentials<'de>>
925 for Box<WpaCredentials>
926 {
927 #[inline]
928 fn from_wire_option(
929 wire: crate::wire_optional::WpaCredentials<'de>,
930 ) -> ::core::option::Option<Self> {
931 <WpaCredentials as ::fidl_next::FromWireOption<
932 crate::wire_optional::WpaCredentials<'de>,
933 >>::from_wire_option(wire)
934 .map(Box::new)
935 }
936 }
937
938 impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::WpaCredentials<'de>>
939 for Box<WpaCredentials>
940 {
941 #[inline]
942 fn from_wire_option_ref(
943 wire: &crate::wire_optional::WpaCredentials<'de>,
944 ) -> ::core::option::Option<Self> {
945 if let Some(inner) = wire.as_ref() {
946 Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
947 } else {
948 None
949 }
950 }
951 }
952
953 #[doc = " Credentials used to authenticate with a WLAN.\n\n The variants of this union describe the credentials supported by a protocol\n or protocol suite (i.e., WEP and WPA).\n"]
954 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
955 pub enum Credentials {
956 Wep(crate::natural::WepCredentials),
957
958 Wpa(crate::natural::WpaCredentials),
959
960 UnknownOrdinal_(u64),
961 }
962
963 impl Credentials {
964 pub fn is_unknown(&self) -> bool {
965 #[allow(unreachable_patterns)]
966 match self {
967 Self::UnknownOrdinal_(_) => true,
968 _ => false,
969 }
970 }
971 }
972
973 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Credentials<'static>, ___E> for Credentials
974 where
975 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
976 ___E: ::fidl_next::Encoder,
977 {
978 #[inline]
979 fn encode(
980 self,
981 encoder: &mut ___E,
982 out: &mut ::core::mem::MaybeUninit<crate::wire::Credentials<'static>>,
983 _: (),
984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
985 ::fidl_next::munge!(let crate::wire::Credentials { raw, _phantom: _ } = out);
986
987 match self {
988 Self::Wep(value) => ::fidl_next::wire::Union::encode_as::<
989 ___E,
990 crate::wire::WepCredentials<'static>,
991 >(value, 1, encoder, raw, ())?,
992
993 Self::Wpa(value) => ::fidl_next::wire::Union::encode_as::<
994 ___E,
995 crate::wire::WpaCredentials<'static>,
996 >(value, 2, encoder, raw, ())?,
997
998 Self::UnknownOrdinal_(ordinal) => {
999 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1000 }
1001 }
1002
1003 Ok(())
1004 }
1005 }
1006
1007 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Credentials<'static>, ___E>
1008 for &'a Credentials
1009 where
1010 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1011 ___E: ::fidl_next::Encoder,
1012 {
1013 #[inline]
1014 fn encode(
1015 self,
1016 encoder: &mut ___E,
1017 out: &mut ::core::mem::MaybeUninit<crate::wire::Credentials<'static>>,
1018 _: (),
1019 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1020 ::fidl_next::munge!(let crate::wire::Credentials { raw, _phantom: _ } = out);
1021
1022 match self {
1023 Credentials::Wep(value) => ::fidl_next::wire::Union::encode_as::<
1024 ___E,
1025 crate::wire::WepCredentials<'static>,
1026 >(value, 1, encoder, raw, ())?,
1027
1028 Credentials::Wpa(value) => ::fidl_next::wire::Union::encode_as::<
1029 ___E,
1030 crate::wire::WpaCredentials<'static>,
1031 >(value, 2, encoder, raw, ())?,
1032
1033 Credentials::UnknownOrdinal_(ordinal) => {
1034 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
1035 }
1036 }
1037
1038 Ok(())
1039 }
1040 }
1041
1042 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Credentials<'static>, ___E>
1043 for Credentials
1044 where
1045 ___E: ?Sized,
1046 Credentials: ::fidl_next::Encode<crate::wire::Credentials<'static>, ___E>,
1047 {
1048 #[inline]
1049 fn encode_option(
1050 this: ::core::option::Option<Self>,
1051 encoder: &mut ___E,
1052 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Credentials<'static>>,
1053 _: (),
1054 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1055 ::fidl_next::munge!(let crate::wire_optional::Credentials { raw, _phantom: _ } = &mut *out);
1056
1057 if let Some(inner) = this {
1058 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1059 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1060 } else {
1061 ::fidl_next::wire::Union::encode_absent(raw);
1062 }
1063
1064 Ok(())
1065 }
1066 }
1067
1068 unsafe impl<'a, ___E>
1069 ::fidl_next::EncodeOption<crate::wire_optional::Credentials<'static>, ___E>
1070 for &'a Credentials
1071 where
1072 ___E: ?Sized,
1073 &'a Credentials: ::fidl_next::Encode<crate::wire::Credentials<'static>, ___E>,
1074 {
1075 #[inline]
1076 fn encode_option(
1077 this: ::core::option::Option<Self>,
1078 encoder: &mut ___E,
1079 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Credentials<'static>>,
1080 _: (),
1081 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1082 ::fidl_next::munge!(let crate::wire_optional::Credentials { raw, _phantom: _ } = &mut *out);
1083
1084 if let Some(inner) = this {
1085 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1086 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1087 } else {
1088 ::fidl_next::wire::Union::encode_absent(raw);
1089 }
1090
1091 Ok(())
1092 }
1093 }
1094
1095 impl<'de> ::fidl_next::FromWire<crate::wire::Credentials<'de>> for Credentials {
1096 #[inline]
1097 fn from_wire(wire: crate::wire::Credentials<'de>) -> Self {
1098 let wire = ::core::mem::ManuallyDrop::new(wire);
1099 match wire.raw.ordinal() {
1100 1 => Self::Wep(::fidl_next::FromWire::from_wire(unsafe {
1101 wire.raw.get().read_unchecked::<crate::wire::WepCredentials<'de>>()
1102 })),
1103
1104 2 => Self::Wpa(::fidl_next::FromWire::from_wire(unsafe {
1105 wire.raw.get().read_unchecked::<crate::wire::WpaCredentials<'de>>()
1106 })),
1107
1108 ord => return Self::UnknownOrdinal_(ord as u64),
1109 }
1110 }
1111 }
1112
1113 impl<'de> ::fidl_next::FromWireRef<crate::wire::Credentials<'de>> for Credentials {
1114 #[inline]
1115 fn from_wire_ref(wire: &crate::wire::Credentials<'de>) -> Self {
1116 match wire.raw.ordinal() {
1117 1 => Self::Wep(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1118 wire.raw.get().deref_unchecked::<crate::wire::WepCredentials<'de>>()
1119 })),
1120
1121 2 => Self::Wpa(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1122 wire.raw.get().deref_unchecked::<crate::wire::WpaCredentials<'de>>()
1123 })),
1124
1125 ord => return Self::UnknownOrdinal_(ord as u64),
1126 }
1127 }
1128 }
1129
1130 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Credentials<'de>> for Credentials {
1131 #[inline]
1132 fn from_wire_option(
1133 wire: crate::wire_optional::Credentials<'de>,
1134 ) -> ::core::option::Option<Self> {
1135 if let Some(inner) = wire.into_option() {
1136 Some(::fidl_next::FromWire::from_wire(inner))
1137 } else {
1138 None
1139 }
1140 }
1141 }
1142
1143 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Credentials<'de>> for Box<Credentials> {
1144 #[inline]
1145 fn from_wire_option(
1146 wire: crate::wire_optional::Credentials<'de>,
1147 ) -> ::core::option::Option<Self> {
1148 <
1149 Credentials as ::fidl_next::FromWireOption<crate::wire_optional::Credentials<'de>>
1150 >::from_wire_option(wire).map(Box::new)
1151 }
1152 }
1153
1154 impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::Credentials<'de>>
1155 for Box<Credentials>
1156 {
1157 #[inline]
1158 fn from_wire_option_ref(
1159 wire: &crate::wire_optional::Credentials<'de>,
1160 ) -> ::core::option::Option<Self> {
1161 if let Some(inner) = wire.as_ref() {
1162 Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
1163 } else {
1164 None
1165 }
1166 }
1167 }
1168
1169 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1170 #[repr(u8)]
1171 pub enum CriticalErrorReason {
1172 FwCrash = 1,
1173 }
1174 impl ::core::convert::TryFrom<u8> for CriticalErrorReason {
1175 type Error = ::fidl_next::UnknownStrictEnumMemberError;
1176 fn try_from(
1177 value: u8,
1178 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
1179 match value {
1180 1 => Ok(Self::FwCrash),
1181
1182 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
1183 }
1184 }
1185 }
1186
1187 impl ::std::convert::From<CriticalErrorReason> for u8 {
1188 fn from(value: CriticalErrorReason) -> Self {
1189 match value {
1190 CriticalErrorReason::FwCrash => 1,
1191 }
1192 }
1193 }
1194
1195 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CriticalErrorReason, ___E>
1196 for CriticalErrorReason
1197 where
1198 ___E: ?Sized,
1199 {
1200 #[inline]
1201 fn encode(
1202 self,
1203 encoder: &mut ___E,
1204 out: &mut ::core::mem::MaybeUninit<crate::wire::CriticalErrorReason>,
1205 _: (),
1206 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1207 ::fidl_next::Encode::encode(&self, encoder, out, ())
1208 }
1209 }
1210
1211 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::CriticalErrorReason, ___E>
1212 for &'a CriticalErrorReason
1213 where
1214 ___E: ?Sized,
1215 {
1216 #[inline]
1217 fn encode(
1218 self,
1219 encoder: &mut ___E,
1220 out: &mut ::core::mem::MaybeUninit<crate::wire::CriticalErrorReason>,
1221 _: (),
1222 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1223 ::fidl_next::munge!(let crate::wire::CriticalErrorReason { value } = out);
1224 let _ = value.write(u8::from(match *self {
1225 CriticalErrorReason::FwCrash => 1,
1226 }));
1227
1228 Ok(())
1229 }
1230 }
1231
1232 impl ::core::convert::From<crate::wire::CriticalErrorReason> for CriticalErrorReason {
1233 fn from(wire: crate::wire::CriticalErrorReason) -> Self {
1234 match u8::from(wire.value) {
1235 1 => Self::FwCrash,
1236
1237 _ => unsafe { ::core::hint::unreachable_unchecked() },
1238 }
1239 }
1240 }
1241
1242 impl ::fidl_next::FromWire<crate::wire::CriticalErrorReason> for CriticalErrorReason {
1243 #[inline]
1244 fn from_wire(wire: crate::wire::CriticalErrorReason) -> Self {
1245 Self::from(wire)
1246 }
1247 }
1248
1249 impl ::fidl_next::FromWireRef<crate::wire::CriticalErrorReason> for CriticalErrorReason {
1250 #[inline]
1251 fn from_wire_ref(wire: &crate::wire::CriticalErrorReason) -> Self {
1252 Self::from(*wire)
1253 }
1254 }
1255
1256 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1257 pub struct OwePublicKey {
1258 pub group: u16,
1259
1260 pub key: ::std::vec::Vec<u8>,
1261 }
1262
1263 unsafe impl<___E> ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E> for OwePublicKey
1264 where
1265 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1266 ___E: ::fidl_next::Encoder,
1267 {
1268 #[inline]
1269 fn encode(
1270 self,
1271 encoder_: &mut ___E,
1272 out_: &mut ::core::mem::MaybeUninit<crate::wire::OwePublicKey<'static>>,
1273 _: (),
1274 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1275 ::fidl_next::munge! {
1276 let crate::wire::OwePublicKey {
1277 group,
1278 key,
1279
1280 } = out_;
1281 }
1282
1283 ::fidl_next::Encode::encode(self.group, encoder_, group, ())?;
1284
1285 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(group.as_mut_ptr()) };
1286
1287 ::fidl_next::Encode::encode(self.key, encoder_, key, (4294967295, ()))?;
1288
1289 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
1290 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1291
1292 Ok(())
1293 }
1294 }
1295
1296 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E>
1297 for &'a OwePublicKey
1298 where
1299 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1300 ___E: ::fidl_next::Encoder,
1301 {
1302 #[inline]
1303 fn encode(
1304 self,
1305 encoder_: &mut ___E,
1306 out_: &mut ::core::mem::MaybeUninit<crate::wire::OwePublicKey<'static>>,
1307 _: (),
1308 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1309 ::fidl_next::munge! {
1310 let crate::wire::OwePublicKey {
1311 group,
1312 key,
1313
1314 } = out_;
1315 }
1316
1317 ::fidl_next::Encode::encode(&self.group, encoder_, group, ())?;
1318
1319 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(group.as_mut_ptr()) };
1320
1321 ::fidl_next::Encode::encode(&self.key, encoder_, key, (4294967295, ()))?;
1322
1323 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
1324 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1325
1326 Ok(())
1327 }
1328 }
1329
1330 unsafe impl<___E>
1331 ::fidl_next::EncodeOption<
1332 ::fidl_next::wire::Box<'static, crate::wire::OwePublicKey<'static>>,
1333 ___E,
1334 > for OwePublicKey
1335 where
1336 ___E: ::fidl_next::Encoder + ?Sized,
1337 OwePublicKey: ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E>,
1338 {
1339 #[inline]
1340 fn encode_option(
1341 this: ::core::option::Option<Self>,
1342 encoder: &mut ___E,
1343 out: &mut ::core::mem::MaybeUninit<
1344 ::fidl_next::wire::Box<'static, crate::wire::OwePublicKey<'static>>,
1345 >,
1346 _: (),
1347 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1348 if let Some(inner) = this {
1349 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1350 ::fidl_next::wire::Box::encode_present(out);
1351 } else {
1352 ::fidl_next::wire::Box::encode_absent(out);
1353 }
1354
1355 Ok(())
1356 }
1357 }
1358
1359 unsafe impl<'a, ___E>
1360 ::fidl_next::EncodeOption<
1361 ::fidl_next::wire::Box<'static, crate::wire::OwePublicKey<'static>>,
1362 ___E,
1363 > for &'a OwePublicKey
1364 where
1365 ___E: ::fidl_next::Encoder + ?Sized,
1366 &'a OwePublicKey: ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E>,
1367 {
1368 #[inline]
1369 fn encode_option(
1370 this: ::core::option::Option<Self>,
1371 encoder: &mut ___E,
1372 out: &mut ::core::mem::MaybeUninit<
1373 ::fidl_next::wire::Box<'static, crate::wire::OwePublicKey<'static>>,
1374 >,
1375 _: (),
1376 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1377 if let Some(inner) = this {
1378 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1379 ::fidl_next::wire::Box::encode_present(out);
1380 } else {
1381 ::fidl_next::wire::Box::encode_absent(out);
1382 }
1383
1384 Ok(())
1385 }
1386 }
1387
1388 impl<'de> ::fidl_next::FromWire<crate::wire::OwePublicKey<'de>> for OwePublicKey {
1389 #[inline]
1390 fn from_wire(wire: crate::wire::OwePublicKey<'de>) -> Self {
1391 Self {
1392 group: ::fidl_next::FromWire::from_wire(wire.group),
1393
1394 key: ::fidl_next::FromWire::from_wire(wire.key),
1395 }
1396 }
1397 }
1398
1399 impl<'de> ::fidl_next::FromWireRef<crate::wire::OwePublicKey<'de>> for OwePublicKey {
1400 #[inline]
1401 fn from_wire_ref(wire: &crate::wire::OwePublicKey<'de>) -> Self {
1402 Self {
1403 group: ::fidl_next::FromWireRef::from_wire_ref(&wire.group),
1404
1405 key: ::fidl_next::FromWireRef::from_wire_ref(&wire.key),
1406 }
1407 }
1408 }
1409
1410 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1411 pub struct SignalReportIndication {
1412 pub rssi_dbm: ::core::option::Option<i8>,
1413
1414 pub snr_db: ::core::option::Option<i8>,
1415
1416 pub tx_rate_500kbps: ::core::option::Option<u32>,
1417
1418 pub rx_rate_500kbps: ::core::option::Option<u32>,
1419 }
1420
1421 impl SignalReportIndication {
1422 fn __max_ordinal(&self) -> usize {
1423 if self.rx_rate_500kbps.is_some() {
1424 return 4;
1425 }
1426
1427 if self.tx_rate_500kbps.is_some() {
1428 return 3;
1429 }
1430
1431 if self.snr_db.is_some() {
1432 return 2;
1433 }
1434
1435 if self.rssi_dbm.is_some() {
1436 return 1;
1437 }
1438
1439 0
1440 }
1441 }
1442
1443 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SignalReportIndication<'static>, ___E>
1444 for SignalReportIndication
1445 where
1446 ___E: ::fidl_next::Encoder + ?Sized,
1447 {
1448 #[inline]
1449 fn encode(
1450 mut self,
1451 encoder: &mut ___E,
1452 out: &mut ::core::mem::MaybeUninit<crate::wire::SignalReportIndication<'static>>,
1453 _: (),
1454 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1455 ::fidl_next::munge!(let crate::wire::SignalReportIndication { table } = out);
1456
1457 let max_ord = self.__max_ordinal();
1458
1459 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1460 ::fidl_next::Wire::zero_padding(&mut out);
1461
1462 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1463 ::fidl_next::wire::Envelope,
1464 >(encoder, max_ord);
1465
1466 for i in 1..=max_ord {
1467 match i {
1468 4 => {
1469 if let Some(value) = self.rx_rate_500kbps.take() {
1470 ::fidl_next::wire::Envelope::encode_value::<
1471 ::fidl_next::wire::Uint32,
1472 ___E,
1473 >(
1474 value, preallocated.encoder, &mut out, ()
1475 )?;
1476 } else {
1477 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1478 }
1479 }
1480
1481 3 => {
1482 if let Some(value) = self.tx_rate_500kbps.take() {
1483 ::fidl_next::wire::Envelope::encode_value::<
1484 ::fidl_next::wire::Uint32,
1485 ___E,
1486 >(
1487 value, preallocated.encoder, &mut out, ()
1488 )?;
1489 } else {
1490 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1491 }
1492 }
1493
1494 2 => {
1495 if let Some(value) = self.snr_db.take() {
1496 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
1497 value,
1498 preallocated.encoder,
1499 &mut out,
1500 (),
1501 )?;
1502 } else {
1503 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1504 }
1505 }
1506
1507 1 => {
1508 if let Some(value) = self.rssi_dbm.take() {
1509 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
1510 value,
1511 preallocated.encoder,
1512 &mut out,
1513 (),
1514 )?;
1515 } else {
1516 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1517 }
1518 }
1519
1520 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1521 }
1522 unsafe {
1523 preallocated.write_next(out.assume_init_ref());
1524 }
1525 }
1526
1527 ::fidl_next::wire::Table::encode_len(table, max_ord);
1528
1529 Ok(())
1530 }
1531 }
1532
1533 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SignalReportIndication<'static>, ___E>
1534 for &'a SignalReportIndication
1535 where
1536 ___E: ::fidl_next::Encoder + ?Sized,
1537 {
1538 #[inline]
1539 fn encode(
1540 self,
1541 encoder: &mut ___E,
1542 out: &mut ::core::mem::MaybeUninit<crate::wire::SignalReportIndication<'static>>,
1543 _: (),
1544 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1545 ::fidl_next::munge!(let crate::wire::SignalReportIndication { table } = out);
1546
1547 let max_ord = self.__max_ordinal();
1548
1549 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1550 ::fidl_next::Wire::zero_padding(&mut out);
1551
1552 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1553 ::fidl_next::wire::Envelope,
1554 >(encoder, max_ord);
1555
1556 for i in 1..=max_ord {
1557 match i {
1558 4 => {
1559 if let Some(value) = &self.rx_rate_500kbps {
1560 ::fidl_next::wire::Envelope::encode_value::<
1561 ::fidl_next::wire::Uint32,
1562 ___E,
1563 >(
1564 value, preallocated.encoder, &mut out, ()
1565 )?;
1566 } else {
1567 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1568 }
1569 }
1570
1571 3 => {
1572 if let Some(value) = &self.tx_rate_500kbps {
1573 ::fidl_next::wire::Envelope::encode_value::<
1574 ::fidl_next::wire::Uint32,
1575 ___E,
1576 >(
1577 value, preallocated.encoder, &mut out, ()
1578 )?;
1579 } else {
1580 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1581 }
1582 }
1583
1584 2 => {
1585 if let Some(value) = &self.snr_db {
1586 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
1587 value,
1588 preallocated.encoder,
1589 &mut out,
1590 (),
1591 )?;
1592 } else {
1593 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1594 }
1595 }
1596
1597 1 => {
1598 if let Some(value) = &self.rssi_dbm {
1599 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
1600 value,
1601 preallocated.encoder,
1602 &mut out,
1603 (),
1604 )?;
1605 } else {
1606 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1607 }
1608 }
1609
1610 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1611 }
1612 unsafe {
1613 preallocated.write_next(out.assume_init_ref());
1614 }
1615 }
1616
1617 ::fidl_next::wire::Table::encode_len(table, max_ord);
1618
1619 Ok(())
1620 }
1621 }
1622
1623 impl<'de> ::fidl_next::FromWire<crate::wire::SignalReportIndication<'de>>
1624 for SignalReportIndication
1625 {
1626 #[inline]
1627 fn from_wire(wire_: crate::wire::SignalReportIndication<'de>) -> Self {
1628 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1629
1630 let rssi_dbm = wire_.table.get(1);
1631
1632 let snr_db = wire_.table.get(2);
1633
1634 let tx_rate_500kbps = wire_.table.get(3);
1635
1636 let rx_rate_500kbps = wire_.table.get(4);
1637
1638 Self {
1639 rssi_dbm: rssi_dbm.map(|envelope| {
1640 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<i8>() })
1641 }),
1642
1643 snr_db: snr_db.map(|envelope| {
1644 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<i8>() })
1645 }),
1646
1647 tx_rate_500kbps: tx_rate_500kbps.map(|envelope| {
1648 ::fidl_next::FromWire::from_wire(unsafe {
1649 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
1650 })
1651 }),
1652
1653 rx_rate_500kbps: rx_rate_500kbps.map(|envelope| {
1654 ::fidl_next::FromWire::from_wire(unsafe {
1655 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
1656 })
1657 }),
1658 }
1659 }
1660 }
1661
1662 impl<'de> ::fidl_next::FromWireRef<crate::wire::SignalReportIndication<'de>>
1663 for SignalReportIndication
1664 {
1665 #[inline]
1666 fn from_wire_ref(wire: &crate::wire::SignalReportIndication<'de>) -> Self {
1667 Self {
1668 rssi_dbm: wire.table.get(1).map(|envelope| {
1669 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1670 envelope.deref_unchecked::<i8>()
1671 })
1672 }),
1673
1674 snr_db: wire.table.get(2).map(|envelope| {
1675 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1676 envelope.deref_unchecked::<i8>()
1677 })
1678 }),
1679
1680 tx_rate_500kbps: wire.table.get(3).map(|envelope| {
1681 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1682 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
1683 })
1684 }),
1685
1686 rx_rate_500kbps: wire.table.get(4).map(|envelope| {
1687 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1688 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
1689 })
1690 }),
1691 }
1692 }
1693 }
1694
1695 #[doc = " Specific absorption rate scenarios that can be applied to WLAN PHY devices.\n"]
1696 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1697 #[repr(u32)]
1698 pub enum TxPowerScenario {
1699 Default = 0,
1700 VoiceCall = 1,
1701 HeadCellOff = 2,
1702 HeadCellOn = 3,
1703 BodyCellOff = 4,
1704 BodyCellOn = 5,
1705 BodyBtActive = 6,
1706 UnknownOrdinal_(u32) = 7,
1707 }
1708 impl ::std::convert::From<u32> for TxPowerScenario {
1709 fn from(value: u32) -> Self {
1710 match value {
1711 0 => Self::Default,
1712 1 => Self::VoiceCall,
1713 2 => Self::HeadCellOff,
1714 3 => Self::HeadCellOn,
1715 4 => Self::BodyCellOff,
1716 5 => Self::BodyCellOn,
1717 6 => Self::BodyBtActive,
1718
1719 _ => Self::UnknownOrdinal_(value),
1720 }
1721 }
1722 }
1723
1724 impl ::std::convert::From<TxPowerScenario> for u32 {
1725 fn from(value: TxPowerScenario) -> Self {
1726 match value {
1727 TxPowerScenario::Default => 0,
1728 TxPowerScenario::VoiceCall => 1,
1729 TxPowerScenario::HeadCellOff => 2,
1730 TxPowerScenario::HeadCellOn => 3,
1731 TxPowerScenario::BodyCellOff => 4,
1732 TxPowerScenario::BodyCellOn => 5,
1733 TxPowerScenario::BodyBtActive => 6,
1734
1735 TxPowerScenario::UnknownOrdinal_(value) => value,
1736 }
1737 }
1738 }
1739
1740 unsafe impl<___E> ::fidl_next::Encode<crate::wire::TxPowerScenario, ___E> for TxPowerScenario
1741 where
1742 ___E: ?Sized,
1743 {
1744 #[inline]
1745 fn encode(
1746 self,
1747 encoder: &mut ___E,
1748 out: &mut ::core::mem::MaybeUninit<crate::wire::TxPowerScenario>,
1749 _: (),
1750 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1751 ::fidl_next::Encode::encode(&self, encoder, out, ())
1752 }
1753 }
1754
1755 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TxPowerScenario, ___E>
1756 for &'a TxPowerScenario
1757 where
1758 ___E: ?Sized,
1759 {
1760 #[inline]
1761 fn encode(
1762 self,
1763 encoder: &mut ___E,
1764 out: &mut ::core::mem::MaybeUninit<crate::wire::TxPowerScenario>,
1765 _: (),
1766 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1767 ::fidl_next::munge!(let crate::wire::TxPowerScenario { value } = out);
1768 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1769 TxPowerScenario::Default => 0,
1770
1771 TxPowerScenario::VoiceCall => 1,
1772
1773 TxPowerScenario::HeadCellOff => 2,
1774
1775 TxPowerScenario::HeadCellOn => 3,
1776
1777 TxPowerScenario::BodyCellOff => 4,
1778
1779 TxPowerScenario::BodyCellOn => 5,
1780
1781 TxPowerScenario::BodyBtActive => 6,
1782
1783 TxPowerScenario::UnknownOrdinal_(value) => value,
1784 }));
1785
1786 Ok(())
1787 }
1788 }
1789
1790 impl ::core::convert::From<crate::wire::TxPowerScenario> for TxPowerScenario {
1791 fn from(wire: crate::wire::TxPowerScenario) -> Self {
1792 match u32::from(wire.value) {
1793 0 => Self::Default,
1794
1795 1 => Self::VoiceCall,
1796
1797 2 => Self::HeadCellOff,
1798
1799 3 => Self::HeadCellOn,
1800
1801 4 => Self::BodyCellOff,
1802
1803 5 => Self::BodyCellOn,
1804
1805 6 => Self::BodyBtActive,
1806
1807 value => Self::UnknownOrdinal_(value),
1808 }
1809 }
1810 }
1811
1812 impl ::fidl_next::FromWire<crate::wire::TxPowerScenario> for TxPowerScenario {
1813 #[inline]
1814 fn from_wire(wire: crate::wire::TxPowerScenario) -> Self {
1815 Self::from(wire)
1816 }
1817 }
1818
1819 impl ::fidl_next::FromWireRef<crate::wire::TxPowerScenario> for TxPowerScenario {
1820 #[inline]
1821 fn from_wire_ref(wire: &crate::wire::TxPowerScenario) -> Self {
1822 Self::from(*wire)
1823 }
1824 }
1825
1826 #[doc = " WFA WMM v1.2, 2.2.2\n"]
1827 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1828 pub struct WmmAcParams {
1829 pub ecw_min: u8,
1830
1831 pub ecw_max: u8,
1832
1833 pub aifsn: u8,
1834
1835 pub txop_limit: u16,
1836
1837 pub acm: bool,
1838 }
1839
1840 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WmmAcParams, ___E> for WmmAcParams
1841 where
1842 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1843 {
1844 #[inline]
1845 fn encode(
1846 self,
1847 encoder_: &mut ___E,
1848 out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmAcParams>,
1849 _: (),
1850 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1851 ::fidl_next::munge! {
1852 let crate::wire::WmmAcParams {
1853 ecw_min,
1854 ecw_max,
1855 aifsn,
1856 txop_limit,
1857 acm,
1858
1859 } = out_;
1860 }
1861
1862 ::fidl_next::Encode::encode(self.ecw_min, encoder_, ecw_min, ())?;
1863
1864 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_min.as_mut_ptr()) };
1865
1866 ::fidl_next::Encode::encode(self.ecw_max, encoder_, ecw_max, ())?;
1867
1868 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_max.as_mut_ptr()) };
1869
1870 ::fidl_next::Encode::encode(self.aifsn, encoder_, aifsn, ())?;
1871
1872 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(aifsn.as_mut_ptr()) };
1873
1874 ::fidl_next::Encode::encode(self.txop_limit, encoder_, txop_limit, ())?;
1875
1876 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txop_limit.as_mut_ptr()) };
1877
1878 ::fidl_next::Encode::encode(self.acm, encoder_, acm, ())?;
1879
1880 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(acm.as_mut_ptr()) };
1881
1882 Ok(())
1883 }
1884 }
1885
1886 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WmmAcParams, ___E> for &'a WmmAcParams
1887 where
1888 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1889 {
1890 #[inline]
1891 fn encode(
1892 self,
1893 encoder_: &mut ___E,
1894 out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmAcParams>,
1895 _: (),
1896 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1897 ::fidl_next::munge! {
1898 let crate::wire::WmmAcParams {
1899 ecw_min,
1900 ecw_max,
1901 aifsn,
1902 txop_limit,
1903 acm,
1904
1905 } = out_;
1906 }
1907
1908 ::fidl_next::Encode::encode(&self.ecw_min, encoder_, ecw_min, ())?;
1909
1910 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_min.as_mut_ptr()) };
1911
1912 ::fidl_next::Encode::encode(&self.ecw_max, encoder_, ecw_max, ())?;
1913
1914 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_max.as_mut_ptr()) };
1915
1916 ::fidl_next::Encode::encode(&self.aifsn, encoder_, aifsn, ())?;
1917
1918 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(aifsn.as_mut_ptr()) };
1919
1920 ::fidl_next::Encode::encode(&self.txop_limit, encoder_, txop_limit, ())?;
1921
1922 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txop_limit.as_mut_ptr()) };
1923
1924 ::fidl_next::Encode::encode(&self.acm, encoder_, acm, ())?;
1925
1926 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(acm.as_mut_ptr()) };
1927
1928 Ok(())
1929 }
1930 }
1931
1932 unsafe impl<___E>
1933 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>, ___E>
1934 for WmmAcParams
1935 where
1936 ___E: ::fidl_next::Encoder + ?Sized,
1937 WmmAcParams: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
1938 {
1939 #[inline]
1940 fn encode_option(
1941 this: ::core::option::Option<Self>,
1942 encoder: &mut ___E,
1943 out: &mut ::core::mem::MaybeUninit<
1944 ::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>,
1945 >,
1946 _: (),
1947 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1948 if let Some(inner) = this {
1949 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1950 ::fidl_next::wire::Box::encode_present(out);
1951 } else {
1952 ::fidl_next::wire::Box::encode_absent(out);
1953 }
1954
1955 Ok(())
1956 }
1957 }
1958
1959 unsafe impl<'a, ___E>
1960 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>, ___E>
1961 for &'a WmmAcParams
1962 where
1963 ___E: ::fidl_next::Encoder + ?Sized,
1964 &'a WmmAcParams: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
1965 {
1966 #[inline]
1967 fn encode_option(
1968 this: ::core::option::Option<Self>,
1969 encoder: &mut ___E,
1970 out: &mut ::core::mem::MaybeUninit<
1971 ::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>,
1972 >,
1973 _: (),
1974 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1975 if let Some(inner) = this {
1976 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1977 ::fidl_next::wire::Box::encode_present(out);
1978 } else {
1979 ::fidl_next::wire::Box::encode_absent(out);
1980 }
1981
1982 Ok(())
1983 }
1984 }
1985
1986 impl ::fidl_next::FromWire<crate::wire::WmmAcParams> for WmmAcParams {
1987 #[inline]
1988 fn from_wire(wire: crate::wire::WmmAcParams) -> Self {
1989 Self {
1990 ecw_min: ::fidl_next::FromWire::from_wire(wire.ecw_min),
1991
1992 ecw_max: ::fidl_next::FromWire::from_wire(wire.ecw_max),
1993
1994 aifsn: ::fidl_next::FromWire::from_wire(wire.aifsn),
1995
1996 txop_limit: ::fidl_next::FromWire::from_wire(wire.txop_limit),
1997
1998 acm: ::fidl_next::FromWire::from_wire(wire.acm),
1999 }
2000 }
2001 }
2002
2003 impl ::fidl_next::FromWireRef<crate::wire::WmmAcParams> for WmmAcParams {
2004 #[inline]
2005 fn from_wire_ref(wire: &crate::wire::WmmAcParams) -> Self {
2006 Self {
2007 ecw_min: ::fidl_next::FromWireRef::from_wire_ref(&wire.ecw_min),
2008
2009 ecw_max: ::fidl_next::FromWireRef::from_wire_ref(&wire.ecw_max),
2010
2011 aifsn: ::fidl_next::FromWireRef::from_wire_ref(&wire.aifsn),
2012
2013 txop_limit: ::fidl_next::FromWireRef::from_wire_ref(&wire.txop_limit),
2014
2015 acm: ::fidl_next::FromWireRef::from_wire_ref(&wire.acm),
2016 }
2017 }
2018 }
2019
2020 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2021 pub struct WmmStatusResponse {
2022 pub apsd: bool,
2023
2024 pub ac_be_params: crate::natural::WmmAcParams,
2025
2026 pub ac_bk_params: crate::natural::WmmAcParams,
2027
2028 pub ac_vi_params: crate::natural::WmmAcParams,
2029
2030 pub ac_vo_params: crate::natural::WmmAcParams,
2031 }
2032
2033 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E> for WmmStatusResponse
2034 where
2035 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2036 {
2037 #[inline]
2038 fn encode(
2039 self,
2040 encoder_: &mut ___E,
2041 out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmStatusResponse>,
2042 _: (),
2043 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2044 ::fidl_next::munge! {
2045 let crate::wire::WmmStatusResponse {
2046 apsd,
2047 ac_be_params,
2048 ac_bk_params,
2049 ac_vi_params,
2050 ac_vo_params,
2051
2052 } = out_;
2053 }
2054
2055 ::fidl_next::Encode::encode(self.apsd, encoder_, apsd, ())?;
2056
2057 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(apsd.as_mut_ptr()) };
2058
2059 ::fidl_next::Encode::encode(self.ac_be_params, encoder_, ac_be_params, ())?;
2060
2061 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_be_params.as_mut_ptr()) };
2062
2063 ::fidl_next::Encode::encode(self.ac_bk_params, encoder_, ac_bk_params, ())?;
2064
2065 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_bk_params.as_mut_ptr()) };
2066
2067 ::fidl_next::Encode::encode(self.ac_vi_params, encoder_, ac_vi_params, ())?;
2068
2069 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vi_params.as_mut_ptr()) };
2070
2071 ::fidl_next::Encode::encode(self.ac_vo_params, encoder_, ac_vo_params, ())?;
2072
2073 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vo_params.as_mut_ptr()) };
2074
2075 Ok(())
2076 }
2077 }
2078
2079 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>
2080 for &'a WmmStatusResponse
2081 where
2082 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2083 {
2084 #[inline]
2085 fn encode(
2086 self,
2087 encoder_: &mut ___E,
2088 out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmStatusResponse>,
2089 _: (),
2090 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2091 ::fidl_next::munge! {
2092 let crate::wire::WmmStatusResponse {
2093 apsd,
2094 ac_be_params,
2095 ac_bk_params,
2096 ac_vi_params,
2097 ac_vo_params,
2098
2099 } = out_;
2100 }
2101
2102 ::fidl_next::Encode::encode(&self.apsd, encoder_, apsd, ())?;
2103
2104 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(apsd.as_mut_ptr()) };
2105
2106 ::fidl_next::Encode::encode(&self.ac_be_params, encoder_, ac_be_params, ())?;
2107
2108 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_be_params.as_mut_ptr()) };
2109
2110 ::fidl_next::Encode::encode(&self.ac_bk_params, encoder_, ac_bk_params, ())?;
2111
2112 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_bk_params.as_mut_ptr()) };
2113
2114 ::fidl_next::Encode::encode(&self.ac_vi_params, encoder_, ac_vi_params, ())?;
2115
2116 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vi_params.as_mut_ptr()) };
2117
2118 ::fidl_next::Encode::encode(&self.ac_vo_params, encoder_, ac_vo_params, ())?;
2119
2120 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vo_params.as_mut_ptr()) };
2121
2122 Ok(())
2123 }
2124 }
2125
2126 unsafe impl<___E>
2127 ::fidl_next::EncodeOption<
2128 ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2129 ___E,
2130 > for WmmStatusResponse
2131 where
2132 ___E: ::fidl_next::Encoder + ?Sized,
2133 WmmStatusResponse: ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>,
2134 {
2135 #[inline]
2136 fn encode_option(
2137 this: ::core::option::Option<Self>,
2138 encoder: &mut ___E,
2139 out: &mut ::core::mem::MaybeUninit<
2140 ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2141 >,
2142 _: (),
2143 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2144 if let Some(inner) = this {
2145 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2146 ::fidl_next::wire::Box::encode_present(out);
2147 } else {
2148 ::fidl_next::wire::Box::encode_absent(out);
2149 }
2150
2151 Ok(())
2152 }
2153 }
2154
2155 unsafe impl<'a, ___E>
2156 ::fidl_next::EncodeOption<
2157 ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2158 ___E,
2159 > for &'a WmmStatusResponse
2160 where
2161 ___E: ::fidl_next::Encoder + ?Sized,
2162 &'a WmmStatusResponse: ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>,
2163 {
2164 #[inline]
2165 fn encode_option(
2166 this: ::core::option::Option<Self>,
2167 encoder: &mut ___E,
2168 out: &mut ::core::mem::MaybeUninit<
2169 ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2170 >,
2171 _: (),
2172 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2173 if let Some(inner) = this {
2174 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2175 ::fidl_next::wire::Box::encode_present(out);
2176 } else {
2177 ::fidl_next::wire::Box::encode_absent(out);
2178 }
2179
2180 Ok(())
2181 }
2182 }
2183
2184 impl ::fidl_next::FromWire<crate::wire::WmmStatusResponse> for WmmStatusResponse {
2185 #[inline]
2186 fn from_wire(wire: crate::wire::WmmStatusResponse) -> Self {
2187 Self {
2188 apsd: ::fidl_next::FromWire::from_wire(wire.apsd),
2189
2190 ac_be_params: ::fidl_next::FromWire::from_wire(wire.ac_be_params),
2191
2192 ac_bk_params: ::fidl_next::FromWire::from_wire(wire.ac_bk_params),
2193
2194 ac_vi_params: ::fidl_next::FromWire::from_wire(wire.ac_vi_params),
2195
2196 ac_vo_params: ::fidl_next::FromWire::from_wire(wire.ac_vo_params),
2197 }
2198 }
2199 }
2200
2201 impl ::fidl_next::FromWireRef<crate::wire::WmmStatusResponse> for WmmStatusResponse {
2202 #[inline]
2203 fn from_wire_ref(wire: &crate::wire::WmmStatusResponse) -> Self {
2204 Self {
2205 apsd: ::fidl_next::FromWireRef::from_wire_ref(&wire.apsd),
2206
2207 ac_be_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_be_params),
2208
2209 ac_bk_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_bk_params),
2210
2211 ac_vi_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_vi_params),
2212
2213 ac_vo_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_vo_params),
2214 }
2215 }
2216 }
2217}
2218
2219pub mod wire {
2220
2221 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2223 #[repr(transparent)]
2224 pub struct Protocol {
2225 pub(crate) value: ::fidl_next::wire::Uint32,
2226 }
2227
2228 impl ::fidl_next::Constrained for Protocol {
2229 type Constraint = ();
2230
2231 fn validate(
2232 _: ::fidl_next::Slot<'_, Self>,
2233 _: Self::Constraint,
2234 ) -> Result<(), ::fidl_next::ValidationError> {
2235 Ok(())
2236 }
2237 }
2238
2239 unsafe impl ::fidl_next::Wire for Protocol {
2240 type Narrowed<'de> = Self;
2241
2242 #[inline]
2243 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2244 }
2246 }
2247
2248 impl Protocol {
2249 pub const OPEN: Protocol = Protocol { value: ::fidl_next::wire::Uint32(1) };
2250
2251 pub const WEP: Protocol = Protocol { value: ::fidl_next::wire::Uint32(2) };
2252
2253 pub const WPA1: Protocol = Protocol { value: ::fidl_next::wire::Uint32(3) };
2254
2255 pub const WPA2_PERSONAL: Protocol = Protocol { value: ::fidl_next::wire::Uint32(4) };
2256
2257 pub const WPA2_ENTERPRISE: Protocol = Protocol { value: ::fidl_next::wire::Uint32(5) };
2258
2259 pub const WPA3_PERSONAL: Protocol = Protocol { value: ::fidl_next::wire::Uint32(6) };
2260
2261 pub const WPA3_ENTERPRISE: Protocol = Protocol { value: ::fidl_next::wire::Uint32(7) };
2262
2263 pub const OWE: Protocol = Protocol { value: ::fidl_next::wire::Uint32(8) };
2264 }
2265
2266 unsafe impl<___D> ::fidl_next::Decode<___D> for Protocol
2267 where
2268 ___D: ?Sized,
2269 {
2270 fn decode(
2271 slot: ::fidl_next::Slot<'_, Self>,
2272 _: &mut ___D,
2273 _: (),
2274 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2275 Ok(())
2276 }
2277 }
2278
2279 impl ::core::convert::From<crate::natural::Protocol> for Protocol {
2280 fn from(natural: crate::natural::Protocol) -> Self {
2281 match natural {
2282 crate::natural::Protocol::Open => Protocol::OPEN,
2283
2284 crate::natural::Protocol::Wep => Protocol::WEP,
2285
2286 crate::natural::Protocol::Wpa1 => Protocol::WPA1,
2287
2288 crate::natural::Protocol::Wpa2Personal => Protocol::WPA2_PERSONAL,
2289
2290 crate::natural::Protocol::Wpa2Enterprise => Protocol::WPA2_ENTERPRISE,
2291
2292 crate::natural::Protocol::Wpa3Personal => Protocol::WPA3_PERSONAL,
2293
2294 crate::natural::Protocol::Wpa3Enterprise => Protocol::WPA3_ENTERPRISE,
2295
2296 crate::natural::Protocol::Owe => Protocol::OWE,
2297
2298 crate::natural::Protocol::UnknownOrdinal_(value) => {
2299 Protocol { value: ::fidl_next::wire::Uint32::from(value) }
2300 }
2301 }
2302 }
2303 }
2304
2305 impl ::fidl_next::IntoNatural for Protocol {
2306 type Natural = crate::natural::Protocol;
2307 }
2308
2309 #[derive(Debug)]
2311 #[repr(C)]
2312 pub struct Authentication<'de> {
2313 pub protocol: crate::wire::Protocol,
2314
2315 pub credentials: crate::wire_optional::Credentials<'de>,
2316 }
2317
2318 static_assertions::const_assert_eq!(std::mem::size_of::<Authentication<'_>>(), 24);
2319 static_assertions::const_assert_eq!(std::mem::align_of::<Authentication<'_>>(), 8);
2320
2321 static_assertions::const_assert_eq!(std::mem::offset_of!(Authentication<'_>, protocol), 0);
2322
2323 static_assertions::const_assert_eq!(std::mem::offset_of!(Authentication<'_>, credentials), 8);
2324
2325 impl ::fidl_next::Constrained for Authentication<'_> {
2326 type Constraint = ();
2327
2328 fn validate(
2329 _: ::fidl_next::Slot<'_, Self>,
2330 _: Self::Constraint,
2331 ) -> Result<(), ::fidl_next::ValidationError> {
2332 Ok(())
2333 }
2334 }
2335
2336 unsafe impl ::fidl_next::Wire for Authentication<'static> {
2337 type Narrowed<'de> = Authentication<'de>;
2338
2339 #[inline]
2340 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2341 ::fidl_next::munge! {
2342 let Self {
2343 protocol,
2344 credentials,
2345
2346 } = &mut *out_;
2347 }
2348
2349 ::fidl_next::Wire::zero_padding(protocol);
2350
2351 ::fidl_next::Wire::zero_padding(credentials);
2352
2353 unsafe {
2354 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2355 }
2356 }
2357 }
2358
2359 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Authentication<'de>
2360 where
2361 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2362 ___D: ::fidl_next::Decoder<'de>,
2363 {
2364 fn decode(
2365 slot_: ::fidl_next::Slot<'_, Self>,
2366 decoder_: &mut ___D,
2367 _: (),
2368 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2369 if slot_.as_bytes()[4..8] != [0u8; 4] {
2370 return Err(::fidl_next::DecodeError::InvalidPadding);
2371 }
2372
2373 ::fidl_next::munge! {
2374 let Self {
2375 mut protocol,
2376 mut credentials,
2377
2378 } = slot_;
2379 }
2380
2381 let _field = protocol.as_mut();
2382
2383 ::fidl_next::Decode::decode(protocol.as_mut(), decoder_, ())?;
2384
2385 let _field = credentials.as_mut();
2386
2387 ::fidl_next::Decode::decode(credentials.as_mut(), decoder_, ())?;
2388
2389 Ok(())
2390 }
2391 }
2392
2393 impl<'de> ::fidl_next::IntoNatural for Authentication<'de> {
2394 type Natural = crate::natural::Authentication;
2395 }
2396
2397 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2399 #[repr(transparent)]
2400 pub struct BtCoexistenceMode {
2401 pub(crate) value: ::fidl_next::wire::Uint32,
2402 }
2403
2404 impl ::fidl_next::Constrained for BtCoexistenceMode {
2405 type Constraint = ();
2406
2407 fn validate(
2408 _: ::fidl_next::Slot<'_, Self>,
2409 _: Self::Constraint,
2410 ) -> Result<(), ::fidl_next::ValidationError> {
2411 Ok(())
2412 }
2413 }
2414
2415 unsafe impl ::fidl_next::Wire for BtCoexistenceMode {
2416 type Narrowed<'de> = Self;
2417
2418 #[inline]
2419 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2420 }
2422 }
2423
2424 impl BtCoexistenceMode {
2425 pub const MODE_AUTO: BtCoexistenceMode =
2426 BtCoexistenceMode { value: ::fidl_next::wire::Uint32(1) };
2427
2428 pub const MODE_OFF: BtCoexistenceMode =
2429 BtCoexistenceMode { value: ::fidl_next::wire::Uint32(2) };
2430 }
2431
2432 unsafe impl<___D> ::fidl_next::Decode<___D> for BtCoexistenceMode
2433 where
2434 ___D: ?Sized,
2435 {
2436 fn decode(
2437 slot: ::fidl_next::Slot<'_, Self>,
2438 _: &mut ___D,
2439 _: (),
2440 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2441 ::fidl_next::munge!(let Self { value } = slot);
2442
2443 match u32::from(*value) {
2444 1 | 2 => (),
2445 unknown => {
2446 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
2447 }
2448 }
2449
2450 Ok(())
2451 }
2452 }
2453
2454 impl ::core::convert::From<crate::natural::BtCoexistenceMode> for BtCoexistenceMode {
2455 fn from(natural: crate::natural::BtCoexistenceMode) -> Self {
2456 match natural {
2457 crate::natural::BtCoexistenceMode::ModeAuto => BtCoexistenceMode::MODE_AUTO,
2458
2459 crate::natural::BtCoexistenceMode::ModeOff => BtCoexistenceMode::MODE_OFF,
2460 }
2461 }
2462 }
2463
2464 impl ::fidl_next::IntoNatural for BtCoexistenceMode {
2465 type Natural = crate::natural::BtCoexistenceMode;
2466 }
2467
2468 #[derive(Clone, Debug)]
2470 #[repr(C)]
2471 pub struct ChannelSwitchInfo {
2472 pub new_primary_channel: ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
2473
2474 pub bandwidth: ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelBandwidth,
2475
2476 pub vht_secondary_80_channel:
2477 ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
2478 }
2479
2480 static_assertions::const_assert_eq!(std::mem::size_of::<ChannelSwitchInfo>(), 12);
2481 static_assertions::const_assert_eq!(std::mem::align_of::<ChannelSwitchInfo>(), 4);
2482
2483 static_assertions::const_assert_eq!(
2484 std::mem::offset_of!(ChannelSwitchInfo, new_primary_channel),
2485 0
2486 );
2487
2488 static_assertions::const_assert_eq!(std::mem::offset_of!(ChannelSwitchInfo, bandwidth), 4);
2489
2490 static_assertions::const_assert_eq!(
2491 std::mem::offset_of!(ChannelSwitchInfo, vht_secondary_80_channel),
2492 8
2493 );
2494
2495 impl ::fidl_next::Constrained for ChannelSwitchInfo {
2496 type Constraint = ();
2497
2498 fn validate(
2499 _: ::fidl_next::Slot<'_, Self>,
2500 _: Self::Constraint,
2501 ) -> Result<(), ::fidl_next::ValidationError> {
2502 Ok(())
2503 }
2504 }
2505
2506 unsafe impl ::fidl_next::Wire for ChannelSwitchInfo {
2507 type Narrowed<'de> = ChannelSwitchInfo;
2508
2509 #[inline]
2510 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2511 ::fidl_next::munge! {
2512 let Self {
2513 new_primary_channel,
2514 bandwidth,
2515 vht_secondary_80_channel,
2516
2517 } = &mut *out_;
2518 }
2519
2520 ::fidl_next::Wire::zero_padding(new_primary_channel);
2521
2522 ::fidl_next::Wire::zero_padding(bandwidth);
2523
2524 ::fidl_next::Wire::zero_padding(vht_secondary_80_channel);
2525
2526 unsafe {
2527 out_.as_mut_ptr().cast::<u8>().add(10).write_bytes(0, 2);
2528 }
2529
2530 unsafe {
2531 out_.as_mut_ptr().cast::<u8>().add(2).write_bytes(0, 2);
2532 }
2533 }
2534 }
2535
2536 unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelSwitchInfo
2537 where
2538 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2539 {
2540 fn decode(
2541 slot_: ::fidl_next::Slot<'_, Self>,
2542 decoder_: &mut ___D,
2543 _: (),
2544 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2545 if slot_.as_bytes()[10..12] != [0u8; 2] {
2546 return Err(::fidl_next::DecodeError::InvalidPadding);
2547 }
2548
2549 if slot_.as_bytes()[2..4] != [0u8; 2] {
2550 return Err(::fidl_next::DecodeError::InvalidPadding);
2551 }
2552
2553 ::fidl_next::munge! {
2554 let Self {
2555 mut new_primary_channel,
2556 mut bandwidth,
2557 mut vht_secondary_80_channel,
2558
2559 } = slot_;
2560 }
2561
2562 let _field = new_primary_channel.as_mut();
2563
2564 ::fidl_next::Decode::decode(new_primary_channel.as_mut(), decoder_, ())?;
2565
2566 let _field = bandwidth.as_mut();
2567
2568 ::fidl_next::Decode::decode(bandwidth.as_mut(), decoder_, ())?;
2569
2570 let _field = vht_secondary_80_channel.as_mut();
2571
2572 ::fidl_next::Decode::decode(vht_secondary_80_channel.as_mut(), decoder_, ())?;
2573
2574 Ok(())
2575 }
2576 }
2577
2578 impl ::fidl_next::IntoNatural for ChannelSwitchInfo {
2579 type Natural = crate::natural::ChannelSwitchInfo;
2580 }
2581
2582 #[derive(Debug)]
2584 #[repr(C)]
2585 pub struct WepCredentials<'de> {
2586 pub key: ::fidl_next::wire::Vector<'de, u8>,
2587 }
2588
2589 static_assertions::const_assert_eq!(std::mem::size_of::<WepCredentials<'_>>(), 16);
2590 static_assertions::const_assert_eq!(std::mem::align_of::<WepCredentials<'_>>(), 8);
2591
2592 static_assertions::const_assert_eq!(std::mem::offset_of!(WepCredentials<'_>, key), 0);
2593
2594 impl ::fidl_next::Constrained for WepCredentials<'_> {
2595 type Constraint = ();
2596
2597 fn validate(
2598 _: ::fidl_next::Slot<'_, Self>,
2599 _: Self::Constraint,
2600 ) -> Result<(), ::fidl_next::ValidationError> {
2601 Ok(())
2602 }
2603 }
2604
2605 unsafe impl ::fidl_next::Wire for WepCredentials<'static> {
2606 type Narrowed<'de> = WepCredentials<'de>;
2607
2608 #[inline]
2609 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2610 ::fidl_next::munge! {
2611 let Self {
2612 key,
2613
2614 } = &mut *out_;
2615 }
2616
2617 ::fidl_next::Wire::zero_padding(key);
2618 }
2619 }
2620
2621 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WepCredentials<'de>
2622 where
2623 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2624 ___D: ::fidl_next::Decoder<'de>,
2625 {
2626 fn decode(
2627 slot_: ::fidl_next::Slot<'_, Self>,
2628 decoder_: &mut ___D,
2629 _: (),
2630 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2631 ::fidl_next::munge! {
2632 let Self {
2633 mut key,
2634
2635 } = slot_;
2636 }
2637
2638 let _field = key.as_mut();
2639 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2640 ::fidl_next::Decode::decode(key.as_mut(), decoder_, (4294967295, ()))?;
2641
2642 Ok(())
2643 }
2644 }
2645
2646 impl<'de> ::fidl_next::IntoNatural for WepCredentials<'de> {
2647 type Natural = crate::natural::WepCredentials;
2648 }
2649
2650 #[repr(transparent)]
2652 pub struct WpaCredentials<'de> {
2653 pub(crate) raw: ::fidl_next::wire::Union,
2654 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2655 }
2656
2657 impl<'de> Drop for WpaCredentials<'de> {
2658 fn drop(&mut self) {
2659 match self.raw.ordinal() {
2660 1 => {
2661 let _ = unsafe { self.raw.get().read_unchecked::<[u8; 32]>() };
2662 }
2663
2664 2 => {
2665 let _ = unsafe {
2666 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2667 };
2668 }
2669
2670 _ => (),
2671 }
2672 }
2673 }
2674
2675 impl ::fidl_next::Constrained for WpaCredentials<'_> {
2676 type Constraint = ();
2677
2678 fn validate(
2679 _: ::fidl_next::Slot<'_, Self>,
2680 _: Self::Constraint,
2681 ) -> Result<(), ::fidl_next::ValidationError> {
2682 Ok(())
2683 }
2684 }
2685
2686 unsafe impl ::fidl_next::Wire for WpaCredentials<'static> {
2687 type Narrowed<'de> = WpaCredentials<'de>;
2688
2689 #[inline]
2690 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2691 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2692 ::fidl_next::wire::Union::zero_padding(raw);
2693 }
2694 }
2695
2696 pub mod wpa_credentials {
2697 pub enum Ref<'de> {
2698 Psk(&'de [u8; 32]),
2699
2700 Passphrase(&'de ::fidl_next::wire::Vector<'de, u8>),
2701
2702 UnknownOrdinal_(u64),
2703 }
2704
2705 pub enum Value<'de> {
2706 Psk([u8; 32]),
2707
2708 Passphrase(::fidl_next::wire::Vector<'de, u8>),
2709
2710 UnknownOrdinal_(u64),
2711 }
2712 }
2713
2714 impl<'de> WpaCredentials<'de> {
2715 pub fn as_ref(&self) -> crate::wire::wpa_credentials::Ref<'_> {
2716 match self.raw.ordinal() {
2717 1 => crate::wire::wpa_credentials::Ref::Psk(unsafe {
2718 self.raw.get().deref_unchecked::<[u8; 32]>()
2719 }),
2720
2721 2 => crate::wire::wpa_credentials::Ref::Passphrase(unsafe {
2722 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
2723 }),
2724
2725 unknown => crate::wire::wpa_credentials::Ref::UnknownOrdinal_(unknown),
2726 }
2727 }
2728
2729 pub fn into_inner(self) -> crate::wire::wpa_credentials::Value<'de> {
2730 let this = ::core::mem::ManuallyDrop::new(self);
2731
2732 match this.raw.ordinal() {
2733 1 => crate::wire::wpa_credentials::Value::Psk(unsafe {
2734 this.raw.get().read_unchecked::<[u8; 32]>()
2735 }),
2736
2737 2 => crate::wire::wpa_credentials::Value::Passphrase(unsafe {
2738 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2739 }),
2740
2741 unknown => crate::wire::wpa_credentials::Value::UnknownOrdinal_(unknown),
2742 }
2743 }
2744 }
2745
2746 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WpaCredentials<'de>
2747 where
2748 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2749 ___D: ::fidl_next::Decoder<'de>,
2750 {
2751 fn decode(
2752 mut slot: ::fidl_next::Slot<'_, Self>,
2753 decoder: &mut ___D,
2754 _: (),
2755 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2756 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2757 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
2758 1 => ::fidl_next::wire::Union::decode_as::<___D, [u8; 32]>(raw, decoder, ())?,
2759
2760 2 => {
2761 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
2762 raw,
2763 decoder,
2764 (63, ()),
2765 )?
2766 }
2767
2768 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
2769 }
2770
2771 Ok(())
2772 }
2773 }
2774
2775 impl<'de> ::core::fmt::Debug for WpaCredentials<'de> {
2776 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2777 match self.raw.ordinal() {
2778 1 => unsafe { self.raw.get().deref_unchecked::<[u8; 32]>().fmt(f) },
2779 2 => unsafe {
2780 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
2781 },
2782 _ => unsafe { ::core::hint::unreachable_unchecked() },
2783 }
2784 }
2785 }
2786
2787 impl<'de> ::fidl_next::IntoNatural for WpaCredentials<'de> {
2788 type Natural = crate::natural::WpaCredentials;
2789 }
2790
2791 #[repr(transparent)]
2793 pub struct Credentials<'de> {
2794 pub(crate) raw: ::fidl_next::wire::Union,
2795 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2796 }
2797
2798 impl<'de> Drop for Credentials<'de> {
2799 fn drop(&mut self) {
2800 match self.raw.ordinal() {
2801 1 => {
2802 let _ = unsafe {
2803 self.raw.get().read_unchecked::<crate::wire::WepCredentials<'de>>()
2804 };
2805 }
2806
2807 2 => {
2808 let _ = unsafe {
2809 self.raw.get().read_unchecked::<crate::wire::WpaCredentials<'de>>()
2810 };
2811 }
2812
2813 _ => (),
2814 }
2815 }
2816 }
2817
2818 impl ::fidl_next::Constrained for Credentials<'_> {
2819 type Constraint = ();
2820
2821 fn validate(
2822 _: ::fidl_next::Slot<'_, Self>,
2823 _: Self::Constraint,
2824 ) -> Result<(), ::fidl_next::ValidationError> {
2825 Ok(())
2826 }
2827 }
2828
2829 unsafe impl ::fidl_next::Wire for Credentials<'static> {
2830 type Narrowed<'de> = Credentials<'de>;
2831
2832 #[inline]
2833 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2834 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2835 ::fidl_next::wire::Union::zero_padding(raw);
2836 }
2837 }
2838
2839 pub mod credentials {
2840 pub enum Ref<'de> {
2841 Wep(&'de crate::wire::WepCredentials<'de>),
2842
2843 Wpa(&'de crate::wire::WpaCredentials<'de>),
2844
2845 UnknownOrdinal_(u64),
2846 }
2847
2848 pub enum Value<'de> {
2849 Wep(crate::wire::WepCredentials<'de>),
2850
2851 Wpa(crate::wire::WpaCredentials<'de>),
2852
2853 UnknownOrdinal_(u64),
2854 }
2855 }
2856
2857 impl<'de> Credentials<'de> {
2858 pub fn as_ref(&self) -> crate::wire::credentials::Ref<'_> {
2859 match self.raw.ordinal() {
2860 1 => crate::wire::credentials::Ref::Wep(unsafe {
2861 self.raw.get().deref_unchecked::<crate::wire::WepCredentials<'_>>()
2862 }),
2863
2864 2 => crate::wire::credentials::Ref::Wpa(unsafe {
2865 self.raw.get().deref_unchecked::<crate::wire::WpaCredentials<'_>>()
2866 }),
2867
2868 unknown => crate::wire::credentials::Ref::UnknownOrdinal_(unknown),
2869 }
2870 }
2871
2872 pub fn into_inner(self) -> crate::wire::credentials::Value<'de> {
2873 let this = ::core::mem::ManuallyDrop::new(self);
2874
2875 match this.raw.ordinal() {
2876 1 => crate::wire::credentials::Value::Wep(unsafe {
2877 this.raw.get().read_unchecked::<crate::wire::WepCredentials<'de>>()
2878 }),
2879
2880 2 => crate::wire::credentials::Value::Wpa(unsafe {
2881 this.raw.get().read_unchecked::<crate::wire::WpaCredentials<'de>>()
2882 }),
2883
2884 unknown => crate::wire::credentials::Value::UnknownOrdinal_(unknown),
2885 }
2886 }
2887 }
2888
2889 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Credentials<'de>
2890 where
2891 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2892 ___D: ::fidl_next::Decoder<'de>,
2893 {
2894 fn decode(
2895 mut slot: ::fidl_next::Slot<'_, Self>,
2896 decoder: &mut ___D,
2897 _: (),
2898 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2899 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2900 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
2901 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WepCredentials<'de>>(
2902 raw,
2903 decoder,
2904 (),
2905 )?,
2906
2907 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WpaCredentials<'de>>(
2908 raw,
2909 decoder,
2910 (),
2911 )?,
2912
2913 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
2914 }
2915
2916 Ok(())
2917 }
2918 }
2919
2920 impl<'de> ::core::fmt::Debug for Credentials<'de> {
2921 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2922 match self.raw.ordinal() {
2923 1 => unsafe {
2924 self.raw.get().deref_unchecked::<crate::wire::WepCredentials<'_>>().fmt(f)
2925 },
2926 2 => unsafe {
2927 self.raw.get().deref_unchecked::<crate::wire::WpaCredentials<'_>>().fmt(f)
2928 },
2929 _ => unsafe { ::core::hint::unreachable_unchecked() },
2930 }
2931 }
2932 }
2933
2934 impl<'de> ::fidl_next::IntoNatural for Credentials<'de> {
2935 type Natural = crate::natural::Credentials;
2936 }
2937
2938 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2940 #[repr(transparent)]
2941 pub struct CriticalErrorReason {
2942 pub(crate) value: u8,
2943 }
2944
2945 impl ::fidl_next::Constrained for CriticalErrorReason {
2946 type Constraint = ();
2947
2948 fn validate(
2949 _: ::fidl_next::Slot<'_, Self>,
2950 _: Self::Constraint,
2951 ) -> Result<(), ::fidl_next::ValidationError> {
2952 Ok(())
2953 }
2954 }
2955
2956 unsafe impl ::fidl_next::Wire for CriticalErrorReason {
2957 type Narrowed<'de> = Self;
2958
2959 #[inline]
2960 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2961 }
2963 }
2964
2965 impl CriticalErrorReason {
2966 pub const FW_CRASH: CriticalErrorReason = CriticalErrorReason { value: 1 };
2967 }
2968
2969 unsafe impl<___D> ::fidl_next::Decode<___D> for CriticalErrorReason
2970 where
2971 ___D: ?Sized,
2972 {
2973 fn decode(
2974 slot: ::fidl_next::Slot<'_, Self>,
2975 _: &mut ___D,
2976 _: (),
2977 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2978 ::fidl_next::munge!(let Self { value } = slot);
2979
2980 match u8::from(*value) {
2981 1 => (),
2982 unknown => {
2983 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
2984 }
2985 }
2986
2987 Ok(())
2988 }
2989 }
2990
2991 impl ::core::convert::From<crate::natural::CriticalErrorReason> for CriticalErrorReason {
2992 fn from(natural: crate::natural::CriticalErrorReason) -> Self {
2993 match natural {
2994 crate::natural::CriticalErrorReason::FwCrash => CriticalErrorReason::FW_CRASH,
2995 }
2996 }
2997 }
2998
2999 impl ::fidl_next::IntoNatural for CriticalErrorReason {
3000 type Natural = crate::natural::CriticalErrorReason;
3001 }
3002
3003 #[derive(Debug)]
3005 #[repr(C)]
3006 pub struct OwePublicKey<'de> {
3007 pub group: ::fidl_next::wire::Uint16,
3008
3009 pub key: ::fidl_next::wire::Vector<'de, u8>,
3010 }
3011
3012 static_assertions::const_assert_eq!(std::mem::size_of::<OwePublicKey<'_>>(), 24);
3013 static_assertions::const_assert_eq!(std::mem::align_of::<OwePublicKey<'_>>(), 8);
3014
3015 static_assertions::const_assert_eq!(std::mem::offset_of!(OwePublicKey<'_>, group), 0);
3016
3017 static_assertions::const_assert_eq!(std::mem::offset_of!(OwePublicKey<'_>, key), 8);
3018
3019 impl ::fidl_next::Constrained for OwePublicKey<'_> {
3020 type Constraint = ();
3021
3022 fn validate(
3023 _: ::fidl_next::Slot<'_, Self>,
3024 _: Self::Constraint,
3025 ) -> Result<(), ::fidl_next::ValidationError> {
3026 Ok(())
3027 }
3028 }
3029
3030 unsafe impl ::fidl_next::Wire for OwePublicKey<'static> {
3031 type Narrowed<'de> = OwePublicKey<'de>;
3032
3033 #[inline]
3034 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3035 ::fidl_next::munge! {
3036 let Self {
3037 group,
3038 key,
3039
3040 } = &mut *out_;
3041 }
3042
3043 ::fidl_next::Wire::zero_padding(group);
3044
3045 ::fidl_next::Wire::zero_padding(key);
3046
3047 unsafe {
3048 out_.as_mut_ptr().cast::<u8>().add(2).write_bytes(0, 6);
3049 }
3050 }
3051 }
3052
3053 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OwePublicKey<'de>
3054 where
3055 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3056 ___D: ::fidl_next::Decoder<'de>,
3057 {
3058 fn decode(
3059 slot_: ::fidl_next::Slot<'_, Self>,
3060 decoder_: &mut ___D,
3061 _: (),
3062 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3063 if slot_.as_bytes()[2..8] != [0u8; 6] {
3064 return Err(::fidl_next::DecodeError::InvalidPadding);
3065 }
3066
3067 ::fidl_next::munge! {
3068 let Self {
3069 mut group,
3070 mut key,
3071
3072 } = slot_;
3073 }
3074
3075 let _field = group.as_mut();
3076
3077 ::fidl_next::Decode::decode(group.as_mut(), decoder_, ())?;
3078
3079 let _field = key.as_mut();
3080 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
3081 ::fidl_next::Decode::decode(key.as_mut(), decoder_, (4294967295, ()))?;
3082
3083 Ok(())
3084 }
3085 }
3086
3087 impl<'de> ::fidl_next::IntoNatural for OwePublicKey<'de> {
3088 type Natural = crate::natural::OwePublicKey;
3089 }
3090
3091 #[repr(C)]
3093 pub struct SignalReportIndication<'de> {
3094 pub(crate) table: ::fidl_next::wire::Table<'de>,
3095 }
3096
3097 impl<'de> Drop for SignalReportIndication<'de> {
3098 fn drop(&mut self) {
3099 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
3100
3101 let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
3102
3103 let _ = self
3104 .table
3105 .get(3)
3106 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
3107
3108 let _ = self
3109 .table
3110 .get(4)
3111 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
3112 }
3113 }
3114
3115 impl ::fidl_next::Constrained for SignalReportIndication<'_> {
3116 type Constraint = ();
3117
3118 fn validate(
3119 _: ::fidl_next::Slot<'_, Self>,
3120 _: Self::Constraint,
3121 ) -> Result<(), ::fidl_next::ValidationError> {
3122 Ok(())
3123 }
3124 }
3125
3126 unsafe impl ::fidl_next::Wire for SignalReportIndication<'static> {
3127 type Narrowed<'de> = SignalReportIndication<'de>;
3128
3129 #[inline]
3130 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3131 ::fidl_next::munge!(let Self { table } = out);
3132 ::fidl_next::wire::Table::zero_padding(table);
3133 }
3134 }
3135
3136 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SignalReportIndication<'de>
3137 where
3138 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3139 {
3140 fn decode(
3141 slot: ::fidl_next::Slot<'_, Self>,
3142 decoder: &mut ___D,
3143 _: (),
3144 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3145 ::fidl_next::munge!(let Self { table } = slot);
3146
3147 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3148 match ordinal {
3149 0 => unsafe { ::core::hint::unreachable_unchecked() },
3150
3151 1 => {
3152 ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
3153 slot.as_mut(),
3154 decoder,
3155 (),
3156 )?;
3157
3158 Ok(())
3159 }
3160
3161 2 => {
3162 ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
3163 slot.as_mut(),
3164 decoder,
3165 (),
3166 )?;
3167
3168 Ok(())
3169 }
3170
3171 3 => {
3172 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
3173 slot.as_mut(),
3174 decoder,
3175 (),
3176 )?;
3177
3178 Ok(())
3179 }
3180
3181 4 => {
3182 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
3183 slot.as_mut(),
3184 decoder,
3185 (),
3186 )?;
3187
3188 Ok(())
3189 }
3190
3191 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3192 }
3193 })
3194 }
3195 }
3196
3197 impl<'de> SignalReportIndication<'de> {
3198 pub fn rssi_dbm(&self) -> ::core::option::Option<&i8> {
3199 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3200 }
3201
3202 pub fn take_rssi_dbm(&mut self) -> ::core::option::Option<i8> {
3203 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3204 }
3205
3206 pub fn snr_db(&self) -> ::core::option::Option<&i8> {
3207 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3208 }
3209
3210 pub fn take_snr_db(&mut self) -> ::core::option::Option<i8> {
3211 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3212 }
3213
3214 pub fn tx_rate_500kbps(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
3215 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3216 }
3217
3218 pub fn take_tx_rate_500kbps(
3219 &mut self,
3220 ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
3221 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3222 }
3223
3224 pub fn rx_rate_500kbps(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
3225 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3226 }
3227
3228 pub fn take_rx_rate_500kbps(
3229 &mut self,
3230 ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
3231 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
3232 }
3233 }
3234
3235 impl<'de> ::core::fmt::Debug for SignalReportIndication<'de> {
3236 fn fmt(
3237 &self,
3238 f: &mut ::core::fmt::Formatter<'_>,
3239 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3240 f.debug_struct("SignalReportIndication")
3241 .field("rssi_dbm", &self.rssi_dbm())
3242 .field("snr_db", &self.snr_db())
3243 .field("tx_rate_500kbps", &self.tx_rate_500kbps())
3244 .field("rx_rate_500kbps", &self.rx_rate_500kbps())
3245 .finish()
3246 }
3247 }
3248
3249 impl<'de> ::fidl_next::IntoNatural for SignalReportIndication<'de> {
3250 type Natural = crate::natural::SignalReportIndication;
3251 }
3252
3253 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
3255 #[repr(transparent)]
3256 pub struct TxPowerScenario {
3257 pub(crate) value: ::fidl_next::wire::Uint32,
3258 }
3259
3260 impl ::fidl_next::Constrained for TxPowerScenario {
3261 type Constraint = ();
3262
3263 fn validate(
3264 _: ::fidl_next::Slot<'_, Self>,
3265 _: Self::Constraint,
3266 ) -> Result<(), ::fidl_next::ValidationError> {
3267 Ok(())
3268 }
3269 }
3270
3271 unsafe impl ::fidl_next::Wire for TxPowerScenario {
3272 type Narrowed<'de> = Self;
3273
3274 #[inline]
3275 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3276 }
3278 }
3279
3280 impl TxPowerScenario {
3281 pub const DEFAULT: TxPowerScenario =
3282 TxPowerScenario { value: ::fidl_next::wire::Uint32(0) };
3283
3284 pub const VOICE_CALL: TxPowerScenario =
3285 TxPowerScenario { value: ::fidl_next::wire::Uint32(1) };
3286
3287 pub const HEAD_CELL_OFF: TxPowerScenario =
3288 TxPowerScenario { value: ::fidl_next::wire::Uint32(2) };
3289
3290 pub const HEAD_CELL_ON: TxPowerScenario =
3291 TxPowerScenario { value: ::fidl_next::wire::Uint32(3) };
3292
3293 pub const BODY_CELL_OFF: TxPowerScenario =
3294 TxPowerScenario { value: ::fidl_next::wire::Uint32(4) };
3295
3296 pub const BODY_CELL_ON: TxPowerScenario =
3297 TxPowerScenario { value: ::fidl_next::wire::Uint32(5) };
3298
3299 pub const BODY_BT_ACTIVE: TxPowerScenario =
3300 TxPowerScenario { value: ::fidl_next::wire::Uint32(6) };
3301 }
3302
3303 unsafe impl<___D> ::fidl_next::Decode<___D> for TxPowerScenario
3304 where
3305 ___D: ?Sized,
3306 {
3307 fn decode(
3308 slot: ::fidl_next::Slot<'_, Self>,
3309 _: &mut ___D,
3310 _: (),
3311 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3312 Ok(())
3313 }
3314 }
3315
3316 impl ::core::convert::From<crate::natural::TxPowerScenario> for TxPowerScenario {
3317 fn from(natural: crate::natural::TxPowerScenario) -> Self {
3318 match natural {
3319 crate::natural::TxPowerScenario::Default => TxPowerScenario::DEFAULT,
3320
3321 crate::natural::TxPowerScenario::VoiceCall => TxPowerScenario::VOICE_CALL,
3322
3323 crate::natural::TxPowerScenario::HeadCellOff => TxPowerScenario::HEAD_CELL_OFF,
3324
3325 crate::natural::TxPowerScenario::HeadCellOn => TxPowerScenario::HEAD_CELL_ON,
3326
3327 crate::natural::TxPowerScenario::BodyCellOff => TxPowerScenario::BODY_CELL_OFF,
3328
3329 crate::natural::TxPowerScenario::BodyCellOn => TxPowerScenario::BODY_CELL_ON,
3330
3331 crate::natural::TxPowerScenario::BodyBtActive => TxPowerScenario::BODY_BT_ACTIVE,
3332
3333 crate::natural::TxPowerScenario::UnknownOrdinal_(value) => {
3334 TxPowerScenario { value: ::fidl_next::wire::Uint32::from(value) }
3335 }
3336 }
3337 }
3338 }
3339
3340 impl ::fidl_next::IntoNatural for TxPowerScenario {
3341 type Natural = crate::natural::TxPowerScenario;
3342 }
3343
3344 #[derive(Clone, Debug)]
3346 #[repr(C)]
3347 pub struct WmmAcParams {
3348 pub ecw_min: u8,
3349
3350 pub ecw_max: u8,
3351
3352 pub aifsn: u8,
3353
3354 pub txop_limit: ::fidl_next::wire::Uint16,
3355
3356 pub acm: bool,
3357 }
3358
3359 static_assertions::const_assert_eq!(std::mem::size_of::<WmmAcParams>(), 8);
3360 static_assertions::const_assert_eq!(std::mem::align_of::<WmmAcParams>(), 2);
3361
3362 static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, ecw_min), 0);
3363
3364 static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, ecw_max), 1);
3365
3366 static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, aifsn), 2);
3367
3368 static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, txop_limit), 4);
3369
3370 static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, acm), 6);
3371
3372 impl ::fidl_next::Constrained for WmmAcParams {
3373 type Constraint = ();
3374
3375 fn validate(
3376 _: ::fidl_next::Slot<'_, Self>,
3377 _: Self::Constraint,
3378 ) -> Result<(), ::fidl_next::ValidationError> {
3379 Ok(())
3380 }
3381 }
3382
3383 unsafe impl ::fidl_next::Wire for WmmAcParams {
3384 type Narrowed<'de> = WmmAcParams;
3385
3386 #[inline]
3387 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3388 ::fidl_next::munge! {
3389 let Self {
3390 ecw_min,
3391 ecw_max,
3392 aifsn,
3393 txop_limit,
3394 acm,
3395
3396 } = &mut *out_;
3397 }
3398
3399 ::fidl_next::Wire::zero_padding(ecw_min);
3400
3401 ::fidl_next::Wire::zero_padding(ecw_max);
3402
3403 ::fidl_next::Wire::zero_padding(aifsn);
3404
3405 ::fidl_next::Wire::zero_padding(txop_limit);
3406
3407 ::fidl_next::Wire::zero_padding(acm);
3408
3409 unsafe {
3410 out_.as_mut_ptr().cast::<u8>().add(7).write_bytes(0, 1);
3411 }
3412
3413 unsafe {
3414 out_.as_mut_ptr().cast::<u8>().add(3).write_bytes(0, 1);
3415 }
3416 }
3417 }
3418
3419 unsafe impl<___D> ::fidl_next::Decode<___D> for WmmAcParams
3420 where
3421 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3422 {
3423 fn decode(
3424 slot_: ::fidl_next::Slot<'_, Self>,
3425 decoder_: &mut ___D,
3426 _: (),
3427 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3428 if slot_.as_bytes()[7..8] != [0u8; 1] {
3429 return Err(::fidl_next::DecodeError::InvalidPadding);
3430 }
3431
3432 if slot_.as_bytes()[3..4] != [0u8; 1] {
3433 return Err(::fidl_next::DecodeError::InvalidPadding);
3434 }
3435
3436 ::fidl_next::munge! {
3437 let Self {
3438 mut ecw_min,
3439 mut ecw_max,
3440 mut aifsn,
3441 mut txop_limit,
3442 mut acm,
3443
3444 } = slot_;
3445 }
3446
3447 let _field = ecw_min.as_mut();
3448
3449 ::fidl_next::Decode::decode(ecw_min.as_mut(), decoder_, ())?;
3450
3451 let _field = ecw_max.as_mut();
3452
3453 ::fidl_next::Decode::decode(ecw_max.as_mut(), decoder_, ())?;
3454
3455 let _field = aifsn.as_mut();
3456
3457 ::fidl_next::Decode::decode(aifsn.as_mut(), decoder_, ())?;
3458
3459 let _field = txop_limit.as_mut();
3460
3461 ::fidl_next::Decode::decode(txop_limit.as_mut(), decoder_, ())?;
3462
3463 let _field = acm.as_mut();
3464
3465 ::fidl_next::Decode::decode(acm.as_mut(), decoder_, ())?;
3466
3467 Ok(())
3468 }
3469 }
3470
3471 impl ::fidl_next::IntoNatural for WmmAcParams {
3472 type Natural = crate::natural::WmmAcParams;
3473 }
3474
3475 #[derive(Clone, Debug)]
3477 #[repr(C)]
3478 pub struct WmmStatusResponse {
3479 pub apsd: bool,
3480
3481 pub ac_be_params: crate::wire::WmmAcParams,
3482
3483 pub ac_bk_params: crate::wire::WmmAcParams,
3484
3485 pub ac_vi_params: crate::wire::WmmAcParams,
3486
3487 pub ac_vo_params: crate::wire::WmmAcParams,
3488 }
3489
3490 static_assertions::const_assert_eq!(std::mem::size_of::<WmmStatusResponse>(), 34);
3491 static_assertions::const_assert_eq!(std::mem::align_of::<WmmStatusResponse>(), 2);
3492
3493 static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, apsd), 0);
3494
3495 static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_be_params), 2);
3496
3497 static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_bk_params), 10);
3498
3499 static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_vi_params), 18);
3500
3501 static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_vo_params), 26);
3502
3503 impl ::fidl_next::Constrained for WmmStatusResponse {
3504 type Constraint = ();
3505
3506 fn validate(
3507 _: ::fidl_next::Slot<'_, Self>,
3508 _: Self::Constraint,
3509 ) -> Result<(), ::fidl_next::ValidationError> {
3510 Ok(())
3511 }
3512 }
3513
3514 unsafe impl ::fidl_next::Wire for WmmStatusResponse {
3515 type Narrowed<'de> = WmmStatusResponse;
3516
3517 #[inline]
3518 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3519 ::fidl_next::munge! {
3520 let Self {
3521 apsd,
3522 ac_be_params,
3523 ac_bk_params,
3524 ac_vi_params,
3525 ac_vo_params,
3526
3527 } = &mut *out_;
3528 }
3529
3530 ::fidl_next::Wire::zero_padding(apsd);
3531
3532 ::fidl_next::Wire::zero_padding(ac_be_params);
3533
3534 ::fidl_next::Wire::zero_padding(ac_bk_params);
3535
3536 ::fidl_next::Wire::zero_padding(ac_vi_params);
3537
3538 ::fidl_next::Wire::zero_padding(ac_vo_params);
3539
3540 unsafe {
3541 out_.as_mut_ptr().cast::<u8>().add(1).write_bytes(0, 1);
3542 }
3543 }
3544 }
3545
3546 unsafe impl<___D> ::fidl_next::Decode<___D> for WmmStatusResponse
3547 where
3548 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3549 {
3550 fn decode(
3551 slot_: ::fidl_next::Slot<'_, Self>,
3552 decoder_: &mut ___D,
3553 _: (),
3554 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3555 if slot_.as_bytes()[1..2] != [0u8; 1] {
3556 return Err(::fidl_next::DecodeError::InvalidPadding);
3557 }
3558
3559 ::fidl_next::munge! {
3560 let Self {
3561 mut apsd,
3562 mut ac_be_params,
3563 mut ac_bk_params,
3564 mut ac_vi_params,
3565 mut ac_vo_params,
3566
3567 } = slot_;
3568 }
3569
3570 let _field = apsd.as_mut();
3571
3572 ::fidl_next::Decode::decode(apsd.as_mut(), decoder_, ())?;
3573
3574 let _field = ac_be_params.as_mut();
3575
3576 ::fidl_next::Decode::decode(ac_be_params.as_mut(), decoder_, ())?;
3577
3578 let _field = ac_bk_params.as_mut();
3579
3580 ::fidl_next::Decode::decode(ac_bk_params.as_mut(), decoder_, ())?;
3581
3582 let _field = ac_vi_params.as_mut();
3583
3584 ::fidl_next::Decode::decode(ac_vi_params.as_mut(), decoder_, ())?;
3585
3586 let _field = ac_vo_params.as_mut();
3587
3588 ::fidl_next::Decode::decode(ac_vo_params.as_mut(), decoder_, ())?;
3589
3590 Ok(())
3591 }
3592 }
3593
3594 impl ::fidl_next::IntoNatural for WmmStatusResponse {
3595 type Natural = crate::natural::WmmStatusResponse;
3596 }
3597}
3598
3599pub mod wire_optional {
3600
3601 #[repr(transparent)]
3602 pub struct WpaCredentials<'de> {
3603 pub(crate) raw: ::fidl_next::wire::Union,
3604 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3605 }
3606
3607 impl ::fidl_next::Constrained for WpaCredentials<'_> {
3608 type Constraint = ();
3609
3610 fn validate(
3611 _: ::fidl_next::Slot<'_, Self>,
3612 _: Self::Constraint,
3613 ) -> Result<(), ::fidl_next::ValidationError> {
3614 Ok(())
3615 }
3616 }
3617
3618 unsafe impl ::fidl_next::Wire for WpaCredentials<'static> {
3619 type Narrowed<'de> = WpaCredentials<'de>;
3620
3621 #[inline]
3622 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3623 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3624 ::fidl_next::wire::Union::zero_padding(raw);
3625 }
3626 }
3627
3628 impl<'de> WpaCredentials<'de> {
3629 pub fn is_some(&self) -> bool {
3630 self.raw.is_some()
3631 }
3632
3633 pub fn is_none(&self) -> bool {
3634 self.raw.is_none()
3635 }
3636
3637 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::WpaCredentials<'de>> {
3638 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
3639 }
3640
3641 pub fn into_option(self) -> ::core::option::Option<crate::wire::WpaCredentials<'de>> {
3642 if self.is_some() {
3643 Some(crate::wire::WpaCredentials {
3644 raw: self.raw,
3645 _phantom: ::core::marker::PhantomData,
3646 })
3647 } else {
3648 None
3649 }
3650 }
3651 }
3652
3653 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WpaCredentials<'de>
3654 where
3655 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3656 ___D: ::fidl_next::Decoder<'de>,
3657 {
3658 fn decode(
3659 mut slot: ::fidl_next::Slot<'_, Self>,
3660 decoder: &mut ___D,
3661 _: (),
3662 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3663 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3664 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3665 1 => ::fidl_next::wire::Union::decode_as::<___D, [u8; 32]>(raw, decoder, ())?,
3666
3667 2 => {
3668 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3669 raw,
3670 decoder,
3671 (63, ()),
3672 )?
3673 }
3674
3675 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
3676 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3677 }
3678
3679 Ok(())
3680 }
3681 }
3682
3683 impl<'de> ::core::fmt::Debug for WpaCredentials<'de> {
3684 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3685 self.as_ref().fmt(f)
3686 }
3687 }
3688
3689 impl<'de> ::fidl_next::IntoNatural for WpaCredentials<'de> {
3690 type Natural = ::core::option::Option<crate::natural::WpaCredentials>;
3691 }
3692
3693 #[repr(transparent)]
3694 pub struct Credentials<'de> {
3695 pub(crate) raw: ::fidl_next::wire::Union,
3696 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3697 }
3698
3699 impl ::fidl_next::Constrained for Credentials<'_> {
3700 type Constraint = ();
3701
3702 fn validate(
3703 _: ::fidl_next::Slot<'_, Self>,
3704 _: Self::Constraint,
3705 ) -> Result<(), ::fidl_next::ValidationError> {
3706 Ok(())
3707 }
3708 }
3709
3710 unsafe impl ::fidl_next::Wire for Credentials<'static> {
3711 type Narrowed<'de> = Credentials<'de>;
3712
3713 #[inline]
3714 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3715 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3716 ::fidl_next::wire::Union::zero_padding(raw);
3717 }
3718 }
3719
3720 impl<'de> Credentials<'de> {
3721 pub fn is_some(&self) -> bool {
3722 self.raw.is_some()
3723 }
3724
3725 pub fn is_none(&self) -> bool {
3726 self.raw.is_none()
3727 }
3728
3729 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Credentials<'de>> {
3730 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
3731 }
3732
3733 pub fn into_option(self) -> ::core::option::Option<crate::wire::Credentials<'de>> {
3734 if self.is_some() {
3735 Some(crate::wire::Credentials {
3736 raw: self.raw,
3737 _phantom: ::core::marker::PhantomData,
3738 })
3739 } else {
3740 None
3741 }
3742 }
3743 }
3744
3745 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Credentials<'de>
3746 where
3747 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3748 ___D: ::fidl_next::Decoder<'de>,
3749 {
3750 fn decode(
3751 mut slot: ::fidl_next::Slot<'_, Self>,
3752 decoder: &mut ___D,
3753 _: (),
3754 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3755 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3756 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3757 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WepCredentials<'de>>(
3758 raw,
3759 decoder,
3760 (),
3761 )?,
3762
3763 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WpaCredentials<'de>>(
3764 raw,
3765 decoder,
3766 (),
3767 )?,
3768
3769 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
3770 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3771 }
3772
3773 Ok(())
3774 }
3775 }
3776
3777 impl<'de> ::core::fmt::Debug for Credentials<'de> {
3778 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3779 self.as_ref().fmt(f)
3780 }
3781 }
3782
3783 impl<'de> ::fidl_next::IntoNatural for Credentials<'de> {
3784 type Natural = ::core::option::Option<crate::natural::Credentials>;
3785 }
3786}
3787
3788pub mod generic {
3789
3790 pub struct Authentication<T0, T1> {
3792 pub protocol: T0,
3793
3794 pub credentials: T1,
3795 }
3796
3797 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E>
3798 for Authentication<T0, T1>
3799 where
3800 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3801 ___E: ::fidl_next::Encoder,
3802 T0: ::fidl_next::Encode<crate::wire::Protocol, ___E>,
3803 T1: ::fidl_next::Encode<crate::wire_optional::Credentials<'static>, ___E>,
3804 {
3805 #[inline]
3806 fn encode(
3807 self,
3808 encoder_: &mut ___E,
3809 out_: &mut ::core::mem::MaybeUninit<crate::wire::Authentication<'static>>,
3810 _: (),
3811 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3812 ::fidl_next::munge! {
3813 let crate::wire::Authentication {
3814 protocol,
3815 credentials,
3816
3817 } = out_;
3818 }
3819
3820 ::fidl_next::Encode::encode(self.protocol, encoder_, protocol, ())?;
3821
3822 ::fidl_next::Encode::encode(self.credentials, encoder_, credentials, ())?;
3823
3824 Ok(())
3825 }
3826 }
3827
3828 pub struct ChannelSwitchInfo<T0, T1, T2> {
3830 pub new_primary_channel: T0,
3831
3832 pub bandwidth: T1,
3833
3834 pub vht_secondary_80_channel: T2,
3835 }
3836
3837 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E>
3838 for ChannelSwitchInfo<T0, T1, T2>
3839 where
3840 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3841 T0: ::fidl_next::Encode<
3842 ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
3843 ___E,
3844 >,
3845 T1: ::fidl_next::Encode<
3846 ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelBandwidth,
3847 ___E,
3848 >,
3849 T2: ::fidl_next::Encode<
3850 ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
3851 ___E,
3852 >,
3853 {
3854 #[inline]
3855 fn encode(
3856 self,
3857 encoder_: &mut ___E,
3858 out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSwitchInfo>,
3859 _: (),
3860 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3861 ::fidl_next::munge! {
3862 let crate::wire::ChannelSwitchInfo {
3863 new_primary_channel,
3864 bandwidth,
3865 vht_secondary_80_channel,
3866
3867 } = out_;
3868 }
3869
3870 ::fidl_next::Encode::encode(
3871 self.new_primary_channel,
3872 encoder_,
3873 new_primary_channel,
3874 (),
3875 )?;
3876
3877 ::fidl_next::Encode::encode(self.bandwidth, encoder_, bandwidth, ())?;
3878
3879 ::fidl_next::Encode::encode(
3880 self.vht_secondary_80_channel,
3881 encoder_,
3882 vht_secondary_80_channel,
3883 (),
3884 )?;
3885
3886 Ok(())
3887 }
3888 }
3889
3890 pub struct WepCredentials<T0> {
3892 pub key: T0,
3893 }
3894
3895 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E>
3896 for WepCredentials<T0>
3897 where
3898 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3899 ___E: ::fidl_next::Encoder,
3900 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
3901 {
3902 #[inline]
3903 fn encode(
3904 self,
3905 encoder_: &mut ___E,
3906 out_: &mut ::core::mem::MaybeUninit<crate::wire::WepCredentials<'static>>,
3907 _: (),
3908 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3909 ::fidl_next::munge! {
3910 let crate::wire::WepCredentials {
3911 key,
3912
3913 } = out_;
3914 }
3915
3916 ::fidl_next::Encode::encode(self.key, encoder_, key, (4294967295, ()))?;
3917
3918 Ok(())
3919 }
3920 }
3921
3922 pub struct OwePublicKey<T0, T1> {
3924 pub group: T0,
3925
3926 pub key: T1,
3927 }
3928
3929 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E>
3930 for OwePublicKey<T0, T1>
3931 where
3932 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3933 ___E: ::fidl_next::Encoder,
3934 T0: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
3935 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
3936 {
3937 #[inline]
3938 fn encode(
3939 self,
3940 encoder_: &mut ___E,
3941 out_: &mut ::core::mem::MaybeUninit<crate::wire::OwePublicKey<'static>>,
3942 _: (),
3943 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3944 ::fidl_next::munge! {
3945 let crate::wire::OwePublicKey {
3946 group,
3947 key,
3948
3949 } = out_;
3950 }
3951
3952 ::fidl_next::Encode::encode(self.group, encoder_, group, ())?;
3953
3954 ::fidl_next::Encode::encode(self.key, encoder_, key, (4294967295, ()))?;
3955
3956 Ok(())
3957 }
3958 }
3959
3960 pub struct WmmAcParams<T0, T1, T2, T3, T4> {
3962 pub ecw_min: T0,
3963
3964 pub ecw_max: T1,
3965
3966 pub aifsn: T2,
3967
3968 pub txop_limit: T3,
3969
3970 pub acm: T4,
3971 }
3972
3973 unsafe impl<___E, T0, T1, T2, T3, T4> ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>
3974 for WmmAcParams<T0, T1, T2, T3, T4>
3975 where
3976 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3977 T0: ::fidl_next::Encode<u8, ___E>,
3978 T1: ::fidl_next::Encode<u8, ___E>,
3979 T2: ::fidl_next::Encode<u8, ___E>,
3980 T3: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
3981 T4: ::fidl_next::Encode<bool, ___E>,
3982 {
3983 #[inline]
3984 fn encode(
3985 self,
3986 encoder_: &mut ___E,
3987 out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmAcParams>,
3988 _: (),
3989 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3990 ::fidl_next::munge! {
3991 let crate::wire::WmmAcParams {
3992 ecw_min,
3993 ecw_max,
3994 aifsn,
3995 txop_limit,
3996 acm,
3997
3998 } = out_;
3999 }
4000
4001 ::fidl_next::Encode::encode(self.ecw_min, encoder_, ecw_min, ())?;
4002
4003 ::fidl_next::Encode::encode(self.ecw_max, encoder_, ecw_max, ())?;
4004
4005 ::fidl_next::Encode::encode(self.aifsn, encoder_, aifsn, ())?;
4006
4007 ::fidl_next::Encode::encode(self.txop_limit, encoder_, txop_limit, ())?;
4008
4009 ::fidl_next::Encode::encode(self.acm, encoder_, acm, ())?;
4010
4011 Ok(())
4012 }
4013 }
4014
4015 pub struct WmmStatusResponse<T0, T1, T2, T3, T4> {
4017 pub apsd: T0,
4018
4019 pub ac_be_params: T1,
4020
4021 pub ac_bk_params: T2,
4022
4023 pub ac_vi_params: T3,
4024
4025 pub ac_vo_params: T4,
4026 }
4027
4028 unsafe impl<___E, T0, T1, T2, T3, T4> ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>
4029 for WmmStatusResponse<T0, T1, T2, T3, T4>
4030 where
4031 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4032 T0: ::fidl_next::Encode<bool, ___E>,
4033 T1: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
4034 T2: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
4035 T3: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
4036 T4: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
4037 {
4038 #[inline]
4039 fn encode(
4040 self,
4041 encoder_: &mut ___E,
4042 out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmStatusResponse>,
4043 _: (),
4044 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4045 ::fidl_next::munge! {
4046 let crate::wire::WmmStatusResponse {
4047 apsd,
4048 ac_be_params,
4049 ac_bk_params,
4050 ac_vi_params,
4051 ac_vo_params,
4052
4053 } = out_;
4054 }
4055
4056 ::fidl_next::Encode::encode(self.apsd, encoder_, apsd, ())?;
4057
4058 ::fidl_next::Encode::encode(self.ac_be_params, encoder_, ac_be_params, ())?;
4059
4060 ::fidl_next::Encode::encode(self.ac_bk_params, encoder_, ac_bk_params, ())?;
4061
4062 ::fidl_next::Encode::encode(self.ac_vi_params, encoder_, ac_vi_params, ())?;
4063
4064 ::fidl_next::Encode::encode(self.ac_vo_params, encoder_, ac_vo_params, ())?;
4065
4066 Ok(())
4067 }
4068 }
4069}
4070
4071pub use self::natural::*;
4072
4073pub const COUNTRY_CODE_LEN: u32 = 2 as u32;
4074
4075pub const MAX_ASSOC_BASIC_RATES: u8 = 14 as u8;