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