1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11#[derive(Clone, Debug, PartialEq)]
12pub struct BusEnsurePublishRequest {
13 pub data: Event,
14}
15
16impl fidl::Persistable for BusEnsurePublishRequest {}
17
18#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19pub struct BusGetClientsResponse {
20 pub clients: Vec<String>,
21}
22
23impl fidl::Persistable for BusGetClientsResponse {}
24
25#[derive(Clone, Debug, PartialEq)]
26pub struct BusOnBusDataRequest {
27 pub data: Event,
28}
29
30impl fidl::Persistable for BusOnBusDataRequest {}
31
32#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
33pub struct BusOnClientAttachedRequest {
34 pub client: String,
35}
36
37impl fidl::Persistable for BusOnClientAttachedRequest {}
38
39#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40pub struct BusOnClientDetachedRequest {
41 pub client: String,
42}
43
44impl fidl::Persistable for BusOnClientDetachedRequest {}
45
46#[derive(Clone, Debug, PartialEq)]
47pub struct BusPublishRequest {
48 pub data: Event,
49}
50
51impl fidl::Persistable for BusPublishRequest {}
52
53#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
54pub struct BusWaitForClientsRequest {
55 pub clients: Vec<String>,
56 pub timeout: i64,
57}
58
59impl fidl::Persistable for BusWaitForClientsRequest {}
60
61#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
62pub struct BusWaitForClientsResponse {
63 pub result: bool,
64 pub absent: Option<Vec<String>>,
65}
66
67impl fidl::Persistable for BusWaitForClientsResponse {}
68
69#[derive(Clone, Debug, PartialEq)]
70pub struct BusWaitForEventRequest {
71 pub data: Event,
72 pub timeout: i64,
73}
74
75impl fidl::Persistable for BusWaitForEventRequest {}
76
77#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
78pub struct BusWaitForEventResponse {
79 pub result: bool,
80}
81
82impl fidl::Persistable for BusWaitForEventResponse {}
83
84#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
85pub struct SyncManagerWaitForBarrierThresholdRequest {
86 pub barrier_name: String,
87 pub threshold: u32,
88 pub timeout: i64,
89}
90
91impl fidl::Persistable for SyncManagerWaitForBarrierThresholdRequest {}
92
93#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
94pub struct SyncManagerWaitForBarrierThresholdResponse {
95 pub result: bool,
96}
97
98impl fidl::Persistable for SyncManagerWaitForBarrierThresholdResponse {}
99
100#[derive(Clone, Debug, Default, PartialEq)]
102pub struct Event {
103 pub code: Option<i32>,
105 pub message: Option<String>,
107 pub arguments: Option<Vec<u8>>,
109 #[doc(hidden)]
110 pub __source_breaking: fidl::marker::SourceBreaking,
111}
112
113impl fidl::Persistable for Event {}
114
115mod internal {
116 use super::*;
117
118 impl fidl::encoding::ValueTypeMarker for BusEnsurePublishRequest {
119 type Borrowed<'a> = &'a Self;
120 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
121 value
122 }
123 }
124
125 unsafe impl fidl::encoding::TypeMarker for BusEnsurePublishRequest {
126 type Owned = Self;
127
128 #[inline(always)]
129 fn inline_align(_context: fidl::encoding::Context) -> usize {
130 8
131 }
132
133 #[inline(always)]
134 fn inline_size(_context: fidl::encoding::Context) -> usize {
135 16
136 }
137 }
138
139 unsafe impl<D: fidl::encoding::ResourceDialect>
140 fidl::encoding::Encode<BusEnsurePublishRequest, D> for &BusEnsurePublishRequest
141 {
142 #[inline]
143 unsafe fn encode(
144 self,
145 encoder: &mut fidl::encoding::Encoder<'_, D>,
146 offset: usize,
147 _depth: fidl::encoding::Depth,
148 ) -> fidl::Result<()> {
149 encoder.debug_check_bounds::<BusEnsurePublishRequest>(offset);
150 fidl::encoding::Encode::<BusEnsurePublishRequest, D>::encode(
152 (<Event as fidl::encoding::ValueTypeMarker>::borrow(&self.data),),
153 encoder,
154 offset,
155 _depth,
156 )
157 }
158 }
159 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Event, D>>
160 fidl::encoding::Encode<BusEnsurePublishRequest, D> for (T0,)
161 {
162 #[inline]
163 unsafe fn encode(
164 self,
165 encoder: &mut fidl::encoding::Encoder<'_, D>,
166 offset: usize,
167 depth: fidl::encoding::Depth,
168 ) -> fidl::Result<()> {
169 encoder.debug_check_bounds::<BusEnsurePublishRequest>(offset);
170 self.0.encode(encoder, offset + 0, depth)?;
174 Ok(())
175 }
176 }
177
178 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
179 for BusEnsurePublishRequest
180 {
181 #[inline(always)]
182 fn new_empty() -> Self {
183 Self { data: fidl::new_empty!(Event, D) }
184 }
185
186 #[inline]
187 unsafe fn decode(
188 &mut self,
189 decoder: &mut fidl::encoding::Decoder<'_, D>,
190 offset: usize,
191 _depth: fidl::encoding::Depth,
192 ) -> fidl::Result<()> {
193 decoder.debug_check_bounds::<Self>(offset);
194 fidl::decode!(Event, D, &mut self.data, decoder, offset + 0, _depth)?;
196 Ok(())
197 }
198 }
199
200 impl fidl::encoding::ValueTypeMarker for BusGetClientsResponse {
201 type Borrowed<'a> = &'a Self;
202 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
203 value
204 }
205 }
206
207 unsafe impl fidl::encoding::TypeMarker for BusGetClientsResponse {
208 type Owned = Self;
209
210 #[inline(always)]
211 fn inline_align(_context: fidl::encoding::Context) -> usize {
212 8
213 }
214
215 #[inline(always)]
216 fn inline_size(_context: fidl::encoding::Context) -> usize {
217 16
218 }
219 }
220
221 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BusGetClientsResponse, D>
222 for &BusGetClientsResponse
223 {
224 #[inline]
225 unsafe fn encode(
226 self,
227 encoder: &mut fidl::encoding::Encoder<'_, D>,
228 offset: usize,
229 _depth: fidl::encoding::Depth,
230 ) -> fidl::Result<()> {
231 encoder.debug_check_bounds::<BusGetClientsResponse>(offset);
232 fidl::encoding::Encode::<BusGetClientsResponse, D>::encode(
234 (
235 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.clients),
236 ),
237 encoder, offset, _depth
238 )
239 }
240 }
241 unsafe impl<
242 D: fidl::encoding::ResourceDialect,
243 T0: fidl::encoding::Encode<
244 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
245 D,
246 >,
247 > fidl::encoding::Encode<BusGetClientsResponse, D> for (T0,)
248 {
249 #[inline]
250 unsafe fn encode(
251 self,
252 encoder: &mut fidl::encoding::Encoder<'_, D>,
253 offset: usize,
254 depth: fidl::encoding::Depth,
255 ) -> fidl::Result<()> {
256 encoder.debug_check_bounds::<BusGetClientsResponse>(offset);
257 self.0.encode(encoder, offset + 0, depth)?;
261 Ok(())
262 }
263 }
264
265 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BusGetClientsResponse {
266 #[inline(always)]
267 fn new_empty() -> Self {
268 Self {
269 clients: fidl::new_empty!(
270 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
271 D
272 ),
273 }
274 }
275
276 #[inline]
277 unsafe fn decode(
278 &mut self,
279 decoder: &mut fidl::encoding::Decoder<'_, D>,
280 offset: usize,
281 _depth: fidl::encoding::Depth,
282 ) -> fidl::Result<()> {
283 decoder.debug_check_bounds::<Self>(offset);
284 fidl::decode!(
286 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
287 D,
288 &mut self.clients,
289 decoder,
290 offset + 0,
291 _depth
292 )?;
293 Ok(())
294 }
295 }
296
297 impl fidl::encoding::ValueTypeMarker for BusOnBusDataRequest {
298 type Borrowed<'a> = &'a Self;
299 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
300 value
301 }
302 }
303
304 unsafe impl fidl::encoding::TypeMarker for BusOnBusDataRequest {
305 type Owned = Self;
306
307 #[inline(always)]
308 fn inline_align(_context: fidl::encoding::Context) -> usize {
309 8
310 }
311
312 #[inline(always)]
313 fn inline_size(_context: fidl::encoding::Context) -> usize {
314 16
315 }
316 }
317
318 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BusOnBusDataRequest, D>
319 for &BusOnBusDataRequest
320 {
321 #[inline]
322 unsafe fn encode(
323 self,
324 encoder: &mut fidl::encoding::Encoder<'_, D>,
325 offset: usize,
326 _depth: fidl::encoding::Depth,
327 ) -> fidl::Result<()> {
328 encoder.debug_check_bounds::<BusOnBusDataRequest>(offset);
329 fidl::encoding::Encode::<BusOnBusDataRequest, D>::encode(
331 (<Event as fidl::encoding::ValueTypeMarker>::borrow(&self.data),),
332 encoder,
333 offset,
334 _depth,
335 )
336 }
337 }
338 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Event, D>>
339 fidl::encoding::Encode<BusOnBusDataRequest, D> for (T0,)
340 {
341 #[inline]
342 unsafe fn encode(
343 self,
344 encoder: &mut fidl::encoding::Encoder<'_, D>,
345 offset: usize,
346 depth: fidl::encoding::Depth,
347 ) -> fidl::Result<()> {
348 encoder.debug_check_bounds::<BusOnBusDataRequest>(offset);
349 self.0.encode(encoder, offset + 0, depth)?;
353 Ok(())
354 }
355 }
356
357 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BusOnBusDataRequest {
358 #[inline(always)]
359 fn new_empty() -> Self {
360 Self { data: fidl::new_empty!(Event, D) }
361 }
362
363 #[inline]
364 unsafe fn decode(
365 &mut self,
366 decoder: &mut fidl::encoding::Decoder<'_, D>,
367 offset: usize,
368 _depth: fidl::encoding::Depth,
369 ) -> fidl::Result<()> {
370 decoder.debug_check_bounds::<Self>(offset);
371 fidl::decode!(Event, D, &mut self.data, decoder, offset + 0, _depth)?;
373 Ok(())
374 }
375 }
376
377 impl fidl::encoding::ValueTypeMarker for BusOnClientAttachedRequest {
378 type Borrowed<'a> = &'a Self;
379 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
380 value
381 }
382 }
383
384 unsafe impl fidl::encoding::TypeMarker for BusOnClientAttachedRequest {
385 type Owned = Self;
386
387 #[inline(always)]
388 fn inline_align(_context: fidl::encoding::Context) -> usize {
389 8
390 }
391
392 #[inline(always)]
393 fn inline_size(_context: fidl::encoding::Context) -> usize {
394 16
395 }
396 }
397
398 unsafe impl<D: fidl::encoding::ResourceDialect>
399 fidl::encoding::Encode<BusOnClientAttachedRequest, D> for &BusOnClientAttachedRequest
400 {
401 #[inline]
402 unsafe fn encode(
403 self,
404 encoder: &mut fidl::encoding::Encoder<'_, D>,
405 offset: usize,
406 _depth: fidl::encoding::Depth,
407 ) -> fidl::Result<()> {
408 encoder.debug_check_bounds::<BusOnClientAttachedRequest>(offset);
409 fidl::encoding::Encode::<BusOnClientAttachedRequest, D>::encode(
411 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
412 &self.client,
413 ),),
414 encoder,
415 offset,
416 _depth,
417 )
418 }
419 }
420 unsafe impl<
421 D: fidl::encoding::ResourceDialect,
422 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
423 > fidl::encoding::Encode<BusOnClientAttachedRequest, D> for (T0,)
424 {
425 #[inline]
426 unsafe fn encode(
427 self,
428 encoder: &mut fidl::encoding::Encoder<'_, D>,
429 offset: usize,
430 depth: fidl::encoding::Depth,
431 ) -> fidl::Result<()> {
432 encoder.debug_check_bounds::<BusOnClientAttachedRequest>(offset);
433 self.0.encode(encoder, offset + 0, depth)?;
437 Ok(())
438 }
439 }
440
441 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
442 for BusOnClientAttachedRequest
443 {
444 #[inline(always)]
445 fn new_empty() -> Self {
446 Self { client: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
447 }
448
449 #[inline]
450 unsafe fn decode(
451 &mut self,
452 decoder: &mut fidl::encoding::Decoder<'_, D>,
453 offset: usize,
454 _depth: fidl::encoding::Depth,
455 ) -> fidl::Result<()> {
456 decoder.debug_check_bounds::<Self>(offset);
457 fidl::decode!(
459 fidl::encoding::UnboundedString,
460 D,
461 &mut self.client,
462 decoder,
463 offset + 0,
464 _depth
465 )?;
466 Ok(())
467 }
468 }
469
470 impl fidl::encoding::ValueTypeMarker for BusOnClientDetachedRequest {
471 type Borrowed<'a> = &'a Self;
472 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
473 value
474 }
475 }
476
477 unsafe impl fidl::encoding::TypeMarker for BusOnClientDetachedRequest {
478 type Owned = Self;
479
480 #[inline(always)]
481 fn inline_align(_context: fidl::encoding::Context) -> usize {
482 8
483 }
484
485 #[inline(always)]
486 fn inline_size(_context: fidl::encoding::Context) -> usize {
487 16
488 }
489 }
490
491 unsafe impl<D: fidl::encoding::ResourceDialect>
492 fidl::encoding::Encode<BusOnClientDetachedRequest, D> for &BusOnClientDetachedRequest
493 {
494 #[inline]
495 unsafe fn encode(
496 self,
497 encoder: &mut fidl::encoding::Encoder<'_, D>,
498 offset: usize,
499 _depth: fidl::encoding::Depth,
500 ) -> fidl::Result<()> {
501 encoder.debug_check_bounds::<BusOnClientDetachedRequest>(offset);
502 fidl::encoding::Encode::<BusOnClientDetachedRequest, D>::encode(
504 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
505 &self.client,
506 ),),
507 encoder,
508 offset,
509 _depth,
510 )
511 }
512 }
513 unsafe impl<
514 D: fidl::encoding::ResourceDialect,
515 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
516 > fidl::encoding::Encode<BusOnClientDetachedRequest, D> for (T0,)
517 {
518 #[inline]
519 unsafe fn encode(
520 self,
521 encoder: &mut fidl::encoding::Encoder<'_, D>,
522 offset: usize,
523 depth: fidl::encoding::Depth,
524 ) -> fidl::Result<()> {
525 encoder.debug_check_bounds::<BusOnClientDetachedRequest>(offset);
526 self.0.encode(encoder, offset + 0, depth)?;
530 Ok(())
531 }
532 }
533
534 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
535 for BusOnClientDetachedRequest
536 {
537 #[inline(always)]
538 fn new_empty() -> Self {
539 Self { client: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
540 }
541
542 #[inline]
543 unsafe fn decode(
544 &mut self,
545 decoder: &mut fidl::encoding::Decoder<'_, D>,
546 offset: usize,
547 _depth: fidl::encoding::Depth,
548 ) -> fidl::Result<()> {
549 decoder.debug_check_bounds::<Self>(offset);
550 fidl::decode!(
552 fidl::encoding::UnboundedString,
553 D,
554 &mut self.client,
555 decoder,
556 offset + 0,
557 _depth
558 )?;
559 Ok(())
560 }
561 }
562
563 impl fidl::encoding::ValueTypeMarker for BusPublishRequest {
564 type Borrowed<'a> = &'a Self;
565 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
566 value
567 }
568 }
569
570 unsafe impl fidl::encoding::TypeMarker for BusPublishRequest {
571 type Owned = Self;
572
573 #[inline(always)]
574 fn inline_align(_context: fidl::encoding::Context) -> usize {
575 8
576 }
577
578 #[inline(always)]
579 fn inline_size(_context: fidl::encoding::Context) -> usize {
580 16
581 }
582 }
583
584 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BusPublishRequest, D>
585 for &BusPublishRequest
586 {
587 #[inline]
588 unsafe fn encode(
589 self,
590 encoder: &mut fidl::encoding::Encoder<'_, D>,
591 offset: usize,
592 _depth: fidl::encoding::Depth,
593 ) -> fidl::Result<()> {
594 encoder.debug_check_bounds::<BusPublishRequest>(offset);
595 fidl::encoding::Encode::<BusPublishRequest, D>::encode(
597 (<Event as fidl::encoding::ValueTypeMarker>::borrow(&self.data),),
598 encoder,
599 offset,
600 _depth,
601 )
602 }
603 }
604 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Event, D>>
605 fidl::encoding::Encode<BusPublishRequest, D> for (T0,)
606 {
607 #[inline]
608 unsafe fn encode(
609 self,
610 encoder: &mut fidl::encoding::Encoder<'_, D>,
611 offset: usize,
612 depth: fidl::encoding::Depth,
613 ) -> fidl::Result<()> {
614 encoder.debug_check_bounds::<BusPublishRequest>(offset);
615 self.0.encode(encoder, offset + 0, depth)?;
619 Ok(())
620 }
621 }
622
623 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BusPublishRequest {
624 #[inline(always)]
625 fn new_empty() -> Self {
626 Self { data: fidl::new_empty!(Event, D) }
627 }
628
629 #[inline]
630 unsafe fn decode(
631 &mut self,
632 decoder: &mut fidl::encoding::Decoder<'_, D>,
633 offset: usize,
634 _depth: fidl::encoding::Depth,
635 ) -> fidl::Result<()> {
636 decoder.debug_check_bounds::<Self>(offset);
637 fidl::decode!(Event, D, &mut self.data, decoder, offset + 0, _depth)?;
639 Ok(())
640 }
641 }
642
643 impl fidl::encoding::ValueTypeMarker for BusWaitForClientsRequest {
644 type Borrowed<'a> = &'a Self;
645 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
646 value
647 }
648 }
649
650 unsafe impl fidl::encoding::TypeMarker for BusWaitForClientsRequest {
651 type Owned = Self;
652
653 #[inline(always)]
654 fn inline_align(_context: fidl::encoding::Context) -> usize {
655 8
656 }
657
658 #[inline(always)]
659 fn inline_size(_context: fidl::encoding::Context) -> usize {
660 24
661 }
662 }
663
664 unsafe impl<D: fidl::encoding::ResourceDialect>
665 fidl::encoding::Encode<BusWaitForClientsRequest, D> for &BusWaitForClientsRequest
666 {
667 #[inline]
668 unsafe fn encode(
669 self,
670 encoder: &mut fidl::encoding::Encoder<'_, D>,
671 offset: usize,
672 _depth: fidl::encoding::Depth,
673 ) -> fidl::Result<()> {
674 encoder.debug_check_bounds::<BusWaitForClientsRequest>(offset);
675 fidl::encoding::Encode::<BusWaitForClientsRequest, D>::encode(
677 (
678 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.clients),
679 <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timeout),
680 ),
681 encoder, offset, _depth
682 )
683 }
684 }
685 unsafe impl<
686 D: fidl::encoding::ResourceDialect,
687 T0: fidl::encoding::Encode<
688 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
689 D,
690 >,
691 T1: fidl::encoding::Encode<i64, D>,
692 > fidl::encoding::Encode<BusWaitForClientsRequest, D> for (T0, T1)
693 {
694 #[inline]
695 unsafe fn encode(
696 self,
697 encoder: &mut fidl::encoding::Encoder<'_, D>,
698 offset: usize,
699 depth: fidl::encoding::Depth,
700 ) -> fidl::Result<()> {
701 encoder.debug_check_bounds::<BusWaitForClientsRequest>(offset);
702 self.0.encode(encoder, offset + 0, depth)?;
706 self.1.encode(encoder, offset + 16, depth)?;
707 Ok(())
708 }
709 }
710
711 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
712 for BusWaitForClientsRequest
713 {
714 #[inline(always)]
715 fn new_empty() -> Self {
716 Self {
717 clients: fidl::new_empty!(
718 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
719 D
720 ),
721 timeout: fidl::new_empty!(i64, D),
722 }
723 }
724
725 #[inline]
726 unsafe fn decode(
727 &mut self,
728 decoder: &mut fidl::encoding::Decoder<'_, D>,
729 offset: usize,
730 _depth: fidl::encoding::Depth,
731 ) -> fidl::Result<()> {
732 decoder.debug_check_bounds::<Self>(offset);
733 fidl::decode!(
735 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
736 D,
737 &mut self.clients,
738 decoder,
739 offset + 0,
740 _depth
741 )?;
742 fidl::decode!(i64, D, &mut self.timeout, decoder, offset + 16, _depth)?;
743 Ok(())
744 }
745 }
746
747 impl fidl::encoding::ValueTypeMarker for BusWaitForClientsResponse {
748 type Borrowed<'a> = &'a Self;
749 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
750 value
751 }
752 }
753
754 unsafe impl fidl::encoding::TypeMarker for BusWaitForClientsResponse {
755 type Owned = Self;
756
757 #[inline(always)]
758 fn inline_align(_context: fidl::encoding::Context) -> usize {
759 8
760 }
761
762 #[inline(always)]
763 fn inline_size(_context: fidl::encoding::Context) -> usize {
764 24
765 }
766 }
767
768 unsafe impl<D: fidl::encoding::ResourceDialect>
769 fidl::encoding::Encode<BusWaitForClientsResponse, D> for &BusWaitForClientsResponse
770 {
771 #[inline]
772 unsafe fn encode(
773 self,
774 encoder: &mut fidl::encoding::Encoder<'_, D>,
775 offset: usize,
776 _depth: fidl::encoding::Depth,
777 ) -> fidl::Result<()> {
778 encoder.debug_check_bounds::<BusWaitForClientsResponse>(offset);
779 fidl::encoding::Encode::<BusWaitForClientsResponse, D>::encode(
781 (
782 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.result),
783 <fidl::encoding::Optional<
784 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
785 > as fidl::encoding::ValueTypeMarker>::borrow(&self.absent),
786 ),
787 encoder,
788 offset,
789 _depth,
790 )
791 }
792 }
793 unsafe impl<
794 D: fidl::encoding::ResourceDialect,
795 T0: fidl::encoding::Encode<bool, D>,
796 T1: fidl::encoding::Encode<
797 fidl::encoding::Optional<
798 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
799 >,
800 D,
801 >,
802 > fidl::encoding::Encode<BusWaitForClientsResponse, D> for (T0, T1)
803 {
804 #[inline]
805 unsafe fn encode(
806 self,
807 encoder: &mut fidl::encoding::Encoder<'_, D>,
808 offset: usize,
809 depth: fidl::encoding::Depth,
810 ) -> fidl::Result<()> {
811 encoder.debug_check_bounds::<BusWaitForClientsResponse>(offset);
812 unsafe {
815 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
816 (ptr as *mut u64).write_unaligned(0);
817 }
818 self.0.encode(encoder, offset + 0, depth)?;
820 self.1.encode(encoder, offset + 8, depth)?;
821 Ok(())
822 }
823 }
824
825 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
826 for BusWaitForClientsResponse
827 {
828 #[inline(always)]
829 fn new_empty() -> Self {
830 Self {
831 result: fidl::new_empty!(bool, D),
832 absent: fidl::new_empty!(
833 fidl::encoding::Optional<
834 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
835 >,
836 D
837 ),
838 }
839 }
840
841 #[inline]
842 unsafe fn decode(
843 &mut self,
844 decoder: &mut fidl::encoding::Decoder<'_, D>,
845 offset: usize,
846 _depth: fidl::encoding::Depth,
847 ) -> fidl::Result<()> {
848 decoder.debug_check_bounds::<Self>(offset);
849 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
851 let padval = unsafe { (ptr as *const u64).read_unaligned() };
852 let mask = 0xffffffffffffff00u64;
853 let maskedval = padval & mask;
854 if maskedval != 0 {
855 return Err(fidl::Error::NonZeroPadding {
856 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
857 });
858 }
859 fidl::decode!(bool, D, &mut self.result, decoder, offset + 0, _depth)?;
860 fidl::decode!(
861 fidl::encoding::Optional<
862 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
863 >,
864 D,
865 &mut self.absent,
866 decoder,
867 offset + 8,
868 _depth
869 )?;
870 Ok(())
871 }
872 }
873
874 impl fidl::encoding::ValueTypeMarker for BusWaitForEventRequest {
875 type Borrowed<'a> = &'a Self;
876 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
877 value
878 }
879 }
880
881 unsafe impl fidl::encoding::TypeMarker for BusWaitForEventRequest {
882 type Owned = Self;
883
884 #[inline(always)]
885 fn inline_align(_context: fidl::encoding::Context) -> usize {
886 8
887 }
888
889 #[inline(always)]
890 fn inline_size(_context: fidl::encoding::Context) -> usize {
891 24
892 }
893 }
894
895 unsafe impl<D: fidl::encoding::ResourceDialect>
896 fidl::encoding::Encode<BusWaitForEventRequest, D> for &BusWaitForEventRequest
897 {
898 #[inline]
899 unsafe fn encode(
900 self,
901 encoder: &mut fidl::encoding::Encoder<'_, D>,
902 offset: usize,
903 _depth: fidl::encoding::Depth,
904 ) -> fidl::Result<()> {
905 encoder.debug_check_bounds::<BusWaitForEventRequest>(offset);
906 fidl::encoding::Encode::<BusWaitForEventRequest, D>::encode(
908 (
909 <Event as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
910 <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timeout),
911 ),
912 encoder,
913 offset,
914 _depth,
915 )
916 }
917 }
918 unsafe impl<
919 D: fidl::encoding::ResourceDialect,
920 T0: fidl::encoding::Encode<Event, D>,
921 T1: fidl::encoding::Encode<i64, D>,
922 > fidl::encoding::Encode<BusWaitForEventRequest, D> for (T0, T1)
923 {
924 #[inline]
925 unsafe fn encode(
926 self,
927 encoder: &mut fidl::encoding::Encoder<'_, D>,
928 offset: usize,
929 depth: fidl::encoding::Depth,
930 ) -> fidl::Result<()> {
931 encoder.debug_check_bounds::<BusWaitForEventRequest>(offset);
932 self.0.encode(encoder, offset + 0, depth)?;
936 self.1.encode(encoder, offset + 16, depth)?;
937 Ok(())
938 }
939 }
940
941 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
942 for BusWaitForEventRequest
943 {
944 #[inline(always)]
945 fn new_empty() -> Self {
946 Self { data: fidl::new_empty!(Event, D), timeout: fidl::new_empty!(i64, D) }
947 }
948
949 #[inline]
950 unsafe fn decode(
951 &mut self,
952 decoder: &mut fidl::encoding::Decoder<'_, D>,
953 offset: usize,
954 _depth: fidl::encoding::Depth,
955 ) -> fidl::Result<()> {
956 decoder.debug_check_bounds::<Self>(offset);
957 fidl::decode!(Event, D, &mut self.data, decoder, offset + 0, _depth)?;
959 fidl::decode!(i64, D, &mut self.timeout, decoder, offset + 16, _depth)?;
960 Ok(())
961 }
962 }
963
964 impl fidl::encoding::ValueTypeMarker for BusWaitForEventResponse {
965 type Borrowed<'a> = &'a Self;
966 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
967 value
968 }
969 }
970
971 unsafe impl fidl::encoding::TypeMarker for BusWaitForEventResponse {
972 type Owned = Self;
973
974 #[inline(always)]
975 fn inline_align(_context: fidl::encoding::Context) -> usize {
976 1
977 }
978
979 #[inline(always)]
980 fn inline_size(_context: fidl::encoding::Context) -> usize {
981 1
982 }
983 }
984
985 unsafe impl<D: fidl::encoding::ResourceDialect>
986 fidl::encoding::Encode<BusWaitForEventResponse, D> for &BusWaitForEventResponse
987 {
988 #[inline]
989 unsafe fn encode(
990 self,
991 encoder: &mut fidl::encoding::Encoder<'_, D>,
992 offset: usize,
993 _depth: fidl::encoding::Depth,
994 ) -> fidl::Result<()> {
995 encoder.debug_check_bounds::<BusWaitForEventResponse>(offset);
996 fidl::encoding::Encode::<BusWaitForEventResponse, D>::encode(
998 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
999 encoder,
1000 offset,
1001 _depth,
1002 )
1003 }
1004 }
1005 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
1006 fidl::encoding::Encode<BusWaitForEventResponse, D> for (T0,)
1007 {
1008 #[inline]
1009 unsafe fn encode(
1010 self,
1011 encoder: &mut fidl::encoding::Encoder<'_, D>,
1012 offset: usize,
1013 depth: fidl::encoding::Depth,
1014 ) -> fidl::Result<()> {
1015 encoder.debug_check_bounds::<BusWaitForEventResponse>(offset);
1016 self.0.encode(encoder, offset + 0, depth)?;
1020 Ok(())
1021 }
1022 }
1023
1024 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1025 for BusWaitForEventResponse
1026 {
1027 #[inline(always)]
1028 fn new_empty() -> Self {
1029 Self { result: fidl::new_empty!(bool, D) }
1030 }
1031
1032 #[inline]
1033 unsafe fn decode(
1034 &mut self,
1035 decoder: &mut fidl::encoding::Decoder<'_, D>,
1036 offset: usize,
1037 _depth: fidl::encoding::Depth,
1038 ) -> fidl::Result<()> {
1039 decoder.debug_check_bounds::<Self>(offset);
1040 fidl::decode!(bool, D, &mut self.result, decoder, offset + 0, _depth)?;
1042 Ok(())
1043 }
1044 }
1045
1046 impl fidl::encoding::ValueTypeMarker for SyncManagerWaitForBarrierThresholdRequest {
1047 type Borrowed<'a> = &'a Self;
1048 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1049 value
1050 }
1051 }
1052
1053 unsafe impl fidl::encoding::TypeMarker for SyncManagerWaitForBarrierThresholdRequest {
1054 type Owned = Self;
1055
1056 #[inline(always)]
1057 fn inline_align(_context: fidl::encoding::Context) -> usize {
1058 8
1059 }
1060
1061 #[inline(always)]
1062 fn inline_size(_context: fidl::encoding::Context) -> usize {
1063 32
1064 }
1065 }
1066
1067 unsafe impl<D: fidl::encoding::ResourceDialect>
1068 fidl::encoding::Encode<SyncManagerWaitForBarrierThresholdRequest, D>
1069 for &SyncManagerWaitForBarrierThresholdRequest
1070 {
1071 #[inline]
1072 unsafe fn encode(
1073 self,
1074 encoder: &mut fidl::encoding::Encoder<'_, D>,
1075 offset: usize,
1076 _depth: fidl::encoding::Depth,
1077 ) -> fidl::Result<()> {
1078 encoder.debug_check_bounds::<SyncManagerWaitForBarrierThresholdRequest>(offset);
1079 fidl::encoding::Encode::<SyncManagerWaitForBarrierThresholdRequest, D>::encode(
1081 (
1082 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
1083 &self.barrier_name,
1084 ),
1085 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.threshold),
1086 <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timeout),
1087 ),
1088 encoder,
1089 offset,
1090 _depth,
1091 )
1092 }
1093 }
1094 unsafe impl<
1095 D: fidl::encoding::ResourceDialect,
1096 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1097 T1: fidl::encoding::Encode<u32, D>,
1098 T2: fidl::encoding::Encode<i64, D>,
1099 > fidl::encoding::Encode<SyncManagerWaitForBarrierThresholdRequest, D> for (T0, T1, T2)
1100 {
1101 #[inline]
1102 unsafe fn encode(
1103 self,
1104 encoder: &mut fidl::encoding::Encoder<'_, D>,
1105 offset: usize,
1106 depth: fidl::encoding::Depth,
1107 ) -> fidl::Result<()> {
1108 encoder.debug_check_bounds::<SyncManagerWaitForBarrierThresholdRequest>(offset);
1109 unsafe {
1112 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1113 (ptr as *mut u64).write_unaligned(0);
1114 }
1115 self.0.encode(encoder, offset + 0, depth)?;
1117 self.1.encode(encoder, offset + 16, depth)?;
1118 self.2.encode(encoder, offset + 24, depth)?;
1119 Ok(())
1120 }
1121 }
1122
1123 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1124 for SyncManagerWaitForBarrierThresholdRequest
1125 {
1126 #[inline(always)]
1127 fn new_empty() -> Self {
1128 Self {
1129 barrier_name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
1130 threshold: fidl::new_empty!(u32, D),
1131 timeout: fidl::new_empty!(i64, D),
1132 }
1133 }
1134
1135 #[inline]
1136 unsafe fn decode(
1137 &mut self,
1138 decoder: &mut fidl::encoding::Decoder<'_, D>,
1139 offset: usize,
1140 _depth: fidl::encoding::Depth,
1141 ) -> fidl::Result<()> {
1142 decoder.debug_check_bounds::<Self>(offset);
1143 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1145 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1146 let mask = 0xffffffff00000000u64;
1147 let maskedval = padval & mask;
1148 if maskedval != 0 {
1149 return Err(fidl::Error::NonZeroPadding {
1150 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1151 });
1152 }
1153 fidl::decode!(
1154 fidl::encoding::UnboundedString,
1155 D,
1156 &mut self.barrier_name,
1157 decoder,
1158 offset + 0,
1159 _depth
1160 )?;
1161 fidl::decode!(u32, D, &mut self.threshold, decoder, offset + 16, _depth)?;
1162 fidl::decode!(i64, D, &mut self.timeout, decoder, offset + 24, _depth)?;
1163 Ok(())
1164 }
1165 }
1166
1167 impl fidl::encoding::ValueTypeMarker for SyncManagerWaitForBarrierThresholdResponse {
1168 type Borrowed<'a> = &'a Self;
1169 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1170 value
1171 }
1172 }
1173
1174 unsafe impl fidl::encoding::TypeMarker for SyncManagerWaitForBarrierThresholdResponse {
1175 type Owned = Self;
1176
1177 #[inline(always)]
1178 fn inline_align(_context: fidl::encoding::Context) -> usize {
1179 1
1180 }
1181
1182 #[inline(always)]
1183 fn inline_size(_context: fidl::encoding::Context) -> usize {
1184 1
1185 }
1186 }
1187
1188 unsafe impl<D: fidl::encoding::ResourceDialect>
1189 fidl::encoding::Encode<SyncManagerWaitForBarrierThresholdResponse, D>
1190 for &SyncManagerWaitForBarrierThresholdResponse
1191 {
1192 #[inline]
1193 unsafe fn encode(
1194 self,
1195 encoder: &mut fidl::encoding::Encoder<'_, D>,
1196 offset: usize,
1197 _depth: fidl::encoding::Depth,
1198 ) -> fidl::Result<()> {
1199 encoder.debug_check_bounds::<SyncManagerWaitForBarrierThresholdResponse>(offset);
1200 fidl::encoding::Encode::<SyncManagerWaitForBarrierThresholdResponse, D>::encode(
1202 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
1203 encoder,
1204 offset,
1205 _depth,
1206 )
1207 }
1208 }
1209 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
1210 fidl::encoding::Encode<SyncManagerWaitForBarrierThresholdResponse, D> for (T0,)
1211 {
1212 #[inline]
1213 unsafe fn encode(
1214 self,
1215 encoder: &mut fidl::encoding::Encoder<'_, D>,
1216 offset: usize,
1217 depth: fidl::encoding::Depth,
1218 ) -> fidl::Result<()> {
1219 encoder.debug_check_bounds::<SyncManagerWaitForBarrierThresholdResponse>(offset);
1220 self.0.encode(encoder, offset + 0, depth)?;
1224 Ok(())
1225 }
1226 }
1227
1228 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1229 for SyncManagerWaitForBarrierThresholdResponse
1230 {
1231 #[inline(always)]
1232 fn new_empty() -> Self {
1233 Self { result: fidl::new_empty!(bool, D) }
1234 }
1235
1236 #[inline]
1237 unsafe fn decode(
1238 &mut self,
1239 decoder: &mut fidl::encoding::Decoder<'_, D>,
1240 offset: usize,
1241 _depth: fidl::encoding::Depth,
1242 ) -> fidl::Result<()> {
1243 decoder.debug_check_bounds::<Self>(offset);
1244 fidl::decode!(bool, D, &mut self.result, decoder, offset + 0, _depth)?;
1246 Ok(())
1247 }
1248 }
1249
1250 impl Event {
1251 #[inline(always)]
1252 fn max_ordinal_present(&self) -> u64 {
1253 if let Some(_) = self.arguments {
1254 return 3;
1255 }
1256 if let Some(_) = self.message {
1257 return 2;
1258 }
1259 if let Some(_) = self.code {
1260 return 1;
1261 }
1262 0
1263 }
1264 }
1265
1266 impl fidl::encoding::ValueTypeMarker for Event {
1267 type Borrowed<'a> = &'a Self;
1268 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1269 value
1270 }
1271 }
1272
1273 unsafe impl fidl::encoding::TypeMarker for Event {
1274 type Owned = Self;
1275
1276 #[inline(always)]
1277 fn inline_align(_context: fidl::encoding::Context) -> usize {
1278 8
1279 }
1280
1281 #[inline(always)]
1282 fn inline_size(_context: fidl::encoding::Context) -> usize {
1283 16
1284 }
1285 }
1286
1287 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Event, D> for &Event {
1288 unsafe fn encode(
1289 self,
1290 encoder: &mut fidl::encoding::Encoder<'_, D>,
1291 offset: usize,
1292 mut depth: fidl::encoding::Depth,
1293 ) -> fidl::Result<()> {
1294 encoder.debug_check_bounds::<Event>(offset);
1295 let max_ordinal: u64 = self.max_ordinal_present();
1297 encoder.write_num(max_ordinal, offset);
1298 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1299 if max_ordinal == 0 {
1301 return Ok(());
1302 }
1303 depth.increment()?;
1304 let envelope_size = 8;
1305 let bytes_len = max_ordinal as usize * envelope_size;
1306 #[allow(unused_variables)]
1307 let offset = encoder.out_of_line_offset(bytes_len);
1308 let mut _prev_end_offset: usize = 0;
1309 if 1 > max_ordinal {
1310 return Ok(());
1311 }
1312
1313 let cur_offset: usize = (1 - 1) * envelope_size;
1316
1317 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1319
1320 fidl::encoding::encode_in_envelope_optional::<i32, D>(
1325 self.code.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
1326 encoder,
1327 offset + cur_offset,
1328 depth,
1329 )?;
1330
1331 _prev_end_offset = cur_offset + envelope_size;
1332 if 2 > max_ordinal {
1333 return Ok(());
1334 }
1335
1336 let cur_offset: usize = (2 - 1) * envelope_size;
1339
1340 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1342
1343 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
1348 self.message.as_ref().map(
1349 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
1350 ),
1351 encoder,
1352 offset + cur_offset,
1353 depth,
1354 )?;
1355
1356 _prev_end_offset = cur_offset + envelope_size;
1357 if 3 > max_ordinal {
1358 return Ok(());
1359 }
1360
1361 let cur_offset: usize = (3 - 1) * envelope_size;
1364
1365 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1367
1368 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
1373 self.arguments.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
1374 encoder, offset + cur_offset, depth
1375 )?;
1376
1377 _prev_end_offset = cur_offset + envelope_size;
1378
1379 Ok(())
1380 }
1381 }
1382
1383 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Event {
1384 #[inline(always)]
1385 fn new_empty() -> Self {
1386 Self::default()
1387 }
1388
1389 unsafe fn decode(
1390 &mut self,
1391 decoder: &mut fidl::encoding::Decoder<'_, D>,
1392 offset: usize,
1393 mut depth: fidl::encoding::Depth,
1394 ) -> fidl::Result<()> {
1395 decoder.debug_check_bounds::<Self>(offset);
1396 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1397 None => return Err(fidl::Error::NotNullable),
1398 Some(len) => len,
1399 };
1400 if len == 0 {
1402 return Ok(());
1403 };
1404 depth.increment()?;
1405 let envelope_size = 8;
1406 let bytes_len = len * envelope_size;
1407 let offset = decoder.out_of_line_offset(bytes_len)?;
1408 let mut _next_ordinal_to_read = 0;
1410 let mut next_offset = offset;
1411 let end_offset = offset + bytes_len;
1412 _next_ordinal_to_read += 1;
1413 if next_offset >= end_offset {
1414 return Ok(());
1415 }
1416
1417 while _next_ordinal_to_read < 1 {
1419 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1420 _next_ordinal_to_read += 1;
1421 next_offset += envelope_size;
1422 }
1423
1424 let next_out_of_line = decoder.next_out_of_line();
1425 let handles_before = decoder.remaining_handles();
1426 if let Some((inlined, num_bytes, num_handles)) =
1427 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1428 {
1429 let member_inline_size =
1430 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1431 if inlined != (member_inline_size <= 4) {
1432 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1433 }
1434 let inner_offset;
1435 let mut inner_depth = depth.clone();
1436 if inlined {
1437 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1438 inner_offset = next_offset;
1439 } else {
1440 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1441 inner_depth.increment()?;
1442 }
1443 let val_ref = self.code.get_or_insert_with(|| fidl::new_empty!(i32, D));
1444 fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
1445 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1446 {
1447 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1448 }
1449 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1450 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1451 }
1452 }
1453
1454 next_offset += envelope_size;
1455 _next_ordinal_to_read += 1;
1456 if next_offset >= end_offset {
1457 return Ok(());
1458 }
1459
1460 while _next_ordinal_to_read < 2 {
1462 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1463 _next_ordinal_to_read += 1;
1464 next_offset += envelope_size;
1465 }
1466
1467 let next_out_of_line = decoder.next_out_of_line();
1468 let handles_before = decoder.remaining_handles();
1469 if let Some((inlined, num_bytes, num_handles)) =
1470 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1471 {
1472 let member_inline_size =
1473 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
1474 decoder.context,
1475 );
1476 if inlined != (member_inline_size <= 4) {
1477 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1478 }
1479 let inner_offset;
1480 let mut inner_depth = depth.clone();
1481 if inlined {
1482 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1483 inner_offset = next_offset;
1484 } else {
1485 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1486 inner_depth.increment()?;
1487 }
1488 let val_ref = self
1489 .message
1490 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
1491 fidl::decode!(
1492 fidl::encoding::UnboundedString,
1493 D,
1494 val_ref,
1495 decoder,
1496 inner_offset,
1497 inner_depth
1498 )?;
1499 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1500 {
1501 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1502 }
1503 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1504 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1505 }
1506 }
1507
1508 next_offset += envelope_size;
1509 _next_ordinal_to_read += 1;
1510 if next_offset >= end_offset {
1511 return Ok(());
1512 }
1513
1514 while _next_ordinal_to_read < 3 {
1516 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1517 _next_ordinal_to_read += 1;
1518 next_offset += envelope_size;
1519 }
1520
1521 let next_out_of_line = decoder.next_out_of_line();
1522 let handles_before = decoder.remaining_handles();
1523 if let Some((inlined, num_bytes, num_handles)) =
1524 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1525 {
1526 let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1527 if inlined != (member_inline_size <= 4) {
1528 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1529 }
1530 let inner_offset;
1531 let mut inner_depth = depth.clone();
1532 if inlined {
1533 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1534 inner_offset = next_offset;
1535 } else {
1536 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1537 inner_depth.increment()?;
1538 }
1539 let val_ref = self.arguments.get_or_insert_with(|| {
1540 fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
1541 });
1542 fidl::decode!(
1543 fidl::encoding::UnboundedVector<u8>,
1544 D,
1545 val_ref,
1546 decoder,
1547 inner_offset,
1548 inner_depth
1549 )?;
1550 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1551 {
1552 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1553 }
1554 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1555 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1556 }
1557 }
1558
1559 next_offset += envelope_size;
1560
1561 while next_offset < end_offset {
1563 _next_ordinal_to_read += 1;
1564 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1565 next_offset += envelope_size;
1566 }
1567
1568 Ok(())
1569 }
1570 }
1571}