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 const MAX_ITEM_BATCH_SIZE: u64 = 256;
14
15#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
16#[repr(u32)]
17pub enum EntryState {
18 Incomplete = 1,
21 Reachable = 2,
24 Stale = 3,
32 Delay = 4,
40 Probe = 5,
44 Static = 6,
48 Unreachable = 7,
53}
54
55impl EntryState {
56 #[inline]
57 pub fn from_primitive(prim: u32) -> Option<Self> {
58 match prim {
59 1 => Some(Self::Incomplete),
60 2 => Some(Self::Reachable),
61 3 => Some(Self::Stale),
62 4 => Some(Self::Delay),
63 5 => Some(Self::Probe),
64 6 => Some(Self::Static),
65 7 => Some(Self::Unreachable),
66 _ => None,
67 }
68 }
69
70 #[inline]
71 pub const fn into_primitive(self) -> u32 {
72 self as u32
73 }
74
75 #[deprecated = "Strict enums should not use `is_unknown`"]
76 #[inline]
77 pub fn is_unknown(&self) -> bool {
78 false
79 }
80}
81
82#[derive(Clone, Debug, PartialEq)]
83pub struct ControllerAddEntryRequest {
84 pub interface: u64,
85 pub neighbor: fidl_fuchsia_net::IpAddress,
86 pub mac: fidl_fuchsia_net::MacAddress,
87}
88
89impl fidl::Persistable for ControllerAddEntryRequest {}
90
91#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
92pub struct ControllerClearEntriesRequest {
93 pub interface: u64,
94 pub ip_version: fidl_fuchsia_net::IpVersion,
95}
96
97impl fidl::Persistable for ControllerClearEntriesRequest {}
98
99#[derive(Clone, Debug, PartialEq)]
100pub struct ControllerRemoveEntryRequest {
101 pub interface: u64,
102 pub neighbor: fidl_fuchsia_net::IpAddress,
103}
104
105impl fidl::Persistable for ControllerRemoveEntryRequest {}
106
107#[derive(Clone, Debug, PartialEq)]
108pub struct EntryIteratorGetNextResponse {
109 pub events: Vec<EntryIteratorItem>,
110}
111
112impl fidl::Persistable for EntryIteratorGetNextResponse {}
113
114#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
115pub struct IdleEvent;
116
117impl fidl::Persistable for IdleEvent {}
118
119#[derive(Clone, Debug, Default, PartialEq)]
130pub struct Entry {
131 pub interface: Option<u64>,
135 pub neighbor: Option<fidl_fuchsia_net::IpAddress>,
139 pub state: Option<EntryState>,
154 pub mac: Option<fidl_fuchsia_net::MacAddress>,
159 pub updated_at: Option<i64>,
163 #[doc(hidden)]
164 pub __source_breaking: fidl::marker::SourceBreaking,
165}
166
167impl fidl::Persistable for Entry {}
168
169#[derive(Clone, Debug, Default, PartialEq)]
170pub struct EntryIteratorOptions {
171 #[doc(hidden)]
172 pub __source_breaking: fidl::marker::SourceBreaking,
173}
174
175impl fidl::Persistable for EntryIteratorOptions {}
176
177#[derive(Clone, Debug, PartialEq)]
178pub enum EntryIteratorItem {
179 Existing(Entry),
182 Idle(IdleEvent),
185 Added(Entry),
188 Changed(Entry),
190 Removed(Entry),
193}
194
195impl EntryIteratorItem {
196 #[inline]
197 pub fn ordinal(&self) -> u64 {
198 match *self {
199 Self::Existing(_) => 1,
200 Self::Idle(_) => 2,
201 Self::Added(_) => 3,
202 Self::Changed(_) => 4,
203 Self::Removed(_) => 5,
204 }
205 }
206
207 #[deprecated = "Strict unions should not use `is_unknown`"]
208 #[inline]
209 pub fn is_unknown(&self) -> bool {
210 false
211 }
212}
213
214impl fidl::Persistable for EntryIteratorItem {}
215
216mod internal {
217 use super::*;
218 unsafe impl fidl::encoding::TypeMarker for EntryState {
219 type Owned = Self;
220
221 #[inline(always)]
222 fn inline_align(_context: fidl::encoding::Context) -> usize {
223 std::mem::align_of::<u32>()
224 }
225
226 #[inline(always)]
227 fn inline_size(_context: fidl::encoding::Context) -> usize {
228 std::mem::size_of::<u32>()
229 }
230
231 #[inline(always)]
232 fn encode_is_copy() -> bool {
233 true
234 }
235
236 #[inline(always)]
237 fn decode_is_copy() -> bool {
238 false
239 }
240 }
241
242 impl fidl::encoding::ValueTypeMarker for EntryState {
243 type Borrowed<'a> = Self;
244 #[inline(always)]
245 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
246 *value
247 }
248 }
249
250 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EntryState {
251 #[inline]
252 unsafe fn encode(
253 self,
254 encoder: &mut fidl::encoding::Encoder<'_, D>,
255 offset: usize,
256 _depth: fidl::encoding::Depth,
257 ) -> fidl::Result<()> {
258 encoder.debug_check_bounds::<Self>(offset);
259 encoder.write_num(self.into_primitive(), offset);
260 Ok(())
261 }
262 }
263
264 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EntryState {
265 #[inline(always)]
266 fn new_empty() -> Self {
267 Self::Incomplete
268 }
269
270 #[inline]
271 unsafe fn decode(
272 &mut self,
273 decoder: &mut fidl::encoding::Decoder<'_, D>,
274 offset: usize,
275 _depth: fidl::encoding::Depth,
276 ) -> fidl::Result<()> {
277 decoder.debug_check_bounds::<Self>(offset);
278 let prim = decoder.read_num::<u32>(offset);
279
280 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
281 Ok(())
282 }
283 }
284
285 impl fidl::encoding::ValueTypeMarker for ControllerAddEntryRequest {
286 type Borrowed<'a> = &'a Self;
287 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
288 value
289 }
290 }
291
292 unsafe impl fidl::encoding::TypeMarker for ControllerAddEntryRequest {
293 type Owned = Self;
294
295 #[inline(always)]
296 fn inline_align(_context: fidl::encoding::Context) -> usize {
297 8
298 }
299
300 #[inline(always)]
301 fn inline_size(_context: fidl::encoding::Context) -> usize {
302 32
303 }
304 }
305
306 unsafe impl<D: fidl::encoding::ResourceDialect>
307 fidl::encoding::Encode<ControllerAddEntryRequest, D> for &ControllerAddEntryRequest
308 {
309 #[inline]
310 unsafe fn encode(
311 self,
312 encoder: &mut fidl::encoding::Encoder<'_, D>,
313 offset: usize,
314 _depth: fidl::encoding::Depth,
315 ) -> fidl::Result<()> {
316 encoder.debug_check_bounds::<ControllerAddEntryRequest>(offset);
317 fidl::encoding::Encode::<ControllerAddEntryRequest, D>::encode(
319 (
320 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.interface),
321 <fidl_fuchsia_net::IpAddress as fidl::encoding::ValueTypeMarker>::borrow(
322 &self.neighbor,
323 ),
324 <fidl_fuchsia_net::MacAddress as fidl::encoding::ValueTypeMarker>::borrow(
325 &self.mac,
326 ),
327 ),
328 encoder,
329 offset,
330 _depth,
331 )
332 }
333 }
334 unsafe impl<
335 D: fidl::encoding::ResourceDialect,
336 T0: fidl::encoding::Encode<u64, D>,
337 T1: fidl::encoding::Encode<fidl_fuchsia_net::IpAddress, D>,
338 T2: fidl::encoding::Encode<fidl_fuchsia_net::MacAddress, D>,
339 > fidl::encoding::Encode<ControllerAddEntryRequest, D> for (T0, T1, T2)
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::<ControllerAddEntryRequest>(offset);
349 unsafe {
352 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
353 (ptr as *mut u64).write_unaligned(0);
354 }
355 self.0.encode(encoder, offset + 0, depth)?;
357 self.1.encode(encoder, offset + 8, depth)?;
358 self.2.encode(encoder, offset + 24, depth)?;
359 Ok(())
360 }
361 }
362
363 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
364 for ControllerAddEntryRequest
365 {
366 #[inline(always)]
367 fn new_empty() -> Self {
368 Self {
369 interface: fidl::new_empty!(u64, D),
370 neighbor: fidl::new_empty!(fidl_fuchsia_net::IpAddress, D),
371 mac: fidl::new_empty!(fidl_fuchsia_net::MacAddress, D),
372 }
373 }
374
375 #[inline]
376 unsafe fn decode(
377 &mut self,
378 decoder: &mut fidl::encoding::Decoder<'_, D>,
379 offset: usize,
380 _depth: fidl::encoding::Depth,
381 ) -> fidl::Result<()> {
382 decoder.debug_check_bounds::<Self>(offset);
383 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
385 let padval = unsafe { (ptr as *const u64).read_unaligned() };
386 let mask = 0xffff000000000000u64;
387 let maskedval = padval & mask;
388 if maskedval != 0 {
389 return Err(fidl::Error::NonZeroPadding {
390 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
391 });
392 }
393 fidl::decode!(u64, D, &mut self.interface, decoder, offset + 0, _depth)?;
394 fidl::decode!(
395 fidl_fuchsia_net::IpAddress,
396 D,
397 &mut self.neighbor,
398 decoder,
399 offset + 8,
400 _depth
401 )?;
402 fidl::decode!(
403 fidl_fuchsia_net::MacAddress,
404 D,
405 &mut self.mac,
406 decoder,
407 offset + 24,
408 _depth
409 )?;
410 Ok(())
411 }
412 }
413
414 impl fidl::encoding::ValueTypeMarker for ControllerClearEntriesRequest {
415 type Borrowed<'a> = &'a Self;
416 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
417 value
418 }
419 }
420
421 unsafe impl fidl::encoding::TypeMarker for ControllerClearEntriesRequest {
422 type Owned = Self;
423
424 #[inline(always)]
425 fn inline_align(_context: fidl::encoding::Context) -> usize {
426 8
427 }
428
429 #[inline(always)]
430 fn inline_size(_context: fidl::encoding::Context) -> usize {
431 16
432 }
433 }
434
435 unsafe impl<D: fidl::encoding::ResourceDialect>
436 fidl::encoding::Encode<ControllerClearEntriesRequest, D>
437 for &ControllerClearEntriesRequest
438 {
439 #[inline]
440 unsafe fn encode(
441 self,
442 encoder: &mut fidl::encoding::Encoder<'_, D>,
443 offset: usize,
444 _depth: fidl::encoding::Depth,
445 ) -> fidl::Result<()> {
446 encoder.debug_check_bounds::<ControllerClearEntriesRequest>(offset);
447 fidl::encoding::Encode::<ControllerClearEntriesRequest, D>::encode(
449 (
450 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.interface),
451 <fidl_fuchsia_net::IpVersion as fidl::encoding::ValueTypeMarker>::borrow(
452 &self.ip_version,
453 ),
454 ),
455 encoder,
456 offset,
457 _depth,
458 )
459 }
460 }
461 unsafe impl<
462 D: fidl::encoding::ResourceDialect,
463 T0: fidl::encoding::Encode<u64, D>,
464 T1: fidl::encoding::Encode<fidl_fuchsia_net::IpVersion, D>,
465 > fidl::encoding::Encode<ControllerClearEntriesRequest, D> for (T0, T1)
466 {
467 #[inline]
468 unsafe fn encode(
469 self,
470 encoder: &mut fidl::encoding::Encoder<'_, D>,
471 offset: usize,
472 depth: fidl::encoding::Depth,
473 ) -> fidl::Result<()> {
474 encoder.debug_check_bounds::<ControllerClearEntriesRequest>(offset);
475 unsafe {
478 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
479 (ptr as *mut u64).write_unaligned(0);
480 }
481 self.0.encode(encoder, offset + 0, depth)?;
483 self.1.encode(encoder, offset + 8, depth)?;
484 Ok(())
485 }
486 }
487
488 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
489 for ControllerClearEntriesRequest
490 {
491 #[inline(always)]
492 fn new_empty() -> Self {
493 Self {
494 interface: fidl::new_empty!(u64, D),
495 ip_version: fidl::new_empty!(fidl_fuchsia_net::IpVersion, D),
496 }
497 }
498
499 #[inline]
500 unsafe fn decode(
501 &mut self,
502 decoder: &mut fidl::encoding::Decoder<'_, D>,
503 offset: usize,
504 _depth: fidl::encoding::Depth,
505 ) -> fidl::Result<()> {
506 decoder.debug_check_bounds::<Self>(offset);
507 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
509 let padval = unsafe { (ptr as *const u64).read_unaligned() };
510 let mask = 0xffffffff00000000u64;
511 let maskedval = padval & mask;
512 if maskedval != 0 {
513 return Err(fidl::Error::NonZeroPadding {
514 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
515 });
516 }
517 fidl::decode!(u64, D, &mut self.interface, decoder, offset + 0, _depth)?;
518 fidl::decode!(
519 fidl_fuchsia_net::IpVersion,
520 D,
521 &mut self.ip_version,
522 decoder,
523 offset + 8,
524 _depth
525 )?;
526 Ok(())
527 }
528 }
529
530 impl fidl::encoding::ValueTypeMarker for ControllerRemoveEntryRequest {
531 type Borrowed<'a> = &'a Self;
532 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
533 value
534 }
535 }
536
537 unsafe impl fidl::encoding::TypeMarker for ControllerRemoveEntryRequest {
538 type Owned = Self;
539
540 #[inline(always)]
541 fn inline_align(_context: fidl::encoding::Context) -> usize {
542 8
543 }
544
545 #[inline(always)]
546 fn inline_size(_context: fidl::encoding::Context) -> usize {
547 24
548 }
549 }
550
551 unsafe impl<D: fidl::encoding::ResourceDialect>
552 fidl::encoding::Encode<ControllerRemoveEntryRequest, D> for &ControllerRemoveEntryRequest
553 {
554 #[inline]
555 unsafe fn encode(
556 self,
557 encoder: &mut fidl::encoding::Encoder<'_, D>,
558 offset: usize,
559 _depth: fidl::encoding::Depth,
560 ) -> fidl::Result<()> {
561 encoder.debug_check_bounds::<ControllerRemoveEntryRequest>(offset);
562 fidl::encoding::Encode::<ControllerRemoveEntryRequest, D>::encode(
564 (
565 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.interface),
566 <fidl_fuchsia_net::IpAddress as fidl::encoding::ValueTypeMarker>::borrow(
567 &self.neighbor,
568 ),
569 ),
570 encoder,
571 offset,
572 _depth,
573 )
574 }
575 }
576 unsafe impl<
577 D: fidl::encoding::ResourceDialect,
578 T0: fidl::encoding::Encode<u64, D>,
579 T1: fidl::encoding::Encode<fidl_fuchsia_net::IpAddress, D>,
580 > fidl::encoding::Encode<ControllerRemoveEntryRequest, D> for (T0, T1)
581 {
582 #[inline]
583 unsafe fn encode(
584 self,
585 encoder: &mut fidl::encoding::Encoder<'_, D>,
586 offset: usize,
587 depth: fidl::encoding::Depth,
588 ) -> fidl::Result<()> {
589 encoder.debug_check_bounds::<ControllerRemoveEntryRequest>(offset);
590 self.0.encode(encoder, offset + 0, depth)?;
594 self.1.encode(encoder, offset + 8, depth)?;
595 Ok(())
596 }
597 }
598
599 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
600 for ControllerRemoveEntryRequest
601 {
602 #[inline(always)]
603 fn new_empty() -> Self {
604 Self {
605 interface: fidl::new_empty!(u64, D),
606 neighbor: fidl::new_empty!(fidl_fuchsia_net::IpAddress, D),
607 }
608 }
609
610 #[inline]
611 unsafe fn decode(
612 &mut self,
613 decoder: &mut fidl::encoding::Decoder<'_, D>,
614 offset: usize,
615 _depth: fidl::encoding::Depth,
616 ) -> fidl::Result<()> {
617 decoder.debug_check_bounds::<Self>(offset);
618 fidl::decode!(u64, D, &mut self.interface, decoder, offset + 0, _depth)?;
620 fidl::decode!(
621 fidl_fuchsia_net::IpAddress,
622 D,
623 &mut self.neighbor,
624 decoder,
625 offset + 8,
626 _depth
627 )?;
628 Ok(())
629 }
630 }
631
632 impl fidl::encoding::ValueTypeMarker for EntryIteratorGetNextResponse {
633 type Borrowed<'a> = &'a Self;
634 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
635 value
636 }
637 }
638
639 unsafe impl fidl::encoding::TypeMarker for EntryIteratorGetNextResponse {
640 type Owned = Self;
641
642 #[inline(always)]
643 fn inline_align(_context: fidl::encoding::Context) -> usize {
644 8
645 }
646
647 #[inline(always)]
648 fn inline_size(_context: fidl::encoding::Context) -> usize {
649 16
650 }
651 }
652
653 unsafe impl<D: fidl::encoding::ResourceDialect>
654 fidl::encoding::Encode<EntryIteratorGetNextResponse, D> for &EntryIteratorGetNextResponse
655 {
656 #[inline]
657 unsafe fn encode(
658 self,
659 encoder: &mut fidl::encoding::Encoder<'_, D>,
660 offset: usize,
661 _depth: fidl::encoding::Depth,
662 ) -> fidl::Result<()> {
663 encoder.debug_check_bounds::<EntryIteratorGetNextResponse>(offset);
664 fidl::encoding::Encode::<EntryIteratorGetNextResponse, D>::encode(
666 (
667 <fidl::encoding::Vector<EntryIteratorItem, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.events),
668 ),
669 encoder, offset, _depth
670 )
671 }
672 }
673 unsafe impl<
674 D: fidl::encoding::ResourceDialect,
675 T0: fidl::encoding::Encode<fidl::encoding::Vector<EntryIteratorItem, 256>, D>,
676 > fidl::encoding::Encode<EntryIteratorGetNextResponse, D> for (T0,)
677 {
678 #[inline]
679 unsafe fn encode(
680 self,
681 encoder: &mut fidl::encoding::Encoder<'_, D>,
682 offset: usize,
683 depth: fidl::encoding::Depth,
684 ) -> fidl::Result<()> {
685 encoder.debug_check_bounds::<EntryIteratorGetNextResponse>(offset);
686 self.0.encode(encoder, offset + 0, depth)?;
690 Ok(())
691 }
692 }
693
694 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
695 for EntryIteratorGetNextResponse
696 {
697 #[inline(always)]
698 fn new_empty() -> Self {
699 Self { events: fidl::new_empty!(fidl::encoding::Vector<EntryIteratorItem, 256>, D) }
700 }
701
702 #[inline]
703 unsafe fn decode(
704 &mut self,
705 decoder: &mut fidl::encoding::Decoder<'_, D>,
706 offset: usize,
707 _depth: fidl::encoding::Depth,
708 ) -> fidl::Result<()> {
709 decoder.debug_check_bounds::<Self>(offset);
710 fidl::decode!(fidl::encoding::Vector<EntryIteratorItem, 256>, D, &mut self.events, decoder, offset + 0, _depth)?;
712 Ok(())
713 }
714 }
715
716 impl fidl::encoding::ValueTypeMarker for IdleEvent {
717 type Borrowed<'a> = &'a Self;
718 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
719 value
720 }
721 }
722
723 unsafe impl fidl::encoding::TypeMarker for IdleEvent {
724 type Owned = Self;
725
726 #[inline(always)]
727 fn inline_align(_context: fidl::encoding::Context) -> usize {
728 1
729 }
730
731 #[inline(always)]
732 fn inline_size(_context: fidl::encoding::Context) -> usize {
733 1
734 }
735 }
736
737 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IdleEvent, D>
738 for &IdleEvent
739 {
740 #[inline]
741 unsafe fn encode(
742 self,
743 encoder: &mut fidl::encoding::Encoder<'_, D>,
744 offset: usize,
745 _depth: fidl::encoding::Depth,
746 ) -> fidl::Result<()> {
747 encoder.debug_check_bounds::<IdleEvent>(offset);
748 encoder.write_num(0u8, offset);
749 Ok(())
750 }
751 }
752
753 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IdleEvent {
754 #[inline(always)]
755 fn new_empty() -> Self {
756 Self
757 }
758
759 #[inline]
760 unsafe fn decode(
761 &mut self,
762 decoder: &mut fidl::encoding::Decoder<'_, D>,
763 offset: usize,
764 _depth: fidl::encoding::Depth,
765 ) -> fidl::Result<()> {
766 decoder.debug_check_bounds::<Self>(offset);
767 match decoder.read_num::<u8>(offset) {
768 0 => Ok(()),
769 _ => Err(fidl::Error::Invalid),
770 }
771 }
772 }
773
774 impl Entry {
775 #[inline(always)]
776 fn max_ordinal_present(&self) -> u64 {
777 if let Some(_) = self.updated_at {
778 return 5;
779 }
780 if let Some(_) = self.mac {
781 return 4;
782 }
783 if let Some(_) = self.state {
784 return 3;
785 }
786 if let Some(_) = self.neighbor {
787 return 2;
788 }
789 if let Some(_) = self.interface {
790 return 1;
791 }
792 0
793 }
794 }
795
796 impl fidl::encoding::ValueTypeMarker for Entry {
797 type Borrowed<'a> = &'a Self;
798 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
799 value
800 }
801 }
802
803 unsafe impl fidl::encoding::TypeMarker for Entry {
804 type Owned = Self;
805
806 #[inline(always)]
807 fn inline_align(_context: fidl::encoding::Context) -> usize {
808 8
809 }
810
811 #[inline(always)]
812 fn inline_size(_context: fidl::encoding::Context) -> usize {
813 16
814 }
815 }
816
817 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Entry, D> for &Entry {
818 unsafe fn encode(
819 self,
820 encoder: &mut fidl::encoding::Encoder<'_, D>,
821 offset: usize,
822 mut depth: fidl::encoding::Depth,
823 ) -> fidl::Result<()> {
824 encoder.debug_check_bounds::<Entry>(offset);
825 let max_ordinal: u64 = self.max_ordinal_present();
827 encoder.write_num(max_ordinal, offset);
828 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
829 if max_ordinal == 0 {
831 return Ok(());
832 }
833 depth.increment()?;
834 let envelope_size = 8;
835 let bytes_len = max_ordinal as usize * envelope_size;
836 #[allow(unused_variables)]
837 let offset = encoder.out_of_line_offset(bytes_len);
838 let mut _prev_end_offset: usize = 0;
839 if 1 > max_ordinal {
840 return Ok(());
841 }
842
843 let cur_offset: usize = (1 - 1) * envelope_size;
846
847 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
849
850 fidl::encoding::encode_in_envelope_optional::<u64, D>(
855 self.interface.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
856 encoder,
857 offset + cur_offset,
858 depth,
859 )?;
860
861 _prev_end_offset = cur_offset + envelope_size;
862 if 2 > max_ordinal {
863 return Ok(());
864 }
865
866 let cur_offset: usize = (2 - 1) * envelope_size;
869
870 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
872
873 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::IpAddress, D>(
878 self.neighbor
879 .as_ref()
880 .map(<fidl_fuchsia_net::IpAddress as fidl::encoding::ValueTypeMarker>::borrow),
881 encoder,
882 offset + cur_offset,
883 depth,
884 )?;
885
886 _prev_end_offset = cur_offset + envelope_size;
887 if 3 > max_ordinal {
888 return Ok(());
889 }
890
891 let cur_offset: usize = (3 - 1) * envelope_size;
894
895 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
897
898 fidl::encoding::encode_in_envelope_optional::<EntryState, D>(
903 self.state.as_ref().map(<EntryState as fidl::encoding::ValueTypeMarker>::borrow),
904 encoder,
905 offset + cur_offset,
906 depth,
907 )?;
908
909 _prev_end_offset = cur_offset + envelope_size;
910 if 4 > max_ordinal {
911 return Ok(());
912 }
913
914 let cur_offset: usize = (4 - 1) * envelope_size;
917
918 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
920
921 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::MacAddress, D>(
926 self.mac
927 .as_ref()
928 .map(<fidl_fuchsia_net::MacAddress as fidl::encoding::ValueTypeMarker>::borrow),
929 encoder,
930 offset + cur_offset,
931 depth,
932 )?;
933
934 _prev_end_offset = cur_offset + envelope_size;
935 if 5 > max_ordinal {
936 return Ok(());
937 }
938
939 let cur_offset: usize = (5 - 1) * envelope_size;
942
943 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
945
946 fidl::encoding::encode_in_envelope_optional::<i64, D>(
951 self.updated_at.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
952 encoder,
953 offset + cur_offset,
954 depth,
955 )?;
956
957 _prev_end_offset = cur_offset + envelope_size;
958
959 Ok(())
960 }
961 }
962
963 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Entry {
964 #[inline(always)]
965 fn new_empty() -> Self {
966 Self::default()
967 }
968
969 unsafe fn decode(
970 &mut self,
971 decoder: &mut fidl::encoding::Decoder<'_, D>,
972 offset: usize,
973 mut depth: fidl::encoding::Depth,
974 ) -> fidl::Result<()> {
975 decoder.debug_check_bounds::<Self>(offset);
976 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
977 None => return Err(fidl::Error::NotNullable),
978 Some(len) => len,
979 };
980 if len == 0 {
982 return Ok(());
983 };
984 depth.increment()?;
985 let envelope_size = 8;
986 let bytes_len = len * envelope_size;
987 let offset = decoder.out_of_line_offset(bytes_len)?;
988 let mut _next_ordinal_to_read = 0;
990 let mut next_offset = offset;
991 let end_offset = offset + bytes_len;
992 _next_ordinal_to_read += 1;
993 if next_offset >= end_offset {
994 return Ok(());
995 }
996
997 while _next_ordinal_to_read < 1 {
999 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1000 _next_ordinal_to_read += 1;
1001 next_offset += envelope_size;
1002 }
1003
1004 let next_out_of_line = decoder.next_out_of_line();
1005 let handles_before = decoder.remaining_handles();
1006 if let Some((inlined, num_bytes, num_handles)) =
1007 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1008 {
1009 let member_inline_size =
1010 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1011 if inlined != (member_inline_size <= 4) {
1012 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1013 }
1014 let inner_offset;
1015 let mut inner_depth = depth.clone();
1016 if inlined {
1017 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1018 inner_offset = next_offset;
1019 } else {
1020 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1021 inner_depth.increment()?;
1022 }
1023 let val_ref = self.interface.get_or_insert_with(|| fidl::new_empty!(u64, D));
1024 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
1025 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1026 {
1027 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1028 }
1029 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1030 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1031 }
1032 }
1033
1034 next_offset += envelope_size;
1035 _next_ordinal_to_read += 1;
1036 if next_offset >= end_offset {
1037 return Ok(());
1038 }
1039
1040 while _next_ordinal_to_read < 2 {
1042 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1043 _next_ordinal_to_read += 1;
1044 next_offset += envelope_size;
1045 }
1046
1047 let next_out_of_line = decoder.next_out_of_line();
1048 let handles_before = decoder.remaining_handles();
1049 if let Some((inlined, num_bytes, num_handles)) =
1050 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1051 {
1052 let member_inline_size =
1053 <fidl_fuchsia_net::IpAddress as fidl::encoding::TypeMarker>::inline_size(
1054 decoder.context,
1055 );
1056 if inlined != (member_inline_size <= 4) {
1057 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1058 }
1059 let inner_offset;
1060 let mut inner_depth = depth.clone();
1061 if inlined {
1062 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1063 inner_offset = next_offset;
1064 } else {
1065 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1066 inner_depth.increment()?;
1067 }
1068 let val_ref = self
1069 .neighbor
1070 .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net::IpAddress, D));
1071 fidl::decode!(
1072 fidl_fuchsia_net::IpAddress,
1073 D,
1074 val_ref,
1075 decoder,
1076 inner_offset,
1077 inner_depth
1078 )?;
1079 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1080 {
1081 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1082 }
1083 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1084 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1085 }
1086 }
1087
1088 next_offset += envelope_size;
1089 _next_ordinal_to_read += 1;
1090 if next_offset >= end_offset {
1091 return Ok(());
1092 }
1093
1094 while _next_ordinal_to_read < 3 {
1096 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1097 _next_ordinal_to_read += 1;
1098 next_offset += envelope_size;
1099 }
1100
1101 let next_out_of_line = decoder.next_out_of_line();
1102 let handles_before = decoder.remaining_handles();
1103 if let Some((inlined, num_bytes, num_handles)) =
1104 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1105 {
1106 let member_inline_size =
1107 <EntryState as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1108 if inlined != (member_inline_size <= 4) {
1109 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1110 }
1111 let inner_offset;
1112 let mut inner_depth = depth.clone();
1113 if inlined {
1114 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1115 inner_offset = next_offset;
1116 } else {
1117 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1118 inner_depth.increment()?;
1119 }
1120 let val_ref = self.state.get_or_insert_with(|| fidl::new_empty!(EntryState, D));
1121 fidl::decode!(EntryState, D, val_ref, decoder, inner_offset, inner_depth)?;
1122 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1123 {
1124 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1125 }
1126 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1127 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1128 }
1129 }
1130
1131 next_offset += envelope_size;
1132 _next_ordinal_to_read += 1;
1133 if next_offset >= end_offset {
1134 return Ok(());
1135 }
1136
1137 while _next_ordinal_to_read < 4 {
1139 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1140 _next_ordinal_to_read += 1;
1141 next_offset += envelope_size;
1142 }
1143
1144 let next_out_of_line = decoder.next_out_of_line();
1145 let handles_before = decoder.remaining_handles();
1146 if let Some((inlined, num_bytes, num_handles)) =
1147 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1148 {
1149 let member_inline_size =
1150 <fidl_fuchsia_net::MacAddress as fidl::encoding::TypeMarker>::inline_size(
1151 decoder.context,
1152 );
1153 if inlined != (member_inline_size <= 4) {
1154 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1155 }
1156 let inner_offset;
1157 let mut inner_depth = depth.clone();
1158 if inlined {
1159 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1160 inner_offset = next_offset;
1161 } else {
1162 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1163 inner_depth.increment()?;
1164 }
1165 let val_ref = self
1166 .mac
1167 .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net::MacAddress, D));
1168 fidl::decode!(
1169 fidl_fuchsia_net::MacAddress,
1170 D,
1171 val_ref,
1172 decoder,
1173 inner_offset,
1174 inner_depth
1175 )?;
1176 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1177 {
1178 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1179 }
1180 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1181 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1182 }
1183 }
1184
1185 next_offset += envelope_size;
1186 _next_ordinal_to_read += 1;
1187 if next_offset >= end_offset {
1188 return Ok(());
1189 }
1190
1191 while _next_ordinal_to_read < 5 {
1193 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1194 _next_ordinal_to_read += 1;
1195 next_offset += envelope_size;
1196 }
1197
1198 let next_out_of_line = decoder.next_out_of_line();
1199 let handles_before = decoder.remaining_handles();
1200 if let Some((inlined, num_bytes, num_handles)) =
1201 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1202 {
1203 let member_inline_size =
1204 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1205 if inlined != (member_inline_size <= 4) {
1206 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1207 }
1208 let inner_offset;
1209 let mut inner_depth = depth.clone();
1210 if inlined {
1211 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1212 inner_offset = next_offset;
1213 } else {
1214 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1215 inner_depth.increment()?;
1216 }
1217 let val_ref = self.updated_at.get_or_insert_with(|| fidl::new_empty!(i64, D));
1218 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
1219 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1220 {
1221 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1222 }
1223 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1224 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1225 }
1226 }
1227
1228 next_offset += envelope_size;
1229
1230 while next_offset < end_offset {
1232 _next_ordinal_to_read += 1;
1233 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1234 next_offset += envelope_size;
1235 }
1236
1237 Ok(())
1238 }
1239 }
1240
1241 impl EntryIteratorOptions {
1242 #[inline(always)]
1243 fn max_ordinal_present(&self) -> u64 {
1244 0
1245 }
1246 }
1247
1248 impl fidl::encoding::ValueTypeMarker for EntryIteratorOptions {
1249 type Borrowed<'a> = &'a Self;
1250 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1251 value
1252 }
1253 }
1254
1255 unsafe impl fidl::encoding::TypeMarker for EntryIteratorOptions {
1256 type Owned = Self;
1257
1258 #[inline(always)]
1259 fn inline_align(_context: fidl::encoding::Context) -> usize {
1260 8
1261 }
1262
1263 #[inline(always)]
1264 fn inline_size(_context: fidl::encoding::Context) -> usize {
1265 16
1266 }
1267 }
1268
1269 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EntryIteratorOptions, D>
1270 for &EntryIteratorOptions
1271 {
1272 unsafe fn encode(
1273 self,
1274 encoder: &mut fidl::encoding::Encoder<'_, D>,
1275 offset: usize,
1276 mut depth: fidl::encoding::Depth,
1277 ) -> fidl::Result<()> {
1278 encoder.debug_check_bounds::<EntryIteratorOptions>(offset);
1279 let max_ordinal: u64 = self.max_ordinal_present();
1281 encoder.write_num(max_ordinal, offset);
1282 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1283 if max_ordinal == 0 {
1285 return Ok(());
1286 }
1287 depth.increment()?;
1288 let envelope_size = 8;
1289 let bytes_len = max_ordinal as usize * envelope_size;
1290 #[allow(unused_variables)]
1291 let offset = encoder.out_of_line_offset(bytes_len);
1292 let mut _prev_end_offset: usize = 0;
1293
1294 Ok(())
1295 }
1296 }
1297
1298 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EntryIteratorOptions {
1299 #[inline(always)]
1300 fn new_empty() -> Self {
1301 Self::default()
1302 }
1303
1304 unsafe fn decode(
1305 &mut self,
1306 decoder: &mut fidl::encoding::Decoder<'_, D>,
1307 offset: usize,
1308 mut depth: fidl::encoding::Depth,
1309 ) -> fidl::Result<()> {
1310 decoder.debug_check_bounds::<Self>(offset);
1311 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1312 None => return Err(fidl::Error::NotNullable),
1313 Some(len) => len,
1314 };
1315 if len == 0 {
1317 return Ok(());
1318 };
1319 depth.increment()?;
1320 let envelope_size = 8;
1321 let bytes_len = len * envelope_size;
1322 let offset = decoder.out_of_line_offset(bytes_len)?;
1323 let mut _next_ordinal_to_read = 0;
1325 let mut next_offset = offset;
1326 let end_offset = offset + bytes_len;
1327
1328 while next_offset < end_offset {
1330 _next_ordinal_to_read += 1;
1331 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1332 next_offset += envelope_size;
1333 }
1334
1335 Ok(())
1336 }
1337 }
1338
1339 impl fidl::encoding::ValueTypeMarker for EntryIteratorItem {
1340 type Borrowed<'a> = &'a Self;
1341 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1342 value
1343 }
1344 }
1345
1346 unsafe impl fidl::encoding::TypeMarker for EntryIteratorItem {
1347 type Owned = Self;
1348
1349 #[inline(always)]
1350 fn inline_align(_context: fidl::encoding::Context) -> usize {
1351 8
1352 }
1353
1354 #[inline(always)]
1355 fn inline_size(_context: fidl::encoding::Context) -> usize {
1356 16
1357 }
1358 }
1359
1360 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EntryIteratorItem, D>
1361 for &EntryIteratorItem
1362 {
1363 #[inline]
1364 unsafe fn encode(
1365 self,
1366 encoder: &mut fidl::encoding::Encoder<'_, D>,
1367 offset: usize,
1368 _depth: fidl::encoding::Depth,
1369 ) -> fidl::Result<()> {
1370 encoder.debug_check_bounds::<EntryIteratorItem>(offset);
1371 encoder.write_num::<u64>(self.ordinal(), offset);
1372 match self {
1373 EntryIteratorItem::Existing(ref val) => {
1374 fidl::encoding::encode_in_envelope::<Entry, D>(
1375 <Entry as fidl::encoding::ValueTypeMarker>::borrow(val),
1376 encoder,
1377 offset + 8,
1378 _depth,
1379 )
1380 }
1381 EntryIteratorItem::Idle(ref val) => {
1382 fidl::encoding::encode_in_envelope::<IdleEvent, D>(
1383 <IdleEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
1384 encoder,
1385 offset + 8,
1386 _depth,
1387 )
1388 }
1389 EntryIteratorItem::Added(ref val) => {
1390 fidl::encoding::encode_in_envelope::<Entry, D>(
1391 <Entry as fidl::encoding::ValueTypeMarker>::borrow(val),
1392 encoder,
1393 offset + 8,
1394 _depth,
1395 )
1396 }
1397 EntryIteratorItem::Changed(ref val) => {
1398 fidl::encoding::encode_in_envelope::<Entry, D>(
1399 <Entry as fidl::encoding::ValueTypeMarker>::borrow(val),
1400 encoder,
1401 offset + 8,
1402 _depth,
1403 )
1404 }
1405 EntryIteratorItem::Removed(ref val) => {
1406 fidl::encoding::encode_in_envelope::<Entry, D>(
1407 <Entry as fidl::encoding::ValueTypeMarker>::borrow(val),
1408 encoder,
1409 offset + 8,
1410 _depth,
1411 )
1412 }
1413 }
1414 }
1415 }
1416
1417 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EntryIteratorItem {
1418 #[inline(always)]
1419 fn new_empty() -> Self {
1420 Self::Existing(fidl::new_empty!(Entry, D))
1421 }
1422
1423 #[inline]
1424 unsafe fn decode(
1425 &mut self,
1426 decoder: &mut fidl::encoding::Decoder<'_, D>,
1427 offset: usize,
1428 mut depth: fidl::encoding::Depth,
1429 ) -> fidl::Result<()> {
1430 decoder.debug_check_bounds::<Self>(offset);
1431 #[allow(unused_variables)]
1432 let next_out_of_line = decoder.next_out_of_line();
1433 let handles_before = decoder.remaining_handles();
1434 let (ordinal, inlined, num_bytes, num_handles) =
1435 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
1436
1437 let member_inline_size = match ordinal {
1438 1 => <Entry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
1439 2 => <IdleEvent as fidl::encoding::TypeMarker>::inline_size(decoder.context),
1440 3 => <Entry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
1441 4 => <Entry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
1442 5 => <Entry as fidl::encoding::TypeMarker>::inline_size(decoder.context),
1443 _ => return Err(fidl::Error::UnknownUnionTag),
1444 };
1445
1446 if inlined != (member_inline_size <= 4) {
1447 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1448 }
1449 let _inner_offset;
1450 if inlined {
1451 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
1452 _inner_offset = offset + 8;
1453 } else {
1454 depth.increment()?;
1455 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1456 }
1457 match ordinal {
1458 1 => {
1459 #[allow(irrefutable_let_patterns)]
1460 if let EntryIteratorItem::Existing(_) = self {
1461 } else {
1463 *self = EntryIteratorItem::Existing(fidl::new_empty!(Entry, D));
1465 }
1466 #[allow(irrefutable_let_patterns)]
1467 if let EntryIteratorItem::Existing(ref mut val) = self {
1468 fidl::decode!(Entry, D, val, decoder, _inner_offset, depth)?;
1469 } else {
1470 unreachable!()
1471 }
1472 }
1473 2 => {
1474 #[allow(irrefutable_let_patterns)]
1475 if let EntryIteratorItem::Idle(_) = self {
1476 } else {
1478 *self = EntryIteratorItem::Idle(fidl::new_empty!(IdleEvent, D));
1480 }
1481 #[allow(irrefutable_let_patterns)]
1482 if let EntryIteratorItem::Idle(ref mut val) = self {
1483 fidl::decode!(IdleEvent, D, val, decoder, _inner_offset, depth)?;
1484 } else {
1485 unreachable!()
1486 }
1487 }
1488 3 => {
1489 #[allow(irrefutable_let_patterns)]
1490 if let EntryIteratorItem::Added(_) = self {
1491 } else {
1493 *self = EntryIteratorItem::Added(fidl::new_empty!(Entry, D));
1495 }
1496 #[allow(irrefutable_let_patterns)]
1497 if let EntryIteratorItem::Added(ref mut val) = self {
1498 fidl::decode!(Entry, D, val, decoder, _inner_offset, depth)?;
1499 } else {
1500 unreachable!()
1501 }
1502 }
1503 4 => {
1504 #[allow(irrefutable_let_patterns)]
1505 if let EntryIteratorItem::Changed(_) = self {
1506 } else {
1508 *self = EntryIteratorItem::Changed(fidl::new_empty!(Entry, D));
1510 }
1511 #[allow(irrefutable_let_patterns)]
1512 if let EntryIteratorItem::Changed(ref mut val) = self {
1513 fidl::decode!(Entry, D, val, decoder, _inner_offset, depth)?;
1514 } else {
1515 unreachable!()
1516 }
1517 }
1518 5 => {
1519 #[allow(irrefutable_let_patterns)]
1520 if let EntryIteratorItem::Removed(_) = self {
1521 } else {
1523 *self = EntryIteratorItem::Removed(fidl::new_empty!(Entry, D));
1525 }
1526 #[allow(irrefutable_let_patterns)]
1527 if let EntryIteratorItem::Removed(ref mut val) = self {
1528 fidl::decode!(Entry, D, val, decoder, _inner_offset, depth)?;
1529 } else {
1530 unreachable!()
1531 }
1532 }
1533 ordinal => panic!("unexpected ordinal {:?}", ordinal),
1534 }
1535 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
1536 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1537 }
1538 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1539 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1540 }
1541 Ok(())
1542 }
1543 }
1544}