1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11pub type ReadData = Vec<u8>;
13
14pub const MAX_COUNT_TRANSACTIONS: u32 = 256;
16
17pub const MAX_I2_C_NAME_LEN: u32 = 64;
19
20pub const MAX_TRANSFER_SIZE: u32 = 32768;
26
27#[derive(Clone, Debug, PartialEq)]
28pub struct DeviceTransferRequest {
29 pub transactions: Vec<Transaction>,
30}
31
32impl fidl::Persistable for DeviceTransferRequest {}
33
34#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35pub struct DeviceGetNameResponse {
36 pub name: String,
37}
38
39impl fidl::Persistable for DeviceGetNameResponse {}
40
41#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
42pub struct DeviceTransferResponse {
43 pub read_data: Vec<Vec<u8>>,
44}
45
46impl fidl::Persistable for DeviceTransferResponse {}
47
48#[derive(Clone, Debug, Default, PartialEq)]
54pub struct Transaction {
55 pub data_transfer: Option<DataTransfer>,
56 pub stop: Option<bool>,
57 #[doc(hidden)]
58 pub __source_breaking: fidl::marker::SourceBreaking,
59}
60
61impl fidl::Persistable for Transaction {}
62
63#[derive(Clone, Debug)]
68pub enum DataTransfer {
69 ReadSize(u32),
70 WriteData(Vec<u8>),
71 #[doc(hidden)]
72 __SourceBreaking {
73 unknown_ordinal: u64,
74 },
75}
76
77#[macro_export]
79macro_rules! DataTransferUnknown {
80 () => {
81 _
82 };
83}
84
85impl PartialEq for DataTransfer {
87 fn eq(&self, other: &Self) -> bool {
88 match (self, other) {
89 (Self::ReadSize(x), Self::ReadSize(y)) => *x == *y,
90 (Self::WriteData(x), Self::WriteData(y)) => *x == *y,
91 _ => false,
92 }
93 }
94}
95
96impl DataTransfer {
97 #[inline]
98 pub fn ordinal(&self) -> u64 {
99 match *self {
100 Self::ReadSize(_) => 1,
101 Self::WriteData(_) => 2,
102 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
103 }
104 }
105
106 #[inline]
107 pub fn unknown_variant_for_testing() -> Self {
108 Self::__SourceBreaking { unknown_ordinal: 0 }
109 }
110
111 #[inline]
112 pub fn is_unknown(&self) -> bool {
113 match self {
114 Self::__SourceBreaking { .. } => true,
115 _ => false,
116 }
117 }
118}
119
120impl fidl::Persistable for DataTransfer {}
121
122mod internal {
123 use super::*;
124
125 impl fidl::encoding::ValueTypeMarker for DeviceTransferRequest {
126 type Borrowed<'a> = &'a Self;
127 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
128 value
129 }
130 }
131
132 unsafe impl fidl::encoding::TypeMarker for DeviceTransferRequest {
133 type Owned = Self;
134
135 #[inline(always)]
136 fn inline_align(_context: fidl::encoding::Context) -> usize {
137 8
138 }
139
140 #[inline(always)]
141 fn inline_size(_context: fidl::encoding::Context) -> usize {
142 16
143 }
144 }
145
146 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeviceTransferRequest, D>
147 for &DeviceTransferRequest
148 {
149 #[inline]
150 unsafe fn encode(
151 self,
152 encoder: &mut fidl::encoding::Encoder<'_, D>,
153 offset: usize,
154 _depth: fidl::encoding::Depth,
155 ) -> fidl::Result<()> {
156 encoder.debug_check_bounds::<DeviceTransferRequest>(offset);
157 fidl::encoding::Encode::<DeviceTransferRequest, D>::encode(
159 (
160 <fidl::encoding::Vector<Transaction, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.transactions),
161 ),
162 encoder, offset, _depth
163 )
164 }
165 }
166 unsafe impl<
167 D: fidl::encoding::ResourceDialect,
168 T0: fidl::encoding::Encode<fidl::encoding::Vector<Transaction, 256>, D>,
169 > fidl::encoding::Encode<DeviceTransferRequest, D> for (T0,)
170 {
171 #[inline]
172 unsafe fn encode(
173 self,
174 encoder: &mut fidl::encoding::Encoder<'_, D>,
175 offset: usize,
176 depth: fidl::encoding::Depth,
177 ) -> fidl::Result<()> {
178 encoder.debug_check_bounds::<DeviceTransferRequest>(offset);
179 self.0.encode(encoder, offset + 0, depth)?;
183 Ok(())
184 }
185 }
186
187 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeviceTransferRequest {
188 #[inline(always)]
189 fn new_empty() -> Self {
190 Self { transactions: fidl::new_empty!(fidl::encoding::Vector<Transaction, 256>, D) }
191 }
192
193 #[inline]
194 unsafe fn decode(
195 &mut self,
196 decoder: &mut fidl::encoding::Decoder<'_, D>,
197 offset: usize,
198 _depth: fidl::encoding::Depth,
199 ) -> fidl::Result<()> {
200 decoder.debug_check_bounds::<Self>(offset);
201 fidl::decode!(fidl::encoding::Vector<Transaction, 256>, D, &mut self.transactions, decoder, offset + 0, _depth)?;
203 Ok(())
204 }
205 }
206
207 impl fidl::encoding::ValueTypeMarker for DeviceGetNameResponse {
208 type Borrowed<'a> = &'a Self;
209 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
210 value
211 }
212 }
213
214 unsafe impl fidl::encoding::TypeMarker for DeviceGetNameResponse {
215 type Owned = Self;
216
217 #[inline(always)]
218 fn inline_align(_context: fidl::encoding::Context) -> usize {
219 8
220 }
221
222 #[inline(always)]
223 fn inline_size(_context: fidl::encoding::Context) -> usize {
224 16
225 }
226 }
227
228 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeviceGetNameResponse, D>
229 for &DeviceGetNameResponse
230 {
231 #[inline]
232 unsafe fn encode(
233 self,
234 encoder: &mut fidl::encoding::Encoder<'_, D>,
235 offset: usize,
236 _depth: fidl::encoding::Depth,
237 ) -> fidl::Result<()> {
238 encoder.debug_check_bounds::<DeviceGetNameResponse>(offset);
239 fidl::encoding::Encode::<DeviceGetNameResponse, D>::encode(
241 (<fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
242 &self.name,
243 ),),
244 encoder,
245 offset,
246 _depth,
247 )
248 }
249 }
250 unsafe impl<
251 D: fidl::encoding::ResourceDialect,
252 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
253 > fidl::encoding::Encode<DeviceGetNameResponse, D> for (T0,)
254 {
255 #[inline]
256 unsafe fn encode(
257 self,
258 encoder: &mut fidl::encoding::Encoder<'_, D>,
259 offset: usize,
260 depth: fidl::encoding::Depth,
261 ) -> fidl::Result<()> {
262 encoder.debug_check_bounds::<DeviceGetNameResponse>(offset);
263 self.0.encode(encoder, offset + 0, depth)?;
267 Ok(())
268 }
269 }
270
271 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeviceGetNameResponse {
272 #[inline(always)]
273 fn new_empty() -> Self {
274 Self { name: fidl::new_empty!(fidl::encoding::BoundedString<64>, D) }
275 }
276
277 #[inline]
278 unsafe fn decode(
279 &mut self,
280 decoder: &mut fidl::encoding::Decoder<'_, D>,
281 offset: usize,
282 _depth: fidl::encoding::Depth,
283 ) -> fidl::Result<()> {
284 decoder.debug_check_bounds::<Self>(offset);
285 fidl::decode!(
287 fidl::encoding::BoundedString<64>,
288 D,
289 &mut self.name,
290 decoder,
291 offset + 0,
292 _depth
293 )?;
294 Ok(())
295 }
296 }
297
298 impl fidl::encoding::ValueTypeMarker for DeviceTransferResponse {
299 type Borrowed<'a> = &'a Self;
300 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
301 value
302 }
303 }
304
305 unsafe impl fidl::encoding::TypeMarker for DeviceTransferResponse {
306 type Owned = Self;
307
308 #[inline(always)]
309 fn inline_align(_context: fidl::encoding::Context) -> usize {
310 8
311 }
312
313 #[inline(always)]
314 fn inline_size(_context: fidl::encoding::Context) -> usize {
315 16
316 }
317 }
318
319 unsafe impl<D: fidl::encoding::ResourceDialect>
320 fidl::encoding::Encode<DeviceTransferResponse, D> for &DeviceTransferResponse
321 {
322 #[inline]
323 unsafe fn encode(
324 self,
325 encoder: &mut fidl::encoding::Encoder<'_, D>,
326 offset: usize,
327 _depth: fidl::encoding::Depth,
328 ) -> fidl::Result<()> {
329 encoder.debug_check_bounds::<DeviceTransferResponse>(offset);
330 fidl::encoding::Encode::<DeviceTransferResponse, D>::encode(
332 (
333 <fidl::encoding::Vector<fidl::encoding::Vector<u8, 32768>, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.read_data),
334 ),
335 encoder, offset, _depth
336 )
337 }
338 }
339 unsafe impl<
340 D: fidl::encoding::ResourceDialect,
341 T0: fidl::encoding::Encode<
342 fidl::encoding::Vector<fidl::encoding::Vector<u8, 32768>, 256>,
343 D,
344 >,
345 > fidl::encoding::Encode<DeviceTransferResponse, D> for (T0,)
346 {
347 #[inline]
348 unsafe fn encode(
349 self,
350 encoder: &mut fidl::encoding::Encoder<'_, D>,
351 offset: usize,
352 depth: fidl::encoding::Depth,
353 ) -> fidl::Result<()> {
354 encoder.debug_check_bounds::<DeviceTransferResponse>(offset);
355 self.0.encode(encoder, offset + 0, depth)?;
359 Ok(())
360 }
361 }
362
363 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
364 for DeviceTransferResponse
365 {
366 #[inline(always)]
367 fn new_empty() -> Self {
368 Self {
369 read_data: fidl::new_empty!(
370 fidl::encoding::Vector<fidl::encoding::Vector<u8, 32768>, 256>,
371 D
372 ),
373 }
374 }
375
376 #[inline]
377 unsafe fn decode(
378 &mut self,
379 decoder: &mut fidl::encoding::Decoder<'_, D>,
380 offset: usize,
381 _depth: fidl::encoding::Depth,
382 ) -> fidl::Result<()> {
383 decoder.debug_check_bounds::<Self>(offset);
384 fidl::decode!(
386 fidl::encoding::Vector<fidl::encoding::Vector<u8, 32768>, 256>,
387 D,
388 &mut self.read_data,
389 decoder,
390 offset + 0,
391 _depth
392 )?;
393 Ok(())
394 }
395 }
396
397 impl Transaction {
398 #[inline(always)]
399 fn max_ordinal_present(&self) -> u64 {
400 if let Some(_) = self.stop {
401 return 2;
402 }
403 if let Some(_) = self.data_transfer {
404 return 1;
405 }
406 0
407 }
408 }
409
410 impl fidl::encoding::ValueTypeMarker for Transaction {
411 type Borrowed<'a> = &'a Self;
412 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
413 value
414 }
415 }
416
417 unsafe impl fidl::encoding::TypeMarker for Transaction {
418 type Owned = Self;
419
420 #[inline(always)]
421 fn inline_align(_context: fidl::encoding::Context) -> usize {
422 8
423 }
424
425 #[inline(always)]
426 fn inline_size(_context: fidl::encoding::Context) -> usize {
427 16
428 }
429 }
430
431 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Transaction, D>
432 for &Transaction
433 {
434 unsafe fn encode(
435 self,
436 encoder: &mut fidl::encoding::Encoder<'_, D>,
437 offset: usize,
438 mut depth: fidl::encoding::Depth,
439 ) -> fidl::Result<()> {
440 encoder.debug_check_bounds::<Transaction>(offset);
441 let max_ordinal: u64 = self.max_ordinal_present();
443 encoder.write_num(max_ordinal, offset);
444 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
445 if max_ordinal == 0 {
447 return Ok(());
448 }
449 depth.increment()?;
450 let envelope_size = 8;
451 let bytes_len = max_ordinal as usize * envelope_size;
452 #[allow(unused_variables)]
453 let offset = encoder.out_of_line_offset(bytes_len);
454 let mut _prev_end_offset: usize = 0;
455 if 1 > max_ordinal {
456 return Ok(());
457 }
458
459 let cur_offset: usize = (1 - 1) * envelope_size;
462
463 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
465
466 fidl::encoding::encode_in_envelope_optional::<DataTransfer, D>(
471 self.data_transfer
472 .as_ref()
473 .map(<DataTransfer as fidl::encoding::ValueTypeMarker>::borrow),
474 encoder,
475 offset + cur_offset,
476 depth,
477 )?;
478
479 _prev_end_offset = cur_offset + envelope_size;
480 if 2 > max_ordinal {
481 return Ok(());
482 }
483
484 let cur_offset: usize = (2 - 1) * envelope_size;
487
488 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
490
491 fidl::encoding::encode_in_envelope_optional::<bool, D>(
496 self.stop.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
497 encoder,
498 offset + cur_offset,
499 depth,
500 )?;
501
502 _prev_end_offset = cur_offset + envelope_size;
503
504 Ok(())
505 }
506 }
507
508 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Transaction {
509 #[inline(always)]
510 fn new_empty() -> Self {
511 Self::default()
512 }
513
514 unsafe fn decode(
515 &mut self,
516 decoder: &mut fidl::encoding::Decoder<'_, D>,
517 offset: usize,
518 mut depth: fidl::encoding::Depth,
519 ) -> fidl::Result<()> {
520 decoder.debug_check_bounds::<Self>(offset);
521 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
522 None => return Err(fidl::Error::NotNullable),
523 Some(len) => len,
524 };
525 if len == 0 {
527 return Ok(());
528 };
529 depth.increment()?;
530 let envelope_size = 8;
531 let bytes_len = len * envelope_size;
532 let offset = decoder.out_of_line_offset(bytes_len)?;
533 let mut _next_ordinal_to_read = 0;
535 let mut next_offset = offset;
536 let end_offset = offset + bytes_len;
537 _next_ordinal_to_read += 1;
538 if next_offset >= end_offset {
539 return Ok(());
540 }
541
542 while _next_ordinal_to_read < 1 {
544 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
545 _next_ordinal_to_read += 1;
546 next_offset += envelope_size;
547 }
548
549 let next_out_of_line = decoder.next_out_of_line();
550 let handles_before = decoder.remaining_handles();
551 if let Some((inlined, num_bytes, num_handles)) =
552 fidl::encoding::decode_envelope_header(decoder, next_offset)?
553 {
554 let member_inline_size =
555 <DataTransfer as fidl::encoding::TypeMarker>::inline_size(decoder.context);
556 if inlined != (member_inline_size <= 4) {
557 return Err(fidl::Error::InvalidInlineBitInEnvelope);
558 }
559 let inner_offset;
560 let mut inner_depth = depth.clone();
561 if inlined {
562 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
563 inner_offset = next_offset;
564 } else {
565 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
566 inner_depth.increment()?;
567 }
568 let val_ref =
569 self.data_transfer.get_or_insert_with(|| fidl::new_empty!(DataTransfer, D));
570 fidl::decode!(DataTransfer, D, val_ref, decoder, inner_offset, inner_depth)?;
571 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
572 {
573 return Err(fidl::Error::InvalidNumBytesInEnvelope);
574 }
575 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
576 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
577 }
578 }
579
580 next_offset += envelope_size;
581 _next_ordinal_to_read += 1;
582 if next_offset >= end_offset {
583 return Ok(());
584 }
585
586 while _next_ordinal_to_read < 2 {
588 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
589 _next_ordinal_to_read += 1;
590 next_offset += envelope_size;
591 }
592
593 let next_out_of_line = decoder.next_out_of_line();
594 let handles_before = decoder.remaining_handles();
595 if let Some((inlined, num_bytes, num_handles)) =
596 fidl::encoding::decode_envelope_header(decoder, next_offset)?
597 {
598 let member_inline_size =
599 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
600 if inlined != (member_inline_size <= 4) {
601 return Err(fidl::Error::InvalidInlineBitInEnvelope);
602 }
603 let inner_offset;
604 let mut inner_depth = depth.clone();
605 if inlined {
606 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
607 inner_offset = next_offset;
608 } else {
609 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
610 inner_depth.increment()?;
611 }
612 let val_ref = self.stop.get_or_insert_with(|| fidl::new_empty!(bool, D));
613 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
614 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
615 {
616 return Err(fidl::Error::InvalidNumBytesInEnvelope);
617 }
618 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
619 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
620 }
621 }
622
623 next_offset += envelope_size;
624
625 while next_offset < end_offset {
627 _next_ordinal_to_read += 1;
628 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
629 next_offset += envelope_size;
630 }
631
632 Ok(())
633 }
634 }
635
636 impl fidl::encoding::ValueTypeMarker for DataTransfer {
637 type Borrowed<'a> = &'a Self;
638 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
639 value
640 }
641 }
642
643 unsafe impl fidl::encoding::TypeMarker for DataTransfer {
644 type Owned = Self;
645
646 #[inline(always)]
647 fn inline_align(_context: fidl::encoding::Context) -> usize {
648 8
649 }
650
651 #[inline(always)]
652 fn inline_size(_context: fidl::encoding::Context) -> usize {
653 16
654 }
655 }
656
657 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DataTransfer, D>
658 for &DataTransfer
659 {
660 #[inline]
661 unsafe fn encode(
662 self,
663 encoder: &mut fidl::encoding::Encoder<'_, D>,
664 offset: usize,
665 _depth: fidl::encoding::Depth,
666 ) -> fidl::Result<()> {
667 encoder.debug_check_bounds::<DataTransfer>(offset);
668 encoder.write_num::<u64>(self.ordinal(), offset);
669 match self {
670 DataTransfer::ReadSize(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
671 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
672 encoder,
673 offset + 8,
674 _depth,
675 ),
676 DataTransfer::WriteData(ref val) => fidl::encoding::encode_in_envelope::<
677 fidl::encoding::Vector<u8, 32768>,
678 D,
679 >(
680 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
681 val,
682 ),
683 encoder,
684 offset + 8,
685 _depth,
686 ),
687 DataTransfer::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
688 }
689 }
690 }
691
692 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DataTransfer {
693 #[inline(always)]
694 fn new_empty() -> Self {
695 Self::__SourceBreaking { unknown_ordinal: 0 }
696 }
697
698 #[inline]
699 unsafe fn decode(
700 &mut self,
701 decoder: &mut fidl::encoding::Decoder<'_, D>,
702 offset: usize,
703 mut depth: fidl::encoding::Depth,
704 ) -> fidl::Result<()> {
705 decoder.debug_check_bounds::<Self>(offset);
706 #[allow(unused_variables)]
707 let next_out_of_line = decoder.next_out_of_line();
708 let handles_before = decoder.remaining_handles();
709 let (ordinal, inlined, num_bytes, num_handles) =
710 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
711
712 let member_inline_size = match ordinal {
713 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
714 2 => {
715 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
716 decoder.context,
717 )
718 }
719 0 => return Err(fidl::Error::UnknownUnionTag),
720 _ => num_bytes as usize,
721 };
722
723 if inlined != (member_inline_size <= 4) {
724 return Err(fidl::Error::InvalidInlineBitInEnvelope);
725 }
726 let _inner_offset;
727 if inlined {
728 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
729 _inner_offset = offset + 8;
730 } else {
731 depth.increment()?;
732 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
733 }
734 match ordinal {
735 1 => {
736 #[allow(irrefutable_let_patterns)]
737 if let DataTransfer::ReadSize(_) = self {
738 } else {
740 *self = DataTransfer::ReadSize(fidl::new_empty!(u32, D));
742 }
743 #[allow(irrefutable_let_patterns)]
744 if let DataTransfer::ReadSize(ref mut val) = self {
745 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
746 } else {
747 unreachable!()
748 }
749 }
750 2 => {
751 #[allow(irrefutable_let_patterns)]
752 if let DataTransfer::WriteData(_) = self {
753 } else {
755 *self = DataTransfer::WriteData(
757 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, D),
758 );
759 }
760 #[allow(irrefutable_let_patterns)]
761 if let DataTransfer::WriteData(ref mut val) = self {
762 fidl::decode!(fidl::encoding::Vector<u8, 32768>, D, val, decoder, _inner_offset, depth)?;
763 } else {
764 unreachable!()
765 }
766 }
767 #[allow(deprecated)]
768 ordinal => {
769 for _ in 0..num_handles {
770 decoder.drop_next_handle()?;
771 }
772 *self = DataTransfer::__SourceBreaking { unknown_ordinal: ordinal };
773 }
774 }
775 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
776 return Err(fidl::Error::InvalidNumBytesInEnvelope);
777 }
778 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
779 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
780 }
781 Ok(())
782 }
783 }
784}