fidl_fuchsia_posix_socket__common/
fidl_fuchsia_posix_socket__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![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 DATAGRAM_SOCKET_PROTOCOL_NAME: &str = "fuchsia.posix.socket/DatagramSocket";
12
13/// Constant bounding the number of eventpairs returned by Netstack to clients
14/// of the fast protocol.
15///
16/// Set equal to `ZX_WAIT_MANY_MAXIMUM_ITEMS` - 1, where `ZX_WAIT_MANY_MAXIMUM_ITEMS`
17/// is defined in `//zircon/system/public/zircon/types.h` and bounds the number of eventpairs
18/// in a single call to `zx_object_wait_many`. The bias leaves room to allow clients to wait
19/// for errors on the zircon socket in the same call.
20pub const FAST_UDP_WAIT_MANY_MAXIMUM_ITEMS: u32 = 63;
21
22pub const SIGNAL_DATAGRAM_ERROR: u32 = USER_SIGNAL_2 as u32;
23
24pub const SIGNAL_DATAGRAM_INCOMING: u32 = USER_SIGNAL_0 as u32;
25
26pub const SIGNAL_DATAGRAM_OUTGOING: u32 = USER_SIGNAL_1 as u32;
27
28pub const SIGNAL_DATAGRAM_SHUTDOWN_READ: u32 = USER_SIGNAL_4 as u32;
29
30pub const SIGNAL_DATAGRAM_SHUTDOWN_WRITE: u32 = USER_SIGNAL_5 as u32;
31
32pub const SIGNAL_STREAM_CONNECTED: u32 = USER_SIGNAL_3 as u32;
33
34pub const SIGNAL_STREAM_INCOMING: u32 = USER_SIGNAL_0 as u32;
35
36pub const STREAM_SOCKET_PROTOCOL_NAME: &str = "fuchsia.posix.socket/StreamSocket";
37
38pub const SYNCHRONOUS_DATAGRAM_SOCKET_PROTOCOL_NAME: &str =
39    "fuchsia.posix.socket/SynchronousDatagramSocket";
40
41pub const USER_SIGNAL_0: u32 = 16777216;
42
43pub const USER_SIGNAL_1: u32 = 33554432;
44
45pub const USER_SIGNAL_2: u32 = 67108864;
46
47pub const USER_SIGNAL_3: u32 = 134217728;
48
49pub const USER_SIGNAL_4: u32 = 268435456;
50
51pub const USER_SIGNAL_5: u32 = 536870912;
52
53bitflags! {
54    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
55    pub struct CmsgRequests: u32 {
56        /// Identifies whether the `IP_RECVTOS` control message is requested.
57        const IP_TOS = 1;
58        /// Identifies whether the `IP_RECVTTL` control message is requested.
59        const IP_TTL = 2;
60        /// Identifies whether the `IPV6_RECVTCLASS` control message is requested.
61        const IPV6_TCLASS = 4;
62        /// Identifies whether the `IPV6_RECVHOPLIMIT` control message is requested.
63        const IPV6_HOPLIMIT = 8;
64        /// Identifies whether the `IPV6_RECVPKTINFO` control message is requested.
65        const IPV6_PKTINFO = 16;
66        /// Identifies whether the `IP_RECVORIGDSTADDR` control message is requested.
67        const IP_RECVORIGDSTADDR = 32;
68    }
69}
70
71impl CmsgRequests {
72    #[inline(always)]
73    pub fn from_bits_allow_unknown(bits: u32) -> Self {
74        Self::from_bits_retain(bits)
75    }
76
77    #[inline(always)]
78    pub fn has_unknown_bits(&self) -> bool {
79        self.get_unknown_bits() != 0
80    }
81
82    #[inline(always)]
83    pub fn get_unknown_bits(&self) -> u32 {
84        self.bits() & !Self::all().bits()
85    }
86}
87
88bitflags! {
89    /// Bits representing the interface flags as returned by the SIOCGIFFLAGS ioctl
90    /// operation. These bitmasks are intended to track the C API definition. For
91    /// example, `InterfaceFlags.UP` corresponds to `IFF_UP`, etc.
92    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
93    pub struct InterfaceFlags: u16 {
94        const UP = 1;
95        const BROADCAST = 2;
96        const DEBUG = 4;
97        const LOOPBACK = 8;
98        const POINTTOPOINT = 16;
99        const NOTRAILERS = 32;
100        const RUNNING = 64;
101        const NOARP = 128;
102        const PROMISC = 256;
103        const ALLMULTI = 512;
104        const LEADER = 1024;
105        const FOLLOWER = 2048;
106        const MULTICAST = 4096;
107        const PORTSEL = 8192;
108        const AUTOMEDIA = 16384;
109        const DYNAMIC = 32768;
110    }
111}
112
113impl InterfaceFlags {}
114
115bitflags! {
116    /// Flags controlling RecvMsg behavior.
117    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
118    pub struct RecvMsgFlags: u16 {
119        /// Returns data from the receive queue without removing from it.
120        ///
121        /// Equivalent to `MSG_PEEK`.
122        const PEEK = 2;
123    }
124}
125
126impl RecvMsgFlags {}
127
128bitflags! {
129    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
130    pub struct SendMsgFlags: u16 {
131        const RESERVED = 32768;
132    }
133}
134
135impl SendMsgFlags {}
136
137bitflags! {
138    /// Socket shutdown mode.
139    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
140    pub struct ShutdownMode: u16 {
141        /// Shutdown socket read endpoint.
142        const READ = 1;
143        /// Shutdown socket write endpoint.
144        const WRITE = 2;
145    }
146}
147
148impl ShutdownMode {}
149
150/// Protocols supported by [`fuchsia.posix.socket/DatagramSocket`].
151///
152/// `DatagramSocketProtocol` enumerates the protocols supported by the network
153/// stack over datagram sockets.
154#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
155#[repr(u32)]
156pub enum DatagramSocketProtocol {
157    /// UDP (User Datagram Protocol).
158    ///
159    /// A UDP socket is equivalent to the POSIX API of `SOCK_DGRAM` with a
160    /// protocol of 0 or `IPPROTO_UDP`.
161    Udp = 1,
162    /// ICMP (Internet Control Message Protocol) echo.
163    ///
164    /// An ICMP echo socket is equivalent to the POSIX API of `SOCK_DGRAM` with
165    /// a protocol of `IPPROTO_ICMP` `IPPROTO_ICMPV6` (depending on provided
166    /// domain).
167    ///
168    /// Datagrams sent over an ICMP echo socket *must* have a valid ICMP or
169    /// ICMPv6 echo header.
170    IcmpEcho = 2,
171}
172
173impl DatagramSocketProtocol {
174    #[inline]
175    pub fn from_primitive(prim: u32) -> Option<Self> {
176        match prim {
177            1 => Some(Self::Udp),
178            2 => Some(Self::IcmpEcho),
179            _ => None,
180        }
181    }
182
183    #[inline]
184    pub const fn into_primitive(self) -> u32 {
185        self as u32
186    }
187}
188
189/// A socket's domain.
190///
191/// Determines the addressing domain for a socket.
192#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
193#[repr(i16)]
194pub enum Domain {
195    /// An IPv4 socket. Equivalent to `AF_INET`.
196    Ipv4 = 0,
197    /// An IPv6 socket. Equivalent to `AF_INET6`.
198    Ipv6 = 1,
199}
200
201impl Domain {
202    #[inline]
203    pub fn from_primitive(prim: i16) -> Option<Self> {
204        match prim {
205            0 => Some(Self::Ipv4),
206            1 => Some(Self::Ipv6),
207            _ => None,
208        }
209    }
210
211    #[inline]
212    pub const fn into_primitive(self) -> i16 {
213        self as i16
214    }
215}
216
217/// Protocols supported by [`fuchsia.posix.socket/StreamSocket`].
218///
219/// `StreamSocketProtocol` enumerates the protocols supported by the network
220/// stack over stream sockets.
221#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
222#[repr(u32)]
223pub enum StreamSocketProtocol {
224    /// TCP (Transmission Control Protocol).
225    ///
226    /// A TCP socket is equivalent to the POSIX API of `SOCK_STREAM` with a
227    /// protocol of 0 or `IPPROTO_TCP`.
228    Tcp = 0,
229}
230
231impl StreamSocketProtocol {
232    #[inline]
233    pub fn from_primitive(prim: u32) -> Option<Self> {
234        match prim {
235            0 => Some(Self::Tcp),
236            _ => None,
237        }
238    }
239
240    #[inline]
241    pub const fn into_primitive(self) -> u32 {
242        self as u32
243    }
244}
245
246/// TCP congestion control modes.
247#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
248#[repr(u32)]
249pub enum TcpCongestionControl {
250    Reno = 1,
251    Cubic = 2,
252}
253
254impl TcpCongestionControl {
255    #[inline]
256    pub fn from_primitive(prim: u32) -> Option<Self> {
257        match prim {
258            1 => Some(Self::Reno),
259            2 => Some(Self::Cubic),
260            _ => None,
261        }
262    }
263
264    #[inline]
265    pub const fn into_primitive(self) -> u32 {
266        self as u32
267    }
268}
269
270/// TCP congestion control state machine state.
271#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
272#[repr(u32)]
273pub enum TcpCongestionControlState {
274    Open = 0,
275    Disorder = 1,
276    CongestionWindowReduced = 2,
277    Recovery = 3,
278    Loss = 4,
279}
280
281impl TcpCongestionControlState {
282    #[inline]
283    pub fn from_primitive(prim: u32) -> Option<Self> {
284        match prim {
285            0 => Some(Self::Open),
286            1 => Some(Self::Disorder),
287            2 => Some(Self::CongestionWindowReduced),
288            3 => Some(Self::Recovery),
289            4 => Some(Self::Loss),
290            _ => None,
291        }
292    }
293
294    #[inline]
295    pub const fn into_primitive(self) -> u32 {
296        self as u32
297    }
298}
299
300/// TCP state machine state.
301#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
302#[repr(u32)]
303pub enum TcpState {
304    Established = 1,
305    SynSent = 2,
306    SynRecv = 3,
307    FinWait1 = 4,
308    FinWait2 = 5,
309    TimeWait = 6,
310    Close = 7,
311    CloseWait = 8,
312    LastAck = 9,
313    Listen = 10,
314    Closing = 11,
315}
316
317impl TcpState {
318    #[inline]
319    pub fn from_primitive(prim: u32) -> Option<Self> {
320        match prim {
321            1 => Some(Self::Established),
322            2 => Some(Self::SynSent),
323            3 => Some(Self::SynRecv),
324            4 => Some(Self::FinWait1),
325            5 => Some(Self::FinWait2),
326            6 => Some(Self::TimeWait),
327            7 => Some(Self::Close),
328            8 => Some(Self::CloseWait),
329            9 => Some(Self::LastAck),
330            10 => Some(Self::Listen),
331            11 => Some(Self::Closing),
332            _ => None,
333        }
334    }
335
336    #[inline]
337    pub const fn into_primitive(self) -> u32 {
338        self as u32
339    }
340}
341
342/// Packet timestamp reporting precision options.
343#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
344#[repr(u32)]
345pub enum TimestampOption {
346    /// Do not report timestamp.
347    Disabled = 0,
348    /// Report timestamp with nanosecond precision.
349    Nanosecond = 1,
350    /// Report timestamp with microsecond precision.
351    Microsecond = 2,
352}
353
354impl TimestampOption {
355    #[inline]
356    pub fn from_primitive(prim: u32) -> Option<Self> {
357        match prim {
358            0 => Some(Self::Disabled),
359            1 => Some(Self::Nanosecond),
360            2 => Some(Self::Microsecond),
361            _ => None,
362        }
363    }
364
365    #[inline]
366    pub const fn into_primitive(self) -> u32 {
367        self as u32
368    }
369}
370
371#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
372pub enum UdpMetadataEncodingProtocolVersion {
373    Zero,
374    #[doc(hidden)]
375    __SourceBreaking {
376        unknown_ordinal: u16,
377    },
378}
379
380/// Pattern that matches an unknown `UdpMetadataEncodingProtocolVersion` member.
381#[macro_export]
382macro_rules! UdpMetadataEncodingProtocolVersionUnknown {
383    () => {
384        _
385    };
386}
387
388impl UdpMetadataEncodingProtocolVersion {
389    #[inline]
390    pub fn from_primitive(prim: u16) -> Option<Self> {
391        match prim {
392            0 => Some(Self::Zero),
393            _ => None,
394        }
395    }
396
397    #[inline]
398    pub fn from_primitive_allow_unknown(prim: u16) -> Self {
399        match prim {
400            0 => Self::Zero,
401            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
402        }
403    }
404
405    #[inline]
406    pub fn unknown() -> Self {
407        Self::__SourceBreaking { unknown_ordinal: 0xffff }
408    }
409
410    #[inline]
411    pub const fn into_primitive(self) -> u16 {
412        match self {
413            Self::Zero => 0,
414            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
415        }
416    }
417
418    #[inline]
419    pub fn is_unknown(&self) -> bool {
420        match self {
421            Self::__SourceBreaking { unknown_ordinal: _ } => true,
422            _ => false,
423        }
424    }
425}
426
427#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
428pub struct BaseDatagramSocketGetInfoResponse {
429    pub domain: Domain,
430    pub proto: DatagramSocketProtocol,
431}
432
433impl fidl::Persistable for BaseDatagramSocketGetInfoResponse {}
434
435#[derive(Clone, Debug, PartialEq)]
436pub struct BaseNetworkSocketAddIpMembershipRequest {
437    pub membership: IpMulticastMembership,
438}
439
440impl fidl::Persistable for BaseNetworkSocketAddIpMembershipRequest {}
441
442#[derive(Clone, Debug, PartialEq)]
443pub struct BaseNetworkSocketAddIpv6MembershipRequest {
444    pub membership: Ipv6MulticastMembership,
445}
446
447impl fidl::Persistable for BaseNetworkSocketAddIpv6MembershipRequest {}
448
449#[derive(Clone, Debug, PartialEq)]
450pub struct BaseNetworkSocketBindRequest {
451    pub addr: fidl_fuchsia_net__common::SocketAddress,
452}
453
454impl fidl::Persistable for BaseNetworkSocketBindRequest {}
455
456#[derive(Clone, Debug, PartialEq)]
457pub struct BaseNetworkSocketConnectRequest {
458    pub addr: fidl_fuchsia_net__common::SocketAddress,
459}
460
461impl fidl::Persistable for BaseNetworkSocketConnectRequest {}
462
463#[derive(Clone, Debug, PartialEq)]
464pub struct BaseNetworkSocketDropIpMembershipRequest {
465    pub membership: IpMulticastMembership,
466}
467
468impl fidl::Persistable for BaseNetworkSocketDropIpMembershipRequest {}
469
470#[derive(Clone, Debug, PartialEq)]
471pub struct BaseNetworkSocketDropIpv6MembershipRequest {
472    pub membership: Ipv6MulticastMembership,
473}
474
475impl fidl::Persistable for BaseNetworkSocketDropIpv6MembershipRequest {}
476
477#[derive(Clone, Debug, PartialEq)]
478pub struct BaseNetworkSocketSetIpMulticastInterfaceRequest {
479    pub iface: u64,
480    pub address: fidl_fuchsia_net__common::Ipv4Address,
481}
482
483impl fidl::Persistable for BaseNetworkSocketSetIpMulticastInterfaceRequest {}
484
485#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
486pub struct BaseNetworkSocketSetIpMulticastLoopbackRequest {
487    pub value: bool,
488}
489
490impl fidl::Persistable for BaseNetworkSocketSetIpMulticastLoopbackRequest {}
491
492#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
493pub struct BaseNetworkSocketSetIpMulticastTtlRequest {
494    pub value: OptionalUint8,
495}
496
497impl fidl::Persistable for BaseNetworkSocketSetIpMulticastTtlRequest {}
498
499#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
500pub struct BaseNetworkSocketSetIpPacketInfoRequest {
501    pub value: bool,
502}
503
504impl fidl::Persistable for BaseNetworkSocketSetIpPacketInfoRequest {}
505
506#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
507pub struct BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest {
508    pub value: bool,
509}
510
511impl fidl::Persistable for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest {}
512
513#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
514pub struct BaseNetworkSocketSetIpReceiveTtlRequest {
515    pub value: bool,
516}
517
518impl fidl::Persistable for BaseNetworkSocketSetIpReceiveTtlRequest {}
519
520#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
521pub struct BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
522    pub value: bool,
523}
524
525impl fidl::Persistable for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {}
526
527#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
528pub struct BaseNetworkSocketSetIpTransparentRequest {
529    pub value: bool,
530}
531
532impl fidl::Persistable for BaseNetworkSocketSetIpTransparentRequest {}
533
534#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
535pub struct BaseNetworkSocketSetIpTtlRequest {
536    pub value: OptionalUint8,
537}
538
539impl fidl::Persistable for BaseNetworkSocketSetIpTtlRequest {}
540
541#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
542#[repr(C)]
543pub struct BaseNetworkSocketSetIpTypeOfServiceRequest {
544    pub value: u8,
545}
546
547impl fidl::Persistable for BaseNetworkSocketSetIpTypeOfServiceRequest {}
548
549#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
550pub struct BaseNetworkSocketSetIpv6MulticastHopsRequest {
551    pub value: OptionalUint8,
552}
553
554impl fidl::Persistable for BaseNetworkSocketSetIpv6MulticastHopsRequest {}
555
556#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
557#[repr(C)]
558pub struct BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
559    pub value: u64,
560}
561
562impl fidl::Persistable for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {}
563
564#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
565pub struct BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
566    pub value: bool,
567}
568
569impl fidl::Persistable for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {}
570
571#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
572pub struct BaseNetworkSocketSetIpv6OnlyRequest {
573    pub value: bool,
574}
575
576impl fidl::Persistable for BaseNetworkSocketSetIpv6OnlyRequest {}
577
578#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
579pub struct BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
580    pub value: bool,
581}
582
583impl fidl::Persistable for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {}
584
585#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
586pub struct BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
587    pub value: bool,
588}
589
590impl fidl::Persistable for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {}
591
592#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
593pub struct BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
594    pub value: bool,
595}
596
597impl fidl::Persistable for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {}
598
599#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
600pub struct BaseNetworkSocketSetIpv6TrafficClassRequest {
601    pub value: OptionalUint8,
602}
603
604impl fidl::Persistable for BaseNetworkSocketSetIpv6TrafficClassRequest {}
605
606#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
607pub struct BaseNetworkSocketSetIpv6UnicastHopsRequest {
608    pub value: OptionalUint8,
609}
610
611impl fidl::Persistable for BaseNetworkSocketSetIpv6UnicastHopsRequest {}
612
613#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
614pub struct BaseNetworkSocketShutdownRequest {
615    pub mode: ShutdownMode,
616}
617
618impl fidl::Persistable for BaseNetworkSocketShutdownRequest {}
619
620#[derive(Clone, Debug, PartialEq)]
621pub struct BaseNetworkSocketGetIpMulticastInterfaceResponse {
622    pub value: fidl_fuchsia_net__common::Ipv4Address,
623}
624
625impl fidl::Persistable for BaseNetworkSocketGetIpMulticastInterfaceResponse {}
626
627#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
628pub struct BaseNetworkSocketGetIpMulticastLoopbackResponse {
629    pub value: bool,
630}
631
632impl fidl::Persistable for BaseNetworkSocketGetIpMulticastLoopbackResponse {}
633
634#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
635#[repr(C)]
636pub struct BaseNetworkSocketGetIpMulticastTtlResponse {
637    pub value: u8,
638}
639
640impl fidl::Persistable for BaseNetworkSocketGetIpMulticastTtlResponse {}
641
642#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
643pub struct BaseNetworkSocketGetIpPacketInfoResponse {
644    pub value: bool,
645}
646
647impl fidl::Persistable for BaseNetworkSocketGetIpPacketInfoResponse {}
648
649#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
650pub struct BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse {
651    pub value: bool,
652}
653
654impl fidl::Persistable for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse {}
655
656#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
657pub struct BaseNetworkSocketGetIpReceiveTtlResponse {
658    pub value: bool,
659}
660
661impl fidl::Persistable for BaseNetworkSocketGetIpReceiveTtlResponse {}
662
663#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
664pub struct BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
665    pub value: bool,
666}
667
668impl fidl::Persistable for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {}
669
670#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
671pub struct BaseNetworkSocketGetIpTransparentResponse {
672    pub value: bool,
673}
674
675impl fidl::Persistable for BaseNetworkSocketGetIpTransparentResponse {}
676
677#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
678#[repr(C)]
679pub struct BaseNetworkSocketGetIpTtlResponse {
680    pub value: u8,
681}
682
683impl fidl::Persistable for BaseNetworkSocketGetIpTtlResponse {}
684
685#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
686#[repr(C)]
687pub struct BaseNetworkSocketGetIpTypeOfServiceResponse {
688    pub value: u8,
689}
690
691impl fidl::Persistable for BaseNetworkSocketGetIpTypeOfServiceResponse {}
692
693#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
694#[repr(C)]
695pub struct BaseNetworkSocketGetIpv6MulticastHopsResponse {
696    pub value: u8,
697}
698
699impl fidl::Persistable for BaseNetworkSocketGetIpv6MulticastHopsResponse {}
700
701#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
702#[repr(C)]
703pub struct BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
704    pub value: u64,
705}
706
707impl fidl::Persistable for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {}
708
709#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
710pub struct BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
711    pub value: bool,
712}
713
714impl fidl::Persistable for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {}
715
716#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
717pub struct BaseNetworkSocketGetIpv6OnlyResponse {
718    pub value: bool,
719}
720
721impl fidl::Persistable for BaseNetworkSocketGetIpv6OnlyResponse {}
722
723#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
724pub struct BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
725    pub value: bool,
726}
727
728impl fidl::Persistable for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {}
729
730#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
731pub struct BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
732    pub value: bool,
733}
734
735impl fidl::Persistable for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {}
736
737#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
738pub struct BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
739    pub value: bool,
740}
741
742impl fidl::Persistable for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {}
743
744#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
745#[repr(C)]
746pub struct BaseNetworkSocketGetIpv6TrafficClassResponse {
747    pub value: u8,
748}
749
750impl fidl::Persistable for BaseNetworkSocketGetIpv6TrafficClassResponse {}
751
752#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
753#[repr(C)]
754pub struct BaseNetworkSocketGetIpv6UnicastHopsResponse {
755    pub value: u8,
756}
757
758impl fidl::Persistable for BaseNetworkSocketGetIpv6UnicastHopsResponse {}
759
760#[derive(Clone, Debug, PartialEq)]
761pub struct BaseNetworkSocketGetOriginalDestinationResponse {
762    pub value: fidl_fuchsia_net__common::SocketAddress,
763}
764
765impl fidl::Persistable for BaseNetworkSocketGetOriginalDestinationResponse {}
766
767#[derive(Clone, Debug, PartialEq)]
768pub struct BaseNetworkSocketGetPeerNameResponse {
769    pub addr: fidl_fuchsia_net__common::SocketAddress,
770}
771
772impl fidl::Persistable for BaseNetworkSocketGetPeerNameResponse {}
773
774#[derive(Clone, Debug, PartialEq)]
775pub struct BaseNetworkSocketGetSockNameResponse {
776    pub addr: fidl_fuchsia_net__common::SocketAddress,
777}
778
779impl fidl::Persistable for BaseNetworkSocketGetSockNameResponse {}
780
781#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
782pub struct BaseSocketGetMarkRequest {
783    pub domain: fidl_fuchsia_net__common::MarkDomain,
784}
785
786impl fidl::Persistable for BaseSocketGetMarkRequest {}
787
788#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
789pub struct BaseSocketSetBindToDeviceRequest {
790    pub value: String,
791}
792
793impl fidl::Persistable for BaseSocketSetBindToDeviceRequest {}
794
795#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
796#[repr(C)]
797pub struct BaseSocketSetBindToInterfaceIndexRequest {
798    pub value: u64,
799}
800
801impl fidl::Persistable for BaseSocketSetBindToInterfaceIndexRequest {}
802
803#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
804pub struct BaseSocketSetBroadcastRequest {
805    pub value: bool,
806}
807
808impl fidl::Persistable for BaseSocketSetBroadcastRequest {}
809
810#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
811pub struct BaseSocketSetKeepAliveRequest {
812    pub value: bool,
813}
814
815impl fidl::Persistable for BaseSocketSetKeepAliveRequest {}
816
817#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
818pub struct BaseSocketSetLingerRequest {
819    pub linger: bool,
820    pub length_secs: u32,
821}
822
823impl fidl::Persistable for BaseSocketSetLingerRequest {}
824
825#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
826pub struct BaseSocketSetMarkRequest {
827    pub domain: fidl_fuchsia_net__common::MarkDomain,
828    pub mark: OptionalUint32,
829}
830
831impl fidl::Persistable for BaseSocketSetMarkRequest {}
832
833#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
834pub struct BaseSocketSetNoCheckRequest {
835    pub value: bool,
836}
837
838impl fidl::Persistable for BaseSocketSetNoCheckRequest {}
839
840#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
841pub struct BaseSocketSetOutOfBandInlineRequest {
842    pub value: bool,
843}
844
845impl fidl::Persistable for BaseSocketSetOutOfBandInlineRequest {}
846
847#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
848#[repr(C)]
849pub struct BaseSocketSetReceiveBufferRequest {
850    pub value_bytes: u64,
851}
852
853impl fidl::Persistable for BaseSocketSetReceiveBufferRequest {}
854
855#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
856pub struct BaseSocketSetReuseAddressRequest {
857    pub value: bool,
858}
859
860impl fidl::Persistable for BaseSocketSetReuseAddressRequest {}
861
862#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
863pub struct BaseSocketSetReusePortRequest {
864    pub value: bool,
865}
866
867impl fidl::Persistable for BaseSocketSetReusePortRequest {}
868
869#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
870#[repr(C)]
871pub struct BaseSocketSetSendBufferRequest {
872    pub value_bytes: u64,
873}
874
875impl fidl::Persistable for BaseSocketSetSendBufferRequest {}
876
877#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
878pub struct BaseSocketSetTimestampRequest {
879    pub value: TimestampOption,
880}
881
882impl fidl::Persistable for BaseSocketSetTimestampRequest {}
883
884#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
885pub struct BaseSocketGetAcceptConnResponse {
886    pub value: bool,
887}
888
889impl fidl::Persistable for BaseSocketGetAcceptConnResponse {}
890
891#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
892pub struct BaseSocketGetBindToDeviceResponse {
893    pub value: String,
894}
895
896impl fidl::Persistable for BaseSocketGetBindToDeviceResponse {}
897
898#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
899#[repr(C)]
900pub struct BaseSocketGetBindToInterfaceIndexResponse {
901    pub value: u64,
902}
903
904impl fidl::Persistable for BaseSocketGetBindToInterfaceIndexResponse {}
905
906#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
907pub struct BaseSocketGetBroadcastResponse {
908    pub value: bool,
909}
910
911impl fidl::Persistable for BaseSocketGetBroadcastResponse {}
912
913#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
914#[repr(C)]
915pub struct BaseSocketGetCookieResponse {
916    pub value: u64,
917}
918
919impl fidl::Persistable for BaseSocketGetCookieResponse {}
920
921#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
922pub struct BaseSocketGetKeepAliveResponse {
923    pub value: bool,
924}
925
926impl fidl::Persistable for BaseSocketGetKeepAliveResponse {}
927
928#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
929pub struct BaseSocketGetLingerResponse {
930    pub linger: bool,
931    pub length_secs: u32,
932}
933
934impl fidl::Persistable for BaseSocketGetLingerResponse {}
935
936#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
937pub struct BaseSocketGetMarkResponse {
938    pub mark: OptionalUint32,
939}
940
941impl fidl::Persistable for BaseSocketGetMarkResponse {}
942
943#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
944pub struct BaseSocketGetNoCheckResponse {
945    pub value: bool,
946}
947
948impl fidl::Persistable for BaseSocketGetNoCheckResponse {}
949
950#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
951pub struct BaseSocketGetOutOfBandInlineResponse {
952    pub value: bool,
953}
954
955impl fidl::Persistable for BaseSocketGetOutOfBandInlineResponse {}
956
957#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
958#[repr(C)]
959pub struct BaseSocketGetReceiveBufferResponse {
960    pub value_bytes: u64,
961}
962
963impl fidl::Persistable for BaseSocketGetReceiveBufferResponse {}
964
965#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
966pub struct BaseSocketGetReuseAddressResponse {
967    pub value: bool,
968}
969
970impl fidl::Persistable for BaseSocketGetReuseAddressResponse {}
971
972#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
973pub struct BaseSocketGetReusePortResponse {
974    pub value: bool,
975}
976
977impl fidl::Persistable for BaseSocketGetReusePortResponse {}
978
979#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
980#[repr(C)]
981pub struct BaseSocketGetSendBufferResponse {
982    pub value_bytes: u64,
983}
984
985impl fidl::Persistable for BaseSocketGetSendBufferResponse {}
986
987#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
988pub struct BaseSocketGetTimestampResponse {
989    pub value: TimestampOption,
990}
991
992impl fidl::Persistable for BaseSocketGetTimestampResponse {}
993
994#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
995pub struct Empty;
996
997impl fidl::Persistable for Empty {}
998
999/// IPv4 multicast membership options.
1000#[derive(Clone, Debug, PartialEq)]
1001pub struct IpMulticastMembership {
1002    /// Interface index for membership.
1003    pub iface: u64,
1004    /// Local interface address requesting or relinquishing ownership.
1005    pub local_addr: fidl_fuchsia_net__common::Ipv4Address,
1006    /// Address of the multicast group the membership refers to.
1007    pub mcast_addr: fidl_fuchsia_net__common::Ipv4Address,
1008}
1009
1010impl fidl::Persistable for IpMulticastMembership {}
1011
1012/// IPv6 multicast membership options.
1013#[derive(Clone, Debug, PartialEq)]
1014pub struct Ipv6MulticastMembership {
1015    /// Interface index for membership.
1016    pub iface: u64,
1017    /// Address of the multicast group the membership refers to.
1018    pub mcast_addr: fidl_fuchsia_net__common::Ipv6Address,
1019}
1020
1021impl fidl::Persistable for Ipv6MulticastMembership {}
1022
1023#[derive(Clone, Debug, PartialEq)]
1024pub struct Ipv6PktInfoRecvControlData {
1025    /// The index of the interface on which the IP packet was received.
1026    pub iface: u64,
1027    /// The destination address specified in the received packet's IP
1028    /// header.
1029    pub header_destination_addr: fidl_fuchsia_net__common::Ipv6Address,
1030}
1031
1032impl fidl::Persistable for Ipv6PktInfoRecvControlData {}
1033
1034/// IPv6-specific disposition of sent data.
1035///
1036/// This is currently a struct instead of a table as it is meant to match
1037/// `in6_pktinfo` which is not expected to grow.
1038#[derive(Clone, Debug, PartialEq)]
1039pub struct Ipv6PktInfoSendControlData {
1040    /// The interface index from which the IPv6 packet should be sent.
1041    ///
1042    /// 0 indicates that the local interface is unspecified and the
1043    /// stack may choose an appropriate interface.
1044    pub iface: u64,
1045    /// The source address from which the IPv6 packet should be sent.
1046    ///
1047    /// All zeroes indicates that the local address is unspecified and
1048    /// the stack may choose an appropriate address (i.e. the local
1049    /// address to which the socket is bound).
1050    pub local_addr: fidl_fuchsia_net__common::Ipv6Address,
1051}
1052
1053impl fidl::Persistable for Ipv6PktInfoSendControlData {}
1054
1055#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1056pub struct ProviderDatagramSocketDeprecatedRequest {
1057    pub domain: Domain,
1058    pub proto: DatagramSocketProtocol,
1059}
1060
1061impl fidl::Persistable for ProviderDatagramSocketDeprecatedRequest {}
1062
1063#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1064pub struct ProviderDatagramSocketRequest {
1065    pub domain: Domain,
1066    pub proto: DatagramSocketProtocol,
1067}
1068
1069impl fidl::Persistable for ProviderDatagramSocketRequest {}
1070
1071#[derive(Clone, Debug, PartialEq)]
1072pub struct ProviderDatagramSocketWithOptionsRequest {
1073    pub domain: Domain,
1074    pub proto: DatagramSocketProtocol,
1075    pub opts: SocketCreationOptions,
1076}
1077
1078impl fidl::Persistable for ProviderDatagramSocketWithOptionsRequest {}
1079
1080#[derive(Clone, Debug, PartialEq)]
1081pub struct ProviderGetInterfaceAddressesResponse {
1082    pub interfaces: Vec<InterfaceAddresses>,
1083}
1084
1085impl fidl::Persistable for ProviderGetInterfaceAddressesResponse {}
1086
1087#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1088#[repr(C)]
1089pub struct ProviderInterfaceIndexToNameRequest {
1090    pub index: u64,
1091}
1092
1093impl fidl::Persistable for ProviderInterfaceIndexToNameRequest {}
1094
1095#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1096pub struct ProviderInterfaceNameToFlagsRequest {
1097    pub name: String,
1098}
1099
1100impl fidl::Persistable for ProviderInterfaceNameToFlagsRequest {}
1101
1102#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1103pub struct ProviderInterfaceNameToIndexRequest {
1104    pub name: String,
1105}
1106
1107impl fidl::Persistable for ProviderInterfaceNameToIndexRequest {}
1108
1109#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1110pub struct ProviderStreamSocketRequest {
1111    pub domain: Domain,
1112    pub proto: StreamSocketProtocol,
1113}
1114
1115impl fidl::Persistable for ProviderStreamSocketRequest {}
1116
1117#[derive(Clone, Debug, PartialEq)]
1118pub struct ProviderStreamSocketWithOptionsRequest {
1119    pub domain: Domain,
1120    pub proto: StreamSocketProtocol,
1121    pub opts: SocketCreationOptions,
1122}
1123
1124impl fidl::Persistable for ProviderStreamSocketWithOptionsRequest {}
1125
1126#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1127pub struct ProviderInterfaceIndexToNameResponse {
1128    pub name: String,
1129}
1130
1131impl fidl::Persistable for ProviderInterfaceIndexToNameResponse {}
1132
1133#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1134pub struct ProviderInterfaceNameToFlagsResponse {
1135    pub flags: InterfaceFlags,
1136}
1137
1138impl fidl::Persistable for ProviderInterfaceNameToFlagsResponse {}
1139
1140#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1141#[repr(C)]
1142pub struct ProviderInterfaceNameToIndexResponse {
1143    pub index: u64,
1144}
1145
1146impl fidl::Persistable for ProviderInterfaceNameToIndexResponse {}
1147
1148#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1149pub struct StreamSocketAcceptRequest {
1150    pub want_addr: bool,
1151}
1152
1153impl fidl::Persistable for StreamSocketAcceptRequest {}
1154
1155#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1156#[repr(C)]
1157pub struct StreamSocketListenRequest {
1158    pub backlog: i16,
1159}
1160
1161impl fidl::Persistable for StreamSocketListenRequest {}
1162
1163#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1164pub struct StreamSocketSetTcpCongestionRequest {
1165    pub value: TcpCongestionControl,
1166}
1167
1168impl fidl::Persistable for StreamSocketSetTcpCongestionRequest {}
1169
1170#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1171pub struct StreamSocketSetTcpCorkRequest {
1172    pub value: bool,
1173}
1174
1175impl fidl::Persistable for StreamSocketSetTcpCorkRequest {}
1176
1177#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1178#[repr(C)]
1179pub struct StreamSocketSetTcpDeferAcceptRequest {
1180    pub value_secs: u32,
1181}
1182
1183impl fidl::Persistable for StreamSocketSetTcpDeferAcceptRequest {}
1184
1185#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1186#[repr(C)]
1187pub struct StreamSocketSetTcpKeepAliveCountRequest {
1188    pub value: u32,
1189}
1190
1191impl fidl::Persistable for StreamSocketSetTcpKeepAliveCountRequest {}
1192
1193#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1194#[repr(C)]
1195pub struct StreamSocketSetTcpKeepAliveIdleRequest {
1196    pub value_secs: u32,
1197}
1198
1199impl fidl::Persistable for StreamSocketSetTcpKeepAliveIdleRequest {}
1200
1201#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1202#[repr(C)]
1203pub struct StreamSocketSetTcpKeepAliveIntervalRequest {
1204    pub value_secs: u32,
1205}
1206
1207impl fidl::Persistable for StreamSocketSetTcpKeepAliveIntervalRequest {}
1208
1209#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1210pub struct StreamSocketSetTcpLingerRequest {
1211    pub value_secs: OptionalUint32,
1212}
1213
1214impl fidl::Persistable for StreamSocketSetTcpLingerRequest {}
1215
1216#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1217#[repr(C)]
1218pub struct StreamSocketSetTcpMaxSegmentRequest {
1219    pub value_bytes: u32,
1220}
1221
1222impl fidl::Persistable for StreamSocketSetTcpMaxSegmentRequest {}
1223
1224#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1225pub struct StreamSocketSetTcpNoDelayRequest {
1226    pub value: bool,
1227}
1228
1229impl fidl::Persistable for StreamSocketSetTcpNoDelayRequest {}
1230
1231#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1232pub struct StreamSocketSetTcpQuickAckRequest {
1233    pub value: bool,
1234}
1235
1236impl fidl::Persistable for StreamSocketSetTcpQuickAckRequest {}
1237
1238#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1239#[repr(C)]
1240pub struct StreamSocketSetTcpSynCountRequest {
1241    pub value: u32,
1242}
1243
1244impl fidl::Persistable for StreamSocketSetTcpSynCountRequest {}
1245
1246#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1247#[repr(C)]
1248pub struct StreamSocketSetTcpUserTimeoutRequest {
1249    pub value_millis: u32,
1250}
1251
1252impl fidl::Persistable for StreamSocketSetTcpUserTimeoutRequest {}
1253
1254#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1255#[repr(C)]
1256pub struct StreamSocketSetTcpWindowClampRequest {
1257    pub value: u32,
1258}
1259
1260impl fidl::Persistable for StreamSocketSetTcpWindowClampRequest {}
1261
1262#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1263pub struct StreamSocketGetInfoResponse {
1264    pub domain: Domain,
1265    pub proto: StreamSocketProtocol,
1266}
1267
1268impl fidl::Persistable for StreamSocketGetInfoResponse {}
1269
1270#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1271pub struct StreamSocketGetTcpCongestionResponse {
1272    pub value: TcpCongestionControl,
1273}
1274
1275impl fidl::Persistable for StreamSocketGetTcpCongestionResponse {}
1276
1277#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1278pub struct StreamSocketGetTcpCorkResponse {
1279    pub value: bool,
1280}
1281
1282impl fidl::Persistable for StreamSocketGetTcpCorkResponse {}
1283
1284#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1285#[repr(C)]
1286pub struct StreamSocketGetTcpDeferAcceptResponse {
1287    pub value_secs: u32,
1288}
1289
1290impl fidl::Persistable for StreamSocketGetTcpDeferAcceptResponse {}
1291
1292#[derive(Clone, Debug, PartialEq)]
1293pub struct StreamSocketGetTcpInfoResponse {
1294    pub info: TcpInfo,
1295}
1296
1297impl fidl::Persistable for StreamSocketGetTcpInfoResponse {}
1298
1299#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1300#[repr(C)]
1301pub struct StreamSocketGetTcpKeepAliveCountResponse {
1302    pub value: u32,
1303}
1304
1305impl fidl::Persistable for StreamSocketGetTcpKeepAliveCountResponse {}
1306
1307#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1308#[repr(C)]
1309pub struct StreamSocketGetTcpKeepAliveIdleResponse {
1310    pub value_secs: u32,
1311}
1312
1313impl fidl::Persistable for StreamSocketGetTcpKeepAliveIdleResponse {}
1314
1315#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1316#[repr(C)]
1317pub struct StreamSocketGetTcpKeepAliveIntervalResponse {
1318    pub value_secs: u32,
1319}
1320
1321impl fidl::Persistable for StreamSocketGetTcpKeepAliveIntervalResponse {}
1322
1323#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1324pub struct StreamSocketGetTcpLingerResponse {
1325    pub value_secs: OptionalUint32,
1326}
1327
1328impl fidl::Persistable for StreamSocketGetTcpLingerResponse {}
1329
1330#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1331#[repr(C)]
1332pub struct StreamSocketGetTcpMaxSegmentResponse {
1333    pub value_bytes: u32,
1334}
1335
1336impl fidl::Persistable for StreamSocketGetTcpMaxSegmentResponse {}
1337
1338#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1339pub struct StreamSocketGetTcpNoDelayResponse {
1340    pub value: bool,
1341}
1342
1343impl fidl::Persistable for StreamSocketGetTcpNoDelayResponse {}
1344
1345#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1346pub struct StreamSocketGetTcpQuickAckResponse {
1347    pub value: bool,
1348}
1349
1350impl fidl::Persistable for StreamSocketGetTcpQuickAckResponse {}
1351
1352#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1353#[repr(C)]
1354pub struct StreamSocketGetTcpSynCountResponse {
1355    pub value: u32,
1356}
1357
1358impl fidl::Persistable for StreamSocketGetTcpSynCountResponse {}
1359
1360#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1361#[repr(C)]
1362pub struct StreamSocketGetTcpUserTimeoutResponse {
1363    pub value_millis: u32,
1364}
1365
1366impl fidl::Persistable for StreamSocketGetTcpUserTimeoutResponse {}
1367
1368#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1369#[repr(C)]
1370pub struct StreamSocketGetTcpWindowClampResponse {
1371    pub value: u32,
1372}
1373
1374impl fidl::Persistable for StreamSocketGetTcpWindowClampResponse {}
1375
1376#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1377pub struct SynchronousDatagramSocketRecvMsgRequest {
1378    pub want_addr: bool,
1379    pub data_len: u32,
1380    pub want_control: bool,
1381    pub flags: RecvMsgFlags,
1382}
1383
1384impl fidl::Persistable for SynchronousDatagramSocketRecvMsgRequest {}
1385
1386#[derive(Clone, Debug, PartialEq)]
1387pub struct SynchronousDatagramSocketSendMsgRequest {
1388    pub addr: Option<Box<fidl_fuchsia_net__common::SocketAddress>>,
1389    pub data: Vec<u8>,
1390    pub control: DatagramSocketSendControlData,
1391    pub flags: SendMsgFlags,
1392}
1393
1394impl fidl::Persistable for SynchronousDatagramSocketSendMsgRequest {}
1395
1396#[derive(Clone, Debug, PartialEq)]
1397pub struct SynchronousDatagramSocketRecvMsgResponse {
1398    pub addr: Option<Box<fidl_fuchsia_net__common::SocketAddress>>,
1399    pub data: Vec<u8>,
1400    pub control: DatagramSocketRecvControlData,
1401    pub truncated: u32,
1402}
1403
1404impl fidl::Persistable for SynchronousDatagramSocketRecvMsgResponse {}
1405
1406#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1407#[repr(C)]
1408pub struct SynchronousDatagramSocketSendMsgResponse {
1409    pub len: i64,
1410}
1411
1412impl fidl::Persistable for SynchronousDatagramSocketSendMsgResponse {}
1413
1414#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1415pub struct Timestamp {
1416    /// Time in nanoseconds since epoch (January 1 1970 GMT).
1417    pub nanoseconds: i64,
1418    /// Identifies whether/how the timestamp should be returned to the user.
1419    /// Ignored in the DatagramSocket protocol.
1420    pub requested: TimestampOption,
1421}
1422
1423impl fidl::Persistable for Timestamp {}
1424
1425#[derive(Clone, Debug, Default, PartialEq)]
1426pub struct DatagramSocketRecvControlData {
1427    /// Network socket ancillary data.
1428    pub network: Option<NetworkSocketRecvControlData>,
1429    #[doc(hidden)]
1430    pub __source_breaking: fidl::marker::SourceBreaking,
1431}
1432
1433impl fidl::Persistable for DatagramSocketRecvControlData {}
1434
1435#[derive(Clone, Debug, Default, PartialEq)]
1436pub struct DatagramSocketSendControlData {
1437    /// Network socket ancillary data.
1438    pub network: Option<NetworkSocketSendControlData>,
1439    #[doc(hidden)]
1440    pub __source_breaking: fidl::marker::SourceBreaking,
1441}
1442
1443impl fidl::Persistable for DatagramSocketSendControlData {}
1444
1445#[derive(Clone, Debug, Default, PartialEq)]
1446pub struct DatagramSocketSendMsgPreflightRequest {
1447    /// The destination address.
1448    ///
1449    /// If absent, interpreted as the method receiver's connected address and
1450    /// causes the connected address to be returned.
1451    ///
1452    /// Required if the method receiver is not connected.
1453    pub to: Option<fidl_fuchsia_net__common::SocketAddress>,
1454    /// Information controlling the local interface and/or address used when
1455    /// sending an IPv6 packet.
1456    ///
1457    /// If absent, indicates that the stack is free to choose an appropriate
1458    /// outgoing route.
1459    pub ipv6_pktinfo: Option<Ipv6PktInfoSendControlData>,
1460    #[doc(hidden)]
1461    pub __source_breaking: fidl::marker::SourceBreaking,
1462}
1463
1464impl fidl::Persistable for DatagramSocketSendMsgPreflightRequest {}
1465
1466/// Holds information about an interface and its addresses.
1467#[derive(Clone, Debug, Default, PartialEq)]
1468pub struct InterfaceAddresses {
1469    /// ID of the interface.
1470    pub id: Option<u64>,
1471    /// Name of the interface.
1472    pub name: Option<String>,
1473    /// All addresses currently assigned to the interface.
1474    pub addresses: Option<Vec<fidl_fuchsia_net__common::Subnet>>,
1475    /// Contains the interface flags, as returned by the SIOCGIFFLAGS ioctl
1476    /// operation.
1477    pub interface_flags: Option<InterfaceFlags>,
1478    #[doc(hidden)]
1479    pub __source_breaking: fidl::marker::SourceBreaking,
1480}
1481
1482impl fidl::Persistable for InterfaceAddresses {}
1483
1484#[derive(Clone, Debug, Default, PartialEq)]
1485pub struct IpRecvControlData {
1486    /// The Type of Service value found in a received packet's IPv4 header.
1487    ///
1488    /// Present if the `SOL_IP` -> `IP_RECVTOS` option is enabled.
1489    pub tos: Option<u8>,
1490    /// The Time to Live value found in a received packet's IPv4 header.
1491    ///
1492    /// Present if the `SOL_IP` -> `IP_RECVTTL` option is enabled.
1493    pub ttl: Option<u8>,
1494    /// The original destination address.
1495    ///
1496    /// Present if the `SOL_IP` -> `IP_RECVORIGDSTADDR` option is enabled.
1497    pub original_destination_address: Option<fidl_fuchsia_net__common::SocketAddress>,
1498    #[doc(hidden)]
1499    pub __source_breaking: fidl::marker::SourceBreaking,
1500}
1501
1502impl fidl::Persistable for IpRecvControlData {}
1503
1504#[derive(Clone, Debug, Default, PartialEq)]
1505pub struct IpSendControlData {
1506    /// The Time to Live value to set in the IPv4 header of an outgoing
1507    /// packet.
1508    pub ttl: Option<u8>,
1509    #[doc(hidden)]
1510    pub __source_breaking: fidl::marker::SourceBreaking,
1511}
1512
1513impl fidl::Persistable for IpSendControlData {}
1514
1515#[derive(Clone, Debug, Default, PartialEq)]
1516pub struct Ipv6RecvControlData {
1517    /// The Traffic Class of a packet that was received.
1518    ///
1519    /// Present if the `SOL_IPV6` -> `IPV6_RECVTCLASS` option is enabled.
1520    pub tclass: Option<u8>,
1521    /// The Hop Limit of a packet that was received.
1522    ///
1523    /// Present if the `SOL_IPV6` -> `IPV6_RECVHOPLIMIT` option is enabled.
1524    pub hoplimit: Option<u8>,
1525    /// The packet information of a packet that was received.
1526    ///
1527    /// Present if the `SOL_IPV6` -> `IPV6_RECVPKTINFO` option is enabled.
1528    pub pktinfo: Option<Ipv6PktInfoRecvControlData>,
1529    #[doc(hidden)]
1530    pub __source_breaking: fidl::marker::SourceBreaking,
1531}
1532
1533impl fidl::Persistable for Ipv6RecvControlData {}
1534
1535#[derive(Clone, Debug, Default, PartialEq)]
1536pub struct Ipv6SendControlData {
1537    /// The Hop Limit value to set in the IPv6 header of an outgoing
1538    /// packet.
1539    pub hoplimit: Option<u8>,
1540    /// Information controlling the local interface and/or address used when
1541    /// sending an IPv6 packet.
1542    pub pktinfo: Option<Ipv6PktInfoSendControlData>,
1543    #[doc(hidden)]
1544    pub __source_breaking: fidl::marker::SourceBreaking,
1545}
1546
1547impl fidl::Persistable for Ipv6SendControlData {}
1548
1549/// Network socket (L3) ancillary data that can be received.
1550#[derive(Clone, Debug, Default, PartialEq)]
1551pub struct NetworkSocketRecvControlData {
1552    /// Socket level ancillary data.
1553    pub socket: Option<SocketRecvControlData>,
1554    /// IPv4 level ancillary data.
1555    ///
1556    /// These match POSIX `SOL_IP` control messages.
1557    pub ip: Option<IpRecvControlData>,
1558    /// IPv6 level ancillary data.
1559    ///
1560    /// These match POSIX `SOL_IPV6` control messages.
1561    pub ipv6: Option<Ipv6RecvControlData>,
1562    #[doc(hidden)]
1563    pub __source_breaking: fidl::marker::SourceBreaking,
1564}
1565
1566impl fidl::Persistable for NetworkSocketRecvControlData {}
1567
1568/// Network socket (L3) ancillary data that can be sent.
1569#[derive(Clone, Debug, Default, PartialEq)]
1570pub struct NetworkSocketSendControlData {
1571    /// Socket level ancillary data.
1572    pub socket: Option<SocketSendControlData>,
1573    /// IPv4 level ancillary data.
1574    ///
1575    /// These match POSIX `SOL_IP` control messages.
1576    pub ip: Option<IpSendControlData>,
1577    /// IPv6 level ancillary data.
1578    ///
1579    /// These match POSIX `SOL_IPV6` control messages.
1580    pub ipv6: Option<Ipv6SendControlData>,
1581    #[doc(hidden)]
1582    pub __source_breaking: fidl::marker::SourceBreaking,
1583}
1584
1585impl fidl::Persistable for NetworkSocketSendControlData {}
1586
1587/// Metadata of a received datagram.
1588#[derive(Clone, Debug, Default, PartialEq)]
1589pub struct RecvMsgMeta {
1590    /// The from address of the datagram.
1591    pub from: Option<fidl_fuchsia_net__common::SocketAddress>,
1592    /// Ancillary control message data describing the datagram.
1593    pub control: Option<DatagramSocketRecvControlData>,
1594    /// The length of the payload, in bytes.
1595    pub payload_len: Option<u16>,
1596    #[doc(hidden)]
1597    pub __source_breaking: fidl::marker::SourceBreaking,
1598}
1599
1600impl fidl::Persistable for RecvMsgMeta {}
1601
1602/// Metadata of a sent datagram.
1603#[derive(Clone, Debug, Default, PartialEq)]
1604pub struct SendMsgMeta {
1605    /// The destination address, if specified.
1606    pub to: Option<fidl_fuchsia_net__common::SocketAddress>,
1607    /// Ancillary control message data used for sending the payload.
1608    pub control: Option<DatagramSocketSendControlData>,
1609    #[doc(hidden)]
1610    pub __source_breaking: fidl::marker::SourceBreaking,
1611}
1612
1613impl fidl::Persistable for SendMsgMeta {}
1614
1615/// Options that can be provided at socket creation.
1616#[derive(Clone, Debug, Default, PartialEq)]
1617pub struct SocketCreationOptions {
1618    /// The marks for the created socket. If a mark is missing from the table,
1619    /// it will remain unset for the created socket.
1620    pub marks: Option<fidl_fuchsia_net__common::Marks>,
1621    #[doc(hidden)]
1622    pub __source_breaking: fidl::marker::SourceBreaking,
1623}
1624
1625impl fidl::Persistable for SocketCreationOptions {}
1626
1627/// Socket level ancillary data that can be received.
1628///
1629/// These match control messages with a `SOL_SOCKET` level.
1630#[derive(Clone, Debug, Default, PartialEq)]
1631pub struct SocketRecvControlData {
1632    /// Data about the time at which the packet was received.
1633    pub timestamp: Option<Timestamp>,
1634    #[doc(hidden)]
1635    pub __source_breaking: fidl::marker::SourceBreaking,
1636}
1637
1638impl fidl::Persistable for SocketRecvControlData {}
1639
1640/// Socket level ancillary data that can be sent.
1641///
1642/// These match the POSIX `SOL_SOCKET` control messages.
1643#[derive(Clone, Debug, Default, PartialEq)]
1644pub struct SocketSendControlData {
1645    #[doc(hidden)]
1646    pub __source_breaking: fidl::marker::SourceBreaking,
1647}
1648
1649impl fidl::Persistable for SocketSendControlData {}
1650
1651/// TCP protocol state.
1652#[derive(Clone, Debug, Default, PartialEq)]
1653pub struct TcpInfo {
1654    pub state: Option<TcpState>,
1655    pub ca_state: Option<TcpCongestionControlState>,
1656    pub rto_usec: Option<u32>,
1657    pub rtt_usec: Option<u32>,
1658    pub rtt_var_usec: Option<u32>,
1659    pub snd_ssthresh: Option<u32>,
1660    pub snd_cwnd: Option<u32>,
1661    pub reorder_seen: Option<bool>,
1662    #[doc(hidden)]
1663    pub __source_breaking: fidl::marker::SourceBreaking,
1664}
1665
1666impl fidl::Persistable for TcpInfo {}
1667
1668/// An optional uint32 value.
1669#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1670pub enum OptionalUint32 {
1671    Value(u32),
1672    Unset(Empty),
1673}
1674
1675impl OptionalUint32 {
1676    #[inline]
1677    pub fn ordinal(&self) -> u64 {
1678        match *self {
1679            Self::Value(_) => 1,
1680            Self::Unset(_) => 2,
1681        }
1682    }
1683}
1684
1685impl fidl::Persistable for OptionalUint32 {}
1686
1687/// An optional byte value.
1688#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1689pub enum OptionalUint8 {
1690    Value(u8),
1691    Unset(Empty),
1692}
1693
1694impl OptionalUint8 {
1695    #[inline]
1696    pub fn ordinal(&self) -> u64 {
1697        match *self {
1698            Self::Value(_) => 1,
1699            Self::Unset(_) => 2,
1700        }
1701    }
1702}
1703
1704impl fidl::Persistable for OptionalUint8 {}
1705
1706pub mod base_datagram_socket_ordinals {
1707    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1708    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1709    pub const QUERY: u64 = 0x2658edee9decfc06;
1710    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1711    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1712    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1713    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1714    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1715    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1716    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1717    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1718    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1719    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1720    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1721    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1722    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1723    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1724    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1725    pub const SET_LINGER: u64 = 0x45386351246e998e;
1726    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1727    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1728    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1729    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1730    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1731    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1732    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1733    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1734    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1735    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1736    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1737    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1738    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1739    pub const BIND: u64 = 0x4bc6400ae92125d;
1740    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1741    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1742    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1743    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1744    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1745    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1746    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1747    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1748    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1749    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1750    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1751    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1752    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1753    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1754    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1755    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1756    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1757    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1758    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1759    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1760    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1761    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1762    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1763    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1764    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1765    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1766    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1767    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1768    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1769    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1770    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1771    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1772    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1773    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1774    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1775    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1776    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1777    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1778    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1779    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1780    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1781    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1782    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1783    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1784    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1785    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1786    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1787    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1788    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
1789}
1790
1791pub mod base_network_socket_ordinals {
1792    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1793    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1794    pub const QUERY: u64 = 0x2658edee9decfc06;
1795    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1796    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1797    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1798    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1799    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1800    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1801    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1802    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1803    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1804    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1805    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1806    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1807    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1808    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1809    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1810    pub const SET_LINGER: u64 = 0x45386351246e998e;
1811    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1812    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1813    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1814    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1815    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1816    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1817    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1818    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1819    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1820    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1821    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1822    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1823    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1824    pub const BIND: u64 = 0x4bc6400ae92125d;
1825    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1826    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1827    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1828    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1829    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1830    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1831    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1832    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1833    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1834    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1835    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1836    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1837    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1838    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1839    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1840    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1841    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1842    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1843    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1844    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1845    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1846    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1847    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1848    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1849    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1850    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1851    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1852    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1853    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1854    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1855    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1856    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1857    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1858    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1859    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1860    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1861    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1862    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1863    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1864    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1865    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1866    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1867    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1868    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1869    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1870    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1871    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1872    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1873}
1874
1875pub mod base_socket_ordinals {
1876    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1877    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1878    pub const QUERY: u64 = 0x2658edee9decfc06;
1879    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1880    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1881    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1882    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1883    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1884    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1885    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1886    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1887    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1888    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1889    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1890    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1891    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1892    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1893    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1894    pub const SET_LINGER: u64 = 0x45386351246e998e;
1895    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1896    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1897    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1898    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1899    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1900    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1901    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1902    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1903    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1904    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1905    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1906    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1907    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1908}
1909
1910pub mod datagram_socket_ordinals {
1911    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1912    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1913    pub const QUERY: u64 = 0x2658edee9decfc06;
1914    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1915    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1916    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1917    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1918    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1919    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1920    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1921    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1922    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1923    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1924    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1925    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1926    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1927    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1928    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1929    pub const SET_LINGER: u64 = 0x45386351246e998e;
1930    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1931    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1932    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1933    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1934    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1935    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1936    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1937    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1938    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1939    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1940    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1941    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1942    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1943    pub const BIND: u64 = 0x4bc6400ae92125d;
1944    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1945    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1946    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1947    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1948    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1949    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1950    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1951    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1952    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1953    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1954    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1955    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1956    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1957    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1958    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1959    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1960    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1961    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1962    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1963    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1964    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1965    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1966    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1967    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1968    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1969    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1970    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1971    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1972    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1973    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1974    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1975    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1976    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1977    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1978    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1979    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1980    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1981    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1982    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1983    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1984    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1985    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1986    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1987    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1988    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1989    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1990    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1991    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1992    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
1993    pub const DESCRIBE: u64 = 0xbf1e2f0a86601f3;
1994    pub const SEND_MSG_PREFLIGHT: u64 = 0x5362e668e777248a;
1995    pub const RECV_MSG_POSTFLIGHT: u64 = 0x1a7cdeca5f3eb8e2;
1996}
1997
1998pub mod provider_ordinals {
1999    pub const STREAM_SOCKET_WITH_OPTIONS: u64 = 0x3969bf7eb78386e0;
2000    pub const STREAM_SOCKET: u64 = 0x27c3581da2155545;
2001    pub const DATAGRAM_SOCKET_DEPRECATED: u64 = 0x38876c87cf031cb1;
2002    pub const DATAGRAM_SOCKET: u64 = 0x4021b4fa1b6452f2;
2003    pub const DATAGRAM_SOCKET_WITH_OPTIONS: u64 = 0x4cd0cffbffa39eb1;
2004    pub const INTERFACE_INDEX_TO_NAME: u64 = 0x4d59a64fce98272f;
2005    pub const INTERFACE_NAME_TO_INDEX: u64 = 0x690cd8d2f2d650f8;
2006    pub const INTERFACE_NAME_TO_FLAGS: u64 = 0x25d0efcdb6671a0b;
2007    pub const GET_INTERFACE_ADDRESSES: u64 = 0x2e7b9aaf327c870;
2008}
2009
2010pub mod stream_socket_ordinals {
2011    pub const CLONE: u64 = 0x20d8a7aba2168a79;
2012    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
2013    pub const QUERY: u64 = 0x2658edee9decfc06;
2014    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
2015    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
2016    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
2017    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
2018    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
2019    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
2020    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
2021    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
2022    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
2023    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
2024    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
2025    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
2026    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
2027    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
2028    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
2029    pub const SET_LINGER: u64 = 0x45386351246e998e;
2030    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
2031    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
2032    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
2033    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
2034    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
2035    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
2036    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
2037    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
2038    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
2039    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
2040    pub const SET_MARK: u64 = 0x6ead6de09f653236;
2041    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
2042    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
2043    pub const BIND: u64 = 0x4bc6400ae92125d;
2044    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
2045    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
2046    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
2047    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
2048    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
2049    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
2050    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
2051    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
2052    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
2053    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
2054    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
2055    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
2056    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
2057    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
2058    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
2059    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
2060    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
2061    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
2062    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
2063    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
2064    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
2065    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
2066    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
2067    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
2068    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
2069    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
2070    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
2071    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
2072    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
2073    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
2074    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
2075    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
2076    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
2077    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
2078    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
2079    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
2080    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
2081    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
2082    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
2083    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
2084    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
2085    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
2086    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
2087    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
2088    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
2089    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
2090    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
2091    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
2092    pub const DESCRIBE: u64 = 0x29e22969a7dadc32;
2093    pub const LISTEN: u64 = 0x3d0a65ced3d10108;
2094    pub const ACCEPT: u64 = 0x5ab7ad620424c163;
2095    pub const GET_INFO: u64 = 0x87cfa55d19f878f;
2096    pub const SET_TCP_NO_DELAY: u64 = 0x5a59b778f7333ada;
2097    pub const GET_TCP_NO_DELAY: u64 = 0xac219a3218b0799;
2098    pub const SET_TCP_MAX_SEGMENT: u64 = 0xb3d30c498266d18;
2099    pub const GET_TCP_MAX_SEGMENT: u64 = 0x637404d1b4b9982c;
2100    pub const SET_TCP_CORK: u64 = 0x62e26891541143a0;
2101    pub const GET_TCP_CORK: u64 = 0x435bb232e0e74f32;
2102    pub const SET_TCP_KEEP_ALIVE_IDLE: u64 = 0x196d053d8363c42;
2103    pub const GET_TCP_KEEP_ALIVE_IDLE: u64 = 0x35ec58564879dac;
2104    pub const SET_TCP_KEEP_ALIVE_INTERVAL: u64 = 0x485ffbc2da1243f2;
2105    pub const GET_TCP_KEEP_ALIVE_INTERVAL: u64 = 0x264eaf46306b284;
2106    pub const SET_TCP_KEEP_ALIVE_COUNT: u64 = 0x2ab2e8c111708421;
2107    pub const GET_TCP_KEEP_ALIVE_COUNT: u64 = 0x2f176ae271fe7a09;
2108    pub const SET_TCP_SYN_COUNT: u64 = 0x4dcd6ab5573c1eb3;
2109    pub const GET_TCP_SYN_COUNT: u64 = 0x7d457cba8f5f3ee6;
2110    pub const SET_TCP_LINGER: u64 = 0xd5cc1e8654d36e4;
2111    pub const GET_TCP_LINGER: u64 = 0xad870d311cf30eb;
2112    pub const SET_TCP_DEFER_ACCEPT: u64 = 0x15092f181e57c404;
2113    pub const GET_TCP_DEFER_ACCEPT: u64 = 0x64589790842cb7c6;
2114    pub const SET_TCP_WINDOW_CLAMP: u64 = 0x4a26ce07d847f1c6;
2115    pub const GET_TCP_WINDOW_CLAMP: u64 = 0x2df6b636bf0a6a4e;
2116    pub const GET_TCP_INFO: u64 = 0x1ffb123d9f03ead2;
2117    pub const SET_TCP_QUICK_ACK: u64 = 0x6fa811be8fde7457;
2118    pub const GET_TCP_QUICK_ACK: u64 = 0x7356a949bef2df32;
2119    pub const SET_TCP_CONGESTION: u64 = 0x7924c6eabde7819e;
2120    pub const GET_TCP_CONGESTION: u64 = 0x11e16397e1b72a47;
2121    pub const SET_TCP_USER_TIMEOUT: u64 = 0x6b459e81c3741a60;
2122    pub const GET_TCP_USER_TIMEOUT: u64 = 0x24bbd5858ad8c380;
2123}
2124
2125pub mod synchronous_datagram_socket_ordinals {
2126    pub const CLONE: u64 = 0x20d8a7aba2168a79;
2127    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
2128    pub const QUERY: u64 = 0x2658edee9decfc06;
2129    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
2130    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
2131    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
2132    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
2133    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
2134    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
2135    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
2136    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
2137    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
2138    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
2139    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
2140    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
2141    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
2142    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
2143    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
2144    pub const SET_LINGER: u64 = 0x45386351246e998e;
2145    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
2146    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
2147    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
2148    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
2149    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
2150    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
2151    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
2152    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
2153    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
2154    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
2155    pub const SET_MARK: u64 = 0x6ead6de09f653236;
2156    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
2157    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
2158    pub const BIND: u64 = 0x4bc6400ae92125d;
2159    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
2160    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
2161    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
2162    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
2163    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
2164    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
2165    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
2166    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
2167    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
2168    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
2169    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
2170    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
2171    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
2172    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
2173    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
2174    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
2175    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
2176    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
2177    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
2178    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
2179    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
2180    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
2181    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
2182    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
2183    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
2184    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
2185    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
2186    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
2187    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
2188    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
2189    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
2190    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
2191    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
2192    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
2193    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
2194    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
2195    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
2196    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
2197    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
2198    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
2199    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
2200    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
2201    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
2202    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
2203    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
2204    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
2205    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
2206    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
2207    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
2208    pub const DESCRIBE: u64 = 0x585f20b73631070d;
2209    pub const RECV_MSG: u64 = 0x28e494e48fb5dbf3;
2210    pub const SEND_MSG: u64 = 0x12dc2fceab6cefaa;
2211}
2212
2213mod internal {
2214    use super::*;
2215    unsafe impl fidl::encoding::TypeMarker for CmsgRequests {
2216        type Owned = Self;
2217
2218        #[inline(always)]
2219        fn inline_align(_context: fidl::encoding::Context) -> usize {
2220            4
2221        }
2222
2223        #[inline(always)]
2224        fn inline_size(_context: fidl::encoding::Context) -> usize {
2225            4
2226        }
2227    }
2228
2229    impl fidl::encoding::ValueTypeMarker for CmsgRequests {
2230        type Borrowed<'a> = Self;
2231        #[inline(always)]
2232        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2233            *value
2234        }
2235    }
2236
2237    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CmsgRequests {
2238        #[inline]
2239        unsafe fn encode(
2240            self,
2241            encoder: &mut fidl::encoding::Encoder<'_, D>,
2242            offset: usize,
2243            _depth: fidl::encoding::Depth,
2244        ) -> fidl::Result<()> {
2245            encoder.debug_check_bounds::<Self>(offset);
2246            encoder.write_num(self.bits(), offset);
2247            Ok(())
2248        }
2249    }
2250
2251    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CmsgRequests {
2252        #[inline(always)]
2253        fn new_empty() -> Self {
2254            Self::empty()
2255        }
2256
2257        #[inline]
2258        unsafe fn decode(
2259            &mut self,
2260            decoder: &mut fidl::encoding::Decoder<'_, D>,
2261            offset: usize,
2262            _depth: fidl::encoding::Depth,
2263        ) -> fidl::Result<()> {
2264            decoder.debug_check_bounds::<Self>(offset);
2265            let prim = decoder.read_num::<u32>(offset);
2266            *self = Self::from_bits_allow_unknown(prim);
2267            Ok(())
2268        }
2269    }
2270    unsafe impl fidl::encoding::TypeMarker for InterfaceFlags {
2271        type Owned = Self;
2272
2273        #[inline(always)]
2274        fn inline_align(_context: fidl::encoding::Context) -> usize {
2275            2
2276        }
2277
2278        #[inline(always)]
2279        fn inline_size(_context: fidl::encoding::Context) -> usize {
2280            2
2281        }
2282    }
2283
2284    impl fidl::encoding::ValueTypeMarker for InterfaceFlags {
2285        type Borrowed<'a> = Self;
2286        #[inline(always)]
2287        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2288            *value
2289        }
2290    }
2291
2292    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for InterfaceFlags {
2293        #[inline]
2294        unsafe fn encode(
2295            self,
2296            encoder: &mut fidl::encoding::Encoder<'_, D>,
2297            offset: usize,
2298            _depth: fidl::encoding::Depth,
2299        ) -> fidl::Result<()> {
2300            encoder.debug_check_bounds::<Self>(offset);
2301            if self.bits() & Self::all().bits() != self.bits() {
2302                return Err(fidl::Error::InvalidBitsValue);
2303            }
2304            encoder.write_num(self.bits(), offset);
2305            Ok(())
2306        }
2307    }
2308
2309    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceFlags {
2310        #[inline(always)]
2311        fn new_empty() -> Self {
2312            Self::empty()
2313        }
2314
2315        #[inline]
2316        unsafe fn decode(
2317            &mut self,
2318            decoder: &mut fidl::encoding::Decoder<'_, D>,
2319            offset: usize,
2320            _depth: fidl::encoding::Depth,
2321        ) -> fidl::Result<()> {
2322            decoder.debug_check_bounds::<Self>(offset);
2323            let prim = decoder.read_num::<u16>(offset);
2324            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2325            Ok(())
2326        }
2327    }
2328    unsafe impl fidl::encoding::TypeMarker for RecvMsgFlags {
2329        type Owned = Self;
2330
2331        #[inline(always)]
2332        fn inline_align(_context: fidl::encoding::Context) -> usize {
2333            2
2334        }
2335
2336        #[inline(always)]
2337        fn inline_size(_context: fidl::encoding::Context) -> usize {
2338            2
2339        }
2340    }
2341
2342    impl fidl::encoding::ValueTypeMarker for RecvMsgFlags {
2343        type Borrowed<'a> = Self;
2344        #[inline(always)]
2345        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2346            *value
2347        }
2348    }
2349
2350    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RecvMsgFlags {
2351        #[inline]
2352        unsafe fn encode(
2353            self,
2354            encoder: &mut fidl::encoding::Encoder<'_, D>,
2355            offset: usize,
2356            _depth: fidl::encoding::Depth,
2357        ) -> fidl::Result<()> {
2358            encoder.debug_check_bounds::<Self>(offset);
2359            if self.bits() & Self::all().bits() != self.bits() {
2360                return Err(fidl::Error::InvalidBitsValue);
2361            }
2362            encoder.write_num(self.bits(), offset);
2363            Ok(())
2364        }
2365    }
2366
2367    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecvMsgFlags {
2368        #[inline(always)]
2369        fn new_empty() -> Self {
2370            Self::empty()
2371        }
2372
2373        #[inline]
2374        unsafe fn decode(
2375            &mut self,
2376            decoder: &mut fidl::encoding::Decoder<'_, D>,
2377            offset: usize,
2378            _depth: fidl::encoding::Depth,
2379        ) -> fidl::Result<()> {
2380            decoder.debug_check_bounds::<Self>(offset);
2381            let prim = decoder.read_num::<u16>(offset);
2382            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2383            Ok(())
2384        }
2385    }
2386    unsafe impl fidl::encoding::TypeMarker for SendMsgFlags {
2387        type Owned = Self;
2388
2389        #[inline(always)]
2390        fn inline_align(_context: fidl::encoding::Context) -> usize {
2391            2
2392        }
2393
2394        #[inline(always)]
2395        fn inline_size(_context: fidl::encoding::Context) -> usize {
2396            2
2397        }
2398    }
2399
2400    impl fidl::encoding::ValueTypeMarker for SendMsgFlags {
2401        type Borrowed<'a> = Self;
2402        #[inline(always)]
2403        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2404            *value
2405        }
2406    }
2407
2408    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SendMsgFlags {
2409        #[inline]
2410        unsafe fn encode(
2411            self,
2412            encoder: &mut fidl::encoding::Encoder<'_, D>,
2413            offset: usize,
2414            _depth: fidl::encoding::Depth,
2415        ) -> fidl::Result<()> {
2416            encoder.debug_check_bounds::<Self>(offset);
2417            if self.bits() & Self::all().bits() != self.bits() {
2418                return Err(fidl::Error::InvalidBitsValue);
2419            }
2420            encoder.write_num(self.bits(), offset);
2421            Ok(())
2422        }
2423    }
2424
2425    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SendMsgFlags {
2426        #[inline(always)]
2427        fn new_empty() -> Self {
2428            Self::empty()
2429        }
2430
2431        #[inline]
2432        unsafe fn decode(
2433            &mut self,
2434            decoder: &mut fidl::encoding::Decoder<'_, D>,
2435            offset: usize,
2436            _depth: fidl::encoding::Depth,
2437        ) -> fidl::Result<()> {
2438            decoder.debug_check_bounds::<Self>(offset);
2439            let prim = decoder.read_num::<u16>(offset);
2440            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2441            Ok(())
2442        }
2443    }
2444    unsafe impl fidl::encoding::TypeMarker for ShutdownMode {
2445        type Owned = Self;
2446
2447        #[inline(always)]
2448        fn inline_align(_context: fidl::encoding::Context) -> usize {
2449            2
2450        }
2451
2452        #[inline(always)]
2453        fn inline_size(_context: fidl::encoding::Context) -> usize {
2454            2
2455        }
2456    }
2457
2458    impl fidl::encoding::ValueTypeMarker for ShutdownMode {
2459        type Borrowed<'a> = Self;
2460        #[inline(always)]
2461        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2462            *value
2463        }
2464    }
2465
2466    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ShutdownMode {
2467        #[inline]
2468        unsafe fn encode(
2469            self,
2470            encoder: &mut fidl::encoding::Encoder<'_, D>,
2471            offset: usize,
2472            _depth: fidl::encoding::Depth,
2473        ) -> fidl::Result<()> {
2474            encoder.debug_check_bounds::<Self>(offset);
2475            if self.bits() & Self::all().bits() != self.bits() {
2476                return Err(fidl::Error::InvalidBitsValue);
2477            }
2478            encoder.write_num(self.bits(), offset);
2479            Ok(())
2480        }
2481    }
2482
2483    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ShutdownMode {
2484        #[inline(always)]
2485        fn new_empty() -> Self {
2486            Self::empty()
2487        }
2488
2489        #[inline]
2490        unsafe fn decode(
2491            &mut self,
2492            decoder: &mut fidl::encoding::Decoder<'_, D>,
2493            offset: usize,
2494            _depth: fidl::encoding::Depth,
2495        ) -> fidl::Result<()> {
2496            decoder.debug_check_bounds::<Self>(offset);
2497            let prim = decoder.read_num::<u16>(offset);
2498            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2499            Ok(())
2500        }
2501    }
2502    unsafe impl fidl::encoding::TypeMarker for DatagramSocketProtocol {
2503        type Owned = Self;
2504
2505        #[inline(always)]
2506        fn inline_align(_context: fidl::encoding::Context) -> usize {
2507            std::mem::align_of::<u32>()
2508        }
2509
2510        #[inline(always)]
2511        fn inline_size(_context: fidl::encoding::Context) -> usize {
2512            std::mem::size_of::<u32>()
2513        }
2514
2515        #[inline(always)]
2516        fn encode_is_copy() -> bool {
2517            true
2518        }
2519
2520        #[inline(always)]
2521        fn decode_is_copy() -> bool {
2522            false
2523        }
2524    }
2525
2526    impl fidl::encoding::ValueTypeMarker for DatagramSocketProtocol {
2527        type Borrowed<'a> = Self;
2528        #[inline(always)]
2529        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2530            *value
2531        }
2532    }
2533
2534    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2535        for DatagramSocketProtocol
2536    {
2537        #[inline]
2538        unsafe fn encode(
2539            self,
2540            encoder: &mut fidl::encoding::Encoder<'_, D>,
2541            offset: usize,
2542            _depth: fidl::encoding::Depth,
2543        ) -> fidl::Result<()> {
2544            encoder.debug_check_bounds::<Self>(offset);
2545            encoder.write_num(self.into_primitive(), offset);
2546            Ok(())
2547        }
2548    }
2549
2550    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2551        for DatagramSocketProtocol
2552    {
2553        #[inline(always)]
2554        fn new_empty() -> Self {
2555            Self::Udp
2556        }
2557
2558        #[inline]
2559        unsafe fn decode(
2560            &mut self,
2561            decoder: &mut fidl::encoding::Decoder<'_, D>,
2562            offset: usize,
2563            _depth: fidl::encoding::Depth,
2564        ) -> fidl::Result<()> {
2565            decoder.debug_check_bounds::<Self>(offset);
2566            let prim = decoder.read_num::<u32>(offset);
2567
2568            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2569            Ok(())
2570        }
2571    }
2572    unsafe impl fidl::encoding::TypeMarker for Domain {
2573        type Owned = Self;
2574
2575        #[inline(always)]
2576        fn inline_align(_context: fidl::encoding::Context) -> usize {
2577            std::mem::align_of::<i16>()
2578        }
2579
2580        #[inline(always)]
2581        fn inline_size(_context: fidl::encoding::Context) -> usize {
2582            std::mem::size_of::<i16>()
2583        }
2584
2585        #[inline(always)]
2586        fn encode_is_copy() -> bool {
2587            true
2588        }
2589
2590        #[inline(always)]
2591        fn decode_is_copy() -> bool {
2592            false
2593        }
2594    }
2595
2596    impl fidl::encoding::ValueTypeMarker for Domain {
2597        type Borrowed<'a> = Self;
2598        #[inline(always)]
2599        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2600            *value
2601        }
2602    }
2603
2604    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Domain {
2605        #[inline]
2606        unsafe fn encode(
2607            self,
2608            encoder: &mut fidl::encoding::Encoder<'_, D>,
2609            offset: usize,
2610            _depth: fidl::encoding::Depth,
2611        ) -> fidl::Result<()> {
2612            encoder.debug_check_bounds::<Self>(offset);
2613            encoder.write_num(self.into_primitive(), offset);
2614            Ok(())
2615        }
2616    }
2617
2618    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Domain {
2619        #[inline(always)]
2620        fn new_empty() -> Self {
2621            Self::Ipv4
2622        }
2623
2624        #[inline]
2625        unsafe fn decode(
2626            &mut self,
2627            decoder: &mut fidl::encoding::Decoder<'_, D>,
2628            offset: usize,
2629            _depth: fidl::encoding::Depth,
2630        ) -> fidl::Result<()> {
2631            decoder.debug_check_bounds::<Self>(offset);
2632            let prim = decoder.read_num::<i16>(offset);
2633
2634            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2635            Ok(())
2636        }
2637    }
2638    unsafe impl fidl::encoding::TypeMarker for StreamSocketProtocol {
2639        type Owned = Self;
2640
2641        #[inline(always)]
2642        fn inline_align(_context: fidl::encoding::Context) -> usize {
2643            std::mem::align_of::<u32>()
2644        }
2645
2646        #[inline(always)]
2647        fn inline_size(_context: fidl::encoding::Context) -> usize {
2648            std::mem::size_of::<u32>()
2649        }
2650
2651        #[inline(always)]
2652        fn encode_is_copy() -> bool {
2653            true
2654        }
2655
2656        #[inline(always)]
2657        fn decode_is_copy() -> bool {
2658            false
2659        }
2660    }
2661
2662    impl fidl::encoding::ValueTypeMarker for StreamSocketProtocol {
2663        type Borrowed<'a> = Self;
2664        #[inline(always)]
2665        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2666            *value
2667        }
2668    }
2669
2670    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2671        for StreamSocketProtocol
2672    {
2673        #[inline]
2674        unsafe fn encode(
2675            self,
2676            encoder: &mut fidl::encoding::Encoder<'_, D>,
2677            offset: usize,
2678            _depth: fidl::encoding::Depth,
2679        ) -> fidl::Result<()> {
2680            encoder.debug_check_bounds::<Self>(offset);
2681            encoder.write_num(self.into_primitive(), offset);
2682            Ok(())
2683        }
2684    }
2685
2686    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StreamSocketProtocol {
2687        #[inline(always)]
2688        fn new_empty() -> Self {
2689            Self::Tcp
2690        }
2691
2692        #[inline]
2693        unsafe fn decode(
2694            &mut self,
2695            decoder: &mut fidl::encoding::Decoder<'_, D>,
2696            offset: usize,
2697            _depth: fidl::encoding::Depth,
2698        ) -> fidl::Result<()> {
2699            decoder.debug_check_bounds::<Self>(offset);
2700            let prim = decoder.read_num::<u32>(offset);
2701
2702            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2703            Ok(())
2704        }
2705    }
2706    unsafe impl fidl::encoding::TypeMarker for TcpCongestionControl {
2707        type Owned = Self;
2708
2709        #[inline(always)]
2710        fn inline_align(_context: fidl::encoding::Context) -> usize {
2711            std::mem::align_of::<u32>()
2712        }
2713
2714        #[inline(always)]
2715        fn inline_size(_context: fidl::encoding::Context) -> usize {
2716            std::mem::size_of::<u32>()
2717        }
2718
2719        #[inline(always)]
2720        fn encode_is_copy() -> bool {
2721            true
2722        }
2723
2724        #[inline(always)]
2725        fn decode_is_copy() -> bool {
2726            false
2727        }
2728    }
2729
2730    impl fidl::encoding::ValueTypeMarker for TcpCongestionControl {
2731        type Borrowed<'a> = Self;
2732        #[inline(always)]
2733        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2734            *value
2735        }
2736    }
2737
2738    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2739        for TcpCongestionControl
2740    {
2741        #[inline]
2742        unsafe fn encode(
2743            self,
2744            encoder: &mut fidl::encoding::Encoder<'_, D>,
2745            offset: usize,
2746            _depth: fidl::encoding::Depth,
2747        ) -> fidl::Result<()> {
2748            encoder.debug_check_bounds::<Self>(offset);
2749            encoder.write_num(self.into_primitive(), offset);
2750            Ok(())
2751        }
2752    }
2753
2754    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TcpCongestionControl {
2755        #[inline(always)]
2756        fn new_empty() -> Self {
2757            Self::Reno
2758        }
2759
2760        #[inline]
2761        unsafe fn decode(
2762            &mut self,
2763            decoder: &mut fidl::encoding::Decoder<'_, D>,
2764            offset: usize,
2765            _depth: fidl::encoding::Depth,
2766        ) -> fidl::Result<()> {
2767            decoder.debug_check_bounds::<Self>(offset);
2768            let prim = decoder.read_num::<u32>(offset);
2769
2770            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2771            Ok(())
2772        }
2773    }
2774    unsafe impl fidl::encoding::TypeMarker for TcpCongestionControlState {
2775        type Owned = Self;
2776
2777        #[inline(always)]
2778        fn inline_align(_context: fidl::encoding::Context) -> usize {
2779            std::mem::align_of::<u32>()
2780        }
2781
2782        #[inline(always)]
2783        fn inline_size(_context: fidl::encoding::Context) -> usize {
2784            std::mem::size_of::<u32>()
2785        }
2786
2787        #[inline(always)]
2788        fn encode_is_copy() -> bool {
2789            true
2790        }
2791
2792        #[inline(always)]
2793        fn decode_is_copy() -> bool {
2794            false
2795        }
2796    }
2797
2798    impl fidl::encoding::ValueTypeMarker for TcpCongestionControlState {
2799        type Borrowed<'a> = Self;
2800        #[inline(always)]
2801        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2802            *value
2803        }
2804    }
2805
2806    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2807        for TcpCongestionControlState
2808    {
2809        #[inline]
2810        unsafe fn encode(
2811            self,
2812            encoder: &mut fidl::encoding::Encoder<'_, D>,
2813            offset: usize,
2814            _depth: fidl::encoding::Depth,
2815        ) -> fidl::Result<()> {
2816            encoder.debug_check_bounds::<Self>(offset);
2817            encoder.write_num(self.into_primitive(), offset);
2818            Ok(())
2819        }
2820    }
2821
2822    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2823        for TcpCongestionControlState
2824    {
2825        #[inline(always)]
2826        fn new_empty() -> Self {
2827            Self::Open
2828        }
2829
2830        #[inline]
2831        unsafe fn decode(
2832            &mut self,
2833            decoder: &mut fidl::encoding::Decoder<'_, D>,
2834            offset: usize,
2835            _depth: fidl::encoding::Depth,
2836        ) -> fidl::Result<()> {
2837            decoder.debug_check_bounds::<Self>(offset);
2838            let prim = decoder.read_num::<u32>(offset);
2839
2840            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2841            Ok(())
2842        }
2843    }
2844    unsafe impl fidl::encoding::TypeMarker for TcpState {
2845        type Owned = Self;
2846
2847        #[inline(always)]
2848        fn inline_align(_context: fidl::encoding::Context) -> usize {
2849            std::mem::align_of::<u32>()
2850        }
2851
2852        #[inline(always)]
2853        fn inline_size(_context: fidl::encoding::Context) -> usize {
2854            std::mem::size_of::<u32>()
2855        }
2856
2857        #[inline(always)]
2858        fn encode_is_copy() -> bool {
2859            true
2860        }
2861
2862        #[inline(always)]
2863        fn decode_is_copy() -> bool {
2864            false
2865        }
2866    }
2867
2868    impl fidl::encoding::ValueTypeMarker for TcpState {
2869        type Borrowed<'a> = Self;
2870        #[inline(always)]
2871        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2872            *value
2873        }
2874    }
2875
2876    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for TcpState {
2877        #[inline]
2878        unsafe fn encode(
2879            self,
2880            encoder: &mut fidl::encoding::Encoder<'_, D>,
2881            offset: usize,
2882            _depth: fidl::encoding::Depth,
2883        ) -> fidl::Result<()> {
2884            encoder.debug_check_bounds::<Self>(offset);
2885            encoder.write_num(self.into_primitive(), offset);
2886            Ok(())
2887        }
2888    }
2889
2890    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TcpState {
2891        #[inline(always)]
2892        fn new_empty() -> Self {
2893            Self::Established
2894        }
2895
2896        #[inline]
2897        unsafe fn decode(
2898            &mut self,
2899            decoder: &mut fidl::encoding::Decoder<'_, D>,
2900            offset: usize,
2901            _depth: fidl::encoding::Depth,
2902        ) -> fidl::Result<()> {
2903            decoder.debug_check_bounds::<Self>(offset);
2904            let prim = decoder.read_num::<u32>(offset);
2905
2906            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2907            Ok(())
2908        }
2909    }
2910    unsafe impl fidl::encoding::TypeMarker for TimestampOption {
2911        type Owned = Self;
2912
2913        #[inline(always)]
2914        fn inline_align(_context: fidl::encoding::Context) -> usize {
2915            std::mem::align_of::<u32>()
2916        }
2917
2918        #[inline(always)]
2919        fn inline_size(_context: fidl::encoding::Context) -> usize {
2920            std::mem::size_of::<u32>()
2921        }
2922
2923        #[inline(always)]
2924        fn encode_is_copy() -> bool {
2925            true
2926        }
2927
2928        #[inline(always)]
2929        fn decode_is_copy() -> bool {
2930            false
2931        }
2932    }
2933
2934    impl fidl::encoding::ValueTypeMarker for TimestampOption {
2935        type Borrowed<'a> = Self;
2936        #[inline(always)]
2937        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2938            *value
2939        }
2940    }
2941
2942    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2943        for TimestampOption
2944    {
2945        #[inline]
2946        unsafe fn encode(
2947            self,
2948            encoder: &mut fidl::encoding::Encoder<'_, D>,
2949            offset: usize,
2950            _depth: fidl::encoding::Depth,
2951        ) -> fidl::Result<()> {
2952            encoder.debug_check_bounds::<Self>(offset);
2953            encoder.write_num(self.into_primitive(), offset);
2954            Ok(())
2955        }
2956    }
2957
2958    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TimestampOption {
2959        #[inline(always)]
2960        fn new_empty() -> Self {
2961            Self::Disabled
2962        }
2963
2964        #[inline]
2965        unsafe fn decode(
2966            &mut self,
2967            decoder: &mut fidl::encoding::Decoder<'_, D>,
2968            offset: usize,
2969            _depth: fidl::encoding::Depth,
2970        ) -> fidl::Result<()> {
2971            decoder.debug_check_bounds::<Self>(offset);
2972            let prim = decoder.read_num::<u32>(offset);
2973
2974            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2975            Ok(())
2976        }
2977    }
2978    unsafe impl fidl::encoding::TypeMarker for UdpMetadataEncodingProtocolVersion {
2979        type Owned = Self;
2980
2981        #[inline(always)]
2982        fn inline_align(_context: fidl::encoding::Context) -> usize {
2983            std::mem::align_of::<u16>()
2984        }
2985
2986        #[inline(always)]
2987        fn inline_size(_context: fidl::encoding::Context) -> usize {
2988            std::mem::size_of::<u16>()
2989        }
2990
2991        #[inline(always)]
2992        fn encode_is_copy() -> bool {
2993            false
2994        }
2995
2996        #[inline(always)]
2997        fn decode_is_copy() -> bool {
2998            false
2999        }
3000    }
3001
3002    impl fidl::encoding::ValueTypeMarker for UdpMetadataEncodingProtocolVersion {
3003        type Borrowed<'a> = Self;
3004        #[inline(always)]
3005        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3006            *value
3007        }
3008    }
3009
3010    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
3011        for UdpMetadataEncodingProtocolVersion
3012    {
3013        #[inline]
3014        unsafe fn encode(
3015            self,
3016            encoder: &mut fidl::encoding::Encoder<'_, D>,
3017            offset: usize,
3018            _depth: fidl::encoding::Depth,
3019        ) -> fidl::Result<()> {
3020            encoder.debug_check_bounds::<Self>(offset);
3021            encoder.write_num(self.into_primitive(), offset);
3022            Ok(())
3023        }
3024    }
3025
3026    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3027        for UdpMetadataEncodingProtocolVersion
3028    {
3029        #[inline(always)]
3030        fn new_empty() -> Self {
3031            Self::unknown()
3032        }
3033
3034        #[inline]
3035        unsafe fn decode(
3036            &mut self,
3037            decoder: &mut fidl::encoding::Decoder<'_, D>,
3038            offset: usize,
3039            _depth: fidl::encoding::Depth,
3040        ) -> fidl::Result<()> {
3041            decoder.debug_check_bounds::<Self>(offset);
3042            let prim = decoder.read_num::<u16>(offset);
3043
3044            *self = Self::from_primitive_allow_unknown(prim);
3045            Ok(())
3046        }
3047    }
3048
3049    impl fidl::encoding::ValueTypeMarker for BaseDatagramSocketGetInfoResponse {
3050        type Borrowed<'a> = &'a Self;
3051        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3052            value
3053        }
3054    }
3055
3056    unsafe impl fidl::encoding::TypeMarker for BaseDatagramSocketGetInfoResponse {
3057        type Owned = Self;
3058
3059        #[inline(always)]
3060        fn inline_align(_context: fidl::encoding::Context) -> usize {
3061            4
3062        }
3063
3064        #[inline(always)]
3065        fn inline_size(_context: fidl::encoding::Context) -> usize {
3066            8
3067        }
3068    }
3069
3070    unsafe impl<D: fidl::encoding::ResourceDialect>
3071        fidl::encoding::Encode<BaseDatagramSocketGetInfoResponse, D>
3072        for &BaseDatagramSocketGetInfoResponse
3073    {
3074        #[inline]
3075        unsafe fn encode(
3076            self,
3077            encoder: &mut fidl::encoding::Encoder<'_, D>,
3078            offset: usize,
3079            _depth: fidl::encoding::Depth,
3080        ) -> fidl::Result<()> {
3081            encoder.debug_check_bounds::<BaseDatagramSocketGetInfoResponse>(offset);
3082            // Delegate to tuple encoding.
3083            fidl::encoding::Encode::<BaseDatagramSocketGetInfoResponse, D>::encode(
3084                (
3085                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
3086                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
3087                        &self.proto,
3088                    ),
3089                ),
3090                encoder,
3091                offset,
3092                _depth,
3093            )
3094        }
3095    }
3096    unsafe impl<
3097            D: fidl::encoding::ResourceDialect,
3098            T0: fidl::encoding::Encode<Domain, D>,
3099            T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
3100        > fidl::encoding::Encode<BaseDatagramSocketGetInfoResponse, D> for (T0, T1)
3101    {
3102        #[inline]
3103        unsafe fn encode(
3104            self,
3105            encoder: &mut fidl::encoding::Encoder<'_, D>,
3106            offset: usize,
3107            depth: fidl::encoding::Depth,
3108        ) -> fidl::Result<()> {
3109            encoder.debug_check_bounds::<BaseDatagramSocketGetInfoResponse>(offset);
3110            // Zero out padding regions. There's no need to apply masks
3111            // because the unmasked parts will be overwritten by fields.
3112            unsafe {
3113                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3114                (ptr as *mut u32).write_unaligned(0);
3115            }
3116            // Write the fields.
3117            self.0.encode(encoder, offset + 0, depth)?;
3118            self.1.encode(encoder, offset + 4, depth)?;
3119            Ok(())
3120        }
3121    }
3122
3123    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3124        for BaseDatagramSocketGetInfoResponse
3125    {
3126        #[inline(always)]
3127        fn new_empty() -> Self {
3128            Self {
3129                domain: fidl::new_empty!(Domain, D),
3130                proto: fidl::new_empty!(DatagramSocketProtocol, D),
3131            }
3132        }
3133
3134        #[inline]
3135        unsafe fn decode(
3136            &mut self,
3137            decoder: &mut fidl::encoding::Decoder<'_, D>,
3138            offset: usize,
3139            _depth: fidl::encoding::Depth,
3140        ) -> fidl::Result<()> {
3141            decoder.debug_check_bounds::<Self>(offset);
3142            // Verify that padding bytes are zero.
3143            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3144            let padval = unsafe { (ptr as *const u32).read_unaligned() };
3145            let mask = 0xffff0000u32;
3146            let maskedval = padval & mask;
3147            if maskedval != 0 {
3148                return Err(fidl::Error::NonZeroPadding {
3149                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3150                });
3151            }
3152            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
3153            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
3154            Ok(())
3155        }
3156    }
3157
3158    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketAddIpMembershipRequest {
3159        type Borrowed<'a> = &'a Self;
3160        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3161            value
3162        }
3163    }
3164
3165    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketAddIpMembershipRequest {
3166        type Owned = Self;
3167
3168        #[inline(always)]
3169        fn inline_align(_context: fidl::encoding::Context) -> usize {
3170            8
3171        }
3172
3173        #[inline(always)]
3174        fn inline_size(_context: fidl::encoding::Context) -> usize {
3175            16
3176        }
3177    }
3178
3179    unsafe impl<D: fidl::encoding::ResourceDialect>
3180        fidl::encoding::Encode<BaseNetworkSocketAddIpMembershipRequest, D>
3181        for &BaseNetworkSocketAddIpMembershipRequest
3182    {
3183        #[inline]
3184        unsafe fn encode(
3185            self,
3186            encoder: &mut fidl::encoding::Encoder<'_, D>,
3187            offset: usize,
3188            _depth: fidl::encoding::Depth,
3189        ) -> fidl::Result<()> {
3190            encoder.debug_check_bounds::<BaseNetworkSocketAddIpMembershipRequest>(offset);
3191            // Delegate to tuple encoding.
3192            fidl::encoding::Encode::<BaseNetworkSocketAddIpMembershipRequest, D>::encode(
3193                (<IpMulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3194                    &self.membership,
3195                ),),
3196                encoder,
3197                offset,
3198                _depth,
3199            )
3200        }
3201    }
3202    unsafe impl<
3203            D: fidl::encoding::ResourceDialect,
3204            T0: fidl::encoding::Encode<IpMulticastMembership, D>,
3205        > fidl::encoding::Encode<BaseNetworkSocketAddIpMembershipRequest, D> for (T0,)
3206    {
3207        #[inline]
3208        unsafe fn encode(
3209            self,
3210            encoder: &mut fidl::encoding::Encoder<'_, D>,
3211            offset: usize,
3212            depth: fidl::encoding::Depth,
3213        ) -> fidl::Result<()> {
3214            encoder.debug_check_bounds::<BaseNetworkSocketAddIpMembershipRequest>(offset);
3215            // Zero out padding regions. There's no need to apply masks
3216            // because the unmasked parts will be overwritten by fields.
3217            // Write the fields.
3218            self.0.encode(encoder, offset + 0, depth)?;
3219            Ok(())
3220        }
3221    }
3222
3223    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3224        for BaseNetworkSocketAddIpMembershipRequest
3225    {
3226        #[inline(always)]
3227        fn new_empty() -> Self {
3228            Self { membership: fidl::new_empty!(IpMulticastMembership, D) }
3229        }
3230
3231        #[inline]
3232        unsafe fn decode(
3233            &mut self,
3234            decoder: &mut fidl::encoding::Decoder<'_, D>,
3235            offset: usize,
3236            _depth: fidl::encoding::Depth,
3237        ) -> fidl::Result<()> {
3238            decoder.debug_check_bounds::<Self>(offset);
3239            // Verify that padding bytes are zero.
3240            fidl::decode!(
3241                IpMulticastMembership,
3242                D,
3243                &mut self.membership,
3244                decoder,
3245                offset + 0,
3246                _depth
3247            )?;
3248            Ok(())
3249        }
3250    }
3251
3252    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketAddIpv6MembershipRequest {
3253        type Borrowed<'a> = &'a Self;
3254        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3255            value
3256        }
3257    }
3258
3259    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketAddIpv6MembershipRequest {
3260        type Owned = Self;
3261
3262        #[inline(always)]
3263        fn inline_align(_context: fidl::encoding::Context) -> usize {
3264            8
3265        }
3266
3267        #[inline(always)]
3268        fn inline_size(_context: fidl::encoding::Context) -> usize {
3269            24
3270        }
3271    }
3272
3273    unsafe impl<D: fidl::encoding::ResourceDialect>
3274        fidl::encoding::Encode<BaseNetworkSocketAddIpv6MembershipRequest, D>
3275        for &BaseNetworkSocketAddIpv6MembershipRequest
3276    {
3277        #[inline]
3278        unsafe fn encode(
3279            self,
3280            encoder: &mut fidl::encoding::Encoder<'_, D>,
3281            offset: usize,
3282            _depth: fidl::encoding::Depth,
3283        ) -> fidl::Result<()> {
3284            encoder.debug_check_bounds::<BaseNetworkSocketAddIpv6MembershipRequest>(offset);
3285            // Delegate to tuple encoding.
3286            fidl::encoding::Encode::<BaseNetworkSocketAddIpv6MembershipRequest, D>::encode(
3287                (<Ipv6MulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3288                    &self.membership,
3289                ),),
3290                encoder,
3291                offset,
3292                _depth,
3293            )
3294        }
3295    }
3296    unsafe impl<
3297            D: fidl::encoding::ResourceDialect,
3298            T0: fidl::encoding::Encode<Ipv6MulticastMembership, D>,
3299        > fidl::encoding::Encode<BaseNetworkSocketAddIpv6MembershipRequest, D> for (T0,)
3300    {
3301        #[inline]
3302        unsafe fn encode(
3303            self,
3304            encoder: &mut fidl::encoding::Encoder<'_, D>,
3305            offset: usize,
3306            depth: fidl::encoding::Depth,
3307        ) -> fidl::Result<()> {
3308            encoder.debug_check_bounds::<BaseNetworkSocketAddIpv6MembershipRequest>(offset);
3309            // Zero out padding regions. There's no need to apply masks
3310            // because the unmasked parts will be overwritten by fields.
3311            // Write the fields.
3312            self.0.encode(encoder, offset + 0, depth)?;
3313            Ok(())
3314        }
3315    }
3316
3317    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3318        for BaseNetworkSocketAddIpv6MembershipRequest
3319    {
3320        #[inline(always)]
3321        fn new_empty() -> Self {
3322            Self { membership: fidl::new_empty!(Ipv6MulticastMembership, D) }
3323        }
3324
3325        #[inline]
3326        unsafe fn decode(
3327            &mut self,
3328            decoder: &mut fidl::encoding::Decoder<'_, D>,
3329            offset: usize,
3330            _depth: fidl::encoding::Depth,
3331        ) -> fidl::Result<()> {
3332            decoder.debug_check_bounds::<Self>(offset);
3333            // Verify that padding bytes are zero.
3334            fidl::decode!(
3335                Ipv6MulticastMembership,
3336                D,
3337                &mut self.membership,
3338                decoder,
3339                offset + 0,
3340                _depth
3341            )?;
3342            Ok(())
3343        }
3344    }
3345
3346    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketBindRequest {
3347        type Borrowed<'a> = &'a Self;
3348        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3349            value
3350        }
3351    }
3352
3353    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketBindRequest {
3354        type Owned = Self;
3355
3356        #[inline(always)]
3357        fn inline_align(_context: fidl::encoding::Context) -> usize {
3358            8
3359        }
3360
3361        #[inline(always)]
3362        fn inline_size(_context: fidl::encoding::Context) -> usize {
3363            16
3364        }
3365    }
3366
3367    unsafe impl<D: fidl::encoding::ResourceDialect>
3368        fidl::encoding::Encode<BaseNetworkSocketBindRequest, D> for &BaseNetworkSocketBindRequest
3369    {
3370        #[inline]
3371        unsafe fn encode(
3372            self,
3373            encoder: &mut fidl::encoding::Encoder<'_, D>,
3374            offset: usize,
3375            _depth: fidl::encoding::Depth,
3376        ) -> fidl::Result<()> {
3377            encoder.debug_check_bounds::<BaseNetworkSocketBindRequest>(offset);
3378            // Delegate to tuple encoding.
3379            fidl::encoding::Encode::<BaseNetworkSocketBindRequest, D>::encode(
3380                (
3381                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
3382                ),
3383                encoder, offset, _depth
3384            )
3385        }
3386    }
3387    unsafe impl<
3388            D: fidl::encoding::ResourceDialect,
3389            T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
3390        > fidl::encoding::Encode<BaseNetworkSocketBindRequest, D> for (T0,)
3391    {
3392        #[inline]
3393        unsafe fn encode(
3394            self,
3395            encoder: &mut fidl::encoding::Encoder<'_, D>,
3396            offset: usize,
3397            depth: fidl::encoding::Depth,
3398        ) -> fidl::Result<()> {
3399            encoder.debug_check_bounds::<BaseNetworkSocketBindRequest>(offset);
3400            // Zero out padding regions. There's no need to apply masks
3401            // because the unmasked parts will be overwritten by fields.
3402            // Write the fields.
3403            self.0.encode(encoder, offset + 0, depth)?;
3404            Ok(())
3405        }
3406    }
3407
3408    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3409        for BaseNetworkSocketBindRequest
3410    {
3411        #[inline(always)]
3412        fn new_empty() -> Self {
3413            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
3414        }
3415
3416        #[inline]
3417        unsafe fn decode(
3418            &mut self,
3419            decoder: &mut fidl::encoding::Decoder<'_, D>,
3420            offset: usize,
3421            _depth: fidl::encoding::Depth,
3422        ) -> fidl::Result<()> {
3423            decoder.debug_check_bounds::<Self>(offset);
3424            // Verify that padding bytes are zero.
3425            fidl::decode!(
3426                fidl_fuchsia_net__common::SocketAddress,
3427                D,
3428                &mut self.addr,
3429                decoder,
3430                offset + 0,
3431                _depth
3432            )?;
3433            Ok(())
3434        }
3435    }
3436
3437    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketConnectRequest {
3438        type Borrowed<'a> = &'a Self;
3439        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3440            value
3441        }
3442    }
3443
3444    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketConnectRequest {
3445        type Owned = Self;
3446
3447        #[inline(always)]
3448        fn inline_align(_context: fidl::encoding::Context) -> usize {
3449            8
3450        }
3451
3452        #[inline(always)]
3453        fn inline_size(_context: fidl::encoding::Context) -> usize {
3454            16
3455        }
3456    }
3457
3458    unsafe impl<D: fidl::encoding::ResourceDialect>
3459        fidl::encoding::Encode<BaseNetworkSocketConnectRequest, D>
3460        for &BaseNetworkSocketConnectRequest
3461    {
3462        #[inline]
3463        unsafe fn encode(
3464            self,
3465            encoder: &mut fidl::encoding::Encoder<'_, D>,
3466            offset: usize,
3467            _depth: fidl::encoding::Depth,
3468        ) -> fidl::Result<()> {
3469            encoder.debug_check_bounds::<BaseNetworkSocketConnectRequest>(offset);
3470            // Delegate to tuple encoding.
3471            fidl::encoding::Encode::<BaseNetworkSocketConnectRequest, D>::encode(
3472                (
3473                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
3474                ),
3475                encoder, offset, _depth
3476            )
3477        }
3478    }
3479    unsafe impl<
3480            D: fidl::encoding::ResourceDialect,
3481            T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
3482        > fidl::encoding::Encode<BaseNetworkSocketConnectRequest, D> for (T0,)
3483    {
3484        #[inline]
3485        unsafe fn encode(
3486            self,
3487            encoder: &mut fidl::encoding::Encoder<'_, D>,
3488            offset: usize,
3489            depth: fidl::encoding::Depth,
3490        ) -> fidl::Result<()> {
3491            encoder.debug_check_bounds::<BaseNetworkSocketConnectRequest>(offset);
3492            // Zero out padding regions. There's no need to apply masks
3493            // because the unmasked parts will be overwritten by fields.
3494            // Write the fields.
3495            self.0.encode(encoder, offset + 0, depth)?;
3496            Ok(())
3497        }
3498    }
3499
3500    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3501        for BaseNetworkSocketConnectRequest
3502    {
3503        #[inline(always)]
3504        fn new_empty() -> Self {
3505            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
3506        }
3507
3508        #[inline]
3509        unsafe fn decode(
3510            &mut self,
3511            decoder: &mut fidl::encoding::Decoder<'_, D>,
3512            offset: usize,
3513            _depth: fidl::encoding::Depth,
3514        ) -> fidl::Result<()> {
3515            decoder.debug_check_bounds::<Self>(offset);
3516            // Verify that padding bytes are zero.
3517            fidl::decode!(
3518                fidl_fuchsia_net__common::SocketAddress,
3519                D,
3520                &mut self.addr,
3521                decoder,
3522                offset + 0,
3523                _depth
3524            )?;
3525            Ok(())
3526        }
3527    }
3528
3529    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketDropIpMembershipRequest {
3530        type Borrowed<'a> = &'a Self;
3531        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3532            value
3533        }
3534    }
3535
3536    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketDropIpMembershipRequest {
3537        type Owned = Self;
3538
3539        #[inline(always)]
3540        fn inline_align(_context: fidl::encoding::Context) -> usize {
3541            8
3542        }
3543
3544        #[inline(always)]
3545        fn inline_size(_context: fidl::encoding::Context) -> usize {
3546            16
3547        }
3548    }
3549
3550    unsafe impl<D: fidl::encoding::ResourceDialect>
3551        fidl::encoding::Encode<BaseNetworkSocketDropIpMembershipRequest, D>
3552        for &BaseNetworkSocketDropIpMembershipRequest
3553    {
3554        #[inline]
3555        unsafe fn encode(
3556            self,
3557            encoder: &mut fidl::encoding::Encoder<'_, D>,
3558            offset: usize,
3559            _depth: fidl::encoding::Depth,
3560        ) -> fidl::Result<()> {
3561            encoder.debug_check_bounds::<BaseNetworkSocketDropIpMembershipRequest>(offset);
3562            // Delegate to tuple encoding.
3563            fidl::encoding::Encode::<BaseNetworkSocketDropIpMembershipRequest, D>::encode(
3564                (<IpMulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3565                    &self.membership,
3566                ),),
3567                encoder,
3568                offset,
3569                _depth,
3570            )
3571        }
3572    }
3573    unsafe impl<
3574            D: fidl::encoding::ResourceDialect,
3575            T0: fidl::encoding::Encode<IpMulticastMembership, D>,
3576        > fidl::encoding::Encode<BaseNetworkSocketDropIpMembershipRequest, D> for (T0,)
3577    {
3578        #[inline]
3579        unsafe fn encode(
3580            self,
3581            encoder: &mut fidl::encoding::Encoder<'_, D>,
3582            offset: usize,
3583            depth: fidl::encoding::Depth,
3584        ) -> fidl::Result<()> {
3585            encoder.debug_check_bounds::<BaseNetworkSocketDropIpMembershipRequest>(offset);
3586            // Zero out padding regions. There's no need to apply masks
3587            // because the unmasked parts will be overwritten by fields.
3588            // Write the fields.
3589            self.0.encode(encoder, offset + 0, depth)?;
3590            Ok(())
3591        }
3592    }
3593
3594    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3595        for BaseNetworkSocketDropIpMembershipRequest
3596    {
3597        #[inline(always)]
3598        fn new_empty() -> Self {
3599            Self { membership: fidl::new_empty!(IpMulticastMembership, D) }
3600        }
3601
3602        #[inline]
3603        unsafe fn decode(
3604            &mut self,
3605            decoder: &mut fidl::encoding::Decoder<'_, D>,
3606            offset: usize,
3607            _depth: fidl::encoding::Depth,
3608        ) -> fidl::Result<()> {
3609            decoder.debug_check_bounds::<Self>(offset);
3610            // Verify that padding bytes are zero.
3611            fidl::decode!(
3612                IpMulticastMembership,
3613                D,
3614                &mut self.membership,
3615                decoder,
3616                offset + 0,
3617                _depth
3618            )?;
3619            Ok(())
3620        }
3621    }
3622
3623    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketDropIpv6MembershipRequest {
3624        type Borrowed<'a> = &'a Self;
3625        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3626            value
3627        }
3628    }
3629
3630    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketDropIpv6MembershipRequest {
3631        type Owned = Self;
3632
3633        #[inline(always)]
3634        fn inline_align(_context: fidl::encoding::Context) -> usize {
3635            8
3636        }
3637
3638        #[inline(always)]
3639        fn inline_size(_context: fidl::encoding::Context) -> usize {
3640            24
3641        }
3642    }
3643
3644    unsafe impl<D: fidl::encoding::ResourceDialect>
3645        fidl::encoding::Encode<BaseNetworkSocketDropIpv6MembershipRequest, D>
3646        for &BaseNetworkSocketDropIpv6MembershipRequest
3647    {
3648        #[inline]
3649        unsafe fn encode(
3650            self,
3651            encoder: &mut fidl::encoding::Encoder<'_, D>,
3652            offset: usize,
3653            _depth: fidl::encoding::Depth,
3654        ) -> fidl::Result<()> {
3655            encoder.debug_check_bounds::<BaseNetworkSocketDropIpv6MembershipRequest>(offset);
3656            // Delegate to tuple encoding.
3657            fidl::encoding::Encode::<BaseNetworkSocketDropIpv6MembershipRequest, D>::encode(
3658                (<Ipv6MulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3659                    &self.membership,
3660                ),),
3661                encoder,
3662                offset,
3663                _depth,
3664            )
3665        }
3666    }
3667    unsafe impl<
3668            D: fidl::encoding::ResourceDialect,
3669            T0: fidl::encoding::Encode<Ipv6MulticastMembership, D>,
3670        > fidl::encoding::Encode<BaseNetworkSocketDropIpv6MembershipRequest, D> for (T0,)
3671    {
3672        #[inline]
3673        unsafe fn encode(
3674            self,
3675            encoder: &mut fidl::encoding::Encoder<'_, D>,
3676            offset: usize,
3677            depth: fidl::encoding::Depth,
3678        ) -> fidl::Result<()> {
3679            encoder.debug_check_bounds::<BaseNetworkSocketDropIpv6MembershipRequest>(offset);
3680            // Zero out padding regions. There's no need to apply masks
3681            // because the unmasked parts will be overwritten by fields.
3682            // Write the fields.
3683            self.0.encode(encoder, offset + 0, depth)?;
3684            Ok(())
3685        }
3686    }
3687
3688    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3689        for BaseNetworkSocketDropIpv6MembershipRequest
3690    {
3691        #[inline(always)]
3692        fn new_empty() -> Self {
3693            Self { membership: fidl::new_empty!(Ipv6MulticastMembership, D) }
3694        }
3695
3696        #[inline]
3697        unsafe fn decode(
3698            &mut self,
3699            decoder: &mut fidl::encoding::Decoder<'_, D>,
3700            offset: usize,
3701            _depth: fidl::encoding::Depth,
3702        ) -> fidl::Result<()> {
3703            decoder.debug_check_bounds::<Self>(offset);
3704            // Verify that padding bytes are zero.
3705            fidl::decode!(
3706                Ipv6MulticastMembership,
3707                D,
3708                &mut self.membership,
3709                decoder,
3710                offset + 0,
3711                _depth
3712            )?;
3713            Ok(())
3714        }
3715    }
3716
3717    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastInterfaceRequest {
3718        type Borrowed<'a> = &'a Self;
3719        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3720            value
3721        }
3722    }
3723
3724    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastInterfaceRequest {
3725        type Owned = Self;
3726
3727        #[inline(always)]
3728        fn inline_align(_context: fidl::encoding::Context) -> usize {
3729            8
3730        }
3731
3732        #[inline(always)]
3733        fn inline_size(_context: fidl::encoding::Context) -> usize {
3734            16
3735        }
3736    }
3737
3738    unsafe impl<D: fidl::encoding::ResourceDialect>
3739        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastInterfaceRequest, D>
3740        for &BaseNetworkSocketSetIpMulticastInterfaceRequest
3741    {
3742        #[inline]
3743        unsafe fn encode(
3744            self,
3745            encoder: &mut fidl::encoding::Encoder<'_, D>,
3746            offset: usize,
3747            _depth: fidl::encoding::Depth,
3748        ) -> fidl::Result<()> {
3749            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastInterfaceRequest>(offset);
3750            // Delegate to tuple encoding.
3751            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastInterfaceRequest, D>::encode(
3752                (
3753                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
3754                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.address),
3755                ),
3756                encoder, offset, _depth
3757            )
3758        }
3759    }
3760    unsafe impl<
3761            D: fidl::encoding::ResourceDialect,
3762            T0: fidl::encoding::Encode<u64, D>,
3763            T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
3764        > fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastInterfaceRequest, D> for (T0, T1)
3765    {
3766        #[inline]
3767        unsafe fn encode(
3768            self,
3769            encoder: &mut fidl::encoding::Encoder<'_, D>,
3770            offset: usize,
3771            depth: fidl::encoding::Depth,
3772        ) -> fidl::Result<()> {
3773            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastInterfaceRequest>(offset);
3774            // Zero out padding regions. There's no need to apply masks
3775            // because the unmasked parts will be overwritten by fields.
3776            unsafe {
3777                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3778                (ptr as *mut u64).write_unaligned(0);
3779            }
3780            // Write the fields.
3781            self.0.encode(encoder, offset + 0, depth)?;
3782            self.1.encode(encoder, offset + 8, depth)?;
3783            Ok(())
3784        }
3785    }
3786
3787    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3788        for BaseNetworkSocketSetIpMulticastInterfaceRequest
3789    {
3790        #[inline(always)]
3791        fn new_empty() -> Self {
3792            Self {
3793                iface: fidl::new_empty!(u64, D),
3794                address: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
3795            }
3796        }
3797
3798        #[inline]
3799        unsafe fn decode(
3800            &mut self,
3801            decoder: &mut fidl::encoding::Decoder<'_, D>,
3802            offset: usize,
3803            _depth: fidl::encoding::Depth,
3804        ) -> fidl::Result<()> {
3805            decoder.debug_check_bounds::<Self>(offset);
3806            // Verify that padding bytes are zero.
3807            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3808            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3809            let mask = 0xffffffff00000000u64;
3810            let maskedval = padval & mask;
3811            if maskedval != 0 {
3812                return Err(fidl::Error::NonZeroPadding {
3813                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3814                });
3815            }
3816            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
3817            fidl::decode!(
3818                fidl_fuchsia_net__common::Ipv4Address,
3819                D,
3820                &mut self.address,
3821                decoder,
3822                offset + 8,
3823                _depth
3824            )?;
3825            Ok(())
3826        }
3827    }
3828
3829    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastLoopbackRequest {
3830        type Borrowed<'a> = &'a Self;
3831        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3832            value
3833        }
3834    }
3835
3836    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastLoopbackRequest {
3837        type Owned = Self;
3838
3839        #[inline(always)]
3840        fn inline_align(_context: fidl::encoding::Context) -> usize {
3841            1
3842        }
3843
3844        #[inline(always)]
3845        fn inline_size(_context: fidl::encoding::Context) -> usize {
3846            1
3847        }
3848    }
3849
3850    unsafe impl<D: fidl::encoding::ResourceDialect>
3851        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastLoopbackRequest, D>
3852        for &BaseNetworkSocketSetIpMulticastLoopbackRequest
3853    {
3854        #[inline]
3855        unsafe fn encode(
3856            self,
3857            encoder: &mut fidl::encoding::Encoder<'_, D>,
3858            offset: usize,
3859            _depth: fidl::encoding::Depth,
3860        ) -> fidl::Result<()> {
3861            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastLoopbackRequest>(offset);
3862            // Delegate to tuple encoding.
3863            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastLoopbackRequest, D>::encode(
3864                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3865                encoder,
3866                offset,
3867                _depth,
3868            )
3869        }
3870    }
3871    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3872        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastLoopbackRequest, D> for (T0,)
3873    {
3874        #[inline]
3875        unsafe fn encode(
3876            self,
3877            encoder: &mut fidl::encoding::Encoder<'_, D>,
3878            offset: usize,
3879            depth: fidl::encoding::Depth,
3880        ) -> fidl::Result<()> {
3881            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastLoopbackRequest>(offset);
3882            // Zero out padding regions. There's no need to apply masks
3883            // because the unmasked parts will be overwritten by fields.
3884            // Write the fields.
3885            self.0.encode(encoder, offset + 0, depth)?;
3886            Ok(())
3887        }
3888    }
3889
3890    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3891        for BaseNetworkSocketSetIpMulticastLoopbackRequest
3892    {
3893        #[inline(always)]
3894        fn new_empty() -> Self {
3895            Self { value: fidl::new_empty!(bool, D) }
3896        }
3897
3898        #[inline]
3899        unsafe fn decode(
3900            &mut self,
3901            decoder: &mut fidl::encoding::Decoder<'_, D>,
3902            offset: usize,
3903            _depth: fidl::encoding::Depth,
3904        ) -> fidl::Result<()> {
3905            decoder.debug_check_bounds::<Self>(offset);
3906            // Verify that padding bytes are zero.
3907            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
3908            Ok(())
3909        }
3910    }
3911
3912    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastTtlRequest {
3913        type Borrowed<'a> = &'a Self;
3914        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3915            value
3916        }
3917    }
3918
3919    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastTtlRequest {
3920        type Owned = Self;
3921
3922        #[inline(always)]
3923        fn inline_align(_context: fidl::encoding::Context) -> usize {
3924            8
3925        }
3926
3927        #[inline(always)]
3928        fn inline_size(_context: fidl::encoding::Context) -> usize {
3929            16
3930        }
3931    }
3932
3933    unsafe impl<D: fidl::encoding::ResourceDialect>
3934        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastTtlRequest, D>
3935        for &BaseNetworkSocketSetIpMulticastTtlRequest
3936    {
3937        #[inline]
3938        unsafe fn encode(
3939            self,
3940            encoder: &mut fidl::encoding::Encoder<'_, D>,
3941            offset: usize,
3942            _depth: fidl::encoding::Depth,
3943        ) -> fidl::Result<()> {
3944            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastTtlRequest>(offset);
3945            // Delegate to tuple encoding.
3946            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastTtlRequest, D>::encode(
3947                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3948                encoder,
3949                offset,
3950                _depth,
3951            )
3952        }
3953    }
3954    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
3955        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastTtlRequest, D> for (T0,)
3956    {
3957        #[inline]
3958        unsafe fn encode(
3959            self,
3960            encoder: &mut fidl::encoding::Encoder<'_, D>,
3961            offset: usize,
3962            depth: fidl::encoding::Depth,
3963        ) -> fidl::Result<()> {
3964            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastTtlRequest>(offset);
3965            // Zero out padding regions. There's no need to apply masks
3966            // because the unmasked parts will be overwritten by fields.
3967            // Write the fields.
3968            self.0.encode(encoder, offset + 0, depth)?;
3969            Ok(())
3970        }
3971    }
3972
3973    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3974        for BaseNetworkSocketSetIpMulticastTtlRequest
3975    {
3976        #[inline(always)]
3977        fn new_empty() -> Self {
3978            Self { value: fidl::new_empty!(OptionalUint8, D) }
3979        }
3980
3981        #[inline]
3982        unsafe fn decode(
3983            &mut self,
3984            decoder: &mut fidl::encoding::Decoder<'_, D>,
3985            offset: usize,
3986            _depth: fidl::encoding::Depth,
3987        ) -> fidl::Result<()> {
3988            decoder.debug_check_bounds::<Self>(offset);
3989            // Verify that padding bytes are zero.
3990            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
3991            Ok(())
3992        }
3993    }
3994
3995    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpPacketInfoRequest {
3996        type Borrowed<'a> = &'a Self;
3997        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3998            value
3999        }
4000    }
4001
4002    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpPacketInfoRequest {
4003        type Owned = Self;
4004
4005        #[inline(always)]
4006        fn inline_align(_context: fidl::encoding::Context) -> usize {
4007            1
4008        }
4009
4010        #[inline(always)]
4011        fn inline_size(_context: fidl::encoding::Context) -> usize {
4012            1
4013        }
4014    }
4015
4016    unsafe impl<D: fidl::encoding::ResourceDialect>
4017        fidl::encoding::Encode<BaseNetworkSocketSetIpPacketInfoRequest, D>
4018        for &BaseNetworkSocketSetIpPacketInfoRequest
4019    {
4020        #[inline]
4021        unsafe fn encode(
4022            self,
4023            encoder: &mut fidl::encoding::Encoder<'_, D>,
4024            offset: usize,
4025            _depth: fidl::encoding::Depth,
4026        ) -> fidl::Result<()> {
4027            encoder.debug_check_bounds::<BaseNetworkSocketSetIpPacketInfoRequest>(offset);
4028            // Delegate to tuple encoding.
4029            fidl::encoding::Encode::<BaseNetworkSocketSetIpPacketInfoRequest, D>::encode(
4030                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4031                encoder,
4032                offset,
4033                _depth,
4034            )
4035        }
4036    }
4037    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4038        fidl::encoding::Encode<BaseNetworkSocketSetIpPacketInfoRequest, D> for (T0,)
4039    {
4040        #[inline]
4041        unsafe fn encode(
4042            self,
4043            encoder: &mut fidl::encoding::Encoder<'_, D>,
4044            offset: usize,
4045            depth: fidl::encoding::Depth,
4046        ) -> fidl::Result<()> {
4047            encoder.debug_check_bounds::<BaseNetworkSocketSetIpPacketInfoRequest>(offset);
4048            // Zero out padding regions. There's no need to apply masks
4049            // because the unmasked parts will be overwritten by fields.
4050            // Write the fields.
4051            self.0.encode(encoder, offset + 0, depth)?;
4052            Ok(())
4053        }
4054    }
4055
4056    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4057        for BaseNetworkSocketSetIpPacketInfoRequest
4058    {
4059        #[inline(always)]
4060        fn new_empty() -> Self {
4061            Self { value: fidl::new_empty!(bool, D) }
4062        }
4063
4064        #[inline]
4065        unsafe fn decode(
4066            &mut self,
4067            decoder: &mut fidl::encoding::Decoder<'_, D>,
4068            offset: usize,
4069            _depth: fidl::encoding::Depth,
4070        ) -> fidl::Result<()> {
4071            decoder.debug_check_bounds::<Self>(offset);
4072            // Verify that padding bytes are zero.
4073            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4074            Ok(())
4075        }
4076    }
4077
4078    impl fidl::encoding::ValueTypeMarker
4079        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
4080    {
4081        type Borrowed<'a> = &'a Self;
4082        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4083            value
4084        }
4085    }
4086
4087    unsafe impl fidl::encoding::TypeMarker
4088        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
4089    {
4090        type Owned = Self;
4091
4092        #[inline(always)]
4093        fn inline_align(_context: fidl::encoding::Context) -> usize {
4094            1
4095        }
4096
4097        #[inline(always)]
4098        fn inline_size(_context: fidl::encoding::Context) -> usize {
4099            1
4100        }
4101    }
4102
4103    unsafe impl<D: fidl::encoding::ResourceDialect>
4104        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest, D>
4105        for &BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
4106    {
4107        #[inline]
4108        unsafe fn encode(
4109            self,
4110            encoder: &mut fidl::encoding::Encoder<'_, D>,
4111            offset: usize,
4112            _depth: fidl::encoding::Depth,
4113        ) -> fidl::Result<()> {
4114            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest>(offset);
4115            // Delegate to tuple encoding.
4116            fidl::encoding::Encode::<
4117                BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest,
4118                D,
4119            >::encode(
4120                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4121                encoder,
4122                offset,
4123                _depth,
4124            )
4125        }
4126    }
4127    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4128        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest, D>
4129        for (T0,)
4130    {
4131        #[inline]
4132        unsafe fn encode(
4133            self,
4134            encoder: &mut fidl::encoding::Encoder<'_, D>,
4135            offset: usize,
4136            depth: fidl::encoding::Depth,
4137        ) -> fidl::Result<()> {
4138            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest>(offset);
4139            // Zero out padding regions. There's no need to apply masks
4140            // because the unmasked parts will be overwritten by fields.
4141            // Write the fields.
4142            self.0.encode(encoder, offset + 0, depth)?;
4143            Ok(())
4144        }
4145    }
4146
4147    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4148        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
4149    {
4150        #[inline(always)]
4151        fn new_empty() -> Self {
4152            Self { value: fidl::new_empty!(bool, D) }
4153        }
4154
4155        #[inline]
4156        unsafe fn decode(
4157            &mut self,
4158            decoder: &mut fidl::encoding::Decoder<'_, D>,
4159            offset: usize,
4160            _depth: fidl::encoding::Depth,
4161        ) -> fidl::Result<()> {
4162            decoder.debug_check_bounds::<Self>(offset);
4163            // Verify that padding bytes are zero.
4164            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4165            Ok(())
4166        }
4167    }
4168
4169    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpReceiveTtlRequest {
4170        type Borrowed<'a> = &'a Self;
4171        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4172            value
4173        }
4174    }
4175
4176    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpReceiveTtlRequest {
4177        type Owned = Self;
4178
4179        #[inline(always)]
4180        fn inline_align(_context: fidl::encoding::Context) -> usize {
4181            1
4182        }
4183
4184        #[inline(always)]
4185        fn inline_size(_context: fidl::encoding::Context) -> usize {
4186            1
4187        }
4188    }
4189
4190    unsafe impl<D: fidl::encoding::ResourceDialect>
4191        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTtlRequest, D>
4192        for &BaseNetworkSocketSetIpReceiveTtlRequest
4193    {
4194        #[inline]
4195        unsafe fn encode(
4196            self,
4197            encoder: &mut fidl::encoding::Encoder<'_, D>,
4198            offset: usize,
4199            _depth: fidl::encoding::Depth,
4200        ) -> fidl::Result<()> {
4201            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTtlRequest>(offset);
4202            // Delegate to tuple encoding.
4203            fidl::encoding::Encode::<BaseNetworkSocketSetIpReceiveTtlRequest, D>::encode(
4204                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4205                encoder,
4206                offset,
4207                _depth,
4208            )
4209        }
4210    }
4211    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4212        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTtlRequest, D> for (T0,)
4213    {
4214        #[inline]
4215        unsafe fn encode(
4216            self,
4217            encoder: &mut fidl::encoding::Encoder<'_, D>,
4218            offset: usize,
4219            depth: fidl::encoding::Depth,
4220        ) -> fidl::Result<()> {
4221            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTtlRequest>(offset);
4222            // Zero out padding regions. There's no need to apply masks
4223            // because the unmasked parts will be overwritten by fields.
4224            // Write the fields.
4225            self.0.encode(encoder, offset + 0, depth)?;
4226            Ok(())
4227        }
4228    }
4229
4230    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4231        for BaseNetworkSocketSetIpReceiveTtlRequest
4232    {
4233        #[inline(always)]
4234        fn new_empty() -> Self {
4235            Self { value: fidl::new_empty!(bool, D) }
4236        }
4237
4238        #[inline]
4239        unsafe fn decode(
4240            &mut self,
4241            decoder: &mut fidl::encoding::Decoder<'_, D>,
4242            offset: usize,
4243            _depth: fidl::encoding::Depth,
4244        ) -> fidl::Result<()> {
4245            decoder.debug_check_bounds::<Self>(offset);
4246            // Verify that padding bytes are zero.
4247            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4248            Ok(())
4249        }
4250    }
4251
4252    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
4253        type Borrowed<'a> = &'a Self;
4254        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4255            value
4256        }
4257    }
4258
4259    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
4260        type Owned = Self;
4261
4262        #[inline(always)]
4263        fn inline_align(_context: fidl::encoding::Context) -> usize {
4264            1
4265        }
4266
4267        #[inline(always)]
4268        fn inline_size(_context: fidl::encoding::Context) -> usize {
4269            1
4270        }
4271    }
4272
4273    unsafe impl<D: fidl::encoding::ResourceDialect>
4274        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D>
4275        for &BaseNetworkSocketSetIpReceiveTypeOfServiceRequest
4276    {
4277        #[inline]
4278        unsafe fn encode(
4279            self,
4280            encoder: &mut fidl::encoding::Encoder<'_, D>,
4281            offset: usize,
4282            _depth: fidl::encoding::Depth,
4283        ) -> fidl::Result<()> {
4284            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest>(offset);
4285            // Delegate to tuple encoding.
4286            fidl::encoding::Encode::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D>::encode(
4287                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4288                encoder,
4289                offset,
4290                _depth,
4291            )
4292        }
4293    }
4294    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4295        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D> for (T0,)
4296    {
4297        #[inline]
4298        unsafe fn encode(
4299            self,
4300            encoder: &mut fidl::encoding::Encoder<'_, D>,
4301            offset: usize,
4302            depth: fidl::encoding::Depth,
4303        ) -> fidl::Result<()> {
4304            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest>(offset);
4305            // Zero out padding regions. There's no need to apply masks
4306            // because the unmasked parts will be overwritten by fields.
4307            // Write the fields.
4308            self.0.encode(encoder, offset + 0, depth)?;
4309            Ok(())
4310        }
4311    }
4312
4313    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4314        for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest
4315    {
4316        #[inline(always)]
4317        fn new_empty() -> Self {
4318            Self { value: fidl::new_empty!(bool, D) }
4319        }
4320
4321        #[inline]
4322        unsafe fn decode(
4323            &mut self,
4324            decoder: &mut fidl::encoding::Decoder<'_, D>,
4325            offset: usize,
4326            _depth: fidl::encoding::Depth,
4327        ) -> fidl::Result<()> {
4328            decoder.debug_check_bounds::<Self>(offset);
4329            // Verify that padding bytes are zero.
4330            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4331            Ok(())
4332        }
4333    }
4334
4335    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTransparentRequest {
4336        type Borrowed<'a> = &'a Self;
4337        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4338            value
4339        }
4340    }
4341
4342    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTransparentRequest {
4343        type Owned = Self;
4344
4345        #[inline(always)]
4346        fn inline_align(_context: fidl::encoding::Context) -> usize {
4347            1
4348        }
4349
4350        #[inline(always)]
4351        fn inline_size(_context: fidl::encoding::Context) -> usize {
4352            1
4353        }
4354    }
4355
4356    unsafe impl<D: fidl::encoding::ResourceDialect>
4357        fidl::encoding::Encode<BaseNetworkSocketSetIpTransparentRequest, D>
4358        for &BaseNetworkSocketSetIpTransparentRequest
4359    {
4360        #[inline]
4361        unsafe fn encode(
4362            self,
4363            encoder: &mut fidl::encoding::Encoder<'_, D>,
4364            offset: usize,
4365            _depth: fidl::encoding::Depth,
4366        ) -> fidl::Result<()> {
4367            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTransparentRequest>(offset);
4368            // Delegate to tuple encoding.
4369            fidl::encoding::Encode::<BaseNetworkSocketSetIpTransparentRequest, D>::encode(
4370                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4371                encoder,
4372                offset,
4373                _depth,
4374            )
4375        }
4376    }
4377    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4378        fidl::encoding::Encode<BaseNetworkSocketSetIpTransparentRequest, D> for (T0,)
4379    {
4380        #[inline]
4381        unsafe fn encode(
4382            self,
4383            encoder: &mut fidl::encoding::Encoder<'_, D>,
4384            offset: usize,
4385            depth: fidl::encoding::Depth,
4386        ) -> fidl::Result<()> {
4387            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTransparentRequest>(offset);
4388            // Zero out padding regions. There's no need to apply masks
4389            // because the unmasked parts will be overwritten by fields.
4390            // Write the fields.
4391            self.0.encode(encoder, offset + 0, depth)?;
4392            Ok(())
4393        }
4394    }
4395
4396    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4397        for BaseNetworkSocketSetIpTransparentRequest
4398    {
4399        #[inline(always)]
4400        fn new_empty() -> Self {
4401            Self { value: fidl::new_empty!(bool, D) }
4402        }
4403
4404        #[inline]
4405        unsafe fn decode(
4406            &mut self,
4407            decoder: &mut fidl::encoding::Decoder<'_, D>,
4408            offset: usize,
4409            _depth: fidl::encoding::Depth,
4410        ) -> fidl::Result<()> {
4411            decoder.debug_check_bounds::<Self>(offset);
4412            // Verify that padding bytes are zero.
4413            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4414            Ok(())
4415        }
4416    }
4417
4418    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTtlRequest {
4419        type Borrowed<'a> = &'a Self;
4420        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4421            value
4422        }
4423    }
4424
4425    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTtlRequest {
4426        type Owned = Self;
4427
4428        #[inline(always)]
4429        fn inline_align(_context: fidl::encoding::Context) -> usize {
4430            8
4431        }
4432
4433        #[inline(always)]
4434        fn inline_size(_context: fidl::encoding::Context) -> usize {
4435            16
4436        }
4437    }
4438
4439    unsafe impl<D: fidl::encoding::ResourceDialect>
4440        fidl::encoding::Encode<BaseNetworkSocketSetIpTtlRequest, D>
4441        for &BaseNetworkSocketSetIpTtlRequest
4442    {
4443        #[inline]
4444        unsafe fn encode(
4445            self,
4446            encoder: &mut fidl::encoding::Encoder<'_, D>,
4447            offset: usize,
4448            _depth: fidl::encoding::Depth,
4449        ) -> fidl::Result<()> {
4450            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTtlRequest>(offset);
4451            // Delegate to tuple encoding.
4452            fidl::encoding::Encode::<BaseNetworkSocketSetIpTtlRequest, D>::encode(
4453                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4454                encoder,
4455                offset,
4456                _depth,
4457            )
4458        }
4459    }
4460    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
4461        fidl::encoding::Encode<BaseNetworkSocketSetIpTtlRequest, D> for (T0,)
4462    {
4463        #[inline]
4464        unsafe fn encode(
4465            self,
4466            encoder: &mut fidl::encoding::Encoder<'_, D>,
4467            offset: usize,
4468            depth: fidl::encoding::Depth,
4469        ) -> fidl::Result<()> {
4470            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTtlRequest>(offset);
4471            // Zero out padding regions. There's no need to apply masks
4472            // because the unmasked parts will be overwritten by fields.
4473            // Write the fields.
4474            self.0.encode(encoder, offset + 0, depth)?;
4475            Ok(())
4476        }
4477    }
4478
4479    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4480        for BaseNetworkSocketSetIpTtlRequest
4481    {
4482        #[inline(always)]
4483        fn new_empty() -> Self {
4484            Self { value: fidl::new_empty!(OptionalUint8, D) }
4485        }
4486
4487        #[inline]
4488        unsafe fn decode(
4489            &mut self,
4490            decoder: &mut fidl::encoding::Decoder<'_, D>,
4491            offset: usize,
4492            _depth: fidl::encoding::Depth,
4493        ) -> fidl::Result<()> {
4494            decoder.debug_check_bounds::<Self>(offset);
4495            // Verify that padding bytes are zero.
4496            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
4497            Ok(())
4498        }
4499    }
4500
4501    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTypeOfServiceRequest {
4502        type Borrowed<'a> = &'a Self;
4503        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4504            value
4505        }
4506    }
4507
4508    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTypeOfServiceRequest {
4509        type Owned = Self;
4510
4511        #[inline(always)]
4512        fn inline_align(_context: fidl::encoding::Context) -> usize {
4513            1
4514        }
4515
4516        #[inline(always)]
4517        fn inline_size(_context: fidl::encoding::Context) -> usize {
4518            1
4519        }
4520        #[inline(always)]
4521        fn encode_is_copy() -> bool {
4522            true
4523        }
4524
4525        #[inline(always)]
4526        fn decode_is_copy() -> bool {
4527            true
4528        }
4529    }
4530
4531    unsafe impl<D: fidl::encoding::ResourceDialect>
4532        fidl::encoding::Encode<BaseNetworkSocketSetIpTypeOfServiceRequest, D>
4533        for &BaseNetworkSocketSetIpTypeOfServiceRequest
4534    {
4535        #[inline]
4536        unsafe fn encode(
4537            self,
4538            encoder: &mut fidl::encoding::Encoder<'_, D>,
4539            offset: usize,
4540            _depth: fidl::encoding::Depth,
4541        ) -> fidl::Result<()> {
4542            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTypeOfServiceRequest>(offset);
4543            unsafe {
4544                // Copy the object into the buffer.
4545                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4546                (buf_ptr as *mut BaseNetworkSocketSetIpTypeOfServiceRequest).write_unaligned(
4547                    (self as *const BaseNetworkSocketSetIpTypeOfServiceRequest).read(),
4548                );
4549                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4550                // done second because the memcpy will write garbage to these bytes.
4551            }
4552            Ok(())
4553        }
4554    }
4555    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
4556        fidl::encoding::Encode<BaseNetworkSocketSetIpTypeOfServiceRequest, D> for (T0,)
4557    {
4558        #[inline]
4559        unsafe fn encode(
4560            self,
4561            encoder: &mut fidl::encoding::Encoder<'_, D>,
4562            offset: usize,
4563            depth: fidl::encoding::Depth,
4564        ) -> fidl::Result<()> {
4565            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTypeOfServiceRequest>(offset);
4566            // Zero out padding regions. There's no need to apply masks
4567            // because the unmasked parts will be overwritten by fields.
4568            // Write the fields.
4569            self.0.encode(encoder, offset + 0, depth)?;
4570            Ok(())
4571        }
4572    }
4573
4574    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4575        for BaseNetworkSocketSetIpTypeOfServiceRequest
4576    {
4577        #[inline(always)]
4578        fn new_empty() -> Self {
4579            Self { value: fidl::new_empty!(u8, D) }
4580        }
4581
4582        #[inline]
4583        unsafe fn decode(
4584            &mut self,
4585            decoder: &mut fidl::encoding::Decoder<'_, D>,
4586            offset: usize,
4587            _depth: fidl::encoding::Depth,
4588        ) -> fidl::Result<()> {
4589            decoder.debug_check_bounds::<Self>(offset);
4590            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4591            // Verify that padding bytes are zero.
4592            // Copy from the buffer into the object.
4593            unsafe {
4594                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
4595            }
4596            Ok(())
4597        }
4598    }
4599
4600    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastHopsRequest {
4601        type Borrowed<'a> = &'a Self;
4602        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4603            value
4604        }
4605    }
4606
4607    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastHopsRequest {
4608        type Owned = Self;
4609
4610        #[inline(always)]
4611        fn inline_align(_context: fidl::encoding::Context) -> usize {
4612            8
4613        }
4614
4615        #[inline(always)]
4616        fn inline_size(_context: fidl::encoding::Context) -> usize {
4617            16
4618        }
4619    }
4620
4621    unsafe impl<D: fidl::encoding::ResourceDialect>
4622        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastHopsRequest, D>
4623        for &BaseNetworkSocketSetIpv6MulticastHopsRequest
4624    {
4625        #[inline]
4626        unsafe fn encode(
4627            self,
4628            encoder: &mut fidl::encoding::Encoder<'_, D>,
4629            offset: usize,
4630            _depth: fidl::encoding::Depth,
4631        ) -> fidl::Result<()> {
4632            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastHopsRequest>(offset);
4633            // Delegate to tuple encoding.
4634            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6MulticastHopsRequest, D>::encode(
4635                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4636                encoder,
4637                offset,
4638                _depth,
4639            )
4640        }
4641    }
4642    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
4643        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastHopsRequest, D> for (T0,)
4644    {
4645        #[inline]
4646        unsafe fn encode(
4647            self,
4648            encoder: &mut fidl::encoding::Encoder<'_, D>,
4649            offset: usize,
4650            depth: fidl::encoding::Depth,
4651        ) -> fidl::Result<()> {
4652            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastHopsRequest>(offset);
4653            // Zero out padding regions. There's no need to apply masks
4654            // because the unmasked parts will be overwritten by fields.
4655            // Write the fields.
4656            self.0.encode(encoder, offset + 0, depth)?;
4657            Ok(())
4658        }
4659    }
4660
4661    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4662        for BaseNetworkSocketSetIpv6MulticastHopsRequest
4663    {
4664        #[inline(always)]
4665        fn new_empty() -> Self {
4666            Self { value: fidl::new_empty!(OptionalUint8, D) }
4667        }
4668
4669        #[inline]
4670        unsafe fn decode(
4671            &mut self,
4672            decoder: &mut fidl::encoding::Decoder<'_, D>,
4673            offset: usize,
4674            _depth: fidl::encoding::Depth,
4675        ) -> fidl::Result<()> {
4676            decoder.debug_check_bounds::<Self>(offset);
4677            // Verify that padding bytes are zero.
4678            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
4679            Ok(())
4680        }
4681    }
4682
4683    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
4684        type Borrowed<'a> = &'a Self;
4685        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4686            value
4687        }
4688    }
4689
4690    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
4691        type Owned = Self;
4692
4693        #[inline(always)]
4694        fn inline_align(_context: fidl::encoding::Context) -> usize {
4695            8
4696        }
4697
4698        #[inline(always)]
4699        fn inline_size(_context: fidl::encoding::Context) -> usize {
4700            8
4701        }
4702        #[inline(always)]
4703        fn encode_is_copy() -> bool {
4704            true
4705        }
4706
4707        #[inline(always)]
4708        fn decode_is_copy() -> bool {
4709            true
4710        }
4711    }
4712
4713    unsafe impl<D: fidl::encoding::ResourceDialect>
4714        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastInterfaceRequest, D>
4715        for &BaseNetworkSocketSetIpv6MulticastInterfaceRequest
4716    {
4717        #[inline]
4718        unsafe fn encode(
4719            self,
4720            encoder: &mut fidl::encoding::Encoder<'_, D>,
4721            offset: usize,
4722            _depth: fidl::encoding::Depth,
4723        ) -> fidl::Result<()> {
4724            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastInterfaceRequest>(offset);
4725            unsafe {
4726                // Copy the object into the buffer.
4727                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4728                (buf_ptr as *mut BaseNetworkSocketSetIpv6MulticastInterfaceRequest)
4729                    .write_unaligned(
4730                        (self as *const BaseNetworkSocketSetIpv6MulticastInterfaceRequest).read(),
4731                    );
4732                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4733                // done second because the memcpy will write garbage to these bytes.
4734            }
4735            Ok(())
4736        }
4737    }
4738    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
4739        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastInterfaceRequest, D> for (T0,)
4740    {
4741        #[inline]
4742        unsafe fn encode(
4743            self,
4744            encoder: &mut fidl::encoding::Encoder<'_, D>,
4745            offset: usize,
4746            depth: fidl::encoding::Depth,
4747        ) -> fidl::Result<()> {
4748            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastInterfaceRequest>(offset);
4749            // Zero out padding regions. There's no need to apply masks
4750            // because the unmasked parts will be overwritten by fields.
4751            // Write the fields.
4752            self.0.encode(encoder, offset + 0, depth)?;
4753            Ok(())
4754        }
4755    }
4756
4757    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4758        for BaseNetworkSocketSetIpv6MulticastInterfaceRequest
4759    {
4760        #[inline(always)]
4761        fn new_empty() -> Self {
4762            Self { value: fidl::new_empty!(u64, D) }
4763        }
4764
4765        #[inline]
4766        unsafe fn decode(
4767            &mut self,
4768            decoder: &mut fidl::encoding::Decoder<'_, D>,
4769            offset: usize,
4770            _depth: fidl::encoding::Depth,
4771        ) -> fidl::Result<()> {
4772            decoder.debug_check_bounds::<Self>(offset);
4773            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4774            // Verify that padding bytes are zero.
4775            // Copy from the buffer into the object.
4776            unsafe {
4777                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4778            }
4779            Ok(())
4780        }
4781    }
4782
4783    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
4784        type Borrowed<'a> = &'a Self;
4785        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4786            value
4787        }
4788    }
4789
4790    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
4791        type Owned = Self;
4792
4793        #[inline(always)]
4794        fn inline_align(_context: fidl::encoding::Context) -> usize {
4795            1
4796        }
4797
4798        #[inline(always)]
4799        fn inline_size(_context: fidl::encoding::Context) -> usize {
4800            1
4801        }
4802    }
4803
4804    unsafe impl<D: fidl::encoding::ResourceDialect>
4805        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D>
4806        for &BaseNetworkSocketSetIpv6MulticastLoopbackRequest
4807    {
4808        #[inline]
4809        unsafe fn encode(
4810            self,
4811            encoder: &mut fidl::encoding::Encoder<'_, D>,
4812            offset: usize,
4813            _depth: fidl::encoding::Depth,
4814        ) -> fidl::Result<()> {
4815            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest>(offset);
4816            // Delegate to tuple encoding.
4817            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D>::encode(
4818                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4819                encoder,
4820                offset,
4821                _depth,
4822            )
4823        }
4824    }
4825    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4826        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D> for (T0,)
4827    {
4828        #[inline]
4829        unsafe fn encode(
4830            self,
4831            encoder: &mut fidl::encoding::Encoder<'_, D>,
4832            offset: usize,
4833            depth: fidl::encoding::Depth,
4834        ) -> fidl::Result<()> {
4835            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest>(offset);
4836            // Zero out padding regions. There's no need to apply masks
4837            // because the unmasked parts will be overwritten by fields.
4838            // Write the fields.
4839            self.0.encode(encoder, offset + 0, depth)?;
4840            Ok(())
4841        }
4842    }
4843
4844    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4845        for BaseNetworkSocketSetIpv6MulticastLoopbackRequest
4846    {
4847        #[inline(always)]
4848        fn new_empty() -> Self {
4849            Self { value: fidl::new_empty!(bool, D) }
4850        }
4851
4852        #[inline]
4853        unsafe fn decode(
4854            &mut self,
4855            decoder: &mut fidl::encoding::Decoder<'_, D>,
4856            offset: usize,
4857            _depth: fidl::encoding::Depth,
4858        ) -> fidl::Result<()> {
4859            decoder.debug_check_bounds::<Self>(offset);
4860            // Verify that padding bytes are zero.
4861            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4862            Ok(())
4863        }
4864    }
4865
4866    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6OnlyRequest {
4867        type Borrowed<'a> = &'a Self;
4868        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4869            value
4870        }
4871    }
4872
4873    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6OnlyRequest {
4874        type Owned = Self;
4875
4876        #[inline(always)]
4877        fn inline_align(_context: fidl::encoding::Context) -> usize {
4878            1
4879        }
4880
4881        #[inline(always)]
4882        fn inline_size(_context: fidl::encoding::Context) -> usize {
4883            1
4884        }
4885    }
4886
4887    unsafe impl<D: fidl::encoding::ResourceDialect>
4888        fidl::encoding::Encode<BaseNetworkSocketSetIpv6OnlyRequest, D>
4889        for &BaseNetworkSocketSetIpv6OnlyRequest
4890    {
4891        #[inline]
4892        unsafe fn encode(
4893            self,
4894            encoder: &mut fidl::encoding::Encoder<'_, D>,
4895            offset: usize,
4896            _depth: fidl::encoding::Depth,
4897        ) -> fidl::Result<()> {
4898            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6OnlyRequest>(offset);
4899            // Delegate to tuple encoding.
4900            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6OnlyRequest, D>::encode(
4901                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4902                encoder,
4903                offset,
4904                _depth,
4905            )
4906        }
4907    }
4908    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4909        fidl::encoding::Encode<BaseNetworkSocketSetIpv6OnlyRequest, D> for (T0,)
4910    {
4911        #[inline]
4912        unsafe fn encode(
4913            self,
4914            encoder: &mut fidl::encoding::Encoder<'_, D>,
4915            offset: usize,
4916            depth: fidl::encoding::Depth,
4917        ) -> fidl::Result<()> {
4918            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6OnlyRequest>(offset);
4919            // Zero out padding regions. There's no need to apply masks
4920            // because the unmasked parts will be overwritten by fields.
4921            // Write the fields.
4922            self.0.encode(encoder, offset + 0, depth)?;
4923            Ok(())
4924        }
4925    }
4926
4927    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4928        for BaseNetworkSocketSetIpv6OnlyRequest
4929    {
4930        #[inline(always)]
4931        fn new_empty() -> Self {
4932            Self { value: fidl::new_empty!(bool, D) }
4933        }
4934
4935        #[inline]
4936        unsafe fn decode(
4937            &mut self,
4938            decoder: &mut fidl::encoding::Decoder<'_, D>,
4939            offset: usize,
4940            _depth: fidl::encoding::Depth,
4941        ) -> fidl::Result<()> {
4942            decoder.debug_check_bounds::<Self>(offset);
4943            // Verify that padding bytes are zero.
4944            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4945            Ok(())
4946        }
4947    }
4948
4949    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
4950        type Borrowed<'a> = &'a Self;
4951        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4952            value
4953        }
4954    }
4955
4956    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
4957        type Owned = Self;
4958
4959        #[inline(always)]
4960        fn inline_align(_context: fidl::encoding::Context) -> usize {
4961            1
4962        }
4963
4964        #[inline(always)]
4965        fn inline_size(_context: fidl::encoding::Context) -> usize {
4966            1
4967        }
4968    }
4969
4970    unsafe impl<D: fidl::encoding::ResourceDialect>
4971        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D>
4972        for &BaseNetworkSocketSetIpv6ReceiveHopLimitRequest
4973    {
4974        #[inline]
4975        unsafe fn encode(
4976            self,
4977            encoder: &mut fidl::encoding::Encoder<'_, D>,
4978            offset: usize,
4979            _depth: fidl::encoding::Depth,
4980        ) -> fidl::Result<()> {
4981            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest>(offset);
4982            // Delegate to tuple encoding.
4983            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D>::encode(
4984                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4985                encoder,
4986                offset,
4987                _depth,
4988            )
4989        }
4990    }
4991    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4992        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D> for (T0,)
4993    {
4994        #[inline]
4995        unsafe fn encode(
4996            self,
4997            encoder: &mut fidl::encoding::Encoder<'_, D>,
4998            offset: usize,
4999            depth: fidl::encoding::Depth,
5000        ) -> fidl::Result<()> {
5001            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest>(offset);
5002            // Zero out padding regions. There's no need to apply masks
5003            // because the unmasked parts will be overwritten by fields.
5004            // Write the fields.
5005            self.0.encode(encoder, offset + 0, depth)?;
5006            Ok(())
5007        }
5008    }
5009
5010    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5011        for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest
5012    {
5013        #[inline(always)]
5014        fn new_empty() -> Self {
5015            Self { value: fidl::new_empty!(bool, D) }
5016        }
5017
5018        #[inline]
5019        unsafe fn decode(
5020            &mut self,
5021            decoder: &mut fidl::encoding::Decoder<'_, D>,
5022            offset: usize,
5023            _depth: fidl::encoding::Depth,
5024        ) -> fidl::Result<()> {
5025            decoder.debug_check_bounds::<Self>(offset);
5026            // Verify that padding bytes are zero.
5027            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5028            Ok(())
5029        }
5030    }
5031
5032    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
5033        type Borrowed<'a> = &'a Self;
5034        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5035            value
5036        }
5037    }
5038
5039    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
5040        type Owned = Self;
5041
5042        #[inline(always)]
5043        fn inline_align(_context: fidl::encoding::Context) -> usize {
5044            1
5045        }
5046
5047        #[inline(always)]
5048        fn inline_size(_context: fidl::encoding::Context) -> usize {
5049            1
5050        }
5051    }
5052
5053    unsafe impl<D: fidl::encoding::ResourceDialect>
5054        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D>
5055        for &BaseNetworkSocketSetIpv6ReceivePacketInfoRequest
5056    {
5057        #[inline]
5058        unsafe fn encode(
5059            self,
5060            encoder: &mut fidl::encoding::Encoder<'_, D>,
5061            offset: usize,
5062            _depth: fidl::encoding::Depth,
5063        ) -> fidl::Result<()> {
5064            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest>(offset);
5065            // Delegate to tuple encoding.
5066            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D>::encode(
5067                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5068                encoder,
5069                offset,
5070                _depth,
5071            )
5072        }
5073    }
5074    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5075        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D> for (T0,)
5076    {
5077        #[inline]
5078        unsafe fn encode(
5079            self,
5080            encoder: &mut fidl::encoding::Encoder<'_, D>,
5081            offset: usize,
5082            depth: fidl::encoding::Depth,
5083        ) -> fidl::Result<()> {
5084            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest>(offset);
5085            // Zero out padding regions. There's no need to apply masks
5086            // because the unmasked parts will be overwritten by fields.
5087            // Write the fields.
5088            self.0.encode(encoder, offset + 0, depth)?;
5089            Ok(())
5090        }
5091    }
5092
5093    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5094        for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest
5095    {
5096        #[inline(always)]
5097        fn new_empty() -> Self {
5098            Self { value: fidl::new_empty!(bool, D) }
5099        }
5100
5101        #[inline]
5102        unsafe fn decode(
5103            &mut self,
5104            decoder: &mut fidl::encoding::Decoder<'_, D>,
5105            offset: usize,
5106            _depth: fidl::encoding::Depth,
5107        ) -> fidl::Result<()> {
5108            decoder.debug_check_bounds::<Self>(offset);
5109            // Verify that padding bytes are zero.
5110            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5111            Ok(())
5112        }
5113    }
5114
5115    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
5116        type Borrowed<'a> = &'a Self;
5117        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5118            value
5119        }
5120    }
5121
5122    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
5123        type Owned = Self;
5124
5125        #[inline(always)]
5126        fn inline_align(_context: fidl::encoding::Context) -> usize {
5127            1
5128        }
5129
5130        #[inline(always)]
5131        fn inline_size(_context: fidl::encoding::Context) -> usize {
5132            1
5133        }
5134    }
5135
5136    unsafe impl<D: fidl::encoding::ResourceDialect>
5137        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D>
5138        for &BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest
5139    {
5140        #[inline]
5141        unsafe fn encode(
5142            self,
5143            encoder: &mut fidl::encoding::Encoder<'_, D>,
5144            offset: usize,
5145            _depth: fidl::encoding::Depth,
5146        ) -> fidl::Result<()> {
5147            encoder
5148                .debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest>(offset);
5149            // Delegate to tuple encoding.
5150            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D>::encode(
5151                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5152                encoder,
5153                offset,
5154                _depth,
5155            )
5156        }
5157    }
5158    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5159        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D> for (T0,)
5160    {
5161        #[inline]
5162        unsafe fn encode(
5163            self,
5164            encoder: &mut fidl::encoding::Encoder<'_, D>,
5165            offset: usize,
5166            depth: fidl::encoding::Depth,
5167        ) -> fidl::Result<()> {
5168            encoder
5169                .debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest>(offset);
5170            // Zero out padding regions. There's no need to apply masks
5171            // because the unmasked parts will be overwritten by fields.
5172            // Write the fields.
5173            self.0.encode(encoder, offset + 0, depth)?;
5174            Ok(())
5175        }
5176    }
5177
5178    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5179        for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest
5180    {
5181        #[inline(always)]
5182        fn new_empty() -> Self {
5183            Self { value: fidl::new_empty!(bool, D) }
5184        }
5185
5186        #[inline]
5187        unsafe fn decode(
5188            &mut self,
5189            decoder: &mut fidl::encoding::Decoder<'_, D>,
5190            offset: usize,
5191            _depth: fidl::encoding::Depth,
5192        ) -> fidl::Result<()> {
5193            decoder.debug_check_bounds::<Self>(offset);
5194            // Verify that padding bytes are zero.
5195            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5196            Ok(())
5197        }
5198    }
5199
5200    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6TrafficClassRequest {
5201        type Borrowed<'a> = &'a Self;
5202        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5203            value
5204        }
5205    }
5206
5207    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6TrafficClassRequest {
5208        type Owned = Self;
5209
5210        #[inline(always)]
5211        fn inline_align(_context: fidl::encoding::Context) -> usize {
5212            8
5213        }
5214
5215        #[inline(always)]
5216        fn inline_size(_context: fidl::encoding::Context) -> usize {
5217            16
5218        }
5219    }
5220
5221    unsafe impl<D: fidl::encoding::ResourceDialect>
5222        fidl::encoding::Encode<BaseNetworkSocketSetIpv6TrafficClassRequest, D>
5223        for &BaseNetworkSocketSetIpv6TrafficClassRequest
5224    {
5225        #[inline]
5226        unsafe fn encode(
5227            self,
5228            encoder: &mut fidl::encoding::Encoder<'_, D>,
5229            offset: usize,
5230            _depth: fidl::encoding::Depth,
5231        ) -> fidl::Result<()> {
5232            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6TrafficClassRequest>(offset);
5233            // Delegate to tuple encoding.
5234            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6TrafficClassRequest, D>::encode(
5235                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5236                encoder,
5237                offset,
5238                _depth,
5239            )
5240        }
5241    }
5242    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
5243        fidl::encoding::Encode<BaseNetworkSocketSetIpv6TrafficClassRequest, D> for (T0,)
5244    {
5245        #[inline]
5246        unsafe fn encode(
5247            self,
5248            encoder: &mut fidl::encoding::Encoder<'_, D>,
5249            offset: usize,
5250            depth: fidl::encoding::Depth,
5251        ) -> fidl::Result<()> {
5252            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6TrafficClassRequest>(offset);
5253            // Zero out padding regions. There's no need to apply masks
5254            // because the unmasked parts will be overwritten by fields.
5255            // Write the fields.
5256            self.0.encode(encoder, offset + 0, depth)?;
5257            Ok(())
5258        }
5259    }
5260
5261    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5262        for BaseNetworkSocketSetIpv6TrafficClassRequest
5263    {
5264        #[inline(always)]
5265        fn new_empty() -> Self {
5266            Self { value: fidl::new_empty!(OptionalUint8, D) }
5267        }
5268
5269        #[inline]
5270        unsafe fn decode(
5271            &mut self,
5272            decoder: &mut fidl::encoding::Decoder<'_, D>,
5273            offset: usize,
5274            _depth: fidl::encoding::Depth,
5275        ) -> fidl::Result<()> {
5276            decoder.debug_check_bounds::<Self>(offset);
5277            // Verify that padding bytes are zero.
5278            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
5279            Ok(())
5280        }
5281    }
5282
5283    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6UnicastHopsRequest {
5284        type Borrowed<'a> = &'a Self;
5285        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5286            value
5287        }
5288    }
5289
5290    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6UnicastHopsRequest {
5291        type Owned = Self;
5292
5293        #[inline(always)]
5294        fn inline_align(_context: fidl::encoding::Context) -> usize {
5295            8
5296        }
5297
5298        #[inline(always)]
5299        fn inline_size(_context: fidl::encoding::Context) -> usize {
5300            16
5301        }
5302    }
5303
5304    unsafe impl<D: fidl::encoding::ResourceDialect>
5305        fidl::encoding::Encode<BaseNetworkSocketSetIpv6UnicastHopsRequest, D>
5306        for &BaseNetworkSocketSetIpv6UnicastHopsRequest
5307    {
5308        #[inline]
5309        unsafe fn encode(
5310            self,
5311            encoder: &mut fidl::encoding::Encoder<'_, D>,
5312            offset: usize,
5313            _depth: fidl::encoding::Depth,
5314        ) -> fidl::Result<()> {
5315            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6UnicastHopsRequest>(offset);
5316            // Delegate to tuple encoding.
5317            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6UnicastHopsRequest, D>::encode(
5318                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5319                encoder,
5320                offset,
5321                _depth,
5322            )
5323        }
5324    }
5325    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
5326        fidl::encoding::Encode<BaseNetworkSocketSetIpv6UnicastHopsRequest, D> for (T0,)
5327    {
5328        #[inline]
5329        unsafe fn encode(
5330            self,
5331            encoder: &mut fidl::encoding::Encoder<'_, D>,
5332            offset: usize,
5333            depth: fidl::encoding::Depth,
5334        ) -> fidl::Result<()> {
5335            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6UnicastHopsRequest>(offset);
5336            // Zero out padding regions. There's no need to apply masks
5337            // because the unmasked parts will be overwritten by fields.
5338            // Write the fields.
5339            self.0.encode(encoder, offset + 0, depth)?;
5340            Ok(())
5341        }
5342    }
5343
5344    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5345        for BaseNetworkSocketSetIpv6UnicastHopsRequest
5346    {
5347        #[inline(always)]
5348        fn new_empty() -> Self {
5349            Self { value: fidl::new_empty!(OptionalUint8, D) }
5350        }
5351
5352        #[inline]
5353        unsafe fn decode(
5354            &mut self,
5355            decoder: &mut fidl::encoding::Decoder<'_, D>,
5356            offset: usize,
5357            _depth: fidl::encoding::Depth,
5358        ) -> fidl::Result<()> {
5359            decoder.debug_check_bounds::<Self>(offset);
5360            // Verify that padding bytes are zero.
5361            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
5362            Ok(())
5363        }
5364    }
5365
5366    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketShutdownRequest {
5367        type Borrowed<'a> = &'a Self;
5368        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5369            value
5370        }
5371    }
5372
5373    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketShutdownRequest {
5374        type Owned = Self;
5375
5376        #[inline(always)]
5377        fn inline_align(_context: fidl::encoding::Context) -> usize {
5378            2
5379        }
5380
5381        #[inline(always)]
5382        fn inline_size(_context: fidl::encoding::Context) -> usize {
5383            2
5384        }
5385    }
5386
5387    unsafe impl<D: fidl::encoding::ResourceDialect>
5388        fidl::encoding::Encode<BaseNetworkSocketShutdownRequest, D>
5389        for &BaseNetworkSocketShutdownRequest
5390    {
5391        #[inline]
5392        unsafe fn encode(
5393            self,
5394            encoder: &mut fidl::encoding::Encoder<'_, D>,
5395            offset: usize,
5396            _depth: fidl::encoding::Depth,
5397        ) -> fidl::Result<()> {
5398            encoder.debug_check_bounds::<BaseNetworkSocketShutdownRequest>(offset);
5399            // Delegate to tuple encoding.
5400            fidl::encoding::Encode::<BaseNetworkSocketShutdownRequest, D>::encode(
5401                (<ShutdownMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),),
5402                encoder,
5403                offset,
5404                _depth,
5405            )
5406        }
5407    }
5408    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ShutdownMode, D>>
5409        fidl::encoding::Encode<BaseNetworkSocketShutdownRequest, D> for (T0,)
5410    {
5411        #[inline]
5412        unsafe fn encode(
5413            self,
5414            encoder: &mut fidl::encoding::Encoder<'_, D>,
5415            offset: usize,
5416            depth: fidl::encoding::Depth,
5417        ) -> fidl::Result<()> {
5418            encoder.debug_check_bounds::<BaseNetworkSocketShutdownRequest>(offset);
5419            // Zero out padding regions. There's no need to apply masks
5420            // because the unmasked parts will be overwritten by fields.
5421            // Write the fields.
5422            self.0.encode(encoder, offset + 0, depth)?;
5423            Ok(())
5424        }
5425    }
5426
5427    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5428        for BaseNetworkSocketShutdownRequest
5429    {
5430        #[inline(always)]
5431        fn new_empty() -> Self {
5432            Self { mode: fidl::new_empty!(ShutdownMode, D) }
5433        }
5434
5435        #[inline]
5436        unsafe fn decode(
5437            &mut self,
5438            decoder: &mut fidl::encoding::Decoder<'_, D>,
5439            offset: usize,
5440            _depth: fidl::encoding::Depth,
5441        ) -> fidl::Result<()> {
5442            decoder.debug_check_bounds::<Self>(offset);
5443            // Verify that padding bytes are zero.
5444            fidl::decode!(ShutdownMode, D, &mut self.mode, decoder, offset + 0, _depth)?;
5445            Ok(())
5446        }
5447    }
5448
5449    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastInterfaceResponse {
5450        type Borrowed<'a> = &'a Self;
5451        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5452            value
5453        }
5454    }
5455
5456    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastInterfaceResponse {
5457        type Owned = Self;
5458
5459        #[inline(always)]
5460        fn inline_align(_context: fidl::encoding::Context) -> usize {
5461            1
5462        }
5463
5464        #[inline(always)]
5465        fn inline_size(_context: fidl::encoding::Context) -> usize {
5466            4
5467        }
5468    }
5469
5470    unsafe impl<D: fidl::encoding::ResourceDialect>
5471        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastInterfaceResponse, D>
5472        for &BaseNetworkSocketGetIpMulticastInterfaceResponse
5473    {
5474        #[inline]
5475        unsafe fn encode(
5476            self,
5477            encoder: &mut fidl::encoding::Encoder<'_, D>,
5478            offset: usize,
5479            _depth: fidl::encoding::Depth,
5480        ) -> fidl::Result<()> {
5481            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastInterfaceResponse>(offset);
5482            // Delegate to tuple encoding.
5483            fidl::encoding::Encode::<BaseNetworkSocketGetIpMulticastInterfaceResponse, D>::encode(
5484                (
5485                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
5486                ),
5487                encoder, offset, _depth
5488            )
5489        }
5490    }
5491    unsafe impl<
5492            D: fidl::encoding::ResourceDialect,
5493            T0: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
5494        > fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastInterfaceResponse, D> for (T0,)
5495    {
5496        #[inline]
5497        unsafe fn encode(
5498            self,
5499            encoder: &mut fidl::encoding::Encoder<'_, D>,
5500            offset: usize,
5501            depth: fidl::encoding::Depth,
5502        ) -> fidl::Result<()> {
5503            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastInterfaceResponse>(offset);
5504            // Zero out padding regions. There's no need to apply masks
5505            // because the unmasked parts will be overwritten by fields.
5506            // Write the fields.
5507            self.0.encode(encoder, offset + 0, depth)?;
5508            Ok(())
5509        }
5510    }
5511
5512    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5513        for BaseNetworkSocketGetIpMulticastInterfaceResponse
5514    {
5515        #[inline(always)]
5516        fn new_empty() -> Self {
5517            Self { value: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D) }
5518        }
5519
5520        #[inline]
5521        unsafe fn decode(
5522            &mut self,
5523            decoder: &mut fidl::encoding::Decoder<'_, D>,
5524            offset: usize,
5525            _depth: fidl::encoding::Depth,
5526        ) -> fidl::Result<()> {
5527            decoder.debug_check_bounds::<Self>(offset);
5528            // Verify that padding bytes are zero.
5529            fidl::decode!(
5530                fidl_fuchsia_net__common::Ipv4Address,
5531                D,
5532                &mut self.value,
5533                decoder,
5534                offset + 0,
5535                _depth
5536            )?;
5537            Ok(())
5538        }
5539    }
5540
5541    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastLoopbackResponse {
5542        type Borrowed<'a> = &'a Self;
5543        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5544            value
5545        }
5546    }
5547
5548    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastLoopbackResponse {
5549        type Owned = Self;
5550
5551        #[inline(always)]
5552        fn inline_align(_context: fidl::encoding::Context) -> usize {
5553            1
5554        }
5555
5556        #[inline(always)]
5557        fn inline_size(_context: fidl::encoding::Context) -> usize {
5558            1
5559        }
5560    }
5561
5562    unsafe impl<D: fidl::encoding::ResourceDialect>
5563        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastLoopbackResponse, D>
5564        for &BaseNetworkSocketGetIpMulticastLoopbackResponse
5565    {
5566        #[inline]
5567        unsafe fn encode(
5568            self,
5569            encoder: &mut fidl::encoding::Encoder<'_, D>,
5570            offset: usize,
5571            _depth: fidl::encoding::Depth,
5572        ) -> fidl::Result<()> {
5573            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastLoopbackResponse>(offset);
5574            // Delegate to tuple encoding.
5575            fidl::encoding::Encode::<BaseNetworkSocketGetIpMulticastLoopbackResponse, D>::encode(
5576                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5577                encoder,
5578                offset,
5579                _depth,
5580            )
5581        }
5582    }
5583    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5584        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastLoopbackResponse, D> for (T0,)
5585    {
5586        #[inline]
5587        unsafe fn encode(
5588            self,
5589            encoder: &mut fidl::encoding::Encoder<'_, D>,
5590            offset: usize,
5591            depth: fidl::encoding::Depth,
5592        ) -> fidl::Result<()> {
5593            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastLoopbackResponse>(offset);
5594            // Zero out padding regions. There's no need to apply masks
5595            // because the unmasked parts will be overwritten by fields.
5596            // Write the fields.
5597            self.0.encode(encoder, offset + 0, depth)?;
5598            Ok(())
5599        }
5600    }
5601
5602    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5603        for BaseNetworkSocketGetIpMulticastLoopbackResponse
5604    {
5605        #[inline(always)]
5606        fn new_empty() -> Self {
5607            Self { value: fidl::new_empty!(bool, D) }
5608        }
5609
5610        #[inline]
5611        unsafe fn decode(
5612            &mut self,
5613            decoder: &mut fidl::encoding::Decoder<'_, D>,
5614            offset: usize,
5615            _depth: fidl::encoding::Depth,
5616        ) -> fidl::Result<()> {
5617            decoder.debug_check_bounds::<Self>(offset);
5618            // Verify that padding bytes are zero.
5619            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5620            Ok(())
5621        }
5622    }
5623
5624    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastTtlResponse {
5625        type Borrowed<'a> = &'a Self;
5626        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5627            value
5628        }
5629    }
5630
5631    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastTtlResponse {
5632        type Owned = Self;
5633
5634        #[inline(always)]
5635        fn inline_align(_context: fidl::encoding::Context) -> usize {
5636            1
5637        }
5638
5639        #[inline(always)]
5640        fn inline_size(_context: fidl::encoding::Context) -> usize {
5641            1
5642        }
5643        #[inline(always)]
5644        fn encode_is_copy() -> bool {
5645            true
5646        }
5647
5648        #[inline(always)]
5649        fn decode_is_copy() -> bool {
5650            true
5651        }
5652    }
5653
5654    unsafe impl<D: fidl::encoding::ResourceDialect>
5655        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastTtlResponse, D>
5656        for &BaseNetworkSocketGetIpMulticastTtlResponse
5657    {
5658        #[inline]
5659        unsafe fn encode(
5660            self,
5661            encoder: &mut fidl::encoding::Encoder<'_, D>,
5662            offset: usize,
5663            _depth: fidl::encoding::Depth,
5664        ) -> fidl::Result<()> {
5665            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastTtlResponse>(offset);
5666            unsafe {
5667                // Copy the object into the buffer.
5668                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5669                (buf_ptr as *mut BaseNetworkSocketGetIpMulticastTtlResponse).write_unaligned(
5670                    (self as *const BaseNetworkSocketGetIpMulticastTtlResponse).read(),
5671                );
5672                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5673                // done second because the memcpy will write garbage to these bytes.
5674            }
5675            Ok(())
5676        }
5677    }
5678    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
5679        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastTtlResponse, D> for (T0,)
5680    {
5681        #[inline]
5682        unsafe fn encode(
5683            self,
5684            encoder: &mut fidl::encoding::Encoder<'_, D>,
5685            offset: usize,
5686            depth: fidl::encoding::Depth,
5687        ) -> fidl::Result<()> {
5688            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastTtlResponse>(offset);
5689            // Zero out padding regions. There's no need to apply masks
5690            // because the unmasked parts will be overwritten by fields.
5691            // Write the fields.
5692            self.0.encode(encoder, offset + 0, depth)?;
5693            Ok(())
5694        }
5695    }
5696
5697    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5698        for BaseNetworkSocketGetIpMulticastTtlResponse
5699    {
5700        #[inline(always)]
5701        fn new_empty() -> Self {
5702            Self { value: fidl::new_empty!(u8, D) }
5703        }
5704
5705        #[inline]
5706        unsafe fn decode(
5707            &mut self,
5708            decoder: &mut fidl::encoding::Decoder<'_, D>,
5709            offset: usize,
5710            _depth: fidl::encoding::Depth,
5711        ) -> fidl::Result<()> {
5712            decoder.debug_check_bounds::<Self>(offset);
5713            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5714            // Verify that padding bytes are zero.
5715            // Copy from the buffer into the object.
5716            unsafe {
5717                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
5718            }
5719            Ok(())
5720        }
5721    }
5722
5723    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpPacketInfoResponse {
5724        type Borrowed<'a> = &'a Self;
5725        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5726            value
5727        }
5728    }
5729
5730    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpPacketInfoResponse {
5731        type Owned = Self;
5732
5733        #[inline(always)]
5734        fn inline_align(_context: fidl::encoding::Context) -> usize {
5735            1
5736        }
5737
5738        #[inline(always)]
5739        fn inline_size(_context: fidl::encoding::Context) -> usize {
5740            1
5741        }
5742    }
5743
5744    unsafe impl<D: fidl::encoding::ResourceDialect>
5745        fidl::encoding::Encode<BaseNetworkSocketGetIpPacketInfoResponse, D>
5746        for &BaseNetworkSocketGetIpPacketInfoResponse
5747    {
5748        #[inline]
5749        unsafe fn encode(
5750            self,
5751            encoder: &mut fidl::encoding::Encoder<'_, D>,
5752            offset: usize,
5753            _depth: fidl::encoding::Depth,
5754        ) -> fidl::Result<()> {
5755            encoder.debug_check_bounds::<BaseNetworkSocketGetIpPacketInfoResponse>(offset);
5756            // Delegate to tuple encoding.
5757            fidl::encoding::Encode::<BaseNetworkSocketGetIpPacketInfoResponse, D>::encode(
5758                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5759                encoder,
5760                offset,
5761                _depth,
5762            )
5763        }
5764    }
5765    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5766        fidl::encoding::Encode<BaseNetworkSocketGetIpPacketInfoResponse, D> for (T0,)
5767    {
5768        #[inline]
5769        unsafe fn encode(
5770            self,
5771            encoder: &mut fidl::encoding::Encoder<'_, D>,
5772            offset: usize,
5773            depth: fidl::encoding::Depth,
5774        ) -> fidl::Result<()> {
5775            encoder.debug_check_bounds::<BaseNetworkSocketGetIpPacketInfoResponse>(offset);
5776            // Zero out padding regions. There's no need to apply masks
5777            // because the unmasked parts will be overwritten by fields.
5778            // Write the fields.
5779            self.0.encode(encoder, offset + 0, depth)?;
5780            Ok(())
5781        }
5782    }
5783
5784    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5785        for BaseNetworkSocketGetIpPacketInfoResponse
5786    {
5787        #[inline(always)]
5788        fn new_empty() -> Self {
5789            Self { value: fidl::new_empty!(bool, D) }
5790        }
5791
5792        #[inline]
5793        unsafe fn decode(
5794            &mut self,
5795            decoder: &mut fidl::encoding::Decoder<'_, D>,
5796            offset: usize,
5797            _depth: fidl::encoding::Depth,
5798        ) -> fidl::Result<()> {
5799            decoder.debug_check_bounds::<Self>(offset);
5800            // Verify that padding bytes are zero.
5801            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5802            Ok(())
5803        }
5804    }
5805
5806    impl fidl::encoding::ValueTypeMarker
5807        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5808    {
5809        type Borrowed<'a> = &'a Self;
5810        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5811            value
5812        }
5813    }
5814
5815    unsafe impl fidl::encoding::TypeMarker
5816        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5817    {
5818        type Owned = Self;
5819
5820        #[inline(always)]
5821        fn inline_align(_context: fidl::encoding::Context) -> usize {
5822            1
5823        }
5824
5825        #[inline(always)]
5826        fn inline_size(_context: fidl::encoding::Context) -> usize {
5827            1
5828        }
5829    }
5830
5831    unsafe impl<D: fidl::encoding::ResourceDialect>
5832        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse, D>
5833        for &BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5834    {
5835        #[inline]
5836        unsafe fn encode(
5837            self,
5838            encoder: &mut fidl::encoding::Encoder<'_, D>,
5839            offset: usize,
5840            _depth: fidl::encoding::Depth,
5841        ) -> fidl::Result<()> {
5842            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse>(offset);
5843            // Delegate to tuple encoding.
5844            fidl::encoding::Encode::<
5845                BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse,
5846                D,
5847            >::encode(
5848                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5849                encoder,
5850                offset,
5851                _depth,
5852            )
5853        }
5854    }
5855    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5856        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse, D>
5857        for (T0,)
5858    {
5859        #[inline]
5860        unsafe fn encode(
5861            self,
5862            encoder: &mut fidl::encoding::Encoder<'_, D>,
5863            offset: usize,
5864            depth: fidl::encoding::Depth,
5865        ) -> fidl::Result<()> {
5866            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse>(offset);
5867            // Zero out padding regions. There's no need to apply masks
5868            // because the unmasked parts will be overwritten by fields.
5869            // Write the fields.
5870            self.0.encode(encoder, offset + 0, depth)?;
5871            Ok(())
5872        }
5873    }
5874
5875    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5876        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5877    {
5878        #[inline(always)]
5879        fn new_empty() -> Self {
5880            Self { value: fidl::new_empty!(bool, D) }
5881        }
5882
5883        #[inline]
5884        unsafe fn decode(
5885            &mut self,
5886            decoder: &mut fidl::encoding::Decoder<'_, D>,
5887            offset: usize,
5888            _depth: fidl::encoding::Depth,
5889        ) -> fidl::Result<()> {
5890            decoder.debug_check_bounds::<Self>(offset);
5891            // Verify that padding bytes are zero.
5892            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5893            Ok(())
5894        }
5895    }
5896
5897    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpReceiveTtlResponse {
5898        type Borrowed<'a> = &'a Self;
5899        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5900            value
5901        }
5902    }
5903
5904    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpReceiveTtlResponse {
5905        type Owned = Self;
5906
5907        #[inline(always)]
5908        fn inline_align(_context: fidl::encoding::Context) -> usize {
5909            1
5910        }
5911
5912        #[inline(always)]
5913        fn inline_size(_context: fidl::encoding::Context) -> usize {
5914            1
5915        }
5916    }
5917
5918    unsafe impl<D: fidl::encoding::ResourceDialect>
5919        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTtlResponse, D>
5920        for &BaseNetworkSocketGetIpReceiveTtlResponse
5921    {
5922        #[inline]
5923        unsafe fn encode(
5924            self,
5925            encoder: &mut fidl::encoding::Encoder<'_, D>,
5926            offset: usize,
5927            _depth: fidl::encoding::Depth,
5928        ) -> fidl::Result<()> {
5929            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveTtlResponse>(offset);
5930            // Delegate to tuple encoding.
5931            fidl::encoding::Encode::<BaseNetworkSocketGetIpReceiveTtlResponse, D>::encode(
5932                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5933                encoder,
5934                offset,
5935                _depth,
5936            )
5937        }
5938    }
5939    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5940        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTtlResponse, D> for (T0,)
5941    {
5942        #[inline]
5943        unsafe fn encode(
5944            self,
5945            encoder: &mut fidl::encoding::Encoder<'_, D>,
5946            offset: usize,
5947            depth: fidl::encoding::Depth,
5948        ) -> fidl::Result<()> {
5949            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveTtlResponse>(offset);
5950            // Zero out padding regions. There's no need to apply masks
5951            // because the unmasked parts will be overwritten by fields.
5952            // Write the fields.
5953            self.0.encode(encoder, offset + 0, depth)?;
5954            Ok(())
5955        }
5956    }
5957
5958    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5959        for BaseNetworkSocketGetIpReceiveTtlResponse
5960    {
5961        #[inline(always)]
5962        fn new_empty() -> Self {
5963            Self { value: fidl::new_empty!(bool, D) }
5964        }
5965
5966        #[inline]
5967        unsafe fn decode(
5968            &mut self,
5969            decoder: &mut fidl::encoding::Decoder<'_, D>,
5970            offset: usize,
5971            _depth: fidl::encoding::Depth,
5972        ) -> fidl::Result<()> {
5973            decoder.debug_check_bounds::<Self>(offset);
5974            // Verify that padding bytes are zero.
5975            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5976            Ok(())
5977        }
5978    }
5979
5980    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
5981        type Borrowed<'a> = &'a Self;
5982        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5983            value
5984        }
5985    }
5986
5987    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
5988        type Owned = Self;
5989
5990        #[inline(always)]
5991        fn inline_align(_context: fidl::encoding::Context) -> usize {
5992            1
5993        }
5994
5995        #[inline(always)]
5996        fn inline_size(_context: fidl::encoding::Context) -> usize {
5997            1
5998        }
5999    }
6000
6001    unsafe impl<D: fidl::encoding::ResourceDialect>
6002        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D>
6003        for &BaseNetworkSocketGetIpReceiveTypeOfServiceResponse
6004    {
6005        #[inline]
6006        unsafe fn encode(
6007            self,
6008            encoder: &mut fidl::encoding::Encoder<'_, D>,
6009            offset: usize,
6010            _depth: fidl::encoding::Depth,
6011        ) -> fidl::Result<()> {
6012            encoder
6013                .debug_check_bounds::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse>(offset);
6014            // Delegate to tuple encoding.
6015            fidl::encoding::Encode::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D>::encode(
6016                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6017                encoder,
6018                offset,
6019                _depth,
6020            )
6021        }
6022    }
6023    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6024        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D> for (T0,)
6025    {
6026        #[inline]
6027        unsafe fn encode(
6028            self,
6029            encoder: &mut fidl::encoding::Encoder<'_, D>,
6030            offset: usize,
6031            depth: fidl::encoding::Depth,
6032        ) -> fidl::Result<()> {
6033            encoder
6034                .debug_check_bounds::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse>(offset);
6035            // Zero out padding regions. There's no need to apply masks
6036            // because the unmasked parts will be overwritten by fields.
6037            // Write the fields.
6038            self.0.encode(encoder, offset + 0, depth)?;
6039            Ok(())
6040        }
6041    }
6042
6043    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6044        for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse
6045    {
6046        #[inline(always)]
6047        fn new_empty() -> Self {
6048            Self { value: fidl::new_empty!(bool, D) }
6049        }
6050
6051        #[inline]
6052        unsafe fn decode(
6053            &mut self,
6054            decoder: &mut fidl::encoding::Decoder<'_, D>,
6055            offset: usize,
6056            _depth: fidl::encoding::Depth,
6057        ) -> fidl::Result<()> {
6058            decoder.debug_check_bounds::<Self>(offset);
6059            // Verify that padding bytes are zero.
6060            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6061            Ok(())
6062        }
6063    }
6064
6065    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTransparentResponse {
6066        type Borrowed<'a> = &'a Self;
6067        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6068            value
6069        }
6070    }
6071
6072    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTransparentResponse {
6073        type Owned = Self;
6074
6075        #[inline(always)]
6076        fn inline_align(_context: fidl::encoding::Context) -> usize {
6077            1
6078        }
6079
6080        #[inline(always)]
6081        fn inline_size(_context: fidl::encoding::Context) -> usize {
6082            1
6083        }
6084    }
6085
6086    unsafe impl<D: fidl::encoding::ResourceDialect>
6087        fidl::encoding::Encode<BaseNetworkSocketGetIpTransparentResponse, D>
6088        for &BaseNetworkSocketGetIpTransparentResponse
6089    {
6090        #[inline]
6091        unsafe fn encode(
6092            self,
6093            encoder: &mut fidl::encoding::Encoder<'_, D>,
6094            offset: usize,
6095            _depth: fidl::encoding::Depth,
6096        ) -> fidl::Result<()> {
6097            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTransparentResponse>(offset);
6098            // Delegate to tuple encoding.
6099            fidl::encoding::Encode::<BaseNetworkSocketGetIpTransparentResponse, D>::encode(
6100                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6101                encoder,
6102                offset,
6103                _depth,
6104            )
6105        }
6106    }
6107    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6108        fidl::encoding::Encode<BaseNetworkSocketGetIpTransparentResponse, D> for (T0,)
6109    {
6110        #[inline]
6111        unsafe fn encode(
6112            self,
6113            encoder: &mut fidl::encoding::Encoder<'_, D>,
6114            offset: usize,
6115            depth: fidl::encoding::Depth,
6116        ) -> fidl::Result<()> {
6117            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTransparentResponse>(offset);
6118            // Zero out padding regions. There's no need to apply masks
6119            // because the unmasked parts will be overwritten by fields.
6120            // Write the fields.
6121            self.0.encode(encoder, offset + 0, depth)?;
6122            Ok(())
6123        }
6124    }
6125
6126    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6127        for BaseNetworkSocketGetIpTransparentResponse
6128    {
6129        #[inline(always)]
6130        fn new_empty() -> Self {
6131            Self { value: fidl::new_empty!(bool, D) }
6132        }
6133
6134        #[inline]
6135        unsafe fn decode(
6136            &mut self,
6137            decoder: &mut fidl::encoding::Decoder<'_, D>,
6138            offset: usize,
6139            _depth: fidl::encoding::Depth,
6140        ) -> fidl::Result<()> {
6141            decoder.debug_check_bounds::<Self>(offset);
6142            // Verify that padding bytes are zero.
6143            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6144            Ok(())
6145        }
6146    }
6147
6148    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTtlResponse {
6149        type Borrowed<'a> = &'a Self;
6150        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6151            value
6152        }
6153    }
6154
6155    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTtlResponse {
6156        type Owned = Self;
6157
6158        #[inline(always)]
6159        fn inline_align(_context: fidl::encoding::Context) -> usize {
6160            1
6161        }
6162
6163        #[inline(always)]
6164        fn inline_size(_context: fidl::encoding::Context) -> usize {
6165            1
6166        }
6167        #[inline(always)]
6168        fn encode_is_copy() -> bool {
6169            true
6170        }
6171
6172        #[inline(always)]
6173        fn decode_is_copy() -> bool {
6174            true
6175        }
6176    }
6177
6178    unsafe impl<D: fidl::encoding::ResourceDialect>
6179        fidl::encoding::Encode<BaseNetworkSocketGetIpTtlResponse, D>
6180        for &BaseNetworkSocketGetIpTtlResponse
6181    {
6182        #[inline]
6183        unsafe fn encode(
6184            self,
6185            encoder: &mut fidl::encoding::Encoder<'_, D>,
6186            offset: usize,
6187            _depth: fidl::encoding::Depth,
6188        ) -> fidl::Result<()> {
6189            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTtlResponse>(offset);
6190            unsafe {
6191                // Copy the object into the buffer.
6192                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6193                (buf_ptr as *mut BaseNetworkSocketGetIpTtlResponse)
6194                    .write_unaligned((self as *const BaseNetworkSocketGetIpTtlResponse).read());
6195                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6196                // done second because the memcpy will write garbage to these bytes.
6197            }
6198            Ok(())
6199        }
6200    }
6201    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6202        fidl::encoding::Encode<BaseNetworkSocketGetIpTtlResponse, D> for (T0,)
6203    {
6204        #[inline]
6205        unsafe fn encode(
6206            self,
6207            encoder: &mut fidl::encoding::Encoder<'_, D>,
6208            offset: usize,
6209            depth: fidl::encoding::Depth,
6210        ) -> fidl::Result<()> {
6211            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTtlResponse>(offset);
6212            // Zero out padding regions. There's no need to apply masks
6213            // because the unmasked parts will be overwritten by fields.
6214            // Write the fields.
6215            self.0.encode(encoder, offset + 0, depth)?;
6216            Ok(())
6217        }
6218    }
6219
6220    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6221        for BaseNetworkSocketGetIpTtlResponse
6222    {
6223        #[inline(always)]
6224        fn new_empty() -> Self {
6225            Self { value: fidl::new_empty!(u8, D) }
6226        }
6227
6228        #[inline]
6229        unsafe fn decode(
6230            &mut self,
6231            decoder: &mut fidl::encoding::Decoder<'_, D>,
6232            offset: usize,
6233            _depth: fidl::encoding::Depth,
6234        ) -> fidl::Result<()> {
6235            decoder.debug_check_bounds::<Self>(offset);
6236            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6237            // Verify that padding bytes are zero.
6238            // Copy from the buffer into the object.
6239            unsafe {
6240                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6241            }
6242            Ok(())
6243        }
6244    }
6245
6246    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTypeOfServiceResponse {
6247        type Borrowed<'a> = &'a Self;
6248        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6249            value
6250        }
6251    }
6252
6253    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTypeOfServiceResponse {
6254        type Owned = Self;
6255
6256        #[inline(always)]
6257        fn inline_align(_context: fidl::encoding::Context) -> usize {
6258            1
6259        }
6260
6261        #[inline(always)]
6262        fn inline_size(_context: fidl::encoding::Context) -> usize {
6263            1
6264        }
6265        #[inline(always)]
6266        fn encode_is_copy() -> bool {
6267            true
6268        }
6269
6270        #[inline(always)]
6271        fn decode_is_copy() -> bool {
6272            true
6273        }
6274    }
6275
6276    unsafe impl<D: fidl::encoding::ResourceDialect>
6277        fidl::encoding::Encode<BaseNetworkSocketGetIpTypeOfServiceResponse, D>
6278        for &BaseNetworkSocketGetIpTypeOfServiceResponse
6279    {
6280        #[inline]
6281        unsafe fn encode(
6282            self,
6283            encoder: &mut fidl::encoding::Encoder<'_, D>,
6284            offset: usize,
6285            _depth: fidl::encoding::Depth,
6286        ) -> fidl::Result<()> {
6287            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTypeOfServiceResponse>(offset);
6288            unsafe {
6289                // Copy the object into the buffer.
6290                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6291                (buf_ptr as *mut BaseNetworkSocketGetIpTypeOfServiceResponse).write_unaligned(
6292                    (self as *const BaseNetworkSocketGetIpTypeOfServiceResponse).read(),
6293                );
6294                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6295                // done second because the memcpy will write garbage to these bytes.
6296            }
6297            Ok(())
6298        }
6299    }
6300    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6301        fidl::encoding::Encode<BaseNetworkSocketGetIpTypeOfServiceResponse, D> for (T0,)
6302    {
6303        #[inline]
6304        unsafe fn encode(
6305            self,
6306            encoder: &mut fidl::encoding::Encoder<'_, D>,
6307            offset: usize,
6308            depth: fidl::encoding::Depth,
6309        ) -> fidl::Result<()> {
6310            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTypeOfServiceResponse>(offset);
6311            // Zero out padding regions. There's no need to apply masks
6312            // because the unmasked parts will be overwritten by fields.
6313            // Write the fields.
6314            self.0.encode(encoder, offset + 0, depth)?;
6315            Ok(())
6316        }
6317    }
6318
6319    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6320        for BaseNetworkSocketGetIpTypeOfServiceResponse
6321    {
6322        #[inline(always)]
6323        fn new_empty() -> Self {
6324            Self { value: fidl::new_empty!(u8, D) }
6325        }
6326
6327        #[inline]
6328        unsafe fn decode(
6329            &mut self,
6330            decoder: &mut fidl::encoding::Decoder<'_, D>,
6331            offset: usize,
6332            _depth: fidl::encoding::Depth,
6333        ) -> fidl::Result<()> {
6334            decoder.debug_check_bounds::<Self>(offset);
6335            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6336            // Verify that padding bytes are zero.
6337            // Copy from the buffer into the object.
6338            unsafe {
6339                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6340            }
6341            Ok(())
6342        }
6343    }
6344
6345    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastHopsResponse {
6346        type Borrowed<'a> = &'a Self;
6347        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6348            value
6349        }
6350    }
6351
6352    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastHopsResponse {
6353        type Owned = Self;
6354
6355        #[inline(always)]
6356        fn inline_align(_context: fidl::encoding::Context) -> usize {
6357            1
6358        }
6359
6360        #[inline(always)]
6361        fn inline_size(_context: fidl::encoding::Context) -> usize {
6362            1
6363        }
6364        #[inline(always)]
6365        fn encode_is_copy() -> bool {
6366            true
6367        }
6368
6369        #[inline(always)]
6370        fn decode_is_copy() -> bool {
6371            true
6372        }
6373    }
6374
6375    unsafe impl<D: fidl::encoding::ResourceDialect>
6376        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastHopsResponse, D>
6377        for &BaseNetworkSocketGetIpv6MulticastHopsResponse
6378    {
6379        #[inline]
6380        unsafe fn encode(
6381            self,
6382            encoder: &mut fidl::encoding::Encoder<'_, D>,
6383            offset: usize,
6384            _depth: fidl::encoding::Depth,
6385        ) -> fidl::Result<()> {
6386            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastHopsResponse>(offset);
6387            unsafe {
6388                // Copy the object into the buffer.
6389                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6390                (buf_ptr as *mut BaseNetworkSocketGetIpv6MulticastHopsResponse).write_unaligned(
6391                    (self as *const BaseNetworkSocketGetIpv6MulticastHopsResponse).read(),
6392                );
6393                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6394                // done second because the memcpy will write garbage to these bytes.
6395            }
6396            Ok(())
6397        }
6398    }
6399    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6400        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastHopsResponse, D> for (T0,)
6401    {
6402        #[inline]
6403        unsafe fn encode(
6404            self,
6405            encoder: &mut fidl::encoding::Encoder<'_, D>,
6406            offset: usize,
6407            depth: fidl::encoding::Depth,
6408        ) -> fidl::Result<()> {
6409            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastHopsResponse>(offset);
6410            // Zero out padding regions. There's no need to apply masks
6411            // because the unmasked parts will be overwritten by fields.
6412            // Write the fields.
6413            self.0.encode(encoder, offset + 0, depth)?;
6414            Ok(())
6415        }
6416    }
6417
6418    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6419        for BaseNetworkSocketGetIpv6MulticastHopsResponse
6420    {
6421        #[inline(always)]
6422        fn new_empty() -> Self {
6423            Self { value: fidl::new_empty!(u8, D) }
6424        }
6425
6426        #[inline]
6427        unsafe fn decode(
6428            &mut self,
6429            decoder: &mut fidl::encoding::Decoder<'_, D>,
6430            offset: usize,
6431            _depth: fidl::encoding::Depth,
6432        ) -> fidl::Result<()> {
6433            decoder.debug_check_bounds::<Self>(offset);
6434            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6435            // Verify that padding bytes are zero.
6436            // Copy from the buffer into the object.
6437            unsafe {
6438                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6439            }
6440            Ok(())
6441        }
6442    }
6443
6444    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
6445        type Borrowed<'a> = &'a Self;
6446        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6447            value
6448        }
6449    }
6450
6451    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
6452        type Owned = Self;
6453
6454        #[inline(always)]
6455        fn inline_align(_context: fidl::encoding::Context) -> usize {
6456            8
6457        }
6458
6459        #[inline(always)]
6460        fn inline_size(_context: fidl::encoding::Context) -> usize {
6461            8
6462        }
6463        #[inline(always)]
6464        fn encode_is_copy() -> bool {
6465            true
6466        }
6467
6468        #[inline(always)]
6469        fn decode_is_copy() -> bool {
6470            true
6471        }
6472    }
6473
6474    unsafe impl<D: fidl::encoding::ResourceDialect>
6475        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastInterfaceResponse, D>
6476        for &BaseNetworkSocketGetIpv6MulticastInterfaceResponse
6477    {
6478        #[inline]
6479        unsafe fn encode(
6480            self,
6481            encoder: &mut fidl::encoding::Encoder<'_, D>,
6482            offset: usize,
6483            _depth: fidl::encoding::Depth,
6484        ) -> fidl::Result<()> {
6485            encoder
6486                .debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastInterfaceResponse>(offset);
6487            unsafe {
6488                // Copy the object into the buffer.
6489                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6490                (buf_ptr as *mut BaseNetworkSocketGetIpv6MulticastInterfaceResponse)
6491                    .write_unaligned(
6492                        (self as *const BaseNetworkSocketGetIpv6MulticastInterfaceResponse).read(),
6493                    );
6494                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6495                // done second because the memcpy will write garbage to these bytes.
6496            }
6497            Ok(())
6498        }
6499    }
6500    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
6501        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastInterfaceResponse, D> for (T0,)
6502    {
6503        #[inline]
6504        unsafe fn encode(
6505            self,
6506            encoder: &mut fidl::encoding::Encoder<'_, D>,
6507            offset: usize,
6508            depth: fidl::encoding::Depth,
6509        ) -> fidl::Result<()> {
6510            encoder
6511                .debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastInterfaceResponse>(offset);
6512            // Zero out padding regions. There's no need to apply masks
6513            // because the unmasked parts will be overwritten by fields.
6514            // Write the fields.
6515            self.0.encode(encoder, offset + 0, depth)?;
6516            Ok(())
6517        }
6518    }
6519
6520    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6521        for BaseNetworkSocketGetIpv6MulticastInterfaceResponse
6522    {
6523        #[inline(always)]
6524        fn new_empty() -> Self {
6525            Self { value: fidl::new_empty!(u64, D) }
6526        }
6527
6528        #[inline]
6529        unsafe fn decode(
6530            &mut self,
6531            decoder: &mut fidl::encoding::Decoder<'_, D>,
6532            offset: usize,
6533            _depth: fidl::encoding::Depth,
6534        ) -> fidl::Result<()> {
6535            decoder.debug_check_bounds::<Self>(offset);
6536            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6537            // Verify that padding bytes are zero.
6538            // Copy from the buffer into the object.
6539            unsafe {
6540                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
6541            }
6542            Ok(())
6543        }
6544    }
6545
6546    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
6547        type Borrowed<'a> = &'a Self;
6548        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6549            value
6550        }
6551    }
6552
6553    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
6554        type Owned = Self;
6555
6556        #[inline(always)]
6557        fn inline_align(_context: fidl::encoding::Context) -> usize {
6558            1
6559        }
6560
6561        #[inline(always)]
6562        fn inline_size(_context: fidl::encoding::Context) -> usize {
6563            1
6564        }
6565    }
6566
6567    unsafe impl<D: fidl::encoding::ResourceDialect>
6568        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D>
6569        for &BaseNetworkSocketGetIpv6MulticastLoopbackResponse
6570    {
6571        #[inline]
6572        unsafe fn encode(
6573            self,
6574            encoder: &mut fidl::encoding::Encoder<'_, D>,
6575            offset: usize,
6576            _depth: fidl::encoding::Depth,
6577        ) -> fidl::Result<()> {
6578            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse>(offset);
6579            // Delegate to tuple encoding.
6580            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D>::encode(
6581                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6582                encoder,
6583                offset,
6584                _depth,
6585            )
6586        }
6587    }
6588    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6589        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D> for (T0,)
6590    {
6591        #[inline]
6592        unsafe fn encode(
6593            self,
6594            encoder: &mut fidl::encoding::Encoder<'_, D>,
6595            offset: usize,
6596            depth: fidl::encoding::Depth,
6597        ) -> fidl::Result<()> {
6598            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse>(offset);
6599            // Zero out padding regions. There's no need to apply masks
6600            // because the unmasked parts will be overwritten by fields.
6601            // Write the fields.
6602            self.0.encode(encoder, offset + 0, depth)?;
6603            Ok(())
6604        }
6605    }
6606
6607    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6608        for BaseNetworkSocketGetIpv6MulticastLoopbackResponse
6609    {
6610        #[inline(always)]
6611        fn new_empty() -> Self {
6612            Self { value: fidl::new_empty!(bool, D) }
6613        }
6614
6615        #[inline]
6616        unsafe fn decode(
6617            &mut self,
6618            decoder: &mut fidl::encoding::Decoder<'_, D>,
6619            offset: usize,
6620            _depth: fidl::encoding::Depth,
6621        ) -> fidl::Result<()> {
6622            decoder.debug_check_bounds::<Self>(offset);
6623            // Verify that padding bytes are zero.
6624            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6625            Ok(())
6626        }
6627    }
6628
6629    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6OnlyResponse {
6630        type Borrowed<'a> = &'a Self;
6631        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6632            value
6633        }
6634    }
6635
6636    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6OnlyResponse {
6637        type Owned = Self;
6638
6639        #[inline(always)]
6640        fn inline_align(_context: fidl::encoding::Context) -> usize {
6641            1
6642        }
6643
6644        #[inline(always)]
6645        fn inline_size(_context: fidl::encoding::Context) -> usize {
6646            1
6647        }
6648    }
6649
6650    unsafe impl<D: fidl::encoding::ResourceDialect>
6651        fidl::encoding::Encode<BaseNetworkSocketGetIpv6OnlyResponse, D>
6652        for &BaseNetworkSocketGetIpv6OnlyResponse
6653    {
6654        #[inline]
6655        unsafe fn encode(
6656            self,
6657            encoder: &mut fidl::encoding::Encoder<'_, D>,
6658            offset: usize,
6659            _depth: fidl::encoding::Depth,
6660        ) -> fidl::Result<()> {
6661            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6OnlyResponse>(offset);
6662            // Delegate to tuple encoding.
6663            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6OnlyResponse, D>::encode(
6664                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6665                encoder,
6666                offset,
6667                _depth,
6668            )
6669        }
6670    }
6671    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6672        fidl::encoding::Encode<BaseNetworkSocketGetIpv6OnlyResponse, D> for (T0,)
6673    {
6674        #[inline]
6675        unsafe fn encode(
6676            self,
6677            encoder: &mut fidl::encoding::Encoder<'_, D>,
6678            offset: usize,
6679            depth: fidl::encoding::Depth,
6680        ) -> fidl::Result<()> {
6681            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6OnlyResponse>(offset);
6682            // Zero out padding regions. There's no need to apply masks
6683            // because the unmasked parts will be overwritten by fields.
6684            // Write the fields.
6685            self.0.encode(encoder, offset + 0, depth)?;
6686            Ok(())
6687        }
6688    }
6689
6690    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6691        for BaseNetworkSocketGetIpv6OnlyResponse
6692    {
6693        #[inline(always)]
6694        fn new_empty() -> Self {
6695            Self { value: fidl::new_empty!(bool, D) }
6696        }
6697
6698        #[inline]
6699        unsafe fn decode(
6700            &mut self,
6701            decoder: &mut fidl::encoding::Decoder<'_, D>,
6702            offset: usize,
6703            _depth: fidl::encoding::Depth,
6704        ) -> fidl::Result<()> {
6705            decoder.debug_check_bounds::<Self>(offset);
6706            // Verify that padding bytes are zero.
6707            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6708            Ok(())
6709        }
6710    }
6711
6712    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
6713        type Borrowed<'a> = &'a Self;
6714        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6715            value
6716        }
6717    }
6718
6719    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
6720        type Owned = Self;
6721
6722        #[inline(always)]
6723        fn inline_align(_context: fidl::encoding::Context) -> usize {
6724            1
6725        }
6726
6727        #[inline(always)]
6728        fn inline_size(_context: fidl::encoding::Context) -> usize {
6729            1
6730        }
6731    }
6732
6733    unsafe impl<D: fidl::encoding::ResourceDialect>
6734        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D>
6735        for &BaseNetworkSocketGetIpv6ReceiveHopLimitResponse
6736    {
6737        #[inline]
6738        unsafe fn encode(
6739            self,
6740            encoder: &mut fidl::encoding::Encoder<'_, D>,
6741            offset: usize,
6742            _depth: fidl::encoding::Depth,
6743        ) -> fidl::Result<()> {
6744            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse>(offset);
6745            // Delegate to tuple encoding.
6746            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D>::encode(
6747                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6748                encoder,
6749                offset,
6750                _depth,
6751            )
6752        }
6753    }
6754    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6755        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D> for (T0,)
6756    {
6757        #[inline]
6758        unsafe fn encode(
6759            self,
6760            encoder: &mut fidl::encoding::Encoder<'_, D>,
6761            offset: usize,
6762            depth: fidl::encoding::Depth,
6763        ) -> fidl::Result<()> {
6764            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse>(offset);
6765            // Zero out padding regions. There's no need to apply masks
6766            // because the unmasked parts will be overwritten by fields.
6767            // Write the fields.
6768            self.0.encode(encoder, offset + 0, depth)?;
6769            Ok(())
6770        }
6771    }
6772
6773    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6774        for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse
6775    {
6776        #[inline(always)]
6777        fn new_empty() -> Self {
6778            Self { value: fidl::new_empty!(bool, D) }
6779        }
6780
6781        #[inline]
6782        unsafe fn decode(
6783            &mut self,
6784            decoder: &mut fidl::encoding::Decoder<'_, D>,
6785            offset: usize,
6786            _depth: fidl::encoding::Depth,
6787        ) -> fidl::Result<()> {
6788            decoder.debug_check_bounds::<Self>(offset);
6789            // Verify that padding bytes are zero.
6790            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6791            Ok(())
6792        }
6793    }
6794
6795    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
6796        type Borrowed<'a> = &'a Self;
6797        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6798            value
6799        }
6800    }
6801
6802    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
6803        type Owned = Self;
6804
6805        #[inline(always)]
6806        fn inline_align(_context: fidl::encoding::Context) -> usize {
6807            1
6808        }
6809
6810        #[inline(always)]
6811        fn inline_size(_context: fidl::encoding::Context) -> usize {
6812            1
6813        }
6814    }
6815
6816    unsafe impl<D: fidl::encoding::ResourceDialect>
6817        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D>
6818        for &BaseNetworkSocketGetIpv6ReceivePacketInfoResponse
6819    {
6820        #[inline]
6821        unsafe fn encode(
6822            self,
6823            encoder: &mut fidl::encoding::Encoder<'_, D>,
6824            offset: usize,
6825            _depth: fidl::encoding::Depth,
6826        ) -> fidl::Result<()> {
6827            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse>(offset);
6828            // Delegate to tuple encoding.
6829            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D>::encode(
6830                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6831                encoder,
6832                offset,
6833                _depth,
6834            )
6835        }
6836    }
6837    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6838        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D> for (T0,)
6839    {
6840        #[inline]
6841        unsafe fn encode(
6842            self,
6843            encoder: &mut fidl::encoding::Encoder<'_, D>,
6844            offset: usize,
6845            depth: fidl::encoding::Depth,
6846        ) -> fidl::Result<()> {
6847            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse>(offset);
6848            // Zero out padding regions. There's no need to apply masks
6849            // because the unmasked parts will be overwritten by fields.
6850            // Write the fields.
6851            self.0.encode(encoder, offset + 0, depth)?;
6852            Ok(())
6853        }
6854    }
6855
6856    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6857        for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse
6858    {
6859        #[inline(always)]
6860        fn new_empty() -> Self {
6861            Self { value: fidl::new_empty!(bool, D) }
6862        }
6863
6864        #[inline]
6865        unsafe fn decode(
6866            &mut self,
6867            decoder: &mut fidl::encoding::Decoder<'_, D>,
6868            offset: usize,
6869            _depth: fidl::encoding::Depth,
6870        ) -> fidl::Result<()> {
6871            decoder.debug_check_bounds::<Self>(offset);
6872            // Verify that padding bytes are zero.
6873            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6874            Ok(())
6875        }
6876    }
6877
6878    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
6879        type Borrowed<'a> = &'a Self;
6880        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6881            value
6882        }
6883    }
6884
6885    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
6886        type Owned = Self;
6887
6888        #[inline(always)]
6889        fn inline_align(_context: fidl::encoding::Context) -> usize {
6890            1
6891        }
6892
6893        #[inline(always)]
6894        fn inline_size(_context: fidl::encoding::Context) -> usize {
6895            1
6896        }
6897    }
6898
6899    unsafe impl<D: fidl::encoding::ResourceDialect>
6900        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D>
6901        for &BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse
6902    {
6903        #[inline]
6904        unsafe fn encode(
6905            self,
6906            encoder: &mut fidl::encoding::Encoder<'_, D>,
6907            offset: usize,
6908            _depth: fidl::encoding::Depth,
6909        ) -> fidl::Result<()> {
6910            encoder
6911                .debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse>(offset);
6912            // Delegate to tuple encoding.
6913            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D>::encode(
6914                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6915                encoder,
6916                offset,
6917                _depth,
6918            )
6919        }
6920    }
6921    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6922        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D> for (T0,)
6923    {
6924        #[inline]
6925        unsafe fn encode(
6926            self,
6927            encoder: &mut fidl::encoding::Encoder<'_, D>,
6928            offset: usize,
6929            depth: fidl::encoding::Depth,
6930        ) -> fidl::Result<()> {
6931            encoder
6932                .debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse>(offset);
6933            // Zero out padding regions. There's no need to apply masks
6934            // because the unmasked parts will be overwritten by fields.
6935            // Write the fields.
6936            self.0.encode(encoder, offset + 0, depth)?;
6937            Ok(())
6938        }
6939    }
6940
6941    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6942        for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse
6943    {
6944        #[inline(always)]
6945        fn new_empty() -> Self {
6946            Self { value: fidl::new_empty!(bool, D) }
6947        }
6948
6949        #[inline]
6950        unsafe fn decode(
6951            &mut self,
6952            decoder: &mut fidl::encoding::Decoder<'_, D>,
6953            offset: usize,
6954            _depth: fidl::encoding::Depth,
6955        ) -> fidl::Result<()> {
6956            decoder.debug_check_bounds::<Self>(offset);
6957            // Verify that padding bytes are zero.
6958            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6959            Ok(())
6960        }
6961    }
6962
6963    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6TrafficClassResponse {
6964        type Borrowed<'a> = &'a Self;
6965        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6966            value
6967        }
6968    }
6969
6970    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6TrafficClassResponse {
6971        type Owned = Self;
6972
6973        #[inline(always)]
6974        fn inline_align(_context: fidl::encoding::Context) -> usize {
6975            1
6976        }
6977
6978        #[inline(always)]
6979        fn inline_size(_context: fidl::encoding::Context) -> usize {
6980            1
6981        }
6982        #[inline(always)]
6983        fn encode_is_copy() -> bool {
6984            true
6985        }
6986
6987        #[inline(always)]
6988        fn decode_is_copy() -> bool {
6989            true
6990        }
6991    }
6992
6993    unsafe impl<D: fidl::encoding::ResourceDialect>
6994        fidl::encoding::Encode<BaseNetworkSocketGetIpv6TrafficClassResponse, D>
6995        for &BaseNetworkSocketGetIpv6TrafficClassResponse
6996    {
6997        #[inline]
6998        unsafe fn encode(
6999            self,
7000            encoder: &mut fidl::encoding::Encoder<'_, D>,
7001            offset: usize,
7002            _depth: fidl::encoding::Depth,
7003        ) -> fidl::Result<()> {
7004            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6TrafficClassResponse>(offset);
7005            unsafe {
7006                // Copy the object into the buffer.
7007                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7008                (buf_ptr as *mut BaseNetworkSocketGetIpv6TrafficClassResponse).write_unaligned(
7009                    (self as *const BaseNetworkSocketGetIpv6TrafficClassResponse).read(),
7010                );
7011                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7012                // done second because the memcpy will write garbage to these bytes.
7013            }
7014            Ok(())
7015        }
7016    }
7017    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
7018        fidl::encoding::Encode<BaseNetworkSocketGetIpv6TrafficClassResponse, D> for (T0,)
7019    {
7020        #[inline]
7021        unsafe fn encode(
7022            self,
7023            encoder: &mut fidl::encoding::Encoder<'_, D>,
7024            offset: usize,
7025            depth: fidl::encoding::Depth,
7026        ) -> fidl::Result<()> {
7027            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6TrafficClassResponse>(offset);
7028            // Zero out padding regions. There's no need to apply masks
7029            // because the unmasked parts will be overwritten by fields.
7030            // Write the fields.
7031            self.0.encode(encoder, offset + 0, depth)?;
7032            Ok(())
7033        }
7034    }
7035
7036    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7037        for BaseNetworkSocketGetIpv6TrafficClassResponse
7038    {
7039        #[inline(always)]
7040        fn new_empty() -> Self {
7041            Self { value: fidl::new_empty!(u8, D) }
7042        }
7043
7044        #[inline]
7045        unsafe fn decode(
7046            &mut self,
7047            decoder: &mut fidl::encoding::Decoder<'_, D>,
7048            offset: usize,
7049            _depth: fidl::encoding::Depth,
7050        ) -> fidl::Result<()> {
7051            decoder.debug_check_bounds::<Self>(offset);
7052            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7053            // Verify that padding bytes are zero.
7054            // Copy from the buffer into the object.
7055            unsafe {
7056                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
7057            }
7058            Ok(())
7059        }
7060    }
7061
7062    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6UnicastHopsResponse {
7063        type Borrowed<'a> = &'a Self;
7064        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7065            value
7066        }
7067    }
7068
7069    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6UnicastHopsResponse {
7070        type Owned = Self;
7071
7072        #[inline(always)]
7073        fn inline_align(_context: fidl::encoding::Context) -> usize {
7074            1
7075        }
7076
7077        #[inline(always)]
7078        fn inline_size(_context: fidl::encoding::Context) -> usize {
7079            1
7080        }
7081        #[inline(always)]
7082        fn encode_is_copy() -> bool {
7083            true
7084        }
7085
7086        #[inline(always)]
7087        fn decode_is_copy() -> bool {
7088            true
7089        }
7090    }
7091
7092    unsafe impl<D: fidl::encoding::ResourceDialect>
7093        fidl::encoding::Encode<BaseNetworkSocketGetIpv6UnicastHopsResponse, D>
7094        for &BaseNetworkSocketGetIpv6UnicastHopsResponse
7095    {
7096        #[inline]
7097        unsafe fn encode(
7098            self,
7099            encoder: &mut fidl::encoding::Encoder<'_, D>,
7100            offset: usize,
7101            _depth: fidl::encoding::Depth,
7102        ) -> fidl::Result<()> {
7103            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6UnicastHopsResponse>(offset);
7104            unsafe {
7105                // Copy the object into the buffer.
7106                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7107                (buf_ptr as *mut BaseNetworkSocketGetIpv6UnicastHopsResponse).write_unaligned(
7108                    (self as *const BaseNetworkSocketGetIpv6UnicastHopsResponse).read(),
7109                );
7110                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7111                // done second because the memcpy will write garbage to these bytes.
7112            }
7113            Ok(())
7114        }
7115    }
7116    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
7117        fidl::encoding::Encode<BaseNetworkSocketGetIpv6UnicastHopsResponse, D> for (T0,)
7118    {
7119        #[inline]
7120        unsafe fn encode(
7121            self,
7122            encoder: &mut fidl::encoding::Encoder<'_, D>,
7123            offset: usize,
7124            depth: fidl::encoding::Depth,
7125        ) -> fidl::Result<()> {
7126            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6UnicastHopsResponse>(offset);
7127            // Zero out padding regions. There's no need to apply masks
7128            // because the unmasked parts will be overwritten by fields.
7129            // Write the fields.
7130            self.0.encode(encoder, offset + 0, depth)?;
7131            Ok(())
7132        }
7133    }
7134
7135    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7136        for BaseNetworkSocketGetIpv6UnicastHopsResponse
7137    {
7138        #[inline(always)]
7139        fn new_empty() -> Self {
7140            Self { value: fidl::new_empty!(u8, D) }
7141        }
7142
7143        #[inline]
7144        unsafe fn decode(
7145            &mut self,
7146            decoder: &mut fidl::encoding::Decoder<'_, D>,
7147            offset: usize,
7148            _depth: fidl::encoding::Depth,
7149        ) -> fidl::Result<()> {
7150            decoder.debug_check_bounds::<Self>(offset);
7151            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7152            // Verify that padding bytes are zero.
7153            // Copy from the buffer into the object.
7154            unsafe {
7155                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
7156            }
7157            Ok(())
7158        }
7159    }
7160
7161    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetOriginalDestinationResponse {
7162        type Borrowed<'a> = &'a Self;
7163        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7164            value
7165        }
7166    }
7167
7168    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetOriginalDestinationResponse {
7169        type Owned = Self;
7170
7171        #[inline(always)]
7172        fn inline_align(_context: fidl::encoding::Context) -> usize {
7173            8
7174        }
7175
7176        #[inline(always)]
7177        fn inline_size(_context: fidl::encoding::Context) -> usize {
7178            16
7179        }
7180    }
7181
7182    unsafe impl<D: fidl::encoding::ResourceDialect>
7183        fidl::encoding::Encode<BaseNetworkSocketGetOriginalDestinationResponse, D>
7184        for &BaseNetworkSocketGetOriginalDestinationResponse
7185    {
7186        #[inline]
7187        unsafe fn encode(
7188            self,
7189            encoder: &mut fidl::encoding::Encoder<'_, D>,
7190            offset: usize,
7191            _depth: fidl::encoding::Depth,
7192        ) -> fidl::Result<()> {
7193            encoder.debug_check_bounds::<BaseNetworkSocketGetOriginalDestinationResponse>(offset);
7194            // Delegate to tuple encoding.
7195            fidl::encoding::Encode::<BaseNetworkSocketGetOriginalDestinationResponse, D>::encode(
7196                (
7197                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
7198                ),
7199                encoder, offset, _depth
7200            )
7201        }
7202    }
7203    unsafe impl<
7204            D: fidl::encoding::ResourceDialect,
7205            T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7206        > fidl::encoding::Encode<BaseNetworkSocketGetOriginalDestinationResponse, D> for (T0,)
7207    {
7208        #[inline]
7209        unsafe fn encode(
7210            self,
7211            encoder: &mut fidl::encoding::Encoder<'_, D>,
7212            offset: usize,
7213            depth: fidl::encoding::Depth,
7214        ) -> fidl::Result<()> {
7215            encoder.debug_check_bounds::<BaseNetworkSocketGetOriginalDestinationResponse>(offset);
7216            // Zero out padding regions. There's no need to apply masks
7217            // because the unmasked parts will be overwritten by fields.
7218            // Write the fields.
7219            self.0.encode(encoder, offset + 0, depth)?;
7220            Ok(())
7221        }
7222    }
7223
7224    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7225        for BaseNetworkSocketGetOriginalDestinationResponse
7226    {
7227        #[inline(always)]
7228        fn new_empty() -> Self {
7229            Self { value: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7230        }
7231
7232        #[inline]
7233        unsafe fn decode(
7234            &mut self,
7235            decoder: &mut fidl::encoding::Decoder<'_, D>,
7236            offset: usize,
7237            _depth: fidl::encoding::Depth,
7238        ) -> fidl::Result<()> {
7239            decoder.debug_check_bounds::<Self>(offset);
7240            // Verify that padding bytes are zero.
7241            fidl::decode!(
7242                fidl_fuchsia_net__common::SocketAddress,
7243                D,
7244                &mut self.value,
7245                decoder,
7246                offset + 0,
7247                _depth
7248            )?;
7249            Ok(())
7250        }
7251    }
7252
7253    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetPeerNameResponse {
7254        type Borrowed<'a> = &'a Self;
7255        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7256            value
7257        }
7258    }
7259
7260    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetPeerNameResponse {
7261        type Owned = Self;
7262
7263        #[inline(always)]
7264        fn inline_align(_context: fidl::encoding::Context) -> usize {
7265            8
7266        }
7267
7268        #[inline(always)]
7269        fn inline_size(_context: fidl::encoding::Context) -> usize {
7270            16
7271        }
7272    }
7273
7274    unsafe impl<D: fidl::encoding::ResourceDialect>
7275        fidl::encoding::Encode<BaseNetworkSocketGetPeerNameResponse, D>
7276        for &BaseNetworkSocketGetPeerNameResponse
7277    {
7278        #[inline]
7279        unsafe fn encode(
7280            self,
7281            encoder: &mut fidl::encoding::Encoder<'_, D>,
7282            offset: usize,
7283            _depth: fidl::encoding::Depth,
7284        ) -> fidl::Result<()> {
7285            encoder.debug_check_bounds::<BaseNetworkSocketGetPeerNameResponse>(offset);
7286            // Delegate to tuple encoding.
7287            fidl::encoding::Encode::<BaseNetworkSocketGetPeerNameResponse, D>::encode(
7288                (
7289                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
7290                ),
7291                encoder, offset, _depth
7292            )
7293        }
7294    }
7295    unsafe impl<
7296            D: fidl::encoding::ResourceDialect,
7297            T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7298        > fidl::encoding::Encode<BaseNetworkSocketGetPeerNameResponse, D> for (T0,)
7299    {
7300        #[inline]
7301        unsafe fn encode(
7302            self,
7303            encoder: &mut fidl::encoding::Encoder<'_, D>,
7304            offset: usize,
7305            depth: fidl::encoding::Depth,
7306        ) -> fidl::Result<()> {
7307            encoder.debug_check_bounds::<BaseNetworkSocketGetPeerNameResponse>(offset);
7308            // Zero out padding regions. There's no need to apply masks
7309            // because the unmasked parts will be overwritten by fields.
7310            // Write the fields.
7311            self.0.encode(encoder, offset + 0, depth)?;
7312            Ok(())
7313        }
7314    }
7315
7316    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7317        for BaseNetworkSocketGetPeerNameResponse
7318    {
7319        #[inline(always)]
7320        fn new_empty() -> Self {
7321            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7322        }
7323
7324        #[inline]
7325        unsafe fn decode(
7326            &mut self,
7327            decoder: &mut fidl::encoding::Decoder<'_, D>,
7328            offset: usize,
7329            _depth: fidl::encoding::Depth,
7330        ) -> fidl::Result<()> {
7331            decoder.debug_check_bounds::<Self>(offset);
7332            // Verify that padding bytes are zero.
7333            fidl::decode!(
7334                fidl_fuchsia_net__common::SocketAddress,
7335                D,
7336                &mut self.addr,
7337                decoder,
7338                offset + 0,
7339                _depth
7340            )?;
7341            Ok(())
7342        }
7343    }
7344
7345    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetSockNameResponse {
7346        type Borrowed<'a> = &'a Self;
7347        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7348            value
7349        }
7350    }
7351
7352    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetSockNameResponse {
7353        type Owned = Self;
7354
7355        #[inline(always)]
7356        fn inline_align(_context: fidl::encoding::Context) -> usize {
7357            8
7358        }
7359
7360        #[inline(always)]
7361        fn inline_size(_context: fidl::encoding::Context) -> usize {
7362            16
7363        }
7364    }
7365
7366    unsafe impl<D: fidl::encoding::ResourceDialect>
7367        fidl::encoding::Encode<BaseNetworkSocketGetSockNameResponse, D>
7368        for &BaseNetworkSocketGetSockNameResponse
7369    {
7370        #[inline]
7371        unsafe fn encode(
7372            self,
7373            encoder: &mut fidl::encoding::Encoder<'_, D>,
7374            offset: usize,
7375            _depth: fidl::encoding::Depth,
7376        ) -> fidl::Result<()> {
7377            encoder.debug_check_bounds::<BaseNetworkSocketGetSockNameResponse>(offset);
7378            // Delegate to tuple encoding.
7379            fidl::encoding::Encode::<BaseNetworkSocketGetSockNameResponse, D>::encode(
7380                (
7381                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
7382                ),
7383                encoder, offset, _depth
7384            )
7385        }
7386    }
7387    unsafe impl<
7388            D: fidl::encoding::ResourceDialect,
7389            T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7390        > fidl::encoding::Encode<BaseNetworkSocketGetSockNameResponse, D> for (T0,)
7391    {
7392        #[inline]
7393        unsafe fn encode(
7394            self,
7395            encoder: &mut fidl::encoding::Encoder<'_, D>,
7396            offset: usize,
7397            depth: fidl::encoding::Depth,
7398        ) -> fidl::Result<()> {
7399            encoder.debug_check_bounds::<BaseNetworkSocketGetSockNameResponse>(offset);
7400            // Zero out padding regions. There's no need to apply masks
7401            // because the unmasked parts will be overwritten by fields.
7402            // Write the fields.
7403            self.0.encode(encoder, offset + 0, depth)?;
7404            Ok(())
7405        }
7406    }
7407
7408    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7409        for BaseNetworkSocketGetSockNameResponse
7410    {
7411        #[inline(always)]
7412        fn new_empty() -> Self {
7413            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7414        }
7415
7416        #[inline]
7417        unsafe fn decode(
7418            &mut self,
7419            decoder: &mut fidl::encoding::Decoder<'_, D>,
7420            offset: usize,
7421            _depth: fidl::encoding::Depth,
7422        ) -> fidl::Result<()> {
7423            decoder.debug_check_bounds::<Self>(offset);
7424            // Verify that padding bytes are zero.
7425            fidl::decode!(
7426                fidl_fuchsia_net__common::SocketAddress,
7427                D,
7428                &mut self.addr,
7429                decoder,
7430                offset + 0,
7431                _depth
7432            )?;
7433            Ok(())
7434        }
7435    }
7436
7437    impl fidl::encoding::ValueTypeMarker for BaseSocketGetMarkRequest {
7438        type Borrowed<'a> = &'a Self;
7439        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7440            value
7441        }
7442    }
7443
7444    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetMarkRequest {
7445        type Owned = Self;
7446
7447        #[inline(always)]
7448        fn inline_align(_context: fidl::encoding::Context) -> usize {
7449            1
7450        }
7451
7452        #[inline(always)]
7453        fn inline_size(_context: fidl::encoding::Context) -> usize {
7454            1
7455        }
7456    }
7457
7458    unsafe impl<D: fidl::encoding::ResourceDialect>
7459        fidl::encoding::Encode<BaseSocketGetMarkRequest, D> for &BaseSocketGetMarkRequest
7460    {
7461        #[inline]
7462        unsafe fn encode(
7463            self,
7464            encoder: &mut fidl::encoding::Encoder<'_, D>,
7465            offset: usize,
7466            _depth: fidl::encoding::Depth,
7467        ) -> fidl::Result<()> {
7468            encoder.debug_check_bounds::<BaseSocketGetMarkRequest>(offset);
7469            // Delegate to tuple encoding.
7470            fidl::encoding::Encode::<BaseSocketGetMarkRequest, D>::encode(
7471                (
7472                    <fidl_fuchsia_net__common::MarkDomain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
7473                ),
7474                encoder, offset, _depth
7475            )
7476        }
7477    }
7478    unsafe impl<
7479            D: fidl::encoding::ResourceDialect,
7480            T0: fidl::encoding::Encode<fidl_fuchsia_net__common::MarkDomain, D>,
7481        > fidl::encoding::Encode<BaseSocketGetMarkRequest, D> for (T0,)
7482    {
7483        #[inline]
7484        unsafe fn encode(
7485            self,
7486            encoder: &mut fidl::encoding::Encoder<'_, D>,
7487            offset: usize,
7488            depth: fidl::encoding::Depth,
7489        ) -> fidl::Result<()> {
7490            encoder.debug_check_bounds::<BaseSocketGetMarkRequest>(offset);
7491            // Zero out padding regions. There's no need to apply masks
7492            // because the unmasked parts will be overwritten by fields.
7493            // Write the fields.
7494            self.0.encode(encoder, offset + 0, depth)?;
7495            Ok(())
7496        }
7497    }
7498
7499    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7500        for BaseSocketGetMarkRequest
7501    {
7502        #[inline(always)]
7503        fn new_empty() -> Self {
7504            Self { domain: fidl::new_empty!(fidl_fuchsia_net__common::MarkDomain, D) }
7505        }
7506
7507        #[inline]
7508        unsafe fn decode(
7509            &mut self,
7510            decoder: &mut fidl::encoding::Decoder<'_, D>,
7511            offset: usize,
7512            _depth: fidl::encoding::Depth,
7513        ) -> fidl::Result<()> {
7514            decoder.debug_check_bounds::<Self>(offset);
7515            // Verify that padding bytes are zero.
7516            fidl::decode!(
7517                fidl_fuchsia_net__common::MarkDomain,
7518                D,
7519                &mut self.domain,
7520                decoder,
7521                offset + 0,
7522                _depth
7523            )?;
7524            Ok(())
7525        }
7526    }
7527
7528    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBindToDeviceRequest {
7529        type Borrowed<'a> = &'a Self;
7530        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7531            value
7532        }
7533    }
7534
7535    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBindToDeviceRequest {
7536        type Owned = Self;
7537
7538        #[inline(always)]
7539        fn inline_align(_context: fidl::encoding::Context) -> usize {
7540            8
7541        }
7542
7543        #[inline(always)]
7544        fn inline_size(_context: fidl::encoding::Context) -> usize {
7545            16
7546        }
7547    }
7548
7549    unsafe impl<D: fidl::encoding::ResourceDialect>
7550        fidl::encoding::Encode<BaseSocketSetBindToDeviceRequest, D>
7551        for &BaseSocketSetBindToDeviceRequest
7552    {
7553        #[inline]
7554        unsafe fn encode(
7555            self,
7556            encoder: &mut fidl::encoding::Encoder<'_, D>,
7557            offset: usize,
7558            _depth: fidl::encoding::Depth,
7559        ) -> fidl::Result<()> {
7560            encoder.debug_check_bounds::<BaseSocketSetBindToDeviceRequest>(offset);
7561            // Delegate to tuple encoding.
7562            fidl::encoding::Encode::<BaseSocketSetBindToDeviceRequest, D>::encode(
7563                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
7564                    &self.value,
7565                ),),
7566                encoder,
7567                offset,
7568                _depth,
7569            )
7570        }
7571    }
7572    unsafe impl<
7573            D: fidl::encoding::ResourceDialect,
7574            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
7575        > fidl::encoding::Encode<BaseSocketSetBindToDeviceRequest, D> for (T0,)
7576    {
7577        #[inline]
7578        unsafe fn encode(
7579            self,
7580            encoder: &mut fidl::encoding::Encoder<'_, D>,
7581            offset: usize,
7582            depth: fidl::encoding::Depth,
7583        ) -> fidl::Result<()> {
7584            encoder.debug_check_bounds::<BaseSocketSetBindToDeviceRequest>(offset);
7585            // Zero out padding regions. There's no need to apply masks
7586            // because the unmasked parts will be overwritten by fields.
7587            // Write the fields.
7588            self.0.encode(encoder, offset + 0, depth)?;
7589            Ok(())
7590        }
7591    }
7592
7593    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7594        for BaseSocketSetBindToDeviceRequest
7595    {
7596        #[inline(always)]
7597        fn new_empty() -> Self {
7598            Self { value: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
7599        }
7600
7601        #[inline]
7602        unsafe fn decode(
7603            &mut self,
7604            decoder: &mut fidl::encoding::Decoder<'_, D>,
7605            offset: usize,
7606            _depth: fidl::encoding::Depth,
7607        ) -> fidl::Result<()> {
7608            decoder.debug_check_bounds::<Self>(offset);
7609            // Verify that padding bytes are zero.
7610            fidl::decode!(
7611                fidl::encoding::BoundedString<15>,
7612                D,
7613                &mut self.value,
7614                decoder,
7615                offset + 0,
7616                _depth
7617            )?;
7618            Ok(())
7619        }
7620    }
7621
7622    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBindToInterfaceIndexRequest {
7623        type Borrowed<'a> = &'a Self;
7624        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7625            value
7626        }
7627    }
7628
7629    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBindToInterfaceIndexRequest {
7630        type Owned = Self;
7631
7632        #[inline(always)]
7633        fn inline_align(_context: fidl::encoding::Context) -> usize {
7634            8
7635        }
7636
7637        #[inline(always)]
7638        fn inline_size(_context: fidl::encoding::Context) -> usize {
7639            8
7640        }
7641        #[inline(always)]
7642        fn encode_is_copy() -> bool {
7643            true
7644        }
7645
7646        #[inline(always)]
7647        fn decode_is_copy() -> bool {
7648            true
7649        }
7650    }
7651
7652    unsafe impl<D: fidl::encoding::ResourceDialect>
7653        fidl::encoding::Encode<BaseSocketSetBindToInterfaceIndexRequest, D>
7654        for &BaseSocketSetBindToInterfaceIndexRequest
7655    {
7656        #[inline]
7657        unsafe fn encode(
7658            self,
7659            encoder: &mut fidl::encoding::Encoder<'_, D>,
7660            offset: usize,
7661            _depth: fidl::encoding::Depth,
7662        ) -> fidl::Result<()> {
7663            encoder.debug_check_bounds::<BaseSocketSetBindToInterfaceIndexRequest>(offset);
7664            unsafe {
7665                // Copy the object into the buffer.
7666                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7667                (buf_ptr as *mut BaseSocketSetBindToInterfaceIndexRequest).write_unaligned(
7668                    (self as *const BaseSocketSetBindToInterfaceIndexRequest).read(),
7669                );
7670                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7671                // done second because the memcpy will write garbage to these bytes.
7672            }
7673            Ok(())
7674        }
7675    }
7676    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
7677        fidl::encoding::Encode<BaseSocketSetBindToInterfaceIndexRequest, D> for (T0,)
7678    {
7679        #[inline]
7680        unsafe fn encode(
7681            self,
7682            encoder: &mut fidl::encoding::Encoder<'_, D>,
7683            offset: usize,
7684            depth: fidl::encoding::Depth,
7685        ) -> fidl::Result<()> {
7686            encoder.debug_check_bounds::<BaseSocketSetBindToInterfaceIndexRequest>(offset);
7687            // Zero out padding regions. There's no need to apply masks
7688            // because the unmasked parts will be overwritten by fields.
7689            // Write the fields.
7690            self.0.encode(encoder, offset + 0, depth)?;
7691            Ok(())
7692        }
7693    }
7694
7695    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7696        for BaseSocketSetBindToInterfaceIndexRequest
7697    {
7698        #[inline(always)]
7699        fn new_empty() -> Self {
7700            Self { value: fidl::new_empty!(u64, D) }
7701        }
7702
7703        #[inline]
7704        unsafe fn decode(
7705            &mut self,
7706            decoder: &mut fidl::encoding::Decoder<'_, D>,
7707            offset: usize,
7708            _depth: fidl::encoding::Depth,
7709        ) -> fidl::Result<()> {
7710            decoder.debug_check_bounds::<Self>(offset);
7711            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7712            // Verify that padding bytes are zero.
7713            // Copy from the buffer into the object.
7714            unsafe {
7715                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7716            }
7717            Ok(())
7718        }
7719    }
7720
7721    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBroadcastRequest {
7722        type Borrowed<'a> = &'a Self;
7723        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7724            value
7725        }
7726    }
7727
7728    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBroadcastRequest {
7729        type Owned = Self;
7730
7731        #[inline(always)]
7732        fn inline_align(_context: fidl::encoding::Context) -> usize {
7733            1
7734        }
7735
7736        #[inline(always)]
7737        fn inline_size(_context: fidl::encoding::Context) -> usize {
7738            1
7739        }
7740    }
7741
7742    unsafe impl<D: fidl::encoding::ResourceDialect>
7743        fidl::encoding::Encode<BaseSocketSetBroadcastRequest, D>
7744        for &BaseSocketSetBroadcastRequest
7745    {
7746        #[inline]
7747        unsafe fn encode(
7748            self,
7749            encoder: &mut fidl::encoding::Encoder<'_, D>,
7750            offset: usize,
7751            _depth: fidl::encoding::Depth,
7752        ) -> fidl::Result<()> {
7753            encoder.debug_check_bounds::<BaseSocketSetBroadcastRequest>(offset);
7754            // Delegate to tuple encoding.
7755            fidl::encoding::Encode::<BaseSocketSetBroadcastRequest, D>::encode(
7756                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7757                encoder,
7758                offset,
7759                _depth,
7760            )
7761        }
7762    }
7763    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7764        fidl::encoding::Encode<BaseSocketSetBroadcastRequest, D> for (T0,)
7765    {
7766        #[inline]
7767        unsafe fn encode(
7768            self,
7769            encoder: &mut fidl::encoding::Encoder<'_, D>,
7770            offset: usize,
7771            depth: fidl::encoding::Depth,
7772        ) -> fidl::Result<()> {
7773            encoder.debug_check_bounds::<BaseSocketSetBroadcastRequest>(offset);
7774            // Zero out padding regions. There's no need to apply masks
7775            // because the unmasked parts will be overwritten by fields.
7776            // Write the fields.
7777            self.0.encode(encoder, offset + 0, depth)?;
7778            Ok(())
7779        }
7780    }
7781
7782    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7783        for BaseSocketSetBroadcastRequest
7784    {
7785        #[inline(always)]
7786        fn new_empty() -> Self {
7787            Self { value: fidl::new_empty!(bool, D) }
7788        }
7789
7790        #[inline]
7791        unsafe fn decode(
7792            &mut self,
7793            decoder: &mut fidl::encoding::Decoder<'_, D>,
7794            offset: usize,
7795            _depth: fidl::encoding::Depth,
7796        ) -> fidl::Result<()> {
7797            decoder.debug_check_bounds::<Self>(offset);
7798            // Verify that padding bytes are zero.
7799            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7800            Ok(())
7801        }
7802    }
7803
7804    impl fidl::encoding::ValueTypeMarker for BaseSocketSetKeepAliveRequest {
7805        type Borrowed<'a> = &'a Self;
7806        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7807            value
7808        }
7809    }
7810
7811    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetKeepAliveRequest {
7812        type Owned = Self;
7813
7814        #[inline(always)]
7815        fn inline_align(_context: fidl::encoding::Context) -> usize {
7816            1
7817        }
7818
7819        #[inline(always)]
7820        fn inline_size(_context: fidl::encoding::Context) -> usize {
7821            1
7822        }
7823    }
7824
7825    unsafe impl<D: fidl::encoding::ResourceDialect>
7826        fidl::encoding::Encode<BaseSocketSetKeepAliveRequest, D>
7827        for &BaseSocketSetKeepAliveRequest
7828    {
7829        #[inline]
7830        unsafe fn encode(
7831            self,
7832            encoder: &mut fidl::encoding::Encoder<'_, D>,
7833            offset: usize,
7834            _depth: fidl::encoding::Depth,
7835        ) -> fidl::Result<()> {
7836            encoder.debug_check_bounds::<BaseSocketSetKeepAliveRequest>(offset);
7837            // Delegate to tuple encoding.
7838            fidl::encoding::Encode::<BaseSocketSetKeepAliveRequest, D>::encode(
7839                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7840                encoder,
7841                offset,
7842                _depth,
7843            )
7844        }
7845    }
7846    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7847        fidl::encoding::Encode<BaseSocketSetKeepAliveRequest, D> for (T0,)
7848    {
7849        #[inline]
7850        unsafe fn encode(
7851            self,
7852            encoder: &mut fidl::encoding::Encoder<'_, D>,
7853            offset: usize,
7854            depth: fidl::encoding::Depth,
7855        ) -> fidl::Result<()> {
7856            encoder.debug_check_bounds::<BaseSocketSetKeepAliveRequest>(offset);
7857            // Zero out padding regions. There's no need to apply masks
7858            // because the unmasked parts will be overwritten by fields.
7859            // Write the fields.
7860            self.0.encode(encoder, offset + 0, depth)?;
7861            Ok(())
7862        }
7863    }
7864
7865    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7866        for BaseSocketSetKeepAliveRequest
7867    {
7868        #[inline(always)]
7869        fn new_empty() -> Self {
7870            Self { value: fidl::new_empty!(bool, D) }
7871        }
7872
7873        #[inline]
7874        unsafe fn decode(
7875            &mut self,
7876            decoder: &mut fidl::encoding::Decoder<'_, D>,
7877            offset: usize,
7878            _depth: fidl::encoding::Depth,
7879        ) -> fidl::Result<()> {
7880            decoder.debug_check_bounds::<Self>(offset);
7881            // Verify that padding bytes are zero.
7882            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7883            Ok(())
7884        }
7885    }
7886
7887    impl fidl::encoding::ValueTypeMarker for BaseSocketSetLingerRequest {
7888        type Borrowed<'a> = &'a Self;
7889        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7890            value
7891        }
7892    }
7893
7894    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetLingerRequest {
7895        type Owned = Self;
7896
7897        #[inline(always)]
7898        fn inline_align(_context: fidl::encoding::Context) -> usize {
7899            4
7900        }
7901
7902        #[inline(always)]
7903        fn inline_size(_context: fidl::encoding::Context) -> usize {
7904            8
7905        }
7906    }
7907
7908    unsafe impl<D: fidl::encoding::ResourceDialect>
7909        fidl::encoding::Encode<BaseSocketSetLingerRequest, D> for &BaseSocketSetLingerRequest
7910    {
7911        #[inline]
7912        unsafe fn encode(
7913            self,
7914            encoder: &mut fidl::encoding::Encoder<'_, D>,
7915            offset: usize,
7916            _depth: fidl::encoding::Depth,
7917        ) -> fidl::Result<()> {
7918            encoder.debug_check_bounds::<BaseSocketSetLingerRequest>(offset);
7919            // Delegate to tuple encoding.
7920            fidl::encoding::Encode::<BaseSocketSetLingerRequest, D>::encode(
7921                (
7922                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.linger),
7923                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length_secs),
7924                ),
7925                encoder,
7926                offset,
7927                _depth,
7928            )
7929        }
7930    }
7931    unsafe impl<
7932            D: fidl::encoding::ResourceDialect,
7933            T0: fidl::encoding::Encode<bool, D>,
7934            T1: fidl::encoding::Encode<u32, D>,
7935        > fidl::encoding::Encode<BaseSocketSetLingerRequest, D> for (T0, T1)
7936    {
7937        #[inline]
7938        unsafe fn encode(
7939            self,
7940            encoder: &mut fidl::encoding::Encoder<'_, D>,
7941            offset: usize,
7942            depth: fidl::encoding::Depth,
7943        ) -> fidl::Result<()> {
7944            encoder.debug_check_bounds::<BaseSocketSetLingerRequest>(offset);
7945            // Zero out padding regions. There's no need to apply masks
7946            // because the unmasked parts will be overwritten by fields.
7947            unsafe {
7948                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7949                (ptr as *mut u32).write_unaligned(0);
7950            }
7951            // Write the fields.
7952            self.0.encode(encoder, offset + 0, depth)?;
7953            self.1.encode(encoder, offset + 4, depth)?;
7954            Ok(())
7955        }
7956    }
7957
7958    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7959        for BaseSocketSetLingerRequest
7960    {
7961        #[inline(always)]
7962        fn new_empty() -> Self {
7963            Self { linger: fidl::new_empty!(bool, D), length_secs: fidl::new_empty!(u32, D) }
7964        }
7965
7966        #[inline]
7967        unsafe fn decode(
7968            &mut self,
7969            decoder: &mut fidl::encoding::Decoder<'_, D>,
7970            offset: usize,
7971            _depth: fidl::encoding::Depth,
7972        ) -> fidl::Result<()> {
7973            decoder.debug_check_bounds::<Self>(offset);
7974            // Verify that padding bytes are zero.
7975            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7976            let padval = unsafe { (ptr as *const u32).read_unaligned() };
7977            let mask = 0xffffff00u32;
7978            let maskedval = padval & mask;
7979            if maskedval != 0 {
7980                return Err(fidl::Error::NonZeroPadding {
7981                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7982                });
7983            }
7984            fidl::decode!(bool, D, &mut self.linger, decoder, offset + 0, _depth)?;
7985            fidl::decode!(u32, D, &mut self.length_secs, decoder, offset + 4, _depth)?;
7986            Ok(())
7987        }
7988    }
7989
7990    impl fidl::encoding::ValueTypeMarker for BaseSocketSetMarkRequest {
7991        type Borrowed<'a> = &'a Self;
7992        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7993            value
7994        }
7995    }
7996
7997    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetMarkRequest {
7998        type Owned = Self;
7999
8000        #[inline(always)]
8001        fn inline_align(_context: fidl::encoding::Context) -> usize {
8002            8
8003        }
8004
8005        #[inline(always)]
8006        fn inline_size(_context: fidl::encoding::Context) -> usize {
8007            24
8008        }
8009    }
8010
8011    unsafe impl<D: fidl::encoding::ResourceDialect>
8012        fidl::encoding::Encode<BaseSocketSetMarkRequest, D> for &BaseSocketSetMarkRequest
8013    {
8014        #[inline]
8015        unsafe fn encode(
8016            self,
8017            encoder: &mut fidl::encoding::Encoder<'_, D>,
8018            offset: usize,
8019            _depth: fidl::encoding::Depth,
8020        ) -> fidl::Result<()> {
8021            encoder.debug_check_bounds::<BaseSocketSetMarkRequest>(offset);
8022            // Delegate to tuple encoding.
8023            fidl::encoding::Encode::<BaseSocketSetMarkRequest, D>::encode(
8024                (
8025                    <fidl_fuchsia_net__common::MarkDomain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
8026                    <OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mark),
8027                ),
8028                encoder, offset, _depth
8029            )
8030        }
8031    }
8032    unsafe impl<
8033            D: fidl::encoding::ResourceDialect,
8034            T0: fidl::encoding::Encode<fidl_fuchsia_net__common::MarkDomain, D>,
8035            T1: fidl::encoding::Encode<OptionalUint32, D>,
8036        > fidl::encoding::Encode<BaseSocketSetMarkRequest, D> for (T0, T1)
8037    {
8038        #[inline]
8039        unsafe fn encode(
8040            self,
8041            encoder: &mut fidl::encoding::Encoder<'_, D>,
8042            offset: usize,
8043            depth: fidl::encoding::Depth,
8044        ) -> fidl::Result<()> {
8045            encoder.debug_check_bounds::<BaseSocketSetMarkRequest>(offset);
8046            // Zero out padding regions. There's no need to apply masks
8047            // because the unmasked parts will be overwritten by fields.
8048            unsafe {
8049                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8050                (ptr as *mut u64).write_unaligned(0);
8051            }
8052            // Write the fields.
8053            self.0.encode(encoder, offset + 0, depth)?;
8054            self.1.encode(encoder, offset + 8, depth)?;
8055            Ok(())
8056        }
8057    }
8058
8059    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8060        for BaseSocketSetMarkRequest
8061    {
8062        #[inline(always)]
8063        fn new_empty() -> Self {
8064            Self {
8065                domain: fidl::new_empty!(fidl_fuchsia_net__common::MarkDomain, D),
8066                mark: fidl::new_empty!(OptionalUint32, D),
8067            }
8068        }
8069
8070        #[inline]
8071        unsafe fn decode(
8072            &mut self,
8073            decoder: &mut fidl::encoding::Decoder<'_, D>,
8074            offset: usize,
8075            _depth: fidl::encoding::Depth,
8076        ) -> fidl::Result<()> {
8077            decoder.debug_check_bounds::<Self>(offset);
8078            // Verify that padding bytes are zero.
8079            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8080            let padval = unsafe { (ptr as *const u64).read_unaligned() };
8081            let mask = 0xffffffffffffff00u64;
8082            let maskedval = padval & mask;
8083            if maskedval != 0 {
8084                return Err(fidl::Error::NonZeroPadding {
8085                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8086                });
8087            }
8088            fidl::decode!(
8089                fidl_fuchsia_net__common::MarkDomain,
8090                D,
8091                &mut self.domain,
8092                decoder,
8093                offset + 0,
8094                _depth
8095            )?;
8096            fidl::decode!(OptionalUint32, D, &mut self.mark, decoder, offset + 8, _depth)?;
8097            Ok(())
8098        }
8099    }
8100
8101    impl fidl::encoding::ValueTypeMarker for BaseSocketSetNoCheckRequest {
8102        type Borrowed<'a> = &'a Self;
8103        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8104            value
8105        }
8106    }
8107
8108    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetNoCheckRequest {
8109        type Owned = Self;
8110
8111        #[inline(always)]
8112        fn inline_align(_context: fidl::encoding::Context) -> usize {
8113            1
8114        }
8115
8116        #[inline(always)]
8117        fn inline_size(_context: fidl::encoding::Context) -> usize {
8118            1
8119        }
8120    }
8121
8122    unsafe impl<D: fidl::encoding::ResourceDialect>
8123        fidl::encoding::Encode<BaseSocketSetNoCheckRequest, D> for &BaseSocketSetNoCheckRequest
8124    {
8125        #[inline]
8126        unsafe fn encode(
8127            self,
8128            encoder: &mut fidl::encoding::Encoder<'_, D>,
8129            offset: usize,
8130            _depth: fidl::encoding::Depth,
8131        ) -> fidl::Result<()> {
8132            encoder.debug_check_bounds::<BaseSocketSetNoCheckRequest>(offset);
8133            // Delegate to tuple encoding.
8134            fidl::encoding::Encode::<BaseSocketSetNoCheckRequest, D>::encode(
8135                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8136                encoder,
8137                offset,
8138                _depth,
8139            )
8140        }
8141    }
8142    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8143        fidl::encoding::Encode<BaseSocketSetNoCheckRequest, D> for (T0,)
8144    {
8145        #[inline]
8146        unsafe fn encode(
8147            self,
8148            encoder: &mut fidl::encoding::Encoder<'_, D>,
8149            offset: usize,
8150            depth: fidl::encoding::Depth,
8151        ) -> fidl::Result<()> {
8152            encoder.debug_check_bounds::<BaseSocketSetNoCheckRequest>(offset);
8153            // Zero out padding regions. There's no need to apply masks
8154            // because the unmasked parts will be overwritten by fields.
8155            // Write the fields.
8156            self.0.encode(encoder, offset + 0, depth)?;
8157            Ok(())
8158        }
8159    }
8160
8161    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8162        for BaseSocketSetNoCheckRequest
8163    {
8164        #[inline(always)]
8165        fn new_empty() -> Self {
8166            Self { value: fidl::new_empty!(bool, D) }
8167        }
8168
8169        #[inline]
8170        unsafe fn decode(
8171            &mut self,
8172            decoder: &mut fidl::encoding::Decoder<'_, D>,
8173            offset: usize,
8174            _depth: fidl::encoding::Depth,
8175        ) -> fidl::Result<()> {
8176            decoder.debug_check_bounds::<Self>(offset);
8177            // Verify that padding bytes are zero.
8178            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8179            Ok(())
8180        }
8181    }
8182
8183    impl fidl::encoding::ValueTypeMarker for BaseSocketSetOutOfBandInlineRequest {
8184        type Borrowed<'a> = &'a Self;
8185        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8186            value
8187        }
8188    }
8189
8190    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetOutOfBandInlineRequest {
8191        type Owned = Self;
8192
8193        #[inline(always)]
8194        fn inline_align(_context: fidl::encoding::Context) -> usize {
8195            1
8196        }
8197
8198        #[inline(always)]
8199        fn inline_size(_context: fidl::encoding::Context) -> usize {
8200            1
8201        }
8202    }
8203
8204    unsafe impl<D: fidl::encoding::ResourceDialect>
8205        fidl::encoding::Encode<BaseSocketSetOutOfBandInlineRequest, D>
8206        for &BaseSocketSetOutOfBandInlineRequest
8207    {
8208        #[inline]
8209        unsafe fn encode(
8210            self,
8211            encoder: &mut fidl::encoding::Encoder<'_, D>,
8212            offset: usize,
8213            _depth: fidl::encoding::Depth,
8214        ) -> fidl::Result<()> {
8215            encoder.debug_check_bounds::<BaseSocketSetOutOfBandInlineRequest>(offset);
8216            // Delegate to tuple encoding.
8217            fidl::encoding::Encode::<BaseSocketSetOutOfBandInlineRequest, D>::encode(
8218                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8219                encoder,
8220                offset,
8221                _depth,
8222            )
8223        }
8224    }
8225    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8226        fidl::encoding::Encode<BaseSocketSetOutOfBandInlineRequest, D> for (T0,)
8227    {
8228        #[inline]
8229        unsafe fn encode(
8230            self,
8231            encoder: &mut fidl::encoding::Encoder<'_, D>,
8232            offset: usize,
8233            depth: fidl::encoding::Depth,
8234        ) -> fidl::Result<()> {
8235            encoder.debug_check_bounds::<BaseSocketSetOutOfBandInlineRequest>(offset);
8236            // Zero out padding regions. There's no need to apply masks
8237            // because the unmasked parts will be overwritten by fields.
8238            // Write the fields.
8239            self.0.encode(encoder, offset + 0, depth)?;
8240            Ok(())
8241        }
8242    }
8243
8244    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8245        for BaseSocketSetOutOfBandInlineRequest
8246    {
8247        #[inline(always)]
8248        fn new_empty() -> Self {
8249            Self { value: fidl::new_empty!(bool, D) }
8250        }
8251
8252        #[inline]
8253        unsafe fn decode(
8254            &mut self,
8255            decoder: &mut fidl::encoding::Decoder<'_, D>,
8256            offset: usize,
8257            _depth: fidl::encoding::Depth,
8258        ) -> fidl::Result<()> {
8259            decoder.debug_check_bounds::<Self>(offset);
8260            // Verify that padding bytes are zero.
8261            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8262            Ok(())
8263        }
8264    }
8265
8266    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReceiveBufferRequest {
8267        type Borrowed<'a> = &'a Self;
8268        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8269            value
8270        }
8271    }
8272
8273    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReceiveBufferRequest {
8274        type Owned = Self;
8275
8276        #[inline(always)]
8277        fn inline_align(_context: fidl::encoding::Context) -> usize {
8278            8
8279        }
8280
8281        #[inline(always)]
8282        fn inline_size(_context: fidl::encoding::Context) -> usize {
8283            8
8284        }
8285        #[inline(always)]
8286        fn encode_is_copy() -> bool {
8287            true
8288        }
8289
8290        #[inline(always)]
8291        fn decode_is_copy() -> bool {
8292            true
8293        }
8294    }
8295
8296    unsafe impl<D: fidl::encoding::ResourceDialect>
8297        fidl::encoding::Encode<BaseSocketSetReceiveBufferRequest, D>
8298        for &BaseSocketSetReceiveBufferRequest
8299    {
8300        #[inline]
8301        unsafe fn encode(
8302            self,
8303            encoder: &mut fidl::encoding::Encoder<'_, D>,
8304            offset: usize,
8305            _depth: fidl::encoding::Depth,
8306        ) -> fidl::Result<()> {
8307            encoder.debug_check_bounds::<BaseSocketSetReceiveBufferRequest>(offset);
8308            unsafe {
8309                // Copy the object into the buffer.
8310                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8311                (buf_ptr as *mut BaseSocketSetReceiveBufferRequest)
8312                    .write_unaligned((self as *const BaseSocketSetReceiveBufferRequest).read());
8313                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8314                // done second because the memcpy will write garbage to these bytes.
8315            }
8316            Ok(())
8317        }
8318    }
8319    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8320        fidl::encoding::Encode<BaseSocketSetReceiveBufferRequest, D> for (T0,)
8321    {
8322        #[inline]
8323        unsafe fn encode(
8324            self,
8325            encoder: &mut fidl::encoding::Encoder<'_, D>,
8326            offset: usize,
8327            depth: fidl::encoding::Depth,
8328        ) -> fidl::Result<()> {
8329            encoder.debug_check_bounds::<BaseSocketSetReceiveBufferRequest>(offset);
8330            // Zero out padding regions. There's no need to apply masks
8331            // because the unmasked parts will be overwritten by fields.
8332            // Write the fields.
8333            self.0.encode(encoder, offset + 0, depth)?;
8334            Ok(())
8335        }
8336    }
8337
8338    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8339        for BaseSocketSetReceiveBufferRequest
8340    {
8341        #[inline(always)]
8342        fn new_empty() -> Self {
8343            Self { value_bytes: fidl::new_empty!(u64, D) }
8344        }
8345
8346        #[inline]
8347        unsafe fn decode(
8348            &mut self,
8349            decoder: &mut fidl::encoding::Decoder<'_, D>,
8350            offset: usize,
8351            _depth: fidl::encoding::Depth,
8352        ) -> fidl::Result<()> {
8353            decoder.debug_check_bounds::<Self>(offset);
8354            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8355            // Verify that padding bytes are zero.
8356            // Copy from the buffer into the object.
8357            unsafe {
8358                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8359            }
8360            Ok(())
8361        }
8362    }
8363
8364    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReuseAddressRequest {
8365        type Borrowed<'a> = &'a Self;
8366        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8367            value
8368        }
8369    }
8370
8371    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReuseAddressRequest {
8372        type Owned = Self;
8373
8374        #[inline(always)]
8375        fn inline_align(_context: fidl::encoding::Context) -> usize {
8376            1
8377        }
8378
8379        #[inline(always)]
8380        fn inline_size(_context: fidl::encoding::Context) -> usize {
8381            1
8382        }
8383    }
8384
8385    unsafe impl<D: fidl::encoding::ResourceDialect>
8386        fidl::encoding::Encode<BaseSocketSetReuseAddressRequest, D>
8387        for &BaseSocketSetReuseAddressRequest
8388    {
8389        #[inline]
8390        unsafe fn encode(
8391            self,
8392            encoder: &mut fidl::encoding::Encoder<'_, D>,
8393            offset: usize,
8394            _depth: fidl::encoding::Depth,
8395        ) -> fidl::Result<()> {
8396            encoder.debug_check_bounds::<BaseSocketSetReuseAddressRequest>(offset);
8397            // Delegate to tuple encoding.
8398            fidl::encoding::Encode::<BaseSocketSetReuseAddressRequest, D>::encode(
8399                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8400                encoder,
8401                offset,
8402                _depth,
8403            )
8404        }
8405    }
8406    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8407        fidl::encoding::Encode<BaseSocketSetReuseAddressRequest, D> for (T0,)
8408    {
8409        #[inline]
8410        unsafe fn encode(
8411            self,
8412            encoder: &mut fidl::encoding::Encoder<'_, D>,
8413            offset: usize,
8414            depth: fidl::encoding::Depth,
8415        ) -> fidl::Result<()> {
8416            encoder.debug_check_bounds::<BaseSocketSetReuseAddressRequest>(offset);
8417            // Zero out padding regions. There's no need to apply masks
8418            // because the unmasked parts will be overwritten by fields.
8419            // Write the fields.
8420            self.0.encode(encoder, offset + 0, depth)?;
8421            Ok(())
8422        }
8423    }
8424
8425    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8426        for BaseSocketSetReuseAddressRequest
8427    {
8428        #[inline(always)]
8429        fn new_empty() -> Self {
8430            Self { value: fidl::new_empty!(bool, D) }
8431        }
8432
8433        #[inline]
8434        unsafe fn decode(
8435            &mut self,
8436            decoder: &mut fidl::encoding::Decoder<'_, D>,
8437            offset: usize,
8438            _depth: fidl::encoding::Depth,
8439        ) -> fidl::Result<()> {
8440            decoder.debug_check_bounds::<Self>(offset);
8441            // Verify that padding bytes are zero.
8442            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8443            Ok(())
8444        }
8445    }
8446
8447    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReusePortRequest {
8448        type Borrowed<'a> = &'a Self;
8449        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8450            value
8451        }
8452    }
8453
8454    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReusePortRequest {
8455        type Owned = Self;
8456
8457        #[inline(always)]
8458        fn inline_align(_context: fidl::encoding::Context) -> usize {
8459            1
8460        }
8461
8462        #[inline(always)]
8463        fn inline_size(_context: fidl::encoding::Context) -> usize {
8464            1
8465        }
8466    }
8467
8468    unsafe impl<D: fidl::encoding::ResourceDialect>
8469        fidl::encoding::Encode<BaseSocketSetReusePortRequest, D>
8470        for &BaseSocketSetReusePortRequest
8471    {
8472        #[inline]
8473        unsafe fn encode(
8474            self,
8475            encoder: &mut fidl::encoding::Encoder<'_, D>,
8476            offset: usize,
8477            _depth: fidl::encoding::Depth,
8478        ) -> fidl::Result<()> {
8479            encoder.debug_check_bounds::<BaseSocketSetReusePortRequest>(offset);
8480            // Delegate to tuple encoding.
8481            fidl::encoding::Encode::<BaseSocketSetReusePortRequest, D>::encode(
8482                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8483                encoder,
8484                offset,
8485                _depth,
8486            )
8487        }
8488    }
8489    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8490        fidl::encoding::Encode<BaseSocketSetReusePortRequest, D> for (T0,)
8491    {
8492        #[inline]
8493        unsafe fn encode(
8494            self,
8495            encoder: &mut fidl::encoding::Encoder<'_, D>,
8496            offset: usize,
8497            depth: fidl::encoding::Depth,
8498        ) -> fidl::Result<()> {
8499            encoder.debug_check_bounds::<BaseSocketSetReusePortRequest>(offset);
8500            // Zero out padding regions. There's no need to apply masks
8501            // because the unmasked parts will be overwritten by fields.
8502            // Write the fields.
8503            self.0.encode(encoder, offset + 0, depth)?;
8504            Ok(())
8505        }
8506    }
8507
8508    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8509        for BaseSocketSetReusePortRequest
8510    {
8511        #[inline(always)]
8512        fn new_empty() -> Self {
8513            Self { value: fidl::new_empty!(bool, D) }
8514        }
8515
8516        #[inline]
8517        unsafe fn decode(
8518            &mut self,
8519            decoder: &mut fidl::encoding::Decoder<'_, D>,
8520            offset: usize,
8521            _depth: fidl::encoding::Depth,
8522        ) -> fidl::Result<()> {
8523            decoder.debug_check_bounds::<Self>(offset);
8524            // Verify that padding bytes are zero.
8525            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8526            Ok(())
8527        }
8528    }
8529
8530    impl fidl::encoding::ValueTypeMarker for BaseSocketSetSendBufferRequest {
8531        type Borrowed<'a> = &'a Self;
8532        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8533            value
8534        }
8535    }
8536
8537    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetSendBufferRequest {
8538        type Owned = Self;
8539
8540        #[inline(always)]
8541        fn inline_align(_context: fidl::encoding::Context) -> usize {
8542            8
8543        }
8544
8545        #[inline(always)]
8546        fn inline_size(_context: fidl::encoding::Context) -> usize {
8547            8
8548        }
8549        #[inline(always)]
8550        fn encode_is_copy() -> bool {
8551            true
8552        }
8553
8554        #[inline(always)]
8555        fn decode_is_copy() -> bool {
8556            true
8557        }
8558    }
8559
8560    unsafe impl<D: fidl::encoding::ResourceDialect>
8561        fidl::encoding::Encode<BaseSocketSetSendBufferRequest, D>
8562        for &BaseSocketSetSendBufferRequest
8563    {
8564        #[inline]
8565        unsafe fn encode(
8566            self,
8567            encoder: &mut fidl::encoding::Encoder<'_, D>,
8568            offset: usize,
8569            _depth: fidl::encoding::Depth,
8570        ) -> fidl::Result<()> {
8571            encoder.debug_check_bounds::<BaseSocketSetSendBufferRequest>(offset);
8572            unsafe {
8573                // Copy the object into the buffer.
8574                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8575                (buf_ptr as *mut BaseSocketSetSendBufferRequest)
8576                    .write_unaligned((self as *const BaseSocketSetSendBufferRequest).read());
8577                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8578                // done second because the memcpy will write garbage to these bytes.
8579            }
8580            Ok(())
8581        }
8582    }
8583    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8584        fidl::encoding::Encode<BaseSocketSetSendBufferRequest, D> for (T0,)
8585    {
8586        #[inline]
8587        unsafe fn encode(
8588            self,
8589            encoder: &mut fidl::encoding::Encoder<'_, D>,
8590            offset: usize,
8591            depth: fidl::encoding::Depth,
8592        ) -> fidl::Result<()> {
8593            encoder.debug_check_bounds::<BaseSocketSetSendBufferRequest>(offset);
8594            // Zero out padding regions. There's no need to apply masks
8595            // because the unmasked parts will be overwritten by fields.
8596            // Write the fields.
8597            self.0.encode(encoder, offset + 0, depth)?;
8598            Ok(())
8599        }
8600    }
8601
8602    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8603        for BaseSocketSetSendBufferRequest
8604    {
8605        #[inline(always)]
8606        fn new_empty() -> Self {
8607            Self { value_bytes: fidl::new_empty!(u64, D) }
8608        }
8609
8610        #[inline]
8611        unsafe fn decode(
8612            &mut self,
8613            decoder: &mut fidl::encoding::Decoder<'_, D>,
8614            offset: usize,
8615            _depth: fidl::encoding::Depth,
8616        ) -> fidl::Result<()> {
8617            decoder.debug_check_bounds::<Self>(offset);
8618            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8619            // Verify that padding bytes are zero.
8620            // Copy from the buffer into the object.
8621            unsafe {
8622                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8623            }
8624            Ok(())
8625        }
8626    }
8627
8628    impl fidl::encoding::ValueTypeMarker for BaseSocketSetTimestampRequest {
8629        type Borrowed<'a> = &'a Self;
8630        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8631            value
8632        }
8633    }
8634
8635    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetTimestampRequest {
8636        type Owned = Self;
8637
8638        #[inline(always)]
8639        fn inline_align(_context: fidl::encoding::Context) -> usize {
8640            4
8641        }
8642
8643        #[inline(always)]
8644        fn inline_size(_context: fidl::encoding::Context) -> usize {
8645            4
8646        }
8647    }
8648
8649    unsafe impl<D: fidl::encoding::ResourceDialect>
8650        fidl::encoding::Encode<BaseSocketSetTimestampRequest, D>
8651        for &BaseSocketSetTimestampRequest
8652    {
8653        #[inline]
8654        unsafe fn encode(
8655            self,
8656            encoder: &mut fidl::encoding::Encoder<'_, D>,
8657            offset: usize,
8658            _depth: fidl::encoding::Depth,
8659        ) -> fidl::Result<()> {
8660            encoder.debug_check_bounds::<BaseSocketSetTimestampRequest>(offset);
8661            // Delegate to tuple encoding.
8662            fidl::encoding::Encode::<BaseSocketSetTimestampRequest, D>::encode(
8663                (<TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8664                encoder,
8665                offset,
8666                _depth,
8667            )
8668        }
8669    }
8670    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TimestampOption, D>>
8671        fidl::encoding::Encode<BaseSocketSetTimestampRequest, D> for (T0,)
8672    {
8673        #[inline]
8674        unsafe fn encode(
8675            self,
8676            encoder: &mut fidl::encoding::Encoder<'_, D>,
8677            offset: usize,
8678            depth: fidl::encoding::Depth,
8679        ) -> fidl::Result<()> {
8680            encoder.debug_check_bounds::<BaseSocketSetTimestampRequest>(offset);
8681            // Zero out padding regions. There's no need to apply masks
8682            // because the unmasked parts will be overwritten by fields.
8683            // Write the fields.
8684            self.0.encode(encoder, offset + 0, depth)?;
8685            Ok(())
8686        }
8687    }
8688
8689    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8690        for BaseSocketSetTimestampRequest
8691    {
8692        #[inline(always)]
8693        fn new_empty() -> Self {
8694            Self { value: fidl::new_empty!(TimestampOption, D) }
8695        }
8696
8697        #[inline]
8698        unsafe fn decode(
8699            &mut self,
8700            decoder: &mut fidl::encoding::Decoder<'_, D>,
8701            offset: usize,
8702            _depth: fidl::encoding::Depth,
8703        ) -> fidl::Result<()> {
8704            decoder.debug_check_bounds::<Self>(offset);
8705            // Verify that padding bytes are zero.
8706            fidl::decode!(TimestampOption, D, &mut self.value, decoder, offset + 0, _depth)?;
8707            Ok(())
8708        }
8709    }
8710
8711    impl fidl::encoding::ValueTypeMarker for BaseSocketGetAcceptConnResponse {
8712        type Borrowed<'a> = &'a Self;
8713        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8714            value
8715        }
8716    }
8717
8718    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetAcceptConnResponse {
8719        type Owned = Self;
8720
8721        #[inline(always)]
8722        fn inline_align(_context: fidl::encoding::Context) -> usize {
8723            1
8724        }
8725
8726        #[inline(always)]
8727        fn inline_size(_context: fidl::encoding::Context) -> usize {
8728            1
8729        }
8730    }
8731
8732    unsafe impl<D: fidl::encoding::ResourceDialect>
8733        fidl::encoding::Encode<BaseSocketGetAcceptConnResponse, D>
8734        for &BaseSocketGetAcceptConnResponse
8735    {
8736        #[inline]
8737        unsafe fn encode(
8738            self,
8739            encoder: &mut fidl::encoding::Encoder<'_, D>,
8740            offset: usize,
8741            _depth: fidl::encoding::Depth,
8742        ) -> fidl::Result<()> {
8743            encoder.debug_check_bounds::<BaseSocketGetAcceptConnResponse>(offset);
8744            // Delegate to tuple encoding.
8745            fidl::encoding::Encode::<BaseSocketGetAcceptConnResponse, D>::encode(
8746                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8747                encoder,
8748                offset,
8749                _depth,
8750            )
8751        }
8752    }
8753    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8754        fidl::encoding::Encode<BaseSocketGetAcceptConnResponse, D> for (T0,)
8755    {
8756        #[inline]
8757        unsafe fn encode(
8758            self,
8759            encoder: &mut fidl::encoding::Encoder<'_, D>,
8760            offset: usize,
8761            depth: fidl::encoding::Depth,
8762        ) -> fidl::Result<()> {
8763            encoder.debug_check_bounds::<BaseSocketGetAcceptConnResponse>(offset);
8764            // Zero out padding regions. There's no need to apply masks
8765            // because the unmasked parts will be overwritten by fields.
8766            // Write the fields.
8767            self.0.encode(encoder, offset + 0, depth)?;
8768            Ok(())
8769        }
8770    }
8771
8772    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8773        for BaseSocketGetAcceptConnResponse
8774    {
8775        #[inline(always)]
8776        fn new_empty() -> Self {
8777            Self { value: fidl::new_empty!(bool, D) }
8778        }
8779
8780        #[inline]
8781        unsafe fn decode(
8782            &mut self,
8783            decoder: &mut fidl::encoding::Decoder<'_, D>,
8784            offset: usize,
8785            _depth: fidl::encoding::Depth,
8786        ) -> fidl::Result<()> {
8787            decoder.debug_check_bounds::<Self>(offset);
8788            // Verify that padding bytes are zero.
8789            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8790            Ok(())
8791        }
8792    }
8793
8794    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBindToDeviceResponse {
8795        type Borrowed<'a> = &'a Self;
8796        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8797            value
8798        }
8799    }
8800
8801    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBindToDeviceResponse {
8802        type Owned = Self;
8803
8804        #[inline(always)]
8805        fn inline_align(_context: fidl::encoding::Context) -> usize {
8806            8
8807        }
8808
8809        #[inline(always)]
8810        fn inline_size(_context: fidl::encoding::Context) -> usize {
8811            16
8812        }
8813    }
8814
8815    unsafe impl<D: fidl::encoding::ResourceDialect>
8816        fidl::encoding::Encode<BaseSocketGetBindToDeviceResponse, D>
8817        for &BaseSocketGetBindToDeviceResponse
8818    {
8819        #[inline]
8820        unsafe fn encode(
8821            self,
8822            encoder: &mut fidl::encoding::Encoder<'_, D>,
8823            offset: usize,
8824            _depth: fidl::encoding::Depth,
8825        ) -> fidl::Result<()> {
8826            encoder.debug_check_bounds::<BaseSocketGetBindToDeviceResponse>(offset);
8827            // Delegate to tuple encoding.
8828            fidl::encoding::Encode::<BaseSocketGetBindToDeviceResponse, D>::encode(
8829                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
8830                    &self.value,
8831                ),),
8832                encoder,
8833                offset,
8834                _depth,
8835            )
8836        }
8837    }
8838    unsafe impl<
8839            D: fidl::encoding::ResourceDialect,
8840            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
8841        > fidl::encoding::Encode<BaseSocketGetBindToDeviceResponse, D> for (T0,)
8842    {
8843        #[inline]
8844        unsafe fn encode(
8845            self,
8846            encoder: &mut fidl::encoding::Encoder<'_, D>,
8847            offset: usize,
8848            depth: fidl::encoding::Depth,
8849        ) -> fidl::Result<()> {
8850            encoder.debug_check_bounds::<BaseSocketGetBindToDeviceResponse>(offset);
8851            // Zero out padding regions. There's no need to apply masks
8852            // because the unmasked parts will be overwritten by fields.
8853            // Write the fields.
8854            self.0.encode(encoder, offset + 0, depth)?;
8855            Ok(())
8856        }
8857    }
8858
8859    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8860        for BaseSocketGetBindToDeviceResponse
8861    {
8862        #[inline(always)]
8863        fn new_empty() -> Self {
8864            Self { value: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
8865        }
8866
8867        #[inline]
8868        unsafe fn decode(
8869            &mut self,
8870            decoder: &mut fidl::encoding::Decoder<'_, D>,
8871            offset: usize,
8872            _depth: fidl::encoding::Depth,
8873        ) -> fidl::Result<()> {
8874            decoder.debug_check_bounds::<Self>(offset);
8875            // Verify that padding bytes are zero.
8876            fidl::decode!(
8877                fidl::encoding::BoundedString<15>,
8878                D,
8879                &mut self.value,
8880                decoder,
8881                offset + 0,
8882                _depth
8883            )?;
8884            Ok(())
8885        }
8886    }
8887
8888    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBindToInterfaceIndexResponse {
8889        type Borrowed<'a> = &'a Self;
8890        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8891            value
8892        }
8893    }
8894
8895    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBindToInterfaceIndexResponse {
8896        type Owned = Self;
8897
8898        #[inline(always)]
8899        fn inline_align(_context: fidl::encoding::Context) -> usize {
8900            8
8901        }
8902
8903        #[inline(always)]
8904        fn inline_size(_context: fidl::encoding::Context) -> usize {
8905            8
8906        }
8907        #[inline(always)]
8908        fn encode_is_copy() -> bool {
8909            true
8910        }
8911
8912        #[inline(always)]
8913        fn decode_is_copy() -> bool {
8914            true
8915        }
8916    }
8917
8918    unsafe impl<D: fidl::encoding::ResourceDialect>
8919        fidl::encoding::Encode<BaseSocketGetBindToInterfaceIndexResponse, D>
8920        for &BaseSocketGetBindToInterfaceIndexResponse
8921    {
8922        #[inline]
8923        unsafe fn encode(
8924            self,
8925            encoder: &mut fidl::encoding::Encoder<'_, D>,
8926            offset: usize,
8927            _depth: fidl::encoding::Depth,
8928        ) -> fidl::Result<()> {
8929            encoder.debug_check_bounds::<BaseSocketGetBindToInterfaceIndexResponse>(offset);
8930            unsafe {
8931                // Copy the object into the buffer.
8932                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8933                (buf_ptr as *mut BaseSocketGetBindToInterfaceIndexResponse).write_unaligned(
8934                    (self as *const BaseSocketGetBindToInterfaceIndexResponse).read(),
8935                );
8936                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8937                // done second because the memcpy will write garbage to these bytes.
8938            }
8939            Ok(())
8940        }
8941    }
8942    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8943        fidl::encoding::Encode<BaseSocketGetBindToInterfaceIndexResponse, D> for (T0,)
8944    {
8945        #[inline]
8946        unsafe fn encode(
8947            self,
8948            encoder: &mut fidl::encoding::Encoder<'_, D>,
8949            offset: usize,
8950            depth: fidl::encoding::Depth,
8951        ) -> fidl::Result<()> {
8952            encoder.debug_check_bounds::<BaseSocketGetBindToInterfaceIndexResponse>(offset);
8953            // Zero out padding regions. There's no need to apply masks
8954            // because the unmasked parts will be overwritten by fields.
8955            // Write the fields.
8956            self.0.encode(encoder, offset + 0, depth)?;
8957            Ok(())
8958        }
8959    }
8960
8961    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8962        for BaseSocketGetBindToInterfaceIndexResponse
8963    {
8964        #[inline(always)]
8965        fn new_empty() -> Self {
8966            Self { value: fidl::new_empty!(u64, D) }
8967        }
8968
8969        #[inline]
8970        unsafe fn decode(
8971            &mut self,
8972            decoder: &mut fidl::encoding::Decoder<'_, D>,
8973            offset: usize,
8974            _depth: fidl::encoding::Depth,
8975        ) -> fidl::Result<()> {
8976            decoder.debug_check_bounds::<Self>(offset);
8977            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8978            // Verify that padding bytes are zero.
8979            // Copy from the buffer into the object.
8980            unsafe {
8981                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8982            }
8983            Ok(())
8984        }
8985    }
8986
8987    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBroadcastResponse {
8988        type Borrowed<'a> = &'a Self;
8989        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8990            value
8991        }
8992    }
8993
8994    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBroadcastResponse {
8995        type Owned = Self;
8996
8997        #[inline(always)]
8998        fn inline_align(_context: fidl::encoding::Context) -> usize {
8999            1
9000        }
9001
9002        #[inline(always)]
9003        fn inline_size(_context: fidl::encoding::Context) -> usize {
9004            1
9005        }
9006    }
9007
9008    unsafe impl<D: fidl::encoding::ResourceDialect>
9009        fidl::encoding::Encode<BaseSocketGetBroadcastResponse, D>
9010        for &BaseSocketGetBroadcastResponse
9011    {
9012        #[inline]
9013        unsafe fn encode(
9014            self,
9015            encoder: &mut fidl::encoding::Encoder<'_, D>,
9016            offset: usize,
9017            _depth: fidl::encoding::Depth,
9018        ) -> fidl::Result<()> {
9019            encoder.debug_check_bounds::<BaseSocketGetBroadcastResponse>(offset);
9020            // Delegate to tuple encoding.
9021            fidl::encoding::Encode::<BaseSocketGetBroadcastResponse, D>::encode(
9022                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9023                encoder,
9024                offset,
9025                _depth,
9026            )
9027        }
9028    }
9029    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9030        fidl::encoding::Encode<BaseSocketGetBroadcastResponse, D> for (T0,)
9031    {
9032        #[inline]
9033        unsafe fn encode(
9034            self,
9035            encoder: &mut fidl::encoding::Encoder<'_, D>,
9036            offset: usize,
9037            depth: fidl::encoding::Depth,
9038        ) -> fidl::Result<()> {
9039            encoder.debug_check_bounds::<BaseSocketGetBroadcastResponse>(offset);
9040            // Zero out padding regions. There's no need to apply masks
9041            // because the unmasked parts will be overwritten by fields.
9042            // Write the fields.
9043            self.0.encode(encoder, offset + 0, depth)?;
9044            Ok(())
9045        }
9046    }
9047
9048    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9049        for BaseSocketGetBroadcastResponse
9050    {
9051        #[inline(always)]
9052        fn new_empty() -> Self {
9053            Self { value: fidl::new_empty!(bool, D) }
9054        }
9055
9056        #[inline]
9057        unsafe fn decode(
9058            &mut self,
9059            decoder: &mut fidl::encoding::Decoder<'_, D>,
9060            offset: usize,
9061            _depth: fidl::encoding::Depth,
9062        ) -> fidl::Result<()> {
9063            decoder.debug_check_bounds::<Self>(offset);
9064            // Verify that padding bytes are zero.
9065            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9066            Ok(())
9067        }
9068    }
9069
9070    impl fidl::encoding::ValueTypeMarker for BaseSocketGetCookieResponse {
9071        type Borrowed<'a> = &'a Self;
9072        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9073            value
9074        }
9075    }
9076
9077    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetCookieResponse {
9078        type Owned = Self;
9079
9080        #[inline(always)]
9081        fn inline_align(_context: fidl::encoding::Context) -> usize {
9082            8
9083        }
9084
9085        #[inline(always)]
9086        fn inline_size(_context: fidl::encoding::Context) -> usize {
9087            8
9088        }
9089        #[inline(always)]
9090        fn encode_is_copy() -> bool {
9091            true
9092        }
9093
9094        #[inline(always)]
9095        fn decode_is_copy() -> bool {
9096            true
9097        }
9098    }
9099
9100    unsafe impl<D: fidl::encoding::ResourceDialect>
9101        fidl::encoding::Encode<BaseSocketGetCookieResponse, D> for &BaseSocketGetCookieResponse
9102    {
9103        #[inline]
9104        unsafe fn encode(
9105            self,
9106            encoder: &mut fidl::encoding::Encoder<'_, D>,
9107            offset: usize,
9108            _depth: fidl::encoding::Depth,
9109        ) -> fidl::Result<()> {
9110            encoder.debug_check_bounds::<BaseSocketGetCookieResponse>(offset);
9111            unsafe {
9112                // Copy the object into the buffer.
9113                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9114                (buf_ptr as *mut BaseSocketGetCookieResponse)
9115                    .write_unaligned((self as *const BaseSocketGetCookieResponse).read());
9116                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9117                // done second because the memcpy will write garbage to these bytes.
9118            }
9119            Ok(())
9120        }
9121    }
9122    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9123        fidl::encoding::Encode<BaseSocketGetCookieResponse, D> for (T0,)
9124    {
9125        #[inline]
9126        unsafe fn encode(
9127            self,
9128            encoder: &mut fidl::encoding::Encoder<'_, D>,
9129            offset: usize,
9130            depth: fidl::encoding::Depth,
9131        ) -> fidl::Result<()> {
9132            encoder.debug_check_bounds::<BaseSocketGetCookieResponse>(offset);
9133            // Zero out padding regions. There's no need to apply masks
9134            // because the unmasked parts will be overwritten by fields.
9135            // Write the fields.
9136            self.0.encode(encoder, offset + 0, depth)?;
9137            Ok(())
9138        }
9139    }
9140
9141    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9142        for BaseSocketGetCookieResponse
9143    {
9144        #[inline(always)]
9145        fn new_empty() -> Self {
9146            Self { value: fidl::new_empty!(u64, D) }
9147        }
9148
9149        #[inline]
9150        unsafe fn decode(
9151            &mut self,
9152            decoder: &mut fidl::encoding::Decoder<'_, D>,
9153            offset: usize,
9154            _depth: fidl::encoding::Depth,
9155        ) -> fidl::Result<()> {
9156            decoder.debug_check_bounds::<Self>(offset);
9157            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9158            // Verify that padding bytes are zero.
9159            // Copy from the buffer into the object.
9160            unsafe {
9161                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9162            }
9163            Ok(())
9164        }
9165    }
9166
9167    impl fidl::encoding::ValueTypeMarker for BaseSocketGetKeepAliveResponse {
9168        type Borrowed<'a> = &'a Self;
9169        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9170            value
9171        }
9172    }
9173
9174    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetKeepAliveResponse {
9175        type Owned = Self;
9176
9177        #[inline(always)]
9178        fn inline_align(_context: fidl::encoding::Context) -> usize {
9179            1
9180        }
9181
9182        #[inline(always)]
9183        fn inline_size(_context: fidl::encoding::Context) -> usize {
9184            1
9185        }
9186    }
9187
9188    unsafe impl<D: fidl::encoding::ResourceDialect>
9189        fidl::encoding::Encode<BaseSocketGetKeepAliveResponse, D>
9190        for &BaseSocketGetKeepAliveResponse
9191    {
9192        #[inline]
9193        unsafe fn encode(
9194            self,
9195            encoder: &mut fidl::encoding::Encoder<'_, D>,
9196            offset: usize,
9197            _depth: fidl::encoding::Depth,
9198        ) -> fidl::Result<()> {
9199            encoder.debug_check_bounds::<BaseSocketGetKeepAliveResponse>(offset);
9200            // Delegate to tuple encoding.
9201            fidl::encoding::Encode::<BaseSocketGetKeepAliveResponse, D>::encode(
9202                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9203                encoder,
9204                offset,
9205                _depth,
9206            )
9207        }
9208    }
9209    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9210        fidl::encoding::Encode<BaseSocketGetKeepAliveResponse, D> for (T0,)
9211    {
9212        #[inline]
9213        unsafe fn encode(
9214            self,
9215            encoder: &mut fidl::encoding::Encoder<'_, D>,
9216            offset: usize,
9217            depth: fidl::encoding::Depth,
9218        ) -> fidl::Result<()> {
9219            encoder.debug_check_bounds::<BaseSocketGetKeepAliveResponse>(offset);
9220            // Zero out padding regions. There's no need to apply masks
9221            // because the unmasked parts will be overwritten by fields.
9222            // Write the fields.
9223            self.0.encode(encoder, offset + 0, depth)?;
9224            Ok(())
9225        }
9226    }
9227
9228    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9229        for BaseSocketGetKeepAliveResponse
9230    {
9231        #[inline(always)]
9232        fn new_empty() -> Self {
9233            Self { value: fidl::new_empty!(bool, D) }
9234        }
9235
9236        #[inline]
9237        unsafe fn decode(
9238            &mut self,
9239            decoder: &mut fidl::encoding::Decoder<'_, D>,
9240            offset: usize,
9241            _depth: fidl::encoding::Depth,
9242        ) -> fidl::Result<()> {
9243            decoder.debug_check_bounds::<Self>(offset);
9244            // Verify that padding bytes are zero.
9245            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9246            Ok(())
9247        }
9248    }
9249
9250    impl fidl::encoding::ValueTypeMarker for BaseSocketGetLingerResponse {
9251        type Borrowed<'a> = &'a Self;
9252        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9253            value
9254        }
9255    }
9256
9257    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetLingerResponse {
9258        type Owned = Self;
9259
9260        #[inline(always)]
9261        fn inline_align(_context: fidl::encoding::Context) -> usize {
9262            4
9263        }
9264
9265        #[inline(always)]
9266        fn inline_size(_context: fidl::encoding::Context) -> usize {
9267            8
9268        }
9269    }
9270
9271    unsafe impl<D: fidl::encoding::ResourceDialect>
9272        fidl::encoding::Encode<BaseSocketGetLingerResponse, D> for &BaseSocketGetLingerResponse
9273    {
9274        #[inline]
9275        unsafe fn encode(
9276            self,
9277            encoder: &mut fidl::encoding::Encoder<'_, D>,
9278            offset: usize,
9279            _depth: fidl::encoding::Depth,
9280        ) -> fidl::Result<()> {
9281            encoder.debug_check_bounds::<BaseSocketGetLingerResponse>(offset);
9282            // Delegate to tuple encoding.
9283            fidl::encoding::Encode::<BaseSocketGetLingerResponse, D>::encode(
9284                (
9285                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.linger),
9286                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length_secs),
9287                ),
9288                encoder,
9289                offset,
9290                _depth,
9291            )
9292        }
9293    }
9294    unsafe impl<
9295            D: fidl::encoding::ResourceDialect,
9296            T0: fidl::encoding::Encode<bool, D>,
9297            T1: fidl::encoding::Encode<u32, D>,
9298        > fidl::encoding::Encode<BaseSocketGetLingerResponse, D> for (T0, T1)
9299    {
9300        #[inline]
9301        unsafe fn encode(
9302            self,
9303            encoder: &mut fidl::encoding::Encoder<'_, D>,
9304            offset: usize,
9305            depth: fidl::encoding::Depth,
9306        ) -> fidl::Result<()> {
9307            encoder.debug_check_bounds::<BaseSocketGetLingerResponse>(offset);
9308            // Zero out padding regions. There's no need to apply masks
9309            // because the unmasked parts will be overwritten by fields.
9310            unsafe {
9311                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9312                (ptr as *mut u32).write_unaligned(0);
9313            }
9314            // Write the fields.
9315            self.0.encode(encoder, offset + 0, depth)?;
9316            self.1.encode(encoder, offset + 4, depth)?;
9317            Ok(())
9318        }
9319    }
9320
9321    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9322        for BaseSocketGetLingerResponse
9323    {
9324        #[inline(always)]
9325        fn new_empty() -> Self {
9326            Self { linger: fidl::new_empty!(bool, D), length_secs: fidl::new_empty!(u32, D) }
9327        }
9328
9329        #[inline]
9330        unsafe fn decode(
9331            &mut self,
9332            decoder: &mut fidl::encoding::Decoder<'_, D>,
9333            offset: usize,
9334            _depth: fidl::encoding::Depth,
9335        ) -> fidl::Result<()> {
9336            decoder.debug_check_bounds::<Self>(offset);
9337            // Verify that padding bytes are zero.
9338            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9339            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9340            let mask = 0xffffff00u32;
9341            let maskedval = padval & mask;
9342            if maskedval != 0 {
9343                return Err(fidl::Error::NonZeroPadding {
9344                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9345                });
9346            }
9347            fidl::decode!(bool, D, &mut self.linger, decoder, offset + 0, _depth)?;
9348            fidl::decode!(u32, D, &mut self.length_secs, decoder, offset + 4, _depth)?;
9349            Ok(())
9350        }
9351    }
9352
9353    impl fidl::encoding::ValueTypeMarker for BaseSocketGetMarkResponse {
9354        type Borrowed<'a> = &'a Self;
9355        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9356            value
9357        }
9358    }
9359
9360    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetMarkResponse {
9361        type Owned = Self;
9362
9363        #[inline(always)]
9364        fn inline_align(_context: fidl::encoding::Context) -> usize {
9365            8
9366        }
9367
9368        #[inline(always)]
9369        fn inline_size(_context: fidl::encoding::Context) -> usize {
9370            16
9371        }
9372    }
9373
9374    unsafe impl<D: fidl::encoding::ResourceDialect>
9375        fidl::encoding::Encode<BaseSocketGetMarkResponse, D> for &BaseSocketGetMarkResponse
9376    {
9377        #[inline]
9378        unsafe fn encode(
9379            self,
9380            encoder: &mut fidl::encoding::Encoder<'_, D>,
9381            offset: usize,
9382            _depth: fidl::encoding::Depth,
9383        ) -> fidl::Result<()> {
9384            encoder.debug_check_bounds::<BaseSocketGetMarkResponse>(offset);
9385            // Delegate to tuple encoding.
9386            fidl::encoding::Encode::<BaseSocketGetMarkResponse, D>::encode(
9387                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mark),),
9388                encoder,
9389                offset,
9390                _depth,
9391            )
9392        }
9393    }
9394    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
9395        fidl::encoding::Encode<BaseSocketGetMarkResponse, D> for (T0,)
9396    {
9397        #[inline]
9398        unsafe fn encode(
9399            self,
9400            encoder: &mut fidl::encoding::Encoder<'_, D>,
9401            offset: usize,
9402            depth: fidl::encoding::Depth,
9403        ) -> fidl::Result<()> {
9404            encoder.debug_check_bounds::<BaseSocketGetMarkResponse>(offset);
9405            // Zero out padding regions. There's no need to apply masks
9406            // because the unmasked parts will be overwritten by fields.
9407            // Write the fields.
9408            self.0.encode(encoder, offset + 0, depth)?;
9409            Ok(())
9410        }
9411    }
9412
9413    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9414        for BaseSocketGetMarkResponse
9415    {
9416        #[inline(always)]
9417        fn new_empty() -> Self {
9418            Self { mark: fidl::new_empty!(OptionalUint32, D) }
9419        }
9420
9421        #[inline]
9422        unsafe fn decode(
9423            &mut self,
9424            decoder: &mut fidl::encoding::Decoder<'_, D>,
9425            offset: usize,
9426            _depth: fidl::encoding::Depth,
9427        ) -> fidl::Result<()> {
9428            decoder.debug_check_bounds::<Self>(offset);
9429            // Verify that padding bytes are zero.
9430            fidl::decode!(OptionalUint32, D, &mut self.mark, decoder, offset + 0, _depth)?;
9431            Ok(())
9432        }
9433    }
9434
9435    impl fidl::encoding::ValueTypeMarker for BaseSocketGetNoCheckResponse {
9436        type Borrowed<'a> = &'a Self;
9437        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9438            value
9439        }
9440    }
9441
9442    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetNoCheckResponse {
9443        type Owned = Self;
9444
9445        #[inline(always)]
9446        fn inline_align(_context: fidl::encoding::Context) -> usize {
9447            1
9448        }
9449
9450        #[inline(always)]
9451        fn inline_size(_context: fidl::encoding::Context) -> usize {
9452            1
9453        }
9454    }
9455
9456    unsafe impl<D: fidl::encoding::ResourceDialect>
9457        fidl::encoding::Encode<BaseSocketGetNoCheckResponse, D> for &BaseSocketGetNoCheckResponse
9458    {
9459        #[inline]
9460        unsafe fn encode(
9461            self,
9462            encoder: &mut fidl::encoding::Encoder<'_, D>,
9463            offset: usize,
9464            _depth: fidl::encoding::Depth,
9465        ) -> fidl::Result<()> {
9466            encoder.debug_check_bounds::<BaseSocketGetNoCheckResponse>(offset);
9467            // Delegate to tuple encoding.
9468            fidl::encoding::Encode::<BaseSocketGetNoCheckResponse, D>::encode(
9469                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9470                encoder,
9471                offset,
9472                _depth,
9473            )
9474        }
9475    }
9476    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9477        fidl::encoding::Encode<BaseSocketGetNoCheckResponse, D> for (T0,)
9478    {
9479        #[inline]
9480        unsafe fn encode(
9481            self,
9482            encoder: &mut fidl::encoding::Encoder<'_, D>,
9483            offset: usize,
9484            depth: fidl::encoding::Depth,
9485        ) -> fidl::Result<()> {
9486            encoder.debug_check_bounds::<BaseSocketGetNoCheckResponse>(offset);
9487            // Zero out padding regions. There's no need to apply masks
9488            // because the unmasked parts will be overwritten by fields.
9489            // Write the fields.
9490            self.0.encode(encoder, offset + 0, depth)?;
9491            Ok(())
9492        }
9493    }
9494
9495    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9496        for BaseSocketGetNoCheckResponse
9497    {
9498        #[inline(always)]
9499        fn new_empty() -> Self {
9500            Self { value: fidl::new_empty!(bool, D) }
9501        }
9502
9503        #[inline]
9504        unsafe fn decode(
9505            &mut self,
9506            decoder: &mut fidl::encoding::Decoder<'_, D>,
9507            offset: usize,
9508            _depth: fidl::encoding::Depth,
9509        ) -> fidl::Result<()> {
9510            decoder.debug_check_bounds::<Self>(offset);
9511            // Verify that padding bytes are zero.
9512            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9513            Ok(())
9514        }
9515    }
9516
9517    impl fidl::encoding::ValueTypeMarker for BaseSocketGetOutOfBandInlineResponse {
9518        type Borrowed<'a> = &'a Self;
9519        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9520            value
9521        }
9522    }
9523
9524    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetOutOfBandInlineResponse {
9525        type Owned = Self;
9526
9527        #[inline(always)]
9528        fn inline_align(_context: fidl::encoding::Context) -> usize {
9529            1
9530        }
9531
9532        #[inline(always)]
9533        fn inline_size(_context: fidl::encoding::Context) -> usize {
9534            1
9535        }
9536    }
9537
9538    unsafe impl<D: fidl::encoding::ResourceDialect>
9539        fidl::encoding::Encode<BaseSocketGetOutOfBandInlineResponse, D>
9540        for &BaseSocketGetOutOfBandInlineResponse
9541    {
9542        #[inline]
9543        unsafe fn encode(
9544            self,
9545            encoder: &mut fidl::encoding::Encoder<'_, D>,
9546            offset: usize,
9547            _depth: fidl::encoding::Depth,
9548        ) -> fidl::Result<()> {
9549            encoder.debug_check_bounds::<BaseSocketGetOutOfBandInlineResponse>(offset);
9550            // Delegate to tuple encoding.
9551            fidl::encoding::Encode::<BaseSocketGetOutOfBandInlineResponse, D>::encode(
9552                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9553                encoder,
9554                offset,
9555                _depth,
9556            )
9557        }
9558    }
9559    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9560        fidl::encoding::Encode<BaseSocketGetOutOfBandInlineResponse, D> for (T0,)
9561    {
9562        #[inline]
9563        unsafe fn encode(
9564            self,
9565            encoder: &mut fidl::encoding::Encoder<'_, D>,
9566            offset: usize,
9567            depth: fidl::encoding::Depth,
9568        ) -> fidl::Result<()> {
9569            encoder.debug_check_bounds::<BaseSocketGetOutOfBandInlineResponse>(offset);
9570            // Zero out padding regions. There's no need to apply masks
9571            // because the unmasked parts will be overwritten by fields.
9572            // Write the fields.
9573            self.0.encode(encoder, offset + 0, depth)?;
9574            Ok(())
9575        }
9576    }
9577
9578    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9579        for BaseSocketGetOutOfBandInlineResponse
9580    {
9581        #[inline(always)]
9582        fn new_empty() -> Self {
9583            Self { value: fidl::new_empty!(bool, D) }
9584        }
9585
9586        #[inline]
9587        unsafe fn decode(
9588            &mut self,
9589            decoder: &mut fidl::encoding::Decoder<'_, D>,
9590            offset: usize,
9591            _depth: fidl::encoding::Depth,
9592        ) -> fidl::Result<()> {
9593            decoder.debug_check_bounds::<Self>(offset);
9594            // Verify that padding bytes are zero.
9595            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9596            Ok(())
9597        }
9598    }
9599
9600    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReceiveBufferResponse {
9601        type Borrowed<'a> = &'a Self;
9602        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9603            value
9604        }
9605    }
9606
9607    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReceiveBufferResponse {
9608        type Owned = Self;
9609
9610        #[inline(always)]
9611        fn inline_align(_context: fidl::encoding::Context) -> usize {
9612            8
9613        }
9614
9615        #[inline(always)]
9616        fn inline_size(_context: fidl::encoding::Context) -> usize {
9617            8
9618        }
9619        #[inline(always)]
9620        fn encode_is_copy() -> bool {
9621            true
9622        }
9623
9624        #[inline(always)]
9625        fn decode_is_copy() -> bool {
9626            true
9627        }
9628    }
9629
9630    unsafe impl<D: fidl::encoding::ResourceDialect>
9631        fidl::encoding::Encode<BaseSocketGetReceiveBufferResponse, D>
9632        for &BaseSocketGetReceiveBufferResponse
9633    {
9634        #[inline]
9635        unsafe fn encode(
9636            self,
9637            encoder: &mut fidl::encoding::Encoder<'_, D>,
9638            offset: usize,
9639            _depth: fidl::encoding::Depth,
9640        ) -> fidl::Result<()> {
9641            encoder.debug_check_bounds::<BaseSocketGetReceiveBufferResponse>(offset);
9642            unsafe {
9643                // Copy the object into the buffer.
9644                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9645                (buf_ptr as *mut BaseSocketGetReceiveBufferResponse)
9646                    .write_unaligned((self as *const BaseSocketGetReceiveBufferResponse).read());
9647                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9648                // done second because the memcpy will write garbage to these bytes.
9649            }
9650            Ok(())
9651        }
9652    }
9653    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9654        fidl::encoding::Encode<BaseSocketGetReceiveBufferResponse, D> for (T0,)
9655    {
9656        #[inline]
9657        unsafe fn encode(
9658            self,
9659            encoder: &mut fidl::encoding::Encoder<'_, D>,
9660            offset: usize,
9661            depth: fidl::encoding::Depth,
9662        ) -> fidl::Result<()> {
9663            encoder.debug_check_bounds::<BaseSocketGetReceiveBufferResponse>(offset);
9664            // Zero out padding regions. There's no need to apply masks
9665            // because the unmasked parts will be overwritten by fields.
9666            // Write the fields.
9667            self.0.encode(encoder, offset + 0, depth)?;
9668            Ok(())
9669        }
9670    }
9671
9672    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9673        for BaseSocketGetReceiveBufferResponse
9674    {
9675        #[inline(always)]
9676        fn new_empty() -> Self {
9677            Self { value_bytes: fidl::new_empty!(u64, D) }
9678        }
9679
9680        #[inline]
9681        unsafe fn decode(
9682            &mut self,
9683            decoder: &mut fidl::encoding::Decoder<'_, D>,
9684            offset: usize,
9685            _depth: fidl::encoding::Depth,
9686        ) -> fidl::Result<()> {
9687            decoder.debug_check_bounds::<Self>(offset);
9688            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9689            // Verify that padding bytes are zero.
9690            // Copy from the buffer into the object.
9691            unsafe {
9692                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9693            }
9694            Ok(())
9695        }
9696    }
9697
9698    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReuseAddressResponse {
9699        type Borrowed<'a> = &'a Self;
9700        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9701            value
9702        }
9703    }
9704
9705    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReuseAddressResponse {
9706        type Owned = Self;
9707
9708        #[inline(always)]
9709        fn inline_align(_context: fidl::encoding::Context) -> usize {
9710            1
9711        }
9712
9713        #[inline(always)]
9714        fn inline_size(_context: fidl::encoding::Context) -> usize {
9715            1
9716        }
9717    }
9718
9719    unsafe impl<D: fidl::encoding::ResourceDialect>
9720        fidl::encoding::Encode<BaseSocketGetReuseAddressResponse, D>
9721        for &BaseSocketGetReuseAddressResponse
9722    {
9723        #[inline]
9724        unsafe fn encode(
9725            self,
9726            encoder: &mut fidl::encoding::Encoder<'_, D>,
9727            offset: usize,
9728            _depth: fidl::encoding::Depth,
9729        ) -> fidl::Result<()> {
9730            encoder.debug_check_bounds::<BaseSocketGetReuseAddressResponse>(offset);
9731            // Delegate to tuple encoding.
9732            fidl::encoding::Encode::<BaseSocketGetReuseAddressResponse, D>::encode(
9733                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9734                encoder,
9735                offset,
9736                _depth,
9737            )
9738        }
9739    }
9740    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9741        fidl::encoding::Encode<BaseSocketGetReuseAddressResponse, D> for (T0,)
9742    {
9743        #[inline]
9744        unsafe fn encode(
9745            self,
9746            encoder: &mut fidl::encoding::Encoder<'_, D>,
9747            offset: usize,
9748            depth: fidl::encoding::Depth,
9749        ) -> fidl::Result<()> {
9750            encoder.debug_check_bounds::<BaseSocketGetReuseAddressResponse>(offset);
9751            // Zero out padding regions. There's no need to apply masks
9752            // because the unmasked parts will be overwritten by fields.
9753            // Write the fields.
9754            self.0.encode(encoder, offset + 0, depth)?;
9755            Ok(())
9756        }
9757    }
9758
9759    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9760        for BaseSocketGetReuseAddressResponse
9761    {
9762        #[inline(always)]
9763        fn new_empty() -> Self {
9764            Self { value: fidl::new_empty!(bool, D) }
9765        }
9766
9767        #[inline]
9768        unsafe fn decode(
9769            &mut self,
9770            decoder: &mut fidl::encoding::Decoder<'_, D>,
9771            offset: usize,
9772            _depth: fidl::encoding::Depth,
9773        ) -> fidl::Result<()> {
9774            decoder.debug_check_bounds::<Self>(offset);
9775            // Verify that padding bytes are zero.
9776            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9777            Ok(())
9778        }
9779    }
9780
9781    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReusePortResponse {
9782        type Borrowed<'a> = &'a Self;
9783        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9784            value
9785        }
9786    }
9787
9788    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReusePortResponse {
9789        type Owned = Self;
9790
9791        #[inline(always)]
9792        fn inline_align(_context: fidl::encoding::Context) -> usize {
9793            1
9794        }
9795
9796        #[inline(always)]
9797        fn inline_size(_context: fidl::encoding::Context) -> usize {
9798            1
9799        }
9800    }
9801
9802    unsafe impl<D: fidl::encoding::ResourceDialect>
9803        fidl::encoding::Encode<BaseSocketGetReusePortResponse, D>
9804        for &BaseSocketGetReusePortResponse
9805    {
9806        #[inline]
9807        unsafe fn encode(
9808            self,
9809            encoder: &mut fidl::encoding::Encoder<'_, D>,
9810            offset: usize,
9811            _depth: fidl::encoding::Depth,
9812        ) -> fidl::Result<()> {
9813            encoder.debug_check_bounds::<BaseSocketGetReusePortResponse>(offset);
9814            // Delegate to tuple encoding.
9815            fidl::encoding::Encode::<BaseSocketGetReusePortResponse, D>::encode(
9816                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9817                encoder,
9818                offset,
9819                _depth,
9820            )
9821        }
9822    }
9823    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9824        fidl::encoding::Encode<BaseSocketGetReusePortResponse, D> for (T0,)
9825    {
9826        #[inline]
9827        unsafe fn encode(
9828            self,
9829            encoder: &mut fidl::encoding::Encoder<'_, D>,
9830            offset: usize,
9831            depth: fidl::encoding::Depth,
9832        ) -> fidl::Result<()> {
9833            encoder.debug_check_bounds::<BaseSocketGetReusePortResponse>(offset);
9834            // Zero out padding regions. There's no need to apply masks
9835            // because the unmasked parts will be overwritten by fields.
9836            // Write the fields.
9837            self.0.encode(encoder, offset + 0, depth)?;
9838            Ok(())
9839        }
9840    }
9841
9842    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9843        for BaseSocketGetReusePortResponse
9844    {
9845        #[inline(always)]
9846        fn new_empty() -> Self {
9847            Self { value: fidl::new_empty!(bool, D) }
9848        }
9849
9850        #[inline]
9851        unsafe fn decode(
9852            &mut self,
9853            decoder: &mut fidl::encoding::Decoder<'_, D>,
9854            offset: usize,
9855            _depth: fidl::encoding::Depth,
9856        ) -> fidl::Result<()> {
9857            decoder.debug_check_bounds::<Self>(offset);
9858            // Verify that padding bytes are zero.
9859            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9860            Ok(())
9861        }
9862    }
9863
9864    impl fidl::encoding::ValueTypeMarker for BaseSocketGetSendBufferResponse {
9865        type Borrowed<'a> = &'a Self;
9866        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9867            value
9868        }
9869    }
9870
9871    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetSendBufferResponse {
9872        type Owned = Self;
9873
9874        #[inline(always)]
9875        fn inline_align(_context: fidl::encoding::Context) -> usize {
9876            8
9877        }
9878
9879        #[inline(always)]
9880        fn inline_size(_context: fidl::encoding::Context) -> usize {
9881            8
9882        }
9883        #[inline(always)]
9884        fn encode_is_copy() -> bool {
9885            true
9886        }
9887
9888        #[inline(always)]
9889        fn decode_is_copy() -> bool {
9890            true
9891        }
9892    }
9893
9894    unsafe impl<D: fidl::encoding::ResourceDialect>
9895        fidl::encoding::Encode<BaseSocketGetSendBufferResponse, D>
9896        for &BaseSocketGetSendBufferResponse
9897    {
9898        #[inline]
9899        unsafe fn encode(
9900            self,
9901            encoder: &mut fidl::encoding::Encoder<'_, D>,
9902            offset: usize,
9903            _depth: fidl::encoding::Depth,
9904        ) -> fidl::Result<()> {
9905            encoder.debug_check_bounds::<BaseSocketGetSendBufferResponse>(offset);
9906            unsafe {
9907                // Copy the object into the buffer.
9908                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9909                (buf_ptr as *mut BaseSocketGetSendBufferResponse)
9910                    .write_unaligned((self as *const BaseSocketGetSendBufferResponse).read());
9911                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9912                // done second because the memcpy will write garbage to these bytes.
9913            }
9914            Ok(())
9915        }
9916    }
9917    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9918        fidl::encoding::Encode<BaseSocketGetSendBufferResponse, D> for (T0,)
9919    {
9920        #[inline]
9921        unsafe fn encode(
9922            self,
9923            encoder: &mut fidl::encoding::Encoder<'_, D>,
9924            offset: usize,
9925            depth: fidl::encoding::Depth,
9926        ) -> fidl::Result<()> {
9927            encoder.debug_check_bounds::<BaseSocketGetSendBufferResponse>(offset);
9928            // Zero out padding regions. There's no need to apply masks
9929            // because the unmasked parts will be overwritten by fields.
9930            // Write the fields.
9931            self.0.encode(encoder, offset + 0, depth)?;
9932            Ok(())
9933        }
9934    }
9935
9936    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9937        for BaseSocketGetSendBufferResponse
9938    {
9939        #[inline(always)]
9940        fn new_empty() -> Self {
9941            Self { value_bytes: fidl::new_empty!(u64, D) }
9942        }
9943
9944        #[inline]
9945        unsafe fn decode(
9946            &mut self,
9947            decoder: &mut fidl::encoding::Decoder<'_, D>,
9948            offset: usize,
9949            _depth: fidl::encoding::Depth,
9950        ) -> fidl::Result<()> {
9951            decoder.debug_check_bounds::<Self>(offset);
9952            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9953            // Verify that padding bytes are zero.
9954            // Copy from the buffer into the object.
9955            unsafe {
9956                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9957            }
9958            Ok(())
9959        }
9960    }
9961
9962    impl fidl::encoding::ValueTypeMarker for BaseSocketGetTimestampResponse {
9963        type Borrowed<'a> = &'a Self;
9964        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9965            value
9966        }
9967    }
9968
9969    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetTimestampResponse {
9970        type Owned = Self;
9971
9972        #[inline(always)]
9973        fn inline_align(_context: fidl::encoding::Context) -> usize {
9974            4
9975        }
9976
9977        #[inline(always)]
9978        fn inline_size(_context: fidl::encoding::Context) -> usize {
9979            4
9980        }
9981    }
9982
9983    unsafe impl<D: fidl::encoding::ResourceDialect>
9984        fidl::encoding::Encode<BaseSocketGetTimestampResponse, D>
9985        for &BaseSocketGetTimestampResponse
9986    {
9987        #[inline]
9988        unsafe fn encode(
9989            self,
9990            encoder: &mut fidl::encoding::Encoder<'_, D>,
9991            offset: usize,
9992            _depth: fidl::encoding::Depth,
9993        ) -> fidl::Result<()> {
9994            encoder.debug_check_bounds::<BaseSocketGetTimestampResponse>(offset);
9995            // Delegate to tuple encoding.
9996            fidl::encoding::Encode::<BaseSocketGetTimestampResponse, D>::encode(
9997                (<TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9998                encoder,
9999                offset,
10000                _depth,
10001            )
10002        }
10003    }
10004    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TimestampOption, D>>
10005        fidl::encoding::Encode<BaseSocketGetTimestampResponse, D> for (T0,)
10006    {
10007        #[inline]
10008        unsafe fn encode(
10009            self,
10010            encoder: &mut fidl::encoding::Encoder<'_, D>,
10011            offset: usize,
10012            depth: fidl::encoding::Depth,
10013        ) -> fidl::Result<()> {
10014            encoder.debug_check_bounds::<BaseSocketGetTimestampResponse>(offset);
10015            // Zero out padding regions. There's no need to apply masks
10016            // because the unmasked parts will be overwritten by fields.
10017            // Write the fields.
10018            self.0.encode(encoder, offset + 0, depth)?;
10019            Ok(())
10020        }
10021    }
10022
10023    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10024        for BaseSocketGetTimestampResponse
10025    {
10026        #[inline(always)]
10027        fn new_empty() -> Self {
10028            Self { value: fidl::new_empty!(TimestampOption, D) }
10029        }
10030
10031        #[inline]
10032        unsafe fn decode(
10033            &mut self,
10034            decoder: &mut fidl::encoding::Decoder<'_, D>,
10035            offset: usize,
10036            _depth: fidl::encoding::Depth,
10037        ) -> fidl::Result<()> {
10038            decoder.debug_check_bounds::<Self>(offset);
10039            // Verify that padding bytes are zero.
10040            fidl::decode!(TimestampOption, D, &mut self.value, decoder, offset + 0, _depth)?;
10041            Ok(())
10042        }
10043    }
10044
10045    impl fidl::encoding::ValueTypeMarker for Empty {
10046        type Borrowed<'a> = &'a Self;
10047        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10048            value
10049        }
10050    }
10051
10052    unsafe impl fidl::encoding::TypeMarker for Empty {
10053        type Owned = Self;
10054
10055        #[inline(always)]
10056        fn inline_align(_context: fidl::encoding::Context) -> usize {
10057            1
10058        }
10059
10060        #[inline(always)]
10061        fn inline_size(_context: fidl::encoding::Context) -> usize {
10062            1
10063        }
10064    }
10065
10066    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
10067        #[inline]
10068        unsafe fn encode(
10069            self,
10070            encoder: &mut fidl::encoding::Encoder<'_, D>,
10071            offset: usize,
10072            _depth: fidl::encoding::Depth,
10073        ) -> fidl::Result<()> {
10074            encoder.debug_check_bounds::<Empty>(offset);
10075            encoder.write_num(0u8, offset);
10076            Ok(())
10077        }
10078    }
10079
10080    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
10081        #[inline(always)]
10082        fn new_empty() -> Self {
10083            Self
10084        }
10085
10086        #[inline]
10087        unsafe fn decode(
10088            &mut self,
10089            decoder: &mut fidl::encoding::Decoder<'_, D>,
10090            offset: usize,
10091            _depth: fidl::encoding::Depth,
10092        ) -> fidl::Result<()> {
10093            decoder.debug_check_bounds::<Self>(offset);
10094            match decoder.read_num::<u8>(offset) {
10095                0 => Ok(()),
10096                _ => Err(fidl::Error::Invalid),
10097            }
10098        }
10099    }
10100
10101    impl fidl::encoding::ValueTypeMarker for IpMulticastMembership {
10102        type Borrowed<'a> = &'a Self;
10103        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10104            value
10105        }
10106    }
10107
10108    unsafe impl fidl::encoding::TypeMarker for IpMulticastMembership {
10109        type Owned = Self;
10110
10111        #[inline(always)]
10112        fn inline_align(_context: fidl::encoding::Context) -> usize {
10113            8
10114        }
10115
10116        #[inline(always)]
10117        fn inline_size(_context: fidl::encoding::Context) -> usize {
10118            16
10119        }
10120    }
10121
10122    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpMulticastMembership, D>
10123        for &IpMulticastMembership
10124    {
10125        #[inline]
10126        unsafe fn encode(
10127            self,
10128            encoder: &mut fidl::encoding::Encoder<'_, D>,
10129            offset: usize,
10130            _depth: fidl::encoding::Depth,
10131        ) -> fidl::Result<()> {
10132            encoder.debug_check_bounds::<IpMulticastMembership>(offset);
10133            // Delegate to tuple encoding.
10134            fidl::encoding::Encode::<IpMulticastMembership, D>::encode(
10135                (
10136                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10137                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.local_addr),
10138                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.mcast_addr),
10139                ),
10140                encoder, offset, _depth
10141            )
10142        }
10143    }
10144    unsafe impl<
10145            D: fidl::encoding::ResourceDialect,
10146            T0: fidl::encoding::Encode<u64, D>,
10147            T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
10148            T2: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
10149        > fidl::encoding::Encode<IpMulticastMembership, D> for (T0, T1, T2)
10150    {
10151        #[inline]
10152        unsafe fn encode(
10153            self,
10154            encoder: &mut fidl::encoding::Encoder<'_, D>,
10155            offset: usize,
10156            depth: fidl::encoding::Depth,
10157        ) -> fidl::Result<()> {
10158            encoder.debug_check_bounds::<IpMulticastMembership>(offset);
10159            // Zero out padding regions. There's no need to apply masks
10160            // because the unmasked parts will be overwritten by fields.
10161            // Write the fields.
10162            self.0.encode(encoder, offset + 0, depth)?;
10163            self.1.encode(encoder, offset + 8, depth)?;
10164            self.2.encode(encoder, offset + 12, depth)?;
10165            Ok(())
10166        }
10167    }
10168
10169    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpMulticastMembership {
10170        #[inline(always)]
10171        fn new_empty() -> Self {
10172            Self {
10173                iface: fidl::new_empty!(u64, D),
10174                local_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
10175                mcast_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
10176            }
10177        }
10178
10179        #[inline]
10180        unsafe fn decode(
10181            &mut self,
10182            decoder: &mut fidl::encoding::Decoder<'_, D>,
10183            offset: usize,
10184            _depth: fidl::encoding::Depth,
10185        ) -> fidl::Result<()> {
10186            decoder.debug_check_bounds::<Self>(offset);
10187            // Verify that padding bytes are zero.
10188            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10189            fidl::decode!(
10190                fidl_fuchsia_net__common::Ipv4Address,
10191                D,
10192                &mut self.local_addr,
10193                decoder,
10194                offset + 8,
10195                _depth
10196            )?;
10197            fidl::decode!(
10198                fidl_fuchsia_net__common::Ipv4Address,
10199                D,
10200                &mut self.mcast_addr,
10201                decoder,
10202                offset + 12,
10203                _depth
10204            )?;
10205            Ok(())
10206        }
10207    }
10208
10209    impl fidl::encoding::ValueTypeMarker for Ipv6MulticastMembership {
10210        type Borrowed<'a> = &'a Self;
10211        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10212            value
10213        }
10214    }
10215
10216    unsafe impl fidl::encoding::TypeMarker for Ipv6MulticastMembership {
10217        type Owned = Self;
10218
10219        #[inline(always)]
10220        fn inline_align(_context: fidl::encoding::Context) -> usize {
10221            8
10222        }
10223
10224        #[inline(always)]
10225        fn inline_size(_context: fidl::encoding::Context) -> usize {
10226            24
10227        }
10228    }
10229
10230    unsafe impl<D: fidl::encoding::ResourceDialect>
10231        fidl::encoding::Encode<Ipv6MulticastMembership, D> for &Ipv6MulticastMembership
10232    {
10233        #[inline]
10234        unsafe fn encode(
10235            self,
10236            encoder: &mut fidl::encoding::Encoder<'_, D>,
10237            offset: usize,
10238            _depth: fidl::encoding::Depth,
10239        ) -> fidl::Result<()> {
10240            encoder.debug_check_bounds::<Ipv6MulticastMembership>(offset);
10241            // Delegate to tuple encoding.
10242            fidl::encoding::Encode::<Ipv6MulticastMembership, D>::encode(
10243                (
10244                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10245                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.mcast_addr),
10246                ),
10247                encoder, offset, _depth
10248            )
10249        }
10250    }
10251    unsafe impl<
10252            D: fidl::encoding::ResourceDialect,
10253            T0: fidl::encoding::Encode<u64, D>,
10254            T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10255        > fidl::encoding::Encode<Ipv6MulticastMembership, D> for (T0, T1)
10256    {
10257        #[inline]
10258        unsafe fn encode(
10259            self,
10260            encoder: &mut fidl::encoding::Encoder<'_, D>,
10261            offset: usize,
10262            depth: fidl::encoding::Depth,
10263        ) -> fidl::Result<()> {
10264            encoder.debug_check_bounds::<Ipv6MulticastMembership>(offset);
10265            // Zero out padding regions. There's no need to apply masks
10266            // because the unmasked parts will be overwritten by fields.
10267            // Write the fields.
10268            self.0.encode(encoder, offset + 0, depth)?;
10269            self.1.encode(encoder, offset + 8, depth)?;
10270            Ok(())
10271        }
10272    }
10273
10274    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10275        for Ipv6MulticastMembership
10276    {
10277        #[inline(always)]
10278        fn new_empty() -> Self {
10279            Self {
10280                iface: fidl::new_empty!(u64, D),
10281                mcast_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10282            }
10283        }
10284
10285        #[inline]
10286        unsafe fn decode(
10287            &mut self,
10288            decoder: &mut fidl::encoding::Decoder<'_, D>,
10289            offset: usize,
10290            _depth: fidl::encoding::Depth,
10291        ) -> fidl::Result<()> {
10292            decoder.debug_check_bounds::<Self>(offset);
10293            // Verify that padding bytes are zero.
10294            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10295            fidl::decode!(
10296                fidl_fuchsia_net__common::Ipv6Address,
10297                D,
10298                &mut self.mcast_addr,
10299                decoder,
10300                offset + 8,
10301                _depth
10302            )?;
10303            Ok(())
10304        }
10305    }
10306
10307    impl fidl::encoding::ValueTypeMarker for Ipv6PktInfoRecvControlData {
10308        type Borrowed<'a> = &'a Self;
10309        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10310            value
10311        }
10312    }
10313
10314    unsafe impl fidl::encoding::TypeMarker for Ipv6PktInfoRecvControlData {
10315        type Owned = Self;
10316
10317        #[inline(always)]
10318        fn inline_align(_context: fidl::encoding::Context) -> usize {
10319            8
10320        }
10321
10322        #[inline(always)]
10323        fn inline_size(_context: fidl::encoding::Context) -> usize {
10324            24
10325        }
10326    }
10327
10328    unsafe impl<D: fidl::encoding::ResourceDialect>
10329        fidl::encoding::Encode<Ipv6PktInfoRecvControlData, D> for &Ipv6PktInfoRecvControlData
10330    {
10331        #[inline]
10332        unsafe fn encode(
10333            self,
10334            encoder: &mut fidl::encoding::Encoder<'_, D>,
10335            offset: usize,
10336            _depth: fidl::encoding::Depth,
10337        ) -> fidl::Result<()> {
10338            encoder.debug_check_bounds::<Ipv6PktInfoRecvControlData>(offset);
10339            // Delegate to tuple encoding.
10340            fidl::encoding::Encode::<Ipv6PktInfoRecvControlData, D>::encode(
10341                (
10342                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10343                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.header_destination_addr),
10344                ),
10345                encoder, offset, _depth
10346            )
10347        }
10348    }
10349    unsafe impl<
10350            D: fidl::encoding::ResourceDialect,
10351            T0: fidl::encoding::Encode<u64, D>,
10352            T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10353        > fidl::encoding::Encode<Ipv6PktInfoRecvControlData, D> for (T0, T1)
10354    {
10355        #[inline]
10356        unsafe fn encode(
10357            self,
10358            encoder: &mut fidl::encoding::Encoder<'_, D>,
10359            offset: usize,
10360            depth: fidl::encoding::Depth,
10361        ) -> fidl::Result<()> {
10362            encoder.debug_check_bounds::<Ipv6PktInfoRecvControlData>(offset);
10363            // Zero out padding regions. There's no need to apply masks
10364            // because the unmasked parts will be overwritten by fields.
10365            // Write the fields.
10366            self.0.encode(encoder, offset + 0, depth)?;
10367            self.1.encode(encoder, offset + 8, depth)?;
10368            Ok(())
10369        }
10370    }
10371
10372    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10373        for Ipv6PktInfoRecvControlData
10374    {
10375        #[inline(always)]
10376        fn new_empty() -> Self {
10377            Self {
10378                iface: fidl::new_empty!(u64, D),
10379                header_destination_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10380            }
10381        }
10382
10383        #[inline]
10384        unsafe fn decode(
10385            &mut self,
10386            decoder: &mut fidl::encoding::Decoder<'_, D>,
10387            offset: usize,
10388            _depth: fidl::encoding::Depth,
10389        ) -> fidl::Result<()> {
10390            decoder.debug_check_bounds::<Self>(offset);
10391            // Verify that padding bytes are zero.
10392            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10393            fidl::decode!(
10394                fidl_fuchsia_net__common::Ipv6Address,
10395                D,
10396                &mut self.header_destination_addr,
10397                decoder,
10398                offset + 8,
10399                _depth
10400            )?;
10401            Ok(())
10402        }
10403    }
10404
10405    impl fidl::encoding::ValueTypeMarker for Ipv6PktInfoSendControlData {
10406        type Borrowed<'a> = &'a Self;
10407        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10408            value
10409        }
10410    }
10411
10412    unsafe impl fidl::encoding::TypeMarker for Ipv6PktInfoSendControlData {
10413        type Owned = Self;
10414
10415        #[inline(always)]
10416        fn inline_align(_context: fidl::encoding::Context) -> usize {
10417            8
10418        }
10419
10420        #[inline(always)]
10421        fn inline_size(_context: fidl::encoding::Context) -> usize {
10422            24
10423        }
10424    }
10425
10426    unsafe impl<D: fidl::encoding::ResourceDialect>
10427        fidl::encoding::Encode<Ipv6PktInfoSendControlData, D> for &Ipv6PktInfoSendControlData
10428    {
10429        #[inline]
10430        unsafe fn encode(
10431            self,
10432            encoder: &mut fidl::encoding::Encoder<'_, D>,
10433            offset: usize,
10434            _depth: fidl::encoding::Depth,
10435        ) -> fidl::Result<()> {
10436            encoder.debug_check_bounds::<Ipv6PktInfoSendControlData>(offset);
10437            // Delegate to tuple encoding.
10438            fidl::encoding::Encode::<Ipv6PktInfoSendControlData, D>::encode(
10439                (
10440                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10441                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.local_addr),
10442                ),
10443                encoder, offset, _depth
10444            )
10445        }
10446    }
10447    unsafe impl<
10448            D: fidl::encoding::ResourceDialect,
10449            T0: fidl::encoding::Encode<u64, D>,
10450            T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10451        > fidl::encoding::Encode<Ipv6PktInfoSendControlData, D> for (T0, T1)
10452    {
10453        #[inline]
10454        unsafe fn encode(
10455            self,
10456            encoder: &mut fidl::encoding::Encoder<'_, D>,
10457            offset: usize,
10458            depth: fidl::encoding::Depth,
10459        ) -> fidl::Result<()> {
10460            encoder.debug_check_bounds::<Ipv6PktInfoSendControlData>(offset);
10461            // Zero out padding regions. There's no need to apply masks
10462            // because the unmasked parts will be overwritten by fields.
10463            // Write the fields.
10464            self.0.encode(encoder, offset + 0, depth)?;
10465            self.1.encode(encoder, offset + 8, depth)?;
10466            Ok(())
10467        }
10468    }
10469
10470    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10471        for Ipv6PktInfoSendControlData
10472    {
10473        #[inline(always)]
10474        fn new_empty() -> Self {
10475            Self {
10476                iface: fidl::new_empty!(u64, D),
10477                local_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10478            }
10479        }
10480
10481        #[inline]
10482        unsafe fn decode(
10483            &mut self,
10484            decoder: &mut fidl::encoding::Decoder<'_, D>,
10485            offset: usize,
10486            _depth: fidl::encoding::Depth,
10487        ) -> fidl::Result<()> {
10488            decoder.debug_check_bounds::<Self>(offset);
10489            // Verify that padding bytes are zero.
10490            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10491            fidl::decode!(
10492                fidl_fuchsia_net__common::Ipv6Address,
10493                D,
10494                &mut self.local_addr,
10495                decoder,
10496                offset + 8,
10497                _depth
10498            )?;
10499            Ok(())
10500        }
10501    }
10502
10503    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketDeprecatedRequest {
10504        type Borrowed<'a> = &'a Self;
10505        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10506            value
10507        }
10508    }
10509
10510    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketDeprecatedRequest {
10511        type Owned = Self;
10512
10513        #[inline(always)]
10514        fn inline_align(_context: fidl::encoding::Context) -> usize {
10515            4
10516        }
10517
10518        #[inline(always)]
10519        fn inline_size(_context: fidl::encoding::Context) -> usize {
10520            8
10521        }
10522    }
10523
10524    unsafe impl<D: fidl::encoding::ResourceDialect>
10525        fidl::encoding::Encode<ProviderDatagramSocketDeprecatedRequest, D>
10526        for &ProviderDatagramSocketDeprecatedRequest
10527    {
10528        #[inline]
10529        unsafe fn encode(
10530            self,
10531            encoder: &mut fidl::encoding::Encoder<'_, D>,
10532            offset: usize,
10533            _depth: fidl::encoding::Depth,
10534        ) -> fidl::Result<()> {
10535            encoder.debug_check_bounds::<ProviderDatagramSocketDeprecatedRequest>(offset);
10536            // Delegate to tuple encoding.
10537            fidl::encoding::Encode::<ProviderDatagramSocketDeprecatedRequest, D>::encode(
10538                (
10539                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10540                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10541                        &self.proto,
10542                    ),
10543                ),
10544                encoder,
10545                offset,
10546                _depth,
10547            )
10548        }
10549    }
10550    unsafe impl<
10551            D: fidl::encoding::ResourceDialect,
10552            T0: fidl::encoding::Encode<Domain, D>,
10553            T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10554        > fidl::encoding::Encode<ProviderDatagramSocketDeprecatedRequest, D> for (T0, T1)
10555    {
10556        #[inline]
10557        unsafe fn encode(
10558            self,
10559            encoder: &mut fidl::encoding::Encoder<'_, D>,
10560            offset: usize,
10561            depth: fidl::encoding::Depth,
10562        ) -> fidl::Result<()> {
10563            encoder.debug_check_bounds::<ProviderDatagramSocketDeprecatedRequest>(offset);
10564            // Zero out padding regions. There's no need to apply masks
10565            // because the unmasked parts will be overwritten by fields.
10566            unsafe {
10567                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10568                (ptr as *mut u32).write_unaligned(0);
10569            }
10570            // Write the fields.
10571            self.0.encode(encoder, offset + 0, depth)?;
10572            self.1.encode(encoder, offset + 4, depth)?;
10573            Ok(())
10574        }
10575    }
10576
10577    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10578        for ProviderDatagramSocketDeprecatedRequest
10579    {
10580        #[inline(always)]
10581        fn new_empty() -> Self {
10582            Self {
10583                domain: fidl::new_empty!(Domain, D),
10584                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10585            }
10586        }
10587
10588        #[inline]
10589        unsafe fn decode(
10590            &mut self,
10591            decoder: &mut fidl::encoding::Decoder<'_, D>,
10592            offset: usize,
10593            _depth: fidl::encoding::Depth,
10594        ) -> fidl::Result<()> {
10595            decoder.debug_check_bounds::<Self>(offset);
10596            // Verify that padding bytes are zero.
10597            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10598            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10599            let mask = 0xffff0000u32;
10600            let maskedval = padval & mask;
10601            if maskedval != 0 {
10602                return Err(fidl::Error::NonZeroPadding {
10603                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10604                });
10605            }
10606            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10607            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10608            Ok(())
10609        }
10610    }
10611
10612    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketRequest {
10613        type Borrowed<'a> = &'a Self;
10614        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10615            value
10616        }
10617    }
10618
10619    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketRequest {
10620        type Owned = Self;
10621
10622        #[inline(always)]
10623        fn inline_align(_context: fidl::encoding::Context) -> usize {
10624            4
10625        }
10626
10627        #[inline(always)]
10628        fn inline_size(_context: fidl::encoding::Context) -> usize {
10629            8
10630        }
10631    }
10632
10633    unsafe impl<D: fidl::encoding::ResourceDialect>
10634        fidl::encoding::Encode<ProviderDatagramSocketRequest, D>
10635        for &ProviderDatagramSocketRequest
10636    {
10637        #[inline]
10638        unsafe fn encode(
10639            self,
10640            encoder: &mut fidl::encoding::Encoder<'_, D>,
10641            offset: usize,
10642            _depth: fidl::encoding::Depth,
10643        ) -> fidl::Result<()> {
10644            encoder.debug_check_bounds::<ProviderDatagramSocketRequest>(offset);
10645            // Delegate to tuple encoding.
10646            fidl::encoding::Encode::<ProviderDatagramSocketRequest, D>::encode(
10647                (
10648                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10649                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10650                        &self.proto,
10651                    ),
10652                ),
10653                encoder,
10654                offset,
10655                _depth,
10656            )
10657        }
10658    }
10659    unsafe impl<
10660            D: fidl::encoding::ResourceDialect,
10661            T0: fidl::encoding::Encode<Domain, D>,
10662            T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10663        > fidl::encoding::Encode<ProviderDatagramSocketRequest, D> for (T0, T1)
10664    {
10665        #[inline]
10666        unsafe fn encode(
10667            self,
10668            encoder: &mut fidl::encoding::Encoder<'_, D>,
10669            offset: usize,
10670            depth: fidl::encoding::Depth,
10671        ) -> fidl::Result<()> {
10672            encoder.debug_check_bounds::<ProviderDatagramSocketRequest>(offset);
10673            // Zero out padding regions. There's no need to apply masks
10674            // because the unmasked parts will be overwritten by fields.
10675            unsafe {
10676                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10677                (ptr as *mut u32).write_unaligned(0);
10678            }
10679            // Write the fields.
10680            self.0.encode(encoder, offset + 0, depth)?;
10681            self.1.encode(encoder, offset + 4, depth)?;
10682            Ok(())
10683        }
10684    }
10685
10686    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10687        for ProviderDatagramSocketRequest
10688    {
10689        #[inline(always)]
10690        fn new_empty() -> Self {
10691            Self {
10692                domain: fidl::new_empty!(Domain, D),
10693                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10694            }
10695        }
10696
10697        #[inline]
10698        unsafe fn decode(
10699            &mut self,
10700            decoder: &mut fidl::encoding::Decoder<'_, D>,
10701            offset: usize,
10702            _depth: fidl::encoding::Depth,
10703        ) -> fidl::Result<()> {
10704            decoder.debug_check_bounds::<Self>(offset);
10705            // Verify that padding bytes are zero.
10706            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10707            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10708            let mask = 0xffff0000u32;
10709            let maskedval = padval & mask;
10710            if maskedval != 0 {
10711                return Err(fidl::Error::NonZeroPadding {
10712                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10713                });
10714            }
10715            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10716            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10717            Ok(())
10718        }
10719    }
10720
10721    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketWithOptionsRequest {
10722        type Borrowed<'a> = &'a Self;
10723        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10724            value
10725        }
10726    }
10727
10728    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketWithOptionsRequest {
10729        type Owned = Self;
10730
10731        #[inline(always)]
10732        fn inline_align(_context: fidl::encoding::Context) -> usize {
10733            8
10734        }
10735
10736        #[inline(always)]
10737        fn inline_size(_context: fidl::encoding::Context) -> usize {
10738            24
10739        }
10740    }
10741
10742    unsafe impl<D: fidl::encoding::ResourceDialect>
10743        fidl::encoding::Encode<ProviderDatagramSocketWithOptionsRequest, D>
10744        for &ProviderDatagramSocketWithOptionsRequest
10745    {
10746        #[inline]
10747        unsafe fn encode(
10748            self,
10749            encoder: &mut fidl::encoding::Encoder<'_, D>,
10750            offset: usize,
10751            _depth: fidl::encoding::Depth,
10752        ) -> fidl::Result<()> {
10753            encoder.debug_check_bounds::<ProviderDatagramSocketWithOptionsRequest>(offset);
10754            // Delegate to tuple encoding.
10755            fidl::encoding::Encode::<ProviderDatagramSocketWithOptionsRequest, D>::encode(
10756                (
10757                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10758                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10759                        &self.proto,
10760                    ),
10761                    <SocketCreationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.opts),
10762                ),
10763                encoder,
10764                offset,
10765                _depth,
10766            )
10767        }
10768    }
10769    unsafe impl<
10770            D: fidl::encoding::ResourceDialect,
10771            T0: fidl::encoding::Encode<Domain, D>,
10772            T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10773            T2: fidl::encoding::Encode<SocketCreationOptions, D>,
10774        > fidl::encoding::Encode<ProviderDatagramSocketWithOptionsRequest, D> for (T0, T1, T2)
10775    {
10776        #[inline]
10777        unsafe fn encode(
10778            self,
10779            encoder: &mut fidl::encoding::Encoder<'_, D>,
10780            offset: usize,
10781            depth: fidl::encoding::Depth,
10782        ) -> fidl::Result<()> {
10783            encoder.debug_check_bounds::<ProviderDatagramSocketWithOptionsRequest>(offset);
10784            // Zero out padding regions. There's no need to apply masks
10785            // because the unmasked parts will be overwritten by fields.
10786            unsafe {
10787                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10788                (ptr as *mut u64).write_unaligned(0);
10789            }
10790            // Write the fields.
10791            self.0.encode(encoder, offset + 0, depth)?;
10792            self.1.encode(encoder, offset + 4, depth)?;
10793            self.2.encode(encoder, offset + 8, depth)?;
10794            Ok(())
10795        }
10796    }
10797
10798    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10799        for ProviderDatagramSocketWithOptionsRequest
10800    {
10801        #[inline(always)]
10802        fn new_empty() -> Self {
10803            Self {
10804                domain: fidl::new_empty!(Domain, D),
10805                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10806                opts: fidl::new_empty!(SocketCreationOptions, D),
10807            }
10808        }
10809
10810        #[inline]
10811        unsafe fn decode(
10812            &mut self,
10813            decoder: &mut fidl::encoding::Decoder<'_, D>,
10814            offset: usize,
10815            _depth: fidl::encoding::Depth,
10816        ) -> fidl::Result<()> {
10817            decoder.debug_check_bounds::<Self>(offset);
10818            // Verify that padding bytes are zero.
10819            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10820            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10821            let mask = 0xffff0000u64;
10822            let maskedval = padval & mask;
10823            if maskedval != 0 {
10824                return Err(fidl::Error::NonZeroPadding {
10825                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10826                });
10827            }
10828            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10829            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10830            fidl::decode!(SocketCreationOptions, D, &mut self.opts, decoder, offset + 8, _depth)?;
10831            Ok(())
10832        }
10833    }
10834
10835    impl fidl::encoding::ValueTypeMarker for ProviderGetInterfaceAddressesResponse {
10836        type Borrowed<'a> = &'a Self;
10837        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10838            value
10839        }
10840    }
10841
10842    unsafe impl fidl::encoding::TypeMarker for ProviderGetInterfaceAddressesResponse {
10843        type Owned = Self;
10844
10845        #[inline(always)]
10846        fn inline_align(_context: fidl::encoding::Context) -> usize {
10847            8
10848        }
10849
10850        #[inline(always)]
10851        fn inline_size(_context: fidl::encoding::Context) -> usize {
10852            16
10853        }
10854    }
10855
10856    unsafe impl<D: fidl::encoding::ResourceDialect>
10857        fidl::encoding::Encode<ProviderGetInterfaceAddressesResponse, D>
10858        for &ProviderGetInterfaceAddressesResponse
10859    {
10860        #[inline]
10861        unsafe fn encode(
10862            self,
10863            encoder: &mut fidl::encoding::Encoder<'_, D>,
10864            offset: usize,
10865            _depth: fidl::encoding::Depth,
10866        ) -> fidl::Result<()> {
10867            encoder.debug_check_bounds::<ProviderGetInterfaceAddressesResponse>(offset);
10868            // Delegate to tuple encoding.
10869            fidl::encoding::Encode::<ProviderGetInterfaceAddressesResponse, D>::encode(
10870                (
10871                    <fidl::encoding::UnboundedVector<InterfaceAddresses> as fidl::encoding::ValueTypeMarker>::borrow(&self.interfaces),
10872                ),
10873                encoder, offset, _depth
10874            )
10875        }
10876    }
10877    unsafe impl<
10878            D: fidl::encoding::ResourceDialect,
10879            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<InterfaceAddresses>, D>,
10880        > fidl::encoding::Encode<ProviderGetInterfaceAddressesResponse, D> for (T0,)
10881    {
10882        #[inline]
10883        unsafe fn encode(
10884            self,
10885            encoder: &mut fidl::encoding::Encoder<'_, D>,
10886            offset: usize,
10887            depth: fidl::encoding::Depth,
10888        ) -> fidl::Result<()> {
10889            encoder.debug_check_bounds::<ProviderGetInterfaceAddressesResponse>(offset);
10890            // Zero out padding regions. There's no need to apply masks
10891            // because the unmasked parts will be overwritten by fields.
10892            // Write the fields.
10893            self.0.encode(encoder, offset + 0, depth)?;
10894            Ok(())
10895        }
10896    }
10897
10898    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10899        for ProviderGetInterfaceAddressesResponse
10900    {
10901        #[inline(always)]
10902        fn new_empty() -> Self {
10903            Self {
10904                interfaces: fidl::new_empty!(
10905                    fidl::encoding::UnboundedVector<InterfaceAddresses>,
10906                    D
10907                ),
10908            }
10909        }
10910
10911        #[inline]
10912        unsafe fn decode(
10913            &mut self,
10914            decoder: &mut fidl::encoding::Decoder<'_, D>,
10915            offset: usize,
10916            _depth: fidl::encoding::Depth,
10917        ) -> fidl::Result<()> {
10918            decoder.debug_check_bounds::<Self>(offset);
10919            // Verify that padding bytes are zero.
10920            fidl::decode!(
10921                fidl::encoding::UnboundedVector<InterfaceAddresses>,
10922                D,
10923                &mut self.interfaces,
10924                decoder,
10925                offset + 0,
10926                _depth
10927            )?;
10928            Ok(())
10929        }
10930    }
10931
10932    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceIndexToNameRequest {
10933        type Borrowed<'a> = &'a Self;
10934        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10935            value
10936        }
10937    }
10938
10939    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceIndexToNameRequest {
10940        type Owned = Self;
10941
10942        #[inline(always)]
10943        fn inline_align(_context: fidl::encoding::Context) -> usize {
10944            8
10945        }
10946
10947        #[inline(always)]
10948        fn inline_size(_context: fidl::encoding::Context) -> usize {
10949            8
10950        }
10951        #[inline(always)]
10952        fn encode_is_copy() -> bool {
10953            true
10954        }
10955
10956        #[inline(always)]
10957        fn decode_is_copy() -> bool {
10958            true
10959        }
10960    }
10961
10962    unsafe impl<D: fidl::encoding::ResourceDialect>
10963        fidl::encoding::Encode<ProviderInterfaceIndexToNameRequest, D>
10964        for &ProviderInterfaceIndexToNameRequest
10965    {
10966        #[inline]
10967        unsafe fn encode(
10968            self,
10969            encoder: &mut fidl::encoding::Encoder<'_, D>,
10970            offset: usize,
10971            _depth: fidl::encoding::Depth,
10972        ) -> fidl::Result<()> {
10973            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameRequest>(offset);
10974            unsafe {
10975                // Copy the object into the buffer.
10976                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10977                (buf_ptr as *mut ProviderInterfaceIndexToNameRequest)
10978                    .write_unaligned((self as *const ProviderInterfaceIndexToNameRequest).read());
10979                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10980                // done second because the memcpy will write garbage to these bytes.
10981            }
10982            Ok(())
10983        }
10984    }
10985    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
10986        fidl::encoding::Encode<ProviderInterfaceIndexToNameRequest, D> for (T0,)
10987    {
10988        #[inline]
10989        unsafe fn encode(
10990            self,
10991            encoder: &mut fidl::encoding::Encoder<'_, D>,
10992            offset: usize,
10993            depth: fidl::encoding::Depth,
10994        ) -> fidl::Result<()> {
10995            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameRequest>(offset);
10996            // Zero out padding regions. There's no need to apply masks
10997            // because the unmasked parts will be overwritten by fields.
10998            // Write the fields.
10999            self.0.encode(encoder, offset + 0, depth)?;
11000            Ok(())
11001        }
11002    }
11003
11004    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11005        for ProviderInterfaceIndexToNameRequest
11006    {
11007        #[inline(always)]
11008        fn new_empty() -> Self {
11009            Self { index: fidl::new_empty!(u64, D) }
11010        }
11011
11012        #[inline]
11013        unsafe fn decode(
11014            &mut self,
11015            decoder: &mut fidl::encoding::Decoder<'_, D>,
11016            offset: usize,
11017            _depth: fidl::encoding::Depth,
11018        ) -> fidl::Result<()> {
11019            decoder.debug_check_bounds::<Self>(offset);
11020            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11021            // Verify that padding bytes are zero.
11022            // Copy from the buffer into the object.
11023            unsafe {
11024                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11025            }
11026            Ok(())
11027        }
11028    }
11029
11030    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToFlagsRequest {
11031        type Borrowed<'a> = &'a Self;
11032        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11033            value
11034        }
11035    }
11036
11037    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToFlagsRequest {
11038        type Owned = Self;
11039
11040        #[inline(always)]
11041        fn inline_align(_context: fidl::encoding::Context) -> usize {
11042            8
11043        }
11044
11045        #[inline(always)]
11046        fn inline_size(_context: fidl::encoding::Context) -> usize {
11047            16
11048        }
11049    }
11050
11051    unsafe impl<D: fidl::encoding::ResourceDialect>
11052        fidl::encoding::Encode<ProviderInterfaceNameToFlagsRequest, D>
11053        for &ProviderInterfaceNameToFlagsRequest
11054    {
11055        #[inline]
11056        unsafe fn encode(
11057            self,
11058            encoder: &mut fidl::encoding::Encoder<'_, D>,
11059            offset: usize,
11060            _depth: fidl::encoding::Depth,
11061        ) -> fidl::Result<()> {
11062            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsRequest>(offset);
11063            // Delegate to tuple encoding.
11064            fidl::encoding::Encode::<ProviderInterfaceNameToFlagsRequest, D>::encode(
11065                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
11066                    &self.name,
11067                ),),
11068                encoder,
11069                offset,
11070                _depth,
11071            )
11072        }
11073    }
11074    unsafe impl<
11075            D: fidl::encoding::ResourceDialect,
11076            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
11077        > fidl::encoding::Encode<ProviderInterfaceNameToFlagsRequest, D> for (T0,)
11078    {
11079        #[inline]
11080        unsafe fn encode(
11081            self,
11082            encoder: &mut fidl::encoding::Encoder<'_, D>,
11083            offset: usize,
11084            depth: fidl::encoding::Depth,
11085        ) -> fidl::Result<()> {
11086            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsRequest>(offset);
11087            // Zero out padding regions. There's no need to apply masks
11088            // because the unmasked parts will be overwritten by fields.
11089            // Write the fields.
11090            self.0.encode(encoder, offset + 0, depth)?;
11091            Ok(())
11092        }
11093    }
11094
11095    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11096        for ProviderInterfaceNameToFlagsRequest
11097    {
11098        #[inline(always)]
11099        fn new_empty() -> Self {
11100            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
11101        }
11102
11103        #[inline]
11104        unsafe fn decode(
11105            &mut self,
11106            decoder: &mut fidl::encoding::Decoder<'_, D>,
11107            offset: usize,
11108            _depth: fidl::encoding::Depth,
11109        ) -> fidl::Result<()> {
11110            decoder.debug_check_bounds::<Self>(offset);
11111            // Verify that padding bytes are zero.
11112            fidl::decode!(
11113                fidl::encoding::BoundedString<15>,
11114                D,
11115                &mut self.name,
11116                decoder,
11117                offset + 0,
11118                _depth
11119            )?;
11120            Ok(())
11121        }
11122    }
11123
11124    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToIndexRequest {
11125        type Borrowed<'a> = &'a Self;
11126        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11127            value
11128        }
11129    }
11130
11131    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToIndexRequest {
11132        type Owned = Self;
11133
11134        #[inline(always)]
11135        fn inline_align(_context: fidl::encoding::Context) -> usize {
11136            8
11137        }
11138
11139        #[inline(always)]
11140        fn inline_size(_context: fidl::encoding::Context) -> usize {
11141            16
11142        }
11143    }
11144
11145    unsafe impl<D: fidl::encoding::ResourceDialect>
11146        fidl::encoding::Encode<ProviderInterfaceNameToIndexRequest, D>
11147        for &ProviderInterfaceNameToIndexRequest
11148    {
11149        #[inline]
11150        unsafe fn encode(
11151            self,
11152            encoder: &mut fidl::encoding::Encoder<'_, D>,
11153            offset: usize,
11154            _depth: fidl::encoding::Depth,
11155        ) -> fidl::Result<()> {
11156            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexRequest>(offset);
11157            // Delegate to tuple encoding.
11158            fidl::encoding::Encode::<ProviderInterfaceNameToIndexRequest, D>::encode(
11159                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
11160                    &self.name,
11161                ),),
11162                encoder,
11163                offset,
11164                _depth,
11165            )
11166        }
11167    }
11168    unsafe impl<
11169            D: fidl::encoding::ResourceDialect,
11170            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
11171        > fidl::encoding::Encode<ProviderInterfaceNameToIndexRequest, D> for (T0,)
11172    {
11173        #[inline]
11174        unsafe fn encode(
11175            self,
11176            encoder: &mut fidl::encoding::Encoder<'_, D>,
11177            offset: usize,
11178            depth: fidl::encoding::Depth,
11179        ) -> fidl::Result<()> {
11180            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexRequest>(offset);
11181            // Zero out padding regions. There's no need to apply masks
11182            // because the unmasked parts will be overwritten by fields.
11183            // Write the fields.
11184            self.0.encode(encoder, offset + 0, depth)?;
11185            Ok(())
11186        }
11187    }
11188
11189    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11190        for ProviderInterfaceNameToIndexRequest
11191    {
11192        #[inline(always)]
11193        fn new_empty() -> Self {
11194            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
11195        }
11196
11197        #[inline]
11198        unsafe fn decode(
11199            &mut self,
11200            decoder: &mut fidl::encoding::Decoder<'_, D>,
11201            offset: usize,
11202            _depth: fidl::encoding::Depth,
11203        ) -> fidl::Result<()> {
11204            decoder.debug_check_bounds::<Self>(offset);
11205            // Verify that padding bytes are zero.
11206            fidl::decode!(
11207                fidl::encoding::BoundedString<15>,
11208                D,
11209                &mut self.name,
11210                decoder,
11211                offset + 0,
11212                _depth
11213            )?;
11214            Ok(())
11215        }
11216    }
11217
11218    impl fidl::encoding::ValueTypeMarker for ProviderStreamSocketRequest {
11219        type Borrowed<'a> = &'a Self;
11220        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11221            value
11222        }
11223    }
11224
11225    unsafe impl fidl::encoding::TypeMarker for ProviderStreamSocketRequest {
11226        type Owned = Self;
11227
11228        #[inline(always)]
11229        fn inline_align(_context: fidl::encoding::Context) -> usize {
11230            4
11231        }
11232
11233        #[inline(always)]
11234        fn inline_size(_context: fidl::encoding::Context) -> usize {
11235            8
11236        }
11237    }
11238
11239    unsafe impl<D: fidl::encoding::ResourceDialect>
11240        fidl::encoding::Encode<ProviderStreamSocketRequest, D> for &ProviderStreamSocketRequest
11241    {
11242        #[inline]
11243        unsafe fn encode(
11244            self,
11245            encoder: &mut fidl::encoding::Encoder<'_, D>,
11246            offset: usize,
11247            _depth: fidl::encoding::Depth,
11248        ) -> fidl::Result<()> {
11249            encoder.debug_check_bounds::<ProviderStreamSocketRequest>(offset);
11250            // Delegate to tuple encoding.
11251            fidl::encoding::Encode::<ProviderStreamSocketRequest, D>::encode(
11252                (
11253                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
11254                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
11255                ),
11256                encoder,
11257                offset,
11258                _depth,
11259            )
11260        }
11261    }
11262    unsafe impl<
11263            D: fidl::encoding::ResourceDialect,
11264            T0: fidl::encoding::Encode<Domain, D>,
11265            T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
11266        > fidl::encoding::Encode<ProviderStreamSocketRequest, D> for (T0, T1)
11267    {
11268        #[inline]
11269        unsafe fn encode(
11270            self,
11271            encoder: &mut fidl::encoding::Encoder<'_, D>,
11272            offset: usize,
11273            depth: fidl::encoding::Depth,
11274        ) -> fidl::Result<()> {
11275            encoder.debug_check_bounds::<ProviderStreamSocketRequest>(offset);
11276            // Zero out padding regions. There's no need to apply masks
11277            // because the unmasked parts will be overwritten by fields.
11278            unsafe {
11279                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
11280                (ptr as *mut u32).write_unaligned(0);
11281            }
11282            // Write the fields.
11283            self.0.encode(encoder, offset + 0, depth)?;
11284            self.1.encode(encoder, offset + 4, depth)?;
11285            Ok(())
11286        }
11287    }
11288
11289    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11290        for ProviderStreamSocketRequest
11291    {
11292        #[inline(always)]
11293        fn new_empty() -> Self {
11294            Self {
11295                domain: fidl::new_empty!(Domain, D),
11296                proto: fidl::new_empty!(StreamSocketProtocol, D),
11297            }
11298        }
11299
11300        #[inline]
11301        unsafe fn decode(
11302            &mut self,
11303            decoder: &mut fidl::encoding::Decoder<'_, D>,
11304            offset: usize,
11305            _depth: fidl::encoding::Depth,
11306        ) -> fidl::Result<()> {
11307            decoder.debug_check_bounds::<Self>(offset);
11308            // Verify that padding bytes are zero.
11309            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
11310            let padval = unsafe { (ptr as *const u32).read_unaligned() };
11311            let mask = 0xffff0000u32;
11312            let maskedval = padval & mask;
11313            if maskedval != 0 {
11314                return Err(fidl::Error::NonZeroPadding {
11315                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
11316                });
11317            }
11318            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
11319            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
11320            Ok(())
11321        }
11322    }
11323
11324    impl fidl::encoding::ValueTypeMarker for ProviderStreamSocketWithOptionsRequest {
11325        type Borrowed<'a> = &'a Self;
11326        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11327            value
11328        }
11329    }
11330
11331    unsafe impl fidl::encoding::TypeMarker for ProviderStreamSocketWithOptionsRequest {
11332        type Owned = Self;
11333
11334        #[inline(always)]
11335        fn inline_align(_context: fidl::encoding::Context) -> usize {
11336            8
11337        }
11338
11339        #[inline(always)]
11340        fn inline_size(_context: fidl::encoding::Context) -> usize {
11341            24
11342        }
11343    }
11344
11345    unsafe impl<D: fidl::encoding::ResourceDialect>
11346        fidl::encoding::Encode<ProviderStreamSocketWithOptionsRequest, D>
11347        for &ProviderStreamSocketWithOptionsRequest
11348    {
11349        #[inline]
11350        unsafe fn encode(
11351            self,
11352            encoder: &mut fidl::encoding::Encoder<'_, D>,
11353            offset: usize,
11354            _depth: fidl::encoding::Depth,
11355        ) -> fidl::Result<()> {
11356            encoder.debug_check_bounds::<ProviderStreamSocketWithOptionsRequest>(offset);
11357            // Delegate to tuple encoding.
11358            fidl::encoding::Encode::<ProviderStreamSocketWithOptionsRequest, D>::encode(
11359                (
11360                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
11361                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
11362                    <SocketCreationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.opts),
11363                ),
11364                encoder,
11365                offset,
11366                _depth,
11367            )
11368        }
11369    }
11370    unsafe impl<
11371            D: fidl::encoding::ResourceDialect,
11372            T0: fidl::encoding::Encode<Domain, D>,
11373            T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
11374            T2: fidl::encoding::Encode<SocketCreationOptions, D>,
11375        > fidl::encoding::Encode<ProviderStreamSocketWithOptionsRequest, D> for (T0, T1, T2)
11376    {
11377        #[inline]
11378        unsafe fn encode(
11379            self,
11380            encoder: &mut fidl::encoding::Encoder<'_, D>,
11381            offset: usize,
11382            depth: fidl::encoding::Depth,
11383        ) -> fidl::Result<()> {
11384            encoder.debug_check_bounds::<ProviderStreamSocketWithOptionsRequest>(offset);
11385            // Zero out padding regions. There's no need to apply masks
11386            // because the unmasked parts will be overwritten by fields.
11387            unsafe {
11388                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
11389                (ptr as *mut u64).write_unaligned(0);
11390            }
11391            // Write the fields.
11392            self.0.encode(encoder, offset + 0, depth)?;
11393            self.1.encode(encoder, offset + 4, depth)?;
11394            self.2.encode(encoder, offset + 8, depth)?;
11395            Ok(())
11396        }
11397    }
11398
11399    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11400        for ProviderStreamSocketWithOptionsRequest
11401    {
11402        #[inline(always)]
11403        fn new_empty() -> Self {
11404            Self {
11405                domain: fidl::new_empty!(Domain, D),
11406                proto: fidl::new_empty!(StreamSocketProtocol, D),
11407                opts: fidl::new_empty!(SocketCreationOptions, D),
11408            }
11409        }
11410
11411        #[inline]
11412        unsafe fn decode(
11413            &mut self,
11414            decoder: &mut fidl::encoding::Decoder<'_, D>,
11415            offset: usize,
11416            _depth: fidl::encoding::Depth,
11417        ) -> fidl::Result<()> {
11418            decoder.debug_check_bounds::<Self>(offset);
11419            // Verify that padding bytes are zero.
11420            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
11421            let padval = unsafe { (ptr as *const u64).read_unaligned() };
11422            let mask = 0xffff0000u64;
11423            let maskedval = padval & mask;
11424            if maskedval != 0 {
11425                return Err(fidl::Error::NonZeroPadding {
11426                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
11427                });
11428            }
11429            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
11430            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
11431            fidl::decode!(SocketCreationOptions, D, &mut self.opts, decoder, offset + 8, _depth)?;
11432            Ok(())
11433        }
11434    }
11435
11436    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceIndexToNameResponse {
11437        type Borrowed<'a> = &'a Self;
11438        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11439            value
11440        }
11441    }
11442
11443    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceIndexToNameResponse {
11444        type Owned = Self;
11445
11446        #[inline(always)]
11447        fn inline_align(_context: fidl::encoding::Context) -> usize {
11448            8
11449        }
11450
11451        #[inline(always)]
11452        fn inline_size(_context: fidl::encoding::Context) -> usize {
11453            16
11454        }
11455    }
11456
11457    unsafe impl<D: fidl::encoding::ResourceDialect>
11458        fidl::encoding::Encode<ProviderInterfaceIndexToNameResponse, D>
11459        for &ProviderInterfaceIndexToNameResponse
11460    {
11461        #[inline]
11462        unsafe fn encode(
11463            self,
11464            encoder: &mut fidl::encoding::Encoder<'_, D>,
11465            offset: usize,
11466            _depth: fidl::encoding::Depth,
11467        ) -> fidl::Result<()> {
11468            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameResponse>(offset);
11469            // Delegate to tuple encoding.
11470            fidl::encoding::Encode::<ProviderInterfaceIndexToNameResponse, D>::encode(
11471                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
11472                    &self.name,
11473                ),),
11474                encoder,
11475                offset,
11476                _depth,
11477            )
11478        }
11479    }
11480    unsafe impl<
11481            D: fidl::encoding::ResourceDialect,
11482            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
11483        > fidl::encoding::Encode<ProviderInterfaceIndexToNameResponse, D> for (T0,)
11484    {
11485        #[inline]
11486        unsafe fn encode(
11487            self,
11488            encoder: &mut fidl::encoding::Encoder<'_, D>,
11489            offset: usize,
11490            depth: fidl::encoding::Depth,
11491        ) -> fidl::Result<()> {
11492            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameResponse>(offset);
11493            // Zero out padding regions. There's no need to apply masks
11494            // because the unmasked parts will be overwritten by fields.
11495            // Write the fields.
11496            self.0.encode(encoder, offset + 0, depth)?;
11497            Ok(())
11498        }
11499    }
11500
11501    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11502        for ProviderInterfaceIndexToNameResponse
11503    {
11504        #[inline(always)]
11505        fn new_empty() -> Self {
11506            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
11507        }
11508
11509        #[inline]
11510        unsafe fn decode(
11511            &mut self,
11512            decoder: &mut fidl::encoding::Decoder<'_, D>,
11513            offset: usize,
11514            _depth: fidl::encoding::Depth,
11515        ) -> fidl::Result<()> {
11516            decoder.debug_check_bounds::<Self>(offset);
11517            // Verify that padding bytes are zero.
11518            fidl::decode!(
11519                fidl::encoding::BoundedString<15>,
11520                D,
11521                &mut self.name,
11522                decoder,
11523                offset + 0,
11524                _depth
11525            )?;
11526            Ok(())
11527        }
11528    }
11529
11530    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToFlagsResponse {
11531        type Borrowed<'a> = &'a Self;
11532        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11533            value
11534        }
11535    }
11536
11537    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToFlagsResponse {
11538        type Owned = Self;
11539
11540        #[inline(always)]
11541        fn inline_align(_context: fidl::encoding::Context) -> usize {
11542            2
11543        }
11544
11545        #[inline(always)]
11546        fn inline_size(_context: fidl::encoding::Context) -> usize {
11547            2
11548        }
11549    }
11550
11551    unsafe impl<D: fidl::encoding::ResourceDialect>
11552        fidl::encoding::Encode<ProviderInterfaceNameToFlagsResponse, D>
11553        for &ProviderInterfaceNameToFlagsResponse
11554    {
11555        #[inline]
11556        unsafe fn encode(
11557            self,
11558            encoder: &mut fidl::encoding::Encoder<'_, D>,
11559            offset: usize,
11560            _depth: fidl::encoding::Depth,
11561        ) -> fidl::Result<()> {
11562            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsResponse>(offset);
11563            // Delegate to tuple encoding.
11564            fidl::encoding::Encode::<ProviderInterfaceNameToFlagsResponse, D>::encode(
11565                (<InterfaceFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),),
11566                encoder,
11567                offset,
11568                _depth,
11569            )
11570        }
11571    }
11572    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<InterfaceFlags, D>>
11573        fidl::encoding::Encode<ProviderInterfaceNameToFlagsResponse, D> for (T0,)
11574    {
11575        #[inline]
11576        unsafe fn encode(
11577            self,
11578            encoder: &mut fidl::encoding::Encoder<'_, D>,
11579            offset: usize,
11580            depth: fidl::encoding::Depth,
11581        ) -> fidl::Result<()> {
11582            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsResponse>(offset);
11583            // Zero out padding regions. There's no need to apply masks
11584            // because the unmasked parts will be overwritten by fields.
11585            // Write the fields.
11586            self.0.encode(encoder, offset + 0, depth)?;
11587            Ok(())
11588        }
11589    }
11590
11591    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11592        for ProviderInterfaceNameToFlagsResponse
11593    {
11594        #[inline(always)]
11595        fn new_empty() -> Self {
11596            Self { flags: fidl::new_empty!(InterfaceFlags, D) }
11597        }
11598
11599        #[inline]
11600        unsafe fn decode(
11601            &mut self,
11602            decoder: &mut fidl::encoding::Decoder<'_, D>,
11603            offset: usize,
11604            _depth: fidl::encoding::Depth,
11605        ) -> fidl::Result<()> {
11606            decoder.debug_check_bounds::<Self>(offset);
11607            // Verify that padding bytes are zero.
11608            fidl::decode!(InterfaceFlags, D, &mut self.flags, decoder, offset + 0, _depth)?;
11609            Ok(())
11610        }
11611    }
11612
11613    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToIndexResponse {
11614        type Borrowed<'a> = &'a Self;
11615        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11616            value
11617        }
11618    }
11619
11620    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToIndexResponse {
11621        type Owned = Self;
11622
11623        #[inline(always)]
11624        fn inline_align(_context: fidl::encoding::Context) -> usize {
11625            8
11626        }
11627
11628        #[inline(always)]
11629        fn inline_size(_context: fidl::encoding::Context) -> usize {
11630            8
11631        }
11632        #[inline(always)]
11633        fn encode_is_copy() -> bool {
11634            true
11635        }
11636
11637        #[inline(always)]
11638        fn decode_is_copy() -> bool {
11639            true
11640        }
11641    }
11642
11643    unsafe impl<D: fidl::encoding::ResourceDialect>
11644        fidl::encoding::Encode<ProviderInterfaceNameToIndexResponse, D>
11645        for &ProviderInterfaceNameToIndexResponse
11646    {
11647        #[inline]
11648        unsafe fn encode(
11649            self,
11650            encoder: &mut fidl::encoding::Encoder<'_, D>,
11651            offset: usize,
11652            _depth: fidl::encoding::Depth,
11653        ) -> fidl::Result<()> {
11654            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexResponse>(offset);
11655            unsafe {
11656                // Copy the object into the buffer.
11657                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11658                (buf_ptr as *mut ProviderInterfaceNameToIndexResponse)
11659                    .write_unaligned((self as *const ProviderInterfaceNameToIndexResponse).read());
11660                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11661                // done second because the memcpy will write garbage to these bytes.
11662            }
11663            Ok(())
11664        }
11665    }
11666    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
11667        fidl::encoding::Encode<ProviderInterfaceNameToIndexResponse, D> for (T0,)
11668    {
11669        #[inline]
11670        unsafe fn encode(
11671            self,
11672            encoder: &mut fidl::encoding::Encoder<'_, D>,
11673            offset: usize,
11674            depth: fidl::encoding::Depth,
11675        ) -> fidl::Result<()> {
11676            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexResponse>(offset);
11677            // Zero out padding regions. There's no need to apply masks
11678            // because the unmasked parts will be overwritten by fields.
11679            // Write the fields.
11680            self.0.encode(encoder, offset + 0, depth)?;
11681            Ok(())
11682        }
11683    }
11684
11685    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11686        for ProviderInterfaceNameToIndexResponse
11687    {
11688        #[inline(always)]
11689        fn new_empty() -> Self {
11690            Self { index: fidl::new_empty!(u64, D) }
11691        }
11692
11693        #[inline]
11694        unsafe fn decode(
11695            &mut self,
11696            decoder: &mut fidl::encoding::Decoder<'_, D>,
11697            offset: usize,
11698            _depth: fidl::encoding::Depth,
11699        ) -> fidl::Result<()> {
11700            decoder.debug_check_bounds::<Self>(offset);
11701            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11702            // Verify that padding bytes are zero.
11703            // Copy from the buffer into the object.
11704            unsafe {
11705                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11706            }
11707            Ok(())
11708        }
11709    }
11710
11711    impl fidl::encoding::ValueTypeMarker for StreamSocketAcceptRequest {
11712        type Borrowed<'a> = &'a Self;
11713        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11714            value
11715        }
11716    }
11717
11718    unsafe impl fidl::encoding::TypeMarker for StreamSocketAcceptRequest {
11719        type Owned = Self;
11720
11721        #[inline(always)]
11722        fn inline_align(_context: fidl::encoding::Context) -> usize {
11723            1
11724        }
11725
11726        #[inline(always)]
11727        fn inline_size(_context: fidl::encoding::Context) -> usize {
11728            1
11729        }
11730    }
11731
11732    unsafe impl<D: fidl::encoding::ResourceDialect>
11733        fidl::encoding::Encode<StreamSocketAcceptRequest, D> for &StreamSocketAcceptRequest
11734    {
11735        #[inline]
11736        unsafe fn encode(
11737            self,
11738            encoder: &mut fidl::encoding::Encoder<'_, D>,
11739            offset: usize,
11740            _depth: fidl::encoding::Depth,
11741        ) -> fidl::Result<()> {
11742            encoder.debug_check_bounds::<StreamSocketAcceptRequest>(offset);
11743            // Delegate to tuple encoding.
11744            fidl::encoding::Encode::<StreamSocketAcceptRequest, D>::encode(
11745                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_addr),),
11746                encoder,
11747                offset,
11748                _depth,
11749            )
11750        }
11751    }
11752    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11753        fidl::encoding::Encode<StreamSocketAcceptRequest, D> for (T0,)
11754    {
11755        #[inline]
11756        unsafe fn encode(
11757            self,
11758            encoder: &mut fidl::encoding::Encoder<'_, D>,
11759            offset: usize,
11760            depth: fidl::encoding::Depth,
11761        ) -> fidl::Result<()> {
11762            encoder.debug_check_bounds::<StreamSocketAcceptRequest>(offset);
11763            // Zero out padding regions. There's no need to apply masks
11764            // because the unmasked parts will be overwritten by fields.
11765            // Write the fields.
11766            self.0.encode(encoder, offset + 0, depth)?;
11767            Ok(())
11768        }
11769    }
11770
11771    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11772        for StreamSocketAcceptRequest
11773    {
11774        #[inline(always)]
11775        fn new_empty() -> Self {
11776            Self { want_addr: fidl::new_empty!(bool, D) }
11777        }
11778
11779        #[inline]
11780        unsafe fn decode(
11781            &mut self,
11782            decoder: &mut fidl::encoding::Decoder<'_, D>,
11783            offset: usize,
11784            _depth: fidl::encoding::Depth,
11785        ) -> fidl::Result<()> {
11786            decoder.debug_check_bounds::<Self>(offset);
11787            // Verify that padding bytes are zero.
11788            fidl::decode!(bool, D, &mut self.want_addr, decoder, offset + 0, _depth)?;
11789            Ok(())
11790        }
11791    }
11792
11793    impl fidl::encoding::ValueTypeMarker for StreamSocketListenRequest {
11794        type Borrowed<'a> = &'a Self;
11795        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11796            value
11797        }
11798    }
11799
11800    unsafe impl fidl::encoding::TypeMarker for StreamSocketListenRequest {
11801        type Owned = Self;
11802
11803        #[inline(always)]
11804        fn inline_align(_context: fidl::encoding::Context) -> usize {
11805            2
11806        }
11807
11808        #[inline(always)]
11809        fn inline_size(_context: fidl::encoding::Context) -> usize {
11810            2
11811        }
11812        #[inline(always)]
11813        fn encode_is_copy() -> bool {
11814            true
11815        }
11816
11817        #[inline(always)]
11818        fn decode_is_copy() -> bool {
11819            true
11820        }
11821    }
11822
11823    unsafe impl<D: fidl::encoding::ResourceDialect>
11824        fidl::encoding::Encode<StreamSocketListenRequest, D> for &StreamSocketListenRequest
11825    {
11826        #[inline]
11827        unsafe fn encode(
11828            self,
11829            encoder: &mut fidl::encoding::Encoder<'_, D>,
11830            offset: usize,
11831            _depth: fidl::encoding::Depth,
11832        ) -> fidl::Result<()> {
11833            encoder.debug_check_bounds::<StreamSocketListenRequest>(offset);
11834            unsafe {
11835                // Copy the object into the buffer.
11836                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11837                (buf_ptr as *mut StreamSocketListenRequest)
11838                    .write_unaligned((self as *const StreamSocketListenRequest).read());
11839                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11840                // done second because the memcpy will write garbage to these bytes.
11841            }
11842            Ok(())
11843        }
11844    }
11845    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
11846        fidl::encoding::Encode<StreamSocketListenRequest, D> for (T0,)
11847    {
11848        #[inline]
11849        unsafe fn encode(
11850            self,
11851            encoder: &mut fidl::encoding::Encoder<'_, D>,
11852            offset: usize,
11853            depth: fidl::encoding::Depth,
11854        ) -> fidl::Result<()> {
11855            encoder.debug_check_bounds::<StreamSocketListenRequest>(offset);
11856            // Zero out padding regions. There's no need to apply masks
11857            // because the unmasked parts will be overwritten by fields.
11858            // Write the fields.
11859            self.0.encode(encoder, offset + 0, depth)?;
11860            Ok(())
11861        }
11862    }
11863
11864    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11865        for StreamSocketListenRequest
11866    {
11867        #[inline(always)]
11868        fn new_empty() -> Self {
11869            Self { backlog: fidl::new_empty!(i16, D) }
11870        }
11871
11872        #[inline]
11873        unsafe fn decode(
11874            &mut self,
11875            decoder: &mut fidl::encoding::Decoder<'_, D>,
11876            offset: usize,
11877            _depth: fidl::encoding::Depth,
11878        ) -> fidl::Result<()> {
11879            decoder.debug_check_bounds::<Self>(offset);
11880            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11881            // Verify that padding bytes are zero.
11882            // Copy from the buffer into the object.
11883            unsafe {
11884                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
11885            }
11886            Ok(())
11887        }
11888    }
11889
11890    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpCongestionRequest {
11891        type Borrowed<'a> = &'a Self;
11892        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11893            value
11894        }
11895    }
11896
11897    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpCongestionRequest {
11898        type Owned = Self;
11899
11900        #[inline(always)]
11901        fn inline_align(_context: fidl::encoding::Context) -> usize {
11902            4
11903        }
11904
11905        #[inline(always)]
11906        fn inline_size(_context: fidl::encoding::Context) -> usize {
11907            4
11908        }
11909    }
11910
11911    unsafe impl<D: fidl::encoding::ResourceDialect>
11912        fidl::encoding::Encode<StreamSocketSetTcpCongestionRequest, D>
11913        for &StreamSocketSetTcpCongestionRequest
11914    {
11915        #[inline]
11916        unsafe fn encode(
11917            self,
11918            encoder: &mut fidl::encoding::Encoder<'_, D>,
11919            offset: usize,
11920            _depth: fidl::encoding::Depth,
11921        ) -> fidl::Result<()> {
11922            encoder.debug_check_bounds::<StreamSocketSetTcpCongestionRequest>(offset);
11923            // Delegate to tuple encoding.
11924            fidl::encoding::Encode::<StreamSocketSetTcpCongestionRequest, D>::encode(
11925                (<TcpCongestionControl as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
11926                encoder,
11927                offset,
11928                _depth,
11929            )
11930        }
11931    }
11932    unsafe impl<
11933            D: fidl::encoding::ResourceDialect,
11934            T0: fidl::encoding::Encode<TcpCongestionControl, D>,
11935        > fidl::encoding::Encode<StreamSocketSetTcpCongestionRequest, D> for (T0,)
11936    {
11937        #[inline]
11938        unsafe fn encode(
11939            self,
11940            encoder: &mut fidl::encoding::Encoder<'_, D>,
11941            offset: usize,
11942            depth: fidl::encoding::Depth,
11943        ) -> fidl::Result<()> {
11944            encoder.debug_check_bounds::<StreamSocketSetTcpCongestionRequest>(offset);
11945            // Zero out padding regions. There's no need to apply masks
11946            // because the unmasked parts will be overwritten by fields.
11947            // Write the fields.
11948            self.0.encode(encoder, offset + 0, depth)?;
11949            Ok(())
11950        }
11951    }
11952
11953    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11954        for StreamSocketSetTcpCongestionRequest
11955    {
11956        #[inline(always)]
11957        fn new_empty() -> Self {
11958            Self { value: fidl::new_empty!(TcpCongestionControl, D) }
11959        }
11960
11961        #[inline]
11962        unsafe fn decode(
11963            &mut self,
11964            decoder: &mut fidl::encoding::Decoder<'_, D>,
11965            offset: usize,
11966            _depth: fidl::encoding::Depth,
11967        ) -> fidl::Result<()> {
11968            decoder.debug_check_bounds::<Self>(offset);
11969            // Verify that padding bytes are zero.
11970            fidl::decode!(TcpCongestionControl, D, &mut self.value, decoder, offset + 0, _depth)?;
11971            Ok(())
11972        }
11973    }
11974
11975    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpCorkRequest {
11976        type Borrowed<'a> = &'a Self;
11977        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11978            value
11979        }
11980    }
11981
11982    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpCorkRequest {
11983        type Owned = Self;
11984
11985        #[inline(always)]
11986        fn inline_align(_context: fidl::encoding::Context) -> usize {
11987            1
11988        }
11989
11990        #[inline(always)]
11991        fn inline_size(_context: fidl::encoding::Context) -> usize {
11992            1
11993        }
11994    }
11995
11996    unsafe impl<D: fidl::encoding::ResourceDialect>
11997        fidl::encoding::Encode<StreamSocketSetTcpCorkRequest, D>
11998        for &StreamSocketSetTcpCorkRequest
11999    {
12000        #[inline]
12001        unsafe fn encode(
12002            self,
12003            encoder: &mut fidl::encoding::Encoder<'_, D>,
12004            offset: usize,
12005            _depth: fidl::encoding::Depth,
12006        ) -> fidl::Result<()> {
12007            encoder.debug_check_bounds::<StreamSocketSetTcpCorkRequest>(offset);
12008            // Delegate to tuple encoding.
12009            fidl::encoding::Encode::<StreamSocketSetTcpCorkRequest, D>::encode(
12010                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12011                encoder,
12012                offset,
12013                _depth,
12014            )
12015        }
12016    }
12017    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12018        fidl::encoding::Encode<StreamSocketSetTcpCorkRequest, D> for (T0,)
12019    {
12020        #[inline]
12021        unsafe fn encode(
12022            self,
12023            encoder: &mut fidl::encoding::Encoder<'_, D>,
12024            offset: usize,
12025            depth: fidl::encoding::Depth,
12026        ) -> fidl::Result<()> {
12027            encoder.debug_check_bounds::<StreamSocketSetTcpCorkRequest>(offset);
12028            // Zero out padding regions. There's no need to apply masks
12029            // because the unmasked parts will be overwritten by fields.
12030            // Write the fields.
12031            self.0.encode(encoder, offset + 0, depth)?;
12032            Ok(())
12033        }
12034    }
12035
12036    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12037        for StreamSocketSetTcpCorkRequest
12038    {
12039        #[inline(always)]
12040        fn new_empty() -> Self {
12041            Self { value: fidl::new_empty!(bool, D) }
12042        }
12043
12044        #[inline]
12045        unsafe fn decode(
12046            &mut self,
12047            decoder: &mut fidl::encoding::Decoder<'_, D>,
12048            offset: usize,
12049            _depth: fidl::encoding::Depth,
12050        ) -> fidl::Result<()> {
12051            decoder.debug_check_bounds::<Self>(offset);
12052            // Verify that padding bytes are zero.
12053            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12054            Ok(())
12055        }
12056    }
12057
12058    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpDeferAcceptRequest {
12059        type Borrowed<'a> = &'a Self;
12060        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12061            value
12062        }
12063    }
12064
12065    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpDeferAcceptRequest {
12066        type Owned = Self;
12067
12068        #[inline(always)]
12069        fn inline_align(_context: fidl::encoding::Context) -> usize {
12070            4
12071        }
12072
12073        #[inline(always)]
12074        fn inline_size(_context: fidl::encoding::Context) -> usize {
12075            4
12076        }
12077        #[inline(always)]
12078        fn encode_is_copy() -> bool {
12079            true
12080        }
12081
12082        #[inline(always)]
12083        fn decode_is_copy() -> bool {
12084            true
12085        }
12086    }
12087
12088    unsafe impl<D: fidl::encoding::ResourceDialect>
12089        fidl::encoding::Encode<StreamSocketSetTcpDeferAcceptRequest, D>
12090        for &StreamSocketSetTcpDeferAcceptRequest
12091    {
12092        #[inline]
12093        unsafe fn encode(
12094            self,
12095            encoder: &mut fidl::encoding::Encoder<'_, D>,
12096            offset: usize,
12097            _depth: fidl::encoding::Depth,
12098        ) -> fidl::Result<()> {
12099            encoder.debug_check_bounds::<StreamSocketSetTcpDeferAcceptRequest>(offset);
12100            unsafe {
12101                // Copy the object into the buffer.
12102                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12103                (buf_ptr as *mut StreamSocketSetTcpDeferAcceptRequest)
12104                    .write_unaligned((self as *const StreamSocketSetTcpDeferAcceptRequest).read());
12105                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12106                // done second because the memcpy will write garbage to these bytes.
12107            }
12108            Ok(())
12109        }
12110    }
12111    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12112        fidl::encoding::Encode<StreamSocketSetTcpDeferAcceptRequest, D> for (T0,)
12113    {
12114        #[inline]
12115        unsafe fn encode(
12116            self,
12117            encoder: &mut fidl::encoding::Encoder<'_, D>,
12118            offset: usize,
12119            depth: fidl::encoding::Depth,
12120        ) -> fidl::Result<()> {
12121            encoder.debug_check_bounds::<StreamSocketSetTcpDeferAcceptRequest>(offset);
12122            // Zero out padding regions. There's no need to apply masks
12123            // because the unmasked parts will be overwritten by fields.
12124            // Write the fields.
12125            self.0.encode(encoder, offset + 0, depth)?;
12126            Ok(())
12127        }
12128    }
12129
12130    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12131        for StreamSocketSetTcpDeferAcceptRequest
12132    {
12133        #[inline(always)]
12134        fn new_empty() -> Self {
12135            Self { value_secs: fidl::new_empty!(u32, D) }
12136        }
12137
12138        #[inline]
12139        unsafe fn decode(
12140            &mut self,
12141            decoder: &mut fidl::encoding::Decoder<'_, D>,
12142            offset: usize,
12143            _depth: fidl::encoding::Depth,
12144        ) -> fidl::Result<()> {
12145            decoder.debug_check_bounds::<Self>(offset);
12146            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12147            // Verify that padding bytes are zero.
12148            // Copy from the buffer into the object.
12149            unsafe {
12150                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12151            }
12152            Ok(())
12153        }
12154    }
12155
12156    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveCountRequest {
12157        type Borrowed<'a> = &'a Self;
12158        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12159            value
12160        }
12161    }
12162
12163    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveCountRequest {
12164        type Owned = Self;
12165
12166        #[inline(always)]
12167        fn inline_align(_context: fidl::encoding::Context) -> usize {
12168            4
12169        }
12170
12171        #[inline(always)]
12172        fn inline_size(_context: fidl::encoding::Context) -> usize {
12173            4
12174        }
12175        #[inline(always)]
12176        fn encode_is_copy() -> bool {
12177            true
12178        }
12179
12180        #[inline(always)]
12181        fn decode_is_copy() -> bool {
12182            true
12183        }
12184    }
12185
12186    unsafe impl<D: fidl::encoding::ResourceDialect>
12187        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveCountRequest, D>
12188        for &StreamSocketSetTcpKeepAliveCountRequest
12189    {
12190        #[inline]
12191        unsafe fn encode(
12192            self,
12193            encoder: &mut fidl::encoding::Encoder<'_, D>,
12194            offset: usize,
12195            _depth: fidl::encoding::Depth,
12196        ) -> fidl::Result<()> {
12197            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveCountRequest>(offset);
12198            unsafe {
12199                // Copy the object into the buffer.
12200                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12201                (buf_ptr as *mut StreamSocketSetTcpKeepAliveCountRequest).write_unaligned(
12202                    (self as *const StreamSocketSetTcpKeepAliveCountRequest).read(),
12203                );
12204                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12205                // done second because the memcpy will write garbage to these bytes.
12206            }
12207            Ok(())
12208        }
12209    }
12210    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12211        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveCountRequest, D> for (T0,)
12212    {
12213        #[inline]
12214        unsafe fn encode(
12215            self,
12216            encoder: &mut fidl::encoding::Encoder<'_, D>,
12217            offset: usize,
12218            depth: fidl::encoding::Depth,
12219        ) -> fidl::Result<()> {
12220            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveCountRequest>(offset);
12221            // Zero out padding regions. There's no need to apply masks
12222            // because the unmasked parts will be overwritten by fields.
12223            // Write the fields.
12224            self.0.encode(encoder, offset + 0, depth)?;
12225            Ok(())
12226        }
12227    }
12228
12229    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12230        for StreamSocketSetTcpKeepAliveCountRequest
12231    {
12232        #[inline(always)]
12233        fn new_empty() -> Self {
12234            Self { value: fidl::new_empty!(u32, D) }
12235        }
12236
12237        #[inline]
12238        unsafe fn decode(
12239            &mut self,
12240            decoder: &mut fidl::encoding::Decoder<'_, D>,
12241            offset: usize,
12242            _depth: fidl::encoding::Depth,
12243        ) -> fidl::Result<()> {
12244            decoder.debug_check_bounds::<Self>(offset);
12245            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12246            // Verify that padding bytes are zero.
12247            // Copy from the buffer into the object.
12248            unsafe {
12249                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12250            }
12251            Ok(())
12252        }
12253    }
12254
12255    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveIdleRequest {
12256        type Borrowed<'a> = &'a Self;
12257        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12258            value
12259        }
12260    }
12261
12262    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveIdleRequest {
12263        type Owned = Self;
12264
12265        #[inline(always)]
12266        fn inline_align(_context: fidl::encoding::Context) -> usize {
12267            4
12268        }
12269
12270        #[inline(always)]
12271        fn inline_size(_context: fidl::encoding::Context) -> usize {
12272            4
12273        }
12274        #[inline(always)]
12275        fn encode_is_copy() -> bool {
12276            true
12277        }
12278
12279        #[inline(always)]
12280        fn decode_is_copy() -> bool {
12281            true
12282        }
12283    }
12284
12285    unsafe impl<D: fidl::encoding::ResourceDialect>
12286        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIdleRequest, D>
12287        for &StreamSocketSetTcpKeepAliveIdleRequest
12288    {
12289        #[inline]
12290        unsafe fn encode(
12291            self,
12292            encoder: &mut fidl::encoding::Encoder<'_, D>,
12293            offset: usize,
12294            _depth: fidl::encoding::Depth,
12295        ) -> fidl::Result<()> {
12296            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIdleRequest>(offset);
12297            unsafe {
12298                // Copy the object into the buffer.
12299                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12300                (buf_ptr as *mut StreamSocketSetTcpKeepAliveIdleRequest).write_unaligned(
12301                    (self as *const StreamSocketSetTcpKeepAliveIdleRequest).read(),
12302                );
12303                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12304                // done second because the memcpy will write garbage to these bytes.
12305            }
12306            Ok(())
12307        }
12308    }
12309    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12310        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIdleRequest, D> for (T0,)
12311    {
12312        #[inline]
12313        unsafe fn encode(
12314            self,
12315            encoder: &mut fidl::encoding::Encoder<'_, D>,
12316            offset: usize,
12317            depth: fidl::encoding::Depth,
12318        ) -> fidl::Result<()> {
12319            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIdleRequest>(offset);
12320            // Zero out padding regions. There's no need to apply masks
12321            // because the unmasked parts will be overwritten by fields.
12322            // Write the fields.
12323            self.0.encode(encoder, offset + 0, depth)?;
12324            Ok(())
12325        }
12326    }
12327
12328    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12329        for StreamSocketSetTcpKeepAliveIdleRequest
12330    {
12331        #[inline(always)]
12332        fn new_empty() -> Self {
12333            Self { value_secs: fidl::new_empty!(u32, D) }
12334        }
12335
12336        #[inline]
12337        unsafe fn decode(
12338            &mut self,
12339            decoder: &mut fidl::encoding::Decoder<'_, D>,
12340            offset: usize,
12341            _depth: fidl::encoding::Depth,
12342        ) -> fidl::Result<()> {
12343            decoder.debug_check_bounds::<Self>(offset);
12344            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12345            // Verify that padding bytes are zero.
12346            // Copy from the buffer into the object.
12347            unsafe {
12348                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12349            }
12350            Ok(())
12351        }
12352    }
12353
12354    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveIntervalRequest {
12355        type Borrowed<'a> = &'a Self;
12356        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12357            value
12358        }
12359    }
12360
12361    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveIntervalRequest {
12362        type Owned = Self;
12363
12364        #[inline(always)]
12365        fn inline_align(_context: fidl::encoding::Context) -> usize {
12366            4
12367        }
12368
12369        #[inline(always)]
12370        fn inline_size(_context: fidl::encoding::Context) -> usize {
12371            4
12372        }
12373        #[inline(always)]
12374        fn encode_is_copy() -> bool {
12375            true
12376        }
12377
12378        #[inline(always)]
12379        fn decode_is_copy() -> bool {
12380            true
12381        }
12382    }
12383
12384    unsafe impl<D: fidl::encoding::ResourceDialect>
12385        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIntervalRequest, D>
12386        for &StreamSocketSetTcpKeepAliveIntervalRequest
12387    {
12388        #[inline]
12389        unsafe fn encode(
12390            self,
12391            encoder: &mut fidl::encoding::Encoder<'_, D>,
12392            offset: usize,
12393            _depth: fidl::encoding::Depth,
12394        ) -> fidl::Result<()> {
12395            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIntervalRequest>(offset);
12396            unsafe {
12397                // Copy the object into the buffer.
12398                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12399                (buf_ptr as *mut StreamSocketSetTcpKeepAliveIntervalRequest).write_unaligned(
12400                    (self as *const StreamSocketSetTcpKeepAliveIntervalRequest).read(),
12401                );
12402                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12403                // done second because the memcpy will write garbage to these bytes.
12404            }
12405            Ok(())
12406        }
12407    }
12408    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12409        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIntervalRequest, D> for (T0,)
12410    {
12411        #[inline]
12412        unsafe fn encode(
12413            self,
12414            encoder: &mut fidl::encoding::Encoder<'_, D>,
12415            offset: usize,
12416            depth: fidl::encoding::Depth,
12417        ) -> fidl::Result<()> {
12418            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIntervalRequest>(offset);
12419            // Zero out padding regions. There's no need to apply masks
12420            // because the unmasked parts will be overwritten by fields.
12421            // Write the fields.
12422            self.0.encode(encoder, offset + 0, depth)?;
12423            Ok(())
12424        }
12425    }
12426
12427    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12428        for StreamSocketSetTcpKeepAliveIntervalRequest
12429    {
12430        #[inline(always)]
12431        fn new_empty() -> Self {
12432            Self { value_secs: fidl::new_empty!(u32, D) }
12433        }
12434
12435        #[inline]
12436        unsafe fn decode(
12437            &mut self,
12438            decoder: &mut fidl::encoding::Decoder<'_, D>,
12439            offset: usize,
12440            _depth: fidl::encoding::Depth,
12441        ) -> fidl::Result<()> {
12442            decoder.debug_check_bounds::<Self>(offset);
12443            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12444            // Verify that padding bytes are zero.
12445            // Copy from the buffer into the object.
12446            unsafe {
12447                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12448            }
12449            Ok(())
12450        }
12451    }
12452
12453    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpLingerRequest {
12454        type Borrowed<'a> = &'a Self;
12455        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12456            value
12457        }
12458    }
12459
12460    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpLingerRequest {
12461        type Owned = Self;
12462
12463        #[inline(always)]
12464        fn inline_align(_context: fidl::encoding::Context) -> usize {
12465            8
12466        }
12467
12468        #[inline(always)]
12469        fn inline_size(_context: fidl::encoding::Context) -> usize {
12470            16
12471        }
12472    }
12473
12474    unsafe impl<D: fidl::encoding::ResourceDialect>
12475        fidl::encoding::Encode<StreamSocketSetTcpLingerRequest, D>
12476        for &StreamSocketSetTcpLingerRequest
12477    {
12478        #[inline]
12479        unsafe fn encode(
12480            self,
12481            encoder: &mut fidl::encoding::Encoder<'_, D>,
12482            offset: usize,
12483            _depth: fidl::encoding::Depth,
12484        ) -> fidl::Result<()> {
12485            encoder.debug_check_bounds::<StreamSocketSetTcpLingerRequest>(offset);
12486            // Delegate to tuple encoding.
12487            fidl::encoding::Encode::<StreamSocketSetTcpLingerRequest, D>::encode(
12488                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value_secs),),
12489                encoder,
12490                offset,
12491                _depth,
12492            )
12493        }
12494    }
12495    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
12496        fidl::encoding::Encode<StreamSocketSetTcpLingerRequest, D> for (T0,)
12497    {
12498        #[inline]
12499        unsafe fn encode(
12500            self,
12501            encoder: &mut fidl::encoding::Encoder<'_, D>,
12502            offset: usize,
12503            depth: fidl::encoding::Depth,
12504        ) -> fidl::Result<()> {
12505            encoder.debug_check_bounds::<StreamSocketSetTcpLingerRequest>(offset);
12506            // Zero out padding regions. There's no need to apply masks
12507            // because the unmasked parts will be overwritten by fields.
12508            // Write the fields.
12509            self.0.encode(encoder, offset + 0, depth)?;
12510            Ok(())
12511        }
12512    }
12513
12514    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12515        for StreamSocketSetTcpLingerRequest
12516    {
12517        #[inline(always)]
12518        fn new_empty() -> Self {
12519            Self { value_secs: fidl::new_empty!(OptionalUint32, D) }
12520        }
12521
12522        #[inline]
12523        unsafe fn decode(
12524            &mut self,
12525            decoder: &mut fidl::encoding::Decoder<'_, D>,
12526            offset: usize,
12527            _depth: fidl::encoding::Depth,
12528        ) -> fidl::Result<()> {
12529            decoder.debug_check_bounds::<Self>(offset);
12530            // Verify that padding bytes are zero.
12531            fidl::decode!(OptionalUint32, D, &mut self.value_secs, decoder, offset + 0, _depth)?;
12532            Ok(())
12533        }
12534    }
12535
12536    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpMaxSegmentRequest {
12537        type Borrowed<'a> = &'a Self;
12538        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12539            value
12540        }
12541    }
12542
12543    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpMaxSegmentRequest {
12544        type Owned = Self;
12545
12546        #[inline(always)]
12547        fn inline_align(_context: fidl::encoding::Context) -> usize {
12548            4
12549        }
12550
12551        #[inline(always)]
12552        fn inline_size(_context: fidl::encoding::Context) -> usize {
12553            4
12554        }
12555        #[inline(always)]
12556        fn encode_is_copy() -> bool {
12557            true
12558        }
12559
12560        #[inline(always)]
12561        fn decode_is_copy() -> bool {
12562            true
12563        }
12564    }
12565
12566    unsafe impl<D: fidl::encoding::ResourceDialect>
12567        fidl::encoding::Encode<StreamSocketSetTcpMaxSegmentRequest, D>
12568        for &StreamSocketSetTcpMaxSegmentRequest
12569    {
12570        #[inline]
12571        unsafe fn encode(
12572            self,
12573            encoder: &mut fidl::encoding::Encoder<'_, D>,
12574            offset: usize,
12575            _depth: fidl::encoding::Depth,
12576        ) -> fidl::Result<()> {
12577            encoder.debug_check_bounds::<StreamSocketSetTcpMaxSegmentRequest>(offset);
12578            unsafe {
12579                // Copy the object into the buffer.
12580                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12581                (buf_ptr as *mut StreamSocketSetTcpMaxSegmentRequest)
12582                    .write_unaligned((self as *const StreamSocketSetTcpMaxSegmentRequest).read());
12583                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12584                // done second because the memcpy will write garbage to these bytes.
12585            }
12586            Ok(())
12587        }
12588    }
12589    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12590        fidl::encoding::Encode<StreamSocketSetTcpMaxSegmentRequest, D> for (T0,)
12591    {
12592        #[inline]
12593        unsafe fn encode(
12594            self,
12595            encoder: &mut fidl::encoding::Encoder<'_, D>,
12596            offset: usize,
12597            depth: fidl::encoding::Depth,
12598        ) -> fidl::Result<()> {
12599            encoder.debug_check_bounds::<StreamSocketSetTcpMaxSegmentRequest>(offset);
12600            // Zero out padding regions. There's no need to apply masks
12601            // because the unmasked parts will be overwritten by fields.
12602            // Write the fields.
12603            self.0.encode(encoder, offset + 0, depth)?;
12604            Ok(())
12605        }
12606    }
12607
12608    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12609        for StreamSocketSetTcpMaxSegmentRequest
12610    {
12611        #[inline(always)]
12612        fn new_empty() -> Self {
12613            Self { value_bytes: fidl::new_empty!(u32, D) }
12614        }
12615
12616        #[inline]
12617        unsafe fn decode(
12618            &mut self,
12619            decoder: &mut fidl::encoding::Decoder<'_, D>,
12620            offset: usize,
12621            _depth: fidl::encoding::Depth,
12622        ) -> fidl::Result<()> {
12623            decoder.debug_check_bounds::<Self>(offset);
12624            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12625            // Verify that padding bytes are zero.
12626            // Copy from the buffer into the object.
12627            unsafe {
12628                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12629            }
12630            Ok(())
12631        }
12632    }
12633
12634    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpNoDelayRequest {
12635        type Borrowed<'a> = &'a Self;
12636        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12637            value
12638        }
12639    }
12640
12641    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpNoDelayRequest {
12642        type Owned = Self;
12643
12644        #[inline(always)]
12645        fn inline_align(_context: fidl::encoding::Context) -> usize {
12646            1
12647        }
12648
12649        #[inline(always)]
12650        fn inline_size(_context: fidl::encoding::Context) -> usize {
12651            1
12652        }
12653    }
12654
12655    unsafe impl<D: fidl::encoding::ResourceDialect>
12656        fidl::encoding::Encode<StreamSocketSetTcpNoDelayRequest, D>
12657        for &StreamSocketSetTcpNoDelayRequest
12658    {
12659        #[inline]
12660        unsafe fn encode(
12661            self,
12662            encoder: &mut fidl::encoding::Encoder<'_, D>,
12663            offset: usize,
12664            _depth: fidl::encoding::Depth,
12665        ) -> fidl::Result<()> {
12666            encoder.debug_check_bounds::<StreamSocketSetTcpNoDelayRequest>(offset);
12667            // Delegate to tuple encoding.
12668            fidl::encoding::Encode::<StreamSocketSetTcpNoDelayRequest, D>::encode(
12669                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12670                encoder,
12671                offset,
12672                _depth,
12673            )
12674        }
12675    }
12676    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12677        fidl::encoding::Encode<StreamSocketSetTcpNoDelayRequest, D> for (T0,)
12678    {
12679        #[inline]
12680        unsafe fn encode(
12681            self,
12682            encoder: &mut fidl::encoding::Encoder<'_, D>,
12683            offset: usize,
12684            depth: fidl::encoding::Depth,
12685        ) -> fidl::Result<()> {
12686            encoder.debug_check_bounds::<StreamSocketSetTcpNoDelayRequest>(offset);
12687            // Zero out padding regions. There's no need to apply masks
12688            // because the unmasked parts will be overwritten by fields.
12689            // Write the fields.
12690            self.0.encode(encoder, offset + 0, depth)?;
12691            Ok(())
12692        }
12693    }
12694
12695    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12696        for StreamSocketSetTcpNoDelayRequest
12697    {
12698        #[inline(always)]
12699        fn new_empty() -> Self {
12700            Self { value: fidl::new_empty!(bool, D) }
12701        }
12702
12703        #[inline]
12704        unsafe fn decode(
12705            &mut self,
12706            decoder: &mut fidl::encoding::Decoder<'_, D>,
12707            offset: usize,
12708            _depth: fidl::encoding::Depth,
12709        ) -> fidl::Result<()> {
12710            decoder.debug_check_bounds::<Self>(offset);
12711            // Verify that padding bytes are zero.
12712            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12713            Ok(())
12714        }
12715    }
12716
12717    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpQuickAckRequest {
12718        type Borrowed<'a> = &'a Self;
12719        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12720            value
12721        }
12722    }
12723
12724    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpQuickAckRequest {
12725        type Owned = Self;
12726
12727        #[inline(always)]
12728        fn inline_align(_context: fidl::encoding::Context) -> usize {
12729            1
12730        }
12731
12732        #[inline(always)]
12733        fn inline_size(_context: fidl::encoding::Context) -> usize {
12734            1
12735        }
12736    }
12737
12738    unsafe impl<D: fidl::encoding::ResourceDialect>
12739        fidl::encoding::Encode<StreamSocketSetTcpQuickAckRequest, D>
12740        for &StreamSocketSetTcpQuickAckRequest
12741    {
12742        #[inline]
12743        unsafe fn encode(
12744            self,
12745            encoder: &mut fidl::encoding::Encoder<'_, D>,
12746            offset: usize,
12747            _depth: fidl::encoding::Depth,
12748        ) -> fidl::Result<()> {
12749            encoder.debug_check_bounds::<StreamSocketSetTcpQuickAckRequest>(offset);
12750            // Delegate to tuple encoding.
12751            fidl::encoding::Encode::<StreamSocketSetTcpQuickAckRequest, D>::encode(
12752                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12753                encoder,
12754                offset,
12755                _depth,
12756            )
12757        }
12758    }
12759    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12760        fidl::encoding::Encode<StreamSocketSetTcpQuickAckRequest, D> for (T0,)
12761    {
12762        #[inline]
12763        unsafe fn encode(
12764            self,
12765            encoder: &mut fidl::encoding::Encoder<'_, D>,
12766            offset: usize,
12767            depth: fidl::encoding::Depth,
12768        ) -> fidl::Result<()> {
12769            encoder.debug_check_bounds::<StreamSocketSetTcpQuickAckRequest>(offset);
12770            // Zero out padding regions. There's no need to apply masks
12771            // because the unmasked parts will be overwritten by fields.
12772            // Write the fields.
12773            self.0.encode(encoder, offset + 0, depth)?;
12774            Ok(())
12775        }
12776    }
12777
12778    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12779        for StreamSocketSetTcpQuickAckRequest
12780    {
12781        #[inline(always)]
12782        fn new_empty() -> Self {
12783            Self { value: fidl::new_empty!(bool, D) }
12784        }
12785
12786        #[inline]
12787        unsafe fn decode(
12788            &mut self,
12789            decoder: &mut fidl::encoding::Decoder<'_, D>,
12790            offset: usize,
12791            _depth: fidl::encoding::Depth,
12792        ) -> fidl::Result<()> {
12793            decoder.debug_check_bounds::<Self>(offset);
12794            // Verify that padding bytes are zero.
12795            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12796            Ok(())
12797        }
12798    }
12799
12800    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpSynCountRequest {
12801        type Borrowed<'a> = &'a Self;
12802        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12803            value
12804        }
12805    }
12806
12807    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpSynCountRequest {
12808        type Owned = Self;
12809
12810        #[inline(always)]
12811        fn inline_align(_context: fidl::encoding::Context) -> usize {
12812            4
12813        }
12814
12815        #[inline(always)]
12816        fn inline_size(_context: fidl::encoding::Context) -> usize {
12817            4
12818        }
12819        #[inline(always)]
12820        fn encode_is_copy() -> bool {
12821            true
12822        }
12823
12824        #[inline(always)]
12825        fn decode_is_copy() -> bool {
12826            true
12827        }
12828    }
12829
12830    unsafe impl<D: fidl::encoding::ResourceDialect>
12831        fidl::encoding::Encode<StreamSocketSetTcpSynCountRequest, D>
12832        for &StreamSocketSetTcpSynCountRequest
12833    {
12834        #[inline]
12835        unsafe fn encode(
12836            self,
12837            encoder: &mut fidl::encoding::Encoder<'_, D>,
12838            offset: usize,
12839            _depth: fidl::encoding::Depth,
12840        ) -> fidl::Result<()> {
12841            encoder.debug_check_bounds::<StreamSocketSetTcpSynCountRequest>(offset);
12842            unsafe {
12843                // Copy the object into the buffer.
12844                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12845                (buf_ptr as *mut StreamSocketSetTcpSynCountRequest)
12846                    .write_unaligned((self as *const StreamSocketSetTcpSynCountRequest).read());
12847                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12848                // done second because the memcpy will write garbage to these bytes.
12849            }
12850            Ok(())
12851        }
12852    }
12853    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12854        fidl::encoding::Encode<StreamSocketSetTcpSynCountRequest, D> for (T0,)
12855    {
12856        #[inline]
12857        unsafe fn encode(
12858            self,
12859            encoder: &mut fidl::encoding::Encoder<'_, D>,
12860            offset: usize,
12861            depth: fidl::encoding::Depth,
12862        ) -> fidl::Result<()> {
12863            encoder.debug_check_bounds::<StreamSocketSetTcpSynCountRequest>(offset);
12864            // Zero out padding regions. There's no need to apply masks
12865            // because the unmasked parts will be overwritten by fields.
12866            // Write the fields.
12867            self.0.encode(encoder, offset + 0, depth)?;
12868            Ok(())
12869        }
12870    }
12871
12872    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12873        for StreamSocketSetTcpSynCountRequest
12874    {
12875        #[inline(always)]
12876        fn new_empty() -> Self {
12877            Self { value: fidl::new_empty!(u32, D) }
12878        }
12879
12880        #[inline]
12881        unsafe fn decode(
12882            &mut self,
12883            decoder: &mut fidl::encoding::Decoder<'_, D>,
12884            offset: usize,
12885            _depth: fidl::encoding::Depth,
12886        ) -> fidl::Result<()> {
12887            decoder.debug_check_bounds::<Self>(offset);
12888            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12889            // Verify that padding bytes are zero.
12890            // Copy from the buffer into the object.
12891            unsafe {
12892                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12893            }
12894            Ok(())
12895        }
12896    }
12897
12898    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpUserTimeoutRequest {
12899        type Borrowed<'a> = &'a Self;
12900        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12901            value
12902        }
12903    }
12904
12905    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpUserTimeoutRequest {
12906        type Owned = Self;
12907
12908        #[inline(always)]
12909        fn inline_align(_context: fidl::encoding::Context) -> usize {
12910            4
12911        }
12912
12913        #[inline(always)]
12914        fn inline_size(_context: fidl::encoding::Context) -> usize {
12915            4
12916        }
12917        #[inline(always)]
12918        fn encode_is_copy() -> bool {
12919            true
12920        }
12921
12922        #[inline(always)]
12923        fn decode_is_copy() -> bool {
12924            true
12925        }
12926    }
12927
12928    unsafe impl<D: fidl::encoding::ResourceDialect>
12929        fidl::encoding::Encode<StreamSocketSetTcpUserTimeoutRequest, D>
12930        for &StreamSocketSetTcpUserTimeoutRequest
12931    {
12932        #[inline]
12933        unsafe fn encode(
12934            self,
12935            encoder: &mut fidl::encoding::Encoder<'_, D>,
12936            offset: usize,
12937            _depth: fidl::encoding::Depth,
12938        ) -> fidl::Result<()> {
12939            encoder.debug_check_bounds::<StreamSocketSetTcpUserTimeoutRequest>(offset);
12940            unsafe {
12941                // Copy the object into the buffer.
12942                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12943                (buf_ptr as *mut StreamSocketSetTcpUserTimeoutRequest)
12944                    .write_unaligned((self as *const StreamSocketSetTcpUserTimeoutRequest).read());
12945                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12946                // done second because the memcpy will write garbage to these bytes.
12947            }
12948            Ok(())
12949        }
12950    }
12951    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12952        fidl::encoding::Encode<StreamSocketSetTcpUserTimeoutRequest, D> for (T0,)
12953    {
12954        #[inline]
12955        unsafe fn encode(
12956            self,
12957            encoder: &mut fidl::encoding::Encoder<'_, D>,
12958            offset: usize,
12959            depth: fidl::encoding::Depth,
12960        ) -> fidl::Result<()> {
12961            encoder.debug_check_bounds::<StreamSocketSetTcpUserTimeoutRequest>(offset);
12962            // Zero out padding regions. There's no need to apply masks
12963            // because the unmasked parts will be overwritten by fields.
12964            // Write the fields.
12965            self.0.encode(encoder, offset + 0, depth)?;
12966            Ok(())
12967        }
12968    }
12969
12970    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12971        for StreamSocketSetTcpUserTimeoutRequest
12972    {
12973        #[inline(always)]
12974        fn new_empty() -> Self {
12975            Self { value_millis: fidl::new_empty!(u32, D) }
12976        }
12977
12978        #[inline]
12979        unsafe fn decode(
12980            &mut self,
12981            decoder: &mut fidl::encoding::Decoder<'_, D>,
12982            offset: usize,
12983            _depth: fidl::encoding::Depth,
12984        ) -> fidl::Result<()> {
12985            decoder.debug_check_bounds::<Self>(offset);
12986            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12987            // Verify that padding bytes are zero.
12988            // Copy from the buffer into the object.
12989            unsafe {
12990                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12991            }
12992            Ok(())
12993        }
12994    }
12995
12996    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpWindowClampRequest {
12997        type Borrowed<'a> = &'a Self;
12998        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12999            value
13000        }
13001    }
13002
13003    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpWindowClampRequest {
13004        type Owned = Self;
13005
13006        #[inline(always)]
13007        fn inline_align(_context: fidl::encoding::Context) -> usize {
13008            4
13009        }
13010
13011        #[inline(always)]
13012        fn inline_size(_context: fidl::encoding::Context) -> usize {
13013            4
13014        }
13015        #[inline(always)]
13016        fn encode_is_copy() -> bool {
13017            true
13018        }
13019
13020        #[inline(always)]
13021        fn decode_is_copy() -> bool {
13022            true
13023        }
13024    }
13025
13026    unsafe impl<D: fidl::encoding::ResourceDialect>
13027        fidl::encoding::Encode<StreamSocketSetTcpWindowClampRequest, D>
13028        for &StreamSocketSetTcpWindowClampRequest
13029    {
13030        #[inline]
13031        unsafe fn encode(
13032            self,
13033            encoder: &mut fidl::encoding::Encoder<'_, D>,
13034            offset: usize,
13035            _depth: fidl::encoding::Depth,
13036        ) -> fidl::Result<()> {
13037            encoder.debug_check_bounds::<StreamSocketSetTcpWindowClampRequest>(offset);
13038            unsafe {
13039                // Copy the object into the buffer.
13040                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13041                (buf_ptr as *mut StreamSocketSetTcpWindowClampRequest)
13042                    .write_unaligned((self as *const StreamSocketSetTcpWindowClampRequest).read());
13043                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13044                // done second because the memcpy will write garbage to these bytes.
13045            }
13046            Ok(())
13047        }
13048    }
13049    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13050        fidl::encoding::Encode<StreamSocketSetTcpWindowClampRequest, D> for (T0,)
13051    {
13052        #[inline]
13053        unsafe fn encode(
13054            self,
13055            encoder: &mut fidl::encoding::Encoder<'_, D>,
13056            offset: usize,
13057            depth: fidl::encoding::Depth,
13058        ) -> fidl::Result<()> {
13059            encoder.debug_check_bounds::<StreamSocketSetTcpWindowClampRequest>(offset);
13060            // Zero out padding regions. There's no need to apply masks
13061            // because the unmasked parts will be overwritten by fields.
13062            // Write the fields.
13063            self.0.encode(encoder, offset + 0, depth)?;
13064            Ok(())
13065        }
13066    }
13067
13068    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13069        for StreamSocketSetTcpWindowClampRequest
13070    {
13071        #[inline(always)]
13072        fn new_empty() -> Self {
13073            Self { value: fidl::new_empty!(u32, D) }
13074        }
13075
13076        #[inline]
13077        unsafe fn decode(
13078            &mut self,
13079            decoder: &mut fidl::encoding::Decoder<'_, D>,
13080            offset: usize,
13081            _depth: fidl::encoding::Depth,
13082        ) -> fidl::Result<()> {
13083            decoder.debug_check_bounds::<Self>(offset);
13084            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13085            // Verify that padding bytes are zero.
13086            // Copy from the buffer into the object.
13087            unsafe {
13088                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13089            }
13090            Ok(())
13091        }
13092    }
13093
13094    impl fidl::encoding::ValueTypeMarker for StreamSocketGetInfoResponse {
13095        type Borrowed<'a> = &'a Self;
13096        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13097            value
13098        }
13099    }
13100
13101    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetInfoResponse {
13102        type Owned = Self;
13103
13104        #[inline(always)]
13105        fn inline_align(_context: fidl::encoding::Context) -> usize {
13106            4
13107        }
13108
13109        #[inline(always)]
13110        fn inline_size(_context: fidl::encoding::Context) -> usize {
13111            8
13112        }
13113    }
13114
13115    unsafe impl<D: fidl::encoding::ResourceDialect>
13116        fidl::encoding::Encode<StreamSocketGetInfoResponse, D> for &StreamSocketGetInfoResponse
13117    {
13118        #[inline]
13119        unsafe fn encode(
13120            self,
13121            encoder: &mut fidl::encoding::Encoder<'_, D>,
13122            offset: usize,
13123            _depth: fidl::encoding::Depth,
13124        ) -> fidl::Result<()> {
13125            encoder.debug_check_bounds::<StreamSocketGetInfoResponse>(offset);
13126            // Delegate to tuple encoding.
13127            fidl::encoding::Encode::<StreamSocketGetInfoResponse, D>::encode(
13128                (
13129                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
13130                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
13131                ),
13132                encoder,
13133                offset,
13134                _depth,
13135            )
13136        }
13137    }
13138    unsafe impl<
13139            D: fidl::encoding::ResourceDialect,
13140            T0: fidl::encoding::Encode<Domain, D>,
13141            T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
13142        > fidl::encoding::Encode<StreamSocketGetInfoResponse, D> for (T0, T1)
13143    {
13144        #[inline]
13145        unsafe fn encode(
13146            self,
13147            encoder: &mut fidl::encoding::Encoder<'_, D>,
13148            offset: usize,
13149            depth: fidl::encoding::Depth,
13150        ) -> fidl::Result<()> {
13151            encoder.debug_check_bounds::<StreamSocketGetInfoResponse>(offset);
13152            // Zero out padding regions. There's no need to apply masks
13153            // because the unmasked parts will be overwritten by fields.
13154            unsafe {
13155                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
13156                (ptr as *mut u32).write_unaligned(0);
13157            }
13158            // Write the fields.
13159            self.0.encode(encoder, offset + 0, depth)?;
13160            self.1.encode(encoder, offset + 4, depth)?;
13161            Ok(())
13162        }
13163    }
13164
13165    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13166        for StreamSocketGetInfoResponse
13167    {
13168        #[inline(always)]
13169        fn new_empty() -> Self {
13170            Self {
13171                domain: fidl::new_empty!(Domain, D),
13172                proto: fidl::new_empty!(StreamSocketProtocol, D),
13173            }
13174        }
13175
13176        #[inline]
13177        unsafe fn decode(
13178            &mut self,
13179            decoder: &mut fidl::encoding::Decoder<'_, D>,
13180            offset: usize,
13181            _depth: fidl::encoding::Depth,
13182        ) -> fidl::Result<()> {
13183            decoder.debug_check_bounds::<Self>(offset);
13184            // Verify that padding bytes are zero.
13185            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
13186            let padval = unsafe { (ptr as *const u32).read_unaligned() };
13187            let mask = 0xffff0000u32;
13188            let maskedval = padval & mask;
13189            if maskedval != 0 {
13190                return Err(fidl::Error::NonZeroPadding {
13191                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
13192                });
13193            }
13194            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
13195            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
13196            Ok(())
13197        }
13198    }
13199
13200    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpCongestionResponse {
13201        type Borrowed<'a> = &'a Self;
13202        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13203            value
13204        }
13205    }
13206
13207    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpCongestionResponse {
13208        type Owned = Self;
13209
13210        #[inline(always)]
13211        fn inline_align(_context: fidl::encoding::Context) -> usize {
13212            4
13213        }
13214
13215        #[inline(always)]
13216        fn inline_size(_context: fidl::encoding::Context) -> usize {
13217            4
13218        }
13219    }
13220
13221    unsafe impl<D: fidl::encoding::ResourceDialect>
13222        fidl::encoding::Encode<StreamSocketGetTcpCongestionResponse, D>
13223        for &StreamSocketGetTcpCongestionResponse
13224    {
13225        #[inline]
13226        unsafe fn encode(
13227            self,
13228            encoder: &mut fidl::encoding::Encoder<'_, D>,
13229            offset: usize,
13230            _depth: fidl::encoding::Depth,
13231        ) -> fidl::Result<()> {
13232            encoder.debug_check_bounds::<StreamSocketGetTcpCongestionResponse>(offset);
13233            // Delegate to tuple encoding.
13234            fidl::encoding::Encode::<StreamSocketGetTcpCongestionResponse, D>::encode(
13235                (<TcpCongestionControl as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
13236                encoder,
13237                offset,
13238                _depth,
13239            )
13240        }
13241    }
13242    unsafe impl<
13243            D: fidl::encoding::ResourceDialect,
13244            T0: fidl::encoding::Encode<TcpCongestionControl, D>,
13245        > fidl::encoding::Encode<StreamSocketGetTcpCongestionResponse, D> for (T0,)
13246    {
13247        #[inline]
13248        unsafe fn encode(
13249            self,
13250            encoder: &mut fidl::encoding::Encoder<'_, D>,
13251            offset: usize,
13252            depth: fidl::encoding::Depth,
13253        ) -> fidl::Result<()> {
13254            encoder.debug_check_bounds::<StreamSocketGetTcpCongestionResponse>(offset);
13255            // Zero out padding regions. There's no need to apply masks
13256            // because the unmasked parts will be overwritten by fields.
13257            // Write the fields.
13258            self.0.encode(encoder, offset + 0, depth)?;
13259            Ok(())
13260        }
13261    }
13262
13263    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13264        for StreamSocketGetTcpCongestionResponse
13265    {
13266        #[inline(always)]
13267        fn new_empty() -> Self {
13268            Self { value: fidl::new_empty!(TcpCongestionControl, D) }
13269        }
13270
13271        #[inline]
13272        unsafe fn decode(
13273            &mut self,
13274            decoder: &mut fidl::encoding::Decoder<'_, D>,
13275            offset: usize,
13276            _depth: fidl::encoding::Depth,
13277        ) -> fidl::Result<()> {
13278            decoder.debug_check_bounds::<Self>(offset);
13279            // Verify that padding bytes are zero.
13280            fidl::decode!(TcpCongestionControl, D, &mut self.value, decoder, offset + 0, _depth)?;
13281            Ok(())
13282        }
13283    }
13284
13285    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpCorkResponse {
13286        type Borrowed<'a> = &'a Self;
13287        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13288            value
13289        }
13290    }
13291
13292    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpCorkResponse {
13293        type Owned = Self;
13294
13295        #[inline(always)]
13296        fn inline_align(_context: fidl::encoding::Context) -> usize {
13297            1
13298        }
13299
13300        #[inline(always)]
13301        fn inline_size(_context: fidl::encoding::Context) -> usize {
13302            1
13303        }
13304    }
13305
13306    unsafe impl<D: fidl::encoding::ResourceDialect>
13307        fidl::encoding::Encode<StreamSocketGetTcpCorkResponse, D>
13308        for &StreamSocketGetTcpCorkResponse
13309    {
13310        #[inline]
13311        unsafe fn encode(
13312            self,
13313            encoder: &mut fidl::encoding::Encoder<'_, D>,
13314            offset: usize,
13315            _depth: fidl::encoding::Depth,
13316        ) -> fidl::Result<()> {
13317            encoder.debug_check_bounds::<StreamSocketGetTcpCorkResponse>(offset);
13318            // Delegate to tuple encoding.
13319            fidl::encoding::Encode::<StreamSocketGetTcpCorkResponse, D>::encode(
13320                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
13321                encoder,
13322                offset,
13323                _depth,
13324            )
13325        }
13326    }
13327    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
13328        fidl::encoding::Encode<StreamSocketGetTcpCorkResponse, D> for (T0,)
13329    {
13330        #[inline]
13331        unsafe fn encode(
13332            self,
13333            encoder: &mut fidl::encoding::Encoder<'_, D>,
13334            offset: usize,
13335            depth: fidl::encoding::Depth,
13336        ) -> fidl::Result<()> {
13337            encoder.debug_check_bounds::<StreamSocketGetTcpCorkResponse>(offset);
13338            // Zero out padding regions. There's no need to apply masks
13339            // because the unmasked parts will be overwritten by fields.
13340            // Write the fields.
13341            self.0.encode(encoder, offset + 0, depth)?;
13342            Ok(())
13343        }
13344    }
13345
13346    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13347        for StreamSocketGetTcpCorkResponse
13348    {
13349        #[inline(always)]
13350        fn new_empty() -> Self {
13351            Self { value: fidl::new_empty!(bool, D) }
13352        }
13353
13354        #[inline]
13355        unsafe fn decode(
13356            &mut self,
13357            decoder: &mut fidl::encoding::Decoder<'_, D>,
13358            offset: usize,
13359            _depth: fidl::encoding::Depth,
13360        ) -> fidl::Result<()> {
13361            decoder.debug_check_bounds::<Self>(offset);
13362            // Verify that padding bytes are zero.
13363            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13364            Ok(())
13365        }
13366    }
13367
13368    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpDeferAcceptResponse {
13369        type Borrowed<'a> = &'a Self;
13370        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13371            value
13372        }
13373    }
13374
13375    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpDeferAcceptResponse {
13376        type Owned = Self;
13377
13378        #[inline(always)]
13379        fn inline_align(_context: fidl::encoding::Context) -> usize {
13380            4
13381        }
13382
13383        #[inline(always)]
13384        fn inline_size(_context: fidl::encoding::Context) -> usize {
13385            4
13386        }
13387        #[inline(always)]
13388        fn encode_is_copy() -> bool {
13389            true
13390        }
13391
13392        #[inline(always)]
13393        fn decode_is_copy() -> bool {
13394            true
13395        }
13396    }
13397
13398    unsafe impl<D: fidl::encoding::ResourceDialect>
13399        fidl::encoding::Encode<StreamSocketGetTcpDeferAcceptResponse, D>
13400        for &StreamSocketGetTcpDeferAcceptResponse
13401    {
13402        #[inline]
13403        unsafe fn encode(
13404            self,
13405            encoder: &mut fidl::encoding::Encoder<'_, D>,
13406            offset: usize,
13407            _depth: fidl::encoding::Depth,
13408        ) -> fidl::Result<()> {
13409            encoder.debug_check_bounds::<StreamSocketGetTcpDeferAcceptResponse>(offset);
13410            unsafe {
13411                // Copy the object into the buffer.
13412                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13413                (buf_ptr as *mut StreamSocketGetTcpDeferAcceptResponse)
13414                    .write_unaligned((self as *const StreamSocketGetTcpDeferAcceptResponse).read());
13415                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13416                // done second because the memcpy will write garbage to these bytes.
13417            }
13418            Ok(())
13419        }
13420    }
13421    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13422        fidl::encoding::Encode<StreamSocketGetTcpDeferAcceptResponse, D> for (T0,)
13423    {
13424        #[inline]
13425        unsafe fn encode(
13426            self,
13427            encoder: &mut fidl::encoding::Encoder<'_, D>,
13428            offset: usize,
13429            depth: fidl::encoding::Depth,
13430        ) -> fidl::Result<()> {
13431            encoder.debug_check_bounds::<StreamSocketGetTcpDeferAcceptResponse>(offset);
13432            // Zero out padding regions. There's no need to apply masks
13433            // because the unmasked parts will be overwritten by fields.
13434            // Write the fields.
13435            self.0.encode(encoder, offset + 0, depth)?;
13436            Ok(())
13437        }
13438    }
13439
13440    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13441        for StreamSocketGetTcpDeferAcceptResponse
13442    {
13443        #[inline(always)]
13444        fn new_empty() -> Self {
13445            Self { value_secs: fidl::new_empty!(u32, D) }
13446        }
13447
13448        #[inline]
13449        unsafe fn decode(
13450            &mut self,
13451            decoder: &mut fidl::encoding::Decoder<'_, D>,
13452            offset: usize,
13453            _depth: fidl::encoding::Depth,
13454        ) -> fidl::Result<()> {
13455            decoder.debug_check_bounds::<Self>(offset);
13456            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13457            // Verify that padding bytes are zero.
13458            // Copy from the buffer into the object.
13459            unsafe {
13460                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13461            }
13462            Ok(())
13463        }
13464    }
13465
13466    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpInfoResponse {
13467        type Borrowed<'a> = &'a Self;
13468        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13469            value
13470        }
13471    }
13472
13473    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpInfoResponse {
13474        type Owned = Self;
13475
13476        #[inline(always)]
13477        fn inline_align(_context: fidl::encoding::Context) -> usize {
13478            8
13479        }
13480
13481        #[inline(always)]
13482        fn inline_size(_context: fidl::encoding::Context) -> usize {
13483            16
13484        }
13485    }
13486
13487    unsafe impl<D: fidl::encoding::ResourceDialect>
13488        fidl::encoding::Encode<StreamSocketGetTcpInfoResponse, D>
13489        for &StreamSocketGetTcpInfoResponse
13490    {
13491        #[inline]
13492        unsafe fn encode(
13493            self,
13494            encoder: &mut fidl::encoding::Encoder<'_, D>,
13495            offset: usize,
13496            _depth: fidl::encoding::Depth,
13497        ) -> fidl::Result<()> {
13498            encoder.debug_check_bounds::<StreamSocketGetTcpInfoResponse>(offset);
13499            // Delegate to tuple encoding.
13500            fidl::encoding::Encode::<StreamSocketGetTcpInfoResponse, D>::encode(
13501                (<TcpInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
13502                encoder,
13503                offset,
13504                _depth,
13505            )
13506        }
13507    }
13508    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TcpInfo, D>>
13509        fidl::encoding::Encode<StreamSocketGetTcpInfoResponse, D> for (T0,)
13510    {
13511        #[inline]
13512        unsafe fn encode(
13513            self,
13514            encoder: &mut fidl::encoding::Encoder<'_, D>,
13515            offset: usize,
13516            depth: fidl::encoding::Depth,
13517        ) -> fidl::Result<()> {
13518            encoder.debug_check_bounds::<StreamSocketGetTcpInfoResponse>(offset);
13519            // Zero out padding regions. There's no need to apply masks
13520            // because the unmasked parts will be overwritten by fields.
13521            // Write the fields.
13522            self.0.encode(encoder, offset + 0, depth)?;
13523            Ok(())
13524        }
13525    }
13526
13527    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13528        for StreamSocketGetTcpInfoResponse
13529    {
13530        #[inline(always)]
13531        fn new_empty() -> Self {
13532            Self { info: fidl::new_empty!(TcpInfo, D) }
13533        }
13534
13535        #[inline]
13536        unsafe fn decode(
13537            &mut self,
13538            decoder: &mut fidl::encoding::Decoder<'_, D>,
13539            offset: usize,
13540            _depth: fidl::encoding::Depth,
13541        ) -> fidl::Result<()> {
13542            decoder.debug_check_bounds::<Self>(offset);
13543            // Verify that padding bytes are zero.
13544            fidl::decode!(TcpInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
13545            Ok(())
13546        }
13547    }
13548
13549    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveCountResponse {
13550        type Borrowed<'a> = &'a Self;
13551        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13552            value
13553        }
13554    }
13555
13556    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveCountResponse {
13557        type Owned = Self;
13558
13559        #[inline(always)]
13560        fn inline_align(_context: fidl::encoding::Context) -> usize {
13561            4
13562        }
13563
13564        #[inline(always)]
13565        fn inline_size(_context: fidl::encoding::Context) -> usize {
13566            4
13567        }
13568        #[inline(always)]
13569        fn encode_is_copy() -> bool {
13570            true
13571        }
13572
13573        #[inline(always)]
13574        fn decode_is_copy() -> bool {
13575            true
13576        }
13577    }
13578
13579    unsafe impl<D: fidl::encoding::ResourceDialect>
13580        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveCountResponse, D>
13581        for &StreamSocketGetTcpKeepAliveCountResponse
13582    {
13583        #[inline]
13584        unsafe fn encode(
13585            self,
13586            encoder: &mut fidl::encoding::Encoder<'_, D>,
13587            offset: usize,
13588            _depth: fidl::encoding::Depth,
13589        ) -> fidl::Result<()> {
13590            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveCountResponse>(offset);
13591            unsafe {
13592                // Copy the object into the buffer.
13593                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13594                (buf_ptr as *mut StreamSocketGetTcpKeepAliveCountResponse).write_unaligned(
13595                    (self as *const StreamSocketGetTcpKeepAliveCountResponse).read(),
13596                );
13597                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13598                // done second because the memcpy will write garbage to these bytes.
13599            }
13600            Ok(())
13601        }
13602    }
13603    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13604        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveCountResponse, D> for (T0,)
13605    {
13606        #[inline]
13607        unsafe fn encode(
13608            self,
13609            encoder: &mut fidl::encoding::Encoder<'_, D>,
13610            offset: usize,
13611            depth: fidl::encoding::Depth,
13612        ) -> fidl::Result<()> {
13613            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveCountResponse>(offset);
13614            // Zero out padding regions. There's no need to apply masks
13615            // because the unmasked parts will be overwritten by fields.
13616            // Write the fields.
13617            self.0.encode(encoder, offset + 0, depth)?;
13618            Ok(())
13619        }
13620    }
13621
13622    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13623        for StreamSocketGetTcpKeepAliveCountResponse
13624    {
13625        #[inline(always)]
13626        fn new_empty() -> Self {
13627            Self { value: fidl::new_empty!(u32, D) }
13628        }
13629
13630        #[inline]
13631        unsafe fn decode(
13632            &mut self,
13633            decoder: &mut fidl::encoding::Decoder<'_, D>,
13634            offset: usize,
13635            _depth: fidl::encoding::Depth,
13636        ) -> fidl::Result<()> {
13637            decoder.debug_check_bounds::<Self>(offset);
13638            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13639            // Verify that padding bytes are zero.
13640            // Copy from the buffer into the object.
13641            unsafe {
13642                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13643            }
13644            Ok(())
13645        }
13646    }
13647
13648    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveIdleResponse {
13649        type Borrowed<'a> = &'a Self;
13650        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13651            value
13652        }
13653    }
13654
13655    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveIdleResponse {
13656        type Owned = Self;
13657
13658        #[inline(always)]
13659        fn inline_align(_context: fidl::encoding::Context) -> usize {
13660            4
13661        }
13662
13663        #[inline(always)]
13664        fn inline_size(_context: fidl::encoding::Context) -> usize {
13665            4
13666        }
13667        #[inline(always)]
13668        fn encode_is_copy() -> bool {
13669            true
13670        }
13671
13672        #[inline(always)]
13673        fn decode_is_copy() -> bool {
13674            true
13675        }
13676    }
13677
13678    unsafe impl<D: fidl::encoding::ResourceDialect>
13679        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIdleResponse, D>
13680        for &StreamSocketGetTcpKeepAliveIdleResponse
13681    {
13682        #[inline]
13683        unsafe fn encode(
13684            self,
13685            encoder: &mut fidl::encoding::Encoder<'_, D>,
13686            offset: usize,
13687            _depth: fidl::encoding::Depth,
13688        ) -> fidl::Result<()> {
13689            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIdleResponse>(offset);
13690            unsafe {
13691                // Copy the object into the buffer.
13692                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13693                (buf_ptr as *mut StreamSocketGetTcpKeepAliveIdleResponse).write_unaligned(
13694                    (self as *const StreamSocketGetTcpKeepAliveIdleResponse).read(),
13695                );
13696                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13697                // done second because the memcpy will write garbage to these bytes.
13698            }
13699            Ok(())
13700        }
13701    }
13702    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13703        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIdleResponse, D> for (T0,)
13704    {
13705        #[inline]
13706        unsafe fn encode(
13707            self,
13708            encoder: &mut fidl::encoding::Encoder<'_, D>,
13709            offset: usize,
13710            depth: fidl::encoding::Depth,
13711        ) -> fidl::Result<()> {
13712            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIdleResponse>(offset);
13713            // Zero out padding regions. There's no need to apply masks
13714            // because the unmasked parts will be overwritten by fields.
13715            // Write the fields.
13716            self.0.encode(encoder, offset + 0, depth)?;
13717            Ok(())
13718        }
13719    }
13720
13721    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13722        for StreamSocketGetTcpKeepAliveIdleResponse
13723    {
13724        #[inline(always)]
13725        fn new_empty() -> Self {
13726            Self { value_secs: fidl::new_empty!(u32, D) }
13727        }
13728
13729        #[inline]
13730        unsafe fn decode(
13731            &mut self,
13732            decoder: &mut fidl::encoding::Decoder<'_, D>,
13733            offset: usize,
13734            _depth: fidl::encoding::Depth,
13735        ) -> fidl::Result<()> {
13736            decoder.debug_check_bounds::<Self>(offset);
13737            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13738            // Verify that padding bytes are zero.
13739            // Copy from the buffer into the object.
13740            unsafe {
13741                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13742            }
13743            Ok(())
13744        }
13745    }
13746
13747    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveIntervalResponse {
13748        type Borrowed<'a> = &'a Self;
13749        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13750            value
13751        }
13752    }
13753
13754    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveIntervalResponse {
13755        type Owned = Self;
13756
13757        #[inline(always)]
13758        fn inline_align(_context: fidl::encoding::Context) -> usize {
13759            4
13760        }
13761
13762        #[inline(always)]
13763        fn inline_size(_context: fidl::encoding::Context) -> usize {
13764            4
13765        }
13766        #[inline(always)]
13767        fn encode_is_copy() -> bool {
13768            true
13769        }
13770
13771        #[inline(always)]
13772        fn decode_is_copy() -> bool {
13773            true
13774        }
13775    }
13776
13777    unsafe impl<D: fidl::encoding::ResourceDialect>
13778        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIntervalResponse, D>
13779        for &StreamSocketGetTcpKeepAliveIntervalResponse
13780    {
13781        #[inline]
13782        unsafe fn encode(
13783            self,
13784            encoder: &mut fidl::encoding::Encoder<'_, D>,
13785            offset: usize,
13786            _depth: fidl::encoding::Depth,
13787        ) -> fidl::Result<()> {
13788            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIntervalResponse>(offset);
13789            unsafe {
13790                // Copy the object into the buffer.
13791                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13792                (buf_ptr as *mut StreamSocketGetTcpKeepAliveIntervalResponse).write_unaligned(
13793                    (self as *const StreamSocketGetTcpKeepAliveIntervalResponse).read(),
13794                );
13795                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13796                // done second because the memcpy will write garbage to these bytes.
13797            }
13798            Ok(())
13799        }
13800    }
13801    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13802        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIntervalResponse, D> for (T0,)
13803    {
13804        #[inline]
13805        unsafe fn encode(
13806            self,
13807            encoder: &mut fidl::encoding::Encoder<'_, D>,
13808            offset: usize,
13809            depth: fidl::encoding::Depth,
13810        ) -> fidl::Result<()> {
13811            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIntervalResponse>(offset);
13812            // Zero out padding regions. There's no need to apply masks
13813            // because the unmasked parts will be overwritten by fields.
13814            // Write the fields.
13815            self.0.encode(encoder, offset + 0, depth)?;
13816            Ok(())
13817        }
13818    }
13819
13820    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13821        for StreamSocketGetTcpKeepAliveIntervalResponse
13822    {
13823        #[inline(always)]
13824        fn new_empty() -> Self {
13825            Self { value_secs: fidl::new_empty!(u32, D) }
13826        }
13827
13828        #[inline]
13829        unsafe fn decode(
13830            &mut self,
13831            decoder: &mut fidl::encoding::Decoder<'_, D>,
13832            offset: usize,
13833            _depth: fidl::encoding::Depth,
13834        ) -> fidl::Result<()> {
13835            decoder.debug_check_bounds::<Self>(offset);
13836            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13837            // Verify that padding bytes are zero.
13838            // Copy from the buffer into the object.
13839            unsafe {
13840                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13841            }
13842            Ok(())
13843        }
13844    }
13845
13846    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpLingerResponse {
13847        type Borrowed<'a> = &'a Self;
13848        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13849            value
13850        }
13851    }
13852
13853    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpLingerResponse {
13854        type Owned = Self;
13855
13856        #[inline(always)]
13857        fn inline_align(_context: fidl::encoding::Context) -> usize {
13858            8
13859        }
13860
13861        #[inline(always)]
13862        fn inline_size(_context: fidl::encoding::Context) -> usize {
13863            16
13864        }
13865    }
13866
13867    unsafe impl<D: fidl::encoding::ResourceDialect>
13868        fidl::encoding::Encode<StreamSocketGetTcpLingerResponse, D>
13869        for &StreamSocketGetTcpLingerResponse
13870    {
13871        #[inline]
13872        unsafe fn encode(
13873            self,
13874            encoder: &mut fidl::encoding::Encoder<'_, D>,
13875            offset: usize,
13876            _depth: fidl::encoding::Depth,
13877        ) -> fidl::Result<()> {
13878            encoder.debug_check_bounds::<StreamSocketGetTcpLingerResponse>(offset);
13879            // Delegate to tuple encoding.
13880            fidl::encoding::Encode::<StreamSocketGetTcpLingerResponse, D>::encode(
13881                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value_secs),),
13882                encoder,
13883                offset,
13884                _depth,
13885            )
13886        }
13887    }
13888    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
13889        fidl::encoding::Encode<StreamSocketGetTcpLingerResponse, D> for (T0,)
13890    {
13891        #[inline]
13892        unsafe fn encode(
13893            self,
13894            encoder: &mut fidl::encoding::Encoder<'_, D>,
13895            offset: usize,
13896            depth: fidl::encoding::Depth,
13897        ) -> fidl::Result<()> {
13898            encoder.debug_check_bounds::<StreamSocketGetTcpLingerResponse>(offset);
13899            // Zero out padding regions. There's no need to apply masks
13900            // because the unmasked parts will be overwritten by fields.
13901            // Write the fields.
13902            self.0.encode(encoder, offset + 0, depth)?;
13903            Ok(())
13904        }
13905    }
13906
13907    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13908        for StreamSocketGetTcpLingerResponse
13909    {
13910        #[inline(always)]
13911        fn new_empty() -> Self {
13912            Self { value_secs: fidl::new_empty!(OptionalUint32, D) }
13913        }
13914
13915        #[inline]
13916        unsafe fn decode(
13917            &mut self,
13918            decoder: &mut fidl::encoding::Decoder<'_, D>,
13919            offset: usize,
13920            _depth: fidl::encoding::Depth,
13921        ) -> fidl::Result<()> {
13922            decoder.debug_check_bounds::<Self>(offset);
13923            // Verify that padding bytes are zero.
13924            fidl::decode!(OptionalUint32, D, &mut self.value_secs, decoder, offset + 0, _depth)?;
13925            Ok(())
13926        }
13927    }
13928
13929    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpMaxSegmentResponse {
13930        type Borrowed<'a> = &'a Self;
13931        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13932            value
13933        }
13934    }
13935
13936    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpMaxSegmentResponse {
13937        type Owned = Self;
13938
13939        #[inline(always)]
13940        fn inline_align(_context: fidl::encoding::Context) -> usize {
13941            4
13942        }
13943
13944        #[inline(always)]
13945        fn inline_size(_context: fidl::encoding::Context) -> usize {
13946            4
13947        }
13948        #[inline(always)]
13949        fn encode_is_copy() -> bool {
13950            true
13951        }
13952
13953        #[inline(always)]
13954        fn decode_is_copy() -> bool {
13955            true
13956        }
13957    }
13958
13959    unsafe impl<D: fidl::encoding::ResourceDialect>
13960        fidl::encoding::Encode<StreamSocketGetTcpMaxSegmentResponse, D>
13961        for &StreamSocketGetTcpMaxSegmentResponse
13962    {
13963        #[inline]
13964        unsafe fn encode(
13965            self,
13966            encoder: &mut fidl::encoding::Encoder<'_, D>,
13967            offset: usize,
13968            _depth: fidl::encoding::Depth,
13969        ) -> fidl::Result<()> {
13970            encoder.debug_check_bounds::<StreamSocketGetTcpMaxSegmentResponse>(offset);
13971            unsafe {
13972                // Copy the object into the buffer.
13973                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13974                (buf_ptr as *mut StreamSocketGetTcpMaxSegmentResponse)
13975                    .write_unaligned((self as *const StreamSocketGetTcpMaxSegmentResponse).read());
13976                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13977                // done second because the memcpy will write garbage to these bytes.
13978            }
13979            Ok(())
13980        }
13981    }
13982    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13983        fidl::encoding::Encode<StreamSocketGetTcpMaxSegmentResponse, D> for (T0,)
13984    {
13985        #[inline]
13986        unsafe fn encode(
13987            self,
13988            encoder: &mut fidl::encoding::Encoder<'_, D>,
13989            offset: usize,
13990            depth: fidl::encoding::Depth,
13991        ) -> fidl::Result<()> {
13992            encoder.debug_check_bounds::<StreamSocketGetTcpMaxSegmentResponse>(offset);
13993            // Zero out padding regions. There's no need to apply masks
13994            // because the unmasked parts will be overwritten by fields.
13995            // Write the fields.
13996            self.0.encode(encoder, offset + 0, depth)?;
13997            Ok(())
13998        }
13999    }
14000
14001    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14002        for StreamSocketGetTcpMaxSegmentResponse
14003    {
14004        #[inline(always)]
14005        fn new_empty() -> Self {
14006            Self { value_bytes: fidl::new_empty!(u32, D) }
14007        }
14008
14009        #[inline]
14010        unsafe fn decode(
14011            &mut self,
14012            decoder: &mut fidl::encoding::Decoder<'_, D>,
14013            offset: usize,
14014            _depth: fidl::encoding::Depth,
14015        ) -> fidl::Result<()> {
14016            decoder.debug_check_bounds::<Self>(offset);
14017            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14018            // Verify that padding bytes are zero.
14019            // Copy from the buffer into the object.
14020            unsafe {
14021                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14022            }
14023            Ok(())
14024        }
14025    }
14026
14027    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpNoDelayResponse {
14028        type Borrowed<'a> = &'a Self;
14029        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14030            value
14031        }
14032    }
14033
14034    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpNoDelayResponse {
14035        type Owned = Self;
14036
14037        #[inline(always)]
14038        fn inline_align(_context: fidl::encoding::Context) -> usize {
14039            1
14040        }
14041
14042        #[inline(always)]
14043        fn inline_size(_context: fidl::encoding::Context) -> usize {
14044            1
14045        }
14046    }
14047
14048    unsafe impl<D: fidl::encoding::ResourceDialect>
14049        fidl::encoding::Encode<StreamSocketGetTcpNoDelayResponse, D>
14050        for &StreamSocketGetTcpNoDelayResponse
14051    {
14052        #[inline]
14053        unsafe fn encode(
14054            self,
14055            encoder: &mut fidl::encoding::Encoder<'_, D>,
14056            offset: usize,
14057            _depth: fidl::encoding::Depth,
14058        ) -> fidl::Result<()> {
14059            encoder.debug_check_bounds::<StreamSocketGetTcpNoDelayResponse>(offset);
14060            // Delegate to tuple encoding.
14061            fidl::encoding::Encode::<StreamSocketGetTcpNoDelayResponse, D>::encode(
14062                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14063                encoder,
14064                offset,
14065                _depth,
14066            )
14067        }
14068    }
14069    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
14070        fidl::encoding::Encode<StreamSocketGetTcpNoDelayResponse, D> for (T0,)
14071    {
14072        #[inline]
14073        unsafe fn encode(
14074            self,
14075            encoder: &mut fidl::encoding::Encoder<'_, D>,
14076            offset: usize,
14077            depth: fidl::encoding::Depth,
14078        ) -> fidl::Result<()> {
14079            encoder.debug_check_bounds::<StreamSocketGetTcpNoDelayResponse>(offset);
14080            // Zero out padding regions. There's no need to apply masks
14081            // because the unmasked parts will be overwritten by fields.
14082            // Write the fields.
14083            self.0.encode(encoder, offset + 0, depth)?;
14084            Ok(())
14085        }
14086    }
14087
14088    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14089        for StreamSocketGetTcpNoDelayResponse
14090    {
14091        #[inline(always)]
14092        fn new_empty() -> Self {
14093            Self { value: fidl::new_empty!(bool, D) }
14094        }
14095
14096        #[inline]
14097        unsafe fn decode(
14098            &mut self,
14099            decoder: &mut fidl::encoding::Decoder<'_, D>,
14100            offset: usize,
14101            _depth: fidl::encoding::Depth,
14102        ) -> fidl::Result<()> {
14103            decoder.debug_check_bounds::<Self>(offset);
14104            // Verify that padding bytes are zero.
14105            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
14106            Ok(())
14107        }
14108    }
14109
14110    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpQuickAckResponse {
14111        type Borrowed<'a> = &'a Self;
14112        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14113            value
14114        }
14115    }
14116
14117    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpQuickAckResponse {
14118        type Owned = Self;
14119
14120        #[inline(always)]
14121        fn inline_align(_context: fidl::encoding::Context) -> usize {
14122            1
14123        }
14124
14125        #[inline(always)]
14126        fn inline_size(_context: fidl::encoding::Context) -> usize {
14127            1
14128        }
14129    }
14130
14131    unsafe impl<D: fidl::encoding::ResourceDialect>
14132        fidl::encoding::Encode<StreamSocketGetTcpQuickAckResponse, D>
14133        for &StreamSocketGetTcpQuickAckResponse
14134    {
14135        #[inline]
14136        unsafe fn encode(
14137            self,
14138            encoder: &mut fidl::encoding::Encoder<'_, D>,
14139            offset: usize,
14140            _depth: fidl::encoding::Depth,
14141        ) -> fidl::Result<()> {
14142            encoder.debug_check_bounds::<StreamSocketGetTcpQuickAckResponse>(offset);
14143            // Delegate to tuple encoding.
14144            fidl::encoding::Encode::<StreamSocketGetTcpQuickAckResponse, D>::encode(
14145                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14146                encoder,
14147                offset,
14148                _depth,
14149            )
14150        }
14151    }
14152    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
14153        fidl::encoding::Encode<StreamSocketGetTcpQuickAckResponse, D> for (T0,)
14154    {
14155        #[inline]
14156        unsafe fn encode(
14157            self,
14158            encoder: &mut fidl::encoding::Encoder<'_, D>,
14159            offset: usize,
14160            depth: fidl::encoding::Depth,
14161        ) -> fidl::Result<()> {
14162            encoder.debug_check_bounds::<StreamSocketGetTcpQuickAckResponse>(offset);
14163            // Zero out padding regions. There's no need to apply masks
14164            // because the unmasked parts will be overwritten by fields.
14165            // Write the fields.
14166            self.0.encode(encoder, offset + 0, depth)?;
14167            Ok(())
14168        }
14169    }
14170
14171    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14172        for StreamSocketGetTcpQuickAckResponse
14173    {
14174        #[inline(always)]
14175        fn new_empty() -> Self {
14176            Self { value: fidl::new_empty!(bool, D) }
14177        }
14178
14179        #[inline]
14180        unsafe fn decode(
14181            &mut self,
14182            decoder: &mut fidl::encoding::Decoder<'_, D>,
14183            offset: usize,
14184            _depth: fidl::encoding::Depth,
14185        ) -> fidl::Result<()> {
14186            decoder.debug_check_bounds::<Self>(offset);
14187            // Verify that padding bytes are zero.
14188            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
14189            Ok(())
14190        }
14191    }
14192
14193    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpSynCountResponse {
14194        type Borrowed<'a> = &'a Self;
14195        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14196            value
14197        }
14198    }
14199
14200    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpSynCountResponse {
14201        type Owned = Self;
14202
14203        #[inline(always)]
14204        fn inline_align(_context: fidl::encoding::Context) -> usize {
14205            4
14206        }
14207
14208        #[inline(always)]
14209        fn inline_size(_context: fidl::encoding::Context) -> usize {
14210            4
14211        }
14212        #[inline(always)]
14213        fn encode_is_copy() -> bool {
14214            true
14215        }
14216
14217        #[inline(always)]
14218        fn decode_is_copy() -> bool {
14219            true
14220        }
14221    }
14222
14223    unsafe impl<D: fidl::encoding::ResourceDialect>
14224        fidl::encoding::Encode<StreamSocketGetTcpSynCountResponse, D>
14225        for &StreamSocketGetTcpSynCountResponse
14226    {
14227        #[inline]
14228        unsafe fn encode(
14229            self,
14230            encoder: &mut fidl::encoding::Encoder<'_, D>,
14231            offset: usize,
14232            _depth: fidl::encoding::Depth,
14233        ) -> fidl::Result<()> {
14234            encoder.debug_check_bounds::<StreamSocketGetTcpSynCountResponse>(offset);
14235            unsafe {
14236                // Copy the object into the buffer.
14237                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14238                (buf_ptr as *mut StreamSocketGetTcpSynCountResponse)
14239                    .write_unaligned((self as *const StreamSocketGetTcpSynCountResponse).read());
14240                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14241                // done second because the memcpy will write garbage to these bytes.
14242            }
14243            Ok(())
14244        }
14245    }
14246    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
14247        fidl::encoding::Encode<StreamSocketGetTcpSynCountResponse, D> for (T0,)
14248    {
14249        #[inline]
14250        unsafe fn encode(
14251            self,
14252            encoder: &mut fidl::encoding::Encoder<'_, D>,
14253            offset: usize,
14254            depth: fidl::encoding::Depth,
14255        ) -> fidl::Result<()> {
14256            encoder.debug_check_bounds::<StreamSocketGetTcpSynCountResponse>(offset);
14257            // Zero out padding regions. There's no need to apply masks
14258            // because the unmasked parts will be overwritten by fields.
14259            // Write the fields.
14260            self.0.encode(encoder, offset + 0, depth)?;
14261            Ok(())
14262        }
14263    }
14264
14265    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14266        for StreamSocketGetTcpSynCountResponse
14267    {
14268        #[inline(always)]
14269        fn new_empty() -> Self {
14270            Self { value: fidl::new_empty!(u32, D) }
14271        }
14272
14273        #[inline]
14274        unsafe fn decode(
14275            &mut self,
14276            decoder: &mut fidl::encoding::Decoder<'_, D>,
14277            offset: usize,
14278            _depth: fidl::encoding::Depth,
14279        ) -> fidl::Result<()> {
14280            decoder.debug_check_bounds::<Self>(offset);
14281            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14282            // Verify that padding bytes are zero.
14283            // Copy from the buffer into the object.
14284            unsafe {
14285                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14286            }
14287            Ok(())
14288        }
14289    }
14290
14291    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpUserTimeoutResponse {
14292        type Borrowed<'a> = &'a Self;
14293        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14294            value
14295        }
14296    }
14297
14298    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpUserTimeoutResponse {
14299        type Owned = Self;
14300
14301        #[inline(always)]
14302        fn inline_align(_context: fidl::encoding::Context) -> usize {
14303            4
14304        }
14305
14306        #[inline(always)]
14307        fn inline_size(_context: fidl::encoding::Context) -> usize {
14308            4
14309        }
14310        #[inline(always)]
14311        fn encode_is_copy() -> bool {
14312            true
14313        }
14314
14315        #[inline(always)]
14316        fn decode_is_copy() -> bool {
14317            true
14318        }
14319    }
14320
14321    unsafe impl<D: fidl::encoding::ResourceDialect>
14322        fidl::encoding::Encode<StreamSocketGetTcpUserTimeoutResponse, D>
14323        for &StreamSocketGetTcpUserTimeoutResponse
14324    {
14325        #[inline]
14326        unsafe fn encode(
14327            self,
14328            encoder: &mut fidl::encoding::Encoder<'_, D>,
14329            offset: usize,
14330            _depth: fidl::encoding::Depth,
14331        ) -> fidl::Result<()> {
14332            encoder.debug_check_bounds::<StreamSocketGetTcpUserTimeoutResponse>(offset);
14333            unsafe {
14334                // Copy the object into the buffer.
14335                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14336                (buf_ptr as *mut StreamSocketGetTcpUserTimeoutResponse)
14337                    .write_unaligned((self as *const StreamSocketGetTcpUserTimeoutResponse).read());
14338                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14339                // done second because the memcpy will write garbage to these bytes.
14340            }
14341            Ok(())
14342        }
14343    }
14344    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
14345        fidl::encoding::Encode<StreamSocketGetTcpUserTimeoutResponse, D> for (T0,)
14346    {
14347        #[inline]
14348        unsafe fn encode(
14349            self,
14350            encoder: &mut fidl::encoding::Encoder<'_, D>,
14351            offset: usize,
14352            depth: fidl::encoding::Depth,
14353        ) -> fidl::Result<()> {
14354            encoder.debug_check_bounds::<StreamSocketGetTcpUserTimeoutResponse>(offset);
14355            // Zero out padding regions. There's no need to apply masks
14356            // because the unmasked parts will be overwritten by fields.
14357            // Write the fields.
14358            self.0.encode(encoder, offset + 0, depth)?;
14359            Ok(())
14360        }
14361    }
14362
14363    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14364        for StreamSocketGetTcpUserTimeoutResponse
14365    {
14366        #[inline(always)]
14367        fn new_empty() -> Self {
14368            Self { value_millis: fidl::new_empty!(u32, D) }
14369        }
14370
14371        #[inline]
14372        unsafe fn decode(
14373            &mut self,
14374            decoder: &mut fidl::encoding::Decoder<'_, D>,
14375            offset: usize,
14376            _depth: fidl::encoding::Depth,
14377        ) -> fidl::Result<()> {
14378            decoder.debug_check_bounds::<Self>(offset);
14379            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14380            // Verify that padding bytes are zero.
14381            // Copy from the buffer into the object.
14382            unsafe {
14383                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14384            }
14385            Ok(())
14386        }
14387    }
14388
14389    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpWindowClampResponse {
14390        type Borrowed<'a> = &'a Self;
14391        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14392            value
14393        }
14394    }
14395
14396    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpWindowClampResponse {
14397        type Owned = Self;
14398
14399        #[inline(always)]
14400        fn inline_align(_context: fidl::encoding::Context) -> usize {
14401            4
14402        }
14403
14404        #[inline(always)]
14405        fn inline_size(_context: fidl::encoding::Context) -> usize {
14406            4
14407        }
14408        #[inline(always)]
14409        fn encode_is_copy() -> bool {
14410            true
14411        }
14412
14413        #[inline(always)]
14414        fn decode_is_copy() -> bool {
14415            true
14416        }
14417    }
14418
14419    unsafe impl<D: fidl::encoding::ResourceDialect>
14420        fidl::encoding::Encode<StreamSocketGetTcpWindowClampResponse, D>
14421        for &StreamSocketGetTcpWindowClampResponse
14422    {
14423        #[inline]
14424        unsafe fn encode(
14425            self,
14426            encoder: &mut fidl::encoding::Encoder<'_, D>,
14427            offset: usize,
14428            _depth: fidl::encoding::Depth,
14429        ) -> fidl::Result<()> {
14430            encoder.debug_check_bounds::<StreamSocketGetTcpWindowClampResponse>(offset);
14431            unsafe {
14432                // Copy the object into the buffer.
14433                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14434                (buf_ptr as *mut StreamSocketGetTcpWindowClampResponse)
14435                    .write_unaligned((self as *const StreamSocketGetTcpWindowClampResponse).read());
14436                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14437                // done second because the memcpy will write garbage to these bytes.
14438            }
14439            Ok(())
14440        }
14441    }
14442    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
14443        fidl::encoding::Encode<StreamSocketGetTcpWindowClampResponse, D> for (T0,)
14444    {
14445        #[inline]
14446        unsafe fn encode(
14447            self,
14448            encoder: &mut fidl::encoding::Encoder<'_, D>,
14449            offset: usize,
14450            depth: fidl::encoding::Depth,
14451        ) -> fidl::Result<()> {
14452            encoder.debug_check_bounds::<StreamSocketGetTcpWindowClampResponse>(offset);
14453            // Zero out padding regions. There's no need to apply masks
14454            // because the unmasked parts will be overwritten by fields.
14455            // Write the fields.
14456            self.0.encode(encoder, offset + 0, depth)?;
14457            Ok(())
14458        }
14459    }
14460
14461    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14462        for StreamSocketGetTcpWindowClampResponse
14463    {
14464        #[inline(always)]
14465        fn new_empty() -> Self {
14466            Self { value: fidl::new_empty!(u32, D) }
14467        }
14468
14469        #[inline]
14470        unsafe fn decode(
14471            &mut self,
14472            decoder: &mut fidl::encoding::Decoder<'_, D>,
14473            offset: usize,
14474            _depth: fidl::encoding::Depth,
14475        ) -> fidl::Result<()> {
14476            decoder.debug_check_bounds::<Self>(offset);
14477            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14478            // Verify that padding bytes are zero.
14479            // Copy from the buffer into the object.
14480            unsafe {
14481                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14482            }
14483            Ok(())
14484        }
14485    }
14486
14487    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketRecvMsgRequest {
14488        type Borrowed<'a> = &'a Self;
14489        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14490            value
14491        }
14492    }
14493
14494    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketRecvMsgRequest {
14495        type Owned = Self;
14496
14497        #[inline(always)]
14498        fn inline_align(_context: fidl::encoding::Context) -> usize {
14499            4
14500        }
14501
14502        #[inline(always)]
14503        fn inline_size(_context: fidl::encoding::Context) -> usize {
14504            12
14505        }
14506    }
14507
14508    unsafe impl<D: fidl::encoding::ResourceDialect>
14509        fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgRequest, D>
14510        for &SynchronousDatagramSocketRecvMsgRequest
14511    {
14512        #[inline]
14513        unsafe fn encode(
14514            self,
14515            encoder: &mut fidl::encoding::Encoder<'_, D>,
14516            offset: usize,
14517            _depth: fidl::encoding::Depth,
14518        ) -> fidl::Result<()> {
14519            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgRequest>(offset);
14520            // Delegate to tuple encoding.
14521            fidl::encoding::Encode::<SynchronousDatagramSocketRecvMsgRequest, D>::encode(
14522                (
14523                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_addr),
14524                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data_len),
14525                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_control),
14526                    <RecvMsgFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
14527                ),
14528                encoder,
14529                offset,
14530                _depth,
14531            )
14532        }
14533    }
14534    unsafe impl<
14535            D: fidl::encoding::ResourceDialect,
14536            T0: fidl::encoding::Encode<bool, D>,
14537            T1: fidl::encoding::Encode<u32, D>,
14538            T2: fidl::encoding::Encode<bool, D>,
14539            T3: fidl::encoding::Encode<RecvMsgFlags, D>,
14540        > fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgRequest, D> for (T0, T1, T2, T3)
14541    {
14542        #[inline]
14543        unsafe fn encode(
14544            self,
14545            encoder: &mut fidl::encoding::Encoder<'_, D>,
14546            offset: usize,
14547            depth: fidl::encoding::Depth,
14548        ) -> fidl::Result<()> {
14549            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgRequest>(offset);
14550            // Zero out padding regions. There's no need to apply masks
14551            // because the unmasked parts will be overwritten by fields.
14552            unsafe {
14553                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
14554                (ptr as *mut u32).write_unaligned(0);
14555            }
14556            unsafe {
14557                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
14558                (ptr as *mut u32).write_unaligned(0);
14559            }
14560            // Write the fields.
14561            self.0.encode(encoder, offset + 0, depth)?;
14562            self.1.encode(encoder, offset + 4, depth)?;
14563            self.2.encode(encoder, offset + 8, depth)?;
14564            self.3.encode(encoder, offset + 10, depth)?;
14565            Ok(())
14566        }
14567    }
14568
14569    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14570        for SynchronousDatagramSocketRecvMsgRequest
14571    {
14572        #[inline(always)]
14573        fn new_empty() -> Self {
14574            Self {
14575                want_addr: fidl::new_empty!(bool, D),
14576                data_len: fidl::new_empty!(u32, D),
14577                want_control: fidl::new_empty!(bool, D),
14578                flags: fidl::new_empty!(RecvMsgFlags, D),
14579            }
14580        }
14581
14582        #[inline]
14583        unsafe fn decode(
14584            &mut self,
14585            decoder: &mut fidl::encoding::Decoder<'_, D>,
14586            offset: usize,
14587            _depth: fidl::encoding::Depth,
14588        ) -> fidl::Result<()> {
14589            decoder.debug_check_bounds::<Self>(offset);
14590            // Verify that padding bytes are zero.
14591            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
14592            let padval = unsafe { (ptr as *const u32).read_unaligned() };
14593            let mask = 0xffffff00u32;
14594            let maskedval = padval & mask;
14595            if maskedval != 0 {
14596                return Err(fidl::Error::NonZeroPadding {
14597                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
14598                });
14599            }
14600            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
14601            let padval = unsafe { (ptr as *const u32).read_unaligned() };
14602            let mask = 0xff00u32;
14603            let maskedval = padval & mask;
14604            if maskedval != 0 {
14605                return Err(fidl::Error::NonZeroPadding {
14606                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
14607                });
14608            }
14609            fidl::decode!(bool, D, &mut self.want_addr, decoder, offset + 0, _depth)?;
14610            fidl::decode!(u32, D, &mut self.data_len, decoder, offset + 4, _depth)?;
14611            fidl::decode!(bool, D, &mut self.want_control, decoder, offset + 8, _depth)?;
14612            fidl::decode!(RecvMsgFlags, D, &mut self.flags, decoder, offset + 10, _depth)?;
14613            Ok(())
14614        }
14615    }
14616
14617    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketSendMsgRequest {
14618        type Borrowed<'a> = &'a Self;
14619        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14620            value
14621        }
14622    }
14623
14624    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketSendMsgRequest {
14625        type Owned = Self;
14626
14627        #[inline(always)]
14628        fn inline_align(_context: fidl::encoding::Context) -> usize {
14629            8
14630        }
14631
14632        #[inline(always)]
14633        fn inline_size(_context: fidl::encoding::Context) -> usize {
14634            56
14635        }
14636    }
14637
14638    unsafe impl<D: fidl::encoding::ResourceDialect>
14639        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgRequest, D>
14640        for &SynchronousDatagramSocketSendMsgRequest
14641    {
14642        #[inline]
14643        unsafe fn encode(
14644            self,
14645            encoder: &mut fidl::encoding::Encoder<'_, D>,
14646            offset: usize,
14647            _depth: fidl::encoding::Depth,
14648        ) -> fidl::Result<()> {
14649            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgRequest>(offset);
14650            // Delegate to tuple encoding.
14651            fidl::encoding::Encode::<SynchronousDatagramSocketSendMsgRequest, D>::encode(
14652                (
14653                    <fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress> as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
14654                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
14655                    <DatagramSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow(&self.control),
14656                    <SendMsgFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
14657                ),
14658                encoder, offset, _depth
14659            )
14660        }
14661    }
14662    unsafe impl<
14663            D: fidl::encoding::ResourceDialect,
14664            T0: fidl::encoding::Encode<
14665                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14666                D,
14667            >,
14668            T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
14669            T2: fidl::encoding::Encode<DatagramSocketSendControlData, D>,
14670            T3: fidl::encoding::Encode<SendMsgFlags, D>,
14671        > fidl::encoding::Encode<SynchronousDatagramSocketSendMsgRequest, D> for (T0, T1, T2, T3)
14672    {
14673        #[inline]
14674        unsafe fn encode(
14675            self,
14676            encoder: &mut fidl::encoding::Encoder<'_, D>,
14677            offset: usize,
14678            depth: fidl::encoding::Depth,
14679        ) -> fidl::Result<()> {
14680            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgRequest>(offset);
14681            // Zero out padding regions. There's no need to apply masks
14682            // because the unmasked parts will be overwritten by fields.
14683            unsafe {
14684                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
14685                (ptr as *mut u64).write_unaligned(0);
14686            }
14687            // Write the fields.
14688            self.0.encode(encoder, offset + 0, depth)?;
14689            self.1.encode(encoder, offset + 16, depth)?;
14690            self.2.encode(encoder, offset + 32, depth)?;
14691            self.3.encode(encoder, offset + 48, depth)?;
14692            Ok(())
14693        }
14694    }
14695
14696    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14697        for SynchronousDatagramSocketSendMsgRequest
14698    {
14699        #[inline(always)]
14700        fn new_empty() -> Self {
14701            Self {
14702                addr: fidl::new_empty!(
14703                    fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14704                    D
14705                ),
14706                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
14707                control: fidl::new_empty!(DatagramSocketSendControlData, D),
14708                flags: fidl::new_empty!(SendMsgFlags, D),
14709            }
14710        }
14711
14712        #[inline]
14713        unsafe fn decode(
14714            &mut self,
14715            decoder: &mut fidl::encoding::Decoder<'_, D>,
14716            offset: usize,
14717            _depth: fidl::encoding::Depth,
14718        ) -> fidl::Result<()> {
14719            decoder.debug_check_bounds::<Self>(offset);
14720            // Verify that padding bytes are zero.
14721            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
14722            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14723            let mask = 0xffffffffffff0000u64;
14724            let maskedval = padval & mask;
14725            if maskedval != 0 {
14726                return Err(fidl::Error::NonZeroPadding {
14727                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
14728                });
14729            }
14730            fidl::decode!(
14731                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14732                D,
14733                &mut self.addr,
14734                decoder,
14735                offset + 0,
14736                _depth
14737            )?;
14738            fidl::decode!(
14739                fidl::encoding::UnboundedVector<u8>,
14740                D,
14741                &mut self.data,
14742                decoder,
14743                offset + 16,
14744                _depth
14745            )?;
14746            fidl::decode!(
14747                DatagramSocketSendControlData,
14748                D,
14749                &mut self.control,
14750                decoder,
14751                offset + 32,
14752                _depth
14753            )?;
14754            fidl::decode!(SendMsgFlags, D, &mut self.flags, decoder, offset + 48, _depth)?;
14755            Ok(())
14756        }
14757    }
14758
14759    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketRecvMsgResponse {
14760        type Borrowed<'a> = &'a Self;
14761        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14762            value
14763        }
14764    }
14765
14766    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketRecvMsgResponse {
14767        type Owned = Self;
14768
14769        #[inline(always)]
14770        fn inline_align(_context: fidl::encoding::Context) -> usize {
14771            8
14772        }
14773
14774        #[inline(always)]
14775        fn inline_size(_context: fidl::encoding::Context) -> usize {
14776            56
14777        }
14778    }
14779
14780    unsafe impl<D: fidl::encoding::ResourceDialect>
14781        fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgResponse, D>
14782        for &SynchronousDatagramSocketRecvMsgResponse
14783    {
14784        #[inline]
14785        unsafe fn encode(
14786            self,
14787            encoder: &mut fidl::encoding::Encoder<'_, D>,
14788            offset: usize,
14789            _depth: fidl::encoding::Depth,
14790        ) -> fidl::Result<()> {
14791            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgResponse>(offset);
14792            // Delegate to tuple encoding.
14793            fidl::encoding::Encode::<SynchronousDatagramSocketRecvMsgResponse, D>::encode(
14794                (
14795                    <fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress> as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
14796                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
14797                    <DatagramSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow(&self.control),
14798                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.truncated),
14799                ),
14800                encoder, offset, _depth
14801            )
14802        }
14803    }
14804    unsafe impl<
14805            D: fidl::encoding::ResourceDialect,
14806            T0: fidl::encoding::Encode<
14807                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14808                D,
14809            >,
14810            T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
14811            T2: fidl::encoding::Encode<DatagramSocketRecvControlData, D>,
14812            T3: fidl::encoding::Encode<u32, D>,
14813        > fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgResponse, D> for (T0, T1, T2, T3)
14814    {
14815        #[inline]
14816        unsafe fn encode(
14817            self,
14818            encoder: &mut fidl::encoding::Encoder<'_, D>,
14819            offset: usize,
14820            depth: fidl::encoding::Depth,
14821        ) -> fidl::Result<()> {
14822            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgResponse>(offset);
14823            // Zero out padding regions. There's no need to apply masks
14824            // because the unmasked parts will be overwritten by fields.
14825            unsafe {
14826                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
14827                (ptr as *mut u64).write_unaligned(0);
14828            }
14829            // Write the fields.
14830            self.0.encode(encoder, offset + 0, depth)?;
14831            self.1.encode(encoder, offset + 16, depth)?;
14832            self.2.encode(encoder, offset + 32, depth)?;
14833            self.3.encode(encoder, offset + 48, depth)?;
14834            Ok(())
14835        }
14836    }
14837
14838    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14839        for SynchronousDatagramSocketRecvMsgResponse
14840    {
14841        #[inline(always)]
14842        fn new_empty() -> Self {
14843            Self {
14844                addr: fidl::new_empty!(
14845                    fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14846                    D
14847                ),
14848                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
14849                control: fidl::new_empty!(DatagramSocketRecvControlData, D),
14850                truncated: fidl::new_empty!(u32, D),
14851            }
14852        }
14853
14854        #[inline]
14855        unsafe fn decode(
14856            &mut self,
14857            decoder: &mut fidl::encoding::Decoder<'_, D>,
14858            offset: usize,
14859            _depth: fidl::encoding::Depth,
14860        ) -> fidl::Result<()> {
14861            decoder.debug_check_bounds::<Self>(offset);
14862            // Verify that padding bytes are zero.
14863            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
14864            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14865            let mask = 0xffffffff00000000u64;
14866            let maskedval = padval & mask;
14867            if maskedval != 0 {
14868                return Err(fidl::Error::NonZeroPadding {
14869                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
14870                });
14871            }
14872            fidl::decode!(
14873                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14874                D,
14875                &mut self.addr,
14876                decoder,
14877                offset + 0,
14878                _depth
14879            )?;
14880            fidl::decode!(
14881                fidl::encoding::UnboundedVector<u8>,
14882                D,
14883                &mut self.data,
14884                decoder,
14885                offset + 16,
14886                _depth
14887            )?;
14888            fidl::decode!(
14889                DatagramSocketRecvControlData,
14890                D,
14891                &mut self.control,
14892                decoder,
14893                offset + 32,
14894                _depth
14895            )?;
14896            fidl::decode!(u32, D, &mut self.truncated, decoder, offset + 48, _depth)?;
14897            Ok(())
14898        }
14899    }
14900
14901    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketSendMsgResponse {
14902        type Borrowed<'a> = &'a Self;
14903        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14904            value
14905        }
14906    }
14907
14908    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketSendMsgResponse {
14909        type Owned = Self;
14910
14911        #[inline(always)]
14912        fn inline_align(_context: fidl::encoding::Context) -> usize {
14913            8
14914        }
14915
14916        #[inline(always)]
14917        fn inline_size(_context: fidl::encoding::Context) -> usize {
14918            8
14919        }
14920        #[inline(always)]
14921        fn encode_is_copy() -> bool {
14922            true
14923        }
14924
14925        #[inline(always)]
14926        fn decode_is_copy() -> bool {
14927            true
14928        }
14929    }
14930
14931    unsafe impl<D: fidl::encoding::ResourceDialect>
14932        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgResponse, D>
14933        for &SynchronousDatagramSocketSendMsgResponse
14934    {
14935        #[inline]
14936        unsafe fn encode(
14937            self,
14938            encoder: &mut fidl::encoding::Encoder<'_, D>,
14939            offset: usize,
14940            _depth: fidl::encoding::Depth,
14941        ) -> fidl::Result<()> {
14942            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgResponse>(offset);
14943            unsafe {
14944                // Copy the object into the buffer.
14945                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14946                (buf_ptr as *mut SynchronousDatagramSocketSendMsgResponse).write_unaligned(
14947                    (self as *const SynchronousDatagramSocketSendMsgResponse).read(),
14948                );
14949                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14950                // done second because the memcpy will write garbage to these bytes.
14951            }
14952            Ok(())
14953        }
14954    }
14955    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
14956        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgResponse, D> for (T0,)
14957    {
14958        #[inline]
14959        unsafe fn encode(
14960            self,
14961            encoder: &mut fidl::encoding::Encoder<'_, D>,
14962            offset: usize,
14963            depth: fidl::encoding::Depth,
14964        ) -> fidl::Result<()> {
14965            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgResponse>(offset);
14966            // Zero out padding regions. There's no need to apply masks
14967            // because the unmasked parts will be overwritten by fields.
14968            // Write the fields.
14969            self.0.encode(encoder, offset + 0, depth)?;
14970            Ok(())
14971        }
14972    }
14973
14974    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14975        for SynchronousDatagramSocketSendMsgResponse
14976    {
14977        #[inline(always)]
14978        fn new_empty() -> Self {
14979            Self { len: fidl::new_empty!(i64, D) }
14980        }
14981
14982        #[inline]
14983        unsafe fn decode(
14984            &mut self,
14985            decoder: &mut fidl::encoding::Decoder<'_, D>,
14986            offset: usize,
14987            _depth: fidl::encoding::Depth,
14988        ) -> fidl::Result<()> {
14989            decoder.debug_check_bounds::<Self>(offset);
14990            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14991            // Verify that padding bytes are zero.
14992            // Copy from the buffer into the object.
14993            unsafe {
14994                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
14995            }
14996            Ok(())
14997        }
14998    }
14999
15000    impl fidl::encoding::ValueTypeMarker for Timestamp {
15001        type Borrowed<'a> = &'a Self;
15002        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15003            value
15004        }
15005    }
15006
15007    unsafe impl fidl::encoding::TypeMarker for Timestamp {
15008        type Owned = Self;
15009
15010        #[inline(always)]
15011        fn inline_align(_context: fidl::encoding::Context) -> usize {
15012            8
15013        }
15014
15015        #[inline(always)]
15016        fn inline_size(_context: fidl::encoding::Context) -> usize {
15017            16
15018        }
15019    }
15020
15021    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Timestamp, D>
15022        for &Timestamp
15023    {
15024        #[inline]
15025        unsafe fn encode(
15026            self,
15027            encoder: &mut fidl::encoding::Encoder<'_, D>,
15028            offset: usize,
15029            _depth: fidl::encoding::Depth,
15030        ) -> fidl::Result<()> {
15031            encoder.debug_check_bounds::<Timestamp>(offset);
15032            // Delegate to tuple encoding.
15033            fidl::encoding::Encode::<Timestamp, D>::encode(
15034                (
15035                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.nanoseconds),
15036                    <TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.requested),
15037                ),
15038                encoder,
15039                offset,
15040                _depth,
15041            )
15042        }
15043    }
15044    unsafe impl<
15045            D: fidl::encoding::ResourceDialect,
15046            T0: fidl::encoding::Encode<i64, D>,
15047            T1: fidl::encoding::Encode<TimestampOption, D>,
15048        > fidl::encoding::Encode<Timestamp, D> for (T0, T1)
15049    {
15050        #[inline]
15051        unsafe fn encode(
15052            self,
15053            encoder: &mut fidl::encoding::Encoder<'_, D>,
15054            offset: usize,
15055            depth: fidl::encoding::Depth,
15056        ) -> fidl::Result<()> {
15057            encoder.debug_check_bounds::<Timestamp>(offset);
15058            // Zero out padding regions. There's no need to apply masks
15059            // because the unmasked parts will be overwritten by fields.
15060            unsafe {
15061                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
15062                (ptr as *mut u64).write_unaligned(0);
15063            }
15064            // Write the fields.
15065            self.0.encode(encoder, offset + 0, depth)?;
15066            self.1.encode(encoder, offset + 8, depth)?;
15067            Ok(())
15068        }
15069    }
15070
15071    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Timestamp {
15072        #[inline(always)]
15073        fn new_empty() -> Self {
15074            Self {
15075                nanoseconds: fidl::new_empty!(i64, D),
15076                requested: fidl::new_empty!(TimestampOption, D),
15077            }
15078        }
15079
15080        #[inline]
15081        unsafe fn decode(
15082            &mut self,
15083            decoder: &mut fidl::encoding::Decoder<'_, D>,
15084            offset: usize,
15085            _depth: fidl::encoding::Depth,
15086        ) -> fidl::Result<()> {
15087            decoder.debug_check_bounds::<Self>(offset);
15088            // Verify that padding bytes are zero.
15089            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
15090            let padval = unsafe { (ptr as *const u64).read_unaligned() };
15091            let mask = 0xffffffff00000000u64;
15092            let maskedval = padval & mask;
15093            if maskedval != 0 {
15094                return Err(fidl::Error::NonZeroPadding {
15095                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
15096                });
15097            }
15098            fidl::decode!(i64, D, &mut self.nanoseconds, decoder, offset + 0, _depth)?;
15099            fidl::decode!(TimestampOption, D, &mut self.requested, decoder, offset + 8, _depth)?;
15100            Ok(())
15101        }
15102    }
15103
15104    impl DatagramSocketRecvControlData {
15105        #[inline(always)]
15106        fn max_ordinal_present(&self) -> u64 {
15107            if let Some(_) = self.network {
15108                return 1;
15109            }
15110            0
15111        }
15112    }
15113
15114    impl fidl::encoding::ValueTypeMarker for DatagramSocketRecvControlData {
15115        type Borrowed<'a> = &'a Self;
15116        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15117            value
15118        }
15119    }
15120
15121    unsafe impl fidl::encoding::TypeMarker for DatagramSocketRecvControlData {
15122        type Owned = Self;
15123
15124        #[inline(always)]
15125        fn inline_align(_context: fidl::encoding::Context) -> usize {
15126            8
15127        }
15128
15129        #[inline(always)]
15130        fn inline_size(_context: fidl::encoding::Context) -> usize {
15131            16
15132        }
15133    }
15134
15135    unsafe impl<D: fidl::encoding::ResourceDialect>
15136        fidl::encoding::Encode<DatagramSocketRecvControlData, D>
15137        for &DatagramSocketRecvControlData
15138    {
15139        unsafe fn encode(
15140            self,
15141            encoder: &mut fidl::encoding::Encoder<'_, D>,
15142            offset: usize,
15143            mut depth: fidl::encoding::Depth,
15144        ) -> fidl::Result<()> {
15145            encoder.debug_check_bounds::<DatagramSocketRecvControlData>(offset);
15146            // Vector header
15147            let max_ordinal: u64 = self.max_ordinal_present();
15148            encoder.write_num(max_ordinal, offset);
15149            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15150            // Calling encoder.out_of_line_offset(0) is not allowed.
15151            if max_ordinal == 0 {
15152                return Ok(());
15153            }
15154            depth.increment()?;
15155            let envelope_size = 8;
15156            let bytes_len = max_ordinal as usize * envelope_size;
15157            #[allow(unused_variables)]
15158            let offset = encoder.out_of_line_offset(bytes_len);
15159            let mut _prev_end_offset: usize = 0;
15160            if 1 > max_ordinal {
15161                return Ok(());
15162            }
15163
15164            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15165            // are envelope_size bytes.
15166            let cur_offset: usize = (1 - 1) * envelope_size;
15167
15168            // Zero reserved fields.
15169            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15170
15171            // Safety:
15172            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15173            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15174            //   envelope_size bytes, there is always sufficient room.
15175            fidl::encoding::encode_in_envelope_optional::<NetworkSocketRecvControlData, D>(
15176                self.network
15177                    .as_ref()
15178                    .map(<NetworkSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
15179                encoder,
15180                offset + cur_offset,
15181                depth,
15182            )?;
15183
15184            _prev_end_offset = cur_offset + envelope_size;
15185
15186            Ok(())
15187        }
15188    }
15189
15190    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15191        for DatagramSocketRecvControlData
15192    {
15193        #[inline(always)]
15194        fn new_empty() -> Self {
15195            Self::default()
15196        }
15197
15198        unsafe fn decode(
15199            &mut self,
15200            decoder: &mut fidl::encoding::Decoder<'_, D>,
15201            offset: usize,
15202            mut depth: fidl::encoding::Depth,
15203        ) -> fidl::Result<()> {
15204            decoder.debug_check_bounds::<Self>(offset);
15205            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15206                None => return Err(fidl::Error::NotNullable),
15207                Some(len) => len,
15208            };
15209            // Calling decoder.out_of_line_offset(0) is not allowed.
15210            if len == 0 {
15211                return Ok(());
15212            };
15213            depth.increment()?;
15214            let envelope_size = 8;
15215            let bytes_len = len * envelope_size;
15216            let offset = decoder.out_of_line_offset(bytes_len)?;
15217            // Decode the envelope for each type.
15218            let mut _next_ordinal_to_read = 0;
15219            let mut next_offset = offset;
15220            let end_offset = offset + bytes_len;
15221            _next_ordinal_to_read += 1;
15222            if next_offset >= end_offset {
15223                return Ok(());
15224            }
15225
15226            // Decode unknown envelopes for gaps in ordinals.
15227            while _next_ordinal_to_read < 1 {
15228                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15229                _next_ordinal_to_read += 1;
15230                next_offset += envelope_size;
15231            }
15232
15233            let next_out_of_line = decoder.next_out_of_line();
15234            let handles_before = decoder.remaining_handles();
15235            if let Some((inlined, num_bytes, num_handles)) =
15236                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15237            {
15238                let member_inline_size =
15239                    <NetworkSocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
15240                        decoder.context,
15241                    );
15242                if inlined != (member_inline_size <= 4) {
15243                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15244                }
15245                let inner_offset;
15246                let mut inner_depth = depth.clone();
15247                if inlined {
15248                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15249                    inner_offset = next_offset;
15250                } else {
15251                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15252                    inner_depth.increment()?;
15253                }
15254                let val_ref = self
15255                    .network
15256                    .get_or_insert_with(|| fidl::new_empty!(NetworkSocketRecvControlData, D));
15257                fidl::decode!(
15258                    NetworkSocketRecvControlData,
15259                    D,
15260                    val_ref,
15261                    decoder,
15262                    inner_offset,
15263                    inner_depth
15264                )?;
15265                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15266                {
15267                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15268                }
15269                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15270                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15271                }
15272            }
15273
15274            next_offset += envelope_size;
15275
15276            // Decode the remaining unknown envelopes.
15277            while next_offset < end_offset {
15278                _next_ordinal_to_read += 1;
15279                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15280                next_offset += envelope_size;
15281            }
15282
15283            Ok(())
15284        }
15285    }
15286
15287    impl DatagramSocketSendControlData {
15288        #[inline(always)]
15289        fn max_ordinal_present(&self) -> u64 {
15290            if let Some(_) = self.network {
15291                return 1;
15292            }
15293            0
15294        }
15295    }
15296
15297    impl fidl::encoding::ValueTypeMarker for DatagramSocketSendControlData {
15298        type Borrowed<'a> = &'a Self;
15299        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15300            value
15301        }
15302    }
15303
15304    unsafe impl fidl::encoding::TypeMarker for DatagramSocketSendControlData {
15305        type Owned = Self;
15306
15307        #[inline(always)]
15308        fn inline_align(_context: fidl::encoding::Context) -> usize {
15309            8
15310        }
15311
15312        #[inline(always)]
15313        fn inline_size(_context: fidl::encoding::Context) -> usize {
15314            16
15315        }
15316    }
15317
15318    unsafe impl<D: fidl::encoding::ResourceDialect>
15319        fidl::encoding::Encode<DatagramSocketSendControlData, D>
15320        for &DatagramSocketSendControlData
15321    {
15322        unsafe fn encode(
15323            self,
15324            encoder: &mut fidl::encoding::Encoder<'_, D>,
15325            offset: usize,
15326            mut depth: fidl::encoding::Depth,
15327        ) -> fidl::Result<()> {
15328            encoder.debug_check_bounds::<DatagramSocketSendControlData>(offset);
15329            // Vector header
15330            let max_ordinal: u64 = self.max_ordinal_present();
15331            encoder.write_num(max_ordinal, offset);
15332            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15333            // Calling encoder.out_of_line_offset(0) is not allowed.
15334            if max_ordinal == 0 {
15335                return Ok(());
15336            }
15337            depth.increment()?;
15338            let envelope_size = 8;
15339            let bytes_len = max_ordinal as usize * envelope_size;
15340            #[allow(unused_variables)]
15341            let offset = encoder.out_of_line_offset(bytes_len);
15342            let mut _prev_end_offset: usize = 0;
15343            if 1 > max_ordinal {
15344                return Ok(());
15345            }
15346
15347            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15348            // are envelope_size bytes.
15349            let cur_offset: usize = (1 - 1) * envelope_size;
15350
15351            // Zero reserved fields.
15352            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15353
15354            // Safety:
15355            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15356            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15357            //   envelope_size bytes, there is always sufficient room.
15358            fidl::encoding::encode_in_envelope_optional::<NetworkSocketSendControlData, D>(
15359                self.network
15360                    .as_ref()
15361                    .map(<NetworkSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
15362                encoder,
15363                offset + cur_offset,
15364                depth,
15365            )?;
15366
15367            _prev_end_offset = cur_offset + envelope_size;
15368
15369            Ok(())
15370        }
15371    }
15372
15373    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15374        for DatagramSocketSendControlData
15375    {
15376        #[inline(always)]
15377        fn new_empty() -> Self {
15378            Self::default()
15379        }
15380
15381        unsafe fn decode(
15382            &mut self,
15383            decoder: &mut fidl::encoding::Decoder<'_, D>,
15384            offset: usize,
15385            mut depth: fidl::encoding::Depth,
15386        ) -> fidl::Result<()> {
15387            decoder.debug_check_bounds::<Self>(offset);
15388            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15389                None => return Err(fidl::Error::NotNullable),
15390                Some(len) => len,
15391            };
15392            // Calling decoder.out_of_line_offset(0) is not allowed.
15393            if len == 0 {
15394                return Ok(());
15395            };
15396            depth.increment()?;
15397            let envelope_size = 8;
15398            let bytes_len = len * envelope_size;
15399            let offset = decoder.out_of_line_offset(bytes_len)?;
15400            // Decode the envelope for each type.
15401            let mut _next_ordinal_to_read = 0;
15402            let mut next_offset = offset;
15403            let end_offset = offset + bytes_len;
15404            _next_ordinal_to_read += 1;
15405            if next_offset >= end_offset {
15406                return Ok(());
15407            }
15408
15409            // Decode unknown envelopes for gaps in ordinals.
15410            while _next_ordinal_to_read < 1 {
15411                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15412                _next_ordinal_to_read += 1;
15413                next_offset += envelope_size;
15414            }
15415
15416            let next_out_of_line = decoder.next_out_of_line();
15417            let handles_before = decoder.remaining_handles();
15418            if let Some((inlined, num_bytes, num_handles)) =
15419                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15420            {
15421                let member_inline_size =
15422                    <NetworkSocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
15423                        decoder.context,
15424                    );
15425                if inlined != (member_inline_size <= 4) {
15426                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15427                }
15428                let inner_offset;
15429                let mut inner_depth = depth.clone();
15430                if inlined {
15431                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15432                    inner_offset = next_offset;
15433                } else {
15434                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15435                    inner_depth.increment()?;
15436                }
15437                let val_ref = self
15438                    .network
15439                    .get_or_insert_with(|| fidl::new_empty!(NetworkSocketSendControlData, D));
15440                fidl::decode!(
15441                    NetworkSocketSendControlData,
15442                    D,
15443                    val_ref,
15444                    decoder,
15445                    inner_offset,
15446                    inner_depth
15447                )?;
15448                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15449                {
15450                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15451                }
15452                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15453                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15454                }
15455            }
15456
15457            next_offset += envelope_size;
15458
15459            // Decode the remaining unknown envelopes.
15460            while next_offset < end_offset {
15461                _next_ordinal_to_read += 1;
15462                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15463                next_offset += envelope_size;
15464            }
15465
15466            Ok(())
15467        }
15468    }
15469
15470    impl DatagramSocketSendMsgPreflightRequest {
15471        #[inline(always)]
15472        fn max_ordinal_present(&self) -> u64 {
15473            if let Some(_) = self.ipv6_pktinfo {
15474                return 2;
15475            }
15476            if let Some(_) = self.to {
15477                return 1;
15478            }
15479            0
15480        }
15481    }
15482
15483    impl fidl::encoding::ValueTypeMarker for DatagramSocketSendMsgPreflightRequest {
15484        type Borrowed<'a> = &'a Self;
15485        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15486            value
15487        }
15488    }
15489
15490    unsafe impl fidl::encoding::TypeMarker for DatagramSocketSendMsgPreflightRequest {
15491        type Owned = Self;
15492
15493        #[inline(always)]
15494        fn inline_align(_context: fidl::encoding::Context) -> usize {
15495            8
15496        }
15497
15498        #[inline(always)]
15499        fn inline_size(_context: fidl::encoding::Context) -> usize {
15500            16
15501        }
15502    }
15503
15504    unsafe impl<D: fidl::encoding::ResourceDialect>
15505        fidl::encoding::Encode<DatagramSocketSendMsgPreflightRequest, D>
15506        for &DatagramSocketSendMsgPreflightRequest
15507    {
15508        unsafe fn encode(
15509            self,
15510            encoder: &mut fidl::encoding::Encoder<'_, D>,
15511            offset: usize,
15512            mut depth: fidl::encoding::Depth,
15513        ) -> fidl::Result<()> {
15514            encoder.debug_check_bounds::<DatagramSocketSendMsgPreflightRequest>(offset);
15515            // Vector header
15516            let max_ordinal: u64 = self.max_ordinal_present();
15517            encoder.write_num(max_ordinal, offset);
15518            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15519            // Calling encoder.out_of_line_offset(0) is not allowed.
15520            if max_ordinal == 0 {
15521                return Ok(());
15522            }
15523            depth.increment()?;
15524            let envelope_size = 8;
15525            let bytes_len = max_ordinal as usize * envelope_size;
15526            #[allow(unused_variables)]
15527            let offset = encoder.out_of_line_offset(bytes_len);
15528            let mut _prev_end_offset: usize = 0;
15529            if 1 > max_ordinal {
15530                return Ok(());
15531            }
15532
15533            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15534            // are envelope_size bytes.
15535            let cur_offset: usize = (1 - 1) * envelope_size;
15536
15537            // Zero reserved fields.
15538            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15539
15540            // Safety:
15541            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15542            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15543            //   envelope_size bytes, there is always sufficient room.
15544            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
15545            self.to.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
15546            encoder, offset + cur_offset, depth
15547        )?;
15548
15549            _prev_end_offset = cur_offset + envelope_size;
15550            if 2 > max_ordinal {
15551                return Ok(());
15552            }
15553
15554            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15555            // are envelope_size bytes.
15556            let cur_offset: usize = (2 - 1) * envelope_size;
15557
15558            // Zero reserved fields.
15559            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15560
15561            // Safety:
15562            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15563            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15564            //   envelope_size bytes, there is always sufficient room.
15565            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoSendControlData, D>(
15566                self.ipv6_pktinfo
15567                    .as_ref()
15568                    .map(<Ipv6PktInfoSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
15569                encoder,
15570                offset + cur_offset,
15571                depth,
15572            )?;
15573
15574            _prev_end_offset = cur_offset + envelope_size;
15575
15576            Ok(())
15577        }
15578    }
15579
15580    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15581        for DatagramSocketSendMsgPreflightRequest
15582    {
15583        #[inline(always)]
15584        fn new_empty() -> Self {
15585            Self::default()
15586        }
15587
15588        unsafe fn decode(
15589            &mut self,
15590            decoder: &mut fidl::encoding::Decoder<'_, D>,
15591            offset: usize,
15592            mut depth: fidl::encoding::Depth,
15593        ) -> fidl::Result<()> {
15594            decoder.debug_check_bounds::<Self>(offset);
15595            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15596                None => return Err(fidl::Error::NotNullable),
15597                Some(len) => len,
15598            };
15599            // Calling decoder.out_of_line_offset(0) is not allowed.
15600            if len == 0 {
15601                return Ok(());
15602            };
15603            depth.increment()?;
15604            let envelope_size = 8;
15605            let bytes_len = len * envelope_size;
15606            let offset = decoder.out_of_line_offset(bytes_len)?;
15607            // Decode the envelope for each type.
15608            let mut _next_ordinal_to_read = 0;
15609            let mut next_offset = offset;
15610            let end_offset = offset + bytes_len;
15611            _next_ordinal_to_read += 1;
15612            if next_offset >= end_offset {
15613                return Ok(());
15614            }
15615
15616            // Decode unknown envelopes for gaps in ordinals.
15617            while _next_ordinal_to_read < 1 {
15618                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15619                _next_ordinal_to_read += 1;
15620                next_offset += envelope_size;
15621            }
15622
15623            let next_out_of_line = decoder.next_out_of_line();
15624            let handles_before = decoder.remaining_handles();
15625            if let Some((inlined, num_bytes, num_handles)) =
15626                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15627            {
15628                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15629                if inlined != (member_inline_size <= 4) {
15630                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15631                }
15632                let inner_offset;
15633                let mut inner_depth = depth.clone();
15634                if inlined {
15635                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15636                    inner_offset = next_offset;
15637                } else {
15638                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15639                    inner_depth.increment()?;
15640                }
15641                let val_ref = self.to.get_or_insert_with(|| {
15642                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
15643                });
15644                fidl::decode!(
15645                    fidl_fuchsia_net__common::SocketAddress,
15646                    D,
15647                    val_ref,
15648                    decoder,
15649                    inner_offset,
15650                    inner_depth
15651                )?;
15652                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15653                {
15654                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15655                }
15656                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15657                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15658                }
15659            }
15660
15661            next_offset += envelope_size;
15662            _next_ordinal_to_read += 1;
15663            if next_offset >= end_offset {
15664                return Ok(());
15665            }
15666
15667            // Decode unknown envelopes for gaps in ordinals.
15668            while _next_ordinal_to_read < 2 {
15669                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15670                _next_ordinal_to_read += 1;
15671                next_offset += envelope_size;
15672            }
15673
15674            let next_out_of_line = decoder.next_out_of_line();
15675            let handles_before = decoder.remaining_handles();
15676            if let Some((inlined, num_bytes, num_handles)) =
15677                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15678            {
15679                let member_inline_size =
15680                    <Ipv6PktInfoSendControlData as fidl::encoding::TypeMarker>::inline_size(
15681                        decoder.context,
15682                    );
15683                if inlined != (member_inline_size <= 4) {
15684                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15685                }
15686                let inner_offset;
15687                let mut inner_depth = depth.clone();
15688                if inlined {
15689                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15690                    inner_offset = next_offset;
15691                } else {
15692                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15693                    inner_depth.increment()?;
15694                }
15695                let val_ref = self
15696                    .ipv6_pktinfo
15697                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoSendControlData, D));
15698                fidl::decode!(
15699                    Ipv6PktInfoSendControlData,
15700                    D,
15701                    val_ref,
15702                    decoder,
15703                    inner_offset,
15704                    inner_depth
15705                )?;
15706                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15707                {
15708                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15709                }
15710                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15711                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15712                }
15713            }
15714
15715            next_offset += envelope_size;
15716
15717            // Decode the remaining unknown envelopes.
15718            while next_offset < end_offset {
15719                _next_ordinal_to_read += 1;
15720                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15721                next_offset += envelope_size;
15722            }
15723
15724            Ok(())
15725        }
15726    }
15727
15728    impl InterfaceAddresses {
15729        #[inline(always)]
15730        fn max_ordinal_present(&self) -> u64 {
15731            if let Some(_) = self.interface_flags {
15732                return 5;
15733            }
15734            if let Some(_) = self.addresses {
15735                return 4;
15736            }
15737            if let Some(_) = self.name {
15738                return 2;
15739            }
15740            if let Some(_) = self.id {
15741                return 1;
15742            }
15743            0
15744        }
15745    }
15746
15747    impl fidl::encoding::ValueTypeMarker for InterfaceAddresses {
15748        type Borrowed<'a> = &'a Self;
15749        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15750            value
15751        }
15752    }
15753
15754    unsafe impl fidl::encoding::TypeMarker for InterfaceAddresses {
15755        type Owned = Self;
15756
15757        #[inline(always)]
15758        fn inline_align(_context: fidl::encoding::Context) -> usize {
15759            8
15760        }
15761
15762        #[inline(always)]
15763        fn inline_size(_context: fidl::encoding::Context) -> usize {
15764            16
15765        }
15766    }
15767
15768    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InterfaceAddresses, D>
15769        for &InterfaceAddresses
15770    {
15771        unsafe fn encode(
15772            self,
15773            encoder: &mut fidl::encoding::Encoder<'_, D>,
15774            offset: usize,
15775            mut depth: fidl::encoding::Depth,
15776        ) -> fidl::Result<()> {
15777            encoder.debug_check_bounds::<InterfaceAddresses>(offset);
15778            // Vector header
15779            let max_ordinal: u64 = self.max_ordinal_present();
15780            encoder.write_num(max_ordinal, offset);
15781            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15782            // Calling encoder.out_of_line_offset(0) is not allowed.
15783            if max_ordinal == 0 {
15784                return Ok(());
15785            }
15786            depth.increment()?;
15787            let envelope_size = 8;
15788            let bytes_len = max_ordinal as usize * envelope_size;
15789            #[allow(unused_variables)]
15790            let offset = encoder.out_of_line_offset(bytes_len);
15791            let mut _prev_end_offset: usize = 0;
15792            if 1 > max_ordinal {
15793                return Ok(());
15794            }
15795
15796            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15797            // are envelope_size bytes.
15798            let cur_offset: usize = (1 - 1) * envelope_size;
15799
15800            // Zero reserved fields.
15801            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15802
15803            // Safety:
15804            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15805            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15806            //   envelope_size bytes, there is always sufficient room.
15807            fidl::encoding::encode_in_envelope_optional::<u64, D>(
15808                self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
15809                encoder,
15810                offset + cur_offset,
15811                depth,
15812            )?;
15813
15814            _prev_end_offset = cur_offset + envelope_size;
15815            if 2 > max_ordinal {
15816                return Ok(());
15817            }
15818
15819            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15820            // are envelope_size bytes.
15821            let cur_offset: usize = (2 - 1) * envelope_size;
15822
15823            // Zero reserved fields.
15824            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15825
15826            // Safety:
15827            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15828            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15829            //   envelope_size bytes, there is always sufficient room.
15830            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<15>, D>(
15831                self.name.as_ref().map(
15832                    <fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow,
15833                ),
15834                encoder,
15835                offset + cur_offset,
15836                depth,
15837            )?;
15838
15839            _prev_end_offset = cur_offset + envelope_size;
15840            if 4 > max_ordinal {
15841                return Ok(());
15842            }
15843
15844            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15845            // are envelope_size bytes.
15846            let cur_offset: usize = (4 - 1) * envelope_size;
15847
15848            // Zero reserved fields.
15849            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15850
15851            // Safety:
15852            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15853            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15854            //   envelope_size bytes, there is always sufficient room.
15855            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>, D>(
15856            self.addresses.as_ref().map(<fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet> as fidl::encoding::ValueTypeMarker>::borrow),
15857            encoder, offset + cur_offset, depth
15858        )?;
15859
15860            _prev_end_offset = cur_offset + envelope_size;
15861            if 5 > max_ordinal {
15862                return Ok(());
15863            }
15864
15865            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15866            // are envelope_size bytes.
15867            let cur_offset: usize = (5 - 1) * envelope_size;
15868
15869            // Zero reserved fields.
15870            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15871
15872            // Safety:
15873            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15874            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15875            //   envelope_size bytes, there is always sufficient room.
15876            fidl::encoding::encode_in_envelope_optional::<InterfaceFlags, D>(
15877                self.interface_flags
15878                    .as_ref()
15879                    .map(<InterfaceFlags as fidl::encoding::ValueTypeMarker>::borrow),
15880                encoder,
15881                offset + cur_offset,
15882                depth,
15883            )?;
15884
15885            _prev_end_offset = cur_offset + envelope_size;
15886
15887            Ok(())
15888        }
15889    }
15890
15891    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceAddresses {
15892        #[inline(always)]
15893        fn new_empty() -> Self {
15894            Self::default()
15895        }
15896
15897        unsafe fn decode(
15898            &mut self,
15899            decoder: &mut fidl::encoding::Decoder<'_, D>,
15900            offset: usize,
15901            mut depth: fidl::encoding::Depth,
15902        ) -> fidl::Result<()> {
15903            decoder.debug_check_bounds::<Self>(offset);
15904            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15905                None => return Err(fidl::Error::NotNullable),
15906                Some(len) => len,
15907            };
15908            // Calling decoder.out_of_line_offset(0) is not allowed.
15909            if len == 0 {
15910                return Ok(());
15911            };
15912            depth.increment()?;
15913            let envelope_size = 8;
15914            let bytes_len = len * envelope_size;
15915            let offset = decoder.out_of_line_offset(bytes_len)?;
15916            // Decode the envelope for each type.
15917            let mut _next_ordinal_to_read = 0;
15918            let mut next_offset = offset;
15919            let end_offset = offset + bytes_len;
15920            _next_ordinal_to_read += 1;
15921            if next_offset >= end_offset {
15922                return Ok(());
15923            }
15924
15925            // Decode unknown envelopes for gaps in ordinals.
15926            while _next_ordinal_to_read < 1 {
15927                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15928                _next_ordinal_to_read += 1;
15929                next_offset += envelope_size;
15930            }
15931
15932            let next_out_of_line = decoder.next_out_of_line();
15933            let handles_before = decoder.remaining_handles();
15934            if let Some((inlined, num_bytes, num_handles)) =
15935                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15936            {
15937                let member_inline_size =
15938                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15939                if inlined != (member_inline_size <= 4) {
15940                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15941                }
15942                let inner_offset;
15943                let mut inner_depth = depth.clone();
15944                if inlined {
15945                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15946                    inner_offset = next_offset;
15947                } else {
15948                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15949                    inner_depth.increment()?;
15950                }
15951                let val_ref = self.id.get_or_insert_with(|| fidl::new_empty!(u64, D));
15952                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
15953                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15954                {
15955                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15956                }
15957                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15958                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15959                }
15960            }
15961
15962            next_offset += envelope_size;
15963            _next_ordinal_to_read += 1;
15964            if next_offset >= end_offset {
15965                return Ok(());
15966            }
15967
15968            // Decode unknown envelopes for gaps in ordinals.
15969            while _next_ordinal_to_read < 2 {
15970                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15971                _next_ordinal_to_read += 1;
15972                next_offset += envelope_size;
15973            }
15974
15975            let next_out_of_line = decoder.next_out_of_line();
15976            let handles_before = decoder.remaining_handles();
15977            if let Some((inlined, num_bytes, num_handles)) =
15978                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15979            {
15980                let member_inline_size =
15981                    <fidl::encoding::BoundedString<15> as fidl::encoding::TypeMarker>::inline_size(
15982                        decoder.context,
15983                    );
15984                if inlined != (member_inline_size <= 4) {
15985                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15986                }
15987                let inner_offset;
15988                let mut inner_depth = depth.clone();
15989                if inlined {
15990                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15991                    inner_offset = next_offset;
15992                } else {
15993                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15994                    inner_depth.increment()?;
15995                }
15996                let val_ref = self
15997                    .name
15998                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<15>, D));
15999                fidl::decode!(
16000                    fidl::encoding::BoundedString<15>,
16001                    D,
16002                    val_ref,
16003                    decoder,
16004                    inner_offset,
16005                    inner_depth
16006                )?;
16007                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16008                {
16009                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16010                }
16011                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16012                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16013                }
16014            }
16015
16016            next_offset += envelope_size;
16017            _next_ordinal_to_read += 1;
16018            if next_offset >= end_offset {
16019                return Ok(());
16020            }
16021
16022            // Decode unknown envelopes for gaps in ordinals.
16023            while _next_ordinal_to_read < 4 {
16024                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16025                _next_ordinal_to_read += 1;
16026                next_offset += envelope_size;
16027            }
16028
16029            let next_out_of_line = decoder.next_out_of_line();
16030            let handles_before = decoder.remaining_handles();
16031            if let Some((inlined, num_bytes, num_handles)) =
16032                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16033            {
16034                let member_inline_size = <fidl::encoding::UnboundedVector<
16035                    fidl_fuchsia_net__common::Subnet,
16036                > as fidl::encoding::TypeMarker>::inline_size(
16037                    decoder.context
16038                );
16039                if inlined != (member_inline_size <= 4) {
16040                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16041                }
16042                let inner_offset;
16043                let mut inner_depth = depth.clone();
16044                if inlined {
16045                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16046                    inner_offset = next_offset;
16047                } else {
16048                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16049                    inner_depth.increment()?;
16050                }
16051                let val_ref = self.addresses.get_or_insert_with(|| {
16052                    fidl::new_empty!(
16053                        fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>,
16054                        D
16055                    )
16056                });
16057                fidl::decode!(
16058                    fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>,
16059                    D,
16060                    val_ref,
16061                    decoder,
16062                    inner_offset,
16063                    inner_depth
16064                )?;
16065                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16066                {
16067                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16068                }
16069                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16070                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16071                }
16072            }
16073
16074            next_offset += envelope_size;
16075            _next_ordinal_to_read += 1;
16076            if next_offset >= end_offset {
16077                return Ok(());
16078            }
16079
16080            // Decode unknown envelopes for gaps in ordinals.
16081            while _next_ordinal_to_read < 5 {
16082                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16083                _next_ordinal_to_read += 1;
16084                next_offset += envelope_size;
16085            }
16086
16087            let next_out_of_line = decoder.next_out_of_line();
16088            let handles_before = decoder.remaining_handles();
16089            if let Some((inlined, num_bytes, num_handles)) =
16090                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16091            {
16092                let member_inline_size =
16093                    <InterfaceFlags as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16094                if inlined != (member_inline_size <= 4) {
16095                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16096                }
16097                let inner_offset;
16098                let mut inner_depth = depth.clone();
16099                if inlined {
16100                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16101                    inner_offset = next_offset;
16102                } else {
16103                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16104                    inner_depth.increment()?;
16105                }
16106                let val_ref =
16107                    self.interface_flags.get_or_insert_with(|| fidl::new_empty!(InterfaceFlags, D));
16108                fidl::decode!(InterfaceFlags, D, val_ref, decoder, inner_offset, inner_depth)?;
16109                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16110                {
16111                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16112                }
16113                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16114                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16115                }
16116            }
16117
16118            next_offset += envelope_size;
16119
16120            // Decode the remaining unknown envelopes.
16121            while next_offset < end_offset {
16122                _next_ordinal_to_read += 1;
16123                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16124                next_offset += envelope_size;
16125            }
16126
16127            Ok(())
16128        }
16129    }
16130
16131    impl IpRecvControlData {
16132        #[inline(always)]
16133        fn max_ordinal_present(&self) -> u64 {
16134            if let Some(_) = self.original_destination_address {
16135                return 3;
16136            }
16137            if let Some(_) = self.ttl {
16138                return 2;
16139            }
16140            if let Some(_) = self.tos {
16141                return 1;
16142            }
16143            0
16144        }
16145    }
16146
16147    impl fidl::encoding::ValueTypeMarker for IpRecvControlData {
16148        type Borrowed<'a> = &'a Self;
16149        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16150            value
16151        }
16152    }
16153
16154    unsafe impl fidl::encoding::TypeMarker for IpRecvControlData {
16155        type Owned = Self;
16156
16157        #[inline(always)]
16158        fn inline_align(_context: fidl::encoding::Context) -> usize {
16159            8
16160        }
16161
16162        #[inline(always)]
16163        fn inline_size(_context: fidl::encoding::Context) -> usize {
16164            16
16165        }
16166    }
16167
16168    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpRecvControlData, D>
16169        for &IpRecvControlData
16170    {
16171        unsafe fn encode(
16172            self,
16173            encoder: &mut fidl::encoding::Encoder<'_, D>,
16174            offset: usize,
16175            mut depth: fidl::encoding::Depth,
16176        ) -> fidl::Result<()> {
16177            encoder.debug_check_bounds::<IpRecvControlData>(offset);
16178            // Vector header
16179            let max_ordinal: u64 = self.max_ordinal_present();
16180            encoder.write_num(max_ordinal, offset);
16181            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16182            // Calling encoder.out_of_line_offset(0) is not allowed.
16183            if max_ordinal == 0 {
16184                return Ok(());
16185            }
16186            depth.increment()?;
16187            let envelope_size = 8;
16188            let bytes_len = max_ordinal as usize * envelope_size;
16189            #[allow(unused_variables)]
16190            let offset = encoder.out_of_line_offset(bytes_len);
16191            let mut _prev_end_offset: usize = 0;
16192            if 1 > max_ordinal {
16193                return Ok(());
16194            }
16195
16196            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16197            // are envelope_size bytes.
16198            let cur_offset: usize = (1 - 1) * envelope_size;
16199
16200            // Zero reserved fields.
16201            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16202
16203            // Safety:
16204            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16205            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16206            //   envelope_size bytes, there is always sufficient room.
16207            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16208                self.tos.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16209                encoder,
16210                offset + cur_offset,
16211                depth,
16212            )?;
16213
16214            _prev_end_offset = cur_offset + envelope_size;
16215            if 2 > max_ordinal {
16216                return Ok(());
16217            }
16218
16219            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16220            // are envelope_size bytes.
16221            let cur_offset: usize = (2 - 1) * envelope_size;
16222
16223            // Zero reserved fields.
16224            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16225
16226            // Safety:
16227            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16228            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16229            //   envelope_size bytes, there is always sufficient room.
16230            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16231                self.ttl.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16232                encoder,
16233                offset + cur_offset,
16234                depth,
16235            )?;
16236
16237            _prev_end_offset = cur_offset + envelope_size;
16238            if 3 > max_ordinal {
16239                return Ok(());
16240            }
16241
16242            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16243            // are envelope_size bytes.
16244            let cur_offset: usize = (3 - 1) * envelope_size;
16245
16246            // Zero reserved fields.
16247            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16248
16249            // Safety:
16250            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16251            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16252            //   envelope_size bytes, there is always sufficient room.
16253            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
16254            self.original_destination_address.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
16255            encoder, offset + cur_offset, depth
16256        )?;
16257
16258            _prev_end_offset = cur_offset + envelope_size;
16259
16260            Ok(())
16261        }
16262    }
16263
16264    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpRecvControlData {
16265        #[inline(always)]
16266        fn new_empty() -> Self {
16267            Self::default()
16268        }
16269
16270        unsafe fn decode(
16271            &mut self,
16272            decoder: &mut fidl::encoding::Decoder<'_, D>,
16273            offset: usize,
16274            mut depth: fidl::encoding::Depth,
16275        ) -> fidl::Result<()> {
16276            decoder.debug_check_bounds::<Self>(offset);
16277            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16278                None => return Err(fidl::Error::NotNullable),
16279                Some(len) => len,
16280            };
16281            // Calling decoder.out_of_line_offset(0) is not allowed.
16282            if len == 0 {
16283                return Ok(());
16284            };
16285            depth.increment()?;
16286            let envelope_size = 8;
16287            let bytes_len = len * envelope_size;
16288            let offset = decoder.out_of_line_offset(bytes_len)?;
16289            // Decode the envelope for each type.
16290            let mut _next_ordinal_to_read = 0;
16291            let mut next_offset = offset;
16292            let end_offset = offset + bytes_len;
16293            _next_ordinal_to_read += 1;
16294            if next_offset >= end_offset {
16295                return Ok(());
16296            }
16297
16298            // Decode unknown envelopes for gaps in ordinals.
16299            while _next_ordinal_to_read < 1 {
16300                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16301                _next_ordinal_to_read += 1;
16302                next_offset += envelope_size;
16303            }
16304
16305            let next_out_of_line = decoder.next_out_of_line();
16306            let handles_before = decoder.remaining_handles();
16307            if let Some((inlined, num_bytes, num_handles)) =
16308                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16309            {
16310                let member_inline_size =
16311                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16312                if inlined != (member_inline_size <= 4) {
16313                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16314                }
16315                let inner_offset;
16316                let mut inner_depth = depth.clone();
16317                if inlined {
16318                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16319                    inner_offset = next_offset;
16320                } else {
16321                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16322                    inner_depth.increment()?;
16323                }
16324                let val_ref = self.tos.get_or_insert_with(|| fidl::new_empty!(u8, D));
16325                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16326                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16327                {
16328                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16329                }
16330                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16331                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16332                }
16333            }
16334
16335            next_offset += envelope_size;
16336            _next_ordinal_to_read += 1;
16337            if next_offset >= end_offset {
16338                return Ok(());
16339            }
16340
16341            // Decode unknown envelopes for gaps in ordinals.
16342            while _next_ordinal_to_read < 2 {
16343                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16344                _next_ordinal_to_read += 1;
16345                next_offset += envelope_size;
16346            }
16347
16348            let next_out_of_line = decoder.next_out_of_line();
16349            let handles_before = decoder.remaining_handles();
16350            if let Some((inlined, num_bytes, num_handles)) =
16351                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16352            {
16353                let member_inline_size =
16354                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16355                if inlined != (member_inline_size <= 4) {
16356                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16357                }
16358                let inner_offset;
16359                let mut inner_depth = depth.clone();
16360                if inlined {
16361                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16362                    inner_offset = next_offset;
16363                } else {
16364                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16365                    inner_depth.increment()?;
16366                }
16367                let val_ref = self.ttl.get_or_insert_with(|| fidl::new_empty!(u8, D));
16368                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16369                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16370                {
16371                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16372                }
16373                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16374                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16375                }
16376            }
16377
16378            next_offset += envelope_size;
16379            _next_ordinal_to_read += 1;
16380            if next_offset >= end_offset {
16381                return Ok(());
16382            }
16383
16384            // Decode unknown envelopes for gaps in ordinals.
16385            while _next_ordinal_to_read < 3 {
16386                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16387                _next_ordinal_to_read += 1;
16388                next_offset += envelope_size;
16389            }
16390
16391            let next_out_of_line = decoder.next_out_of_line();
16392            let handles_before = decoder.remaining_handles();
16393            if let Some((inlined, num_bytes, num_handles)) =
16394                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16395            {
16396                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16397                if inlined != (member_inline_size <= 4) {
16398                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16399                }
16400                let inner_offset;
16401                let mut inner_depth = depth.clone();
16402                if inlined {
16403                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16404                    inner_offset = next_offset;
16405                } else {
16406                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16407                    inner_depth.increment()?;
16408                }
16409                let val_ref = self.original_destination_address.get_or_insert_with(|| {
16410                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
16411                });
16412                fidl::decode!(
16413                    fidl_fuchsia_net__common::SocketAddress,
16414                    D,
16415                    val_ref,
16416                    decoder,
16417                    inner_offset,
16418                    inner_depth
16419                )?;
16420                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16421                {
16422                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16423                }
16424                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16425                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16426                }
16427            }
16428
16429            next_offset += envelope_size;
16430
16431            // Decode the remaining unknown envelopes.
16432            while next_offset < end_offset {
16433                _next_ordinal_to_read += 1;
16434                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16435                next_offset += envelope_size;
16436            }
16437
16438            Ok(())
16439        }
16440    }
16441
16442    impl IpSendControlData {
16443        #[inline(always)]
16444        fn max_ordinal_present(&self) -> u64 {
16445            if let Some(_) = self.ttl {
16446                return 2;
16447            }
16448            0
16449        }
16450    }
16451
16452    impl fidl::encoding::ValueTypeMarker for IpSendControlData {
16453        type Borrowed<'a> = &'a Self;
16454        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16455            value
16456        }
16457    }
16458
16459    unsafe impl fidl::encoding::TypeMarker for IpSendControlData {
16460        type Owned = Self;
16461
16462        #[inline(always)]
16463        fn inline_align(_context: fidl::encoding::Context) -> usize {
16464            8
16465        }
16466
16467        #[inline(always)]
16468        fn inline_size(_context: fidl::encoding::Context) -> usize {
16469            16
16470        }
16471    }
16472
16473    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpSendControlData, D>
16474        for &IpSendControlData
16475    {
16476        unsafe fn encode(
16477            self,
16478            encoder: &mut fidl::encoding::Encoder<'_, D>,
16479            offset: usize,
16480            mut depth: fidl::encoding::Depth,
16481        ) -> fidl::Result<()> {
16482            encoder.debug_check_bounds::<IpSendControlData>(offset);
16483            // Vector header
16484            let max_ordinal: u64 = self.max_ordinal_present();
16485            encoder.write_num(max_ordinal, offset);
16486            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16487            // Calling encoder.out_of_line_offset(0) is not allowed.
16488            if max_ordinal == 0 {
16489                return Ok(());
16490            }
16491            depth.increment()?;
16492            let envelope_size = 8;
16493            let bytes_len = max_ordinal as usize * envelope_size;
16494            #[allow(unused_variables)]
16495            let offset = encoder.out_of_line_offset(bytes_len);
16496            let mut _prev_end_offset: usize = 0;
16497            if 2 > max_ordinal {
16498                return Ok(());
16499            }
16500
16501            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16502            // are envelope_size bytes.
16503            let cur_offset: usize = (2 - 1) * envelope_size;
16504
16505            // Zero reserved fields.
16506            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16507
16508            // Safety:
16509            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16510            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16511            //   envelope_size bytes, there is always sufficient room.
16512            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16513                self.ttl.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16514                encoder,
16515                offset + cur_offset,
16516                depth,
16517            )?;
16518
16519            _prev_end_offset = cur_offset + envelope_size;
16520
16521            Ok(())
16522        }
16523    }
16524
16525    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpSendControlData {
16526        #[inline(always)]
16527        fn new_empty() -> Self {
16528            Self::default()
16529        }
16530
16531        unsafe fn decode(
16532            &mut self,
16533            decoder: &mut fidl::encoding::Decoder<'_, D>,
16534            offset: usize,
16535            mut depth: fidl::encoding::Depth,
16536        ) -> fidl::Result<()> {
16537            decoder.debug_check_bounds::<Self>(offset);
16538            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16539                None => return Err(fidl::Error::NotNullable),
16540                Some(len) => len,
16541            };
16542            // Calling decoder.out_of_line_offset(0) is not allowed.
16543            if len == 0 {
16544                return Ok(());
16545            };
16546            depth.increment()?;
16547            let envelope_size = 8;
16548            let bytes_len = len * envelope_size;
16549            let offset = decoder.out_of_line_offset(bytes_len)?;
16550            // Decode the envelope for each type.
16551            let mut _next_ordinal_to_read = 0;
16552            let mut next_offset = offset;
16553            let end_offset = offset + bytes_len;
16554            _next_ordinal_to_read += 1;
16555            if next_offset >= end_offset {
16556                return Ok(());
16557            }
16558
16559            // Decode unknown envelopes for gaps in ordinals.
16560            while _next_ordinal_to_read < 2 {
16561                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16562                _next_ordinal_to_read += 1;
16563                next_offset += envelope_size;
16564            }
16565
16566            let next_out_of_line = decoder.next_out_of_line();
16567            let handles_before = decoder.remaining_handles();
16568            if let Some((inlined, num_bytes, num_handles)) =
16569                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16570            {
16571                let member_inline_size =
16572                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16573                if inlined != (member_inline_size <= 4) {
16574                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16575                }
16576                let inner_offset;
16577                let mut inner_depth = depth.clone();
16578                if inlined {
16579                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16580                    inner_offset = next_offset;
16581                } else {
16582                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16583                    inner_depth.increment()?;
16584                }
16585                let val_ref = self.ttl.get_or_insert_with(|| fidl::new_empty!(u8, D));
16586                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16587                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16588                {
16589                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16590                }
16591                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16592                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16593                }
16594            }
16595
16596            next_offset += envelope_size;
16597
16598            // Decode the remaining unknown envelopes.
16599            while next_offset < end_offset {
16600                _next_ordinal_to_read += 1;
16601                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16602                next_offset += envelope_size;
16603            }
16604
16605            Ok(())
16606        }
16607    }
16608
16609    impl Ipv6RecvControlData {
16610        #[inline(always)]
16611        fn max_ordinal_present(&self) -> u64 {
16612            if let Some(_) = self.pktinfo {
16613                return 3;
16614            }
16615            if let Some(_) = self.hoplimit {
16616                return 2;
16617            }
16618            if let Some(_) = self.tclass {
16619                return 1;
16620            }
16621            0
16622        }
16623    }
16624
16625    impl fidl::encoding::ValueTypeMarker for Ipv6RecvControlData {
16626        type Borrowed<'a> = &'a Self;
16627        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16628            value
16629        }
16630    }
16631
16632    unsafe impl fidl::encoding::TypeMarker for Ipv6RecvControlData {
16633        type Owned = Self;
16634
16635        #[inline(always)]
16636        fn inline_align(_context: fidl::encoding::Context) -> usize {
16637            8
16638        }
16639
16640        #[inline(always)]
16641        fn inline_size(_context: fidl::encoding::Context) -> usize {
16642            16
16643        }
16644    }
16645
16646    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ipv6RecvControlData, D>
16647        for &Ipv6RecvControlData
16648    {
16649        unsafe fn encode(
16650            self,
16651            encoder: &mut fidl::encoding::Encoder<'_, D>,
16652            offset: usize,
16653            mut depth: fidl::encoding::Depth,
16654        ) -> fidl::Result<()> {
16655            encoder.debug_check_bounds::<Ipv6RecvControlData>(offset);
16656            // Vector header
16657            let max_ordinal: u64 = self.max_ordinal_present();
16658            encoder.write_num(max_ordinal, offset);
16659            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16660            // Calling encoder.out_of_line_offset(0) is not allowed.
16661            if max_ordinal == 0 {
16662                return Ok(());
16663            }
16664            depth.increment()?;
16665            let envelope_size = 8;
16666            let bytes_len = max_ordinal as usize * envelope_size;
16667            #[allow(unused_variables)]
16668            let offset = encoder.out_of_line_offset(bytes_len);
16669            let mut _prev_end_offset: usize = 0;
16670            if 1 > max_ordinal {
16671                return Ok(());
16672            }
16673
16674            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16675            // are envelope_size bytes.
16676            let cur_offset: usize = (1 - 1) * envelope_size;
16677
16678            // Zero reserved fields.
16679            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16680
16681            // Safety:
16682            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16683            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16684            //   envelope_size bytes, there is always sufficient room.
16685            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16686                self.tclass.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16687                encoder,
16688                offset + cur_offset,
16689                depth,
16690            )?;
16691
16692            _prev_end_offset = cur_offset + envelope_size;
16693            if 2 > max_ordinal {
16694                return Ok(());
16695            }
16696
16697            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16698            // are envelope_size bytes.
16699            let cur_offset: usize = (2 - 1) * envelope_size;
16700
16701            // Zero reserved fields.
16702            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16703
16704            // Safety:
16705            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16706            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16707            //   envelope_size bytes, there is always sufficient room.
16708            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16709                self.hoplimit.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16710                encoder,
16711                offset + cur_offset,
16712                depth,
16713            )?;
16714
16715            _prev_end_offset = cur_offset + envelope_size;
16716            if 3 > max_ordinal {
16717                return Ok(());
16718            }
16719
16720            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16721            // are envelope_size bytes.
16722            let cur_offset: usize = (3 - 1) * envelope_size;
16723
16724            // Zero reserved fields.
16725            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16726
16727            // Safety:
16728            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16729            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16730            //   envelope_size bytes, there is always sufficient room.
16731            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoRecvControlData, D>(
16732                self.pktinfo
16733                    .as_ref()
16734                    .map(<Ipv6PktInfoRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16735                encoder,
16736                offset + cur_offset,
16737                depth,
16738            )?;
16739
16740            _prev_end_offset = cur_offset + envelope_size;
16741
16742            Ok(())
16743        }
16744    }
16745
16746    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ipv6RecvControlData {
16747        #[inline(always)]
16748        fn new_empty() -> Self {
16749            Self::default()
16750        }
16751
16752        unsafe fn decode(
16753            &mut self,
16754            decoder: &mut fidl::encoding::Decoder<'_, D>,
16755            offset: usize,
16756            mut depth: fidl::encoding::Depth,
16757        ) -> fidl::Result<()> {
16758            decoder.debug_check_bounds::<Self>(offset);
16759            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16760                None => return Err(fidl::Error::NotNullable),
16761                Some(len) => len,
16762            };
16763            // Calling decoder.out_of_line_offset(0) is not allowed.
16764            if len == 0 {
16765                return Ok(());
16766            };
16767            depth.increment()?;
16768            let envelope_size = 8;
16769            let bytes_len = len * envelope_size;
16770            let offset = decoder.out_of_line_offset(bytes_len)?;
16771            // Decode the envelope for each type.
16772            let mut _next_ordinal_to_read = 0;
16773            let mut next_offset = offset;
16774            let end_offset = offset + bytes_len;
16775            _next_ordinal_to_read += 1;
16776            if next_offset >= end_offset {
16777                return Ok(());
16778            }
16779
16780            // Decode unknown envelopes for gaps in ordinals.
16781            while _next_ordinal_to_read < 1 {
16782                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16783                _next_ordinal_to_read += 1;
16784                next_offset += envelope_size;
16785            }
16786
16787            let next_out_of_line = decoder.next_out_of_line();
16788            let handles_before = decoder.remaining_handles();
16789            if let Some((inlined, num_bytes, num_handles)) =
16790                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16791            {
16792                let member_inline_size =
16793                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16794                if inlined != (member_inline_size <= 4) {
16795                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16796                }
16797                let inner_offset;
16798                let mut inner_depth = depth.clone();
16799                if inlined {
16800                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16801                    inner_offset = next_offset;
16802                } else {
16803                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16804                    inner_depth.increment()?;
16805                }
16806                let val_ref = self.tclass.get_or_insert_with(|| fidl::new_empty!(u8, D));
16807                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16808                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16809                {
16810                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16811                }
16812                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16813                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16814                }
16815            }
16816
16817            next_offset += envelope_size;
16818            _next_ordinal_to_read += 1;
16819            if next_offset >= end_offset {
16820                return Ok(());
16821            }
16822
16823            // Decode unknown envelopes for gaps in ordinals.
16824            while _next_ordinal_to_read < 2 {
16825                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16826                _next_ordinal_to_read += 1;
16827                next_offset += envelope_size;
16828            }
16829
16830            let next_out_of_line = decoder.next_out_of_line();
16831            let handles_before = decoder.remaining_handles();
16832            if let Some((inlined, num_bytes, num_handles)) =
16833                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16834            {
16835                let member_inline_size =
16836                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16837                if inlined != (member_inline_size <= 4) {
16838                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16839                }
16840                let inner_offset;
16841                let mut inner_depth = depth.clone();
16842                if inlined {
16843                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16844                    inner_offset = next_offset;
16845                } else {
16846                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16847                    inner_depth.increment()?;
16848                }
16849                let val_ref = self.hoplimit.get_or_insert_with(|| fidl::new_empty!(u8, D));
16850                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16851                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16852                {
16853                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16854                }
16855                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16856                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16857                }
16858            }
16859
16860            next_offset += envelope_size;
16861            _next_ordinal_to_read += 1;
16862            if next_offset >= end_offset {
16863                return Ok(());
16864            }
16865
16866            // Decode unknown envelopes for gaps in ordinals.
16867            while _next_ordinal_to_read < 3 {
16868                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16869                _next_ordinal_to_read += 1;
16870                next_offset += envelope_size;
16871            }
16872
16873            let next_out_of_line = decoder.next_out_of_line();
16874            let handles_before = decoder.remaining_handles();
16875            if let Some((inlined, num_bytes, num_handles)) =
16876                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16877            {
16878                let member_inline_size =
16879                    <Ipv6PktInfoRecvControlData as fidl::encoding::TypeMarker>::inline_size(
16880                        decoder.context,
16881                    );
16882                if inlined != (member_inline_size <= 4) {
16883                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16884                }
16885                let inner_offset;
16886                let mut inner_depth = depth.clone();
16887                if inlined {
16888                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16889                    inner_offset = next_offset;
16890                } else {
16891                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16892                    inner_depth.increment()?;
16893                }
16894                let val_ref = self
16895                    .pktinfo
16896                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoRecvControlData, D));
16897                fidl::decode!(
16898                    Ipv6PktInfoRecvControlData,
16899                    D,
16900                    val_ref,
16901                    decoder,
16902                    inner_offset,
16903                    inner_depth
16904                )?;
16905                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16906                {
16907                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16908                }
16909                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16910                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16911                }
16912            }
16913
16914            next_offset += envelope_size;
16915
16916            // Decode the remaining unknown envelopes.
16917            while next_offset < end_offset {
16918                _next_ordinal_to_read += 1;
16919                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16920                next_offset += envelope_size;
16921            }
16922
16923            Ok(())
16924        }
16925    }
16926
16927    impl Ipv6SendControlData {
16928        #[inline(always)]
16929        fn max_ordinal_present(&self) -> u64 {
16930            if let Some(_) = self.pktinfo {
16931                return 3;
16932            }
16933            if let Some(_) = self.hoplimit {
16934                return 2;
16935            }
16936            0
16937        }
16938    }
16939
16940    impl fidl::encoding::ValueTypeMarker for Ipv6SendControlData {
16941        type Borrowed<'a> = &'a Self;
16942        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16943            value
16944        }
16945    }
16946
16947    unsafe impl fidl::encoding::TypeMarker for Ipv6SendControlData {
16948        type Owned = Self;
16949
16950        #[inline(always)]
16951        fn inline_align(_context: fidl::encoding::Context) -> usize {
16952            8
16953        }
16954
16955        #[inline(always)]
16956        fn inline_size(_context: fidl::encoding::Context) -> usize {
16957            16
16958        }
16959    }
16960
16961    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ipv6SendControlData, D>
16962        for &Ipv6SendControlData
16963    {
16964        unsafe fn encode(
16965            self,
16966            encoder: &mut fidl::encoding::Encoder<'_, D>,
16967            offset: usize,
16968            mut depth: fidl::encoding::Depth,
16969        ) -> fidl::Result<()> {
16970            encoder.debug_check_bounds::<Ipv6SendControlData>(offset);
16971            // Vector header
16972            let max_ordinal: u64 = self.max_ordinal_present();
16973            encoder.write_num(max_ordinal, offset);
16974            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16975            // Calling encoder.out_of_line_offset(0) is not allowed.
16976            if max_ordinal == 0 {
16977                return Ok(());
16978            }
16979            depth.increment()?;
16980            let envelope_size = 8;
16981            let bytes_len = max_ordinal as usize * envelope_size;
16982            #[allow(unused_variables)]
16983            let offset = encoder.out_of_line_offset(bytes_len);
16984            let mut _prev_end_offset: usize = 0;
16985            if 2 > max_ordinal {
16986                return Ok(());
16987            }
16988
16989            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16990            // are envelope_size bytes.
16991            let cur_offset: usize = (2 - 1) * envelope_size;
16992
16993            // Zero reserved fields.
16994            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16995
16996            // Safety:
16997            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16998            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16999            //   envelope_size bytes, there is always sufficient room.
17000            fidl::encoding::encode_in_envelope_optional::<u8, D>(
17001                self.hoplimit.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
17002                encoder,
17003                offset + cur_offset,
17004                depth,
17005            )?;
17006
17007            _prev_end_offset = cur_offset + envelope_size;
17008            if 3 > max_ordinal {
17009                return Ok(());
17010            }
17011
17012            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17013            // are envelope_size bytes.
17014            let cur_offset: usize = (3 - 1) * envelope_size;
17015
17016            // Zero reserved fields.
17017            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17018
17019            // Safety:
17020            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17021            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17022            //   envelope_size bytes, there is always sufficient room.
17023            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoSendControlData, D>(
17024                self.pktinfo
17025                    .as_ref()
17026                    .map(<Ipv6PktInfoSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17027                encoder,
17028                offset + cur_offset,
17029                depth,
17030            )?;
17031
17032            _prev_end_offset = cur_offset + envelope_size;
17033
17034            Ok(())
17035        }
17036    }
17037
17038    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ipv6SendControlData {
17039        #[inline(always)]
17040        fn new_empty() -> Self {
17041            Self::default()
17042        }
17043
17044        unsafe fn decode(
17045            &mut self,
17046            decoder: &mut fidl::encoding::Decoder<'_, D>,
17047            offset: usize,
17048            mut depth: fidl::encoding::Depth,
17049        ) -> fidl::Result<()> {
17050            decoder.debug_check_bounds::<Self>(offset);
17051            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17052                None => return Err(fidl::Error::NotNullable),
17053                Some(len) => len,
17054            };
17055            // Calling decoder.out_of_line_offset(0) is not allowed.
17056            if len == 0 {
17057                return Ok(());
17058            };
17059            depth.increment()?;
17060            let envelope_size = 8;
17061            let bytes_len = len * envelope_size;
17062            let offset = decoder.out_of_line_offset(bytes_len)?;
17063            // Decode the envelope for each type.
17064            let mut _next_ordinal_to_read = 0;
17065            let mut next_offset = offset;
17066            let end_offset = offset + bytes_len;
17067            _next_ordinal_to_read += 1;
17068            if next_offset >= end_offset {
17069                return Ok(());
17070            }
17071
17072            // Decode unknown envelopes for gaps in ordinals.
17073            while _next_ordinal_to_read < 2 {
17074                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17075                _next_ordinal_to_read += 1;
17076                next_offset += envelope_size;
17077            }
17078
17079            let next_out_of_line = decoder.next_out_of_line();
17080            let handles_before = decoder.remaining_handles();
17081            if let Some((inlined, num_bytes, num_handles)) =
17082                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17083            {
17084                let member_inline_size =
17085                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17086                if inlined != (member_inline_size <= 4) {
17087                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17088                }
17089                let inner_offset;
17090                let mut inner_depth = depth.clone();
17091                if inlined {
17092                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17093                    inner_offset = next_offset;
17094                } else {
17095                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17096                    inner_depth.increment()?;
17097                }
17098                let val_ref = self.hoplimit.get_or_insert_with(|| fidl::new_empty!(u8, D));
17099                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
17100                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17101                {
17102                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17103                }
17104                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17105                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17106                }
17107            }
17108
17109            next_offset += envelope_size;
17110            _next_ordinal_to_read += 1;
17111            if next_offset >= end_offset {
17112                return Ok(());
17113            }
17114
17115            // Decode unknown envelopes for gaps in ordinals.
17116            while _next_ordinal_to_read < 3 {
17117                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17118                _next_ordinal_to_read += 1;
17119                next_offset += envelope_size;
17120            }
17121
17122            let next_out_of_line = decoder.next_out_of_line();
17123            let handles_before = decoder.remaining_handles();
17124            if let Some((inlined, num_bytes, num_handles)) =
17125                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17126            {
17127                let member_inline_size =
17128                    <Ipv6PktInfoSendControlData as fidl::encoding::TypeMarker>::inline_size(
17129                        decoder.context,
17130                    );
17131                if inlined != (member_inline_size <= 4) {
17132                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17133                }
17134                let inner_offset;
17135                let mut inner_depth = depth.clone();
17136                if inlined {
17137                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17138                    inner_offset = next_offset;
17139                } else {
17140                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17141                    inner_depth.increment()?;
17142                }
17143                let val_ref = self
17144                    .pktinfo
17145                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoSendControlData, D));
17146                fidl::decode!(
17147                    Ipv6PktInfoSendControlData,
17148                    D,
17149                    val_ref,
17150                    decoder,
17151                    inner_offset,
17152                    inner_depth
17153                )?;
17154                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17155                {
17156                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17157                }
17158                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17159                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17160                }
17161            }
17162
17163            next_offset += envelope_size;
17164
17165            // Decode the remaining unknown envelopes.
17166            while next_offset < end_offset {
17167                _next_ordinal_to_read += 1;
17168                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17169                next_offset += envelope_size;
17170            }
17171
17172            Ok(())
17173        }
17174    }
17175
17176    impl NetworkSocketRecvControlData {
17177        #[inline(always)]
17178        fn max_ordinal_present(&self) -> u64 {
17179            if let Some(_) = self.ipv6 {
17180                return 3;
17181            }
17182            if let Some(_) = self.ip {
17183                return 2;
17184            }
17185            if let Some(_) = self.socket {
17186                return 1;
17187            }
17188            0
17189        }
17190    }
17191
17192    impl fidl::encoding::ValueTypeMarker for NetworkSocketRecvControlData {
17193        type Borrowed<'a> = &'a Self;
17194        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17195            value
17196        }
17197    }
17198
17199    unsafe impl fidl::encoding::TypeMarker for NetworkSocketRecvControlData {
17200        type Owned = Self;
17201
17202        #[inline(always)]
17203        fn inline_align(_context: fidl::encoding::Context) -> usize {
17204            8
17205        }
17206
17207        #[inline(always)]
17208        fn inline_size(_context: fidl::encoding::Context) -> usize {
17209            16
17210        }
17211    }
17212
17213    unsafe impl<D: fidl::encoding::ResourceDialect>
17214        fidl::encoding::Encode<NetworkSocketRecvControlData, D> for &NetworkSocketRecvControlData
17215    {
17216        unsafe fn encode(
17217            self,
17218            encoder: &mut fidl::encoding::Encoder<'_, D>,
17219            offset: usize,
17220            mut depth: fidl::encoding::Depth,
17221        ) -> fidl::Result<()> {
17222            encoder.debug_check_bounds::<NetworkSocketRecvControlData>(offset);
17223            // Vector header
17224            let max_ordinal: u64 = self.max_ordinal_present();
17225            encoder.write_num(max_ordinal, offset);
17226            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17227            // Calling encoder.out_of_line_offset(0) is not allowed.
17228            if max_ordinal == 0 {
17229                return Ok(());
17230            }
17231            depth.increment()?;
17232            let envelope_size = 8;
17233            let bytes_len = max_ordinal as usize * envelope_size;
17234            #[allow(unused_variables)]
17235            let offset = encoder.out_of_line_offset(bytes_len);
17236            let mut _prev_end_offset: usize = 0;
17237            if 1 > max_ordinal {
17238                return Ok(());
17239            }
17240
17241            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17242            // are envelope_size bytes.
17243            let cur_offset: usize = (1 - 1) * envelope_size;
17244
17245            // Zero reserved fields.
17246            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17247
17248            // Safety:
17249            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17250            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17251            //   envelope_size bytes, there is always sufficient room.
17252            fidl::encoding::encode_in_envelope_optional::<SocketRecvControlData, D>(
17253                self.socket
17254                    .as_ref()
17255                    .map(<SocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
17256                encoder,
17257                offset + cur_offset,
17258                depth,
17259            )?;
17260
17261            _prev_end_offset = cur_offset + envelope_size;
17262            if 2 > max_ordinal {
17263                return Ok(());
17264            }
17265
17266            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17267            // are envelope_size bytes.
17268            let cur_offset: usize = (2 - 1) * envelope_size;
17269
17270            // Zero reserved fields.
17271            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17272
17273            // Safety:
17274            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17275            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17276            //   envelope_size bytes, there is always sufficient room.
17277            fidl::encoding::encode_in_envelope_optional::<IpRecvControlData, D>(
17278                self.ip
17279                    .as_ref()
17280                    .map(<IpRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
17281                encoder,
17282                offset + cur_offset,
17283                depth,
17284            )?;
17285
17286            _prev_end_offset = cur_offset + envelope_size;
17287            if 3 > max_ordinal {
17288                return Ok(());
17289            }
17290
17291            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17292            // are envelope_size bytes.
17293            let cur_offset: usize = (3 - 1) * envelope_size;
17294
17295            // Zero reserved fields.
17296            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17297
17298            // Safety:
17299            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17300            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17301            //   envelope_size bytes, there is always sufficient room.
17302            fidl::encoding::encode_in_envelope_optional::<Ipv6RecvControlData, D>(
17303                self.ipv6
17304                    .as_ref()
17305                    .map(<Ipv6RecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
17306                encoder,
17307                offset + cur_offset,
17308                depth,
17309            )?;
17310
17311            _prev_end_offset = cur_offset + envelope_size;
17312
17313            Ok(())
17314        }
17315    }
17316
17317    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17318        for NetworkSocketRecvControlData
17319    {
17320        #[inline(always)]
17321        fn new_empty() -> Self {
17322            Self::default()
17323        }
17324
17325        unsafe fn decode(
17326            &mut self,
17327            decoder: &mut fidl::encoding::Decoder<'_, D>,
17328            offset: usize,
17329            mut depth: fidl::encoding::Depth,
17330        ) -> fidl::Result<()> {
17331            decoder.debug_check_bounds::<Self>(offset);
17332            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17333                None => return Err(fidl::Error::NotNullable),
17334                Some(len) => len,
17335            };
17336            // Calling decoder.out_of_line_offset(0) is not allowed.
17337            if len == 0 {
17338                return Ok(());
17339            };
17340            depth.increment()?;
17341            let envelope_size = 8;
17342            let bytes_len = len * envelope_size;
17343            let offset = decoder.out_of_line_offset(bytes_len)?;
17344            // Decode the envelope for each type.
17345            let mut _next_ordinal_to_read = 0;
17346            let mut next_offset = offset;
17347            let end_offset = offset + bytes_len;
17348            _next_ordinal_to_read += 1;
17349            if next_offset >= end_offset {
17350                return Ok(());
17351            }
17352
17353            // Decode unknown envelopes for gaps in ordinals.
17354            while _next_ordinal_to_read < 1 {
17355                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17356                _next_ordinal_to_read += 1;
17357                next_offset += envelope_size;
17358            }
17359
17360            let next_out_of_line = decoder.next_out_of_line();
17361            let handles_before = decoder.remaining_handles();
17362            if let Some((inlined, num_bytes, num_handles)) =
17363                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17364            {
17365                let member_inline_size =
17366                    <SocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
17367                        decoder.context,
17368                    );
17369                if inlined != (member_inline_size <= 4) {
17370                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17371                }
17372                let inner_offset;
17373                let mut inner_depth = depth.clone();
17374                if inlined {
17375                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17376                    inner_offset = next_offset;
17377                } else {
17378                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17379                    inner_depth.increment()?;
17380                }
17381                let val_ref =
17382                    self.socket.get_or_insert_with(|| fidl::new_empty!(SocketRecvControlData, D));
17383                fidl::decode!(
17384                    SocketRecvControlData,
17385                    D,
17386                    val_ref,
17387                    decoder,
17388                    inner_offset,
17389                    inner_depth
17390                )?;
17391                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17392                {
17393                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17394                }
17395                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17396                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17397                }
17398            }
17399
17400            next_offset += envelope_size;
17401            _next_ordinal_to_read += 1;
17402            if next_offset >= end_offset {
17403                return Ok(());
17404            }
17405
17406            // Decode unknown envelopes for gaps in ordinals.
17407            while _next_ordinal_to_read < 2 {
17408                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17409                _next_ordinal_to_read += 1;
17410                next_offset += envelope_size;
17411            }
17412
17413            let next_out_of_line = decoder.next_out_of_line();
17414            let handles_before = decoder.remaining_handles();
17415            if let Some((inlined, num_bytes, num_handles)) =
17416                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17417            {
17418                let member_inline_size =
17419                    <IpRecvControlData as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17420                if inlined != (member_inline_size <= 4) {
17421                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17422                }
17423                let inner_offset;
17424                let mut inner_depth = depth.clone();
17425                if inlined {
17426                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17427                    inner_offset = next_offset;
17428                } else {
17429                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17430                    inner_depth.increment()?;
17431                }
17432                let val_ref = self.ip.get_or_insert_with(|| fidl::new_empty!(IpRecvControlData, D));
17433                fidl::decode!(IpRecvControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17434                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17435                {
17436                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17437                }
17438                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17439                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17440                }
17441            }
17442
17443            next_offset += envelope_size;
17444            _next_ordinal_to_read += 1;
17445            if next_offset >= end_offset {
17446                return Ok(());
17447            }
17448
17449            // Decode unknown envelopes for gaps in ordinals.
17450            while _next_ordinal_to_read < 3 {
17451                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17452                _next_ordinal_to_read += 1;
17453                next_offset += envelope_size;
17454            }
17455
17456            let next_out_of_line = decoder.next_out_of_line();
17457            let handles_before = decoder.remaining_handles();
17458            if let Some((inlined, num_bytes, num_handles)) =
17459                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17460            {
17461                let member_inline_size =
17462                    <Ipv6RecvControlData as fidl::encoding::TypeMarker>::inline_size(
17463                        decoder.context,
17464                    );
17465                if inlined != (member_inline_size <= 4) {
17466                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17467                }
17468                let inner_offset;
17469                let mut inner_depth = depth.clone();
17470                if inlined {
17471                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17472                    inner_offset = next_offset;
17473                } else {
17474                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17475                    inner_depth.increment()?;
17476                }
17477                let val_ref =
17478                    self.ipv6.get_or_insert_with(|| fidl::new_empty!(Ipv6RecvControlData, D));
17479                fidl::decode!(Ipv6RecvControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17480                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17481                {
17482                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17483                }
17484                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17485                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17486                }
17487            }
17488
17489            next_offset += envelope_size;
17490
17491            // Decode the remaining unknown envelopes.
17492            while next_offset < end_offset {
17493                _next_ordinal_to_read += 1;
17494                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17495                next_offset += envelope_size;
17496            }
17497
17498            Ok(())
17499        }
17500    }
17501
17502    impl NetworkSocketSendControlData {
17503        #[inline(always)]
17504        fn max_ordinal_present(&self) -> u64 {
17505            if let Some(_) = self.ipv6 {
17506                return 3;
17507            }
17508            if let Some(_) = self.ip {
17509                return 2;
17510            }
17511            if let Some(_) = self.socket {
17512                return 1;
17513            }
17514            0
17515        }
17516    }
17517
17518    impl fidl::encoding::ValueTypeMarker for NetworkSocketSendControlData {
17519        type Borrowed<'a> = &'a Self;
17520        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17521            value
17522        }
17523    }
17524
17525    unsafe impl fidl::encoding::TypeMarker for NetworkSocketSendControlData {
17526        type Owned = Self;
17527
17528        #[inline(always)]
17529        fn inline_align(_context: fidl::encoding::Context) -> usize {
17530            8
17531        }
17532
17533        #[inline(always)]
17534        fn inline_size(_context: fidl::encoding::Context) -> usize {
17535            16
17536        }
17537    }
17538
17539    unsafe impl<D: fidl::encoding::ResourceDialect>
17540        fidl::encoding::Encode<NetworkSocketSendControlData, D> for &NetworkSocketSendControlData
17541    {
17542        unsafe fn encode(
17543            self,
17544            encoder: &mut fidl::encoding::Encoder<'_, D>,
17545            offset: usize,
17546            mut depth: fidl::encoding::Depth,
17547        ) -> fidl::Result<()> {
17548            encoder.debug_check_bounds::<NetworkSocketSendControlData>(offset);
17549            // Vector header
17550            let max_ordinal: u64 = self.max_ordinal_present();
17551            encoder.write_num(max_ordinal, offset);
17552            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17553            // Calling encoder.out_of_line_offset(0) is not allowed.
17554            if max_ordinal == 0 {
17555                return Ok(());
17556            }
17557            depth.increment()?;
17558            let envelope_size = 8;
17559            let bytes_len = max_ordinal as usize * envelope_size;
17560            #[allow(unused_variables)]
17561            let offset = encoder.out_of_line_offset(bytes_len);
17562            let mut _prev_end_offset: usize = 0;
17563            if 1 > max_ordinal {
17564                return Ok(());
17565            }
17566
17567            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17568            // are envelope_size bytes.
17569            let cur_offset: usize = (1 - 1) * envelope_size;
17570
17571            // Zero reserved fields.
17572            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17573
17574            // Safety:
17575            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17576            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17577            //   envelope_size bytes, there is always sufficient room.
17578            fidl::encoding::encode_in_envelope_optional::<SocketSendControlData, D>(
17579                self.socket
17580                    .as_ref()
17581                    .map(<SocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17582                encoder,
17583                offset + cur_offset,
17584                depth,
17585            )?;
17586
17587            _prev_end_offset = cur_offset + envelope_size;
17588            if 2 > max_ordinal {
17589                return Ok(());
17590            }
17591
17592            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17593            // are envelope_size bytes.
17594            let cur_offset: usize = (2 - 1) * envelope_size;
17595
17596            // Zero reserved fields.
17597            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17598
17599            // Safety:
17600            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17601            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17602            //   envelope_size bytes, there is always sufficient room.
17603            fidl::encoding::encode_in_envelope_optional::<IpSendControlData, D>(
17604                self.ip
17605                    .as_ref()
17606                    .map(<IpSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17607                encoder,
17608                offset + cur_offset,
17609                depth,
17610            )?;
17611
17612            _prev_end_offset = cur_offset + envelope_size;
17613            if 3 > max_ordinal {
17614                return Ok(());
17615            }
17616
17617            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17618            // are envelope_size bytes.
17619            let cur_offset: usize = (3 - 1) * envelope_size;
17620
17621            // Zero reserved fields.
17622            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17623
17624            // Safety:
17625            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17626            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17627            //   envelope_size bytes, there is always sufficient room.
17628            fidl::encoding::encode_in_envelope_optional::<Ipv6SendControlData, D>(
17629                self.ipv6
17630                    .as_ref()
17631                    .map(<Ipv6SendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17632                encoder,
17633                offset + cur_offset,
17634                depth,
17635            )?;
17636
17637            _prev_end_offset = cur_offset + envelope_size;
17638
17639            Ok(())
17640        }
17641    }
17642
17643    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17644        for NetworkSocketSendControlData
17645    {
17646        #[inline(always)]
17647        fn new_empty() -> Self {
17648            Self::default()
17649        }
17650
17651        unsafe fn decode(
17652            &mut self,
17653            decoder: &mut fidl::encoding::Decoder<'_, D>,
17654            offset: usize,
17655            mut depth: fidl::encoding::Depth,
17656        ) -> fidl::Result<()> {
17657            decoder.debug_check_bounds::<Self>(offset);
17658            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17659                None => return Err(fidl::Error::NotNullable),
17660                Some(len) => len,
17661            };
17662            // Calling decoder.out_of_line_offset(0) is not allowed.
17663            if len == 0 {
17664                return Ok(());
17665            };
17666            depth.increment()?;
17667            let envelope_size = 8;
17668            let bytes_len = len * envelope_size;
17669            let offset = decoder.out_of_line_offset(bytes_len)?;
17670            // Decode the envelope for each type.
17671            let mut _next_ordinal_to_read = 0;
17672            let mut next_offset = offset;
17673            let end_offset = offset + bytes_len;
17674            _next_ordinal_to_read += 1;
17675            if next_offset >= end_offset {
17676                return Ok(());
17677            }
17678
17679            // Decode unknown envelopes for gaps in ordinals.
17680            while _next_ordinal_to_read < 1 {
17681                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17682                _next_ordinal_to_read += 1;
17683                next_offset += envelope_size;
17684            }
17685
17686            let next_out_of_line = decoder.next_out_of_line();
17687            let handles_before = decoder.remaining_handles();
17688            if let Some((inlined, num_bytes, num_handles)) =
17689                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17690            {
17691                let member_inline_size =
17692                    <SocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
17693                        decoder.context,
17694                    );
17695                if inlined != (member_inline_size <= 4) {
17696                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17697                }
17698                let inner_offset;
17699                let mut inner_depth = depth.clone();
17700                if inlined {
17701                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17702                    inner_offset = next_offset;
17703                } else {
17704                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17705                    inner_depth.increment()?;
17706                }
17707                let val_ref =
17708                    self.socket.get_or_insert_with(|| fidl::new_empty!(SocketSendControlData, D));
17709                fidl::decode!(
17710                    SocketSendControlData,
17711                    D,
17712                    val_ref,
17713                    decoder,
17714                    inner_offset,
17715                    inner_depth
17716                )?;
17717                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17718                {
17719                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17720                }
17721                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17722                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17723                }
17724            }
17725
17726            next_offset += envelope_size;
17727            _next_ordinal_to_read += 1;
17728            if next_offset >= end_offset {
17729                return Ok(());
17730            }
17731
17732            // Decode unknown envelopes for gaps in ordinals.
17733            while _next_ordinal_to_read < 2 {
17734                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17735                _next_ordinal_to_read += 1;
17736                next_offset += envelope_size;
17737            }
17738
17739            let next_out_of_line = decoder.next_out_of_line();
17740            let handles_before = decoder.remaining_handles();
17741            if let Some((inlined, num_bytes, num_handles)) =
17742                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17743            {
17744                let member_inline_size =
17745                    <IpSendControlData as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17746                if inlined != (member_inline_size <= 4) {
17747                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17748                }
17749                let inner_offset;
17750                let mut inner_depth = depth.clone();
17751                if inlined {
17752                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17753                    inner_offset = next_offset;
17754                } else {
17755                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17756                    inner_depth.increment()?;
17757                }
17758                let val_ref = self.ip.get_or_insert_with(|| fidl::new_empty!(IpSendControlData, D));
17759                fidl::decode!(IpSendControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17760                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17761                {
17762                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17763                }
17764                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17765                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17766                }
17767            }
17768
17769            next_offset += envelope_size;
17770            _next_ordinal_to_read += 1;
17771            if next_offset >= end_offset {
17772                return Ok(());
17773            }
17774
17775            // Decode unknown envelopes for gaps in ordinals.
17776            while _next_ordinal_to_read < 3 {
17777                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17778                _next_ordinal_to_read += 1;
17779                next_offset += envelope_size;
17780            }
17781
17782            let next_out_of_line = decoder.next_out_of_line();
17783            let handles_before = decoder.remaining_handles();
17784            if let Some((inlined, num_bytes, num_handles)) =
17785                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17786            {
17787                let member_inline_size =
17788                    <Ipv6SendControlData as fidl::encoding::TypeMarker>::inline_size(
17789                        decoder.context,
17790                    );
17791                if inlined != (member_inline_size <= 4) {
17792                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17793                }
17794                let inner_offset;
17795                let mut inner_depth = depth.clone();
17796                if inlined {
17797                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17798                    inner_offset = next_offset;
17799                } else {
17800                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17801                    inner_depth.increment()?;
17802                }
17803                let val_ref =
17804                    self.ipv6.get_or_insert_with(|| fidl::new_empty!(Ipv6SendControlData, D));
17805                fidl::decode!(Ipv6SendControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17806                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17807                {
17808                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17809                }
17810                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17811                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17812                }
17813            }
17814
17815            next_offset += envelope_size;
17816
17817            // Decode the remaining unknown envelopes.
17818            while next_offset < end_offset {
17819                _next_ordinal_to_read += 1;
17820                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17821                next_offset += envelope_size;
17822            }
17823
17824            Ok(())
17825        }
17826    }
17827
17828    impl RecvMsgMeta {
17829        #[inline(always)]
17830        fn max_ordinal_present(&self) -> u64 {
17831            if let Some(_) = self.payload_len {
17832                return 3;
17833            }
17834            if let Some(_) = self.control {
17835                return 2;
17836            }
17837            if let Some(_) = self.from {
17838                return 1;
17839            }
17840            0
17841        }
17842    }
17843
17844    impl fidl::encoding::ValueTypeMarker for RecvMsgMeta {
17845        type Borrowed<'a> = &'a Self;
17846        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17847            value
17848        }
17849    }
17850
17851    unsafe impl fidl::encoding::TypeMarker for RecvMsgMeta {
17852        type Owned = Self;
17853
17854        #[inline(always)]
17855        fn inline_align(_context: fidl::encoding::Context) -> usize {
17856            8
17857        }
17858
17859        #[inline(always)]
17860        fn inline_size(_context: fidl::encoding::Context) -> usize {
17861            16
17862        }
17863    }
17864
17865    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecvMsgMeta, D>
17866        for &RecvMsgMeta
17867    {
17868        unsafe fn encode(
17869            self,
17870            encoder: &mut fidl::encoding::Encoder<'_, D>,
17871            offset: usize,
17872            mut depth: fidl::encoding::Depth,
17873        ) -> fidl::Result<()> {
17874            encoder.debug_check_bounds::<RecvMsgMeta>(offset);
17875            // Vector header
17876            let max_ordinal: u64 = self.max_ordinal_present();
17877            encoder.write_num(max_ordinal, offset);
17878            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17879            // Calling encoder.out_of_line_offset(0) is not allowed.
17880            if max_ordinal == 0 {
17881                return Ok(());
17882            }
17883            depth.increment()?;
17884            let envelope_size = 8;
17885            let bytes_len = max_ordinal as usize * envelope_size;
17886            #[allow(unused_variables)]
17887            let offset = encoder.out_of_line_offset(bytes_len);
17888            let mut _prev_end_offset: usize = 0;
17889            if 1 > max_ordinal {
17890                return Ok(());
17891            }
17892
17893            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17894            // are envelope_size bytes.
17895            let cur_offset: usize = (1 - 1) * envelope_size;
17896
17897            // Zero reserved fields.
17898            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17899
17900            // Safety:
17901            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17902            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17903            //   envelope_size bytes, there is always sufficient room.
17904            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
17905            self.from.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
17906            encoder, offset + cur_offset, depth
17907        )?;
17908
17909            _prev_end_offset = cur_offset + envelope_size;
17910            if 2 > max_ordinal {
17911                return Ok(());
17912            }
17913
17914            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17915            // are envelope_size bytes.
17916            let cur_offset: usize = (2 - 1) * envelope_size;
17917
17918            // Zero reserved fields.
17919            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17920
17921            // Safety:
17922            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17923            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17924            //   envelope_size bytes, there is always sufficient room.
17925            fidl::encoding::encode_in_envelope_optional::<DatagramSocketRecvControlData, D>(
17926                self.control.as_ref().map(
17927                    <DatagramSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow,
17928                ),
17929                encoder,
17930                offset + cur_offset,
17931                depth,
17932            )?;
17933
17934            _prev_end_offset = cur_offset + envelope_size;
17935            if 3 > max_ordinal {
17936                return Ok(());
17937            }
17938
17939            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17940            // are envelope_size bytes.
17941            let cur_offset: usize = (3 - 1) * envelope_size;
17942
17943            // Zero reserved fields.
17944            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17945
17946            // Safety:
17947            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17948            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17949            //   envelope_size bytes, there is always sufficient room.
17950            fidl::encoding::encode_in_envelope_optional::<u16, D>(
17951                self.payload_len.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
17952                encoder,
17953                offset + cur_offset,
17954                depth,
17955            )?;
17956
17957            _prev_end_offset = cur_offset + envelope_size;
17958
17959            Ok(())
17960        }
17961    }
17962
17963    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecvMsgMeta {
17964        #[inline(always)]
17965        fn new_empty() -> Self {
17966            Self::default()
17967        }
17968
17969        unsafe fn decode(
17970            &mut self,
17971            decoder: &mut fidl::encoding::Decoder<'_, D>,
17972            offset: usize,
17973            mut depth: fidl::encoding::Depth,
17974        ) -> fidl::Result<()> {
17975            decoder.debug_check_bounds::<Self>(offset);
17976            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17977                None => return Err(fidl::Error::NotNullable),
17978                Some(len) => len,
17979            };
17980            // Calling decoder.out_of_line_offset(0) is not allowed.
17981            if len == 0 {
17982                return Ok(());
17983            };
17984            depth.increment()?;
17985            let envelope_size = 8;
17986            let bytes_len = len * envelope_size;
17987            let offset = decoder.out_of_line_offset(bytes_len)?;
17988            // Decode the envelope for each type.
17989            let mut _next_ordinal_to_read = 0;
17990            let mut next_offset = offset;
17991            let end_offset = offset + bytes_len;
17992            _next_ordinal_to_read += 1;
17993            if next_offset >= end_offset {
17994                return Ok(());
17995            }
17996
17997            // Decode unknown envelopes for gaps in ordinals.
17998            while _next_ordinal_to_read < 1 {
17999                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18000                _next_ordinal_to_read += 1;
18001                next_offset += envelope_size;
18002            }
18003
18004            let next_out_of_line = decoder.next_out_of_line();
18005            let handles_before = decoder.remaining_handles();
18006            if let Some((inlined, num_bytes, num_handles)) =
18007                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18008            {
18009                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18010                if inlined != (member_inline_size <= 4) {
18011                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18012                }
18013                let inner_offset;
18014                let mut inner_depth = depth.clone();
18015                if inlined {
18016                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18017                    inner_offset = next_offset;
18018                } else {
18019                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18020                    inner_depth.increment()?;
18021                }
18022                let val_ref = self.from.get_or_insert_with(|| {
18023                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
18024                });
18025                fidl::decode!(
18026                    fidl_fuchsia_net__common::SocketAddress,
18027                    D,
18028                    val_ref,
18029                    decoder,
18030                    inner_offset,
18031                    inner_depth
18032                )?;
18033                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18034                {
18035                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18036                }
18037                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18038                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18039                }
18040            }
18041
18042            next_offset += envelope_size;
18043            _next_ordinal_to_read += 1;
18044            if next_offset >= end_offset {
18045                return Ok(());
18046            }
18047
18048            // Decode unknown envelopes for gaps in ordinals.
18049            while _next_ordinal_to_read < 2 {
18050                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18051                _next_ordinal_to_read += 1;
18052                next_offset += envelope_size;
18053            }
18054
18055            let next_out_of_line = decoder.next_out_of_line();
18056            let handles_before = decoder.remaining_handles();
18057            if let Some((inlined, num_bytes, num_handles)) =
18058                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18059            {
18060                let member_inline_size =
18061                    <DatagramSocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
18062                        decoder.context,
18063                    );
18064                if inlined != (member_inline_size <= 4) {
18065                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18066                }
18067                let inner_offset;
18068                let mut inner_depth = depth.clone();
18069                if inlined {
18070                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18071                    inner_offset = next_offset;
18072                } else {
18073                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18074                    inner_depth.increment()?;
18075                }
18076                let val_ref = self
18077                    .control
18078                    .get_or_insert_with(|| fidl::new_empty!(DatagramSocketRecvControlData, D));
18079                fidl::decode!(
18080                    DatagramSocketRecvControlData,
18081                    D,
18082                    val_ref,
18083                    decoder,
18084                    inner_offset,
18085                    inner_depth
18086                )?;
18087                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18088                {
18089                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18090                }
18091                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18092                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18093                }
18094            }
18095
18096            next_offset += envelope_size;
18097            _next_ordinal_to_read += 1;
18098            if next_offset >= end_offset {
18099                return Ok(());
18100            }
18101
18102            // Decode unknown envelopes for gaps in ordinals.
18103            while _next_ordinal_to_read < 3 {
18104                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18105                _next_ordinal_to_read += 1;
18106                next_offset += envelope_size;
18107            }
18108
18109            let next_out_of_line = decoder.next_out_of_line();
18110            let handles_before = decoder.remaining_handles();
18111            if let Some((inlined, num_bytes, num_handles)) =
18112                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18113            {
18114                let member_inline_size =
18115                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18116                if inlined != (member_inline_size <= 4) {
18117                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18118                }
18119                let inner_offset;
18120                let mut inner_depth = depth.clone();
18121                if inlined {
18122                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18123                    inner_offset = next_offset;
18124                } else {
18125                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18126                    inner_depth.increment()?;
18127                }
18128                let val_ref = self.payload_len.get_or_insert_with(|| fidl::new_empty!(u16, D));
18129                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
18130                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18131                {
18132                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18133                }
18134                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18135                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18136                }
18137            }
18138
18139            next_offset += envelope_size;
18140
18141            // Decode the remaining unknown envelopes.
18142            while next_offset < end_offset {
18143                _next_ordinal_to_read += 1;
18144                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18145                next_offset += envelope_size;
18146            }
18147
18148            Ok(())
18149        }
18150    }
18151
18152    impl SendMsgMeta {
18153        #[inline(always)]
18154        fn max_ordinal_present(&self) -> u64 {
18155            if let Some(_) = self.control {
18156                return 2;
18157            }
18158            if let Some(_) = self.to {
18159                return 1;
18160            }
18161            0
18162        }
18163    }
18164
18165    impl fidl::encoding::ValueTypeMarker for SendMsgMeta {
18166        type Borrowed<'a> = &'a Self;
18167        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18168            value
18169        }
18170    }
18171
18172    unsafe impl fidl::encoding::TypeMarker for SendMsgMeta {
18173        type Owned = Self;
18174
18175        #[inline(always)]
18176        fn inline_align(_context: fidl::encoding::Context) -> usize {
18177            8
18178        }
18179
18180        #[inline(always)]
18181        fn inline_size(_context: fidl::encoding::Context) -> usize {
18182            16
18183        }
18184    }
18185
18186    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SendMsgMeta, D>
18187        for &SendMsgMeta
18188    {
18189        unsafe fn encode(
18190            self,
18191            encoder: &mut fidl::encoding::Encoder<'_, D>,
18192            offset: usize,
18193            mut depth: fidl::encoding::Depth,
18194        ) -> fidl::Result<()> {
18195            encoder.debug_check_bounds::<SendMsgMeta>(offset);
18196            // Vector header
18197            let max_ordinal: u64 = self.max_ordinal_present();
18198            encoder.write_num(max_ordinal, offset);
18199            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18200            // Calling encoder.out_of_line_offset(0) is not allowed.
18201            if max_ordinal == 0 {
18202                return Ok(());
18203            }
18204            depth.increment()?;
18205            let envelope_size = 8;
18206            let bytes_len = max_ordinal as usize * envelope_size;
18207            #[allow(unused_variables)]
18208            let offset = encoder.out_of_line_offset(bytes_len);
18209            let mut _prev_end_offset: usize = 0;
18210            if 1 > max_ordinal {
18211                return Ok(());
18212            }
18213
18214            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18215            // are envelope_size bytes.
18216            let cur_offset: usize = (1 - 1) * envelope_size;
18217
18218            // Zero reserved fields.
18219            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18220
18221            // Safety:
18222            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18223            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18224            //   envelope_size bytes, there is always sufficient room.
18225            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
18226            self.to.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
18227            encoder, offset + cur_offset, depth
18228        )?;
18229
18230            _prev_end_offset = cur_offset + envelope_size;
18231            if 2 > max_ordinal {
18232                return Ok(());
18233            }
18234
18235            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18236            // are envelope_size bytes.
18237            let cur_offset: usize = (2 - 1) * envelope_size;
18238
18239            // Zero reserved fields.
18240            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18241
18242            // Safety:
18243            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18244            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18245            //   envelope_size bytes, there is always sufficient room.
18246            fidl::encoding::encode_in_envelope_optional::<DatagramSocketSendControlData, D>(
18247                self.control.as_ref().map(
18248                    <DatagramSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow,
18249                ),
18250                encoder,
18251                offset + cur_offset,
18252                depth,
18253            )?;
18254
18255            _prev_end_offset = cur_offset + envelope_size;
18256
18257            Ok(())
18258        }
18259    }
18260
18261    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SendMsgMeta {
18262        #[inline(always)]
18263        fn new_empty() -> Self {
18264            Self::default()
18265        }
18266
18267        unsafe fn decode(
18268            &mut self,
18269            decoder: &mut fidl::encoding::Decoder<'_, D>,
18270            offset: usize,
18271            mut depth: fidl::encoding::Depth,
18272        ) -> fidl::Result<()> {
18273            decoder.debug_check_bounds::<Self>(offset);
18274            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18275                None => return Err(fidl::Error::NotNullable),
18276                Some(len) => len,
18277            };
18278            // Calling decoder.out_of_line_offset(0) is not allowed.
18279            if len == 0 {
18280                return Ok(());
18281            };
18282            depth.increment()?;
18283            let envelope_size = 8;
18284            let bytes_len = len * envelope_size;
18285            let offset = decoder.out_of_line_offset(bytes_len)?;
18286            // Decode the envelope for each type.
18287            let mut _next_ordinal_to_read = 0;
18288            let mut next_offset = offset;
18289            let end_offset = offset + bytes_len;
18290            _next_ordinal_to_read += 1;
18291            if next_offset >= end_offset {
18292                return Ok(());
18293            }
18294
18295            // Decode unknown envelopes for gaps in ordinals.
18296            while _next_ordinal_to_read < 1 {
18297                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18298                _next_ordinal_to_read += 1;
18299                next_offset += envelope_size;
18300            }
18301
18302            let next_out_of_line = decoder.next_out_of_line();
18303            let handles_before = decoder.remaining_handles();
18304            if let Some((inlined, num_bytes, num_handles)) =
18305                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18306            {
18307                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18308                if inlined != (member_inline_size <= 4) {
18309                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18310                }
18311                let inner_offset;
18312                let mut inner_depth = depth.clone();
18313                if inlined {
18314                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18315                    inner_offset = next_offset;
18316                } else {
18317                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18318                    inner_depth.increment()?;
18319                }
18320                let val_ref = self.to.get_or_insert_with(|| {
18321                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
18322                });
18323                fidl::decode!(
18324                    fidl_fuchsia_net__common::SocketAddress,
18325                    D,
18326                    val_ref,
18327                    decoder,
18328                    inner_offset,
18329                    inner_depth
18330                )?;
18331                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18332                {
18333                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18334                }
18335                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18336                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18337                }
18338            }
18339
18340            next_offset += envelope_size;
18341            _next_ordinal_to_read += 1;
18342            if next_offset >= end_offset {
18343                return Ok(());
18344            }
18345
18346            // Decode unknown envelopes for gaps in ordinals.
18347            while _next_ordinal_to_read < 2 {
18348                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18349                _next_ordinal_to_read += 1;
18350                next_offset += envelope_size;
18351            }
18352
18353            let next_out_of_line = decoder.next_out_of_line();
18354            let handles_before = decoder.remaining_handles();
18355            if let Some((inlined, num_bytes, num_handles)) =
18356                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18357            {
18358                let member_inline_size =
18359                    <DatagramSocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
18360                        decoder.context,
18361                    );
18362                if inlined != (member_inline_size <= 4) {
18363                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18364                }
18365                let inner_offset;
18366                let mut inner_depth = depth.clone();
18367                if inlined {
18368                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18369                    inner_offset = next_offset;
18370                } else {
18371                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18372                    inner_depth.increment()?;
18373                }
18374                let val_ref = self
18375                    .control
18376                    .get_or_insert_with(|| fidl::new_empty!(DatagramSocketSendControlData, D));
18377                fidl::decode!(
18378                    DatagramSocketSendControlData,
18379                    D,
18380                    val_ref,
18381                    decoder,
18382                    inner_offset,
18383                    inner_depth
18384                )?;
18385                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18386                {
18387                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18388                }
18389                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18390                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18391                }
18392            }
18393
18394            next_offset += envelope_size;
18395
18396            // Decode the remaining unknown envelopes.
18397            while next_offset < end_offset {
18398                _next_ordinal_to_read += 1;
18399                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18400                next_offset += envelope_size;
18401            }
18402
18403            Ok(())
18404        }
18405    }
18406
18407    impl SocketCreationOptions {
18408        #[inline(always)]
18409        fn max_ordinal_present(&self) -> u64 {
18410            if let Some(_) = self.marks {
18411                return 1;
18412            }
18413            0
18414        }
18415    }
18416
18417    impl fidl::encoding::ValueTypeMarker for SocketCreationOptions {
18418        type Borrowed<'a> = &'a Self;
18419        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18420            value
18421        }
18422    }
18423
18424    unsafe impl fidl::encoding::TypeMarker for SocketCreationOptions {
18425        type Owned = Self;
18426
18427        #[inline(always)]
18428        fn inline_align(_context: fidl::encoding::Context) -> usize {
18429            8
18430        }
18431
18432        #[inline(always)]
18433        fn inline_size(_context: fidl::encoding::Context) -> usize {
18434            16
18435        }
18436    }
18437
18438    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketCreationOptions, D>
18439        for &SocketCreationOptions
18440    {
18441        unsafe fn encode(
18442            self,
18443            encoder: &mut fidl::encoding::Encoder<'_, D>,
18444            offset: usize,
18445            mut depth: fidl::encoding::Depth,
18446        ) -> fidl::Result<()> {
18447            encoder.debug_check_bounds::<SocketCreationOptions>(offset);
18448            // Vector header
18449            let max_ordinal: u64 = self.max_ordinal_present();
18450            encoder.write_num(max_ordinal, offset);
18451            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18452            // Calling encoder.out_of_line_offset(0) is not allowed.
18453            if max_ordinal == 0 {
18454                return Ok(());
18455            }
18456            depth.increment()?;
18457            let envelope_size = 8;
18458            let bytes_len = max_ordinal as usize * envelope_size;
18459            #[allow(unused_variables)]
18460            let offset = encoder.out_of_line_offset(bytes_len);
18461            let mut _prev_end_offset: usize = 0;
18462            if 1 > max_ordinal {
18463                return Ok(());
18464            }
18465
18466            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18467            // are envelope_size bytes.
18468            let cur_offset: usize = (1 - 1) * envelope_size;
18469
18470            // Zero reserved fields.
18471            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18472
18473            // Safety:
18474            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18475            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18476            //   envelope_size bytes, there is always sufficient room.
18477            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::Marks, D>(
18478                self.marks.as_ref().map(
18479                    <fidl_fuchsia_net__common::Marks as fidl::encoding::ValueTypeMarker>::borrow,
18480                ),
18481                encoder,
18482                offset + cur_offset,
18483                depth,
18484            )?;
18485
18486            _prev_end_offset = cur_offset + envelope_size;
18487
18488            Ok(())
18489        }
18490    }
18491
18492    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketCreationOptions {
18493        #[inline(always)]
18494        fn new_empty() -> Self {
18495            Self::default()
18496        }
18497
18498        unsafe fn decode(
18499            &mut self,
18500            decoder: &mut fidl::encoding::Decoder<'_, D>,
18501            offset: usize,
18502            mut depth: fidl::encoding::Depth,
18503        ) -> fidl::Result<()> {
18504            decoder.debug_check_bounds::<Self>(offset);
18505            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18506                None => return Err(fidl::Error::NotNullable),
18507                Some(len) => len,
18508            };
18509            // Calling decoder.out_of_line_offset(0) is not allowed.
18510            if len == 0 {
18511                return Ok(());
18512            };
18513            depth.increment()?;
18514            let envelope_size = 8;
18515            let bytes_len = len * envelope_size;
18516            let offset = decoder.out_of_line_offset(bytes_len)?;
18517            // Decode the envelope for each type.
18518            let mut _next_ordinal_to_read = 0;
18519            let mut next_offset = offset;
18520            let end_offset = offset + bytes_len;
18521            _next_ordinal_to_read += 1;
18522            if next_offset >= end_offset {
18523                return Ok(());
18524            }
18525
18526            // Decode unknown envelopes for gaps in ordinals.
18527            while _next_ordinal_to_read < 1 {
18528                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18529                _next_ordinal_to_read += 1;
18530                next_offset += envelope_size;
18531            }
18532
18533            let next_out_of_line = decoder.next_out_of_line();
18534            let handles_before = decoder.remaining_handles();
18535            if let Some((inlined, num_bytes, num_handles)) =
18536                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18537            {
18538                let member_inline_size =
18539                    <fidl_fuchsia_net__common::Marks as fidl::encoding::TypeMarker>::inline_size(
18540                        decoder.context,
18541                    );
18542                if inlined != (member_inline_size <= 4) {
18543                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18544                }
18545                let inner_offset;
18546                let mut inner_depth = depth.clone();
18547                if inlined {
18548                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18549                    inner_offset = next_offset;
18550                } else {
18551                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18552                    inner_depth.increment()?;
18553                }
18554                let val_ref = self
18555                    .marks
18556                    .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net__common::Marks, D));
18557                fidl::decode!(
18558                    fidl_fuchsia_net__common::Marks,
18559                    D,
18560                    val_ref,
18561                    decoder,
18562                    inner_offset,
18563                    inner_depth
18564                )?;
18565                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18566                {
18567                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18568                }
18569                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18570                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18571                }
18572            }
18573
18574            next_offset += envelope_size;
18575
18576            // Decode the remaining unknown envelopes.
18577            while next_offset < end_offset {
18578                _next_ordinal_to_read += 1;
18579                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18580                next_offset += envelope_size;
18581            }
18582
18583            Ok(())
18584        }
18585    }
18586
18587    impl SocketRecvControlData {
18588        #[inline(always)]
18589        fn max_ordinal_present(&self) -> u64 {
18590            if let Some(_) = self.timestamp {
18591                return 3;
18592            }
18593            0
18594        }
18595    }
18596
18597    impl fidl::encoding::ValueTypeMarker for SocketRecvControlData {
18598        type Borrowed<'a> = &'a Self;
18599        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18600            value
18601        }
18602    }
18603
18604    unsafe impl fidl::encoding::TypeMarker for SocketRecvControlData {
18605        type Owned = Self;
18606
18607        #[inline(always)]
18608        fn inline_align(_context: fidl::encoding::Context) -> usize {
18609            8
18610        }
18611
18612        #[inline(always)]
18613        fn inline_size(_context: fidl::encoding::Context) -> usize {
18614            16
18615        }
18616    }
18617
18618    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketRecvControlData, D>
18619        for &SocketRecvControlData
18620    {
18621        unsafe fn encode(
18622            self,
18623            encoder: &mut fidl::encoding::Encoder<'_, D>,
18624            offset: usize,
18625            mut depth: fidl::encoding::Depth,
18626        ) -> fidl::Result<()> {
18627            encoder.debug_check_bounds::<SocketRecvControlData>(offset);
18628            // Vector header
18629            let max_ordinal: u64 = self.max_ordinal_present();
18630            encoder.write_num(max_ordinal, offset);
18631            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18632            // Calling encoder.out_of_line_offset(0) is not allowed.
18633            if max_ordinal == 0 {
18634                return Ok(());
18635            }
18636            depth.increment()?;
18637            let envelope_size = 8;
18638            let bytes_len = max_ordinal as usize * envelope_size;
18639            #[allow(unused_variables)]
18640            let offset = encoder.out_of_line_offset(bytes_len);
18641            let mut _prev_end_offset: usize = 0;
18642            if 3 > max_ordinal {
18643                return Ok(());
18644            }
18645
18646            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18647            // are envelope_size bytes.
18648            let cur_offset: usize = (3 - 1) * envelope_size;
18649
18650            // Zero reserved fields.
18651            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18652
18653            // Safety:
18654            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18655            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18656            //   envelope_size bytes, there is always sufficient room.
18657            fidl::encoding::encode_in_envelope_optional::<Timestamp, D>(
18658                self.timestamp.as_ref().map(<Timestamp as fidl::encoding::ValueTypeMarker>::borrow),
18659                encoder,
18660                offset + cur_offset,
18661                depth,
18662            )?;
18663
18664            _prev_end_offset = cur_offset + envelope_size;
18665
18666            Ok(())
18667        }
18668    }
18669
18670    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketRecvControlData {
18671        #[inline(always)]
18672        fn new_empty() -> Self {
18673            Self::default()
18674        }
18675
18676        unsafe fn decode(
18677            &mut self,
18678            decoder: &mut fidl::encoding::Decoder<'_, D>,
18679            offset: usize,
18680            mut depth: fidl::encoding::Depth,
18681        ) -> fidl::Result<()> {
18682            decoder.debug_check_bounds::<Self>(offset);
18683            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18684                None => return Err(fidl::Error::NotNullable),
18685                Some(len) => len,
18686            };
18687            // Calling decoder.out_of_line_offset(0) is not allowed.
18688            if len == 0 {
18689                return Ok(());
18690            };
18691            depth.increment()?;
18692            let envelope_size = 8;
18693            let bytes_len = len * envelope_size;
18694            let offset = decoder.out_of_line_offset(bytes_len)?;
18695            // Decode the envelope for each type.
18696            let mut _next_ordinal_to_read = 0;
18697            let mut next_offset = offset;
18698            let end_offset = offset + bytes_len;
18699            _next_ordinal_to_read += 1;
18700            if next_offset >= end_offset {
18701                return Ok(());
18702            }
18703
18704            // Decode unknown envelopes for gaps in ordinals.
18705            while _next_ordinal_to_read < 3 {
18706                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18707                _next_ordinal_to_read += 1;
18708                next_offset += envelope_size;
18709            }
18710
18711            let next_out_of_line = decoder.next_out_of_line();
18712            let handles_before = decoder.remaining_handles();
18713            if let Some((inlined, num_bytes, num_handles)) =
18714                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18715            {
18716                let member_inline_size =
18717                    <Timestamp as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18718                if inlined != (member_inline_size <= 4) {
18719                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18720                }
18721                let inner_offset;
18722                let mut inner_depth = depth.clone();
18723                if inlined {
18724                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18725                    inner_offset = next_offset;
18726                } else {
18727                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18728                    inner_depth.increment()?;
18729                }
18730                let val_ref = self.timestamp.get_or_insert_with(|| fidl::new_empty!(Timestamp, D));
18731                fidl::decode!(Timestamp, D, val_ref, decoder, inner_offset, inner_depth)?;
18732                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18733                {
18734                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18735                }
18736                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18737                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18738                }
18739            }
18740
18741            next_offset += envelope_size;
18742
18743            // Decode the remaining unknown envelopes.
18744            while next_offset < end_offset {
18745                _next_ordinal_to_read += 1;
18746                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18747                next_offset += envelope_size;
18748            }
18749
18750            Ok(())
18751        }
18752    }
18753
18754    impl SocketSendControlData {
18755        #[inline(always)]
18756        fn max_ordinal_present(&self) -> u64 {
18757            0
18758        }
18759    }
18760
18761    impl fidl::encoding::ValueTypeMarker for SocketSendControlData {
18762        type Borrowed<'a> = &'a Self;
18763        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18764            value
18765        }
18766    }
18767
18768    unsafe impl fidl::encoding::TypeMarker for SocketSendControlData {
18769        type Owned = Self;
18770
18771        #[inline(always)]
18772        fn inline_align(_context: fidl::encoding::Context) -> usize {
18773            8
18774        }
18775
18776        #[inline(always)]
18777        fn inline_size(_context: fidl::encoding::Context) -> usize {
18778            16
18779        }
18780    }
18781
18782    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketSendControlData, D>
18783        for &SocketSendControlData
18784    {
18785        unsafe fn encode(
18786            self,
18787            encoder: &mut fidl::encoding::Encoder<'_, D>,
18788            offset: usize,
18789            mut depth: fidl::encoding::Depth,
18790        ) -> fidl::Result<()> {
18791            encoder.debug_check_bounds::<SocketSendControlData>(offset);
18792            // Vector header
18793            let max_ordinal: u64 = self.max_ordinal_present();
18794            encoder.write_num(max_ordinal, offset);
18795            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18796            // Calling encoder.out_of_line_offset(0) is not allowed.
18797            if max_ordinal == 0 {
18798                return Ok(());
18799            }
18800            depth.increment()?;
18801            let envelope_size = 8;
18802            let bytes_len = max_ordinal as usize * envelope_size;
18803            #[allow(unused_variables)]
18804            let offset = encoder.out_of_line_offset(bytes_len);
18805            let mut _prev_end_offset: usize = 0;
18806
18807            Ok(())
18808        }
18809    }
18810
18811    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketSendControlData {
18812        #[inline(always)]
18813        fn new_empty() -> Self {
18814            Self::default()
18815        }
18816
18817        unsafe fn decode(
18818            &mut self,
18819            decoder: &mut fidl::encoding::Decoder<'_, D>,
18820            offset: usize,
18821            mut depth: fidl::encoding::Depth,
18822        ) -> fidl::Result<()> {
18823            decoder.debug_check_bounds::<Self>(offset);
18824            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18825                None => return Err(fidl::Error::NotNullable),
18826                Some(len) => len,
18827            };
18828            // Calling decoder.out_of_line_offset(0) is not allowed.
18829            if len == 0 {
18830                return Ok(());
18831            };
18832            depth.increment()?;
18833            let envelope_size = 8;
18834            let bytes_len = len * envelope_size;
18835            let offset = decoder.out_of_line_offset(bytes_len)?;
18836            // Decode the envelope for each type.
18837            let mut _next_ordinal_to_read = 0;
18838            let mut next_offset = offset;
18839            let end_offset = offset + bytes_len;
18840
18841            // Decode the remaining unknown envelopes.
18842            while next_offset < end_offset {
18843                _next_ordinal_to_read += 1;
18844                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18845                next_offset += envelope_size;
18846            }
18847
18848            Ok(())
18849        }
18850    }
18851
18852    impl TcpInfo {
18853        #[inline(always)]
18854        fn max_ordinal_present(&self) -> u64 {
18855            if let Some(_) = self.reorder_seen {
18856                return 54;
18857            }
18858            if let Some(_) = self.snd_cwnd {
18859                return 29;
18860            }
18861            if let Some(_) = self.snd_ssthresh {
18862                return 28;
18863            }
18864            if let Some(_) = self.rtt_var_usec {
18865                return 27;
18866            }
18867            if let Some(_) = self.rtt_usec {
18868                return 26;
18869            }
18870            if let Some(_) = self.rto_usec {
18871                return 11;
18872            }
18873            if let Some(_) = self.ca_state {
18874                return 2;
18875            }
18876            if let Some(_) = self.state {
18877                return 1;
18878            }
18879            0
18880        }
18881    }
18882
18883    impl fidl::encoding::ValueTypeMarker for TcpInfo {
18884        type Borrowed<'a> = &'a Self;
18885        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18886            value
18887        }
18888    }
18889
18890    unsafe impl fidl::encoding::TypeMarker for TcpInfo {
18891        type Owned = Self;
18892
18893        #[inline(always)]
18894        fn inline_align(_context: fidl::encoding::Context) -> usize {
18895            8
18896        }
18897
18898        #[inline(always)]
18899        fn inline_size(_context: fidl::encoding::Context) -> usize {
18900            16
18901        }
18902    }
18903
18904    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TcpInfo, D> for &TcpInfo {
18905        unsafe fn encode(
18906            self,
18907            encoder: &mut fidl::encoding::Encoder<'_, D>,
18908            offset: usize,
18909            mut depth: fidl::encoding::Depth,
18910        ) -> fidl::Result<()> {
18911            encoder.debug_check_bounds::<TcpInfo>(offset);
18912            // Vector header
18913            let max_ordinal: u64 = self.max_ordinal_present();
18914            encoder.write_num(max_ordinal, offset);
18915            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18916            // Calling encoder.out_of_line_offset(0) is not allowed.
18917            if max_ordinal == 0 {
18918                return Ok(());
18919            }
18920            depth.increment()?;
18921            let envelope_size = 8;
18922            let bytes_len = max_ordinal as usize * envelope_size;
18923            #[allow(unused_variables)]
18924            let offset = encoder.out_of_line_offset(bytes_len);
18925            let mut _prev_end_offset: usize = 0;
18926            if 1 > max_ordinal {
18927                return Ok(());
18928            }
18929
18930            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18931            // are envelope_size bytes.
18932            let cur_offset: usize = (1 - 1) * envelope_size;
18933
18934            // Zero reserved fields.
18935            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18936
18937            // Safety:
18938            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18939            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18940            //   envelope_size bytes, there is always sufficient room.
18941            fidl::encoding::encode_in_envelope_optional::<TcpState, D>(
18942                self.state.as_ref().map(<TcpState as fidl::encoding::ValueTypeMarker>::borrow),
18943                encoder,
18944                offset + cur_offset,
18945                depth,
18946            )?;
18947
18948            _prev_end_offset = cur_offset + envelope_size;
18949            if 2 > max_ordinal {
18950                return Ok(());
18951            }
18952
18953            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18954            // are envelope_size bytes.
18955            let cur_offset: usize = (2 - 1) * envelope_size;
18956
18957            // Zero reserved fields.
18958            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18959
18960            // Safety:
18961            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18962            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18963            //   envelope_size bytes, there is always sufficient room.
18964            fidl::encoding::encode_in_envelope_optional::<TcpCongestionControlState, D>(
18965                self.ca_state
18966                    .as_ref()
18967                    .map(<TcpCongestionControlState as fidl::encoding::ValueTypeMarker>::borrow),
18968                encoder,
18969                offset + cur_offset,
18970                depth,
18971            )?;
18972
18973            _prev_end_offset = cur_offset + envelope_size;
18974            if 11 > max_ordinal {
18975                return Ok(());
18976            }
18977
18978            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18979            // are envelope_size bytes.
18980            let cur_offset: usize = (11 - 1) * envelope_size;
18981
18982            // Zero reserved fields.
18983            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18984
18985            // Safety:
18986            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18987            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18988            //   envelope_size bytes, there is always sufficient room.
18989            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18990                self.rto_usec.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18991                encoder,
18992                offset + cur_offset,
18993                depth,
18994            )?;
18995
18996            _prev_end_offset = cur_offset + envelope_size;
18997            if 26 > max_ordinal {
18998                return Ok(());
18999            }
19000
19001            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19002            // are envelope_size bytes.
19003            let cur_offset: usize = (26 - 1) * envelope_size;
19004
19005            // Zero reserved fields.
19006            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19007
19008            // Safety:
19009            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19010            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19011            //   envelope_size bytes, there is always sufficient room.
19012            fidl::encoding::encode_in_envelope_optional::<u32, D>(
19013                self.rtt_usec.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
19014                encoder,
19015                offset + cur_offset,
19016                depth,
19017            )?;
19018
19019            _prev_end_offset = cur_offset + envelope_size;
19020            if 27 > max_ordinal {
19021                return Ok(());
19022            }
19023
19024            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19025            // are envelope_size bytes.
19026            let cur_offset: usize = (27 - 1) * envelope_size;
19027
19028            // Zero reserved fields.
19029            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19030
19031            // Safety:
19032            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19033            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19034            //   envelope_size bytes, there is always sufficient room.
19035            fidl::encoding::encode_in_envelope_optional::<u32, D>(
19036                self.rtt_var_usec.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
19037                encoder,
19038                offset + cur_offset,
19039                depth,
19040            )?;
19041
19042            _prev_end_offset = cur_offset + envelope_size;
19043            if 28 > max_ordinal {
19044                return Ok(());
19045            }
19046
19047            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19048            // are envelope_size bytes.
19049            let cur_offset: usize = (28 - 1) * envelope_size;
19050
19051            // Zero reserved fields.
19052            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19053
19054            // Safety:
19055            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19056            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19057            //   envelope_size bytes, there is always sufficient room.
19058            fidl::encoding::encode_in_envelope_optional::<u32, D>(
19059                self.snd_ssthresh.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
19060                encoder,
19061                offset + cur_offset,
19062                depth,
19063            )?;
19064
19065            _prev_end_offset = cur_offset + envelope_size;
19066            if 29 > max_ordinal {
19067                return Ok(());
19068            }
19069
19070            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19071            // are envelope_size bytes.
19072            let cur_offset: usize = (29 - 1) * envelope_size;
19073
19074            // Zero reserved fields.
19075            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19076
19077            // Safety:
19078            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19079            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19080            //   envelope_size bytes, there is always sufficient room.
19081            fidl::encoding::encode_in_envelope_optional::<u32, D>(
19082                self.snd_cwnd.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
19083                encoder,
19084                offset + cur_offset,
19085                depth,
19086            )?;
19087
19088            _prev_end_offset = cur_offset + envelope_size;
19089            if 54 > max_ordinal {
19090                return Ok(());
19091            }
19092
19093            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19094            // are envelope_size bytes.
19095            let cur_offset: usize = (54 - 1) * envelope_size;
19096
19097            // Zero reserved fields.
19098            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19099
19100            // Safety:
19101            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19102            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19103            //   envelope_size bytes, there is always sufficient room.
19104            fidl::encoding::encode_in_envelope_optional::<bool, D>(
19105                self.reorder_seen.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
19106                encoder,
19107                offset + cur_offset,
19108                depth,
19109            )?;
19110
19111            _prev_end_offset = cur_offset + envelope_size;
19112
19113            Ok(())
19114        }
19115    }
19116
19117    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TcpInfo {
19118        #[inline(always)]
19119        fn new_empty() -> Self {
19120            Self::default()
19121        }
19122
19123        unsafe fn decode(
19124            &mut self,
19125            decoder: &mut fidl::encoding::Decoder<'_, D>,
19126            offset: usize,
19127            mut depth: fidl::encoding::Depth,
19128        ) -> fidl::Result<()> {
19129            decoder.debug_check_bounds::<Self>(offset);
19130            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19131                None => return Err(fidl::Error::NotNullable),
19132                Some(len) => len,
19133            };
19134            // Calling decoder.out_of_line_offset(0) is not allowed.
19135            if len == 0 {
19136                return Ok(());
19137            };
19138            depth.increment()?;
19139            let envelope_size = 8;
19140            let bytes_len = len * envelope_size;
19141            let offset = decoder.out_of_line_offset(bytes_len)?;
19142            // Decode the envelope for each type.
19143            let mut _next_ordinal_to_read = 0;
19144            let mut next_offset = offset;
19145            let end_offset = offset + bytes_len;
19146            _next_ordinal_to_read += 1;
19147            if next_offset >= end_offset {
19148                return Ok(());
19149            }
19150
19151            // Decode unknown envelopes for gaps in ordinals.
19152            while _next_ordinal_to_read < 1 {
19153                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19154                _next_ordinal_to_read += 1;
19155                next_offset += envelope_size;
19156            }
19157
19158            let next_out_of_line = decoder.next_out_of_line();
19159            let handles_before = decoder.remaining_handles();
19160            if let Some((inlined, num_bytes, num_handles)) =
19161                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19162            {
19163                let member_inline_size =
19164                    <TcpState as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19165                if inlined != (member_inline_size <= 4) {
19166                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19167                }
19168                let inner_offset;
19169                let mut inner_depth = depth.clone();
19170                if inlined {
19171                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19172                    inner_offset = next_offset;
19173                } else {
19174                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19175                    inner_depth.increment()?;
19176                }
19177                let val_ref = self.state.get_or_insert_with(|| fidl::new_empty!(TcpState, D));
19178                fidl::decode!(TcpState, D, val_ref, decoder, inner_offset, inner_depth)?;
19179                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19180                {
19181                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19182                }
19183                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19184                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19185                }
19186            }
19187
19188            next_offset += envelope_size;
19189            _next_ordinal_to_read += 1;
19190            if next_offset >= end_offset {
19191                return Ok(());
19192            }
19193
19194            // Decode unknown envelopes for gaps in ordinals.
19195            while _next_ordinal_to_read < 2 {
19196                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19197                _next_ordinal_to_read += 1;
19198                next_offset += envelope_size;
19199            }
19200
19201            let next_out_of_line = decoder.next_out_of_line();
19202            let handles_before = decoder.remaining_handles();
19203            if let Some((inlined, num_bytes, num_handles)) =
19204                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19205            {
19206                let member_inline_size =
19207                    <TcpCongestionControlState as fidl::encoding::TypeMarker>::inline_size(
19208                        decoder.context,
19209                    );
19210                if inlined != (member_inline_size <= 4) {
19211                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19212                }
19213                let inner_offset;
19214                let mut inner_depth = depth.clone();
19215                if inlined {
19216                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19217                    inner_offset = next_offset;
19218                } else {
19219                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19220                    inner_depth.increment()?;
19221                }
19222                let val_ref = self
19223                    .ca_state
19224                    .get_or_insert_with(|| fidl::new_empty!(TcpCongestionControlState, D));
19225                fidl::decode!(
19226                    TcpCongestionControlState,
19227                    D,
19228                    val_ref,
19229                    decoder,
19230                    inner_offset,
19231                    inner_depth
19232                )?;
19233                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19234                {
19235                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19236                }
19237                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19238                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19239                }
19240            }
19241
19242            next_offset += envelope_size;
19243            _next_ordinal_to_read += 1;
19244            if next_offset >= end_offset {
19245                return Ok(());
19246            }
19247
19248            // Decode unknown envelopes for gaps in ordinals.
19249            while _next_ordinal_to_read < 11 {
19250                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19251                _next_ordinal_to_read += 1;
19252                next_offset += envelope_size;
19253            }
19254
19255            let next_out_of_line = decoder.next_out_of_line();
19256            let handles_before = decoder.remaining_handles();
19257            if let Some((inlined, num_bytes, num_handles)) =
19258                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19259            {
19260                let member_inline_size =
19261                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19262                if inlined != (member_inline_size <= 4) {
19263                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19264                }
19265                let inner_offset;
19266                let mut inner_depth = depth.clone();
19267                if inlined {
19268                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19269                    inner_offset = next_offset;
19270                } else {
19271                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19272                    inner_depth.increment()?;
19273                }
19274                let val_ref = self.rto_usec.get_or_insert_with(|| fidl::new_empty!(u32, D));
19275                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
19276                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19277                {
19278                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19279                }
19280                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19281                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19282                }
19283            }
19284
19285            next_offset += envelope_size;
19286            _next_ordinal_to_read += 1;
19287            if next_offset >= end_offset {
19288                return Ok(());
19289            }
19290
19291            // Decode unknown envelopes for gaps in ordinals.
19292            while _next_ordinal_to_read < 26 {
19293                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19294                _next_ordinal_to_read += 1;
19295                next_offset += envelope_size;
19296            }
19297
19298            let next_out_of_line = decoder.next_out_of_line();
19299            let handles_before = decoder.remaining_handles();
19300            if let Some((inlined, num_bytes, num_handles)) =
19301                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19302            {
19303                let member_inline_size =
19304                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19305                if inlined != (member_inline_size <= 4) {
19306                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19307                }
19308                let inner_offset;
19309                let mut inner_depth = depth.clone();
19310                if inlined {
19311                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19312                    inner_offset = next_offset;
19313                } else {
19314                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19315                    inner_depth.increment()?;
19316                }
19317                let val_ref = self.rtt_usec.get_or_insert_with(|| fidl::new_empty!(u32, D));
19318                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
19319                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19320                {
19321                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19322                }
19323                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19324                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19325                }
19326            }
19327
19328            next_offset += envelope_size;
19329            _next_ordinal_to_read += 1;
19330            if next_offset >= end_offset {
19331                return Ok(());
19332            }
19333
19334            // Decode unknown envelopes for gaps in ordinals.
19335            while _next_ordinal_to_read < 27 {
19336                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19337                _next_ordinal_to_read += 1;
19338                next_offset += envelope_size;
19339            }
19340
19341            let next_out_of_line = decoder.next_out_of_line();
19342            let handles_before = decoder.remaining_handles();
19343            if let Some((inlined, num_bytes, num_handles)) =
19344                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19345            {
19346                let member_inline_size =
19347                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19348                if inlined != (member_inline_size <= 4) {
19349                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19350                }
19351                let inner_offset;
19352                let mut inner_depth = depth.clone();
19353                if inlined {
19354                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19355                    inner_offset = next_offset;
19356                } else {
19357                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19358                    inner_depth.increment()?;
19359                }
19360                let val_ref = self.rtt_var_usec.get_or_insert_with(|| fidl::new_empty!(u32, D));
19361                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
19362                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19363                {
19364                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19365                }
19366                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19367                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19368                }
19369            }
19370
19371            next_offset += envelope_size;
19372            _next_ordinal_to_read += 1;
19373            if next_offset >= end_offset {
19374                return Ok(());
19375            }
19376
19377            // Decode unknown envelopes for gaps in ordinals.
19378            while _next_ordinal_to_read < 28 {
19379                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19380                _next_ordinal_to_read += 1;
19381                next_offset += envelope_size;
19382            }
19383
19384            let next_out_of_line = decoder.next_out_of_line();
19385            let handles_before = decoder.remaining_handles();
19386            if let Some((inlined, num_bytes, num_handles)) =
19387                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19388            {
19389                let member_inline_size =
19390                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19391                if inlined != (member_inline_size <= 4) {
19392                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19393                }
19394                let inner_offset;
19395                let mut inner_depth = depth.clone();
19396                if inlined {
19397                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19398                    inner_offset = next_offset;
19399                } else {
19400                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19401                    inner_depth.increment()?;
19402                }
19403                let val_ref = self.snd_ssthresh.get_or_insert_with(|| fidl::new_empty!(u32, D));
19404                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
19405                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19406                {
19407                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19408                }
19409                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19410                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19411                }
19412            }
19413
19414            next_offset += envelope_size;
19415            _next_ordinal_to_read += 1;
19416            if next_offset >= end_offset {
19417                return Ok(());
19418            }
19419
19420            // Decode unknown envelopes for gaps in ordinals.
19421            while _next_ordinal_to_read < 29 {
19422                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19423                _next_ordinal_to_read += 1;
19424                next_offset += envelope_size;
19425            }
19426
19427            let next_out_of_line = decoder.next_out_of_line();
19428            let handles_before = decoder.remaining_handles();
19429            if let Some((inlined, num_bytes, num_handles)) =
19430                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19431            {
19432                let member_inline_size =
19433                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19434                if inlined != (member_inline_size <= 4) {
19435                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19436                }
19437                let inner_offset;
19438                let mut inner_depth = depth.clone();
19439                if inlined {
19440                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19441                    inner_offset = next_offset;
19442                } else {
19443                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19444                    inner_depth.increment()?;
19445                }
19446                let val_ref = self.snd_cwnd.get_or_insert_with(|| fidl::new_empty!(u32, D));
19447                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
19448                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19449                {
19450                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19451                }
19452                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19453                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19454                }
19455            }
19456
19457            next_offset += envelope_size;
19458            _next_ordinal_to_read += 1;
19459            if next_offset >= end_offset {
19460                return Ok(());
19461            }
19462
19463            // Decode unknown envelopes for gaps in ordinals.
19464            while _next_ordinal_to_read < 54 {
19465                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19466                _next_ordinal_to_read += 1;
19467                next_offset += envelope_size;
19468            }
19469
19470            let next_out_of_line = decoder.next_out_of_line();
19471            let handles_before = decoder.remaining_handles();
19472            if let Some((inlined, num_bytes, num_handles)) =
19473                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19474            {
19475                let member_inline_size =
19476                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19477                if inlined != (member_inline_size <= 4) {
19478                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19479                }
19480                let inner_offset;
19481                let mut inner_depth = depth.clone();
19482                if inlined {
19483                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19484                    inner_offset = next_offset;
19485                } else {
19486                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19487                    inner_depth.increment()?;
19488                }
19489                let val_ref = self.reorder_seen.get_or_insert_with(|| fidl::new_empty!(bool, D));
19490                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
19491                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19492                {
19493                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19494                }
19495                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19496                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19497                }
19498            }
19499
19500            next_offset += envelope_size;
19501
19502            // Decode the remaining unknown envelopes.
19503            while next_offset < end_offset {
19504                _next_ordinal_to_read += 1;
19505                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19506                next_offset += envelope_size;
19507            }
19508
19509            Ok(())
19510        }
19511    }
19512
19513    impl fidl::encoding::ValueTypeMarker for OptionalUint32 {
19514        type Borrowed<'a> = &'a Self;
19515        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19516            value
19517        }
19518    }
19519
19520    unsafe impl fidl::encoding::TypeMarker for OptionalUint32 {
19521        type Owned = Self;
19522
19523        #[inline(always)]
19524        fn inline_align(_context: fidl::encoding::Context) -> usize {
19525            8
19526        }
19527
19528        #[inline(always)]
19529        fn inline_size(_context: fidl::encoding::Context) -> usize {
19530            16
19531        }
19532    }
19533
19534    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalUint32, D>
19535        for &OptionalUint32
19536    {
19537        #[inline]
19538        unsafe fn encode(
19539            self,
19540            encoder: &mut fidl::encoding::Encoder<'_, D>,
19541            offset: usize,
19542            _depth: fidl::encoding::Depth,
19543        ) -> fidl::Result<()> {
19544            encoder.debug_check_bounds::<OptionalUint32>(offset);
19545            encoder.write_num::<u64>(self.ordinal(), offset);
19546            match self {
19547                OptionalUint32::Value(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
19548                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
19549                    encoder,
19550                    offset + 8,
19551                    _depth,
19552                ),
19553                OptionalUint32::Unset(ref val) => fidl::encoding::encode_in_envelope::<Empty, D>(
19554                    <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
19555                    encoder,
19556                    offset + 8,
19557                    _depth,
19558                ),
19559            }
19560        }
19561    }
19562
19563    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalUint32 {
19564        #[inline(always)]
19565        fn new_empty() -> Self {
19566            Self::Value(fidl::new_empty!(u32, D))
19567        }
19568
19569        #[inline]
19570        unsafe fn decode(
19571            &mut self,
19572            decoder: &mut fidl::encoding::Decoder<'_, D>,
19573            offset: usize,
19574            mut depth: fidl::encoding::Depth,
19575        ) -> fidl::Result<()> {
19576            decoder.debug_check_bounds::<Self>(offset);
19577            #[allow(unused_variables)]
19578            let next_out_of_line = decoder.next_out_of_line();
19579            let handles_before = decoder.remaining_handles();
19580            let (ordinal, inlined, num_bytes, num_handles) =
19581                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
19582
19583            let member_inline_size = match ordinal {
19584                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19585                2 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19586                _ => return Err(fidl::Error::UnknownUnionTag),
19587            };
19588
19589            if inlined != (member_inline_size <= 4) {
19590                return Err(fidl::Error::InvalidInlineBitInEnvelope);
19591            }
19592            let _inner_offset;
19593            if inlined {
19594                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
19595                _inner_offset = offset + 8;
19596            } else {
19597                depth.increment()?;
19598                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19599            }
19600            match ordinal {
19601                1 => {
19602                    #[allow(irrefutable_let_patterns)]
19603                    if let OptionalUint32::Value(_) = self {
19604                        // Do nothing, read the value into the object
19605                    } else {
19606                        // Initialize `self` to the right variant
19607                        *self = OptionalUint32::Value(fidl::new_empty!(u32, D));
19608                    }
19609                    #[allow(irrefutable_let_patterns)]
19610                    if let OptionalUint32::Value(ref mut val) = self {
19611                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
19612                    } else {
19613                        unreachable!()
19614                    }
19615                }
19616                2 => {
19617                    #[allow(irrefutable_let_patterns)]
19618                    if let OptionalUint32::Unset(_) = self {
19619                        // Do nothing, read the value into the object
19620                    } else {
19621                        // Initialize `self` to the right variant
19622                        *self = OptionalUint32::Unset(fidl::new_empty!(Empty, D));
19623                    }
19624                    #[allow(irrefutable_let_patterns)]
19625                    if let OptionalUint32::Unset(ref mut val) = self {
19626                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
19627                    } else {
19628                        unreachable!()
19629                    }
19630                }
19631                ordinal => panic!("unexpected ordinal {:?}", ordinal),
19632            }
19633            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
19634                return Err(fidl::Error::InvalidNumBytesInEnvelope);
19635            }
19636            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19637                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19638            }
19639            Ok(())
19640        }
19641    }
19642
19643    impl fidl::encoding::ValueTypeMarker for OptionalUint8 {
19644        type Borrowed<'a> = &'a Self;
19645        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19646            value
19647        }
19648    }
19649
19650    unsafe impl fidl::encoding::TypeMarker for OptionalUint8 {
19651        type Owned = Self;
19652
19653        #[inline(always)]
19654        fn inline_align(_context: fidl::encoding::Context) -> usize {
19655            8
19656        }
19657
19658        #[inline(always)]
19659        fn inline_size(_context: fidl::encoding::Context) -> usize {
19660            16
19661        }
19662    }
19663
19664    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalUint8, D>
19665        for &OptionalUint8
19666    {
19667        #[inline]
19668        unsafe fn encode(
19669            self,
19670            encoder: &mut fidl::encoding::Encoder<'_, D>,
19671            offset: usize,
19672            _depth: fidl::encoding::Depth,
19673        ) -> fidl::Result<()> {
19674            encoder.debug_check_bounds::<OptionalUint8>(offset);
19675            encoder.write_num::<u64>(self.ordinal(), offset);
19676            match self {
19677                OptionalUint8::Value(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
19678                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
19679                    encoder,
19680                    offset + 8,
19681                    _depth,
19682                ),
19683                OptionalUint8::Unset(ref val) => fidl::encoding::encode_in_envelope::<Empty, D>(
19684                    <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
19685                    encoder,
19686                    offset + 8,
19687                    _depth,
19688                ),
19689            }
19690        }
19691    }
19692
19693    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalUint8 {
19694        #[inline(always)]
19695        fn new_empty() -> Self {
19696            Self::Value(fidl::new_empty!(u8, D))
19697        }
19698
19699        #[inline]
19700        unsafe fn decode(
19701            &mut self,
19702            decoder: &mut fidl::encoding::Decoder<'_, D>,
19703            offset: usize,
19704            mut depth: fidl::encoding::Depth,
19705        ) -> fidl::Result<()> {
19706            decoder.debug_check_bounds::<Self>(offset);
19707            #[allow(unused_variables)]
19708            let next_out_of_line = decoder.next_out_of_line();
19709            let handles_before = decoder.remaining_handles();
19710            let (ordinal, inlined, num_bytes, num_handles) =
19711                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
19712
19713            let member_inline_size = match ordinal {
19714                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19715                2 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19716                _ => return Err(fidl::Error::UnknownUnionTag),
19717            };
19718
19719            if inlined != (member_inline_size <= 4) {
19720                return Err(fidl::Error::InvalidInlineBitInEnvelope);
19721            }
19722            let _inner_offset;
19723            if inlined {
19724                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
19725                _inner_offset = offset + 8;
19726            } else {
19727                depth.increment()?;
19728                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19729            }
19730            match ordinal {
19731                1 => {
19732                    #[allow(irrefutable_let_patterns)]
19733                    if let OptionalUint8::Value(_) = self {
19734                        // Do nothing, read the value into the object
19735                    } else {
19736                        // Initialize `self` to the right variant
19737                        *self = OptionalUint8::Value(fidl::new_empty!(u8, D));
19738                    }
19739                    #[allow(irrefutable_let_patterns)]
19740                    if let OptionalUint8::Value(ref mut val) = self {
19741                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
19742                    } else {
19743                        unreachable!()
19744                    }
19745                }
19746                2 => {
19747                    #[allow(irrefutable_let_patterns)]
19748                    if let OptionalUint8::Unset(_) = self {
19749                        // Do nothing, read the value into the object
19750                    } else {
19751                        // Initialize `self` to the right variant
19752                        *self = OptionalUint8::Unset(fidl::new_empty!(Empty, D));
19753                    }
19754                    #[allow(irrefutable_let_patterns)]
19755                    if let OptionalUint8::Unset(ref mut val) = self {
19756                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
19757                    } else {
19758                        unreachable!()
19759                    }
19760                }
19761                ordinal => panic!("unexpected ordinal {:?}", ordinal),
19762            }
19763            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
19764                return Err(fidl::Error::InvalidNumBytesInEnvelope);
19765            }
19766            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19767                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19768            }
19769            Ok(())
19770        }
19771    }
19772}