1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 #[doc = " Describe a `Range` of values.\n"]
8 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9 #[repr(C)]
10 pub struct Range {
11 pub min: i64,
12
13 pub max: i64,
14 }
15
16 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Range, ___E> for Range
17 where
18 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19 {
20 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Range> = unsafe {
21 ::fidl_next::CopyOptimization::enable_if(
22 true
23
24 && <
25 i64 as ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>
26 >::COPY_OPTIMIZATION.is_enabled()
27
28 && <
29 i64 as ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>
30 >::COPY_OPTIMIZATION.is_enabled()
31
32 )
33 };
34
35 #[inline]
36 fn encode(
37 self,
38 encoder_: &mut ___E,
39 out_: &mut ::core::mem::MaybeUninit<crate::wire::Range>,
40 _: (),
41 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
42 ::fidl_next::munge! {
43 let crate::wire::Range {
44 min,
45 max,
46
47 } = out_;
48 }
49
50 ::fidl_next::Encode::encode(self.min, encoder_, min, ())?;
51
52 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(min.as_mut_ptr()) };
53
54 ::fidl_next::Encode::encode(self.max, encoder_, max, ())?;
55
56 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max.as_mut_ptr()) };
57
58 Ok(())
59 }
60 }
61
62 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Range, ___E> for &'a Range
63 where
64 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
65 {
66 #[inline]
67 fn encode(
68 self,
69 encoder_: &mut ___E,
70 out_: &mut ::core::mem::MaybeUninit<crate::wire::Range>,
71 _: (),
72 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
73 ::fidl_next::munge! {
74 let crate::wire::Range {
75 min,
76 max,
77
78 } = out_;
79 }
80
81 ::fidl_next::Encode::encode(&self.min, encoder_, min, ())?;
82
83 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(min.as_mut_ptr()) };
84
85 ::fidl_next::Encode::encode(&self.max, encoder_, max, ())?;
86
87 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max.as_mut_ptr()) };
88
89 Ok(())
90 }
91 }
92
93 unsafe impl<___E>
94 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Range>, ___E>
95 for Range
96 where
97 ___E: ::fidl_next::Encoder + ?Sized,
98 Range: ::fidl_next::Encode<crate::wire::Range, ___E>,
99 {
100 #[inline]
101 fn encode_option(
102 this: ::core::option::Option<Self>,
103 encoder: &mut ___E,
104 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Range>>,
105 _: (),
106 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
107 if let Some(inner) = this {
108 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
109 ::fidl_next::wire::Box::encode_present(out);
110 } else {
111 ::fidl_next::wire::Box::encode_absent(out);
112 }
113
114 Ok(())
115 }
116 }
117
118 unsafe impl<'a, ___E>
119 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Range>, ___E>
120 for &'a Range
121 where
122 ___E: ::fidl_next::Encoder + ?Sized,
123 &'a Range: ::fidl_next::Encode<crate::wire::Range, ___E>,
124 {
125 #[inline]
126 fn encode_option(
127 this: ::core::option::Option<Self>,
128 encoder: &mut ___E,
129 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Range>>,
130 _: (),
131 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
132 if let Some(inner) = this {
133 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
134 ::fidl_next::wire::Box::encode_present(out);
135 } else {
136 ::fidl_next::wire::Box::encode_absent(out);
137 }
138
139 Ok(())
140 }
141 }
142
143 impl ::fidl_next::FromWire<crate::wire::Range> for Range {
144 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Range, Self> = unsafe {
145 ::fidl_next::CopyOptimization::enable_if(
146 true && <i64 as ::fidl_next::FromWire<::fidl_next::wire::Int64>>::COPY_OPTIMIZATION
147 .is_enabled()
148 && <i64 as ::fidl_next::FromWire<::fidl_next::wire::Int64>>::COPY_OPTIMIZATION
149 .is_enabled(),
150 )
151 };
152
153 #[inline]
154 fn from_wire(wire: crate::wire::Range) -> Self {
155 Self {
156 min: ::fidl_next::FromWire::from_wire(wire.min),
157
158 max: ::fidl_next::FromWire::from_wire(wire.max),
159 }
160 }
161 }
162
163 impl ::fidl_next::FromWireRef<crate::wire::Range> for Range {
164 #[inline]
165 fn from_wire_ref(wire: &crate::wire::Range) -> Self {
166 Self {
167 min: ::fidl_next::FromWireRef::from_wire_ref(&wire.min),
168
169 max: ::fidl_next::FromWireRef::from_wire_ref(&wire.max),
170 }
171 }
172 }
173
174 #[doc = " This provides an easy, standardized way to specify units. New units can\n be added as needed. Each UnitType should be named after a specific unit that\n should be fully distinguished by the name (E.g: Use METERS instead of\n DISTANCE). More complicated units that need to be differentiated should\n begin with SI_ (for Internation System of Units) or ENGLISH_ (for English\n System of Units).\n"]
175 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
176 #[repr(u32)]
177 pub enum UnitType {
178 None = 0,
179 Other = 1,
180 Meters = 2,
181 Grams = 3,
182 Degrees = 4,
183 EnglishAngularVelocity = 5,
184 SiLinearVelocity = 6,
185 SiLinearAcceleration = 7,
186 Webers = 8,
187 Candelas = 9,
188 Pascals = 10,
189 Lux = 11,
190 Seconds = 12,
191 UnknownOrdinal_(u32) = 13,
192 }
193 impl ::std::convert::From<u32> for UnitType {
194 fn from(value: u32) -> Self {
195 match value {
196 0 => Self::None,
197 1 => Self::Other,
198 2 => Self::Meters,
199 3 => Self::Grams,
200 4 => Self::Degrees,
201 5 => Self::EnglishAngularVelocity,
202 6 => Self::SiLinearVelocity,
203 7 => Self::SiLinearAcceleration,
204 8 => Self::Webers,
205 9 => Self::Candelas,
206 10 => Self::Pascals,
207 11 => Self::Lux,
208 12 => Self::Seconds,
209
210 _ => Self::UnknownOrdinal_(value),
211 }
212 }
213 }
214
215 impl ::std::convert::From<UnitType> for u32 {
216 fn from(value: UnitType) -> Self {
217 match value {
218 UnitType::None => 0,
219 UnitType::Other => 1,
220 UnitType::Meters => 2,
221 UnitType::Grams => 3,
222 UnitType::Degrees => 4,
223 UnitType::EnglishAngularVelocity => 5,
224 UnitType::SiLinearVelocity => 6,
225 UnitType::SiLinearAcceleration => 7,
226 UnitType::Webers => 8,
227 UnitType::Candelas => 9,
228 UnitType::Pascals => 10,
229 UnitType::Lux => 11,
230 UnitType::Seconds => 12,
231
232 UnitType::UnknownOrdinal_(value) => value,
233 }
234 }
235 }
236
237 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnitType, ___E> for UnitType
238 where
239 ___E: ?Sized,
240 {
241 #[inline]
242 fn encode(
243 self,
244 encoder: &mut ___E,
245 out: &mut ::core::mem::MaybeUninit<crate::wire::UnitType>,
246 _: (),
247 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
248 ::fidl_next::Encode::encode(&self, encoder, out, ())
249 }
250 }
251
252 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnitType, ___E> for &'a UnitType
253 where
254 ___E: ?Sized,
255 {
256 #[inline]
257 fn encode(
258 self,
259 encoder: &mut ___E,
260 out: &mut ::core::mem::MaybeUninit<crate::wire::UnitType>,
261 _: (),
262 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
263 ::fidl_next::munge!(let crate::wire::UnitType { value } = out);
264 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
265 UnitType::None => 0,
266
267 UnitType::Other => 1,
268
269 UnitType::Meters => 2,
270
271 UnitType::Grams => 3,
272
273 UnitType::Degrees => 4,
274
275 UnitType::EnglishAngularVelocity => 5,
276
277 UnitType::SiLinearVelocity => 6,
278
279 UnitType::SiLinearAcceleration => 7,
280
281 UnitType::Webers => 8,
282
283 UnitType::Candelas => 9,
284
285 UnitType::Pascals => 10,
286
287 UnitType::Lux => 11,
288
289 UnitType::Seconds => 12,
290
291 UnitType::UnknownOrdinal_(value) => value,
292 }));
293
294 Ok(())
295 }
296 }
297
298 impl ::core::convert::From<crate::wire::UnitType> for UnitType {
299 fn from(wire: crate::wire::UnitType) -> Self {
300 match u32::from(wire.value) {
301 0 => Self::None,
302
303 1 => Self::Other,
304
305 2 => Self::Meters,
306
307 3 => Self::Grams,
308
309 4 => Self::Degrees,
310
311 5 => Self::EnglishAngularVelocity,
312
313 6 => Self::SiLinearVelocity,
314
315 7 => Self::SiLinearAcceleration,
316
317 8 => Self::Webers,
318
319 9 => Self::Candelas,
320
321 10 => Self::Pascals,
322
323 11 => Self::Lux,
324
325 12 => Self::Seconds,
326
327 value => Self::UnknownOrdinal_(value),
328 }
329 }
330 }
331
332 impl ::fidl_next::FromWire<crate::wire::UnitType> for UnitType {
333 #[inline]
334 fn from_wire(wire: crate::wire::UnitType) -> Self {
335 Self::from(wire)
336 }
337 }
338
339 impl ::fidl_next::FromWireRef<crate::wire::UnitType> for UnitType {
340 #[inline]
341 fn from_wire_ref(wire: &crate::wire::UnitType) -> Self {
342 Self::from(*wire)
343 }
344 }
345
346 #[doc = " Describes a given unit by giving the unit and the unit\'s exponent.\n E.g: Nanometers would have type METERS and exponent -9.\n"]
347 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
348 #[repr(C)]
349 pub struct Unit {
350 pub type_: crate::natural::UnitType,
351
352 pub exponent: i32,
353 }
354
355 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Unit, ___E> for Unit
356 where
357 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
358 {
359 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Unit> = unsafe {
360 ::fidl_next::CopyOptimization::enable_if(
361 true
362
363 && <
364 crate::natural::UnitType as ::fidl_next::Encode<crate::wire::UnitType, ___E>
365 >::COPY_OPTIMIZATION.is_enabled()
366
367 && <
368 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
369 >::COPY_OPTIMIZATION.is_enabled()
370
371 )
372 };
373
374 #[inline]
375 fn encode(
376 self,
377 encoder_: &mut ___E,
378 out_: &mut ::core::mem::MaybeUninit<crate::wire::Unit>,
379 _: (),
380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
381 ::fidl_next::munge! {
382 let crate::wire::Unit {
383 type_,
384 exponent,
385
386 } = out_;
387 }
388
389 ::fidl_next::Encode::encode(self.type_, encoder_, type_, ())?;
390
391 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(type_.as_mut_ptr()) };
392
393 ::fidl_next::Encode::encode(self.exponent, encoder_, exponent, ())?;
394
395 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(exponent.as_mut_ptr()) };
396
397 Ok(())
398 }
399 }
400
401 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Unit, ___E> for &'a Unit
402 where
403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
404 {
405 #[inline]
406 fn encode(
407 self,
408 encoder_: &mut ___E,
409 out_: &mut ::core::mem::MaybeUninit<crate::wire::Unit>,
410 _: (),
411 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
412 ::fidl_next::munge! {
413 let crate::wire::Unit {
414 type_,
415 exponent,
416
417 } = out_;
418 }
419
420 ::fidl_next::Encode::encode(&self.type_, encoder_, type_, ())?;
421
422 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(type_.as_mut_ptr()) };
423
424 ::fidl_next::Encode::encode(&self.exponent, encoder_, exponent, ())?;
425
426 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(exponent.as_mut_ptr()) };
427
428 Ok(())
429 }
430 }
431
432 unsafe impl<___E>
433 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Unit>, ___E> for Unit
434 where
435 ___E: ::fidl_next::Encoder + ?Sized,
436 Unit: ::fidl_next::Encode<crate::wire::Unit, ___E>,
437 {
438 #[inline]
439 fn encode_option(
440 this: ::core::option::Option<Self>,
441 encoder: &mut ___E,
442 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Unit>>,
443 _: (),
444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
445 if let Some(inner) = this {
446 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
447 ::fidl_next::wire::Box::encode_present(out);
448 } else {
449 ::fidl_next::wire::Box::encode_absent(out);
450 }
451
452 Ok(())
453 }
454 }
455
456 unsafe impl<'a, ___E>
457 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Unit>, ___E>
458 for &'a Unit
459 where
460 ___E: ::fidl_next::Encoder + ?Sized,
461 &'a Unit: ::fidl_next::Encode<crate::wire::Unit, ___E>,
462 {
463 #[inline]
464 fn encode_option(
465 this: ::core::option::Option<Self>,
466 encoder: &mut ___E,
467 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Unit>>,
468 _: (),
469 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
470 if let Some(inner) = this {
471 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
472 ::fidl_next::wire::Box::encode_present(out);
473 } else {
474 ::fidl_next::wire::Box::encode_absent(out);
475 }
476
477 Ok(())
478 }
479 }
480
481 impl ::fidl_next::FromWire<crate::wire::Unit> for Unit {
482 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Unit, Self> = unsafe {
483 ::fidl_next::CopyOptimization::enable_if(
484 true && <crate::natural::UnitType as ::fidl_next::FromWire<
485 crate::wire::UnitType,
486 >>::COPY_OPTIMIZATION
487 .is_enabled()
488 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
489 .is_enabled(),
490 )
491 };
492
493 #[inline]
494 fn from_wire(wire: crate::wire::Unit) -> Self {
495 Self {
496 type_: ::fidl_next::FromWire::from_wire(wire.type_),
497
498 exponent: ::fidl_next::FromWire::from_wire(wire.exponent),
499 }
500 }
501 }
502
503 impl ::fidl_next::FromWireRef<crate::wire::Unit> for Unit {
504 #[inline]
505 fn from_wire_ref(wire: &crate::wire::Unit) -> Self {
506 Self {
507 type_: ::fidl_next::FromWireRef::from_wire_ref(&wire.type_),
508
509 exponent: ::fidl_next::FromWireRef::from_wire_ref(&wire.exponent),
510 }
511 }
512 }
513
514 #[doc = " An `Axis` is defined as a `range` and a `unit`.\n"]
515 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
516 #[repr(C)]
517 pub struct Axis {
518 pub range: crate::natural::Range,
519
520 pub unit: crate::natural::Unit,
521 }
522
523 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Axis, ___E> for Axis
524 where
525 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
526 {
527 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Axis> = unsafe {
528 ::fidl_next::CopyOptimization::enable_if(
529 true
530
531 && <
532 crate::natural::Range as ::fidl_next::Encode<crate::wire::Range, ___E>
533 >::COPY_OPTIMIZATION.is_enabled()
534
535 && <
536 crate::natural::Unit as ::fidl_next::Encode<crate::wire::Unit, ___E>
537 >::COPY_OPTIMIZATION.is_enabled()
538
539 )
540 };
541
542 #[inline]
543 fn encode(
544 self,
545 encoder_: &mut ___E,
546 out_: &mut ::core::mem::MaybeUninit<crate::wire::Axis>,
547 _: (),
548 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
549 ::fidl_next::munge! {
550 let crate::wire::Axis {
551 range,
552 unit,
553
554 } = out_;
555 }
556
557 ::fidl_next::Encode::encode(self.range, encoder_, range, ())?;
558
559 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(range.as_mut_ptr()) };
560
561 ::fidl_next::Encode::encode(self.unit, encoder_, unit, ())?;
562
563 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(unit.as_mut_ptr()) };
564
565 Ok(())
566 }
567 }
568
569 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Axis, ___E> for &'a Axis
570 where
571 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
572 {
573 #[inline]
574 fn encode(
575 self,
576 encoder_: &mut ___E,
577 out_: &mut ::core::mem::MaybeUninit<crate::wire::Axis>,
578 _: (),
579 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
580 ::fidl_next::munge! {
581 let crate::wire::Axis {
582 range,
583 unit,
584
585 } = out_;
586 }
587
588 ::fidl_next::Encode::encode(&self.range, encoder_, range, ())?;
589
590 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(range.as_mut_ptr()) };
591
592 ::fidl_next::Encode::encode(&self.unit, encoder_, unit, ())?;
593
594 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(unit.as_mut_ptr()) };
595
596 Ok(())
597 }
598 }
599
600 unsafe impl<___E>
601 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Axis>, ___E> for Axis
602 where
603 ___E: ::fidl_next::Encoder + ?Sized,
604 Axis: ::fidl_next::Encode<crate::wire::Axis, ___E>,
605 {
606 #[inline]
607 fn encode_option(
608 this: ::core::option::Option<Self>,
609 encoder: &mut ___E,
610 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Axis>>,
611 _: (),
612 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
613 if let Some(inner) = this {
614 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
615 ::fidl_next::wire::Box::encode_present(out);
616 } else {
617 ::fidl_next::wire::Box::encode_absent(out);
618 }
619
620 Ok(())
621 }
622 }
623
624 unsafe impl<'a, ___E>
625 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Axis>, ___E>
626 for &'a Axis
627 where
628 ___E: ::fidl_next::Encoder + ?Sized,
629 &'a Axis: ::fidl_next::Encode<crate::wire::Axis, ___E>,
630 {
631 #[inline]
632 fn encode_option(
633 this: ::core::option::Option<Self>,
634 encoder: &mut ___E,
635 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Axis>>,
636 _: (),
637 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
638 if let Some(inner) = this {
639 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
640 ::fidl_next::wire::Box::encode_present(out);
641 } else {
642 ::fidl_next::wire::Box::encode_absent(out);
643 }
644
645 Ok(())
646 }
647 }
648
649 impl ::fidl_next::FromWire<crate::wire::Axis> for Axis {
650 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Axis, Self> = unsafe {
651 ::fidl_next::CopyOptimization::enable_if(
652 true
653
654 && <
655 crate::natural::Range as ::fidl_next::FromWire<crate::wire::Range>
656 >::COPY_OPTIMIZATION.is_enabled()
657
658 && <
659 crate::natural::Unit as ::fidl_next::FromWire<crate::wire::Unit>
660 >::COPY_OPTIMIZATION.is_enabled()
661
662 )
663 };
664
665 #[inline]
666 fn from_wire(wire: crate::wire::Axis) -> Self {
667 Self {
668 range: ::fidl_next::FromWire::from_wire(wire.range),
669
670 unit: ::fidl_next::FromWire::from_wire(wire.unit),
671 }
672 }
673 }
674
675 impl ::fidl_next::FromWireRef<crate::wire::Axis> for Axis {
676 #[inline]
677 fn from_wire_ref(wire: &crate::wire::Axis) -> Self {
678 Self {
679 range: ::fidl_next::FromWireRef::from_wire_ref(&wire.range),
680
681 unit: ::fidl_next::FromWireRef::from_wire_ref(&wire.unit),
682 }
683 }
684 }
685
686 #[doc = " These ControlButtons represent on/off buttons whose purpose is to change\n the host\'s configuration.\n"]
687 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
688 #[repr(u32)]
689 pub enum ConsumerControlButton {
690 VolumeUp = 1,
691 VolumeDown = 2,
692 Pause = 3,
693 FactoryReset = 4,
694 MicMute = 5,
695 Reboot = 6,
696 CameraDisable = 7,
697 Function = 8,
698 Power = 9,
699 UnknownOrdinal_(u32) = 10,
700 }
701 impl ::std::convert::From<u32> for ConsumerControlButton {
702 fn from(value: u32) -> Self {
703 match value {
704 1 => Self::VolumeUp,
705 2 => Self::VolumeDown,
706 3 => Self::Pause,
707 4 => Self::FactoryReset,
708 5 => Self::MicMute,
709 6 => Self::Reboot,
710 7 => Self::CameraDisable,
711 8 => Self::Function,
712 9 => Self::Power,
713
714 _ => Self::UnknownOrdinal_(value),
715 }
716 }
717 }
718
719 impl ::std::convert::From<ConsumerControlButton> for u32 {
720 fn from(value: ConsumerControlButton) -> Self {
721 match value {
722 ConsumerControlButton::VolumeUp => 1,
723 ConsumerControlButton::VolumeDown => 2,
724 ConsumerControlButton::Pause => 3,
725 ConsumerControlButton::FactoryReset => 4,
726 ConsumerControlButton::MicMute => 5,
727 ConsumerControlButton::Reboot => 6,
728 ConsumerControlButton::CameraDisable => 7,
729 ConsumerControlButton::Function => 8,
730 ConsumerControlButton::Power => 9,
731
732 ConsumerControlButton::UnknownOrdinal_(value) => value,
733 }
734 }
735 }
736
737 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ConsumerControlButton, ___E>
738 for ConsumerControlButton
739 where
740 ___E: ?Sized,
741 {
742 #[inline]
743 fn encode(
744 self,
745 encoder: &mut ___E,
746 out: &mut ::core::mem::MaybeUninit<crate::wire::ConsumerControlButton>,
747 _: (),
748 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
749 ::fidl_next::Encode::encode(&self, encoder, out, ())
750 }
751 }
752
753 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ConsumerControlButton, ___E>
754 for &'a ConsumerControlButton
755 where
756 ___E: ?Sized,
757 {
758 #[inline]
759 fn encode(
760 self,
761 encoder: &mut ___E,
762 out: &mut ::core::mem::MaybeUninit<crate::wire::ConsumerControlButton>,
763 _: (),
764 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
765 ::fidl_next::munge!(let crate::wire::ConsumerControlButton { value } = out);
766 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
767 ConsumerControlButton::VolumeUp => 1,
768
769 ConsumerControlButton::VolumeDown => 2,
770
771 ConsumerControlButton::Pause => 3,
772
773 ConsumerControlButton::FactoryReset => 4,
774
775 ConsumerControlButton::MicMute => 5,
776
777 ConsumerControlButton::Reboot => 6,
778
779 ConsumerControlButton::CameraDisable => 7,
780
781 ConsumerControlButton::Function => 8,
782
783 ConsumerControlButton::Power => 9,
784
785 ConsumerControlButton::UnknownOrdinal_(value) => value,
786 }));
787
788 Ok(())
789 }
790 }
791
792 impl ::core::convert::From<crate::wire::ConsumerControlButton> for ConsumerControlButton {
793 fn from(wire: crate::wire::ConsumerControlButton) -> Self {
794 match u32::from(wire.value) {
795 1 => Self::VolumeUp,
796
797 2 => Self::VolumeDown,
798
799 3 => Self::Pause,
800
801 4 => Self::FactoryReset,
802
803 5 => Self::MicMute,
804
805 6 => Self::Reboot,
806
807 7 => Self::CameraDisable,
808
809 8 => Self::Function,
810
811 9 => Self::Power,
812
813 value => Self::UnknownOrdinal_(value),
814 }
815 }
816 }
817
818 impl ::fidl_next::FromWire<crate::wire::ConsumerControlButton> for ConsumerControlButton {
819 #[inline]
820 fn from_wire(wire: crate::wire::ConsumerControlButton) -> Self {
821 Self::from(wire)
822 }
823 }
824
825 impl ::fidl_next::FromWireRef<crate::wire::ConsumerControlButton> for ConsumerControlButton {
826 #[inline]
827 fn from_wire_ref(wire: &crate::wire::ConsumerControlButton) -> Self {
828 Self::from(*wire)
829 }
830 }
831
832 #[doc = " A Fuchsia key represents a control that can be pressed or released such as a key or\n a button on a keyboard or another input device.\n\n The ordinal index for enum elements is derived from the USB HID Usage Tables at the\n time of definition. It is a 32 bit unsigned integer representing the USB HID Usage\n where the low 16 bits are the USB HID Usage ID and the high 16 bits are the\n USB HID Usage Page.\n\n The descriptions for each value in the enum assume a US English keyboard layout.\n Actual behavior varies by layout.\n"]
833 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
834 #[repr(u32)]
835 pub enum Key {
836 Unknown = 0,
837 A = 458756,
838 B = 458757,
839 C = 458758,
840 D = 458759,
841 E = 458760,
842 F = 458761,
843 G = 458762,
844 H = 458763,
845 I = 458764,
846 J = 458765,
847 K = 458766,
848 L = 458767,
849 M = 458768,
850 N = 458769,
851 O = 458770,
852 P = 458771,
853 Q = 458772,
854 R = 458773,
855 S = 458774,
856 T = 458775,
857 U = 458776,
858 V = 458777,
859 W = 458778,
860 X = 458779,
861 Y = 458780,
862 Z = 458781,
863 Key1 = 458782,
864 Key2 = 458783,
865 Key3 = 458784,
866 Key4 = 458785,
867 Key5 = 458786,
868 Key6 = 458787,
869 Key7 = 458788,
870 Key8 = 458789,
871 Key9 = 458790,
872 Key0 = 458791,
873 Enter = 458792,
874 Escape = 458793,
875 Backspace = 458794,
876 Tab = 458795,
877 Space = 458796,
878 Minus = 458797,
879 Equals = 458798,
880 LeftBrace = 458799,
881 RightBrace = 458800,
882 Backslash = 458801,
883 NonUsHash = 458802,
884 Semicolon = 458803,
885 Apostrophe = 458804,
886 GraveAccent = 458805,
887 Comma = 458806,
888 Dot = 458807,
889 Slash = 458808,
890 CapsLock = 458809,
891 F1 = 458810,
892 F2 = 458811,
893 F3 = 458812,
894 F4 = 458813,
895 F5 = 458814,
896 F6 = 458815,
897 F7 = 458816,
898 F8 = 458817,
899 F9 = 458818,
900 F10 = 458819,
901 F11 = 458820,
902 F12 = 458821,
903 PrintScreen = 458822,
904 ScrollLock = 458823,
905 Pause = 458824,
906 Insert = 458825,
907 Home = 458826,
908 PageUp = 458827,
909 Delete = 458828,
910 End = 458829,
911 PageDown = 458830,
912 Right = 458831,
913 Left = 458832,
914 Down = 458833,
915 Up = 458834,
916 NumLock = 458835,
917 KeypadSlash = 458836,
918 KeypadAsterisk = 458837,
919 KeypadMinus = 458838,
920 KeypadPlus = 458839,
921 KeypadEnter = 458840,
922 Keypad1 = 458841,
923 Keypad2 = 458842,
924 Keypad3 = 458843,
925 Keypad4 = 458844,
926 Keypad5 = 458845,
927 Keypad6 = 458846,
928 Keypad7 = 458847,
929 Keypad8 = 458848,
930 Keypad9 = 458849,
931 Keypad0 = 458850,
932 KeypadDot = 458851,
933 NonUsBackslash = 458852,
934 KeypadEquals = 458855,
935 Menu = 458870,
936 LeftCtrl = 458976,
937 LeftShift = 458977,
938 LeftAlt = 458978,
939 LeftMeta = 458979,
940 RightCtrl = 458980,
941 RightShift = 458981,
942 RightAlt = 458982,
943 RightMeta = 458983,
944 Mute = 458879,
945 VolumeDown = 458881,
946 VolumeUp = 458880,
947 PlayPause = 786637,
948 MediaMute = 786658,
949 MediaVolumeIncrement = 786665,
950 MediaVolumeDecrement = 786666,
951 AcBack = 786980,
952 AcRefresh = 786983,
953 AcFullScreenView = 786992,
954 AcSelectTaskApplication = 786850,
955 BrightnessDown = 786543,
956 BrightnessUp = 786544,
957 Assistant = 4294901761,
958 Power = 4294901762,
959 Sleep = 4294901763,
960 Unknown0055 = 4294901845,
961 Unknown0056 = 4294901846,
962 Unknown0059 = 4294901849,
963 Unknown005C = 4294901852,
964 Unknown005D = 4294901853,
965 Unknown005E = 4294901854,
966 Unknown0079 = 4294901881,
967 Unknown007A = 4294901882,
968 Unknown007B = 4294901883,
969 Unknown007C = 4294901884,
970 Unknown0085 = 4294901893,
971 Unknown0087 = 4294901895,
972 Unknown0089 = 4294901897,
973 Unknown009C = 4294901916,
974 Unknown009F = 4294901919,
975 Unknown00A0 = 4294901920,
976 Unknown00A2 = 4294901922,
977 Unknown00A3 = 4294901923,
978 Unknown00A5 = 4294901925,
979 Unknown00A6 = 4294901926,
980 Unknown00A7 = 4294901927,
981 Unknown00A8 = 4294901928,
982 Unknown00A9 = 4294901929,
983 Unknown00Ad = 4294901933,
984 Unknown00B1 = 4294901937,
985 Unknown00B2 = 4294901938,
986 Unknown00B3 = 4294901939,
987 Unknown00B4 = 4294901940,
988 Unknown00C9 = 4294901961,
989 Unknown00Cf = 4294901967,
990 Unknown00D0 = 4294901968,
991 Unknown00D4 = 4294901972,
992 Unknown00E2 = 4294901986,
993 Unknown0120 = 4294902048,
994 Unknown0121 = 4294902049,
995 Unknown0122 = 4294902050,
996 Unknown0123 = 4294902051,
997 Unknown0124 = 4294902052,
998 Unknown0125 = 4294902053,
999 Unknown0126 = 4294902054,
1000 Unknown0127 = 4294902055,
1001 Unknown0128 = 4294902056,
1002 Unknown0129 = 4294902057,
1003 Unknown012A = 4294902058,
1004 Unknown012B = 4294902059,
1005 Unknown012C = 4294902060,
1006 Unknown012D = 4294902061,
1007 Unknown012E = 4294902062,
1008 Unknown012F = 4294902063,
1009 Unknown0130 = 4294902064,
1010 Unknown0131 = 4294902065,
1011 Unknown0132 = 4294902066,
1012 Unknown0133 = 4294902067,
1013 Unknown0134 = 4294902068,
1014 Unknown0135 = 4294902069,
1015 Unknown0136 = 4294902070,
1016 Unknown0137 = 4294902071,
1017 Unknown0138 = 4294902072,
1018 Unknown0139 = 4294902073,
1019 Unknown013A = 4294902074,
1020 Unknown013B = 4294902075,
1021 Unknown013C = 4294902076,
1022 Unknown013D = 4294902077,
1023 Unknown013E = 4294902078,
1024 Unknown0161 = 4294902113,
1025 Unknown016A = 4294902122,
1026 Unknown016E = 4294902126,
1027 Unknown0172 = 4294902130,
1028 Unknown0179 = 4294902137,
1029 Unknown018E = 4294902158,
1030 Unknown018F = 4294902159,
1031 Unknown0190 = 4294902160,
1032 Unknown0191 = 4294902161,
1033 Unknown0192 = 4294902162,
1034 Unknown0193 = 4294902163,
1035 Unknown0195 = 4294902165,
1036 Unknown01D0 = 4294902224,
1037 Unknown020A = 4294902282,
1038 Unknown020B = 4294902283,
1039 UnknownOrdinal_(u32) = 4294902284,
1040 }
1041 impl ::std::convert::From<u32> for Key {
1042 fn from(value: u32) -> Self {
1043 match value {
1044 0 => Self::Unknown,
1045 458756 => Self::A,
1046 458757 => Self::B,
1047 458758 => Self::C,
1048 458759 => Self::D,
1049 458760 => Self::E,
1050 458761 => Self::F,
1051 458762 => Self::G,
1052 458763 => Self::H,
1053 458764 => Self::I,
1054 458765 => Self::J,
1055 458766 => Self::K,
1056 458767 => Self::L,
1057 458768 => Self::M,
1058 458769 => Self::N,
1059 458770 => Self::O,
1060 458771 => Self::P,
1061 458772 => Self::Q,
1062 458773 => Self::R,
1063 458774 => Self::S,
1064 458775 => Self::T,
1065 458776 => Self::U,
1066 458777 => Self::V,
1067 458778 => Self::W,
1068 458779 => Self::X,
1069 458780 => Self::Y,
1070 458781 => Self::Z,
1071 458782 => Self::Key1,
1072 458783 => Self::Key2,
1073 458784 => Self::Key3,
1074 458785 => Self::Key4,
1075 458786 => Self::Key5,
1076 458787 => Self::Key6,
1077 458788 => Self::Key7,
1078 458789 => Self::Key8,
1079 458790 => Self::Key9,
1080 458791 => Self::Key0,
1081 458792 => Self::Enter,
1082 458793 => Self::Escape,
1083 458794 => Self::Backspace,
1084 458795 => Self::Tab,
1085 458796 => Self::Space,
1086 458797 => Self::Minus,
1087 458798 => Self::Equals,
1088 458799 => Self::LeftBrace,
1089 458800 => Self::RightBrace,
1090 458801 => Self::Backslash,
1091 458802 => Self::NonUsHash,
1092 458803 => Self::Semicolon,
1093 458804 => Self::Apostrophe,
1094 458805 => Self::GraveAccent,
1095 458806 => Self::Comma,
1096 458807 => Self::Dot,
1097 458808 => Self::Slash,
1098 458809 => Self::CapsLock,
1099 458810 => Self::F1,
1100 458811 => Self::F2,
1101 458812 => Self::F3,
1102 458813 => Self::F4,
1103 458814 => Self::F5,
1104 458815 => Self::F6,
1105 458816 => Self::F7,
1106 458817 => Self::F8,
1107 458818 => Self::F9,
1108 458819 => Self::F10,
1109 458820 => Self::F11,
1110 458821 => Self::F12,
1111 458822 => Self::PrintScreen,
1112 458823 => Self::ScrollLock,
1113 458824 => Self::Pause,
1114 458825 => Self::Insert,
1115 458826 => Self::Home,
1116 458827 => Self::PageUp,
1117 458828 => Self::Delete,
1118 458829 => Self::End,
1119 458830 => Self::PageDown,
1120 458831 => Self::Right,
1121 458832 => Self::Left,
1122 458833 => Self::Down,
1123 458834 => Self::Up,
1124 458835 => Self::NumLock,
1125 458836 => Self::KeypadSlash,
1126 458837 => Self::KeypadAsterisk,
1127 458838 => Self::KeypadMinus,
1128 458839 => Self::KeypadPlus,
1129 458840 => Self::KeypadEnter,
1130 458841 => Self::Keypad1,
1131 458842 => Self::Keypad2,
1132 458843 => Self::Keypad3,
1133 458844 => Self::Keypad4,
1134 458845 => Self::Keypad5,
1135 458846 => Self::Keypad6,
1136 458847 => Self::Keypad7,
1137 458848 => Self::Keypad8,
1138 458849 => Self::Keypad9,
1139 458850 => Self::Keypad0,
1140 458851 => Self::KeypadDot,
1141 458852 => Self::NonUsBackslash,
1142 458855 => Self::KeypadEquals,
1143 458870 => Self::Menu,
1144 458976 => Self::LeftCtrl,
1145 458977 => Self::LeftShift,
1146 458978 => Self::LeftAlt,
1147 458979 => Self::LeftMeta,
1148 458980 => Self::RightCtrl,
1149 458981 => Self::RightShift,
1150 458982 => Self::RightAlt,
1151 458983 => Self::RightMeta,
1152 458879 => Self::Mute,
1153 458881 => Self::VolumeDown,
1154 458880 => Self::VolumeUp,
1155 786637 => Self::PlayPause,
1156 786658 => Self::MediaMute,
1157 786665 => Self::MediaVolumeIncrement,
1158 786666 => Self::MediaVolumeDecrement,
1159 786980 => Self::AcBack,
1160 786983 => Self::AcRefresh,
1161 786992 => Self::AcFullScreenView,
1162 786850 => Self::AcSelectTaskApplication,
1163 786543 => Self::BrightnessDown,
1164 786544 => Self::BrightnessUp,
1165 4294901761 => Self::Assistant,
1166 4294901762 => Self::Power,
1167 4294901763 => Self::Sleep,
1168 4294901845 => Self::Unknown0055,
1169 4294901846 => Self::Unknown0056,
1170 4294901849 => Self::Unknown0059,
1171 4294901852 => Self::Unknown005C,
1172 4294901853 => Self::Unknown005D,
1173 4294901854 => Self::Unknown005E,
1174 4294901881 => Self::Unknown0079,
1175 4294901882 => Self::Unknown007A,
1176 4294901883 => Self::Unknown007B,
1177 4294901884 => Self::Unknown007C,
1178 4294901893 => Self::Unknown0085,
1179 4294901895 => Self::Unknown0087,
1180 4294901897 => Self::Unknown0089,
1181 4294901916 => Self::Unknown009C,
1182 4294901919 => Self::Unknown009F,
1183 4294901920 => Self::Unknown00A0,
1184 4294901922 => Self::Unknown00A2,
1185 4294901923 => Self::Unknown00A3,
1186 4294901925 => Self::Unknown00A5,
1187 4294901926 => Self::Unknown00A6,
1188 4294901927 => Self::Unknown00A7,
1189 4294901928 => Self::Unknown00A8,
1190 4294901929 => Self::Unknown00A9,
1191 4294901933 => Self::Unknown00Ad,
1192 4294901937 => Self::Unknown00B1,
1193 4294901938 => Self::Unknown00B2,
1194 4294901939 => Self::Unknown00B3,
1195 4294901940 => Self::Unknown00B4,
1196 4294901961 => Self::Unknown00C9,
1197 4294901967 => Self::Unknown00Cf,
1198 4294901968 => Self::Unknown00D0,
1199 4294901972 => Self::Unknown00D4,
1200 4294901986 => Self::Unknown00E2,
1201 4294902048 => Self::Unknown0120,
1202 4294902049 => Self::Unknown0121,
1203 4294902050 => Self::Unknown0122,
1204 4294902051 => Self::Unknown0123,
1205 4294902052 => Self::Unknown0124,
1206 4294902053 => Self::Unknown0125,
1207 4294902054 => Self::Unknown0126,
1208 4294902055 => Self::Unknown0127,
1209 4294902056 => Self::Unknown0128,
1210 4294902057 => Self::Unknown0129,
1211 4294902058 => Self::Unknown012A,
1212 4294902059 => Self::Unknown012B,
1213 4294902060 => Self::Unknown012C,
1214 4294902061 => Self::Unknown012D,
1215 4294902062 => Self::Unknown012E,
1216 4294902063 => Self::Unknown012F,
1217 4294902064 => Self::Unknown0130,
1218 4294902065 => Self::Unknown0131,
1219 4294902066 => Self::Unknown0132,
1220 4294902067 => Self::Unknown0133,
1221 4294902068 => Self::Unknown0134,
1222 4294902069 => Self::Unknown0135,
1223 4294902070 => Self::Unknown0136,
1224 4294902071 => Self::Unknown0137,
1225 4294902072 => Self::Unknown0138,
1226 4294902073 => Self::Unknown0139,
1227 4294902074 => Self::Unknown013A,
1228 4294902075 => Self::Unknown013B,
1229 4294902076 => Self::Unknown013C,
1230 4294902077 => Self::Unknown013D,
1231 4294902078 => Self::Unknown013E,
1232 4294902113 => Self::Unknown0161,
1233 4294902122 => Self::Unknown016A,
1234 4294902126 => Self::Unknown016E,
1235 4294902130 => Self::Unknown0172,
1236 4294902137 => Self::Unknown0179,
1237 4294902158 => Self::Unknown018E,
1238 4294902159 => Self::Unknown018F,
1239 4294902160 => Self::Unknown0190,
1240 4294902161 => Self::Unknown0191,
1241 4294902162 => Self::Unknown0192,
1242 4294902163 => Self::Unknown0193,
1243 4294902165 => Self::Unknown0195,
1244 4294902224 => Self::Unknown01D0,
1245 4294902282 => Self::Unknown020A,
1246 4294902283 => Self::Unknown020B,
1247
1248 _ => Self::UnknownOrdinal_(value),
1249 }
1250 }
1251 }
1252
1253 impl ::std::convert::From<Key> for u32 {
1254 fn from(value: Key) -> Self {
1255 match value {
1256 Key::Unknown => 0,
1257 Key::A => 458756,
1258 Key::B => 458757,
1259 Key::C => 458758,
1260 Key::D => 458759,
1261 Key::E => 458760,
1262 Key::F => 458761,
1263 Key::G => 458762,
1264 Key::H => 458763,
1265 Key::I => 458764,
1266 Key::J => 458765,
1267 Key::K => 458766,
1268 Key::L => 458767,
1269 Key::M => 458768,
1270 Key::N => 458769,
1271 Key::O => 458770,
1272 Key::P => 458771,
1273 Key::Q => 458772,
1274 Key::R => 458773,
1275 Key::S => 458774,
1276 Key::T => 458775,
1277 Key::U => 458776,
1278 Key::V => 458777,
1279 Key::W => 458778,
1280 Key::X => 458779,
1281 Key::Y => 458780,
1282 Key::Z => 458781,
1283 Key::Key1 => 458782,
1284 Key::Key2 => 458783,
1285 Key::Key3 => 458784,
1286 Key::Key4 => 458785,
1287 Key::Key5 => 458786,
1288 Key::Key6 => 458787,
1289 Key::Key7 => 458788,
1290 Key::Key8 => 458789,
1291 Key::Key9 => 458790,
1292 Key::Key0 => 458791,
1293 Key::Enter => 458792,
1294 Key::Escape => 458793,
1295 Key::Backspace => 458794,
1296 Key::Tab => 458795,
1297 Key::Space => 458796,
1298 Key::Minus => 458797,
1299 Key::Equals => 458798,
1300 Key::LeftBrace => 458799,
1301 Key::RightBrace => 458800,
1302 Key::Backslash => 458801,
1303 Key::NonUsHash => 458802,
1304 Key::Semicolon => 458803,
1305 Key::Apostrophe => 458804,
1306 Key::GraveAccent => 458805,
1307 Key::Comma => 458806,
1308 Key::Dot => 458807,
1309 Key::Slash => 458808,
1310 Key::CapsLock => 458809,
1311 Key::F1 => 458810,
1312 Key::F2 => 458811,
1313 Key::F3 => 458812,
1314 Key::F4 => 458813,
1315 Key::F5 => 458814,
1316 Key::F6 => 458815,
1317 Key::F7 => 458816,
1318 Key::F8 => 458817,
1319 Key::F9 => 458818,
1320 Key::F10 => 458819,
1321 Key::F11 => 458820,
1322 Key::F12 => 458821,
1323 Key::PrintScreen => 458822,
1324 Key::ScrollLock => 458823,
1325 Key::Pause => 458824,
1326 Key::Insert => 458825,
1327 Key::Home => 458826,
1328 Key::PageUp => 458827,
1329 Key::Delete => 458828,
1330 Key::End => 458829,
1331 Key::PageDown => 458830,
1332 Key::Right => 458831,
1333 Key::Left => 458832,
1334 Key::Down => 458833,
1335 Key::Up => 458834,
1336 Key::NumLock => 458835,
1337 Key::KeypadSlash => 458836,
1338 Key::KeypadAsterisk => 458837,
1339 Key::KeypadMinus => 458838,
1340 Key::KeypadPlus => 458839,
1341 Key::KeypadEnter => 458840,
1342 Key::Keypad1 => 458841,
1343 Key::Keypad2 => 458842,
1344 Key::Keypad3 => 458843,
1345 Key::Keypad4 => 458844,
1346 Key::Keypad5 => 458845,
1347 Key::Keypad6 => 458846,
1348 Key::Keypad7 => 458847,
1349 Key::Keypad8 => 458848,
1350 Key::Keypad9 => 458849,
1351 Key::Keypad0 => 458850,
1352 Key::KeypadDot => 458851,
1353 Key::NonUsBackslash => 458852,
1354 Key::KeypadEquals => 458855,
1355 Key::Menu => 458870,
1356 Key::LeftCtrl => 458976,
1357 Key::LeftShift => 458977,
1358 Key::LeftAlt => 458978,
1359 Key::LeftMeta => 458979,
1360 Key::RightCtrl => 458980,
1361 Key::RightShift => 458981,
1362 Key::RightAlt => 458982,
1363 Key::RightMeta => 458983,
1364 Key::Mute => 458879,
1365 Key::VolumeDown => 458881,
1366 Key::VolumeUp => 458880,
1367 Key::PlayPause => 786637,
1368 Key::MediaMute => 786658,
1369 Key::MediaVolumeIncrement => 786665,
1370 Key::MediaVolumeDecrement => 786666,
1371 Key::AcBack => 786980,
1372 Key::AcRefresh => 786983,
1373 Key::AcFullScreenView => 786992,
1374 Key::AcSelectTaskApplication => 786850,
1375 Key::BrightnessDown => 786543,
1376 Key::BrightnessUp => 786544,
1377 Key::Assistant => 4294901761,
1378 Key::Power => 4294901762,
1379 Key::Sleep => 4294901763,
1380 Key::Unknown0055 => 4294901845,
1381 Key::Unknown0056 => 4294901846,
1382 Key::Unknown0059 => 4294901849,
1383 Key::Unknown005C => 4294901852,
1384 Key::Unknown005D => 4294901853,
1385 Key::Unknown005E => 4294901854,
1386 Key::Unknown0079 => 4294901881,
1387 Key::Unknown007A => 4294901882,
1388 Key::Unknown007B => 4294901883,
1389 Key::Unknown007C => 4294901884,
1390 Key::Unknown0085 => 4294901893,
1391 Key::Unknown0087 => 4294901895,
1392 Key::Unknown0089 => 4294901897,
1393 Key::Unknown009C => 4294901916,
1394 Key::Unknown009F => 4294901919,
1395 Key::Unknown00A0 => 4294901920,
1396 Key::Unknown00A2 => 4294901922,
1397 Key::Unknown00A3 => 4294901923,
1398 Key::Unknown00A5 => 4294901925,
1399 Key::Unknown00A6 => 4294901926,
1400 Key::Unknown00A7 => 4294901927,
1401 Key::Unknown00A8 => 4294901928,
1402 Key::Unknown00A9 => 4294901929,
1403 Key::Unknown00Ad => 4294901933,
1404 Key::Unknown00B1 => 4294901937,
1405 Key::Unknown00B2 => 4294901938,
1406 Key::Unknown00B3 => 4294901939,
1407 Key::Unknown00B4 => 4294901940,
1408 Key::Unknown00C9 => 4294901961,
1409 Key::Unknown00Cf => 4294901967,
1410 Key::Unknown00D0 => 4294901968,
1411 Key::Unknown00D4 => 4294901972,
1412 Key::Unknown00E2 => 4294901986,
1413 Key::Unknown0120 => 4294902048,
1414 Key::Unknown0121 => 4294902049,
1415 Key::Unknown0122 => 4294902050,
1416 Key::Unknown0123 => 4294902051,
1417 Key::Unknown0124 => 4294902052,
1418 Key::Unknown0125 => 4294902053,
1419 Key::Unknown0126 => 4294902054,
1420 Key::Unknown0127 => 4294902055,
1421 Key::Unknown0128 => 4294902056,
1422 Key::Unknown0129 => 4294902057,
1423 Key::Unknown012A => 4294902058,
1424 Key::Unknown012B => 4294902059,
1425 Key::Unknown012C => 4294902060,
1426 Key::Unknown012D => 4294902061,
1427 Key::Unknown012E => 4294902062,
1428 Key::Unknown012F => 4294902063,
1429 Key::Unknown0130 => 4294902064,
1430 Key::Unknown0131 => 4294902065,
1431 Key::Unknown0132 => 4294902066,
1432 Key::Unknown0133 => 4294902067,
1433 Key::Unknown0134 => 4294902068,
1434 Key::Unknown0135 => 4294902069,
1435 Key::Unknown0136 => 4294902070,
1436 Key::Unknown0137 => 4294902071,
1437 Key::Unknown0138 => 4294902072,
1438 Key::Unknown0139 => 4294902073,
1439 Key::Unknown013A => 4294902074,
1440 Key::Unknown013B => 4294902075,
1441 Key::Unknown013C => 4294902076,
1442 Key::Unknown013D => 4294902077,
1443 Key::Unknown013E => 4294902078,
1444 Key::Unknown0161 => 4294902113,
1445 Key::Unknown016A => 4294902122,
1446 Key::Unknown016E => 4294902126,
1447 Key::Unknown0172 => 4294902130,
1448 Key::Unknown0179 => 4294902137,
1449 Key::Unknown018E => 4294902158,
1450 Key::Unknown018F => 4294902159,
1451 Key::Unknown0190 => 4294902160,
1452 Key::Unknown0191 => 4294902161,
1453 Key::Unknown0192 => 4294902162,
1454 Key::Unknown0193 => 4294902163,
1455 Key::Unknown0195 => 4294902165,
1456 Key::Unknown01D0 => 4294902224,
1457 Key::Unknown020A => 4294902282,
1458 Key::Unknown020B => 4294902283,
1459
1460 Key::UnknownOrdinal_(value) => value,
1461 }
1462 }
1463 }
1464
1465 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Key, ___E> for Key
1466 where
1467 ___E: ?Sized,
1468 {
1469 #[inline]
1470 fn encode(
1471 self,
1472 encoder: &mut ___E,
1473 out: &mut ::core::mem::MaybeUninit<crate::wire::Key>,
1474 _: (),
1475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1476 ::fidl_next::Encode::encode(&self, encoder, out, ())
1477 }
1478 }
1479
1480 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Key, ___E> for &'a Key
1481 where
1482 ___E: ?Sized,
1483 {
1484 #[inline]
1485 fn encode(
1486 self,
1487 encoder: &mut ___E,
1488 out: &mut ::core::mem::MaybeUninit<crate::wire::Key>,
1489 _: (),
1490 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1491 ::fidl_next::munge!(let crate::wire::Key { value } = out);
1492 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1493 Key::Unknown => 0,
1494
1495 Key::A => 458756,
1496
1497 Key::B => 458757,
1498
1499 Key::C => 458758,
1500
1501 Key::D => 458759,
1502
1503 Key::E => 458760,
1504
1505 Key::F => 458761,
1506
1507 Key::G => 458762,
1508
1509 Key::H => 458763,
1510
1511 Key::I => 458764,
1512
1513 Key::J => 458765,
1514
1515 Key::K => 458766,
1516
1517 Key::L => 458767,
1518
1519 Key::M => 458768,
1520
1521 Key::N => 458769,
1522
1523 Key::O => 458770,
1524
1525 Key::P => 458771,
1526
1527 Key::Q => 458772,
1528
1529 Key::R => 458773,
1530
1531 Key::S => 458774,
1532
1533 Key::T => 458775,
1534
1535 Key::U => 458776,
1536
1537 Key::V => 458777,
1538
1539 Key::W => 458778,
1540
1541 Key::X => 458779,
1542
1543 Key::Y => 458780,
1544
1545 Key::Z => 458781,
1546
1547 Key::Key1 => 458782,
1548
1549 Key::Key2 => 458783,
1550
1551 Key::Key3 => 458784,
1552
1553 Key::Key4 => 458785,
1554
1555 Key::Key5 => 458786,
1556
1557 Key::Key6 => 458787,
1558
1559 Key::Key7 => 458788,
1560
1561 Key::Key8 => 458789,
1562
1563 Key::Key9 => 458790,
1564
1565 Key::Key0 => 458791,
1566
1567 Key::Enter => 458792,
1568
1569 Key::Escape => 458793,
1570
1571 Key::Backspace => 458794,
1572
1573 Key::Tab => 458795,
1574
1575 Key::Space => 458796,
1576
1577 Key::Minus => 458797,
1578
1579 Key::Equals => 458798,
1580
1581 Key::LeftBrace => 458799,
1582
1583 Key::RightBrace => 458800,
1584
1585 Key::Backslash => 458801,
1586
1587 Key::NonUsHash => 458802,
1588
1589 Key::Semicolon => 458803,
1590
1591 Key::Apostrophe => 458804,
1592
1593 Key::GraveAccent => 458805,
1594
1595 Key::Comma => 458806,
1596
1597 Key::Dot => 458807,
1598
1599 Key::Slash => 458808,
1600
1601 Key::CapsLock => 458809,
1602
1603 Key::F1 => 458810,
1604
1605 Key::F2 => 458811,
1606
1607 Key::F3 => 458812,
1608
1609 Key::F4 => 458813,
1610
1611 Key::F5 => 458814,
1612
1613 Key::F6 => 458815,
1614
1615 Key::F7 => 458816,
1616
1617 Key::F8 => 458817,
1618
1619 Key::F9 => 458818,
1620
1621 Key::F10 => 458819,
1622
1623 Key::F11 => 458820,
1624
1625 Key::F12 => 458821,
1626
1627 Key::PrintScreen => 458822,
1628
1629 Key::ScrollLock => 458823,
1630
1631 Key::Pause => 458824,
1632
1633 Key::Insert => 458825,
1634
1635 Key::Home => 458826,
1636
1637 Key::PageUp => 458827,
1638
1639 Key::Delete => 458828,
1640
1641 Key::End => 458829,
1642
1643 Key::PageDown => 458830,
1644
1645 Key::Right => 458831,
1646
1647 Key::Left => 458832,
1648
1649 Key::Down => 458833,
1650
1651 Key::Up => 458834,
1652
1653 Key::NumLock => 458835,
1654
1655 Key::KeypadSlash => 458836,
1656
1657 Key::KeypadAsterisk => 458837,
1658
1659 Key::KeypadMinus => 458838,
1660
1661 Key::KeypadPlus => 458839,
1662
1663 Key::KeypadEnter => 458840,
1664
1665 Key::Keypad1 => 458841,
1666
1667 Key::Keypad2 => 458842,
1668
1669 Key::Keypad3 => 458843,
1670
1671 Key::Keypad4 => 458844,
1672
1673 Key::Keypad5 => 458845,
1674
1675 Key::Keypad6 => 458846,
1676
1677 Key::Keypad7 => 458847,
1678
1679 Key::Keypad8 => 458848,
1680
1681 Key::Keypad9 => 458849,
1682
1683 Key::Keypad0 => 458850,
1684
1685 Key::KeypadDot => 458851,
1686
1687 Key::NonUsBackslash => 458852,
1688
1689 Key::KeypadEquals => 458855,
1690
1691 Key::Menu => 458870,
1692
1693 Key::LeftCtrl => 458976,
1694
1695 Key::LeftShift => 458977,
1696
1697 Key::LeftAlt => 458978,
1698
1699 Key::LeftMeta => 458979,
1700
1701 Key::RightCtrl => 458980,
1702
1703 Key::RightShift => 458981,
1704
1705 Key::RightAlt => 458982,
1706
1707 Key::RightMeta => 458983,
1708
1709 Key::Mute => 458879,
1710
1711 Key::VolumeDown => 458881,
1712
1713 Key::VolumeUp => 458880,
1714
1715 Key::PlayPause => 786637,
1716
1717 Key::MediaMute => 786658,
1718
1719 Key::MediaVolumeIncrement => 786665,
1720
1721 Key::MediaVolumeDecrement => 786666,
1722
1723 Key::AcBack => 786980,
1724
1725 Key::AcRefresh => 786983,
1726
1727 Key::AcFullScreenView => 786992,
1728
1729 Key::AcSelectTaskApplication => 786850,
1730
1731 Key::BrightnessDown => 786543,
1732
1733 Key::BrightnessUp => 786544,
1734
1735 Key::Assistant => 4294901761,
1736
1737 Key::Power => 4294901762,
1738
1739 Key::Sleep => 4294901763,
1740
1741 Key::Unknown0055 => 4294901845,
1742
1743 Key::Unknown0056 => 4294901846,
1744
1745 Key::Unknown0059 => 4294901849,
1746
1747 Key::Unknown005C => 4294901852,
1748
1749 Key::Unknown005D => 4294901853,
1750
1751 Key::Unknown005E => 4294901854,
1752
1753 Key::Unknown0079 => 4294901881,
1754
1755 Key::Unknown007A => 4294901882,
1756
1757 Key::Unknown007B => 4294901883,
1758
1759 Key::Unknown007C => 4294901884,
1760
1761 Key::Unknown0085 => 4294901893,
1762
1763 Key::Unknown0087 => 4294901895,
1764
1765 Key::Unknown0089 => 4294901897,
1766
1767 Key::Unknown009C => 4294901916,
1768
1769 Key::Unknown009F => 4294901919,
1770
1771 Key::Unknown00A0 => 4294901920,
1772
1773 Key::Unknown00A2 => 4294901922,
1774
1775 Key::Unknown00A3 => 4294901923,
1776
1777 Key::Unknown00A5 => 4294901925,
1778
1779 Key::Unknown00A6 => 4294901926,
1780
1781 Key::Unknown00A7 => 4294901927,
1782
1783 Key::Unknown00A8 => 4294901928,
1784
1785 Key::Unknown00A9 => 4294901929,
1786
1787 Key::Unknown00Ad => 4294901933,
1788
1789 Key::Unknown00B1 => 4294901937,
1790
1791 Key::Unknown00B2 => 4294901938,
1792
1793 Key::Unknown00B3 => 4294901939,
1794
1795 Key::Unknown00B4 => 4294901940,
1796
1797 Key::Unknown00C9 => 4294901961,
1798
1799 Key::Unknown00Cf => 4294901967,
1800
1801 Key::Unknown00D0 => 4294901968,
1802
1803 Key::Unknown00D4 => 4294901972,
1804
1805 Key::Unknown00E2 => 4294901986,
1806
1807 Key::Unknown0120 => 4294902048,
1808
1809 Key::Unknown0121 => 4294902049,
1810
1811 Key::Unknown0122 => 4294902050,
1812
1813 Key::Unknown0123 => 4294902051,
1814
1815 Key::Unknown0124 => 4294902052,
1816
1817 Key::Unknown0125 => 4294902053,
1818
1819 Key::Unknown0126 => 4294902054,
1820
1821 Key::Unknown0127 => 4294902055,
1822
1823 Key::Unknown0128 => 4294902056,
1824
1825 Key::Unknown0129 => 4294902057,
1826
1827 Key::Unknown012A => 4294902058,
1828
1829 Key::Unknown012B => 4294902059,
1830
1831 Key::Unknown012C => 4294902060,
1832
1833 Key::Unknown012D => 4294902061,
1834
1835 Key::Unknown012E => 4294902062,
1836
1837 Key::Unknown012F => 4294902063,
1838
1839 Key::Unknown0130 => 4294902064,
1840
1841 Key::Unknown0131 => 4294902065,
1842
1843 Key::Unknown0132 => 4294902066,
1844
1845 Key::Unknown0133 => 4294902067,
1846
1847 Key::Unknown0134 => 4294902068,
1848
1849 Key::Unknown0135 => 4294902069,
1850
1851 Key::Unknown0136 => 4294902070,
1852
1853 Key::Unknown0137 => 4294902071,
1854
1855 Key::Unknown0138 => 4294902072,
1856
1857 Key::Unknown0139 => 4294902073,
1858
1859 Key::Unknown013A => 4294902074,
1860
1861 Key::Unknown013B => 4294902075,
1862
1863 Key::Unknown013C => 4294902076,
1864
1865 Key::Unknown013D => 4294902077,
1866
1867 Key::Unknown013E => 4294902078,
1868
1869 Key::Unknown0161 => 4294902113,
1870
1871 Key::Unknown016A => 4294902122,
1872
1873 Key::Unknown016E => 4294902126,
1874
1875 Key::Unknown0172 => 4294902130,
1876
1877 Key::Unknown0179 => 4294902137,
1878
1879 Key::Unknown018E => 4294902158,
1880
1881 Key::Unknown018F => 4294902159,
1882
1883 Key::Unknown0190 => 4294902160,
1884
1885 Key::Unknown0191 => 4294902161,
1886
1887 Key::Unknown0192 => 4294902162,
1888
1889 Key::Unknown0193 => 4294902163,
1890
1891 Key::Unknown0195 => 4294902165,
1892
1893 Key::Unknown01D0 => 4294902224,
1894
1895 Key::Unknown020A => 4294902282,
1896
1897 Key::Unknown020B => 4294902283,
1898
1899 Key::UnknownOrdinal_(value) => value,
1900 }));
1901
1902 Ok(())
1903 }
1904 }
1905
1906 impl ::core::convert::From<crate::wire::Key> for Key {
1907 fn from(wire: crate::wire::Key) -> Self {
1908 match u32::from(wire.value) {
1909 0 => Self::Unknown,
1910
1911 458756 => Self::A,
1912
1913 458757 => Self::B,
1914
1915 458758 => Self::C,
1916
1917 458759 => Self::D,
1918
1919 458760 => Self::E,
1920
1921 458761 => Self::F,
1922
1923 458762 => Self::G,
1924
1925 458763 => Self::H,
1926
1927 458764 => Self::I,
1928
1929 458765 => Self::J,
1930
1931 458766 => Self::K,
1932
1933 458767 => Self::L,
1934
1935 458768 => Self::M,
1936
1937 458769 => Self::N,
1938
1939 458770 => Self::O,
1940
1941 458771 => Self::P,
1942
1943 458772 => Self::Q,
1944
1945 458773 => Self::R,
1946
1947 458774 => Self::S,
1948
1949 458775 => Self::T,
1950
1951 458776 => Self::U,
1952
1953 458777 => Self::V,
1954
1955 458778 => Self::W,
1956
1957 458779 => Self::X,
1958
1959 458780 => Self::Y,
1960
1961 458781 => Self::Z,
1962
1963 458782 => Self::Key1,
1964
1965 458783 => Self::Key2,
1966
1967 458784 => Self::Key3,
1968
1969 458785 => Self::Key4,
1970
1971 458786 => Self::Key5,
1972
1973 458787 => Self::Key6,
1974
1975 458788 => Self::Key7,
1976
1977 458789 => Self::Key8,
1978
1979 458790 => Self::Key9,
1980
1981 458791 => Self::Key0,
1982
1983 458792 => Self::Enter,
1984
1985 458793 => Self::Escape,
1986
1987 458794 => Self::Backspace,
1988
1989 458795 => Self::Tab,
1990
1991 458796 => Self::Space,
1992
1993 458797 => Self::Minus,
1994
1995 458798 => Self::Equals,
1996
1997 458799 => Self::LeftBrace,
1998
1999 458800 => Self::RightBrace,
2000
2001 458801 => Self::Backslash,
2002
2003 458802 => Self::NonUsHash,
2004
2005 458803 => Self::Semicolon,
2006
2007 458804 => Self::Apostrophe,
2008
2009 458805 => Self::GraveAccent,
2010
2011 458806 => Self::Comma,
2012
2013 458807 => Self::Dot,
2014
2015 458808 => Self::Slash,
2016
2017 458809 => Self::CapsLock,
2018
2019 458810 => Self::F1,
2020
2021 458811 => Self::F2,
2022
2023 458812 => Self::F3,
2024
2025 458813 => Self::F4,
2026
2027 458814 => Self::F5,
2028
2029 458815 => Self::F6,
2030
2031 458816 => Self::F7,
2032
2033 458817 => Self::F8,
2034
2035 458818 => Self::F9,
2036
2037 458819 => Self::F10,
2038
2039 458820 => Self::F11,
2040
2041 458821 => Self::F12,
2042
2043 458822 => Self::PrintScreen,
2044
2045 458823 => Self::ScrollLock,
2046
2047 458824 => Self::Pause,
2048
2049 458825 => Self::Insert,
2050
2051 458826 => Self::Home,
2052
2053 458827 => Self::PageUp,
2054
2055 458828 => Self::Delete,
2056
2057 458829 => Self::End,
2058
2059 458830 => Self::PageDown,
2060
2061 458831 => Self::Right,
2062
2063 458832 => Self::Left,
2064
2065 458833 => Self::Down,
2066
2067 458834 => Self::Up,
2068
2069 458835 => Self::NumLock,
2070
2071 458836 => Self::KeypadSlash,
2072
2073 458837 => Self::KeypadAsterisk,
2074
2075 458838 => Self::KeypadMinus,
2076
2077 458839 => Self::KeypadPlus,
2078
2079 458840 => Self::KeypadEnter,
2080
2081 458841 => Self::Keypad1,
2082
2083 458842 => Self::Keypad2,
2084
2085 458843 => Self::Keypad3,
2086
2087 458844 => Self::Keypad4,
2088
2089 458845 => Self::Keypad5,
2090
2091 458846 => Self::Keypad6,
2092
2093 458847 => Self::Keypad7,
2094
2095 458848 => Self::Keypad8,
2096
2097 458849 => Self::Keypad9,
2098
2099 458850 => Self::Keypad0,
2100
2101 458851 => Self::KeypadDot,
2102
2103 458852 => Self::NonUsBackslash,
2104
2105 458855 => Self::KeypadEquals,
2106
2107 458870 => Self::Menu,
2108
2109 458976 => Self::LeftCtrl,
2110
2111 458977 => Self::LeftShift,
2112
2113 458978 => Self::LeftAlt,
2114
2115 458979 => Self::LeftMeta,
2116
2117 458980 => Self::RightCtrl,
2118
2119 458981 => Self::RightShift,
2120
2121 458982 => Self::RightAlt,
2122
2123 458983 => Self::RightMeta,
2124
2125 458879 => Self::Mute,
2126
2127 458881 => Self::VolumeDown,
2128
2129 458880 => Self::VolumeUp,
2130
2131 786637 => Self::PlayPause,
2132
2133 786658 => Self::MediaMute,
2134
2135 786665 => Self::MediaVolumeIncrement,
2136
2137 786666 => Self::MediaVolumeDecrement,
2138
2139 786980 => Self::AcBack,
2140
2141 786983 => Self::AcRefresh,
2142
2143 786992 => Self::AcFullScreenView,
2144
2145 786850 => Self::AcSelectTaskApplication,
2146
2147 786543 => Self::BrightnessDown,
2148
2149 786544 => Self::BrightnessUp,
2150
2151 4294901761 => Self::Assistant,
2152
2153 4294901762 => Self::Power,
2154
2155 4294901763 => Self::Sleep,
2156
2157 4294901845 => Self::Unknown0055,
2158
2159 4294901846 => Self::Unknown0056,
2160
2161 4294901849 => Self::Unknown0059,
2162
2163 4294901852 => Self::Unknown005C,
2164
2165 4294901853 => Self::Unknown005D,
2166
2167 4294901854 => Self::Unknown005E,
2168
2169 4294901881 => Self::Unknown0079,
2170
2171 4294901882 => Self::Unknown007A,
2172
2173 4294901883 => Self::Unknown007B,
2174
2175 4294901884 => Self::Unknown007C,
2176
2177 4294901893 => Self::Unknown0085,
2178
2179 4294901895 => Self::Unknown0087,
2180
2181 4294901897 => Self::Unknown0089,
2182
2183 4294901916 => Self::Unknown009C,
2184
2185 4294901919 => Self::Unknown009F,
2186
2187 4294901920 => Self::Unknown00A0,
2188
2189 4294901922 => Self::Unknown00A2,
2190
2191 4294901923 => Self::Unknown00A3,
2192
2193 4294901925 => Self::Unknown00A5,
2194
2195 4294901926 => Self::Unknown00A6,
2196
2197 4294901927 => Self::Unknown00A7,
2198
2199 4294901928 => Self::Unknown00A8,
2200
2201 4294901929 => Self::Unknown00A9,
2202
2203 4294901933 => Self::Unknown00Ad,
2204
2205 4294901937 => Self::Unknown00B1,
2206
2207 4294901938 => Self::Unknown00B2,
2208
2209 4294901939 => Self::Unknown00B3,
2210
2211 4294901940 => Self::Unknown00B4,
2212
2213 4294901961 => Self::Unknown00C9,
2214
2215 4294901967 => Self::Unknown00Cf,
2216
2217 4294901968 => Self::Unknown00D0,
2218
2219 4294901972 => Self::Unknown00D4,
2220
2221 4294901986 => Self::Unknown00E2,
2222
2223 4294902048 => Self::Unknown0120,
2224
2225 4294902049 => Self::Unknown0121,
2226
2227 4294902050 => Self::Unknown0122,
2228
2229 4294902051 => Self::Unknown0123,
2230
2231 4294902052 => Self::Unknown0124,
2232
2233 4294902053 => Self::Unknown0125,
2234
2235 4294902054 => Self::Unknown0126,
2236
2237 4294902055 => Self::Unknown0127,
2238
2239 4294902056 => Self::Unknown0128,
2240
2241 4294902057 => Self::Unknown0129,
2242
2243 4294902058 => Self::Unknown012A,
2244
2245 4294902059 => Self::Unknown012B,
2246
2247 4294902060 => Self::Unknown012C,
2248
2249 4294902061 => Self::Unknown012D,
2250
2251 4294902062 => Self::Unknown012E,
2252
2253 4294902063 => Self::Unknown012F,
2254
2255 4294902064 => Self::Unknown0130,
2256
2257 4294902065 => Self::Unknown0131,
2258
2259 4294902066 => Self::Unknown0132,
2260
2261 4294902067 => Self::Unknown0133,
2262
2263 4294902068 => Self::Unknown0134,
2264
2265 4294902069 => Self::Unknown0135,
2266
2267 4294902070 => Self::Unknown0136,
2268
2269 4294902071 => Self::Unknown0137,
2270
2271 4294902072 => Self::Unknown0138,
2272
2273 4294902073 => Self::Unknown0139,
2274
2275 4294902074 => Self::Unknown013A,
2276
2277 4294902075 => Self::Unknown013B,
2278
2279 4294902076 => Self::Unknown013C,
2280
2281 4294902077 => Self::Unknown013D,
2282
2283 4294902078 => Self::Unknown013E,
2284
2285 4294902113 => Self::Unknown0161,
2286
2287 4294902122 => Self::Unknown016A,
2288
2289 4294902126 => Self::Unknown016E,
2290
2291 4294902130 => Self::Unknown0172,
2292
2293 4294902137 => Self::Unknown0179,
2294
2295 4294902158 => Self::Unknown018E,
2296
2297 4294902159 => Self::Unknown018F,
2298
2299 4294902160 => Self::Unknown0190,
2300
2301 4294902161 => Self::Unknown0191,
2302
2303 4294902162 => Self::Unknown0192,
2304
2305 4294902163 => Self::Unknown0193,
2306
2307 4294902165 => Self::Unknown0195,
2308
2309 4294902224 => Self::Unknown01D0,
2310
2311 4294902282 => Self::Unknown020A,
2312
2313 4294902283 => Self::Unknown020B,
2314
2315 value => Self::UnknownOrdinal_(value),
2316 }
2317 }
2318 }
2319
2320 impl ::fidl_next::FromWire<crate::wire::Key> for Key {
2321 #[inline]
2322 fn from_wire(wire: crate::wire::Key) -> Self {
2323 Self::from(wire)
2324 }
2325 }
2326
2327 impl ::fidl_next::FromWireRef<crate::wire::Key> for Key {
2328 #[inline]
2329 fn from_wire_ref(wire: &crate::wire::Key) -> Self {
2330 Self::from(*wire)
2331 }
2332 }
2333
2334 #[doc = " Keymaps that should always be present and selectable. The fallback keymaps\n may be useful on their own but are mainly here to ensure that at least some\n keymap is present if no other custom keymaps have been defined or in use.\n"]
2335 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2336 #[repr(u32)]
2337 pub enum KeymapId {
2338 UsQwerty = 0,
2339 FrAzerty = 1,
2340 UsDvorak = 2,
2341 UsColemak = 3,
2342 UnknownOrdinal_(u32) = 4,
2343 }
2344 impl ::std::convert::From<u32> for KeymapId {
2345 fn from(value: u32) -> Self {
2346 match value {
2347 0 => Self::UsQwerty,
2348 1 => Self::FrAzerty,
2349 2 => Self::UsDvorak,
2350 3 => Self::UsColemak,
2351
2352 _ => Self::UnknownOrdinal_(value),
2353 }
2354 }
2355 }
2356
2357 impl ::std::convert::From<KeymapId> for u32 {
2358 fn from(value: KeymapId) -> Self {
2359 match value {
2360 KeymapId::UsQwerty => 0,
2361 KeymapId::FrAzerty => 1,
2362 KeymapId::UsDvorak => 2,
2363 KeymapId::UsColemak => 3,
2364
2365 KeymapId::UnknownOrdinal_(value) => value,
2366 }
2367 }
2368 }
2369
2370 unsafe impl<___E> ::fidl_next::Encode<crate::wire::KeymapId, ___E> for KeymapId
2371 where
2372 ___E: ?Sized,
2373 {
2374 #[inline]
2375 fn encode(
2376 self,
2377 encoder: &mut ___E,
2378 out: &mut ::core::mem::MaybeUninit<crate::wire::KeymapId>,
2379 _: (),
2380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2381 ::fidl_next::Encode::encode(&self, encoder, out, ())
2382 }
2383 }
2384
2385 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::KeymapId, ___E> for &'a KeymapId
2386 where
2387 ___E: ?Sized,
2388 {
2389 #[inline]
2390 fn encode(
2391 self,
2392 encoder: &mut ___E,
2393 out: &mut ::core::mem::MaybeUninit<crate::wire::KeymapId>,
2394 _: (),
2395 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2396 ::fidl_next::munge!(let crate::wire::KeymapId { value } = out);
2397 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2398 KeymapId::UsQwerty => 0,
2399
2400 KeymapId::FrAzerty => 1,
2401
2402 KeymapId::UsDvorak => 2,
2403
2404 KeymapId::UsColemak => 3,
2405
2406 KeymapId::UnknownOrdinal_(value) => value,
2407 }));
2408
2409 Ok(())
2410 }
2411 }
2412
2413 impl ::core::convert::From<crate::wire::KeymapId> for KeymapId {
2414 fn from(wire: crate::wire::KeymapId) -> Self {
2415 match u32::from(wire.value) {
2416 0 => Self::UsQwerty,
2417
2418 1 => Self::FrAzerty,
2419
2420 2 => Self::UsDvorak,
2421
2422 3 => Self::UsColemak,
2423
2424 value => Self::UnknownOrdinal_(value),
2425 }
2426 }
2427 }
2428
2429 impl ::fidl_next::FromWire<crate::wire::KeymapId> for KeymapId {
2430 #[inline]
2431 fn from_wire(wire: crate::wire::KeymapId) -> Self {
2432 Self::from(wire)
2433 }
2434 }
2435
2436 impl ::fidl_next::FromWireRef<crate::wire::KeymapId> for KeymapId {
2437 #[inline]
2438 fn from_wire_ref(wire: &crate::wire::KeymapId) -> Self {
2439 Self::from(*wire)
2440 }
2441 }
2442}
2443
2444pub mod wire {
2445
2446 #[derive(Clone, Debug)]
2448 #[repr(C)]
2449 pub struct Range {
2450 pub min: ::fidl_next::wire::Int64,
2451
2452 pub max: ::fidl_next::wire::Int64,
2453 }
2454
2455 static_assertions::const_assert_eq!(std::mem::size_of::<Range>(), 16);
2456 static_assertions::const_assert_eq!(std::mem::align_of::<Range>(), 8);
2457
2458 static_assertions::const_assert_eq!(std::mem::offset_of!(Range, min), 0);
2459
2460 static_assertions::const_assert_eq!(std::mem::offset_of!(Range, max), 8);
2461
2462 impl ::fidl_next::Constrained for Range {
2463 type Constraint = ();
2464
2465 fn validate(
2466 _: ::fidl_next::Slot<'_, Self>,
2467 _: Self::Constraint,
2468 ) -> Result<(), ::fidl_next::ValidationError> {
2469 Ok(())
2470 }
2471 }
2472
2473 unsafe impl ::fidl_next::Wire for Range {
2474 type Narrowed<'de> = Range;
2475
2476 #[inline]
2477 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2478 ::fidl_next::munge! {
2479 let Self {
2480 min,
2481 max,
2482
2483 } = &mut *out_;
2484 }
2485
2486 ::fidl_next::Wire::zero_padding(min);
2487
2488 ::fidl_next::Wire::zero_padding(max);
2489 }
2490 }
2491
2492 unsafe impl<___D> ::fidl_next::Decode<___D> for Range
2493 where
2494 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2495 {
2496 fn decode(
2497 slot_: ::fidl_next::Slot<'_, Self>,
2498 decoder_: &mut ___D,
2499 _: (),
2500 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2501 ::fidl_next::munge! {
2502 let Self {
2503 mut min,
2504 mut max,
2505
2506 } = slot_;
2507 }
2508
2509 let _field = min.as_mut();
2510
2511 ::fidl_next::Decode::decode(min.as_mut(), decoder_, ())?;
2512
2513 let _field = max.as_mut();
2514
2515 ::fidl_next::Decode::decode(max.as_mut(), decoder_, ())?;
2516
2517 Ok(())
2518 }
2519 }
2520
2521 impl ::fidl_next::IntoNatural for Range {
2522 type Natural = crate::natural::Range;
2523 }
2524
2525 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2527 #[repr(transparent)]
2528 pub struct UnitType {
2529 pub(crate) value: ::fidl_next::wire::Uint32,
2530 }
2531
2532 impl ::fidl_next::Constrained for UnitType {
2533 type Constraint = ();
2534
2535 fn validate(
2536 _: ::fidl_next::Slot<'_, Self>,
2537 _: Self::Constraint,
2538 ) -> Result<(), ::fidl_next::ValidationError> {
2539 Ok(())
2540 }
2541 }
2542
2543 unsafe impl ::fidl_next::Wire for UnitType {
2544 type Narrowed<'de> = Self;
2545
2546 #[inline]
2547 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2548 }
2550 }
2551
2552 impl UnitType {
2553 pub const NONE: UnitType = UnitType { value: ::fidl_next::wire::Uint32(0) };
2554
2555 pub const OTHER: UnitType = UnitType { value: ::fidl_next::wire::Uint32(1) };
2556
2557 pub const METERS: UnitType = UnitType { value: ::fidl_next::wire::Uint32(2) };
2558
2559 pub const GRAMS: UnitType = UnitType { value: ::fidl_next::wire::Uint32(3) };
2560
2561 pub const DEGREES: UnitType = UnitType { value: ::fidl_next::wire::Uint32(4) };
2562
2563 pub const ENGLISH_ANGULAR_VELOCITY: UnitType =
2564 UnitType { value: ::fidl_next::wire::Uint32(5) };
2565
2566 pub const SI_LINEAR_VELOCITY: UnitType = UnitType { value: ::fidl_next::wire::Uint32(6) };
2567
2568 pub const SI_LINEAR_ACCELERATION: UnitType =
2569 UnitType { value: ::fidl_next::wire::Uint32(7) };
2570
2571 pub const WEBERS: UnitType = UnitType { value: ::fidl_next::wire::Uint32(8) };
2572
2573 pub const CANDELAS: UnitType = UnitType { value: ::fidl_next::wire::Uint32(9) };
2574
2575 pub const PASCALS: UnitType = UnitType { value: ::fidl_next::wire::Uint32(10) };
2576
2577 pub const LUX: UnitType = UnitType { value: ::fidl_next::wire::Uint32(11) };
2578
2579 pub const SECONDS: UnitType = UnitType { value: ::fidl_next::wire::Uint32(12) };
2580 }
2581
2582 unsafe impl<___D> ::fidl_next::Decode<___D> for UnitType
2583 where
2584 ___D: ?Sized,
2585 {
2586 fn decode(
2587 slot: ::fidl_next::Slot<'_, Self>,
2588 _: &mut ___D,
2589 _: (),
2590 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2591 Ok(())
2592 }
2593 }
2594
2595 impl ::core::convert::From<crate::natural::UnitType> for UnitType {
2596 fn from(natural: crate::natural::UnitType) -> Self {
2597 match natural {
2598 crate::natural::UnitType::None => UnitType::NONE,
2599
2600 crate::natural::UnitType::Other => UnitType::OTHER,
2601
2602 crate::natural::UnitType::Meters => UnitType::METERS,
2603
2604 crate::natural::UnitType::Grams => UnitType::GRAMS,
2605
2606 crate::natural::UnitType::Degrees => UnitType::DEGREES,
2607
2608 crate::natural::UnitType::EnglishAngularVelocity => {
2609 UnitType::ENGLISH_ANGULAR_VELOCITY
2610 }
2611
2612 crate::natural::UnitType::SiLinearVelocity => UnitType::SI_LINEAR_VELOCITY,
2613
2614 crate::natural::UnitType::SiLinearAcceleration => UnitType::SI_LINEAR_ACCELERATION,
2615
2616 crate::natural::UnitType::Webers => UnitType::WEBERS,
2617
2618 crate::natural::UnitType::Candelas => UnitType::CANDELAS,
2619
2620 crate::natural::UnitType::Pascals => UnitType::PASCALS,
2621
2622 crate::natural::UnitType::Lux => UnitType::LUX,
2623
2624 crate::natural::UnitType::Seconds => UnitType::SECONDS,
2625
2626 crate::natural::UnitType::UnknownOrdinal_(value) => {
2627 UnitType { value: ::fidl_next::wire::Uint32::from(value) }
2628 }
2629 }
2630 }
2631 }
2632
2633 impl ::fidl_next::IntoNatural for UnitType {
2634 type Natural = crate::natural::UnitType;
2635 }
2636
2637 #[derive(Clone, Debug)]
2639 #[repr(C)]
2640 pub struct Unit {
2641 pub type_: crate::wire::UnitType,
2642
2643 pub exponent: ::fidl_next::wire::Int32,
2644 }
2645
2646 static_assertions::const_assert_eq!(std::mem::size_of::<Unit>(), 8);
2647 static_assertions::const_assert_eq!(std::mem::align_of::<Unit>(), 4);
2648
2649 static_assertions::const_assert_eq!(std::mem::offset_of!(Unit, type_), 0);
2650
2651 static_assertions::const_assert_eq!(std::mem::offset_of!(Unit, exponent), 4);
2652
2653 impl ::fidl_next::Constrained for Unit {
2654 type Constraint = ();
2655
2656 fn validate(
2657 _: ::fidl_next::Slot<'_, Self>,
2658 _: Self::Constraint,
2659 ) -> Result<(), ::fidl_next::ValidationError> {
2660 Ok(())
2661 }
2662 }
2663
2664 unsafe impl ::fidl_next::Wire for Unit {
2665 type Narrowed<'de> = Unit;
2666
2667 #[inline]
2668 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2669 ::fidl_next::munge! {
2670 let Self {
2671 type_,
2672 exponent,
2673
2674 } = &mut *out_;
2675 }
2676
2677 ::fidl_next::Wire::zero_padding(type_);
2678
2679 ::fidl_next::Wire::zero_padding(exponent);
2680 }
2681 }
2682
2683 unsafe impl<___D> ::fidl_next::Decode<___D> for Unit
2684 where
2685 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2686 {
2687 fn decode(
2688 slot_: ::fidl_next::Slot<'_, Self>,
2689 decoder_: &mut ___D,
2690 _: (),
2691 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2692 ::fidl_next::munge! {
2693 let Self {
2694 mut type_,
2695 mut exponent,
2696
2697 } = slot_;
2698 }
2699
2700 let _field = type_.as_mut();
2701
2702 ::fidl_next::Decode::decode(type_.as_mut(), decoder_, ())?;
2703
2704 let _field = exponent.as_mut();
2705
2706 ::fidl_next::Decode::decode(exponent.as_mut(), decoder_, ())?;
2707
2708 Ok(())
2709 }
2710 }
2711
2712 impl ::fidl_next::IntoNatural for Unit {
2713 type Natural = crate::natural::Unit;
2714 }
2715
2716 #[derive(Clone, Debug)]
2718 #[repr(C)]
2719 pub struct Axis {
2720 pub range: crate::wire::Range,
2721
2722 pub unit: crate::wire::Unit,
2723 }
2724
2725 static_assertions::const_assert_eq!(std::mem::size_of::<Axis>(), 24);
2726 static_assertions::const_assert_eq!(std::mem::align_of::<Axis>(), 8);
2727
2728 static_assertions::const_assert_eq!(std::mem::offset_of!(Axis, range), 0);
2729
2730 static_assertions::const_assert_eq!(std::mem::offset_of!(Axis, unit), 16);
2731
2732 impl ::fidl_next::Constrained for Axis {
2733 type Constraint = ();
2734
2735 fn validate(
2736 _: ::fidl_next::Slot<'_, Self>,
2737 _: Self::Constraint,
2738 ) -> Result<(), ::fidl_next::ValidationError> {
2739 Ok(())
2740 }
2741 }
2742
2743 unsafe impl ::fidl_next::Wire for Axis {
2744 type Narrowed<'de> = Axis;
2745
2746 #[inline]
2747 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2748 ::fidl_next::munge! {
2749 let Self {
2750 range,
2751 unit,
2752
2753 } = &mut *out_;
2754 }
2755
2756 ::fidl_next::Wire::zero_padding(range);
2757
2758 ::fidl_next::Wire::zero_padding(unit);
2759 }
2760 }
2761
2762 unsafe impl<___D> ::fidl_next::Decode<___D> for Axis
2763 where
2764 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2765 {
2766 fn decode(
2767 slot_: ::fidl_next::Slot<'_, Self>,
2768 decoder_: &mut ___D,
2769 _: (),
2770 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2771 ::fidl_next::munge! {
2772 let Self {
2773 mut range,
2774 mut unit,
2775
2776 } = slot_;
2777 }
2778
2779 let _field = range.as_mut();
2780
2781 ::fidl_next::Decode::decode(range.as_mut(), decoder_, ())?;
2782
2783 let _field = unit.as_mut();
2784
2785 ::fidl_next::Decode::decode(unit.as_mut(), decoder_, ())?;
2786
2787 Ok(())
2788 }
2789 }
2790
2791 impl ::fidl_next::IntoNatural for Axis {
2792 type Natural = crate::natural::Axis;
2793 }
2794
2795 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2797 #[repr(transparent)]
2798 pub struct ConsumerControlButton {
2799 pub(crate) value: ::fidl_next::wire::Uint32,
2800 }
2801
2802 impl ::fidl_next::Constrained for ConsumerControlButton {
2803 type Constraint = ();
2804
2805 fn validate(
2806 _: ::fidl_next::Slot<'_, Self>,
2807 _: Self::Constraint,
2808 ) -> Result<(), ::fidl_next::ValidationError> {
2809 Ok(())
2810 }
2811 }
2812
2813 unsafe impl ::fidl_next::Wire for ConsumerControlButton {
2814 type Narrowed<'de> = Self;
2815
2816 #[inline]
2817 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2818 }
2820 }
2821
2822 impl ConsumerControlButton {
2823 pub const VOLUME_UP: ConsumerControlButton =
2824 ConsumerControlButton { value: ::fidl_next::wire::Uint32(1) };
2825
2826 pub const VOLUME_DOWN: ConsumerControlButton =
2827 ConsumerControlButton { value: ::fidl_next::wire::Uint32(2) };
2828
2829 pub const PAUSE: ConsumerControlButton =
2830 ConsumerControlButton { value: ::fidl_next::wire::Uint32(3) };
2831
2832 pub const FACTORY_RESET: ConsumerControlButton =
2833 ConsumerControlButton { value: ::fidl_next::wire::Uint32(4) };
2834
2835 pub const MIC_MUTE: ConsumerControlButton =
2836 ConsumerControlButton { value: ::fidl_next::wire::Uint32(5) };
2837
2838 pub const REBOOT: ConsumerControlButton =
2839 ConsumerControlButton { value: ::fidl_next::wire::Uint32(6) };
2840
2841 pub const CAMERA_DISABLE: ConsumerControlButton =
2842 ConsumerControlButton { value: ::fidl_next::wire::Uint32(7) };
2843
2844 pub const FUNCTION: ConsumerControlButton =
2845 ConsumerControlButton { value: ::fidl_next::wire::Uint32(8) };
2846
2847 pub const POWER: ConsumerControlButton =
2848 ConsumerControlButton { value: ::fidl_next::wire::Uint32(9) };
2849 }
2850
2851 unsafe impl<___D> ::fidl_next::Decode<___D> for ConsumerControlButton
2852 where
2853 ___D: ?Sized,
2854 {
2855 fn decode(
2856 slot: ::fidl_next::Slot<'_, Self>,
2857 _: &mut ___D,
2858 _: (),
2859 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2860 Ok(())
2861 }
2862 }
2863
2864 impl ::core::convert::From<crate::natural::ConsumerControlButton> for ConsumerControlButton {
2865 fn from(natural: crate::natural::ConsumerControlButton) -> Self {
2866 match natural {
2867 crate::natural::ConsumerControlButton::VolumeUp => ConsumerControlButton::VOLUME_UP,
2868
2869 crate::natural::ConsumerControlButton::VolumeDown => {
2870 ConsumerControlButton::VOLUME_DOWN
2871 }
2872
2873 crate::natural::ConsumerControlButton::Pause => ConsumerControlButton::PAUSE,
2874
2875 crate::natural::ConsumerControlButton::FactoryReset => {
2876 ConsumerControlButton::FACTORY_RESET
2877 }
2878
2879 crate::natural::ConsumerControlButton::MicMute => ConsumerControlButton::MIC_MUTE,
2880
2881 crate::natural::ConsumerControlButton::Reboot => ConsumerControlButton::REBOOT,
2882
2883 crate::natural::ConsumerControlButton::CameraDisable => {
2884 ConsumerControlButton::CAMERA_DISABLE
2885 }
2886
2887 crate::natural::ConsumerControlButton::Function => ConsumerControlButton::FUNCTION,
2888
2889 crate::natural::ConsumerControlButton::Power => ConsumerControlButton::POWER,
2890
2891 crate::natural::ConsumerControlButton::UnknownOrdinal_(value) => {
2892 ConsumerControlButton { value: ::fidl_next::wire::Uint32::from(value) }
2893 }
2894 }
2895 }
2896 }
2897
2898 impl ::fidl_next::IntoNatural for ConsumerControlButton {
2899 type Natural = crate::natural::ConsumerControlButton;
2900 }
2901
2902 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2904 #[repr(transparent)]
2905 pub struct Key {
2906 pub(crate) value: ::fidl_next::wire::Uint32,
2907 }
2908
2909 impl ::fidl_next::Constrained for Key {
2910 type Constraint = ();
2911
2912 fn validate(
2913 _: ::fidl_next::Slot<'_, Self>,
2914 _: Self::Constraint,
2915 ) -> Result<(), ::fidl_next::ValidationError> {
2916 Ok(())
2917 }
2918 }
2919
2920 unsafe impl ::fidl_next::Wire for Key {
2921 type Narrowed<'de> = Self;
2922
2923 #[inline]
2924 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2925 }
2927 }
2928
2929 impl Key {
2930 pub const UNKNOWN: Key = Key { value: ::fidl_next::wire::Uint32(0) };
2931
2932 pub const A: Key = Key { value: ::fidl_next::wire::Uint32(458756) };
2933
2934 pub const B: Key = Key { value: ::fidl_next::wire::Uint32(458757) };
2935
2936 pub const C: Key = Key { value: ::fidl_next::wire::Uint32(458758) };
2937
2938 pub const D: Key = Key { value: ::fidl_next::wire::Uint32(458759) };
2939
2940 pub const E: Key = Key { value: ::fidl_next::wire::Uint32(458760) };
2941
2942 pub const F: Key = Key { value: ::fidl_next::wire::Uint32(458761) };
2943
2944 pub const G: Key = Key { value: ::fidl_next::wire::Uint32(458762) };
2945
2946 pub const H: Key = Key { value: ::fidl_next::wire::Uint32(458763) };
2947
2948 pub const I: Key = Key { value: ::fidl_next::wire::Uint32(458764) };
2949
2950 pub const J: Key = Key { value: ::fidl_next::wire::Uint32(458765) };
2951
2952 pub const K: Key = Key { value: ::fidl_next::wire::Uint32(458766) };
2953
2954 pub const L: Key = Key { value: ::fidl_next::wire::Uint32(458767) };
2955
2956 pub const M: Key = Key { value: ::fidl_next::wire::Uint32(458768) };
2957
2958 pub const N: Key = Key { value: ::fidl_next::wire::Uint32(458769) };
2959
2960 pub const O: Key = Key { value: ::fidl_next::wire::Uint32(458770) };
2961
2962 pub const P: Key = Key { value: ::fidl_next::wire::Uint32(458771) };
2963
2964 pub const Q: Key = Key { value: ::fidl_next::wire::Uint32(458772) };
2965
2966 pub const R: Key = Key { value: ::fidl_next::wire::Uint32(458773) };
2967
2968 pub const S: Key = Key { value: ::fidl_next::wire::Uint32(458774) };
2969
2970 pub const T: Key = Key { value: ::fidl_next::wire::Uint32(458775) };
2971
2972 pub const U: Key = Key { value: ::fidl_next::wire::Uint32(458776) };
2973
2974 pub const V: Key = Key { value: ::fidl_next::wire::Uint32(458777) };
2975
2976 pub const W: Key = Key { value: ::fidl_next::wire::Uint32(458778) };
2977
2978 pub const X: Key = Key { value: ::fidl_next::wire::Uint32(458779) };
2979
2980 pub const Y: Key = Key { value: ::fidl_next::wire::Uint32(458780) };
2981
2982 pub const Z: Key = Key { value: ::fidl_next::wire::Uint32(458781) };
2983
2984 pub const KEY_1: Key = Key { value: ::fidl_next::wire::Uint32(458782) };
2985
2986 pub const KEY_2: Key = Key { value: ::fidl_next::wire::Uint32(458783) };
2987
2988 pub const KEY_3: Key = Key { value: ::fidl_next::wire::Uint32(458784) };
2989
2990 pub const KEY_4: Key = Key { value: ::fidl_next::wire::Uint32(458785) };
2991
2992 pub const KEY_5: Key = Key { value: ::fidl_next::wire::Uint32(458786) };
2993
2994 pub const KEY_6: Key = Key { value: ::fidl_next::wire::Uint32(458787) };
2995
2996 pub const KEY_7: Key = Key { value: ::fidl_next::wire::Uint32(458788) };
2997
2998 pub const KEY_8: Key = Key { value: ::fidl_next::wire::Uint32(458789) };
2999
3000 pub const KEY_9: Key = Key { value: ::fidl_next::wire::Uint32(458790) };
3001
3002 pub const KEY_0: Key = Key { value: ::fidl_next::wire::Uint32(458791) };
3003
3004 pub const ENTER: Key = Key { value: ::fidl_next::wire::Uint32(458792) };
3005
3006 pub const ESCAPE: Key = Key { value: ::fidl_next::wire::Uint32(458793) };
3007
3008 pub const BACKSPACE: Key = Key { value: ::fidl_next::wire::Uint32(458794) };
3009
3010 pub const TAB: Key = Key { value: ::fidl_next::wire::Uint32(458795) };
3011
3012 pub const SPACE: Key = Key { value: ::fidl_next::wire::Uint32(458796) };
3013
3014 pub const MINUS: Key = Key { value: ::fidl_next::wire::Uint32(458797) };
3015
3016 pub const EQUALS: Key = Key { value: ::fidl_next::wire::Uint32(458798) };
3017
3018 pub const LEFT_BRACE: Key = Key { value: ::fidl_next::wire::Uint32(458799) };
3019
3020 pub const RIGHT_BRACE: Key = Key { value: ::fidl_next::wire::Uint32(458800) };
3021
3022 pub const BACKSLASH: Key = Key { value: ::fidl_next::wire::Uint32(458801) };
3023
3024 pub const NON_US_HASH: Key = Key { value: ::fidl_next::wire::Uint32(458802) };
3025
3026 pub const SEMICOLON: Key = Key { value: ::fidl_next::wire::Uint32(458803) };
3027
3028 pub const APOSTROPHE: Key = Key { value: ::fidl_next::wire::Uint32(458804) };
3029
3030 pub const GRAVE_ACCENT: Key = Key { value: ::fidl_next::wire::Uint32(458805) };
3031
3032 pub const COMMA: Key = Key { value: ::fidl_next::wire::Uint32(458806) };
3033
3034 pub const DOT: Key = Key { value: ::fidl_next::wire::Uint32(458807) };
3035
3036 pub const SLASH: Key = Key { value: ::fidl_next::wire::Uint32(458808) };
3037
3038 pub const CAPS_LOCK: Key = Key { value: ::fidl_next::wire::Uint32(458809) };
3039
3040 pub const F1: Key = Key { value: ::fidl_next::wire::Uint32(458810) };
3041
3042 pub const F2: Key = Key { value: ::fidl_next::wire::Uint32(458811) };
3043
3044 pub const F3: Key = Key { value: ::fidl_next::wire::Uint32(458812) };
3045
3046 pub const F4: Key = Key { value: ::fidl_next::wire::Uint32(458813) };
3047
3048 pub const F5: Key = Key { value: ::fidl_next::wire::Uint32(458814) };
3049
3050 pub const F6: Key = Key { value: ::fidl_next::wire::Uint32(458815) };
3051
3052 pub const F7: Key = Key { value: ::fidl_next::wire::Uint32(458816) };
3053
3054 pub const F8: Key = Key { value: ::fidl_next::wire::Uint32(458817) };
3055
3056 pub const F9: Key = Key { value: ::fidl_next::wire::Uint32(458818) };
3057
3058 pub const F10: Key = Key { value: ::fidl_next::wire::Uint32(458819) };
3059
3060 pub const F11: Key = Key { value: ::fidl_next::wire::Uint32(458820) };
3061
3062 pub const F12: Key = Key { value: ::fidl_next::wire::Uint32(458821) };
3063
3064 pub const PRINT_SCREEN: Key = Key { value: ::fidl_next::wire::Uint32(458822) };
3065
3066 pub const SCROLL_LOCK: Key = Key { value: ::fidl_next::wire::Uint32(458823) };
3067
3068 pub const PAUSE: Key = Key { value: ::fidl_next::wire::Uint32(458824) };
3069
3070 pub const INSERT: Key = Key { value: ::fidl_next::wire::Uint32(458825) };
3071
3072 pub const HOME: Key = Key { value: ::fidl_next::wire::Uint32(458826) };
3073
3074 pub const PAGE_UP: Key = Key { value: ::fidl_next::wire::Uint32(458827) };
3075
3076 pub const DELETE: Key = Key { value: ::fidl_next::wire::Uint32(458828) };
3077
3078 pub const END: Key = Key { value: ::fidl_next::wire::Uint32(458829) };
3079
3080 pub const PAGE_DOWN: Key = Key { value: ::fidl_next::wire::Uint32(458830) };
3081
3082 pub const RIGHT: Key = Key { value: ::fidl_next::wire::Uint32(458831) };
3083
3084 pub const LEFT: Key = Key { value: ::fidl_next::wire::Uint32(458832) };
3085
3086 pub const DOWN: Key = Key { value: ::fidl_next::wire::Uint32(458833) };
3087
3088 pub const UP: Key = Key { value: ::fidl_next::wire::Uint32(458834) };
3089
3090 pub const NUM_LOCK: Key = Key { value: ::fidl_next::wire::Uint32(458835) };
3091
3092 pub const KEYPAD_SLASH: Key = Key { value: ::fidl_next::wire::Uint32(458836) };
3093
3094 pub const KEYPAD_ASTERISK: Key = Key { value: ::fidl_next::wire::Uint32(458837) };
3095
3096 pub const KEYPAD_MINUS: Key = Key { value: ::fidl_next::wire::Uint32(458838) };
3097
3098 pub const KEYPAD_PLUS: Key = Key { value: ::fidl_next::wire::Uint32(458839) };
3099
3100 pub const KEYPAD_ENTER: Key = Key { value: ::fidl_next::wire::Uint32(458840) };
3101
3102 pub const KEYPAD_1: Key = Key { value: ::fidl_next::wire::Uint32(458841) };
3103
3104 pub const KEYPAD_2: Key = Key { value: ::fidl_next::wire::Uint32(458842) };
3105
3106 pub const KEYPAD_3: Key = Key { value: ::fidl_next::wire::Uint32(458843) };
3107
3108 pub const KEYPAD_4: Key = Key { value: ::fidl_next::wire::Uint32(458844) };
3109
3110 pub const KEYPAD_5: Key = Key { value: ::fidl_next::wire::Uint32(458845) };
3111
3112 pub const KEYPAD_6: Key = Key { value: ::fidl_next::wire::Uint32(458846) };
3113
3114 pub const KEYPAD_7: Key = Key { value: ::fidl_next::wire::Uint32(458847) };
3115
3116 pub const KEYPAD_8: Key = Key { value: ::fidl_next::wire::Uint32(458848) };
3117
3118 pub const KEYPAD_9: Key = Key { value: ::fidl_next::wire::Uint32(458849) };
3119
3120 pub const KEYPAD_0: Key = Key { value: ::fidl_next::wire::Uint32(458850) };
3121
3122 pub const KEYPAD_DOT: Key = Key { value: ::fidl_next::wire::Uint32(458851) };
3123
3124 pub const NON_US_BACKSLASH: Key = Key { value: ::fidl_next::wire::Uint32(458852) };
3125
3126 pub const KEYPAD_EQUALS: Key = Key { value: ::fidl_next::wire::Uint32(458855) };
3127
3128 pub const MENU: Key = Key { value: ::fidl_next::wire::Uint32(458870) };
3129
3130 pub const LEFT_CTRL: Key = Key { value: ::fidl_next::wire::Uint32(458976) };
3131
3132 pub const LEFT_SHIFT: Key = Key { value: ::fidl_next::wire::Uint32(458977) };
3133
3134 pub const LEFT_ALT: Key = Key { value: ::fidl_next::wire::Uint32(458978) };
3135
3136 pub const LEFT_META: Key = Key { value: ::fidl_next::wire::Uint32(458979) };
3137
3138 pub const RIGHT_CTRL: Key = Key { value: ::fidl_next::wire::Uint32(458980) };
3139
3140 pub const RIGHT_SHIFT: Key = Key { value: ::fidl_next::wire::Uint32(458981) };
3141
3142 pub const RIGHT_ALT: Key = Key { value: ::fidl_next::wire::Uint32(458982) };
3143
3144 pub const RIGHT_META: Key = Key { value: ::fidl_next::wire::Uint32(458983) };
3145
3146 pub const MUTE: Key = Key { value: ::fidl_next::wire::Uint32(458879) };
3147
3148 pub const VOLUME_DOWN: Key = Key { value: ::fidl_next::wire::Uint32(458881) };
3149
3150 pub const VOLUME_UP: Key = Key { value: ::fidl_next::wire::Uint32(458880) };
3151
3152 pub const PLAY_PAUSE: Key = Key { value: ::fidl_next::wire::Uint32(786637) };
3153
3154 pub const MEDIA_MUTE: Key = Key { value: ::fidl_next::wire::Uint32(786658) };
3155
3156 pub const MEDIA_VOLUME_INCREMENT: Key = Key { value: ::fidl_next::wire::Uint32(786665) };
3157
3158 pub const MEDIA_VOLUME_DECREMENT: Key = Key { value: ::fidl_next::wire::Uint32(786666) };
3159
3160 pub const AC_BACK: Key = Key { value: ::fidl_next::wire::Uint32(786980) };
3161
3162 pub const AC_REFRESH: Key = Key { value: ::fidl_next::wire::Uint32(786983) };
3163
3164 pub const AC_FULL_SCREEN_VIEW: Key = Key { value: ::fidl_next::wire::Uint32(786992) };
3165
3166 pub const AC_SELECT_TASK_APPLICATION: Key =
3167 Key { value: ::fidl_next::wire::Uint32(786850) };
3168
3169 pub const BRIGHTNESS_DOWN: Key = Key { value: ::fidl_next::wire::Uint32(786543) };
3170
3171 pub const BRIGHTNESS_UP: Key = Key { value: ::fidl_next::wire::Uint32(786544) };
3172
3173 pub const ASSISTANT: Key = Key { value: ::fidl_next::wire::Uint32(4294901761) };
3174
3175 pub const POWER: Key = Key { value: ::fidl_next::wire::Uint32(4294901762) };
3176
3177 pub const SLEEP: Key = Key { value: ::fidl_next::wire::Uint32(4294901763) };
3178
3179 pub const UNKNOWN_0055: Key = Key { value: ::fidl_next::wire::Uint32(4294901845) };
3180
3181 pub const UNKNOWN_0056: Key = Key { value: ::fidl_next::wire::Uint32(4294901846) };
3182
3183 pub const UNKNOWN_0059: Key = Key { value: ::fidl_next::wire::Uint32(4294901849) };
3184
3185 pub const UNKNOWN_005_C: Key = Key { value: ::fidl_next::wire::Uint32(4294901852) };
3186
3187 pub const UNKNOWN_005_D: Key = Key { value: ::fidl_next::wire::Uint32(4294901853) };
3188
3189 pub const UNKNOWN_005_E: Key = Key { value: ::fidl_next::wire::Uint32(4294901854) };
3190
3191 pub const UNKNOWN_0079: Key = Key { value: ::fidl_next::wire::Uint32(4294901881) };
3192
3193 pub const UNKNOWN_007_A: Key = Key { value: ::fidl_next::wire::Uint32(4294901882) };
3194
3195 pub const UNKNOWN_007_B: Key = Key { value: ::fidl_next::wire::Uint32(4294901883) };
3196
3197 pub const UNKNOWN_007_C: Key = Key { value: ::fidl_next::wire::Uint32(4294901884) };
3198
3199 pub const UNKNOWN_0085: Key = Key { value: ::fidl_next::wire::Uint32(4294901893) };
3200
3201 pub const UNKNOWN_0087: Key = Key { value: ::fidl_next::wire::Uint32(4294901895) };
3202
3203 pub const UNKNOWN_0089: Key = Key { value: ::fidl_next::wire::Uint32(4294901897) };
3204
3205 pub const UNKNOWN_009_C: Key = Key { value: ::fidl_next::wire::Uint32(4294901916) };
3206
3207 pub const UNKNOWN_009_F: Key = Key { value: ::fidl_next::wire::Uint32(4294901919) };
3208
3209 pub const UNKNOWN_00_A0: Key = Key { value: ::fidl_next::wire::Uint32(4294901920) };
3210
3211 pub const UNKNOWN_00_A2: Key = Key { value: ::fidl_next::wire::Uint32(4294901922) };
3212
3213 pub const UNKNOWN_00_A3: Key = Key { value: ::fidl_next::wire::Uint32(4294901923) };
3214
3215 pub const UNKNOWN_00_A5: Key = Key { value: ::fidl_next::wire::Uint32(4294901925) };
3216
3217 pub const UNKNOWN_00_A6: Key = Key { value: ::fidl_next::wire::Uint32(4294901926) };
3218
3219 pub const UNKNOWN_00_A7: Key = Key { value: ::fidl_next::wire::Uint32(4294901927) };
3220
3221 pub const UNKNOWN_00_A8: Key = Key { value: ::fidl_next::wire::Uint32(4294901928) };
3222
3223 pub const UNKNOWN_00_A9: Key = Key { value: ::fidl_next::wire::Uint32(4294901929) };
3224
3225 pub const UNKNOWN_00_AD: Key = Key { value: ::fidl_next::wire::Uint32(4294901933) };
3226
3227 pub const UNKNOWN_00_B1: Key = Key { value: ::fidl_next::wire::Uint32(4294901937) };
3228
3229 pub const UNKNOWN_00_B2: Key = Key { value: ::fidl_next::wire::Uint32(4294901938) };
3230
3231 pub const UNKNOWN_00_B3: Key = Key { value: ::fidl_next::wire::Uint32(4294901939) };
3232
3233 pub const UNKNOWN_00_B4: Key = Key { value: ::fidl_next::wire::Uint32(4294901940) };
3234
3235 pub const UNKNOWN_00_C9: Key = Key { value: ::fidl_next::wire::Uint32(4294901961) };
3236
3237 pub const UNKNOWN_00_CF: Key = Key { value: ::fidl_next::wire::Uint32(4294901967) };
3238
3239 pub const UNKNOWN_00_D0: Key = Key { value: ::fidl_next::wire::Uint32(4294901968) };
3240
3241 pub const UNKNOWN_00_D4: Key = Key { value: ::fidl_next::wire::Uint32(4294901972) };
3242
3243 pub const UNKNOWN_00_E2: Key = Key { value: ::fidl_next::wire::Uint32(4294901986) };
3244
3245 pub const UNKNOWN_0120: Key = Key { value: ::fidl_next::wire::Uint32(4294902048) };
3246
3247 pub const UNKNOWN_0121: Key = Key { value: ::fidl_next::wire::Uint32(4294902049) };
3248
3249 pub const UNKNOWN_0122: Key = Key { value: ::fidl_next::wire::Uint32(4294902050) };
3250
3251 pub const UNKNOWN_0123: Key = Key { value: ::fidl_next::wire::Uint32(4294902051) };
3252
3253 pub const UNKNOWN_0124: Key = Key { value: ::fidl_next::wire::Uint32(4294902052) };
3254
3255 pub const UNKNOWN_0125: Key = Key { value: ::fidl_next::wire::Uint32(4294902053) };
3256
3257 pub const UNKNOWN_0126: Key = Key { value: ::fidl_next::wire::Uint32(4294902054) };
3258
3259 pub const UNKNOWN_0127: Key = Key { value: ::fidl_next::wire::Uint32(4294902055) };
3260
3261 pub const UNKNOWN_0128: Key = Key { value: ::fidl_next::wire::Uint32(4294902056) };
3262
3263 pub const UNKNOWN_0129: Key = Key { value: ::fidl_next::wire::Uint32(4294902057) };
3264
3265 pub const UNKNOWN_012_A: Key = Key { value: ::fidl_next::wire::Uint32(4294902058) };
3266
3267 pub const UNKNOWN_012_B: Key = Key { value: ::fidl_next::wire::Uint32(4294902059) };
3268
3269 pub const UNKNOWN_012_C: Key = Key { value: ::fidl_next::wire::Uint32(4294902060) };
3270
3271 pub const UNKNOWN_012_D: Key = Key { value: ::fidl_next::wire::Uint32(4294902061) };
3272
3273 pub const UNKNOWN_012_E: Key = Key { value: ::fidl_next::wire::Uint32(4294902062) };
3274
3275 pub const UNKNOWN_012_F: Key = Key { value: ::fidl_next::wire::Uint32(4294902063) };
3276
3277 pub const UNKNOWN_0130: Key = Key { value: ::fidl_next::wire::Uint32(4294902064) };
3278
3279 pub const UNKNOWN_0131: Key = Key { value: ::fidl_next::wire::Uint32(4294902065) };
3280
3281 pub const UNKNOWN_0132: Key = Key { value: ::fidl_next::wire::Uint32(4294902066) };
3282
3283 pub const UNKNOWN_0133: Key = Key { value: ::fidl_next::wire::Uint32(4294902067) };
3284
3285 pub const UNKNOWN_0134: Key = Key { value: ::fidl_next::wire::Uint32(4294902068) };
3286
3287 pub const UNKNOWN_0135: Key = Key { value: ::fidl_next::wire::Uint32(4294902069) };
3288
3289 pub const UNKNOWN_0136: Key = Key { value: ::fidl_next::wire::Uint32(4294902070) };
3290
3291 pub const UNKNOWN_0137: Key = Key { value: ::fidl_next::wire::Uint32(4294902071) };
3292
3293 pub const UNKNOWN_0138: Key = Key { value: ::fidl_next::wire::Uint32(4294902072) };
3294
3295 pub const UNKNOWN_0139: Key = Key { value: ::fidl_next::wire::Uint32(4294902073) };
3296
3297 pub const UNKNOWN_013_A: Key = Key { value: ::fidl_next::wire::Uint32(4294902074) };
3298
3299 pub const UNKNOWN_013_B: Key = Key { value: ::fidl_next::wire::Uint32(4294902075) };
3300
3301 pub const UNKNOWN_013_C: Key = Key { value: ::fidl_next::wire::Uint32(4294902076) };
3302
3303 pub const UNKNOWN_013_D: Key = Key { value: ::fidl_next::wire::Uint32(4294902077) };
3304
3305 pub const UNKNOWN_013_E: Key = Key { value: ::fidl_next::wire::Uint32(4294902078) };
3306
3307 pub const UNKNOWN_0161: Key = Key { value: ::fidl_next::wire::Uint32(4294902113) };
3308
3309 pub const UNKNOWN_016_A: Key = Key { value: ::fidl_next::wire::Uint32(4294902122) };
3310
3311 pub const UNKNOWN_016_E: Key = Key { value: ::fidl_next::wire::Uint32(4294902126) };
3312
3313 pub const UNKNOWN_0172: Key = Key { value: ::fidl_next::wire::Uint32(4294902130) };
3314
3315 pub const UNKNOWN_0179: Key = Key { value: ::fidl_next::wire::Uint32(4294902137) };
3316
3317 pub const UNKNOWN_018_E: Key = Key { value: ::fidl_next::wire::Uint32(4294902158) };
3318
3319 pub const UNKNOWN_018_F: Key = Key { value: ::fidl_next::wire::Uint32(4294902159) };
3320
3321 pub const UNKNOWN_0190: Key = Key { value: ::fidl_next::wire::Uint32(4294902160) };
3322
3323 pub const UNKNOWN_0191: Key = Key { value: ::fidl_next::wire::Uint32(4294902161) };
3324
3325 pub const UNKNOWN_0192: Key = Key { value: ::fidl_next::wire::Uint32(4294902162) };
3326
3327 pub const UNKNOWN_0193: Key = Key { value: ::fidl_next::wire::Uint32(4294902163) };
3328
3329 pub const UNKNOWN_0195: Key = Key { value: ::fidl_next::wire::Uint32(4294902165) };
3330
3331 pub const UNKNOWN_01_D0: Key = Key { value: ::fidl_next::wire::Uint32(4294902224) };
3332
3333 pub const UNKNOWN_020_A: Key = Key { value: ::fidl_next::wire::Uint32(4294902282) };
3334
3335 pub const UNKNOWN_020_B: Key = Key { value: ::fidl_next::wire::Uint32(4294902283) };
3336 }
3337
3338 unsafe impl<___D> ::fidl_next::Decode<___D> for Key
3339 where
3340 ___D: ?Sized,
3341 {
3342 fn decode(
3343 slot: ::fidl_next::Slot<'_, Self>,
3344 _: &mut ___D,
3345 _: (),
3346 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3347 Ok(())
3348 }
3349 }
3350
3351 impl ::core::convert::From<crate::natural::Key> for Key {
3352 fn from(natural: crate::natural::Key) -> Self {
3353 match natural {
3354 crate::natural::Key::Unknown => Key::UNKNOWN,
3355
3356 crate::natural::Key::A => Key::A,
3357
3358 crate::natural::Key::B => Key::B,
3359
3360 crate::natural::Key::C => Key::C,
3361
3362 crate::natural::Key::D => Key::D,
3363
3364 crate::natural::Key::E => Key::E,
3365
3366 crate::natural::Key::F => Key::F,
3367
3368 crate::natural::Key::G => Key::G,
3369
3370 crate::natural::Key::H => Key::H,
3371
3372 crate::natural::Key::I => Key::I,
3373
3374 crate::natural::Key::J => Key::J,
3375
3376 crate::natural::Key::K => Key::K,
3377
3378 crate::natural::Key::L => Key::L,
3379
3380 crate::natural::Key::M => Key::M,
3381
3382 crate::natural::Key::N => Key::N,
3383
3384 crate::natural::Key::O => Key::O,
3385
3386 crate::natural::Key::P => Key::P,
3387
3388 crate::natural::Key::Q => Key::Q,
3389
3390 crate::natural::Key::R => Key::R,
3391
3392 crate::natural::Key::S => Key::S,
3393
3394 crate::natural::Key::T => Key::T,
3395
3396 crate::natural::Key::U => Key::U,
3397
3398 crate::natural::Key::V => Key::V,
3399
3400 crate::natural::Key::W => Key::W,
3401
3402 crate::natural::Key::X => Key::X,
3403
3404 crate::natural::Key::Y => Key::Y,
3405
3406 crate::natural::Key::Z => Key::Z,
3407
3408 crate::natural::Key::Key1 => Key::KEY_1,
3409
3410 crate::natural::Key::Key2 => Key::KEY_2,
3411
3412 crate::natural::Key::Key3 => Key::KEY_3,
3413
3414 crate::natural::Key::Key4 => Key::KEY_4,
3415
3416 crate::natural::Key::Key5 => Key::KEY_5,
3417
3418 crate::natural::Key::Key6 => Key::KEY_6,
3419
3420 crate::natural::Key::Key7 => Key::KEY_7,
3421
3422 crate::natural::Key::Key8 => Key::KEY_8,
3423
3424 crate::natural::Key::Key9 => Key::KEY_9,
3425
3426 crate::natural::Key::Key0 => Key::KEY_0,
3427
3428 crate::natural::Key::Enter => Key::ENTER,
3429
3430 crate::natural::Key::Escape => Key::ESCAPE,
3431
3432 crate::natural::Key::Backspace => Key::BACKSPACE,
3433
3434 crate::natural::Key::Tab => Key::TAB,
3435
3436 crate::natural::Key::Space => Key::SPACE,
3437
3438 crate::natural::Key::Minus => Key::MINUS,
3439
3440 crate::natural::Key::Equals => Key::EQUALS,
3441
3442 crate::natural::Key::LeftBrace => Key::LEFT_BRACE,
3443
3444 crate::natural::Key::RightBrace => Key::RIGHT_BRACE,
3445
3446 crate::natural::Key::Backslash => Key::BACKSLASH,
3447
3448 crate::natural::Key::NonUsHash => Key::NON_US_HASH,
3449
3450 crate::natural::Key::Semicolon => Key::SEMICOLON,
3451
3452 crate::natural::Key::Apostrophe => Key::APOSTROPHE,
3453
3454 crate::natural::Key::GraveAccent => Key::GRAVE_ACCENT,
3455
3456 crate::natural::Key::Comma => Key::COMMA,
3457
3458 crate::natural::Key::Dot => Key::DOT,
3459
3460 crate::natural::Key::Slash => Key::SLASH,
3461
3462 crate::natural::Key::CapsLock => Key::CAPS_LOCK,
3463
3464 crate::natural::Key::F1 => Key::F1,
3465
3466 crate::natural::Key::F2 => Key::F2,
3467
3468 crate::natural::Key::F3 => Key::F3,
3469
3470 crate::natural::Key::F4 => Key::F4,
3471
3472 crate::natural::Key::F5 => Key::F5,
3473
3474 crate::natural::Key::F6 => Key::F6,
3475
3476 crate::natural::Key::F7 => Key::F7,
3477
3478 crate::natural::Key::F8 => Key::F8,
3479
3480 crate::natural::Key::F9 => Key::F9,
3481
3482 crate::natural::Key::F10 => Key::F10,
3483
3484 crate::natural::Key::F11 => Key::F11,
3485
3486 crate::natural::Key::F12 => Key::F12,
3487
3488 crate::natural::Key::PrintScreen => Key::PRINT_SCREEN,
3489
3490 crate::natural::Key::ScrollLock => Key::SCROLL_LOCK,
3491
3492 crate::natural::Key::Pause => Key::PAUSE,
3493
3494 crate::natural::Key::Insert => Key::INSERT,
3495
3496 crate::natural::Key::Home => Key::HOME,
3497
3498 crate::natural::Key::PageUp => Key::PAGE_UP,
3499
3500 crate::natural::Key::Delete => Key::DELETE,
3501
3502 crate::natural::Key::End => Key::END,
3503
3504 crate::natural::Key::PageDown => Key::PAGE_DOWN,
3505
3506 crate::natural::Key::Right => Key::RIGHT,
3507
3508 crate::natural::Key::Left => Key::LEFT,
3509
3510 crate::natural::Key::Down => Key::DOWN,
3511
3512 crate::natural::Key::Up => Key::UP,
3513
3514 crate::natural::Key::NumLock => Key::NUM_LOCK,
3515
3516 crate::natural::Key::KeypadSlash => Key::KEYPAD_SLASH,
3517
3518 crate::natural::Key::KeypadAsterisk => Key::KEYPAD_ASTERISK,
3519
3520 crate::natural::Key::KeypadMinus => Key::KEYPAD_MINUS,
3521
3522 crate::natural::Key::KeypadPlus => Key::KEYPAD_PLUS,
3523
3524 crate::natural::Key::KeypadEnter => Key::KEYPAD_ENTER,
3525
3526 crate::natural::Key::Keypad1 => Key::KEYPAD_1,
3527
3528 crate::natural::Key::Keypad2 => Key::KEYPAD_2,
3529
3530 crate::natural::Key::Keypad3 => Key::KEYPAD_3,
3531
3532 crate::natural::Key::Keypad4 => Key::KEYPAD_4,
3533
3534 crate::natural::Key::Keypad5 => Key::KEYPAD_5,
3535
3536 crate::natural::Key::Keypad6 => Key::KEYPAD_6,
3537
3538 crate::natural::Key::Keypad7 => Key::KEYPAD_7,
3539
3540 crate::natural::Key::Keypad8 => Key::KEYPAD_8,
3541
3542 crate::natural::Key::Keypad9 => Key::KEYPAD_9,
3543
3544 crate::natural::Key::Keypad0 => Key::KEYPAD_0,
3545
3546 crate::natural::Key::KeypadDot => Key::KEYPAD_DOT,
3547
3548 crate::natural::Key::NonUsBackslash => Key::NON_US_BACKSLASH,
3549
3550 crate::natural::Key::KeypadEquals => Key::KEYPAD_EQUALS,
3551
3552 crate::natural::Key::Menu => Key::MENU,
3553
3554 crate::natural::Key::LeftCtrl => Key::LEFT_CTRL,
3555
3556 crate::natural::Key::LeftShift => Key::LEFT_SHIFT,
3557
3558 crate::natural::Key::LeftAlt => Key::LEFT_ALT,
3559
3560 crate::natural::Key::LeftMeta => Key::LEFT_META,
3561
3562 crate::natural::Key::RightCtrl => Key::RIGHT_CTRL,
3563
3564 crate::natural::Key::RightShift => Key::RIGHT_SHIFT,
3565
3566 crate::natural::Key::RightAlt => Key::RIGHT_ALT,
3567
3568 crate::natural::Key::RightMeta => Key::RIGHT_META,
3569
3570 crate::natural::Key::Mute => Key::MUTE,
3571
3572 crate::natural::Key::VolumeDown => Key::VOLUME_DOWN,
3573
3574 crate::natural::Key::VolumeUp => Key::VOLUME_UP,
3575
3576 crate::natural::Key::PlayPause => Key::PLAY_PAUSE,
3577
3578 crate::natural::Key::MediaMute => Key::MEDIA_MUTE,
3579
3580 crate::natural::Key::MediaVolumeIncrement => Key::MEDIA_VOLUME_INCREMENT,
3581
3582 crate::natural::Key::MediaVolumeDecrement => Key::MEDIA_VOLUME_DECREMENT,
3583
3584 crate::natural::Key::AcBack => Key::AC_BACK,
3585
3586 crate::natural::Key::AcRefresh => Key::AC_REFRESH,
3587
3588 crate::natural::Key::AcFullScreenView => Key::AC_FULL_SCREEN_VIEW,
3589
3590 crate::natural::Key::AcSelectTaskApplication => Key::AC_SELECT_TASK_APPLICATION,
3591
3592 crate::natural::Key::BrightnessDown => Key::BRIGHTNESS_DOWN,
3593
3594 crate::natural::Key::BrightnessUp => Key::BRIGHTNESS_UP,
3595
3596 crate::natural::Key::Assistant => Key::ASSISTANT,
3597
3598 crate::natural::Key::Power => Key::POWER,
3599
3600 crate::natural::Key::Sleep => Key::SLEEP,
3601
3602 crate::natural::Key::Unknown0055 => Key::UNKNOWN_0055,
3603
3604 crate::natural::Key::Unknown0056 => Key::UNKNOWN_0056,
3605
3606 crate::natural::Key::Unknown0059 => Key::UNKNOWN_0059,
3607
3608 crate::natural::Key::Unknown005C => Key::UNKNOWN_005_C,
3609
3610 crate::natural::Key::Unknown005D => Key::UNKNOWN_005_D,
3611
3612 crate::natural::Key::Unknown005E => Key::UNKNOWN_005_E,
3613
3614 crate::natural::Key::Unknown0079 => Key::UNKNOWN_0079,
3615
3616 crate::natural::Key::Unknown007A => Key::UNKNOWN_007_A,
3617
3618 crate::natural::Key::Unknown007B => Key::UNKNOWN_007_B,
3619
3620 crate::natural::Key::Unknown007C => Key::UNKNOWN_007_C,
3621
3622 crate::natural::Key::Unknown0085 => Key::UNKNOWN_0085,
3623
3624 crate::natural::Key::Unknown0087 => Key::UNKNOWN_0087,
3625
3626 crate::natural::Key::Unknown0089 => Key::UNKNOWN_0089,
3627
3628 crate::natural::Key::Unknown009C => Key::UNKNOWN_009_C,
3629
3630 crate::natural::Key::Unknown009F => Key::UNKNOWN_009_F,
3631
3632 crate::natural::Key::Unknown00A0 => Key::UNKNOWN_00_A0,
3633
3634 crate::natural::Key::Unknown00A2 => Key::UNKNOWN_00_A2,
3635
3636 crate::natural::Key::Unknown00A3 => Key::UNKNOWN_00_A3,
3637
3638 crate::natural::Key::Unknown00A5 => Key::UNKNOWN_00_A5,
3639
3640 crate::natural::Key::Unknown00A6 => Key::UNKNOWN_00_A6,
3641
3642 crate::natural::Key::Unknown00A7 => Key::UNKNOWN_00_A7,
3643
3644 crate::natural::Key::Unknown00A8 => Key::UNKNOWN_00_A8,
3645
3646 crate::natural::Key::Unknown00A9 => Key::UNKNOWN_00_A9,
3647
3648 crate::natural::Key::Unknown00Ad => Key::UNKNOWN_00_AD,
3649
3650 crate::natural::Key::Unknown00B1 => Key::UNKNOWN_00_B1,
3651
3652 crate::natural::Key::Unknown00B2 => Key::UNKNOWN_00_B2,
3653
3654 crate::natural::Key::Unknown00B3 => Key::UNKNOWN_00_B3,
3655
3656 crate::natural::Key::Unknown00B4 => Key::UNKNOWN_00_B4,
3657
3658 crate::natural::Key::Unknown00C9 => Key::UNKNOWN_00_C9,
3659
3660 crate::natural::Key::Unknown00Cf => Key::UNKNOWN_00_CF,
3661
3662 crate::natural::Key::Unknown00D0 => Key::UNKNOWN_00_D0,
3663
3664 crate::natural::Key::Unknown00D4 => Key::UNKNOWN_00_D4,
3665
3666 crate::natural::Key::Unknown00E2 => Key::UNKNOWN_00_E2,
3667
3668 crate::natural::Key::Unknown0120 => Key::UNKNOWN_0120,
3669
3670 crate::natural::Key::Unknown0121 => Key::UNKNOWN_0121,
3671
3672 crate::natural::Key::Unknown0122 => Key::UNKNOWN_0122,
3673
3674 crate::natural::Key::Unknown0123 => Key::UNKNOWN_0123,
3675
3676 crate::natural::Key::Unknown0124 => Key::UNKNOWN_0124,
3677
3678 crate::natural::Key::Unknown0125 => Key::UNKNOWN_0125,
3679
3680 crate::natural::Key::Unknown0126 => Key::UNKNOWN_0126,
3681
3682 crate::natural::Key::Unknown0127 => Key::UNKNOWN_0127,
3683
3684 crate::natural::Key::Unknown0128 => Key::UNKNOWN_0128,
3685
3686 crate::natural::Key::Unknown0129 => Key::UNKNOWN_0129,
3687
3688 crate::natural::Key::Unknown012A => Key::UNKNOWN_012_A,
3689
3690 crate::natural::Key::Unknown012B => Key::UNKNOWN_012_B,
3691
3692 crate::natural::Key::Unknown012C => Key::UNKNOWN_012_C,
3693
3694 crate::natural::Key::Unknown012D => Key::UNKNOWN_012_D,
3695
3696 crate::natural::Key::Unknown012E => Key::UNKNOWN_012_E,
3697
3698 crate::natural::Key::Unknown012F => Key::UNKNOWN_012_F,
3699
3700 crate::natural::Key::Unknown0130 => Key::UNKNOWN_0130,
3701
3702 crate::natural::Key::Unknown0131 => Key::UNKNOWN_0131,
3703
3704 crate::natural::Key::Unknown0132 => Key::UNKNOWN_0132,
3705
3706 crate::natural::Key::Unknown0133 => Key::UNKNOWN_0133,
3707
3708 crate::natural::Key::Unknown0134 => Key::UNKNOWN_0134,
3709
3710 crate::natural::Key::Unknown0135 => Key::UNKNOWN_0135,
3711
3712 crate::natural::Key::Unknown0136 => Key::UNKNOWN_0136,
3713
3714 crate::natural::Key::Unknown0137 => Key::UNKNOWN_0137,
3715
3716 crate::natural::Key::Unknown0138 => Key::UNKNOWN_0138,
3717
3718 crate::natural::Key::Unknown0139 => Key::UNKNOWN_0139,
3719
3720 crate::natural::Key::Unknown013A => Key::UNKNOWN_013_A,
3721
3722 crate::natural::Key::Unknown013B => Key::UNKNOWN_013_B,
3723
3724 crate::natural::Key::Unknown013C => Key::UNKNOWN_013_C,
3725
3726 crate::natural::Key::Unknown013D => Key::UNKNOWN_013_D,
3727
3728 crate::natural::Key::Unknown013E => Key::UNKNOWN_013_E,
3729
3730 crate::natural::Key::Unknown0161 => Key::UNKNOWN_0161,
3731
3732 crate::natural::Key::Unknown016A => Key::UNKNOWN_016_A,
3733
3734 crate::natural::Key::Unknown016E => Key::UNKNOWN_016_E,
3735
3736 crate::natural::Key::Unknown0172 => Key::UNKNOWN_0172,
3737
3738 crate::natural::Key::Unknown0179 => Key::UNKNOWN_0179,
3739
3740 crate::natural::Key::Unknown018E => Key::UNKNOWN_018_E,
3741
3742 crate::natural::Key::Unknown018F => Key::UNKNOWN_018_F,
3743
3744 crate::natural::Key::Unknown0190 => Key::UNKNOWN_0190,
3745
3746 crate::natural::Key::Unknown0191 => Key::UNKNOWN_0191,
3747
3748 crate::natural::Key::Unknown0192 => Key::UNKNOWN_0192,
3749
3750 crate::natural::Key::Unknown0193 => Key::UNKNOWN_0193,
3751
3752 crate::natural::Key::Unknown0195 => Key::UNKNOWN_0195,
3753
3754 crate::natural::Key::Unknown01D0 => Key::UNKNOWN_01_D0,
3755
3756 crate::natural::Key::Unknown020A => Key::UNKNOWN_020_A,
3757
3758 crate::natural::Key::Unknown020B => Key::UNKNOWN_020_B,
3759
3760 crate::natural::Key::UnknownOrdinal_(value) => {
3761 Key { value: ::fidl_next::wire::Uint32::from(value) }
3762 }
3763 }
3764 }
3765 }
3766
3767 impl ::fidl_next::IntoNatural for Key {
3768 type Natural = crate::natural::Key;
3769 }
3770
3771 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
3773 #[repr(transparent)]
3774 pub struct KeymapId {
3775 pub(crate) value: ::fidl_next::wire::Uint32,
3776 }
3777
3778 impl ::fidl_next::Constrained for KeymapId {
3779 type Constraint = ();
3780
3781 fn validate(
3782 _: ::fidl_next::Slot<'_, Self>,
3783 _: Self::Constraint,
3784 ) -> Result<(), ::fidl_next::ValidationError> {
3785 Ok(())
3786 }
3787 }
3788
3789 unsafe impl ::fidl_next::Wire for KeymapId {
3790 type Narrowed<'de> = Self;
3791
3792 #[inline]
3793 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3794 }
3796 }
3797
3798 impl KeymapId {
3799 pub const US_QWERTY: KeymapId = KeymapId { value: ::fidl_next::wire::Uint32(0) };
3800
3801 pub const FR_AZERTY: KeymapId = KeymapId { value: ::fidl_next::wire::Uint32(1) };
3802
3803 pub const US_DVORAK: KeymapId = KeymapId { value: ::fidl_next::wire::Uint32(2) };
3804
3805 pub const US_COLEMAK: KeymapId = KeymapId { value: ::fidl_next::wire::Uint32(3) };
3806 }
3807
3808 unsafe impl<___D> ::fidl_next::Decode<___D> for KeymapId
3809 where
3810 ___D: ?Sized,
3811 {
3812 fn decode(
3813 slot: ::fidl_next::Slot<'_, Self>,
3814 _: &mut ___D,
3815 _: (),
3816 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3817 Ok(())
3818 }
3819 }
3820
3821 impl ::core::convert::From<crate::natural::KeymapId> for KeymapId {
3822 fn from(natural: crate::natural::KeymapId) -> Self {
3823 match natural {
3824 crate::natural::KeymapId::UsQwerty => KeymapId::US_QWERTY,
3825
3826 crate::natural::KeymapId::FrAzerty => KeymapId::FR_AZERTY,
3827
3828 crate::natural::KeymapId::UsDvorak => KeymapId::US_DVORAK,
3829
3830 crate::natural::KeymapId::UsColemak => KeymapId::US_COLEMAK,
3831
3832 crate::natural::KeymapId::UnknownOrdinal_(value) => {
3833 KeymapId { value: ::fidl_next::wire::Uint32::from(value) }
3834 }
3835 }
3836 }
3837 }
3838
3839 impl ::fidl_next::IntoNatural for KeymapId {
3840 type Natural = crate::natural::KeymapId;
3841 }
3842}
3843
3844pub mod wire_optional {}
3845
3846pub mod generic {
3847
3848 pub struct Range<T0, T1> {
3850 pub min: T0,
3851
3852 pub max: T1,
3853 }
3854
3855 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Range, ___E> for Range<T0, T1>
3856 where
3857 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3858 T0: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
3859 T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
3860 {
3861 #[inline]
3862 fn encode(
3863 self,
3864 encoder_: &mut ___E,
3865 out_: &mut ::core::mem::MaybeUninit<crate::wire::Range>,
3866 _: (),
3867 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3868 ::fidl_next::munge! {
3869 let crate::wire::Range {
3870 min,
3871 max,
3872
3873 } = out_;
3874 }
3875
3876 ::fidl_next::Encode::encode(self.min, encoder_, min, ())?;
3877
3878 ::fidl_next::Encode::encode(self.max, encoder_, max, ())?;
3879
3880 Ok(())
3881 }
3882 }
3883
3884 pub struct Unit<T0, T1> {
3886 pub type_: T0,
3887
3888 pub exponent: T1,
3889 }
3890
3891 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Unit, ___E> for Unit<T0, T1>
3892 where
3893 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3894 T0: ::fidl_next::Encode<crate::wire::UnitType, ___E>,
3895 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
3896 {
3897 #[inline]
3898 fn encode(
3899 self,
3900 encoder_: &mut ___E,
3901 out_: &mut ::core::mem::MaybeUninit<crate::wire::Unit>,
3902 _: (),
3903 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3904 ::fidl_next::munge! {
3905 let crate::wire::Unit {
3906 type_,
3907 exponent,
3908
3909 } = out_;
3910 }
3911
3912 ::fidl_next::Encode::encode(self.type_, encoder_, type_, ())?;
3913
3914 ::fidl_next::Encode::encode(self.exponent, encoder_, exponent, ())?;
3915
3916 Ok(())
3917 }
3918 }
3919
3920 pub struct Axis<T0, T1> {
3922 pub range: T0,
3923
3924 pub unit: T1,
3925 }
3926
3927 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Axis, ___E> for Axis<T0, T1>
3928 where
3929 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3930 T0: ::fidl_next::Encode<crate::wire::Range, ___E>,
3931 T1: ::fidl_next::Encode<crate::wire::Unit, ___E>,
3932 {
3933 #[inline]
3934 fn encode(
3935 self,
3936 encoder_: &mut ___E,
3937 out_: &mut ::core::mem::MaybeUninit<crate::wire::Axis>,
3938 _: (),
3939 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3940 ::fidl_next::munge! {
3941 let crate::wire::Axis {
3942 range,
3943 unit,
3944
3945 } = out_;
3946 }
3947
3948 ::fidl_next::Encode::encode(self.range, encoder_, range, ())?;
3949
3950 ::fidl_next::Encode::encode(self.unit, encoder_, unit, ())?;
3951
3952 Ok(())
3953 }
3954 }
3955}
3956
3957pub use self::natural::*;
3958
3959#[doc = " Hardcoded max sizes for ConsumerControl vectors. These sizes should be increased\n if we ever see a device with more objects than can be represented.\n"]
3960pub const CONSUMER_CONTROL_MAX_NUM_BUTTONS: u32 = 255 as u32;
3961
3962#[doc = " A hardcoded number of max keys per report. This should be increased in the future if\n we see devices with more than the max amount.\n"]
3963pub const KEYBOARD_MAX_NUM_KEYS: u32 = 256 as u32;
3964
3965#[doc = " A hardcoded number of max mouse buttons. This should be increased in the future\n if we ever see mice with more buttons.\n"]
3966pub const MOUSE_MAX_NUM_BUTTONS: u32 = 32 as u32;
3967
3968#[doc = " A hardcoded number of max contacts per report. This should be increased in the future if\n we see devices with more than the max amount.\n"]
3969pub const TOUCH_MAX_CONTACTS: u32 = 10 as u32;
3970
3971#[doc = " The maximum number of touch buttons per report.\n"]
3972pub const TOUCH_MAX_NUM_BUTTONS: u32 = 10 as u32;