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 type TcpState = fidl_fuchsia_net_tcp__common::State;
12
13/// Legacy protocol name. Use the generated discoverable protocol name instead.
14pub const DATAGRAM_SOCKET_PROTOCOL_NAME: &str = "fuchsia.posix.socket/DatagramSocket";
15
16/// Constant bounding the number of eventpairs returned by Netstack to clients
17/// of the fast protocol.
18///
19/// Set equal to `ZX_WAIT_MANY_MAXIMUM_ITEMS` - 1, where `ZX_WAIT_MANY_MAXIMUM_ITEMS`
20/// is defined in `//zircon/system/public/zircon/types.h` and bounds the number of eventpairs
21/// in a single call to `zx_object_wait_many`. The bias leaves room to allow clients to wait
22/// for errors on the zircon socket in the same call.
23pub const FAST_UDP_WAIT_MANY_MAXIMUM_ITEMS: u32 = 63;
24
25pub const SIGNAL_DATAGRAM_ERROR: u32 = USER_SIGNAL_2 as u32;
26
27pub const SIGNAL_DATAGRAM_INCOMING: u32 = USER_SIGNAL_0 as u32;
28
29pub const SIGNAL_DATAGRAM_OUTGOING: u32 = USER_SIGNAL_1 as u32;
30
31pub const SIGNAL_DATAGRAM_SHUTDOWN_READ: u32 = USER_SIGNAL_4 as u32;
32
33pub const SIGNAL_DATAGRAM_SHUTDOWN_WRITE: u32 = USER_SIGNAL_5 as u32;
34
35pub const SIGNAL_STREAM_CONNECTED: u32 = USER_SIGNAL_3 as u32;
36
37pub const SIGNAL_STREAM_INCOMING: u32 = USER_SIGNAL_0 as u32;
38
39/// Legacy protocol name. Use the generated discoverable protocol name instead.
40pub const STREAM_SOCKET_PROTOCOL_NAME: &str = "fuchsia.posix.socket/StreamSocket";
41
42/// Legacy protocol name. Use the generated discoverable protocol name instead.
43pub const SYNCHRONOUS_DATAGRAM_SOCKET_PROTOCOL_NAME: &str =
44    "fuchsia.posix.socket/SynchronousDatagramSocket";
45
46pub const USER_SIGNAL_0: u32 = 16777216;
47
48pub const USER_SIGNAL_1: u32 = 33554432;
49
50pub const USER_SIGNAL_2: u32 = 67108864;
51
52pub const USER_SIGNAL_3: u32 = 134217728;
53
54pub const USER_SIGNAL_4: u32 = 268435456;
55
56pub const USER_SIGNAL_5: u32 = 536870912;
57
58bitflags! {
59    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
60    pub struct CmsgRequests: u32 {
61        /// Identifies whether the `IP_RECVTOS` control message is requested.
62        const IP_TOS = 1;
63        /// Identifies whether the `IP_RECVTTL` control message is requested.
64        const IP_TTL = 2;
65        /// Identifies whether the `IPV6_RECVTCLASS` control message is requested.
66        const IPV6_TCLASS = 4;
67        /// Identifies whether the `IPV6_RECVHOPLIMIT` control message is requested.
68        const IPV6_HOPLIMIT = 8;
69        /// Identifies whether the `IPV6_RECVPKTINFO` control message is requested.
70        const IPV6_PKTINFO = 16;
71        /// Identifies whether the `IP_RECVORIGDSTADDR` control message is requested.
72        const IP_RECVORIGDSTADDR = 32;
73    }
74}
75
76impl CmsgRequests {
77    #[inline(always)]
78    pub fn from_bits_allow_unknown(bits: u32) -> Self {
79        Self::from_bits_retain(bits)
80    }
81
82    #[inline(always)]
83    pub fn has_unknown_bits(&self) -> bool {
84        self.get_unknown_bits() != 0
85    }
86
87    #[inline(always)]
88    pub fn get_unknown_bits(&self) -> u32 {
89        self.bits() & !Self::all().bits()
90    }
91}
92
93bitflags! {
94    /// Bits representing the interface flags as returned by the SIOCGIFFLAGS ioctl
95    /// operation. These bitmasks are intended to track the C API definition. For
96    /// example, `InterfaceFlags.UP` corresponds to `IFF_UP`, etc.
97    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
98    pub struct InterfaceFlags: u16 {
99        const UP = 1;
100        const BROADCAST = 2;
101        const DEBUG = 4;
102        const LOOPBACK = 8;
103        const POINTTOPOINT = 16;
104        const NOTRAILERS = 32;
105        const RUNNING = 64;
106        const NOARP = 128;
107        const PROMISC = 256;
108        const ALLMULTI = 512;
109        const LEADER = 1024;
110        const FOLLOWER = 2048;
111        const MULTICAST = 4096;
112        const PORTSEL = 8192;
113        const AUTOMEDIA = 16384;
114        const DYNAMIC = 32768;
115    }
116}
117
118impl InterfaceFlags {}
119
120bitflags! {
121    /// Flags controlling RecvMsg behavior.
122    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
123    pub struct RecvMsgFlags: u16 {
124        /// Returns data from the receive queue without removing from it.
125        ///
126        /// Equivalent to `MSG_PEEK`.
127        const PEEK = 2;
128    }
129}
130
131impl RecvMsgFlags {}
132
133bitflags! {
134    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
135    pub struct SendMsgFlags: u16 {
136        const RESERVED = 32768;
137    }
138}
139
140impl SendMsgFlags {}
141
142bitflags! {
143    /// Socket shutdown mode.
144    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
145    pub struct ShutdownMode: u16 {
146        /// Shutdown socket read endpoint.
147        const READ = 1;
148        /// Shutdown socket write endpoint.
149        const WRITE = 2;
150    }
151}
152
153impl ShutdownMode {}
154
155/// Protocols supported by [`fuchsia.posix.socket/DatagramSocket`].
156///
157/// `DatagramSocketProtocol` enumerates the protocols supported by the network
158/// stack over datagram sockets.
159#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
160#[repr(u32)]
161pub enum DatagramSocketProtocol {
162    /// UDP (User Datagram Protocol).
163    ///
164    /// A UDP socket is equivalent to the POSIX API of `SOCK_DGRAM` with a
165    /// protocol of 0 or `IPPROTO_UDP`.
166    Udp = 1,
167    /// ICMP (Internet Control Message Protocol) echo.
168    ///
169    /// An ICMP echo socket is equivalent to the POSIX API of `SOCK_DGRAM` with
170    /// a protocol of `IPPROTO_ICMP` `IPPROTO_ICMPV6` (depending on provided
171    /// domain).
172    ///
173    /// Datagrams sent over an ICMP echo socket *must* have a valid ICMP or
174    /// ICMPv6 echo header.
175    IcmpEcho = 2,
176}
177
178impl DatagramSocketProtocol {
179    #[inline]
180    pub fn from_primitive(prim: u32) -> Option<Self> {
181        match prim {
182            1 => Some(Self::Udp),
183            2 => Some(Self::IcmpEcho),
184            _ => None,
185        }
186    }
187
188    #[inline]
189    pub const fn into_primitive(self) -> u32 {
190        self as u32
191    }
192}
193
194/// A socket's domain.
195///
196/// Determines the addressing domain for a socket.
197#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
198#[repr(i16)]
199pub enum Domain {
200    /// An IPv4 socket. Equivalent to `AF_INET`.
201    Ipv4 = 0,
202    /// An IPv6 socket. Equivalent to `AF_INET6`.
203    Ipv6 = 1,
204}
205
206impl Domain {
207    #[inline]
208    pub fn from_primitive(prim: i16) -> Option<Self> {
209        match prim {
210            0 => Some(Self::Ipv4),
211            1 => Some(Self::Ipv6),
212            _ => None,
213        }
214    }
215
216    #[inline]
217    pub const fn into_primitive(self) -> i16 {
218        self as i16
219    }
220}
221
222/// Protocols supported by [`fuchsia.posix.socket/StreamSocket`].
223///
224/// `StreamSocketProtocol` enumerates the protocols supported by the network
225/// stack over stream sockets.
226#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
227#[repr(u32)]
228pub enum StreamSocketProtocol {
229    /// TCP (Transmission Control Protocol).
230    ///
231    /// A TCP socket is equivalent to the POSIX API of `SOCK_STREAM` with a
232    /// protocol of 0 or `IPPROTO_TCP`.
233    Tcp = 0,
234}
235
236impl StreamSocketProtocol {
237    #[inline]
238    pub fn from_primitive(prim: u32) -> Option<Self> {
239        match prim {
240            0 => Some(Self::Tcp),
241            _ => None,
242        }
243    }
244
245    #[inline]
246    pub const fn into_primitive(self) -> u32 {
247        self as u32
248    }
249}
250
251/// TCP congestion control modes.
252#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
253#[repr(u32)]
254pub enum TcpCongestionControl {
255    Reno = 1,
256    Cubic = 2,
257}
258
259impl TcpCongestionControl {
260    #[inline]
261    pub fn from_primitive(prim: u32) -> Option<Self> {
262        match prim {
263            1 => Some(Self::Reno),
264            2 => Some(Self::Cubic),
265            _ => None,
266        }
267    }
268
269    #[inline]
270    pub const fn into_primitive(self) -> u32 {
271        self as u32
272    }
273}
274
275/// TCP congestion control state machine state.
276#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
277#[repr(u32)]
278pub enum TcpCongestionControlState {
279    Open = 0,
280    Disorder = 1,
281    CongestionWindowReduced = 2,
282    Recovery = 3,
283    Loss = 4,
284}
285
286impl TcpCongestionControlState {
287    #[inline]
288    pub fn from_primitive(prim: u32) -> Option<Self> {
289        match prim {
290            0 => Some(Self::Open),
291            1 => Some(Self::Disorder),
292            2 => Some(Self::CongestionWindowReduced),
293            3 => Some(Self::Recovery),
294            4 => Some(Self::Loss),
295            _ => None,
296        }
297    }
298
299    #[inline]
300    pub const fn into_primitive(self) -> u32 {
301        self as u32
302    }
303}
304
305/// Packet timestamp reporting precision options.
306#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
307#[repr(u32)]
308pub enum TimestampOption {
309    /// Do not report timestamp.
310    Disabled = 0,
311    /// Report timestamp with nanosecond precision.
312    Nanosecond = 1,
313    /// Report timestamp with microsecond precision.
314    Microsecond = 2,
315}
316
317impl TimestampOption {
318    #[inline]
319    pub fn from_primitive(prim: u32) -> Option<Self> {
320        match prim {
321            0 => Some(Self::Disabled),
322            1 => Some(Self::Nanosecond),
323            2 => Some(Self::Microsecond),
324            _ => None,
325        }
326    }
327
328    #[inline]
329    pub const fn into_primitive(self) -> u32 {
330        self as u32
331    }
332}
333
334#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
335pub enum UdpMetadataEncodingProtocolVersion {
336    Zero,
337    #[doc(hidden)]
338    __SourceBreaking {
339        unknown_ordinal: u16,
340    },
341}
342
343/// Pattern that matches an unknown `UdpMetadataEncodingProtocolVersion` member.
344#[macro_export]
345macro_rules! UdpMetadataEncodingProtocolVersionUnknown {
346    () => {
347        _
348    };
349}
350
351impl UdpMetadataEncodingProtocolVersion {
352    #[inline]
353    pub fn from_primitive(prim: u16) -> Option<Self> {
354        match prim {
355            0 => Some(Self::Zero),
356            _ => None,
357        }
358    }
359
360    #[inline]
361    pub fn from_primitive_allow_unknown(prim: u16) -> Self {
362        match prim {
363            0 => Self::Zero,
364            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
365        }
366    }
367
368    #[inline]
369    pub fn unknown() -> Self {
370        Self::__SourceBreaking { unknown_ordinal: 0xffff }
371    }
372
373    #[inline]
374    pub const fn into_primitive(self) -> u16 {
375        match self {
376            Self::Zero => 0,
377            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
378        }
379    }
380
381    #[inline]
382    pub fn is_unknown(&self) -> bool {
383        match self {
384            Self::__SourceBreaking { unknown_ordinal: _ } => true,
385            _ => false,
386        }
387    }
388}
389
390#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
391pub struct BaseDatagramSocketGetInfoResponse {
392    pub domain: Domain,
393    pub proto: DatagramSocketProtocol,
394}
395
396impl fidl::Persistable for BaseDatagramSocketGetInfoResponse {}
397
398#[derive(Clone, Debug, PartialEq)]
399pub struct BaseNetworkSocketAddIpMembershipRequest {
400    pub membership: IpMulticastMembership,
401}
402
403impl fidl::Persistable for BaseNetworkSocketAddIpMembershipRequest {}
404
405#[derive(Clone, Debug, PartialEq)]
406pub struct BaseNetworkSocketAddIpv6MembershipRequest {
407    pub membership: Ipv6MulticastMembership,
408}
409
410impl fidl::Persistable for BaseNetworkSocketAddIpv6MembershipRequest {}
411
412#[derive(Clone, Debug, PartialEq)]
413pub struct BaseNetworkSocketBindRequest {
414    pub addr: fidl_fuchsia_net__common::SocketAddress,
415}
416
417impl fidl::Persistable for BaseNetworkSocketBindRequest {}
418
419#[derive(Clone, Debug, PartialEq)]
420pub struct BaseNetworkSocketConnectRequest {
421    pub addr: fidl_fuchsia_net__common::SocketAddress,
422}
423
424impl fidl::Persistable for BaseNetworkSocketConnectRequest {}
425
426#[derive(Clone, Debug, PartialEq)]
427pub struct BaseNetworkSocketDropIpMembershipRequest {
428    pub membership: IpMulticastMembership,
429}
430
431impl fidl::Persistable for BaseNetworkSocketDropIpMembershipRequest {}
432
433#[derive(Clone, Debug, PartialEq)]
434pub struct BaseNetworkSocketDropIpv6MembershipRequest {
435    pub membership: Ipv6MulticastMembership,
436}
437
438impl fidl::Persistable for BaseNetworkSocketDropIpv6MembershipRequest {}
439
440#[derive(Clone, Debug, PartialEq)]
441pub struct BaseNetworkSocketSetIpMulticastInterfaceRequest {
442    pub iface: u64,
443    pub address: fidl_fuchsia_net__common::Ipv4Address,
444}
445
446impl fidl::Persistable for BaseNetworkSocketSetIpMulticastInterfaceRequest {}
447
448#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
449pub struct BaseNetworkSocketSetIpMulticastLoopbackRequest {
450    pub value: bool,
451}
452
453impl fidl::Persistable for BaseNetworkSocketSetIpMulticastLoopbackRequest {}
454
455#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
456pub struct BaseNetworkSocketSetIpMulticastTtlRequest {
457    pub value: OptionalUint8,
458}
459
460impl fidl::Persistable for BaseNetworkSocketSetIpMulticastTtlRequest {}
461
462#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
463pub struct BaseNetworkSocketSetIpPacketInfoRequest {
464    pub value: bool,
465}
466
467impl fidl::Persistable for BaseNetworkSocketSetIpPacketInfoRequest {}
468
469#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
470pub struct BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest {
471    pub value: bool,
472}
473
474impl fidl::Persistable for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest {}
475
476#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
477pub struct BaseNetworkSocketSetIpReceiveTtlRequest {
478    pub value: bool,
479}
480
481impl fidl::Persistable for BaseNetworkSocketSetIpReceiveTtlRequest {}
482
483#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
484pub struct BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
485    pub value: bool,
486}
487
488impl fidl::Persistable for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {}
489
490#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
491pub struct BaseNetworkSocketSetIpTransparentRequest {
492    pub value: bool,
493}
494
495impl fidl::Persistable for BaseNetworkSocketSetIpTransparentRequest {}
496
497#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
498pub struct BaseNetworkSocketSetIpTtlRequest {
499    pub value: OptionalUint8,
500}
501
502impl fidl::Persistable for BaseNetworkSocketSetIpTtlRequest {}
503
504#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
505#[repr(C)]
506pub struct BaseNetworkSocketSetIpTypeOfServiceRequest {
507    pub value: u8,
508}
509
510impl fidl::Persistable for BaseNetworkSocketSetIpTypeOfServiceRequest {}
511
512#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
513pub struct BaseNetworkSocketSetIpv6MulticastHopsRequest {
514    pub value: OptionalUint8,
515}
516
517impl fidl::Persistable for BaseNetworkSocketSetIpv6MulticastHopsRequest {}
518
519#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
520#[repr(C)]
521pub struct BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
522    pub value: u64,
523}
524
525impl fidl::Persistable for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {}
526
527#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
528pub struct BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
529    pub value: bool,
530}
531
532impl fidl::Persistable for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {}
533
534#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
535pub struct BaseNetworkSocketSetIpv6OnlyRequest {
536    pub value: bool,
537}
538
539impl fidl::Persistable for BaseNetworkSocketSetIpv6OnlyRequest {}
540
541#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
542pub struct BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
543    pub value: bool,
544}
545
546impl fidl::Persistable for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {}
547
548#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
549pub struct BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
550    pub value: bool,
551}
552
553impl fidl::Persistable for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {}
554
555#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
556pub struct BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
557    pub value: bool,
558}
559
560impl fidl::Persistable for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {}
561
562#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
563pub struct BaseNetworkSocketSetIpv6TrafficClassRequest {
564    pub value: OptionalUint8,
565}
566
567impl fidl::Persistable for BaseNetworkSocketSetIpv6TrafficClassRequest {}
568
569#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
570pub struct BaseNetworkSocketSetIpv6UnicastHopsRequest {
571    pub value: OptionalUint8,
572}
573
574impl fidl::Persistable for BaseNetworkSocketSetIpv6UnicastHopsRequest {}
575
576#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
577pub struct BaseNetworkSocketShutdownRequest {
578    pub mode: ShutdownMode,
579}
580
581impl fidl::Persistable for BaseNetworkSocketShutdownRequest {}
582
583#[derive(Clone, Debug, PartialEq)]
584pub struct BaseNetworkSocketGetIpMulticastInterfaceResponse {
585    pub value: fidl_fuchsia_net__common::Ipv4Address,
586}
587
588impl fidl::Persistable for BaseNetworkSocketGetIpMulticastInterfaceResponse {}
589
590#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
591pub struct BaseNetworkSocketGetIpMulticastLoopbackResponse {
592    pub value: bool,
593}
594
595impl fidl::Persistable for BaseNetworkSocketGetIpMulticastLoopbackResponse {}
596
597#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
598#[repr(C)]
599pub struct BaseNetworkSocketGetIpMulticastTtlResponse {
600    pub value: u8,
601}
602
603impl fidl::Persistable for BaseNetworkSocketGetIpMulticastTtlResponse {}
604
605#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
606pub struct BaseNetworkSocketGetIpPacketInfoResponse {
607    pub value: bool,
608}
609
610impl fidl::Persistable for BaseNetworkSocketGetIpPacketInfoResponse {}
611
612#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
613pub struct BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse {
614    pub value: bool,
615}
616
617impl fidl::Persistable for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse {}
618
619#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
620pub struct BaseNetworkSocketGetIpReceiveTtlResponse {
621    pub value: bool,
622}
623
624impl fidl::Persistable for BaseNetworkSocketGetIpReceiveTtlResponse {}
625
626#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
627pub struct BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
628    pub value: bool,
629}
630
631impl fidl::Persistable for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {}
632
633#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
634pub struct BaseNetworkSocketGetIpTransparentResponse {
635    pub value: bool,
636}
637
638impl fidl::Persistable for BaseNetworkSocketGetIpTransparentResponse {}
639
640#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
641#[repr(C)]
642pub struct BaseNetworkSocketGetIpTtlResponse {
643    pub value: u8,
644}
645
646impl fidl::Persistable for BaseNetworkSocketGetIpTtlResponse {}
647
648#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
649#[repr(C)]
650pub struct BaseNetworkSocketGetIpTypeOfServiceResponse {
651    pub value: u8,
652}
653
654impl fidl::Persistable for BaseNetworkSocketGetIpTypeOfServiceResponse {}
655
656#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
657#[repr(C)]
658pub struct BaseNetworkSocketGetIpv6MulticastHopsResponse {
659    pub value: u8,
660}
661
662impl fidl::Persistable for BaseNetworkSocketGetIpv6MulticastHopsResponse {}
663
664#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
665#[repr(C)]
666pub struct BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
667    pub value: u64,
668}
669
670impl fidl::Persistable for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {}
671
672#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
673pub struct BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
674    pub value: bool,
675}
676
677impl fidl::Persistable for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {}
678
679#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
680pub struct BaseNetworkSocketGetIpv6OnlyResponse {
681    pub value: bool,
682}
683
684impl fidl::Persistable for BaseNetworkSocketGetIpv6OnlyResponse {}
685
686#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
687pub struct BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
688    pub value: bool,
689}
690
691impl fidl::Persistable for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {}
692
693#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
694pub struct BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
695    pub value: bool,
696}
697
698impl fidl::Persistable for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {}
699
700#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
701pub struct BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
702    pub value: bool,
703}
704
705impl fidl::Persistable for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {}
706
707#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
708#[repr(C)]
709pub struct BaseNetworkSocketGetIpv6TrafficClassResponse {
710    pub value: u8,
711}
712
713impl fidl::Persistable for BaseNetworkSocketGetIpv6TrafficClassResponse {}
714
715#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
716#[repr(C)]
717pub struct BaseNetworkSocketGetIpv6UnicastHopsResponse {
718    pub value: u8,
719}
720
721impl fidl::Persistable for BaseNetworkSocketGetIpv6UnicastHopsResponse {}
722
723#[derive(Clone, Debug, PartialEq)]
724pub struct BaseNetworkSocketGetOriginalDestinationResponse {
725    pub value: fidl_fuchsia_net__common::SocketAddress,
726}
727
728impl fidl::Persistable for BaseNetworkSocketGetOriginalDestinationResponse {}
729
730#[derive(Clone, Debug, PartialEq)]
731pub struct BaseNetworkSocketGetPeerNameResponse {
732    pub addr: fidl_fuchsia_net__common::SocketAddress,
733}
734
735impl fidl::Persistable for BaseNetworkSocketGetPeerNameResponse {}
736
737#[derive(Clone, Debug, PartialEq)]
738pub struct BaseNetworkSocketGetSockNameResponse {
739    pub addr: fidl_fuchsia_net__common::SocketAddress,
740}
741
742impl fidl::Persistable for BaseNetworkSocketGetSockNameResponse {}
743
744#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
745pub struct BaseSocketGetMarkRequest {
746    pub domain: fidl_fuchsia_net__common::MarkDomain,
747}
748
749impl fidl::Persistable for BaseSocketGetMarkRequest {}
750
751#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
752pub struct BaseSocketSetBindToDeviceRequest {
753    pub value: String,
754}
755
756impl fidl::Persistable for BaseSocketSetBindToDeviceRequest {}
757
758#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
759#[repr(C)]
760pub struct BaseSocketSetBindToInterfaceIndexRequest {
761    pub value: u64,
762}
763
764impl fidl::Persistable for BaseSocketSetBindToInterfaceIndexRequest {}
765
766#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
767pub struct BaseSocketSetBroadcastRequest {
768    pub value: bool,
769}
770
771impl fidl::Persistable for BaseSocketSetBroadcastRequest {}
772
773#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
774pub struct BaseSocketSetKeepAliveRequest {
775    pub value: bool,
776}
777
778impl fidl::Persistable for BaseSocketSetKeepAliveRequest {}
779
780#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
781pub struct BaseSocketSetLingerRequest {
782    pub linger: bool,
783    pub length_secs: u32,
784}
785
786impl fidl::Persistable for BaseSocketSetLingerRequest {}
787
788#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
789pub struct BaseSocketSetMarkRequest {
790    pub domain: fidl_fuchsia_net__common::MarkDomain,
791    pub mark: OptionalUint32,
792}
793
794impl fidl::Persistable for BaseSocketSetMarkRequest {}
795
796#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
797pub struct BaseSocketSetNoCheckRequest {
798    pub value: bool,
799}
800
801impl fidl::Persistable for BaseSocketSetNoCheckRequest {}
802
803#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
804pub struct BaseSocketSetOutOfBandInlineRequest {
805    pub value: bool,
806}
807
808impl fidl::Persistable for BaseSocketSetOutOfBandInlineRequest {}
809
810#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
811#[repr(C)]
812pub struct BaseSocketSetReceiveBufferRequest {
813    pub value_bytes: u64,
814}
815
816impl fidl::Persistable for BaseSocketSetReceiveBufferRequest {}
817
818#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
819pub struct BaseSocketSetReuseAddressRequest {
820    pub value: bool,
821}
822
823impl fidl::Persistable for BaseSocketSetReuseAddressRequest {}
824
825#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
826pub struct BaseSocketSetReusePortRequest {
827    pub value: bool,
828}
829
830impl fidl::Persistable for BaseSocketSetReusePortRequest {}
831
832#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
833#[repr(C)]
834pub struct BaseSocketSetSendBufferRequest {
835    pub value_bytes: u64,
836}
837
838impl fidl::Persistable for BaseSocketSetSendBufferRequest {}
839
840#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
841pub struct BaseSocketSetTimestampRequest {
842    pub value: TimestampOption,
843}
844
845impl fidl::Persistable for BaseSocketSetTimestampRequest {}
846
847#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
848pub struct BaseSocketGetAcceptConnResponse {
849    pub value: bool,
850}
851
852impl fidl::Persistable for BaseSocketGetAcceptConnResponse {}
853
854#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
855pub struct BaseSocketGetBindToDeviceResponse {
856    pub value: String,
857}
858
859impl fidl::Persistable for BaseSocketGetBindToDeviceResponse {}
860
861#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
862#[repr(C)]
863pub struct BaseSocketGetBindToInterfaceIndexResponse {
864    pub value: u64,
865}
866
867impl fidl::Persistable for BaseSocketGetBindToInterfaceIndexResponse {}
868
869#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
870pub struct BaseSocketGetBroadcastResponse {
871    pub value: bool,
872}
873
874impl fidl::Persistable for BaseSocketGetBroadcastResponse {}
875
876#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
877#[repr(C)]
878pub struct BaseSocketGetCookieResponse {
879    pub value: u64,
880}
881
882impl fidl::Persistable for BaseSocketGetCookieResponse {}
883
884#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
885pub struct BaseSocketGetKeepAliveResponse {
886    pub value: bool,
887}
888
889impl fidl::Persistable for BaseSocketGetKeepAliveResponse {}
890
891#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
892pub struct BaseSocketGetLingerResponse {
893    pub linger: bool,
894    pub length_secs: u32,
895}
896
897impl fidl::Persistable for BaseSocketGetLingerResponse {}
898
899#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
900pub struct BaseSocketGetMarkResponse {
901    pub mark: OptionalUint32,
902}
903
904impl fidl::Persistable for BaseSocketGetMarkResponse {}
905
906#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
907pub struct BaseSocketGetNoCheckResponse {
908    pub value: bool,
909}
910
911impl fidl::Persistable for BaseSocketGetNoCheckResponse {}
912
913#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
914pub struct BaseSocketGetOutOfBandInlineResponse {
915    pub value: bool,
916}
917
918impl fidl::Persistable for BaseSocketGetOutOfBandInlineResponse {}
919
920#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
921#[repr(C)]
922pub struct BaseSocketGetReceiveBufferResponse {
923    pub value_bytes: u64,
924}
925
926impl fidl::Persistable for BaseSocketGetReceiveBufferResponse {}
927
928#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
929pub struct BaseSocketGetReuseAddressResponse {
930    pub value: bool,
931}
932
933impl fidl::Persistable for BaseSocketGetReuseAddressResponse {}
934
935#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
936pub struct BaseSocketGetReusePortResponse {
937    pub value: bool,
938}
939
940impl fidl::Persistable for BaseSocketGetReusePortResponse {}
941
942#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
943#[repr(C)]
944pub struct BaseSocketGetSendBufferResponse {
945    pub value_bytes: u64,
946}
947
948impl fidl::Persistable for BaseSocketGetSendBufferResponse {}
949
950#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
951pub struct BaseSocketGetTimestampResponse {
952    pub value: TimestampOption,
953}
954
955impl fidl::Persistable for BaseSocketGetTimestampResponse {}
956
957#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
958pub struct Empty;
959
960impl fidl::Persistable for Empty {}
961
962/// IPv4 multicast membership options.
963#[derive(Clone, Debug, PartialEq)]
964pub struct IpMulticastMembership {
965    /// Interface index for membership.
966    pub iface: u64,
967    /// Local interface address requesting or relinquishing ownership.
968    pub local_addr: fidl_fuchsia_net__common::Ipv4Address,
969    /// Address of the multicast group the membership refers to.
970    pub mcast_addr: fidl_fuchsia_net__common::Ipv4Address,
971}
972
973impl fidl::Persistable for IpMulticastMembership {}
974
975/// IPv6 multicast membership options.
976#[derive(Clone, Debug, PartialEq)]
977pub struct Ipv6MulticastMembership {
978    /// Interface index for membership.
979    pub iface: u64,
980    /// Address of the multicast group the membership refers to.
981    pub mcast_addr: fidl_fuchsia_net__common::Ipv6Address,
982}
983
984impl fidl::Persistable for Ipv6MulticastMembership {}
985
986#[derive(Clone, Debug, PartialEq)]
987pub struct Ipv6PktInfoRecvControlData {
988    /// The index of the interface on which the IP packet was received.
989    pub iface: u64,
990    /// The destination address specified in the received packet's IP
991    /// header.
992    pub header_destination_addr: fidl_fuchsia_net__common::Ipv6Address,
993}
994
995impl fidl::Persistable for Ipv6PktInfoRecvControlData {}
996
997/// IPv6-specific disposition of sent data.
998///
999/// This is currently a struct instead of a table as it is meant to match
1000/// `in6_pktinfo` which is not expected to grow.
1001#[derive(Clone, Debug, PartialEq)]
1002pub struct Ipv6PktInfoSendControlData {
1003    /// The interface index from which the IPv6 packet should be sent.
1004    ///
1005    /// 0 indicates that the local interface is unspecified and the
1006    /// stack may choose an appropriate interface.
1007    pub iface: u64,
1008    /// The source address from which the IPv6 packet should be sent.
1009    ///
1010    /// All zeroes indicates that the local address is unspecified and
1011    /// the stack may choose an appropriate address (i.e. the local
1012    /// address to which the socket is bound).
1013    pub local_addr: fidl_fuchsia_net__common::Ipv6Address,
1014}
1015
1016impl fidl::Persistable for Ipv6PktInfoSendControlData {}
1017
1018#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1019pub struct ProviderDatagramSocketDeprecatedRequest {
1020    pub domain: Domain,
1021    pub proto: DatagramSocketProtocol,
1022}
1023
1024impl fidl::Persistable for ProviderDatagramSocketDeprecatedRequest {}
1025
1026#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1027pub struct ProviderDatagramSocketRequest {
1028    pub domain: Domain,
1029    pub proto: DatagramSocketProtocol,
1030}
1031
1032impl fidl::Persistable for ProviderDatagramSocketRequest {}
1033
1034#[derive(Clone, Debug, PartialEq)]
1035pub struct ProviderGetInterfaceAddressesResponse {
1036    pub interfaces: Vec<InterfaceAddresses>,
1037}
1038
1039impl fidl::Persistable for ProviderGetInterfaceAddressesResponse {}
1040
1041#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1042#[repr(C)]
1043pub struct ProviderInterfaceIndexToNameRequest {
1044    pub index: u64,
1045}
1046
1047impl fidl::Persistable for ProviderInterfaceIndexToNameRequest {}
1048
1049#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1050pub struct ProviderInterfaceNameToFlagsRequest {
1051    pub name: String,
1052}
1053
1054impl fidl::Persistable for ProviderInterfaceNameToFlagsRequest {}
1055
1056#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1057pub struct ProviderInterfaceNameToIndexRequest {
1058    pub name: String,
1059}
1060
1061impl fidl::Persistable for ProviderInterfaceNameToIndexRequest {}
1062
1063#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1064pub struct ProviderStreamSocketRequest {
1065    pub domain: Domain,
1066    pub proto: StreamSocketProtocol,
1067}
1068
1069impl fidl::Persistable for ProviderStreamSocketRequest {}
1070
1071#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1072pub struct ProviderInterfaceIndexToNameResponse {
1073    pub name: String,
1074}
1075
1076impl fidl::Persistable for ProviderInterfaceIndexToNameResponse {}
1077
1078#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1079pub struct ProviderInterfaceNameToFlagsResponse {
1080    pub flags: InterfaceFlags,
1081}
1082
1083impl fidl::Persistable for ProviderInterfaceNameToFlagsResponse {}
1084
1085#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1086#[repr(C)]
1087pub struct ProviderInterfaceNameToIndexResponse {
1088    pub index: u64,
1089}
1090
1091impl fidl::Persistable for ProviderInterfaceNameToIndexResponse {}
1092
1093#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1094pub struct StreamSocketAcceptRequest {
1095    pub want_addr: bool,
1096}
1097
1098impl fidl::Persistable for StreamSocketAcceptRequest {}
1099
1100#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1101#[repr(C)]
1102pub struct StreamSocketListenRequest {
1103    pub backlog: i16,
1104}
1105
1106impl fidl::Persistable for StreamSocketListenRequest {}
1107
1108#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1109pub struct StreamSocketSetTcpCongestionRequest {
1110    pub value: TcpCongestionControl,
1111}
1112
1113impl fidl::Persistable for StreamSocketSetTcpCongestionRequest {}
1114
1115#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1116pub struct StreamSocketSetTcpCorkRequest {
1117    pub value: bool,
1118}
1119
1120impl fidl::Persistable for StreamSocketSetTcpCorkRequest {}
1121
1122#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1123#[repr(C)]
1124pub struct StreamSocketSetTcpDeferAcceptRequest {
1125    pub value_secs: u32,
1126}
1127
1128impl fidl::Persistable for StreamSocketSetTcpDeferAcceptRequest {}
1129
1130#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1131#[repr(C)]
1132pub struct StreamSocketSetTcpKeepAliveCountRequest {
1133    pub value: u32,
1134}
1135
1136impl fidl::Persistable for StreamSocketSetTcpKeepAliveCountRequest {}
1137
1138#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1139#[repr(C)]
1140pub struct StreamSocketSetTcpKeepAliveIdleRequest {
1141    pub value_secs: u32,
1142}
1143
1144impl fidl::Persistable for StreamSocketSetTcpKeepAliveIdleRequest {}
1145
1146#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1147#[repr(C)]
1148pub struct StreamSocketSetTcpKeepAliveIntervalRequest {
1149    pub value_secs: u32,
1150}
1151
1152impl fidl::Persistable for StreamSocketSetTcpKeepAliveIntervalRequest {}
1153
1154#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1155pub struct StreamSocketSetTcpLingerRequest {
1156    pub value_secs: OptionalUint32,
1157}
1158
1159impl fidl::Persistable for StreamSocketSetTcpLingerRequest {}
1160
1161#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1162#[repr(C)]
1163pub struct StreamSocketSetTcpMaxSegmentRequest {
1164    pub value_bytes: u32,
1165}
1166
1167impl fidl::Persistable for StreamSocketSetTcpMaxSegmentRequest {}
1168
1169#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1170pub struct StreamSocketSetTcpNoDelayRequest {
1171    pub value: bool,
1172}
1173
1174impl fidl::Persistable for StreamSocketSetTcpNoDelayRequest {}
1175
1176#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1177pub struct StreamSocketSetTcpQuickAckRequest {
1178    pub value: bool,
1179}
1180
1181impl fidl::Persistable for StreamSocketSetTcpQuickAckRequest {}
1182
1183#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1184#[repr(C)]
1185pub struct StreamSocketSetTcpSynCountRequest {
1186    pub value: u32,
1187}
1188
1189impl fidl::Persistable for StreamSocketSetTcpSynCountRequest {}
1190
1191#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1192#[repr(C)]
1193pub struct StreamSocketSetTcpUserTimeoutRequest {
1194    pub value_millis: u32,
1195}
1196
1197impl fidl::Persistable for StreamSocketSetTcpUserTimeoutRequest {}
1198
1199#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1200#[repr(C)]
1201pub struct StreamSocketSetTcpWindowClampRequest {
1202    pub value: u32,
1203}
1204
1205impl fidl::Persistable for StreamSocketSetTcpWindowClampRequest {}
1206
1207#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1208pub struct StreamSocketGetInfoResponse {
1209    pub domain: Domain,
1210    pub proto: StreamSocketProtocol,
1211}
1212
1213impl fidl::Persistable for StreamSocketGetInfoResponse {}
1214
1215#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1216pub struct StreamSocketGetTcpCongestionResponse {
1217    pub value: TcpCongestionControl,
1218}
1219
1220impl fidl::Persistable for StreamSocketGetTcpCongestionResponse {}
1221
1222#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1223pub struct StreamSocketGetTcpCorkResponse {
1224    pub value: bool,
1225}
1226
1227impl fidl::Persistable for StreamSocketGetTcpCorkResponse {}
1228
1229#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1230#[repr(C)]
1231pub struct StreamSocketGetTcpDeferAcceptResponse {
1232    pub value_secs: u32,
1233}
1234
1235impl fidl::Persistable for StreamSocketGetTcpDeferAcceptResponse {}
1236
1237#[derive(Clone, Debug, PartialEq)]
1238pub struct StreamSocketGetTcpInfoResponse {
1239    pub info: TcpInfo,
1240}
1241
1242impl fidl::Persistable for StreamSocketGetTcpInfoResponse {}
1243
1244#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1245#[repr(C)]
1246pub struct StreamSocketGetTcpKeepAliveCountResponse {
1247    pub value: u32,
1248}
1249
1250impl fidl::Persistable for StreamSocketGetTcpKeepAliveCountResponse {}
1251
1252#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1253#[repr(C)]
1254pub struct StreamSocketGetTcpKeepAliveIdleResponse {
1255    pub value_secs: u32,
1256}
1257
1258impl fidl::Persistable for StreamSocketGetTcpKeepAliveIdleResponse {}
1259
1260#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1261#[repr(C)]
1262pub struct StreamSocketGetTcpKeepAliveIntervalResponse {
1263    pub value_secs: u32,
1264}
1265
1266impl fidl::Persistable for StreamSocketGetTcpKeepAliveIntervalResponse {}
1267
1268#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1269pub struct StreamSocketGetTcpLingerResponse {
1270    pub value_secs: OptionalUint32,
1271}
1272
1273impl fidl::Persistable for StreamSocketGetTcpLingerResponse {}
1274
1275#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1276#[repr(C)]
1277pub struct StreamSocketGetTcpMaxSegmentResponse {
1278    pub value_bytes: u32,
1279}
1280
1281impl fidl::Persistable for StreamSocketGetTcpMaxSegmentResponse {}
1282
1283#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1284pub struct StreamSocketGetTcpNoDelayResponse {
1285    pub value: bool,
1286}
1287
1288impl fidl::Persistable for StreamSocketGetTcpNoDelayResponse {}
1289
1290#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1291pub struct StreamSocketGetTcpQuickAckResponse {
1292    pub value: bool,
1293}
1294
1295impl fidl::Persistable for StreamSocketGetTcpQuickAckResponse {}
1296
1297#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1298#[repr(C)]
1299pub struct StreamSocketGetTcpSynCountResponse {
1300    pub value: u32,
1301}
1302
1303impl fidl::Persistable for StreamSocketGetTcpSynCountResponse {}
1304
1305#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1306#[repr(C)]
1307pub struct StreamSocketGetTcpUserTimeoutResponse {
1308    pub value_millis: u32,
1309}
1310
1311impl fidl::Persistable for StreamSocketGetTcpUserTimeoutResponse {}
1312
1313#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1314#[repr(C)]
1315pub struct StreamSocketGetTcpWindowClampResponse {
1316    pub value: u32,
1317}
1318
1319impl fidl::Persistable for StreamSocketGetTcpWindowClampResponse {}
1320
1321#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1322pub struct SynchronousDatagramSocketRecvMsgRequest {
1323    pub want_addr: bool,
1324    pub data_len: u32,
1325    pub want_control: bool,
1326    pub flags: RecvMsgFlags,
1327}
1328
1329impl fidl::Persistable for SynchronousDatagramSocketRecvMsgRequest {}
1330
1331#[derive(Clone, Debug, PartialEq)]
1332pub struct SynchronousDatagramSocketSendMsgRequest {
1333    pub addr: Option<Box<fidl_fuchsia_net__common::SocketAddress>>,
1334    pub data: Vec<u8>,
1335    pub control: DatagramSocketSendControlData,
1336    pub flags: SendMsgFlags,
1337}
1338
1339impl fidl::Persistable for SynchronousDatagramSocketSendMsgRequest {}
1340
1341#[derive(Clone, Debug, PartialEq)]
1342pub struct SynchronousDatagramSocketRecvMsgResponse {
1343    pub addr: Option<Box<fidl_fuchsia_net__common::SocketAddress>>,
1344    pub data: Vec<u8>,
1345    pub control: DatagramSocketRecvControlData,
1346    pub truncated: u32,
1347}
1348
1349impl fidl::Persistable for SynchronousDatagramSocketRecvMsgResponse {}
1350
1351#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1352#[repr(C)]
1353pub struct SynchronousDatagramSocketSendMsgResponse {
1354    pub len: i64,
1355}
1356
1357impl fidl::Persistable for SynchronousDatagramSocketSendMsgResponse {}
1358
1359#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1360pub struct Timestamp {
1361    /// Time in nanoseconds since epoch (January 1 1970 GMT).
1362    pub nanoseconds: i64,
1363    /// Identifies whether/how the timestamp should be returned to the user.
1364    /// Ignored in the DatagramSocket protocol.
1365    pub requested: TimestampOption,
1366}
1367
1368impl fidl::Persistable for Timestamp {}
1369
1370#[derive(Clone, Debug, Default, PartialEq)]
1371pub struct DatagramSocketRecvControlData {
1372    /// Network socket ancillary data.
1373    pub network: Option<NetworkSocketRecvControlData>,
1374    #[doc(hidden)]
1375    pub __source_breaking: fidl::marker::SourceBreaking,
1376}
1377
1378impl fidl::Persistable for DatagramSocketRecvControlData {}
1379
1380#[derive(Clone, Debug, Default, PartialEq)]
1381pub struct DatagramSocketSendControlData {
1382    /// Network socket ancillary data.
1383    pub network: Option<NetworkSocketSendControlData>,
1384    #[doc(hidden)]
1385    pub __source_breaking: fidl::marker::SourceBreaking,
1386}
1387
1388impl fidl::Persistable for DatagramSocketSendControlData {}
1389
1390#[derive(Clone, Debug, Default, PartialEq)]
1391pub struct DatagramSocketSendMsgPreflightRequest {
1392    /// The destination address.
1393    ///
1394    /// If absent, interpreted as the method receiver's connected address and
1395    /// causes the connected address to be returned.
1396    ///
1397    /// Required if the method receiver is not connected.
1398    pub to: Option<fidl_fuchsia_net__common::SocketAddress>,
1399    /// Information controlling the local interface and/or address used when
1400    /// sending an IPv6 packet.
1401    ///
1402    /// If absent, indicates that the stack is free to choose an appropriate
1403    /// outgoing route.
1404    pub ipv6_pktinfo: Option<Ipv6PktInfoSendControlData>,
1405    #[doc(hidden)]
1406    pub __source_breaking: fidl::marker::SourceBreaking,
1407}
1408
1409impl fidl::Persistable for DatagramSocketSendMsgPreflightRequest {}
1410
1411/// Holds information about an interface and its addresses.
1412#[derive(Clone, Debug, Default, PartialEq)]
1413pub struct InterfaceAddresses {
1414    /// ID of the interface.
1415    pub id: Option<u64>,
1416    /// Name of the interface.
1417    pub name: Option<String>,
1418    /// All addresses currently assigned to the interface.
1419    pub addresses: Option<Vec<fidl_fuchsia_net__common::Subnet>>,
1420    /// Contains the interface flags, as returned by the SIOCGIFFLAGS ioctl
1421    /// operation.
1422    pub interface_flags: Option<InterfaceFlags>,
1423    #[doc(hidden)]
1424    pub __source_breaking: fidl::marker::SourceBreaking,
1425}
1426
1427impl fidl::Persistable for InterfaceAddresses {}
1428
1429#[derive(Clone, Debug, Default, PartialEq)]
1430pub struct IpRecvControlData {
1431    /// The Type of Service value found in a received packet's IPv4 header.
1432    ///
1433    /// Present if the `SOL_IP` -> `IP_RECVTOS` option is enabled.
1434    pub tos: Option<u8>,
1435    /// The Time to Live value found in a received packet's IPv4 header.
1436    ///
1437    /// Present if the `SOL_IP` -> `IP_RECVTTL` option is enabled.
1438    pub ttl: Option<u8>,
1439    /// The original destination address.
1440    ///
1441    /// Present if the `SOL_IP` -> `IP_RECVORIGDSTADDR` option is enabled.
1442    pub original_destination_address: Option<fidl_fuchsia_net__common::SocketAddress>,
1443    #[doc(hidden)]
1444    pub __source_breaking: fidl::marker::SourceBreaking,
1445}
1446
1447impl fidl::Persistable for IpRecvControlData {}
1448
1449#[derive(Clone, Debug, Default, PartialEq)]
1450pub struct IpSendControlData {
1451    /// The Time to Live value to set in the IPv4 header of an outgoing
1452    /// packet.
1453    pub ttl: Option<u8>,
1454    #[doc(hidden)]
1455    pub __source_breaking: fidl::marker::SourceBreaking,
1456}
1457
1458impl fidl::Persistable for IpSendControlData {}
1459
1460#[derive(Clone, Debug, Default, PartialEq)]
1461pub struct Ipv6RecvControlData {
1462    /// The Traffic Class of a packet that was received.
1463    ///
1464    /// Present if the `SOL_IPV6` -> `IPV6_RECVTCLASS` option is enabled.
1465    pub tclass: Option<u8>,
1466    /// The Hop Limit of a packet that was received.
1467    ///
1468    /// Present if the `SOL_IPV6` -> `IPV6_RECVHOPLIMIT` option is enabled.
1469    pub hoplimit: Option<u8>,
1470    /// The packet information of a packet that was received.
1471    ///
1472    /// Present if the `SOL_IPV6` -> `IPV6_RECVPKTINFO` option is enabled.
1473    pub pktinfo: Option<Ipv6PktInfoRecvControlData>,
1474    #[doc(hidden)]
1475    pub __source_breaking: fidl::marker::SourceBreaking,
1476}
1477
1478impl fidl::Persistable for Ipv6RecvControlData {}
1479
1480#[derive(Clone, Debug, Default, PartialEq)]
1481pub struct Ipv6SendControlData {
1482    /// The Hop Limit value to set in the IPv6 header of an outgoing
1483    /// packet.
1484    pub hoplimit: Option<u8>,
1485    /// Information controlling the local interface and/or address used when
1486    /// sending an IPv6 packet.
1487    pub pktinfo: Option<Ipv6PktInfoSendControlData>,
1488    #[doc(hidden)]
1489    pub __source_breaking: fidl::marker::SourceBreaking,
1490}
1491
1492impl fidl::Persistable for Ipv6SendControlData {}
1493
1494/// Network socket (L3) ancillary data that can be received.
1495#[derive(Clone, Debug, Default, PartialEq)]
1496pub struct NetworkSocketRecvControlData {
1497    /// Socket level ancillary data.
1498    pub socket: Option<SocketRecvControlData>,
1499    /// IPv4 level ancillary data.
1500    ///
1501    /// These match POSIX `SOL_IP` control messages.
1502    pub ip: Option<IpRecvControlData>,
1503    /// IPv6 level ancillary data.
1504    ///
1505    /// These match POSIX `SOL_IPV6` control messages.
1506    pub ipv6: Option<Ipv6RecvControlData>,
1507    #[doc(hidden)]
1508    pub __source_breaking: fidl::marker::SourceBreaking,
1509}
1510
1511impl fidl::Persistable for NetworkSocketRecvControlData {}
1512
1513/// Network socket (L3) ancillary data that can be sent.
1514#[derive(Clone, Debug, Default, PartialEq)]
1515pub struct NetworkSocketSendControlData {
1516    /// Socket level ancillary data.
1517    pub socket: Option<SocketSendControlData>,
1518    /// IPv4 level ancillary data.
1519    ///
1520    /// These match POSIX `SOL_IP` control messages.
1521    pub ip: Option<IpSendControlData>,
1522    /// IPv6 level ancillary data.
1523    ///
1524    /// These match POSIX `SOL_IPV6` control messages.
1525    pub ipv6: Option<Ipv6SendControlData>,
1526    #[doc(hidden)]
1527    pub __source_breaking: fidl::marker::SourceBreaking,
1528}
1529
1530impl fidl::Persistable for NetworkSocketSendControlData {}
1531
1532/// Metadata of a received datagram.
1533#[derive(Clone, Debug, Default, PartialEq)]
1534pub struct RecvMsgMeta {
1535    /// The from address of the datagram.
1536    pub from: Option<fidl_fuchsia_net__common::SocketAddress>,
1537    /// Ancillary control message data describing the datagram.
1538    pub control: Option<DatagramSocketRecvControlData>,
1539    /// The length of the payload, in bytes.
1540    pub payload_len: Option<u16>,
1541    #[doc(hidden)]
1542    pub __source_breaking: fidl::marker::SourceBreaking,
1543}
1544
1545impl fidl::Persistable for RecvMsgMeta {}
1546
1547/// Metadata of a sent datagram.
1548#[derive(Clone, Debug, Default, PartialEq)]
1549pub struct SendMsgMeta {
1550    /// The destination address, if specified.
1551    pub to: Option<fidl_fuchsia_net__common::SocketAddress>,
1552    /// Ancillary control message data used for sending the payload.
1553    pub control: Option<DatagramSocketSendControlData>,
1554    #[doc(hidden)]
1555    pub __source_breaking: fidl::marker::SourceBreaking,
1556}
1557
1558impl fidl::Persistable for SendMsgMeta {}
1559
1560/// Socket level ancillary data that can be received.
1561///
1562/// These match control messages with a `SOL_SOCKET` level.
1563#[derive(Clone, Debug, Default, PartialEq)]
1564pub struct SocketRecvControlData {
1565    /// Data about the time at which the packet was received.
1566    pub timestamp: Option<Timestamp>,
1567    #[doc(hidden)]
1568    pub __source_breaking: fidl::marker::SourceBreaking,
1569}
1570
1571impl fidl::Persistable for SocketRecvControlData {}
1572
1573/// Socket level ancillary data that can be sent.
1574///
1575/// These match the POSIX `SOL_SOCKET` control messages.
1576#[derive(Clone, Debug, Default, PartialEq)]
1577pub struct SocketSendControlData {
1578    #[doc(hidden)]
1579    pub __source_breaking: fidl::marker::SourceBreaking,
1580}
1581
1582impl fidl::Persistable for SocketSendControlData {}
1583
1584/// TCP protocol state.
1585#[derive(Clone, Debug, Default, PartialEq)]
1586pub struct TcpInfo {
1587    pub state: Option<fidl_fuchsia_net_tcp__common::State>,
1588    pub ca_state: Option<TcpCongestionControlState>,
1589    pub rto_usec: Option<u32>,
1590    pub rtt_usec: Option<u32>,
1591    pub rtt_var_usec: Option<u32>,
1592    pub snd_ssthresh: Option<u32>,
1593    pub snd_cwnd: Option<u32>,
1594    pub reorder_seen: Option<bool>,
1595    #[doc(hidden)]
1596    pub __source_breaking: fidl::marker::SourceBreaking,
1597}
1598
1599impl fidl::Persistable for TcpInfo {}
1600
1601/// An optional uint32 value.
1602#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1603pub enum OptionalUint32 {
1604    Value(u32),
1605    Unset(Empty),
1606}
1607
1608impl OptionalUint32 {
1609    #[inline]
1610    pub fn ordinal(&self) -> u64 {
1611        match *self {
1612            Self::Value(_) => 1,
1613            Self::Unset(_) => 2,
1614        }
1615    }
1616}
1617
1618impl fidl::Persistable for OptionalUint32 {}
1619
1620/// An optional byte value.
1621#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1622pub enum OptionalUint8 {
1623    Value(u8),
1624    Unset(Empty),
1625}
1626
1627impl OptionalUint8 {
1628    #[inline]
1629    pub fn ordinal(&self) -> u64 {
1630        match *self {
1631            Self::Value(_) => 1,
1632            Self::Unset(_) => 2,
1633        }
1634    }
1635}
1636
1637impl fidl::Persistable for OptionalUint8 {}
1638
1639pub mod base_datagram_socket_ordinals {
1640    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1641    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1642    pub const QUERY: u64 = 0x2658edee9decfc06;
1643    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1644    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1645    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1646    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1647    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1648    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1649    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1650    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1651    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1652    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1653    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1654    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1655    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1656    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1657    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1658    pub const SET_LINGER: u64 = 0x45386351246e998e;
1659    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1660    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1661    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1662    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1663    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1664    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1665    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1666    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1667    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1668    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1669    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1670    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1671    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1672    pub const BIND: u64 = 0x4bc6400ae92125d;
1673    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1674    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1675    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1676    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1677    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1678    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1679    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1680    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1681    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1682    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1683    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1684    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1685    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1686    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1687    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1688    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1689    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1690    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1691    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1692    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1693    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1694    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1695    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1696    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1697    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1698    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1699    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1700    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1701    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1702    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1703    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1704    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1705    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1706    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1707    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1708    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1709    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1710    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1711    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1712    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1713    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1714    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1715    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1716    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1717    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1718    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1719    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1720    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1721    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
1722}
1723
1724pub mod base_network_socket_ordinals {
1725    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1726    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1727    pub const QUERY: u64 = 0x2658edee9decfc06;
1728    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1729    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1730    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1731    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1732    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1733    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1734    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1735    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1736    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1737    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1738    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1739    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1740    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1741    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1742    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1743    pub const SET_LINGER: u64 = 0x45386351246e998e;
1744    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1745    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1746    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1747    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1748    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1749    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1750    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1751    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1752    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1753    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1754    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1755    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1756    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1757    pub const BIND: u64 = 0x4bc6400ae92125d;
1758    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1759    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1760    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1761    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1762    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1763    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1764    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1765    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1766    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1767    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1768    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1769    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1770    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1771    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1772    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1773    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1774    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1775    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1776    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1777    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1778    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1779    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1780    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1781    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1782    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1783    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1784    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1785    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1786    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1787    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1788    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1789    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1790    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1791    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1792    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1793    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1794    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1795    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1796    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1797    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1798    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1799    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1800    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1801    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1802    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1803    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1804    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1805    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1806}
1807
1808pub mod base_socket_ordinals {
1809    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1810    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1811    pub const QUERY: u64 = 0x2658edee9decfc06;
1812    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1813    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1814    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1815    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1816    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1817    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1818    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1819    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1820    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1821    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1822    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1823    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1824    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1825    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1826    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1827    pub const SET_LINGER: u64 = 0x45386351246e998e;
1828    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1829    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1830    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1831    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1832    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1833    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1834    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1835    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1836    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1837    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1838    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1839    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1840    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1841}
1842
1843pub mod datagram_socket_ordinals {
1844    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1845    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1846    pub const QUERY: u64 = 0x2658edee9decfc06;
1847    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1848    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1849    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1850    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1851    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1852    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1853    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1854    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1855    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1856    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1857    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1858    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1859    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1860    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1861    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1862    pub const SET_LINGER: u64 = 0x45386351246e998e;
1863    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1864    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1865    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1866    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1867    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1868    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1869    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1870    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1871    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1872    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1873    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1874    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1875    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1876    pub const BIND: u64 = 0x4bc6400ae92125d;
1877    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1878    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1879    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1880    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1881    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1882    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1883    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1884    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1885    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1886    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1887    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1888    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1889    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1890    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1891    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1892    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1893    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1894    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1895    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1896    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1897    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1898    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1899    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1900    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1901    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1902    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1903    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1904    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1905    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1906    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1907    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1908    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1909    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1910    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1911    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1912    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1913    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1914    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1915    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1916    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1917    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1918    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1919    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1920    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1921    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1922    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1923    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1924    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1925    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
1926    pub const DESCRIBE: u64 = 0xbf1e2f0a86601f3;
1927    pub const SEND_MSG_PREFLIGHT: u64 = 0x5362e668e777248a;
1928    pub const RECV_MSG_POSTFLIGHT: u64 = 0x1a7cdeca5f3eb8e2;
1929}
1930
1931pub mod provider_ordinals {
1932    pub const STREAM_SOCKET_WITH_OPTIONS: u64 = 0x3969bf7eb78386e0;
1933    pub const STREAM_SOCKET: u64 = 0x27c3581da2155545;
1934    pub const DATAGRAM_SOCKET_DEPRECATED: u64 = 0x38876c87cf031cb1;
1935    pub const DATAGRAM_SOCKET: u64 = 0x4021b4fa1b6452f2;
1936    pub const DATAGRAM_SOCKET_WITH_OPTIONS: u64 = 0x4cd0cffbffa39eb1;
1937    pub const INTERFACE_INDEX_TO_NAME: u64 = 0x4d59a64fce98272f;
1938    pub const INTERFACE_NAME_TO_INDEX: u64 = 0x690cd8d2f2d650f8;
1939    pub const INTERFACE_NAME_TO_FLAGS: u64 = 0x25d0efcdb6671a0b;
1940    pub const GET_INTERFACE_ADDRESSES: u64 = 0x2e7b9aaf327c870;
1941}
1942
1943pub mod stream_socket_ordinals {
1944    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1945    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1946    pub const QUERY: u64 = 0x2658edee9decfc06;
1947    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1948    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1949    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1950    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1951    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1952    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1953    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1954    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1955    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1956    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1957    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1958    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1959    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1960    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1961    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1962    pub const SET_LINGER: u64 = 0x45386351246e998e;
1963    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1964    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1965    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1966    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1967    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1968    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1969    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1970    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1971    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1972    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1973    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1974    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1975    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1976    pub const BIND: u64 = 0x4bc6400ae92125d;
1977    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1978    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1979    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1980    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1981    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1982    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1983    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1984    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1985    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1986    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1987    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1988    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1989    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1990    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1991    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1992    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1993    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1994    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1995    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1996    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1997    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1998    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1999    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
2000    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
2001    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
2002    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
2003    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
2004    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
2005    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
2006    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
2007    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
2008    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
2009    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
2010    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
2011    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
2012    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
2013    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
2014    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
2015    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
2016    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
2017    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
2018    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
2019    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
2020    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
2021    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
2022    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
2023    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
2024    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
2025    pub const DESCRIBE: u64 = 0x29e22969a7dadc32;
2026    pub const LISTEN: u64 = 0x3d0a65ced3d10108;
2027    pub const ACCEPT: u64 = 0x5ab7ad620424c163;
2028    pub const GET_INFO: u64 = 0x87cfa55d19f878f;
2029    pub const SET_TCP_NO_DELAY: u64 = 0x5a59b778f7333ada;
2030    pub const GET_TCP_NO_DELAY: u64 = 0xac219a3218b0799;
2031    pub const SET_TCP_MAX_SEGMENT: u64 = 0xb3d30c498266d18;
2032    pub const GET_TCP_MAX_SEGMENT: u64 = 0x637404d1b4b9982c;
2033    pub const SET_TCP_CORK: u64 = 0x62e26891541143a0;
2034    pub const GET_TCP_CORK: u64 = 0x435bb232e0e74f32;
2035    pub const SET_TCP_KEEP_ALIVE_IDLE: u64 = 0x196d053d8363c42;
2036    pub const GET_TCP_KEEP_ALIVE_IDLE: u64 = 0x35ec58564879dac;
2037    pub const SET_TCP_KEEP_ALIVE_INTERVAL: u64 = 0x485ffbc2da1243f2;
2038    pub const GET_TCP_KEEP_ALIVE_INTERVAL: u64 = 0x264eaf46306b284;
2039    pub const SET_TCP_KEEP_ALIVE_COUNT: u64 = 0x2ab2e8c111708421;
2040    pub const GET_TCP_KEEP_ALIVE_COUNT: u64 = 0x2f176ae271fe7a09;
2041    pub const SET_TCP_SYN_COUNT: u64 = 0x4dcd6ab5573c1eb3;
2042    pub const GET_TCP_SYN_COUNT: u64 = 0x7d457cba8f5f3ee6;
2043    pub const SET_TCP_LINGER: u64 = 0xd5cc1e8654d36e4;
2044    pub const GET_TCP_LINGER: u64 = 0xad870d311cf30eb;
2045    pub const SET_TCP_DEFER_ACCEPT: u64 = 0x15092f181e57c404;
2046    pub const GET_TCP_DEFER_ACCEPT: u64 = 0x64589790842cb7c6;
2047    pub const SET_TCP_WINDOW_CLAMP: u64 = 0x4a26ce07d847f1c6;
2048    pub const GET_TCP_WINDOW_CLAMP: u64 = 0x2df6b636bf0a6a4e;
2049    pub const GET_TCP_INFO: u64 = 0x1ffb123d9f03ead2;
2050    pub const SET_TCP_QUICK_ACK: u64 = 0x6fa811be8fde7457;
2051    pub const GET_TCP_QUICK_ACK: u64 = 0x7356a949bef2df32;
2052    pub const SET_TCP_CONGESTION: u64 = 0x7924c6eabde7819e;
2053    pub const GET_TCP_CONGESTION: u64 = 0x11e16397e1b72a47;
2054    pub const SET_TCP_USER_TIMEOUT: u64 = 0x6b459e81c3741a60;
2055    pub const GET_TCP_USER_TIMEOUT: u64 = 0x24bbd5858ad8c380;
2056}
2057
2058pub mod synchronous_datagram_socket_ordinals {
2059    pub const CLONE: u64 = 0x20d8a7aba2168a79;
2060    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
2061    pub const QUERY: u64 = 0x2658edee9decfc06;
2062    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
2063    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
2064    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
2065    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
2066    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
2067    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
2068    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
2069    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
2070    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
2071    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
2072    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
2073    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
2074    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
2075    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
2076    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
2077    pub const SET_LINGER: u64 = 0x45386351246e998e;
2078    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
2079    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
2080    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
2081    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
2082    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
2083    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
2084    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
2085    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
2086    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
2087    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
2088    pub const SET_MARK: u64 = 0x6ead6de09f653236;
2089    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
2090    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
2091    pub const BIND: u64 = 0x4bc6400ae92125d;
2092    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
2093    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
2094    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
2095    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
2096    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
2097    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
2098    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
2099    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
2100    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
2101    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
2102    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
2103    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
2104    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
2105    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
2106    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
2107    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
2108    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
2109    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
2110    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
2111    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
2112    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
2113    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
2114    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
2115    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
2116    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
2117    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
2118    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
2119    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
2120    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
2121    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
2122    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
2123    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
2124    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
2125    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
2126    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
2127    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
2128    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
2129    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
2130    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
2131    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
2132    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
2133    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
2134    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
2135    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
2136    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
2137    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
2138    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
2139    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
2140    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
2141    pub const DESCRIBE: u64 = 0x585f20b73631070d;
2142    pub const RECV_MSG: u64 = 0x28e494e48fb5dbf3;
2143    pub const SEND_MSG: u64 = 0x12dc2fceab6cefaa;
2144}
2145
2146mod internal {
2147    use super::*;
2148    unsafe impl fidl::encoding::TypeMarker for CmsgRequests {
2149        type Owned = Self;
2150
2151        #[inline(always)]
2152        fn inline_align(_context: fidl::encoding::Context) -> usize {
2153            4
2154        }
2155
2156        #[inline(always)]
2157        fn inline_size(_context: fidl::encoding::Context) -> usize {
2158            4
2159        }
2160    }
2161
2162    impl fidl::encoding::ValueTypeMarker for CmsgRequests {
2163        type Borrowed<'a> = Self;
2164        #[inline(always)]
2165        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2166            *value
2167        }
2168    }
2169
2170    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CmsgRequests {
2171        #[inline]
2172        unsafe fn encode(
2173            self,
2174            encoder: &mut fidl::encoding::Encoder<'_, D>,
2175            offset: usize,
2176            _depth: fidl::encoding::Depth,
2177        ) -> fidl::Result<()> {
2178            encoder.debug_check_bounds::<Self>(offset);
2179            encoder.write_num(self.bits(), offset);
2180            Ok(())
2181        }
2182    }
2183
2184    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CmsgRequests {
2185        #[inline(always)]
2186        fn new_empty() -> Self {
2187            Self::empty()
2188        }
2189
2190        #[inline]
2191        unsafe fn decode(
2192            &mut self,
2193            decoder: &mut fidl::encoding::Decoder<'_, D>,
2194            offset: usize,
2195            _depth: fidl::encoding::Depth,
2196        ) -> fidl::Result<()> {
2197            decoder.debug_check_bounds::<Self>(offset);
2198            let prim = decoder.read_num::<u32>(offset);
2199            *self = Self::from_bits_allow_unknown(prim);
2200            Ok(())
2201        }
2202    }
2203    unsafe impl fidl::encoding::TypeMarker for InterfaceFlags {
2204        type Owned = Self;
2205
2206        #[inline(always)]
2207        fn inline_align(_context: fidl::encoding::Context) -> usize {
2208            2
2209        }
2210
2211        #[inline(always)]
2212        fn inline_size(_context: fidl::encoding::Context) -> usize {
2213            2
2214        }
2215    }
2216
2217    impl fidl::encoding::ValueTypeMarker for InterfaceFlags {
2218        type Borrowed<'a> = Self;
2219        #[inline(always)]
2220        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2221            *value
2222        }
2223    }
2224
2225    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for InterfaceFlags {
2226        #[inline]
2227        unsafe fn encode(
2228            self,
2229            encoder: &mut fidl::encoding::Encoder<'_, D>,
2230            offset: usize,
2231            _depth: fidl::encoding::Depth,
2232        ) -> fidl::Result<()> {
2233            encoder.debug_check_bounds::<Self>(offset);
2234            if self.bits() & Self::all().bits() != self.bits() {
2235                return Err(fidl::Error::InvalidBitsValue);
2236            }
2237            encoder.write_num(self.bits(), offset);
2238            Ok(())
2239        }
2240    }
2241
2242    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceFlags {
2243        #[inline(always)]
2244        fn new_empty() -> Self {
2245            Self::empty()
2246        }
2247
2248        #[inline]
2249        unsafe fn decode(
2250            &mut self,
2251            decoder: &mut fidl::encoding::Decoder<'_, D>,
2252            offset: usize,
2253            _depth: fidl::encoding::Depth,
2254        ) -> fidl::Result<()> {
2255            decoder.debug_check_bounds::<Self>(offset);
2256            let prim = decoder.read_num::<u16>(offset);
2257            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2258            Ok(())
2259        }
2260    }
2261    unsafe impl fidl::encoding::TypeMarker for RecvMsgFlags {
2262        type Owned = Self;
2263
2264        #[inline(always)]
2265        fn inline_align(_context: fidl::encoding::Context) -> usize {
2266            2
2267        }
2268
2269        #[inline(always)]
2270        fn inline_size(_context: fidl::encoding::Context) -> usize {
2271            2
2272        }
2273    }
2274
2275    impl fidl::encoding::ValueTypeMarker for RecvMsgFlags {
2276        type Borrowed<'a> = Self;
2277        #[inline(always)]
2278        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2279            *value
2280        }
2281    }
2282
2283    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RecvMsgFlags {
2284        #[inline]
2285        unsafe fn encode(
2286            self,
2287            encoder: &mut fidl::encoding::Encoder<'_, D>,
2288            offset: usize,
2289            _depth: fidl::encoding::Depth,
2290        ) -> fidl::Result<()> {
2291            encoder.debug_check_bounds::<Self>(offset);
2292            if self.bits() & Self::all().bits() != self.bits() {
2293                return Err(fidl::Error::InvalidBitsValue);
2294            }
2295            encoder.write_num(self.bits(), offset);
2296            Ok(())
2297        }
2298    }
2299
2300    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecvMsgFlags {
2301        #[inline(always)]
2302        fn new_empty() -> Self {
2303            Self::empty()
2304        }
2305
2306        #[inline]
2307        unsafe fn decode(
2308            &mut self,
2309            decoder: &mut fidl::encoding::Decoder<'_, D>,
2310            offset: usize,
2311            _depth: fidl::encoding::Depth,
2312        ) -> fidl::Result<()> {
2313            decoder.debug_check_bounds::<Self>(offset);
2314            let prim = decoder.read_num::<u16>(offset);
2315            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2316            Ok(())
2317        }
2318    }
2319    unsafe impl fidl::encoding::TypeMarker for SendMsgFlags {
2320        type Owned = Self;
2321
2322        #[inline(always)]
2323        fn inline_align(_context: fidl::encoding::Context) -> usize {
2324            2
2325        }
2326
2327        #[inline(always)]
2328        fn inline_size(_context: fidl::encoding::Context) -> usize {
2329            2
2330        }
2331    }
2332
2333    impl fidl::encoding::ValueTypeMarker for SendMsgFlags {
2334        type Borrowed<'a> = Self;
2335        #[inline(always)]
2336        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2337            *value
2338        }
2339    }
2340
2341    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SendMsgFlags {
2342        #[inline]
2343        unsafe fn encode(
2344            self,
2345            encoder: &mut fidl::encoding::Encoder<'_, D>,
2346            offset: usize,
2347            _depth: fidl::encoding::Depth,
2348        ) -> fidl::Result<()> {
2349            encoder.debug_check_bounds::<Self>(offset);
2350            if self.bits() & Self::all().bits() != self.bits() {
2351                return Err(fidl::Error::InvalidBitsValue);
2352            }
2353            encoder.write_num(self.bits(), offset);
2354            Ok(())
2355        }
2356    }
2357
2358    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SendMsgFlags {
2359        #[inline(always)]
2360        fn new_empty() -> Self {
2361            Self::empty()
2362        }
2363
2364        #[inline]
2365        unsafe fn decode(
2366            &mut self,
2367            decoder: &mut fidl::encoding::Decoder<'_, D>,
2368            offset: usize,
2369            _depth: fidl::encoding::Depth,
2370        ) -> fidl::Result<()> {
2371            decoder.debug_check_bounds::<Self>(offset);
2372            let prim = decoder.read_num::<u16>(offset);
2373            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2374            Ok(())
2375        }
2376    }
2377    unsafe impl fidl::encoding::TypeMarker for ShutdownMode {
2378        type Owned = Self;
2379
2380        #[inline(always)]
2381        fn inline_align(_context: fidl::encoding::Context) -> usize {
2382            2
2383        }
2384
2385        #[inline(always)]
2386        fn inline_size(_context: fidl::encoding::Context) -> usize {
2387            2
2388        }
2389    }
2390
2391    impl fidl::encoding::ValueTypeMarker for ShutdownMode {
2392        type Borrowed<'a> = Self;
2393        #[inline(always)]
2394        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2395            *value
2396        }
2397    }
2398
2399    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ShutdownMode {
2400        #[inline]
2401        unsafe fn encode(
2402            self,
2403            encoder: &mut fidl::encoding::Encoder<'_, D>,
2404            offset: usize,
2405            _depth: fidl::encoding::Depth,
2406        ) -> fidl::Result<()> {
2407            encoder.debug_check_bounds::<Self>(offset);
2408            if self.bits() & Self::all().bits() != self.bits() {
2409                return Err(fidl::Error::InvalidBitsValue);
2410            }
2411            encoder.write_num(self.bits(), offset);
2412            Ok(())
2413        }
2414    }
2415
2416    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ShutdownMode {
2417        #[inline(always)]
2418        fn new_empty() -> Self {
2419            Self::empty()
2420        }
2421
2422        #[inline]
2423        unsafe fn decode(
2424            &mut self,
2425            decoder: &mut fidl::encoding::Decoder<'_, D>,
2426            offset: usize,
2427            _depth: fidl::encoding::Depth,
2428        ) -> fidl::Result<()> {
2429            decoder.debug_check_bounds::<Self>(offset);
2430            let prim = decoder.read_num::<u16>(offset);
2431            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2432            Ok(())
2433        }
2434    }
2435    unsafe impl fidl::encoding::TypeMarker for DatagramSocketProtocol {
2436        type Owned = Self;
2437
2438        #[inline(always)]
2439        fn inline_align(_context: fidl::encoding::Context) -> usize {
2440            std::mem::align_of::<u32>()
2441        }
2442
2443        #[inline(always)]
2444        fn inline_size(_context: fidl::encoding::Context) -> usize {
2445            std::mem::size_of::<u32>()
2446        }
2447
2448        #[inline(always)]
2449        fn encode_is_copy() -> bool {
2450            true
2451        }
2452
2453        #[inline(always)]
2454        fn decode_is_copy() -> bool {
2455            false
2456        }
2457    }
2458
2459    impl fidl::encoding::ValueTypeMarker for DatagramSocketProtocol {
2460        type Borrowed<'a> = Self;
2461        #[inline(always)]
2462        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2463            *value
2464        }
2465    }
2466
2467    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2468        for DatagramSocketProtocol
2469    {
2470        #[inline]
2471        unsafe fn encode(
2472            self,
2473            encoder: &mut fidl::encoding::Encoder<'_, D>,
2474            offset: usize,
2475            _depth: fidl::encoding::Depth,
2476        ) -> fidl::Result<()> {
2477            encoder.debug_check_bounds::<Self>(offset);
2478            encoder.write_num(self.into_primitive(), offset);
2479            Ok(())
2480        }
2481    }
2482
2483    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2484        for DatagramSocketProtocol
2485    {
2486        #[inline(always)]
2487        fn new_empty() -> Self {
2488            Self::Udp
2489        }
2490
2491        #[inline]
2492        unsafe fn decode(
2493            &mut self,
2494            decoder: &mut fidl::encoding::Decoder<'_, D>,
2495            offset: usize,
2496            _depth: fidl::encoding::Depth,
2497        ) -> fidl::Result<()> {
2498            decoder.debug_check_bounds::<Self>(offset);
2499            let prim = decoder.read_num::<u32>(offset);
2500
2501            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2502            Ok(())
2503        }
2504    }
2505    unsafe impl fidl::encoding::TypeMarker for Domain {
2506        type Owned = Self;
2507
2508        #[inline(always)]
2509        fn inline_align(_context: fidl::encoding::Context) -> usize {
2510            std::mem::align_of::<i16>()
2511        }
2512
2513        #[inline(always)]
2514        fn inline_size(_context: fidl::encoding::Context) -> usize {
2515            std::mem::size_of::<i16>()
2516        }
2517
2518        #[inline(always)]
2519        fn encode_is_copy() -> bool {
2520            true
2521        }
2522
2523        #[inline(always)]
2524        fn decode_is_copy() -> bool {
2525            false
2526        }
2527    }
2528
2529    impl fidl::encoding::ValueTypeMarker for Domain {
2530        type Borrowed<'a> = Self;
2531        #[inline(always)]
2532        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2533            *value
2534        }
2535    }
2536
2537    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Domain {
2538        #[inline]
2539        unsafe fn encode(
2540            self,
2541            encoder: &mut fidl::encoding::Encoder<'_, D>,
2542            offset: usize,
2543            _depth: fidl::encoding::Depth,
2544        ) -> fidl::Result<()> {
2545            encoder.debug_check_bounds::<Self>(offset);
2546            encoder.write_num(self.into_primitive(), offset);
2547            Ok(())
2548        }
2549    }
2550
2551    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Domain {
2552        #[inline(always)]
2553        fn new_empty() -> Self {
2554            Self::Ipv4
2555        }
2556
2557        #[inline]
2558        unsafe fn decode(
2559            &mut self,
2560            decoder: &mut fidl::encoding::Decoder<'_, D>,
2561            offset: usize,
2562            _depth: fidl::encoding::Depth,
2563        ) -> fidl::Result<()> {
2564            decoder.debug_check_bounds::<Self>(offset);
2565            let prim = decoder.read_num::<i16>(offset);
2566
2567            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2568            Ok(())
2569        }
2570    }
2571    unsafe impl fidl::encoding::TypeMarker for StreamSocketProtocol {
2572        type Owned = Self;
2573
2574        #[inline(always)]
2575        fn inline_align(_context: fidl::encoding::Context) -> usize {
2576            std::mem::align_of::<u32>()
2577        }
2578
2579        #[inline(always)]
2580        fn inline_size(_context: fidl::encoding::Context) -> usize {
2581            std::mem::size_of::<u32>()
2582        }
2583
2584        #[inline(always)]
2585        fn encode_is_copy() -> bool {
2586            true
2587        }
2588
2589        #[inline(always)]
2590        fn decode_is_copy() -> bool {
2591            false
2592        }
2593    }
2594
2595    impl fidl::encoding::ValueTypeMarker for StreamSocketProtocol {
2596        type Borrowed<'a> = Self;
2597        #[inline(always)]
2598        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2599            *value
2600        }
2601    }
2602
2603    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2604        for StreamSocketProtocol
2605    {
2606        #[inline]
2607        unsafe fn encode(
2608            self,
2609            encoder: &mut fidl::encoding::Encoder<'_, D>,
2610            offset: usize,
2611            _depth: fidl::encoding::Depth,
2612        ) -> fidl::Result<()> {
2613            encoder.debug_check_bounds::<Self>(offset);
2614            encoder.write_num(self.into_primitive(), offset);
2615            Ok(())
2616        }
2617    }
2618
2619    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StreamSocketProtocol {
2620        #[inline(always)]
2621        fn new_empty() -> Self {
2622            Self::Tcp
2623        }
2624
2625        #[inline]
2626        unsafe fn decode(
2627            &mut self,
2628            decoder: &mut fidl::encoding::Decoder<'_, D>,
2629            offset: usize,
2630            _depth: fidl::encoding::Depth,
2631        ) -> fidl::Result<()> {
2632            decoder.debug_check_bounds::<Self>(offset);
2633            let prim = decoder.read_num::<u32>(offset);
2634
2635            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2636            Ok(())
2637        }
2638    }
2639    unsafe impl fidl::encoding::TypeMarker for TcpCongestionControl {
2640        type Owned = Self;
2641
2642        #[inline(always)]
2643        fn inline_align(_context: fidl::encoding::Context) -> usize {
2644            std::mem::align_of::<u32>()
2645        }
2646
2647        #[inline(always)]
2648        fn inline_size(_context: fidl::encoding::Context) -> usize {
2649            std::mem::size_of::<u32>()
2650        }
2651
2652        #[inline(always)]
2653        fn encode_is_copy() -> bool {
2654            true
2655        }
2656
2657        #[inline(always)]
2658        fn decode_is_copy() -> bool {
2659            false
2660        }
2661    }
2662
2663    impl fidl::encoding::ValueTypeMarker for TcpCongestionControl {
2664        type Borrowed<'a> = Self;
2665        #[inline(always)]
2666        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2667            *value
2668        }
2669    }
2670
2671    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2672        for TcpCongestionControl
2673    {
2674        #[inline]
2675        unsafe fn encode(
2676            self,
2677            encoder: &mut fidl::encoding::Encoder<'_, D>,
2678            offset: usize,
2679            _depth: fidl::encoding::Depth,
2680        ) -> fidl::Result<()> {
2681            encoder.debug_check_bounds::<Self>(offset);
2682            encoder.write_num(self.into_primitive(), offset);
2683            Ok(())
2684        }
2685    }
2686
2687    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TcpCongestionControl {
2688        #[inline(always)]
2689        fn new_empty() -> Self {
2690            Self::Reno
2691        }
2692
2693        #[inline]
2694        unsafe fn decode(
2695            &mut self,
2696            decoder: &mut fidl::encoding::Decoder<'_, D>,
2697            offset: usize,
2698            _depth: fidl::encoding::Depth,
2699        ) -> fidl::Result<()> {
2700            decoder.debug_check_bounds::<Self>(offset);
2701            let prim = decoder.read_num::<u32>(offset);
2702
2703            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2704            Ok(())
2705        }
2706    }
2707    unsafe impl fidl::encoding::TypeMarker for TcpCongestionControlState {
2708        type Owned = Self;
2709
2710        #[inline(always)]
2711        fn inline_align(_context: fidl::encoding::Context) -> usize {
2712            std::mem::align_of::<u32>()
2713        }
2714
2715        #[inline(always)]
2716        fn inline_size(_context: fidl::encoding::Context) -> usize {
2717            std::mem::size_of::<u32>()
2718        }
2719
2720        #[inline(always)]
2721        fn encode_is_copy() -> bool {
2722            true
2723        }
2724
2725        #[inline(always)]
2726        fn decode_is_copy() -> bool {
2727            false
2728        }
2729    }
2730
2731    impl fidl::encoding::ValueTypeMarker for TcpCongestionControlState {
2732        type Borrowed<'a> = Self;
2733        #[inline(always)]
2734        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2735            *value
2736        }
2737    }
2738
2739    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2740        for TcpCongestionControlState
2741    {
2742        #[inline]
2743        unsafe fn encode(
2744            self,
2745            encoder: &mut fidl::encoding::Encoder<'_, D>,
2746            offset: usize,
2747            _depth: fidl::encoding::Depth,
2748        ) -> fidl::Result<()> {
2749            encoder.debug_check_bounds::<Self>(offset);
2750            encoder.write_num(self.into_primitive(), offset);
2751            Ok(())
2752        }
2753    }
2754
2755    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2756        for TcpCongestionControlState
2757    {
2758        #[inline(always)]
2759        fn new_empty() -> Self {
2760            Self::Open
2761        }
2762
2763        #[inline]
2764        unsafe fn decode(
2765            &mut self,
2766            decoder: &mut fidl::encoding::Decoder<'_, D>,
2767            offset: usize,
2768            _depth: fidl::encoding::Depth,
2769        ) -> fidl::Result<()> {
2770            decoder.debug_check_bounds::<Self>(offset);
2771            let prim = decoder.read_num::<u32>(offset);
2772
2773            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2774            Ok(())
2775        }
2776    }
2777    unsafe impl fidl::encoding::TypeMarker for TimestampOption {
2778        type Owned = Self;
2779
2780        #[inline(always)]
2781        fn inline_align(_context: fidl::encoding::Context) -> usize {
2782            std::mem::align_of::<u32>()
2783        }
2784
2785        #[inline(always)]
2786        fn inline_size(_context: fidl::encoding::Context) -> usize {
2787            std::mem::size_of::<u32>()
2788        }
2789
2790        #[inline(always)]
2791        fn encode_is_copy() -> bool {
2792            true
2793        }
2794
2795        #[inline(always)]
2796        fn decode_is_copy() -> bool {
2797            false
2798        }
2799    }
2800
2801    impl fidl::encoding::ValueTypeMarker for TimestampOption {
2802        type Borrowed<'a> = Self;
2803        #[inline(always)]
2804        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2805            *value
2806        }
2807    }
2808
2809    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2810        for TimestampOption
2811    {
2812        #[inline]
2813        unsafe fn encode(
2814            self,
2815            encoder: &mut fidl::encoding::Encoder<'_, D>,
2816            offset: usize,
2817            _depth: fidl::encoding::Depth,
2818        ) -> fidl::Result<()> {
2819            encoder.debug_check_bounds::<Self>(offset);
2820            encoder.write_num(self.into_primitive(), offset);
2821            Ok(())
2822        }
2823    }
2824
2825    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TimestampOption {
2826        #[inline(always)]
2827        fn new_empty() -> Self {
2828            Self::Disabled
2829        }
2830
2831        #[inline]
2832        unsafe fn decode(
2833            &mut self,
2834            decoder: &mut fidl::encoding::Decoder<'_, D>,
2835            offset: usize,
2836            _depth: fidl::encoding::Depth,
2837        ) -> fidl::Result<()> {
2838            decoder.debug_check_bounds::<Self>(offset);
2839            let prim = decoder.read_num::<u32>(offset);
2840
2841            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2842            Ok(())
2843        }
2844    }
2845    unsafe impl fidl::encoding::TypeMarker for UdpMetadataEncodingProtocolVersion {
2846        type Owned = Self;
2847
2848        #[inline(always)]
2849        fn inline_align(_context: fidl::encoding::Context) -> usize {
2850            std::mem::align_of::<u16>()
2851        }
2852
2853        #[inline(always)]
2854        fn inline_size(_context: fidl::encoding::Context) -> usize {
2855            std::mem::size_of::<u16>()
2856        }
2857
2858        #[inline(always)]
2859        fn encode_is_copy() -> bool {
2860            false
2861        }
2862
2863        #[inline(always)]
2864        fn decode_is_copy() -> bool {
2865            false
2866        }
2867    }
2868
2869    impl fidl::encoding::ValueTypeMarker for UdpMetadataEncodingProtocolVersion {
2870        type Borrowed<'a> = Self;
2871        #[inline(always)]
2872        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2873            *value
2874        }
2875    }
2876
2877    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2878        for UdpMetadataEncodingProtocolVersion
2879    {
2880        #[inline]
2881        unsafe fn encode(
2882            self,
2883            encoder: &mut fidl::encoding::Encoder<'_, D>,
2884            offset: usize,
2885            _depth: fidl::encoding::Depth,
2886        ) -> fidl::Result<()> {
2887            encoder.debug_check_bounds::<Self>(offset);
2888            encoder.write_num(self.into_primitive(), offset);
2889            Ok(())
2890        }
2891    }
2892
2893    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2894        for UdpMetadataEncodingProtocolVersion
2895    {
2896        #[inline(always)]
2897        fn new_empty() -> Self {
2898            Self::unknown()
2899        }
2900
2901        #[inline]
2902        unsafe fn decode(
2903            &mut self,
2904            decoder: &mut fidl::encoding::Decoder<'_, D>,
2905            offset: usize,
2906            _depth: fidl::encoding::Depth,
2907        ) -> fidl::Result<()> {
2908            decoder.debug_check_bounds::<Self>(offset);
2909            let prim = decoder.read_num::<u16>(offset);
2910
2911            *self = Self::from_primitive_allow_unknown(prim);
2912            Ok(())
2913        }
2914    }
2915
2916    impl fidl::encoding::ValueTypeMarker for BaseDatagramSocketGetInfoResponse {
2917        type Borrowed<'a> = &'a Self;
2918        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2919            value
2920        }
2921    }
2922
2923    unsafe impl fidl::encoding::TypeMarker for BaseDatagramSocketGetInfoResponse {
2924        type Owned = Self;
2925
2926        #[inline(always)]
2927        fn inline_align(_context: fidl::encoding::Context) -> usize {
2928            4
2929        }
2930
2931        #[inline(always)]
2932        fn inline_size(_context: fidl::encoding::Context) -> usize {
2933            8
2934        }
2935    }
2936
2937    unsafe impl<D: fidl::encoding::ResourceDialect>
2938        fidl::encoding::Encode<BaseDatagramSocketGetInfoResponse, D>
2939        for &BaseDatagramSocketGetInfoResponse
2940    {
2941        #[inline]
2942        unsafe fn encode(
2943            self,
2944            encoder: &mut fidl::encoding::Encoder<'_, D>,
2945            offset: usize,
2946            _depth: fidl::encoding::Depth,
2947        ) -> fidl::Result<()> {
2948            encoder.debug_check_bounds::<BaseDatagramSocketGetInfoResponse>(offset);
2949            // Delegate to tuple encoding.
2950            fidl::encoding::Encode::<BaseDatagramSocketGetInfoResponse, D>::encode(
2951                (
2952                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
2953                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
2954                        &self.proto,
2955                    ),
2956                ),
2957                encoder,
2958                offset,
2959                _depth,
2960            )
2961        }
2962    }
2963    unsafe impl<
2964        D: fidl::encoding::ResourceDialect,
2965        T0: fidl::encoding::Encode<Domain, D>,
2966        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
2967    > fidl::encoding::Encode<BaseDatagramSocketGetInfoResponse, D> for (T0, T1)
2968    {
2969        #[inline]
2970        unsafe fn encode(
2971            self,
2972            encoder: &mut fidl::encoding::Encoder<'_, D>,
2973            offset: usize,
2974            depth: fidl::encoding::Depth,
2975        ) -> fidl::Result<()> {
2976            encoder.debug_check_bounds::<BaseDatagramSocketGetInfoResponse>(offset);
2977            // Zero out padding regions. There's no need to apply masks
2978            // because the unmasked parts will be overwritten by fields.
2979            unsafe {
2980                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2981                (ptr as *mut u32).write_unaligned(0);
2982            }
2983            // Write the fields.
2984            self.0.encode(encoder, offset + 0, depth)?;
2985            self.1.encode(encoder, offset + 4, depth)?;
2986            Ok(())
2987        }
2988    }
2989
2990    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2991        for BaseDatagramSocketGetInfoResponse
2992    {
2993        #[inline(always)]
2994        fn new_empty() -> Self {
2995            Self {
2996                domain: fidl::new_empty!(Domain, D),
2997                proto: fidl::new_empty!(DatagramSocketProtocol, D),
2998            }
2999        }
3000
3001        #[inline]
3002        unsafe fn decode(
3003            &mut self,
3004            decoder: &mut fidl::encoding::Decoder<'_, D>,
3005            offset: usize,
3006            _depth: fidl::encoding::Depth,
3007        ) -> fidl::Result<()> {
3008            decoder.debug_check_bounds::<Self>(offset);
3009            // Verify that padding bytes are zero.
3010            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3011            let padval = unsafe { (ptr as *const u32).read_unaligned() };
3012            let mask = 0xffff0000u32;
3013            let maskedval = padval & mask;
3014            if maskedval != 0 {
3015                return Err(fidl::Error::NonZeroPadding {
3016                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3017                });
3018            }
3019            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
3020            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
3021            Ok(())
3022        }
3023    }
3024
3025    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketAddIpMembershipRequest {
3026        type Borrowed<'a> = &'a Self;
3027        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3028            value
3029        }
3030    }
3031
3032    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketAddIpMembershipRequest {
3033        type Owned = Self;
3034
3035        #[inline(always)]
3036        fn inline_align(_context: fidl::encoding::Context) -> usize {
3037            8
3038        }
3039
3040        #[inline(always)]
3041        fn inline_size(_context: fidl::encoding::Context) -> usize {
3042            16
3043        }
3044    }
3045
3046    unsafe impl<D: fidl::encoding::ResourceDialect>
3047        fidl::encoding::Encode<BaseNetworkSocketAddIpMembershipRequest, D>
3048        for &BaseNetworkSocketAddIpMembershipRequest
3049    {
3050        #[inline]
3051        unsafe fn encode(
3052            self,
3053            encoder: &mut fidl::encoding::Encoder<'_, D>,
3054            offset: usize,
3055            _depth: fidl::encoding::Depth,
3056        ) -> fidl::Result<()> {
3057            encoder.debug_check_bounds::<BaseNetworkSocketAddIpMembershipRequest>(offset);
3058            // Delegate to tuple encoding.
3059            fidl::encoding::Encode::<BaseNetworkSocketAddIpMembershipRequest, D>::encode(
3060                (<IpMulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3061                    &self.membership,
3062                ),),
3063                encoder,
3064                offset,
3065                _depth,
3066            )
3067        }
3068    }
3069    unsafe impl<
3070        D: fidl::encoding::ResourceDialect,
3071        T0: fidl::encoding::Encode<IpMulticastMembership, D>,
3072    > fidl::encoding::Encode<BaseNetworkSocketAddIpMembershipRequest, D> for (T0,)
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::<BaseNetworkSocketAddIpMembershipRequest>(offset);
3082            // Zero out padding regions. There's no need to apply masks
3083            // because the unmasked parts will be overwritten by fields.
3084            // Write the fields.
3085            self.0.encode(encoder, offset + 0, depth)?;
3086            Ok(())
3087        }
3088    }
3089
3090    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3091        for BaseNetworkSocketAddIpMembershipRequest
3092    {
3093        #[inline(always)]
3094        fn new_empty() -> Self {
3095            Self { membership: fidl::new_empty!(IpMulticastMembership, D) }
3096        }
3097
3098        #[inline]
3099        unsafe fn decode(
3100            &mut self,
3101            decoder: &mut fidl::encoding::Decoder<'_, D>,
3102            offset: usize,
3103            _depth: fidl::encoding::Depth,
3104        ) -> fidl::Result<()> {
3105            decoder.debug_check_bounds::<Self>(offset);
3106            // Verify that padding bytes are zero.
3107            fidl::decode!(
3108                IpMulticastMembership,
3109                D,
3110                &mut self.membership,
3111                decoder,
3112                offset + 0,
3113                _depth
3114            )?;
3115            Ok(())
3116        }
3117    }
3118
3119    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketAddIpv6MembershipRequest {
3120        type Borrowed<'a> = &'a Self;
3121        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3122            value
3123        }
3124    }
3125
3126    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketAddIpv6MembershipRequest {
3127        type Owned = Self;
3128
3129        #[inline(always)]
3130        fn inline_align(_context: fidl::encoding::Context) -> usize {
3131            8
3132        }
3133
3134        #[inline(always)]
3135        fn inline_size(_context: fidl::encoding::Context) -> usize {
3136            24
3137        }
3138    }
3139
3140    unsafe impl<D: fidl::encoding::ResourceDialect>
3141        fidl::encoding::Encode<BaseNetworkSocketAddIpv6MembershipRequest, D>
3142        for &BaseNetworkSocketAddIpv6MembershipRequest
3143    {
3144        #[inline]
3145        unsafe fn encode(
3146            self,
3147            encoder: &mut fidl::encoding::Encoder<'_, D>,
3148            offset: usize,
3149            _depth: fidl::encoding::Depth,
3150        ) -> fidl::Result<()> {
3151            encoder.debug_check_bounds::<BaseNetworkSocketAddIpv6MembershipRequest>(offset);
3152            // Delegate to tuple encoding.
3153            fidl::encoding::Encode::<BaseNetworkSocketAddIpv6MembershipRequest, D>::encode(
3154                (<Ipv6MulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3155                    &self.membership,
3156                ),),
3157                encoder,
3158                offset,
3159                _depth,
3160            )
3161        }
3162    }
3163    unsafe impl<
3164        D: fidl::encoding::ResourceDialect,
3165        T0: fidl::encoding::Encode<Ipv6MulticastMembership, D>,
3166    > fidl::encoding::Encode<BaseNetworkSocketAddIpv6MembershipRequest, D> for (T0,)
3167    {
3168        #[inline]
3169        unsafe fn encode(
3170            self,
3171            encoder: &mut fidl::encoding::Encoder<'_, D>,
3172            offset: usize,
3173            depth: fidl::encoding::Depth,
3174        ) -> fidl::Result<()> {
3175            encoder.debug_check_bounds::<BaseNetworkSocketAddIpv6MembershipRequest>(offset);
3176            // Zero out padding regions. There's no need to apply masks
3177            // because the unmasked parts will be overwritten by fields.
3178            // Write the fields.
3179            self.0.encode(encoder, offset + 0, depth)?;
3180            Ok(())
3181        }
3182    }
3183
3184    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3185        for BaseNetworkSocketAddIpv6MembershipRequest
3186    {
3187        #[inline(always)]
3188        fn new_empty() -> Self {
3189            Self { membership: fidl::new_empty!(Ipv6MulticastMembership, D) }
3190        }
3191
3192        #[inline]
3193        unsafe fn decode(
3194            &mut self,
3195            decoder: &mut fidl::encoding::Decoder<'_, D>,
3196            offset: usize,
3197            _depth: fidl::encoding::Depth,
3198        ) -> fidl::Result<()> {
3199            decoder.debug_check_bounds::<Self>(offset);
3200            // Verify that padding bytes are zero.
3201            fidl::decode!(
3202                Ipv6MulticastMembership,
3203                D,
3204                &mut self.membership,
3205                decoder,
3206                offset + 0,
3207                _depth
3208            )?;
3209            Ok(())
3210        }
3211    }
3212
3213    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketBindRequest {
3214        type Borrowed<'a> = &'a Self;
3215        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3216            value
3217        }
3218    }
3219
3220    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketBindRequest {
3221        type Owned = Self;
3222
3223        #[inline(always)]
3224        fn inline_align(_context: fidl::encoding::Context) -> usize {
3225            8
3226        }
3227
3228        #[inline(always)]
3229        fn inline_size(_context: fidl::encoding::Context) -> usize {
3230            16
3231        }
3232    }
3233
3234    unsafe impl<D: fidl::encoding::ResourceDialect>
3235        fidl::encoding::Encode<BaseNetworkSocketBindRequest, D> for &BaseNetworkSocketBindRequest
3236    {
3237        #[inline]
3238        unsafe fn encode(
3239            self,
3240            encoder: &mut fidl::encoding::Encoder<'_, D>,
3241            offset: usize,
3242            _depth: fidl::encoding::Depth,
3243        ) -> fidl::Result<()> {
3244            encoder.debug_check_bounds::<BaseNetworkSocketBindRequest>(offset);
3245            // Delegate to tuple encoding.
3246            fidl::encoding::Encode::<BaseNetworkSocketBindRequest, D>::encode(
3247                (
3248                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
3249                ),
3250                encoder, offset, _depth
3251            )
3252        }
3253    }
3254    unsafe impl<
3255        D: fidl::encoding::ResourceDialect,
3256        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
3257    > fidl::encoding::Encode<BaseNetworkSocketBindRequest, D> for (T0,)
3258    {
3259        #[inline]
3260        unsafe fn encode(
3261            self,
3262            encoder: &mut fidl::encoding::Encoder<'_, D>,
3263            offset: usize,
3264            depth: fidl::encoding::Depth,
3265        ) -> fidl::Result<()> {
3266            encoder.debug_check_bounds::<BaseNetworkSocketBindRequest>(offset);
3267            // Zero out padding regions. There's no need to apply masks
3268            // because the unmasked parts will be overwritten by fields.
3269            // Write the fields.
3270            self.0.encode(encoder, offset + 0, depth)?;
3271            Ok(())
3272        }
3273    }
3274
3275    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3276        for BaseNetworkSocketBindRequest
3277    {
3278        #[inline(always)]
3279        fn new_empty() -> Self {
3280            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
3281        }
3282
3283        #[inline]
3284        unsafe fn decode(
3285            &mut self,
3286            decoder: &mut fidl::encoding::Decoder<'_, D>,
3287            offset: usize,
3288            _depth: fidl::encoding::Depth,
3289        ) -> fidl::Result<()> {
3290            decoder.debug_check_bounds::<Self>(offset);
3291            // Verify that padding bytes are zero.
3292            fidl::decode!(
3293                fidl_fuchsia_net__common::SocketAddress,
3294                D,
3295                &mut self.addr,
3296                decoder,
3297                offset + 0,
3298                _depth
3299            )?;
3300            Ok(())
3301        }
3302    }
3303
3304    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketConnectRequest {
3305        type Borrowed<'a> = &'a Self;
3306        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3307            value
3308        }
3309    }
3310
3311    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketConnectRequest {
3312        type Owned = Self;
3313
3314        #[inline(always)]
3315        fn inline_align(_context: fidl::encoding::Context) -> usize {
3316            8
3317        }
3318
3319        #[inline(always)]
3320        fn inline_size(_context: fidl::encoding::Context) -> usize {
3321            16
3322        }
3323    }
3324
3325    unsafe impl<D: fidl::encoding::ResourceDialect>
3326        fidl::encoding::Encode<BaseNetworkSocketConnectRequest, D>
3327        for &BaseNetworkSocketConnectRequest
3328    {
3329        #[inline]
3330        unsafe fn encode(
3331            self,
3332            encoder: &mut fidl::encoding::Encoder<'_, D>,
3333            offset: usize,
3334            _depth: fidl::encoding::Depth,
3335        ) -> fidl::Result<()> {
3336            encoder.debug_check_bounds::<BaseNetworkSocketConnectRequest>(offset);
3337            // Delegate to tuple encoding.
3338            fidl::encoding::Encode::<BaseNetworkSocketConnectRequest, D>::encode(
3339                (
3340                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
3341                ),
3342                encoder, offset, _depth
3343            )
3344        }
3345    }
3346    unsafe impl<
3347        D: fidl::encoding::ResourceDialect,
3348        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
3349    > fidl::encoding::Encode<BaseNetworkSocketConnectRequest, D> for (T0,)
3350    {
3351        #[inline]
3352        unsafe fn encode(
3353            self,
3354            encoder: &mut fidl::encoding::Encoder<'_, D>,
3355            offset: usize,
3356            depth: fidl::encoding::Depth,
3357        ) -> fidl::Result<()> {
3358            encoder.debug_check_bounds::<BaseNetworkSocketConnectRequest>(offset);
3359            // Zero out padding regions. There's no need to apply masks
3360            // because the unmasked parts will be overwritten by fields.
3361            // Write the fields.
3362            self.0.encode(encoder, offset + 0, depth)?;
3363            Ok(())
3364        }
3365    }
3366
3367    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3368        for BaseNetworkSocketConnectRequest
3369    {
3370        #[inline(always)]
3371        fn new_empty() -> Self {
3372            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
3373        }
3374
3375        #[inline]
3376        unsafe fn decode(
3377            &mut self,
3378            decoder: &mut fidl::encoding::Decoder<'_, D>,
3379            offset: usize,
3380            _depth: fidl::encoding::Depth,
3381        ) -> fidl::Result<()> {
3382            decoder.debug_check_bounds::<Self>(offset);
3383            // Verify that padding bytes are zero.
3384            fidl::decode!(
3385                fidl_fuchsia_net__common::SocketAddress,
3386                D,
3387                &mut self.addr,
3388                decoder,
3389                offset + 0,
3390                _depth
3391            )?;
3392            Ok(())
3393        }
3394    }
3395
3396    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketDropIpMembershipRequest {
3397        type Borrowed<'a> = &'a Self;
3398        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3399            value
3400        }
3401    }
3402
3403    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketDropIpMembershipRequest {
3404        type Owned = Self;
3405
3406        #[inline(always)]
3407        fn inline_align(_context: fidl::encoding::Context) -> usize {
3408            8
3409        }
3410
3411        #[inline(always)]
3412        fn inline_size(_context: fidl::encoding::Context) -> usize {
3413            16
3414        }
3415    }
3416
3417    unsafe impl<D: fidl::encoding::ResourceDialect>
3418        fidl::encoding::Encode<BaseNetworkSocketDropIpMembershipRequest, D>
3419        for &BaseNetworkSocketDropIpMembershipRequest
3420    {
3421        #[inline]
3422        unsafe fn encode(
3423            self,
3424            encoder: &mut fidl::encoding::Encoder<'_, D>,
3425            offset: usize,
3426            _depth: fidl::encoding::Depth,
3427        ) -> fidl::Result<()> {
3428            encoder.debug_check_bounds::<BaseNetworkSocketDropIpMembershipRequest>(offset);
3429            // Delegate to tuple encoding.
3430            fidl::encoding::Encode::<BaseNetworkSocketDropIpMembershipRequest, D>::encode(
3431                (<IpMulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3432                    &self.membership,
3433                ),),
3434                encoder,
3435                offset,
3436                _depth,
3437            )
3438        }
3439    }
3440    unsafe impl<
3441        D: fidl::encoding::ResourceDialect,
3442        T0: fidl::encoding::Encode<IpMulticastMembership, D>,
3443    > fidl::encoding::Encode<BaseNetworkSocketDropIpMembershipRequest, D> for (T0,)
3444    {
3445        #[inline]
3446        unsafe fn encode(
3447            self,
3448            encoder: &mut fidl::encoding::Encoder<'_, D>,
3449            offset: usize,
3450            depth: fidl::encoding::Depth,
3451        ) -> fidl::Result<()> {
3452            encoder.debug_check_bounds::<BaseNetworkSocketDropIpMembershipRequest>(offset);
3453            // Zero out padding regions. There's no need to apply masks
3454            // because the unmasked parts will be overwritten by fields.
3455            // Write the fields.
3456            self.0.encode(encoder, offset + 0, depth)?;
3457            Ok(())
3458        }
3459    }
3460
3461    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3462        for BaseNetworkSocketDropIpMembershipRequest
3463    {
3464        #[inline(always)]
3465        fn new_empty() -> Self {
3466            Self { membership: fidl::new_empty!(IpMulticastMembership, D) }
3467        }
3468
3469        #[inline]
3470        unsafe fn decode(
3471            &mut self,
3472            decoder: &mut fidl::encoding::Decoder<'_, D>,
3473            offset: usize,
3474            _depth: fidl::encoding::Depth,
3475        ) -> fidl::Result<()> {
3476            decoder.debug_check_bounds::<Self>(offset);
3477            // Verify that padding bytes are zero.
3478            fidl::decode!(
3479                IpMulticastMembership,
3480                D,
3481                &mut self.membership,
3482                decoder,
3483                offset + 0,
3484                _depth
3485            )?;
3486            Ok(())
3487        }
3488    }
3489
3490    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketDropIpv6MembershipRequest {
3491        type Borrowed<'a> = &'a Self;
3492        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3493            value
3494        }
3495    }
3496
3497    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketDropIpv6MembershipRequest {
3498        type Owned = Self;
3499
3500        #[inline(always)]
3501        fn inline_align(_context: fidl::encoding::Context) -> usize {
3502            8
3503        }
3504
3505        #[inline(always)]
3506        fn inline_size(_context: fidl::encoding::Context) -> usize {
3507            24
3508        }
3509    }
3510
3511    unsafe impl<D: fidl::encoding::ResourceDialect>
3512        fidl::encoding::Encode<BaseNetworkSocketDropIpv6MembershipRequest, D>
3513        for &BaseNetworkSocketDropIpv6MembershipRequest
3514    {
3515        #[inline]
3516        unsafe fn encode(
3517            self,
3518            encoder: &mut fidl::encoding::Encoder<'_, D>,
3519            offset: usize,
3520            _depth: fidl::encoding::Depth,
3521        ) -> fidl::Result<()> {
3522            encoder.debug_check_bounds::<BaseNetworkSocketDropIpv6MembershipRequest>(offset);
3523            // Delegate to tuple encoding.
3524            fidl::encoding::Encode::<BaseNetworkSocketDropIpv6MembershipRequest, D>::encode(
3525                (<Ipv6MulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3526                    &self.membership,
3527                ),),
3528                encoder,
3529                offset,
3530                _depth,
3531            )
3532        }
3533    }
3534    unsafe impl<
3535        D: fidl::encoding::ResourceDialect,
3536        T0: fidl::encoding::Encode<Ipv6MulticastMembership, D>,
3537    > fidl::encoding::Encode<BaseNetworkSocketDropIpv6MembershipRequest, D> for (T0,)
3538    {
3539        #[inline]
3540        unsafe fn encode(
3541            self,
3542            encoder: &mut fidl::encoding::Encoder<'_, D>,
3543            offset: usize,
3544            depth: fidl::encoding::Depth,
3545        ) -> fidl::Result<()> {
3546            encoder.debug_check_bounds::<BaseNetworkSocketDropIpv6MembershipRequest>(offset);
3547            // Zero out padding regions. There's no need to apply masks
3548            // because the unmasked parts will be overwritten by fields.
3549            // Write the fields.
3550            self.0.encode(encoder, offset + 0, depth)?;
3551            Ok(())
3552        }
3553    }
3554
3555    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3556        for BaseNetworkSocketDropIpv6MembershipRequest
3557    {
3558        #[inline(always)]
3559        fn new_empty() -> Self {
3560            Self { membership: fidl::new_empty!(Ipv6MulticastMembership, D) }
3561        }
3562
3563        #[inline]
3564        unsafe fn decode(
3565            &mut self,
3566            decoder: &mut fidl::encoding::Decoder<'_, D>,
3567            offset: usize,
3568            _depth: fidl::encoding::Depth,
3569        ) -> fidl::Result<()> {
3570            decoder.debug_check_bounds::<Self>(offset);
3571            // Verify that padding bytes are zero.
3572            fidl::decode!(
3573                Ipv6MulticastMembership,
3574                D,
3575                &mut self.membership,
3576                decoder,
3577                offset + 0,
3578                _depth
3579            )?;
3580            Ok(())
3581        }
3582    }
3583
3584    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastInterfaceRequest {
3585        type Borrowed<'a> = &'a Self;
3586        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3587            value
3588        }
3589    }
3590
3591    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastInterfaceRequest {
3592        type Owned = Self;
3593
3594        #[inline(always)]
3595        fn inline_align(_context: fidl::encoding::Context) -> usize {
3596            8
3597        }
3598
3599        #[inline(always)]
3600        fn inline_size(_context: fidl::encoding::Context) -> usize {
3601            16
3602        }
3603    }
3604
3605    unsafe impl<D: fidl::encoding::ResourceDialect>
3606        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastInterfaceRequest, D>
3607        for &BaseNetworkSocketSetIpMulticastInterfaceRequest
3608    {
3609        #[inline]
3610        unsafe fn encode(
3611            self,
3612            encoder: &mut fidl::encoding::Encoder<'_, D>,
3613            offset: usize,
3614            _depth: fidl::encoding::Depth,
3615        ) -> fidl::Result<()> {
3616            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastInterfaceRequest>(offset);
3617            // Delegate to tuple encoding.
3618            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastInterfaceRequest, D>::encode(
3619                (
3620                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
3621                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.address),
3622                ),
3623                encoder, offset, _depth
3624            )
3625        }
3626    }
3627    unsafe impl<
3628        D: fidl::encoding::ResourceDialect,
3629        T0: fidl::encoding::Encode<u64, D>,
3630        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
3631    > fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastInterfaceRequest, D> for (T0, T1)
3632    {
3633        #[inline]
3634        unsafe fn encode(
3635            self,
3636            encoder: &mut fidl::encoding::Encoder<'_, D>,
3637            offset: usize,
3638            depth: fidl::encoding::Depth,
3639        ) -> fidl::Result<()> {
3640            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastInterfaceRequest>(offset);
3641            // Zero out padding regions. There's no need to apply masks
3642            // because the unmasked parts will be overwritten by fields.
3643            unsafe {
3644                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3645                (ptr as *mut u64).write_unaligned(0);
3646            }
3647            // Write the fields.
3648            self.0.encode(encoder, offset + 0, depth)?;
3649            self.1.encode(encoder, offset + 8, depth)?;
3650            Ok(())
3651        }
3652    }
3653
3654    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3655        for BaseNetworkSocketSetIpMulticastInterfaceRequest
3656    {
3657        #[inline(always)]
3658        fn new_empty() -> Self {
3659            Self {
3660                iface: fidl::new_empty!(u64, D),
3661                address: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
3662            }
3663        }
3664
3665        #[inline]
3666        unsafe fn decode(
3667            &mut self,
3668            decoder: &mut fidl::encoding::Decoder<'_, D>,
3669            offset: usize,
3670            _depth: fidl::encoding::Depth,
3671        ) -> fidl::Result<()> {
3672            decoder.debug_check_bounds::<Self>(offset);
3673            // Verify that padding bytes are zero.
3674            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3675            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3676            let mask = 0xffffffff00000000u64;
3677            let maskedval = padval & mask;
3678            if maskedval != 0 {
3679                return Err(fidl::Error::NonZeroPadding {
3680                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3681                });
3682            }
3683            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
3684            fidl::decode!(
3685                fidl_fuchsia_net__common::Ipv4Address,
3686                D,
3687                &mut self.address,
3688                decoder,
3689                offset + 8,
3690                _depth
3691            )?;
3692            Ok(())
3693        }
3694    }
3695
3696    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastLoopbackRequest {
3697        type Borrowed<'a> = &'a Self;
3698        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3699            value
3700        }
3701    }
3702
3703    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastLoopbackRequest {
3704        type Owned = Self;
3705
3706        #[inline(always)]
3707        fn inline_align(_context: fidl::encoding::Context) -> usize {
3708            1
3709        }
3710
3711        #[inline(always)]
3712        fn inline_size(_context: fidl::encoding::Context) -> usize {
3713            1
3714        }
3715    }
3716
3717    unsafe impl<D: fidl::encoding::ResourceDialect>
3718        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastLoopbackRequest, D>
3719        for &BaseNetworkSocketSetIpMulticastLoopbackRequest
3720    {
3721        #[inline]
3722        unsafe fn encode(
3723            self,
3724            encoder: &mut fidl::encoding::Encoder<'_, D>,
3725            offset: usize,
3726            _depth: fidl::encoding::Depth,
3727        ) -> fidl::Result<()> {
3728            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastLoopbackRequest>(offset);
3729            // Delegate to tuple encoding.
3730            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastLoopbackRequest, D>::encode(
3731                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3732                encoder,
3733                offset,
3734                _depth,
3735            )
3736        }
3737    }
3738    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3739        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastLoopbackRequest, D> for (T0,)
3740    {
3741        #[inline]
3742        unsafe fn encode(
3743            self,
3744            encoder: &mut fidl::encoding::Encoder<'_, D>,
3745            offset: usize,
3746            depth: fidl::encoding::Depth,
3747        ) -> fidl::Result<()> {
3748            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastLoopbackRequest>(offset);
3749            // Zero out padding regions. There's no need to apply masks
3750            // because the unmasked parts will be overwritten by fields.
3751            // Write the fields.
3752            self.0.encode(encoder, offset + 0, depth)?;
3753            Ok(())
3754        }
3755    }
3756
3757    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3758        for BaseNetworkSocketSetIpMulticastLoopbackRequest
3759    {
3760        #[inline(always)]
3761        fn new_empty() -> Self {
3762            Self { value: fidl::new_empty!(bool, D) }
3763        }
3764
3765        #[inline]
3766        unsafe fn decode(
3767            &mut self,
3768            decoder: &mut fidl::encoding::Decoder<'_, D>,
3769            offset: usize,
3770            _depth: fidl::encoding::Depth,
3771        ) -> fidl::Result<()> {
3772            decoder.debug_check_bounds::<Self>(offset);
3773            // Verify that padding bytes are zero.
3774            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
3775            Ok(())
3776        }
3777    }
3778
3779    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastTtlRequest {
3780        type Borrowed<'a> = &'a Self;
3781        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3782            value
3783        }
3784    }
3785
3786    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastTtlRequest {
3787        type Owned = Self;
3788
3789        #[inline(always)]
3790        fn inline_align(_context: fidl::encoding::Context) -> usize {
3791            8
3792        }
3793
3794        #[inline(always)]
3795        fn inline_size(_context: fidl::encoding::Context) -> usize {
3796            16
3797        }
3798    }
3799
3800    unsafe impl<D: fidl::encoding::ResourceDialect>
3801        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastTtlRequest, D>
3802        for &BaseNetworkSocketSetIpMulticastTtlRequest
3803    {
3804        #[inline]
3805        unsafe fn encode(
3806            self,
3807            encoder: &mut fidl::encoding::Encoder<'_, D>,
3808            offset: usize,
3809            _depth: fidl::encoding::Depth,
3810        ) -> fidl::Result<()> {
3811            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastTtlRequest>(offset);
3812            // Delegate to tuple encoding.
3813            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastTtlRequest, D>::encode(
3814                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3815                encoder,
3816                offset,
3817                _depth,
3818            )
3819        }
3820    }
3821    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
3822        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastTtlRequest, D> for (T0,)
3823    {
3824        #[inline]
3825        unsafe fn encode(
3826            self,
3827            encoder: &mut fidl::encoding::Encoder<'_, D>,
3828            offset: usize,
3829            depth: fidl::encoding::Depth,
3830        ) -> fidl::Result<()> {
3831            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastTtlRequest>(offset);
3832            // Zero out padding regions. There's no need to apply masks
3833            // because the unmasked parts will be overwritten by fields.
3834            // Write the fields.
3835            self.0.encode(encoder, offset + 0, depth)?;
3836            Ok(())
3837        }
3838    }
3839
3840    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3841        for BaseNetworkSocketSetIpMulticastTtlRequest
3842    {
3843        #[inline(always)]
3844        fn new_empty() -> Self {
3845            Self { value: fidl::new_empty!(OptionalUint8, D) }
3846        }
3847
3848        #[inline]
3849        unsafe fn decode(
3850            &mut self,
3851            decoder: &mut fidl::encoding::Decoder<'_, D>,
3852            offset: usize,
3853            _depth: fidl::encoding::Depth,
3854        ) -> fidl::Result<()> {
3855            decoder.debug_check_bounds::<Self>(offset);
3856            // Verify that padding bytes are zero.
3857            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
3858            Ok(())
3859        }
3860    }
3861
3862    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpPacketInfoRequest {
3863        type Borrowed<'a> = &'a Self;
3864        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3865            value
3866        }
3867    }
3868
3869    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpPacketInfoRequest {
3870        type Owned = Self;
3871
3872        #[inline(always)]
3873        fn inline_align(_context: fidl::encoding::Context) -> usize {
3874            1
3875        }
3876
3877        #[inline(always)]
3878        fn inline_size(_context: fidl::encoding::Context) -> usize {
3879            1
3880        }
3881    }
3882
3883    unsafe impl<D: fidl::encoding::ResourceDialect>
3884        fidl::encoding::Encode<BaseNetworkSocketSetIpPacketInfoRequest, D>
3885        for &BaseNetworkSocketSetIpPacketInfoRequest
3886    {
3887        #[inline]
3888        unsafe fn encode(
3889            self,
3890            encoder: &mut fidl::encoding::Encoder<'_, D>,
3891            offset: usize,
3892            _depth: fidl::encoding::Depth,
3893        ) -> fidl::Result<()> {
3894            encoder.debug_check_bounds::<BaseNetworkSocketSetIpPacketInfoRequest>(offset);
3895            // Delegate to tuple encoding.
3896            fidl::encoding::Encode::<BaseNetworkSocketSetIpPacketInfoRequest, D>::encode(
3897                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3898                encoder,
3899                offset,
3900                _depth,
3901            )
3902        }
3903    }
3904    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3905        fidl::encoding::Encode<BaseNetworkSocketSetIpPacketInfoRequest, D> for (T0,)
3906    {
3907        #[inline]
3908        unsafe fn encode(
3909            self,
3910            encoder: &mut fidl::encoding::Encoder<'_, D>,
3911            offset: usize,
3912            depth: fidl::encoding::Depth,
3913        ) -> fidl::Result<()> {
3914            encoder.debug_check_bounds::<BaseNetworkSocketSetIpPacketInfoRequest>(offset);
3915            // Zero out padding regions. There's no need to apply masks
3916            // because the unmasked parts will be overwritten by fields.
3917            // Write the fields.
3918            self.0.encode(encoder, offset + 0, depth)?;
3919            Ok(())
3920        }
3921    }
3922
3923    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3924        for BaseNetworkSocketSetIpPacketInfoRequest
3925    {
3926        #[inline(always)]
3927        fn new_empty() -> Self {
3928            Self { value: fidl::new_empty!(bool, D) }
3929        }
3930
3931        #[inline]
3932        unsafe fn decode(
3933            &mut self,
3934            decoder: &mut fidl::encoding::Decoder<'_, D>,
3935            offset: usize,
3936            _depth: fidl::encoding::Depth,
3937        ) -> fidl::Result<()> {
3938            decoder.debug_check_bounds::<Self>(offset);
3939            // Verify that padding bytes are zero.
3940            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
3941            Ok(())
3942        }
3943    }
3944
3945    impl fidl::encoding::ValueTypeMarker
3946        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
3947    {
3948        type Borrowed<'a> = &'a Self;
3949        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3950            value
3951        }
3952    }
3953
3954    unsafe impl fidl::encoding::TypeMarker
3955        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
3956    {
3957        type Owned = Self;
3958
3959        #[inline(always)]
3960        fn inline_align(_context: fidl::encoding::Context) -> usize {
3961            1
3962        }
3963
3964        #[inline(always)]
3965        fn inline_size(_context: fidl::encoding::Context) -> usize {
3966            1
3967        }
3968    }
3969
3970    unsafe impl<D: fidl::encoding::ResourceDialect>
3971        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest, D>
3972        for &BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
3973    {
3974        #[inline]
3975        unsafe fn encode(
3976            self,
3977            encoder: &mut fidl::encoding::Encoder<'_, D>,
3978            offset: usize,
3979            _depth: fidl::encoding::Depth,
3980        ) -> fidl::Result<()> {
3981            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest>(offset);
3982            // Delegate to tuple encoding.
3983            fidl::encoding::Encode::<
3984                BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest,
3985                D,
3986            >::encode(
3987                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3988                encoder,
3989                offset,
3990                _depth,
3991            )
3992        }
3993    }
3994    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3995        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest, D>
3996        for (T0,)
3997    {
3998        #[inline]
3999        unsafe fn encode(
4000            self,
4001            encoder: &mut fidl::encoding::Encoder<'_, D>,
4002            offset: usize,
4003            depth: fidl::encoding::Depth,
4004        ) -> fidl::Result<()> {
4005            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest>(offset);
4006            // Zero out padding regions. There's no need to apply masks
4007            // because the unmasked parts will be overwritten by fields.
4008            // Write the fields.
4009            self.0.encode(encoder, offset + 0, depth)?;
4010            Ok(())
4011        }
4012    }
4013
4014    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4015        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
4016    {
4017        #[inline(always)]
4018        fn new_empty() -> Self {
4019            Self { value: fidl::new_empty!(bool, D) }
4020        }
4021
4022        #[inline]
4023        unsafe fn decode(
4024            &mut self,
4025            decoder: &mut fidl::encoding::Decoder<'_, D>,
4026            offset: usize,
4027            _depth: fidl::encoding::Depth,
4028        ) -> fidl::Result<()> {
4029            decoder.debug_check_bounds::<Self>(offset);
4030            // Verify that padding bytes are zero.
4031            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4032            Ok(())
4033        }
4034    }
4035
4036    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpReceiveTtlRequest {
4037        type Borrowed<'a> = &'a Self;
4038        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4039            value
4040        }
4041    }
4042
4043    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpReceiveTtlRequest {
4044        type Owned = Self;
4045
4046        #[inline(always)]
4047        fn inline_align(_context: fidl::encoding::Context) -> usize {
4048            1
4049        }
4050
4051        #[inline(always)]
4052        fn inline_size(_context: fidl::encoding::Context) -> usize {
4053            1
4054        }
4055    }
4056
4057    unsafe impl<D: fidl::encoding::ResourceDialect>
4058        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTtlRequest, D>
4059        for &BaseNetworkSocketSetIpReceiveTtlRequest
4060    {
4061        #[inline]
4062        unsafe fn encode(
4063            self,
4064            encoder: &mut fidl::encoding::Encoder<'_, D>,
4065            offset: usize,
4066            _depth: fidl::encoding::Depth,
4067        ) -> fidl::Result<()> {
4068            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTtlRequest>(offset);
4069            // Delegate to tuple encoding.
4070            fidl::encoding::Encode::<BaseNetworkSocketSetIpReceiveTtlRequest, D>::encode(
4071                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4072                encoder,
4073                offset,
4074                _depth,
4075            )
4076        }
4077    }
4078    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4079        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTtlRequest, D> for (T0,)
4080    {
4081        #[inline]
4082        unsafe fn encode(
4083            self,
4084            encoder: &mut fidl::encoding::Encoder<'_, D>,
4085            offset: usize,
4086            depth: fidl::encoding::Depth,
4087        ) -> fidl::Result<()> {
4088            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTtlRequest>(offset);
4089            // Zero out padding regions. There's no need to apply masks
4090            // because the unmasked parts will be overwritten by fields.
4091            // Write the fields.
4092            self.0.encode(encoder, offset + 0, depth)?;
4093            Ok(())
4094        }
4095    }
4096
4097    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4098        for BaseNetworkSocketSetIpReceiveTtlRequest
4099    {
4100        #[inline(always)]
4101        fn new_empty() -> Self {
4102            Self { value: fidl::new_empty!(bool, D) }
4103        }
4104
4105        #[inline]
4106        unsafe fn decode(
4107            &mut self,
4108            decoder: &mut fidl::encoding::Decoder<'_, D>,
4109            offset: usize,
4110            _depth: fidl::encoding::Depth,
4111        ) -> fidl::Result<()> {
4112            decoder.debug_check_bounds::<Self>(offset);
4113            // Verify that padding bytes are zero.
4114            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4115            Ok(())
4116        }
4117    }
4118
4119    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
4120        type Borrowed<'a> = &'a Self;
4121        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4122            value
4123        }
4124    }
4125
4126    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
4127        type Owned = Self;
4128
4129        #[inline(always)]
4130        fn inline_align(_context: fidl::encoding::Context) -> usize {
4131            1
4132        }
4133
4134        #[inline(always)]
4135        fn inline_size(_context: fidl::encoding::Context) -> usize {
4136            1
4137        }
4138    }
4139
4140    unsafe impl<D: fidl::encoding::ResourceDialect>
4141        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D>
4142        for &BaseNetworkSocketSetIpReceiveTypeOfServiceRequest
4143    {
4144        #[inline]
4145        unsafe fn encode(
4146            self,
4147            encoder: &mut fidl::encoding::Encoder<'_, D>,
4148            offset: usize,
4149            _depth: fidl::encoding::Depth,
4150        ) -> fidl::Result<()> {
4151            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest>(offset);
4152            // Delegate to tuple encoding.
4153            fidl::encoding::Encode::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D>::encode(
4154                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4155                encoder,
4156                offset,
4157                _depth,
4158            )
4159        }
4160    }
4161    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4162        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D> for (T0,)
4163    {
4164        #[inline]
4165        unsafe fn encode(
4166            self,
4167            encoder: &mut fidl::encoding::Encoder<'_, D>,
4168            offset: usize,
4169            depth: fidl::encoding::Depth,
4170        ) -> fidl::Result<()> {
4171            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest>(offset);
4172            // Zero out padding regions. There's no need to apply masks
4173            // because the unmasked parts will be overwritten by fields.
4174            // Write the fields.
4175            self.0.encode(encoder, offset + 0, depth)?;
4176            Ok(())
4177        }
4178    }
4179
4180    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4181        for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest
4182    {
4183        #[inline(always)]
4184        fn new_empty() -> Self {
4185            Self { value: fidl::new_empty!(bool, D) }
4186        }
4187
4188        #[inline]
4189        unsafe fn decode(
4190            &mut self,
4191            decoder: &mut fidl::encoding::Decoder<'_, D>,
4192            offset: usize,
4193            _depth: fidl::encoding::Depth,
4194        ) -> fidl::Result<()> {
4195            decoder.debug_check_bounds::<Self>(offset);
4196            // Verify that padding bytes are zero.
4197            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4198            Ok(())
4199        }
4200    }
4201
4202    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTransparentRequest {
4203        type Borrowed<'a> = &'a Self;
4204        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4205            value
4206        }
4207    }
4208
4209    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTransparentRequest {
4210        type Owned = Self;
4211
4212        #[inline(always)]
4213        fn inline_align(_context: fidl::encoding::Context) -> usize {
4214            1
4215        }
4216
4217        #[inline(always)]
4218        fn inline_size(_context: fidl::encoding::Context) -> usize {
4219            1
4220        }
4221    }
4222
4223    unsafe impl<D: fidl::encoding::ResourceDialect>
4224        fidl::encoding::Encode<BaseNetworkSocketSetIpTransparentRequest, D>
4225        for &BaseNetworkSocketSetIpTransparentRequest
4226    {
4227        #[inline]
4228        unsafe fn encode(
4229            self,
4230            encoder: &mut fidl::encoding::Encoder<'_, D>,
4231            offset: usize,
4232            _depth: fidl::encoding::Depth,
4233        ) -> fidl::Result<()> {
4234            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTransparentRequest>(offset);
4235            // Delegate to tuple encoding.
4236            fidl::encoding::Encode::<BaseNetworkSocketSetIpTransparentRequest, D>::encode(
4237                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4238                encoder,
4239                offset,
4240                _depth,
4241            )
4242        }
4243    }
4244    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4245        fidl::encoding::Encode<BaseNetworkSocketSetIpTransparentRequest, D> for (T0,)
4246    {
4247        #[inline]
4248        unsafe fn encode(
4249            self,
4250            encoder: &mut fidl::encoding::Encoder<'_, D>,
4251            offset: usize,
4252            depth: fidl::encoding::Depth,
4253        ) -> fidl::Result<()> {
4254            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTransparentRequest>(offset);
4255            // Zero out padding regions. There's no need to apply masks
4256            // because the unmasked parts will be overwritten by fields.
4257            // Write the fields.
4258            self.0.encode(encoder, offset + 0, depth)?;
4259            Ok(())
4260        }
4261    }
4262
4263    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4264        for BaseNetworkSocketSetIpTransparentRequest
4265    {
4266        #[inline(always)]
4267        fn new_empty() -> Self {
4268            Self { value: fidl::new_empty!(bool, D) }
4269        }
4270
4271        #[inline]
4272        unsafe fn decode(
4273            &mut self,
4274            decoder: &mut fidl::encoding::Decoder<'_, D>,
4275            offset: usize,
4276            _depth: fidl::encoding::Depth,
4277        ) -> fidl::Result<()> {
4278            decoder.debug_check_bounds::<Self>(offset);
4279            // Verify that padding bytes are zero.
4280            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4281            Ok(())
4282        }
4283    }
4284
4285    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTtlRequest {
4286        type Borrowed<'a> = &'a Self;
4287        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4288            value
4289        }
4290    }
4291
4292    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTtlRequest {
4293        type Owned = Self;
4294
4295        #[inline(always)]
4296        fn inline_align(_context: fidl::encoding::Context) -> usize {
4297            8
4298        }
4299
4300        #[inline(always)]
4301        fn inline_size(_context: fidl::encoding::Context) -> usize {
4302            16
4303        }
4304    }
4305
4306    unsafe impl<D: fidl::encoding::ResourceDialect>
4307        fidl::encoding::Encode<BaseNetworkSocketSetIpTtlRequest, D>
4308        for &BaseNetworkSocketSetIpTtlRequest
4309    {
4310        #[inline]
4311        unsafe fn encode(
4312            self,
4313            encoder: &mut fidl::encoding::Encoder<'_, D>,
4314            offset: usize,
4315            _depth: fidl::encoding::Depth,
4316        ) -> fidl::Result<()> {
4317            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTtlRequest>(offset);
4318            // Delegate to tuple encoding.
4319            fidl::encoding::Encode::<BaseNetworkSocketSetIpTtlRequest, D>::encode(
4320                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4321                encoder,
4322                offset,
4323                _depth,
4324            )
4325        }
4326    }
4327    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
4328        fidl::encoding::Encode<BaseNetworkSocketSetIpTtlRequest, D> for (T0,)
4329    {
4330        #[inline]
4331        unsafe fn encode(
4332            self,
4333            encoder: &mut fidl::encoding::Encoder<'_, D>,
4334            offset: usize,
4335            depth: fidl::encoding::Depth,
4336        ) -> fidl::Result<()> {
4337            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTtlRequest>(offset);
4338            // Zero out padding regions. There's no need to apply masks
4339            // because the unmasked parts will be overwritten by fields.
4340            // Write the fields.
4341            self.0.encode(encoder, offset + 0, depth)?;
4342            Ok(())
4343        }
4344    }
4345
4346    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4347        for BaseNetworkSocketSetIpTtlRequest
4348    {
4349        #[inline(always)]
4350        fn new_empty() -> Self {
4351            Self { value: fidl::new_empty!(OptionalUint8, D) }
4352        }
4353
4354        #[inline]
4355        unsafe fn decode(
4356            &mut self,
4357            decoder: &mut fidl::encoding::Decoder<'_, D>,
4358            offset: usize,
4359            _depth: fidl::encoding::Depth,
4360        ) -> fidl::Result<()> {
4361            decoder.debug_check_bounds::<Self>(offset);
4362            // Verify that padding bytes are zero.
4363            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
4364            Ok(())
4365        }
4366    }
4367
4368    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTypeOfServiceRequest {
4369        type Borrowed<'a> = &'a Self;
4370        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4371            value
4372        }
4373    }
4374
4375    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTypeOfServiceRequest {
4376        type Owned = Self;
4377
4378        #[inline(always)]
4379        fn inline_align(_context: fidl::encoding::Context) -> usize {
4380            1
4381        }
4382
4383        #[inline(always)]
4384        fn inline_size(_context: fidl::encoding::Context) -> usize {
4385            1
4386        }
4387        #[inline(always)]
4388        fn encode_is_copy() -> bool {
4389            true
4390        }
4391
4392        #[inline(always)]
4393        fn decode_is_copy() -> bool {
4394            true
4395        }
4396    }
4397
4398    unsafe impl<D: fidl::encoding::ResourceDialect>
4399        fidl::encoding::Encode<BaseNetworkSocketSetIpTypeOfServiceRequest, D>
4400        for &BaseNetworkSocketSetIpTypeOfServiceRequest
4401    {
4402        #[inline]
4403        unsafe fn encode(
4404            self,
4405            encoder: &mut fidl::encoding::Encoder<'_, D>,
4406            offset: usize,
4407            _depth: fidl::encoding::Depth,
4408        ) -> fidl::Result<()> {
4409            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTypeOfServiceRequest>(offset);
4410            unsafe {
4411                // Copy the object into the buffer.
4412                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4413                (buf_ptr as *mut BaseNetworkSocketSetIpTypeOfServiceRequest).write_unaligned(
4414                    (self as *const BaseNetworkSocketSetIpTypeOfServiceRequest).read(),
4415                );
4416                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4417                // done second because the memcpy will write garbage to these bytes.
4418            }
4419            Ok(())
4420        }
4421    }
4422    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
4423        fidl::encoding::Encode<BaseNetworkSocketSetIpTypeOfServiceRequest, D> for (T0,)
4424    {
4425        #[inline]
4426        unsafe fn encode(
4427            self,
4428            encoder: &mut fidl::encoding::Encoder<'_, D>,
4429            offset: usize,
4430            depth: fidl::encoding::Depth,
4431        ) -> fidl::Result<()> {
4432            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTypeOfServiceRequest>(offset);
4433            // Zero out padding regions. There's no need to apply masks
4434            // because the unmasked parts will be overwritten by fields.
4435            // Write the fields.
4436            self.0.encode(encoder, offset + 0, depth)?;
4437            Ok(())
4438        }
4439    }
4440
4441    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4442        for BaseNetworkSocketSetIpTypeOfServiceRequest
4443    {
4444        #[inline(always)]
4445        fn new_empty() -> Self {
4446            Self { value: fidl::new_empty!(u8, D) }
4447        }
4448
4449        #[inline]
4450        unsafe fn decode(
4451            &mut self,
4452            decoder: &mut fidl::encoding::Decoder<'_, D>,
4453            offset: usize,
4454            _depth: fidl::encoding::Depth,
4455        ) -> fidl::Result<()> {
4456            decoder.debug_check_bounds::<Self>(offset);
4457            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4458            // Verify that padding bytes are zero.
4459            // Copy from the buffer into the object.
4460            unsafe {
4461                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
4462            }
4463            Ok(())
4464        }
4465    }
4466
4467    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastHopsRequest {
4468        type Borrowed<'a> = &'a Self;
4469        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4470            value
4471        }
4472    }
4473
4474    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastHopsRequest {
4475        type Owned = Self;
4476
4477        #[inline(always)]
4478        fn inline_align(_context: fidl::encoding::Context) -> usize {
4479            8
4480        }
4481
4482        #[inline(always)]
4483        fn inline_size(_context: fidl::encoding::Context) -> usize {
4484            16
4485        }
4486    }
4487
4488    unsafe impl<D: fidl::encoding::ResourceDialect>
4489        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastHopsRequest, D>
4490        for &BaseNetworkSocketSetIpv6MulticastHopsRequest
4491    {
4492        #[inline]
4493        unsafe fn encode(
4494            self,
4495            encoder: &mut fidl::encoding::Encoder<'_, D>,
4496            offset: usize,
4497            _depth: fidl::encoding::Depth,
4498        ) -> fidl::Result<()> {
4499            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastHopsRequest>(offset);
4500            // Delegate to tuple encoding.
4501            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6MulticastHopsRequest, D>::encode(
4502                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4503                encoder,
4504                offset,
4505                _depth,
4506            )
4507        }
4508    }
4509    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
4510        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastHopsRequest, D> for (T0,)
4511    {
4512        #[inline]
4513        unsafe fn encode(
4514            self,
4515            encoder: &mut fidl::encoding::Encoder<'_, D>,
4516            offset: usize,
4517            depth: fidl::encoding::Depth,
4518        ) -> fidl::Result<()> {
4519            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastHopsRequest>(offset);
4520            // Zero out padding regions. There's no need to apply masks
4521            // because the unmasked parts will be overwritten by fields.
4522            // Write the fields.
4523            self.0.encode(encoder, offset + 0, depth)?;
4524            Ok(())
4525        }
4526    }
4527
4528    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4529        for BaseNetworkSocketSetIpv6MulticastHopsRequest
4530    {
4531        #[inline(always)]
4532        fn new_empty() -> Self {
4533            Self { value: fidl::new_empty!(OptionalUint8, D) }
4534        }
4535
4536        #[inline]
4537        unsafe fn decode(
4538            &mut self,
4539            decoder: &mut fidl::encoding::Decoder<'_, D>,
4540            offset: usize,
4541            _depth: fidl::encoding::Depth,
4542        ) -> fidl::Result<()> {
4543            decoder.debug_check_bounds::<Self>(offset);
4544            // Verify that padding bytes are zero.
4545            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
4546            Ok(())
4547        }
4548    }
4549
4550    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
4551        type Borrowed<'a> = &'a Self;
4552        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4553            value
4554        }
4555    }
4556
4557    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
4558        type Owned = Self;
4559
4560        #[inline(always)]
4561        fn inline_align(_context: fidl::encoding::Context) -> usize {
4562            8
4563        }
4564
4565        #[inline(always)]
4566        fn inline_size(_context: fidl::encoding::Context) -> usize {
4567            8
4568        }
4569        #[inline(always)]
4570        fn encode_is_copy() -> bool {
4571            true
4572        }
4573
4574        #[inline(always)]
4575        fn decode_is_copy() -> bool {
4576            true
4577        }
4578    }
4579
4580    unsafe impl<D: fidl::encoding::ResourceDialect>
4581        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastInterfaceRequest, D>
4582        for &BaseNetworkSocketSetIpv6MulticastInterfaceRequest
4583    {
4584        #[inline]
4585        unsafe fn encode(
4586            self,
4587            encoder: &mut fidl::encoding::Encoder<'_, D>,
4588            offset: usize,
4589            _depth: fidl::encoding::Depth,
4590        ) -> fidl::Result<()> {
4591            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastInterfaceRequest>(offset);
4592            unsafe {
4593                // Copy the object into the buffer.
4594                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4595                (buf_ptr as *mut BaseNetworkSocketSetIpv6MulticastInterfaceRequest)
4596                    .write_unaligned(
4597                        (self as *const BaseNetworkSocketSetIpv6MulticastInterfaceRequest).read(),
4598                    );
4599                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4600                // done second because the memcpy will write garbage to these bytes.
4601            }
4602            Ok(())
4603        }
4604    }
4605    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
4606        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastInterfaceRequest, D> for (T0,)
4607    {
4608        #[inline]
4609        unsafe fn encode(
4610            self,
4611            encoder: &mut fidl::encoding::Encoder<'_, D>,
4612            offset: usize,
4613            depth: fidl::encoding::Depth,
4614        ) -> fidl::Result<()> {
4615            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastInterfaceRequest>(offset);
4616            // Zero out padding regions. There's no need to apply masks
4617            // because the unmasked parts will be overwritten by fields.
4618            // Write the fields.
4619            self.0.encode(encoder, offset + 0, depth)?;
4620            Ok(())
4621        }
4622    }
4623
4624    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4625        for BaseNetworkSocketSetIpv6MulticastInterfaceRequest
4626    {
4627        #[inline(always)]
4628        fn new_empty() -> Self {
4629            Self { value: fidl::new_empty!(u64, D) }
4630        }
4631
4632        #[inline]
4633        unsafe fn decode(
4634            &mut self,
4635            decoder: &mut fidl::encoding::Decoder<'_, D>,
4636            offset: usize,
4637            _depth: fidl::encoding::Depth,
4638        ) -> fidl::Result<()> {
4639            decoder.debug_check_bounds::<Self>(offset);
4640            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4641            // Verify that padding bytes are zero.
4642            // Copy from the buffer into the object.
4643            unsafe {
4644                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4645            }
4646            Ok(())
4647        }
4648    }
4649
4650    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
4651        type Borrowed<'a> = &'a Self;
4652        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4653            value
4654        }
4655    }
4656
4657    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
4658        type Owned = Self;
4659
4660        #[inline(always)]
4661        fn inline_align(_context: fidl::encoding::Context) -> usize {
4662            1
4663        }
4664
4665        #[inline(always)]
4666        fn inline_size(_context: fidl::encoding::Context) -> usize {
4667            1
4668        }
4669    }
4670
4671    unsafe impl<D: fidl::encoding::ResourceDialect>
4672        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D>
4673        for &BaseNetworkSocketSetIpv6MulticastLoopbackRequest
4674    {
4675        #[inline]
4676        unsafe fn encode(
4677            self,
4678            encoder: &mut fidl::encoding::Encoder<'_, D>,
4679            offset: usize,
4680            _depth: fidl::encoding::Depth,
4681        ) -> fidl::Result<()> {
4682            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest>(offset);
4683            // Delegate to tuple encoding.
4684            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D>::encode(
4685                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4686                encoder,
4687                offset,
4688                _depth,
4689            )
4690        }
4691    }
4692    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4693        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D> for (T0,)
4694    {
4695        #[inline]
4696        unsafe fn encode(
4697            self,
4698            encoder: &mut fidl::encoding::Encoder<'_, D>,
4699            offset: usize,
4700            depth: fidl::encoding::Depth,
4701        ) -> fidl::Result<()> {
4702            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest>(offset);
4703            // Zero out padding regions. There's no need to apply masks
4704            // because the unmasked parts will be overwritten by fields.
4705            // Write the fields.
4706            self.0.encode(encoder, offset + 0, depth)?;
4707            Ok(())
4708        }
4709    }
4710
4711    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4712        for BaseNetworkSocketSetIpv6MulticastLoopbackRequest
4713    {
4714        #[inline(always)]
4715        fn new_empty() -> Self {
4716            Self { value: fidl::new_empty!(bool, D) }
4717        }
4718
4719        #[inline]
4720        unsafe fn decode(
4721            &mut self,
4722            decoder: &mut fidl::encoding::Decoder<'_, D>,
4723            offset: usize,
4724            _depth: fidl::encoding::Depth,
4725        ) -> fidl::Result<()> {
4726            decoder.debug_check_bounds::<Self>(offset);
4727            // Verify that padding bytes are zero.
4728            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4729            Ok(())
4730        }
4731    }
4732
4733    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6OnlyRequest {
4734        type Borrowed<'a> = &'a Self;
4735        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4736            value
4737        }
4738    }
4739
4740    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6OnlyRequest {
4741        type Owned = Self;
4742
4743        #[inline(always)]
4744        fn inline_align(_context: fidl::encoding::Context) -> usize {
4745            1
4746        }
4747
4748        #[inline(always)]
4749        fn inline_size(_context: fidl::encoding::Context) -> usize {
4750            1
4751        }
4752    }
4753
4754    unsafe impl<D: fidl::encoding::ResourceDialect>
4755        fidl::encoding::Encode<BaseNetworkSocketSetIpv6OnlyRequest, D>
4756        for &BaseNetworkSocketSetIpv6OnlyRequest
4757    {
4758        #[inline]
4759        unsafe fn encode(
4760            self,
4761            encoder: &mut fidl::encoding::Encoder<'_, D>,
4762            offset: usize,
4763            _depth: fidl::encoding::Depth,
4764        ) -> fidl::Result<()> {
4765            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6OnlyRequest>(offset);
4766            // Delegate to tuple encoding.
4767            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6OnlyRequest, D>::encode(
4768                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4769                encoder,
4770                offset,
4771                _depth,
4772            )
4773        }
4774    }
4775    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4776        fidl::encoding::Encode<BaseNetworkSocketSetIpv6OnlyRequest, D> for (T0,)
4777    {
4778        #[inline]
4779        unsafe fn encode(
4780            self,
4781            encoder: &mut fidl::encoding::Encoder<'_, D>,
4782            offset: usize,
4783            depth: fidl::encoding::Depth,
4784        ) -> fidl::Result<()> {
4785            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6OnlyRequest>(offset);
4786            // Zero out padding regions. There's no need to apply masks
4787            // because the unmasked parts will be overwritten by fields.
4788            // Write the fields.
4789            self.0.encode(encoder, offset + 0, depth)?;
4790            Ok(())
4791        }
4792    }
4793
4794    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4795        for BaseNetworkSocketSetIpv6OnlyRequest
4796    {
4797        #[inline(always)]
4798        fn new_empty() -> Self {
4799            Self { value: fidl::new_empty!(bool, D) }
4800        }
4801
4802        #[inline]
4803        unsafe fn decode(
4804            &mut self,
4805            decoder: &mut fidl::encoding::Decoder<'_, D>,
4806            offset: usize,
4807            _depth: fidl::encoding::Depth,
4808        ) -> fidl::Result<()> {
4809            decoder.debug_check_bounds::<Self>(offset);
4810            // Verify that padding bytes are zero.
4811            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4812            Ok(())
4813        }
4814    }
4815
4816    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
4817        type Borrowed<'a> = &'a Self;
4818        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4819            value
4820        }
4821    }
4822
4823    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
4824        type Owned = Self;
4825
4826        #[inline(always)]
4827        fn inline_align(_context: fidl::encoding::Context) -> usize {
4828            1
4829        }
4830
4831        #[inline(always)]
4832        fn inline_size(_context: fidl::encoding::Context) -> usize {
4833            1
4834        }
4835    }
4836
4837    unsafe impl<D: fidl::encoding::ResourceDialect>
4838        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D>
4839        for &BaseNetworkSocketSetIpv6ReceiveHopLimitRequest
4840    {
4841        #[inline]
4842        unsafe fn encode(
4843            self,
4844            encoder: &mut fidl::encoding::Encoder<'_, D>,
4845            offset: usize,
4846            _depth: fidl::encoding::Depth,
4847        ) -> fidl::Result<()> {
4848            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest>(offset);
4849            // Delegate to tuple encoding.
4850            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D>::encode(
4851                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4852                encoder,
4853                offset,
4854                _depth,
4855            )
4856        }
4857    }
4858    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4859        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D> for (T0,)
4860    {
4861        #[inline]
4862        unsafe fn encode(
4863            self,
4864            encoder: &mut fidl::encoding::Encoder<'_, D>,
4865            offset: usize,
4866            depth: fidl::encoding::Depth,
4867        ) -> fidl::Result<()> {
4868            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest>(offset);
4869            // Zero out padding regions. There's no need to apply masks
4870            // because the unmasked parts will be overwritten by fields.
4871            // Write the fields.
4872            self.0.encode(encoder, offset + 0, depth)?;
4873            Ok(())
4874        }
4875    }
4876
4877    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4878        for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest
4879    {
4880        #[inline(always)]
4881        fn new_empty() -> Self {
4882            Self { value: fidl::new_empty!(bool, D) }
4883        }
4884
4885        #[inline]
4886        unsafe fn decode(
4887            &mut self,
4888            decoder: &mut fidl::encoding::Decoder<'_, D>,
4889            offset: usize,
4890            _depth: fidl::encoding::Depth,
4891        ) -> fidl::Result<()> {
4892            decoder.debug_check_bounds::<Self>(offset);
4893            // Verify that padding bytes are zero.
4894            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4895            Ok(())
4896        }
4897    }
4898
4899    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
4900        type Borrowed<'a> = &'a Self;
4901        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4902            value
4903        }
4904    }
4905
4906    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
4907        type Owned = Self;
4908
4909        #[inline(always)]
4910        fn inline_align(_context: fidl::encoding::Context) -> usize {
4911            1
4912        }
4913
4914        #[inline(always)]
4915        fn inline_size(_context: fidl::encoding::Context) -> usize {
4916            1
4917        }
4918    }
4919
4920    unsafe impl<D: fidl::encoding::ResourceDialect>
4921        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D>
4922        for &BaseNetworkSocketSetIpv6ReceivePacketInfoRequest
4923    {
4924        #[inline]
4925        unsafe fn encode(
4926            self,
4927            encoder: &mut fidl::encoding::Encoder<'_, D>,
4928            offset: usize,
4929            _depth: fidl::encoding::Depth,
4930        ) -> fidl::Result<()> {
4931            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest>(offset);
4932            // Delegate to tuple encoding.
4933            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D>::encode(
4934                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4935                encoder,
4936                offset,
4937                _depth,
4938            )
4939        }
4940    }
4941    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4942        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D> for (T0,)
4943    {
4944        #[inline]
4945        unsafe fn encode(
4946            self,
4947            encoder: &mut fidl::encoding::Encoder<'_, D>,
4948            offset: usize,
4949            depth: fidl::encoding::Depth,
4950        ) -> fidl::Result<()> {
4951            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest>(offset);
4952            // Zero out padding regions. There's no need to apply masks
4953            // because the unmasked parts will be overwritten by fields.
4954            // Write the fields.
4955            self.0.encode(encoder, offset + 0, depth)?;
4956            Ok(())
4957        }
4958    }
4959
4960    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4961        for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest
4962    {
4963        #[inline(always)]
4964        fn new_empty() -> Self {
4965            Self { value: fidl::new_empty!(bool, D) }
4966        }
4967
4968        #[inline]
4969        unsafe fn decode(
4970            &mut self,
4971            decoder: &mut fidl::encoding::Decoder<'_, D>,
4972            offset: usize,
4973            _depth: fidl::encoding::Depth,
4974        ) -> fidl::Result<()> {
4975            decoder.debug_check_bounds::<Self>(offset);
4976            // Verify that padding bytes are zero.
4977            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4978            Ok(())
4979        }
4980    }
4981
4982    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
4983        type Borrowed<'a> = &'a Self;
4984        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4985            value
4986        }
4987    }
4988
4989    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
4990        type Owned = Self;
4991
4992        #[inline(always)]
4993        fn inline_align(_context: fidl::encoding::Context) -> usize {
4994            1
4995        }
4996
4997        #[inline(always)]
4998        fn inline_size(_context: fidl::encoding::Context) -> usize {
4999            1
5000        }
5001    }
5002
5003    unsafe impl<D: fidl::encoding::ResourceDialect>
5004        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D>
5005        for &BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest
5006    {
5007        #[inline]
5008        unsafe fn encode(
5009            self,
5010            encoder: &mut fidl::encoding::Encoder<'_, D>,
5011            offset: usize,
5012            _depth: fidl::encoding::Depth,
5013        ) -> fidl::Result<()> {
5014            encoder
5015                .debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest>(offset);
5016            // Delegate to tuple encoding.
5017            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D>::encode(
5018                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5019                encoder,
5020                offset,
5021                _depth,
5022            )
5023        }
5024    }
5025    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5026        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D> for (T0,)
5027    {
5028        #[inline]
5029        unsafe fn encode(
5030            self,
5031            encoder: &mut fidl::encoding::Encoder<'_, D>,
5032            offset: usize,
5033            depth: fidl::encoding::Depth,
5034        ) -> fidl::Result<()> {
5035            encoder
5036                .debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest>(offset);
5037            // Zero out padding regions. There's no need to apply masks
5038            // because the unmasked parts will be overwritten by fields.
5039            // Write the fields.
5040            self.0.encode(encoder, offset + 0, depth)?;
5041            Ok(())
5042        }
5043    }
5044
5045    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5046        for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest
5047    {
5048        #[inline(always)]
5049        fn new_empty() -> Self {
5050            Self { value: fidl::new_empty!(bool, D) }
5051        }
5052
5053        #[inline]
5054        unsafe fn decode(
5055            &mut self,
5056            decoder: &mut fidl::encoding::Decoder<'_, D>,
5057            offset: usize,
5058            _depth: fidl::encoding::Depth,
5059        ) -> fidl::Result<()> {
5060            decoder.debug_check_bounds::<Self>(offset);
5061            // Verify that padding bytes are zero.
5062            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5063            Ok(())
5064        }
5065    }
5066
5067    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6TrafficClassRequest {
5068        type Borrowed<'a> = &'a Self;
5069        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5070            value
5071        }
5072    }
5073
5074    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6TrafficClassRequest {
5075        type Owned = Self;
5076
5077        #[inline(always)]
5078        fn inline_align(_context: fidl::encoding::Context) -> usize {
5079            8
5080        }
5081
5082        #[inline(always)]
5083        fn inline_size(_context: fidl::encoding::Context) -> usize {
5084            16
5085        }
5086    }
5087
5088    unsafe impl<D: fidl::encoding::ResourceDialect>
5089        fidl::encoding::Encode<BaseNetworkSocketSetIpv6TrafficClassRequest, D>
5090        for &BaseNetworkSocketSetIpv6TrafficClassRequest
5091    {
5092        #[inline]
5093        unsafe fn encode(
5094            self,
5095            encoder: &mut fidl::encoding::Encoder<'_, D>,
5096            offset: usize,
5097            _depth: fidl::encoding::Depth,
5098        ) -> fidl::Result<()> {
5099            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6TrafficClassRequest>(offset);
5100            // Delegate to tuple encoding.
5101            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6TrafficClassRequest, D>::encode(
5102                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5103                encoder,
5104                offset,
5105                _depth,
5106            )
5107        }
5108    }
5109    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
5110        fidl::encoding::Encode<BaseNetworkSocketSetIpv6TrafficClassRequest, D> for (T0,)
5111    {
5112        #[inline]
5113        unsafe fn encode(
5114            self,
5115            encoder: &mut fidl::encoding::Encoder<'_, D>,
5116            offset: usize,
5117            depth: fidl::encoding::Depth,
5118        ) -> fidl::Result<()> {
5119            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6TrafficClassRequest>(offset);
5120            // Zero out padding regions. There's no need to apply masks
5121            // because the unmasked parts will be overwritten by fields.
5122            // Write the fields.
5123            self.0.encode(encoder, offset + 0, depth)?;
5124            Ok(())
5125        }
5126    }
5127
5128    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5129        for BaseNetworkSocketSetIpv6TrafficClassRequest
5130    {
5131        #[inline(always)]
5132        fn new_empty() -> Self {
5133            Self { value: fidl::new_empty!(OptionalUint8, D) }
5134        }
5135
5136        #[inline]
5137        unsafe fn decode(
5138            &mut self,
5139            decoder: &mut fidl::encoding::Decoder<'_, D>,
5140            offset: usize,
5141            _depth: fidl::encoding::Depth,
5142        ) -> fidl::Result<()> {
5143            decoder.debug_check_bounds::<Self>(offset);
5144            // Verify that padding bytes are zero.
5145            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
5146            Ok(())
5147        }
5148    }
5149
5150    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6UnicastHopsRequest {
5151        type Borrowed<'a> = &'a Self;
5152        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5153            value
5154        }
5155    }
5156
5157    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6UnicastHopsRequest {
5158        type Owned = Self;
5159
5160        #[inline(always)]
5161        fn inline_align(_context: fidl::encoding::Context) -> usize {
5162            8
5163        }
5164
5165        #[inline(always)]
5166        fn inline_size(_context: fidl::encoding::Context) -> usize {
5167            16
5168        }
5169    }
5170
5171    unsafe impl<D: fidl::encoding::ResourceDialect>
5172        fidl::encoding::Encode<BaseNetworkSocketSetIpv6UnicastHopsRequest, D>
5173        for &BaseNetworkSocketSetIpv6UnicastHopsRequest
5174    {
5175        #[inline]
5176        unsafe fn encode(
5177            self,
5178            encoder: &mut fidl::encoding::Encoder<'_, D>,
5179            offset: usize,
5180            _depth: fidl::encoding::Depth,
5181        ) -> fidl::Result<()> {
5182            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6UnicastHopsRequest>(offset);
5183            // Delegate to tuple encoding.
5184            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6UnicastHopsRequest, D>::encode(
5185                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5186                encoder,
5187                offset,
5188                _depth,
5189            )
5190        }
5191    }
5192    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
5193        fidl::encoding::Encode<BaseNetworkSocketSetIpv6UnicastHopsRequest, D> for (T0,)
5194    {
5195        #[inline]
5196        unsafe fn encode(
5197            self,
5198            encoder: &mut fidl::encoding::Encoder<'_, D>,
5199            offset: usize,
5200            depth: fidl::encoding::Depth,
5201        ) -> fidl::Result<()> {
5202            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6UnicastHopsRequest>(offset);
5203            // Zero out padding regions. There's no need to apply masks
5204            // because the unmasked parts will be overwritten by fields.
5205            // Write the fields.
5206            self.0.encode(encoder, offset + 0, depth)?;
5207            Ok(())
5208        }
5209    }
5210
5211    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5212        for BaseNetworkSocketSetIpv6UnicastHopsRequest
5213    {
5214        #[inline(always)]
5215        fn new_empty() -> Self {
5216            Self { value: fidl::new_empty!(OptionalUint8, D) }
5217        }
5218
5219        #[inline]
5220        unsafe fn decode(
5221            &mut self,
5222            decoder: &mut fidl::encoding::Decoder<'_, D>,
5223            offset: usize,
5224            _depth: fidl::encoding::Depth,
5225        ) -> fidl::Result<()> {
5226            decoder.debug_check_bounds::<Self>(offset);
5227            // Verify that padding bytes are zero.
5228            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
5229            Ok(())
5230        }
5231    }
5232
5233    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketShutdownRequest {
5234        type Borrowed<'a> = &'a Self;
5235        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5236            value
5237        }
5238    }
5239
5240    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketShutdownRequest {
5241        type Owned = Self;
5242
5243        #[inline(always)]
5244        fn inline_align(_context: fidl::encoding::Context) -> usize {
5245            2
5246        }
5247
5248        #[inline(always)]
5249        fn inline_size(_context: fidl::encoding::Context) -> usize {
5250            2
5251        }
5252    }
5253
5254    unsafe impl<D: fidl::encoding::ResourceDialect>
5255        fidl::encoding::Encode<BaseNetworkSocketShutdownRequest, D>
5256        for &BaseNetworkSocketShutdownRequest
5257    {
5258        #[inline]
5259        unsafe fn encode(
5260            self,
5261            encoder: &mut fidl::encoding::Encoder<'_, D>,
5262            offset: usize,
5263            _depth: fidl::encoding::Depth,
5264        ) -> fidl::Result<()> {
5265            encoder.debug_check_bounds::<BaseNetworkSocketShutdownRequest>(offset);
5266            // Delegate to tuple encoding.
5267            fidl::encoding::Encode::<BaseNetworkSocketShutdownRequest, D>::encode(
5268                (<ShutdownMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),),
5269                encoder,
5270                offset,
5271                _depth,
5272            )
5273        }
5274    }
5275    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ShutdownMode, D>>
5276        fidl::encoding::Encode<BaseNetworkSocketShutdownRequest, D> for (T0,)
5277    {
5278        #[inline]
5279        unsafe fn encode(
5280            self,
5281            encoder: &mut fidl::encoding::Encoder<'_, D>,
5282            offset: usize,
5283            depth: fidl::encoding::Depth,
5284        ) -> fidl::Result<()> {
5285            encoder.debug_check_bounds::<BaseNetworkSocketShutdownRequest>(offset);
5286            // Zero out padding regions. There's no need to apply masks
5287            // because the unmasked parts will be overwritten by fields.
5288            // Write the fields.
5289            self.0.encode(encoder, offset + 0, depth)?;
5290            Ok(())
5291        }
5292    }
5293
5294    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5295        for BaseNetworkSocketShutdownRequest
5296    {
5297        #[inline(always)]
5298        fn new_empty() -> Self {
5299            Self { mode: fidl::new_empty!(ShutdownMode, D) }
5300        }
5301
5302        #[inline]
5303        unsafe fn decode(
5304            &mut self,
5305            decoder: &mut fidl::encoding::Decoder<'_, D>,
5306            offset: usize,
5307            _depth: fidl::encoding::Depth,
5308        ) -> fidl::Result<()> {
5309            decoder.debug_check_bounds::<Self>(offset);
5310            // Verify that padding bytes are zero.
5311            fidl::decode!(ShutdownMode, D, &mut self.mode, decoder, offset + 0, _depth)?;
5312            Ok(())
5313        }
5314    }
5315
5316    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastInterfaceResponse {
5317        type Borrowed<'a> = &'a Self;
5318        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5319            value
5320        }
5321    }
5322
5323    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastInterfaceResponse {
5324        type Owned = Self;
5325
5326        #[inline(always)]
5327        fn inline_align(_context: fidl::encoding::Context) -> usize {
5328            1
5329        }
5330
5331        #[inline(always)]
5332        fn inline_size(_context: fidl::encoding::Context) -> usize {
5333            4
5334        }
5335    }
5336
5337    unsafe impl<D: fidl::encoding::ResourceDialect>
5338        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastInterfaceResponse, D>
5339        for &BaseNetworkSocketGetIpMulticastInterfaceResponse
5340    {
5341        #[inline]
5342        unsafe fn encode(
5343            self,
5344            encoder: &mut fidl::encoding::Encoder<'_, D>,
5345            offset: usize,
5346            _depth: fidl::encoding::Depth,
5347        ) -> fidl::Result<()> {
5348            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastInterfaceResponse>(offset);
5349            // Delegate to tuple encoding.
5350            fidl::encoding::Encode::<BaseNetworkSocketGetIpMulticastInterfaceResponse, D>::encode(
5351                (
5352                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
5353                ),
5354                encoder, offset, _depth
5355            )
5356        }
5357    }
5358    unsafe impl<
5359        D: fidl::encoding::ResourceDialect,
5360        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
5361    > fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastInterfaceResponse, D> for (T0,)
5362    {
5363        #[inline]
5364        unsafe fn encode(
5365            self,
5366            encoder: &mut fidl::encoding::Encoder<'_, D>,
5367            offset: usize,
5368            depth: fidl::encoding::Depth,
5369        ) -> fidl::Result<()> {
5370            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastInterfaceResponse>(offset);
5371            // Zero out padding regions. There's no need to apply masks
5372            // because the unmasked parts will be overwritten by fields.
5373            // Write the fields.
5374            self.0.encode(encoder, offset + 0, depth)?;
5375            Ok(())
5376        }
5377    }
5378
5379    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5380        for BaseNetworkSocketGetIpMulticastInterfaceResponse
5381    {
5382        #[inline(always)]
5383        fn new_empty() -> Self {
5384            Self { value: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D) }
5385        }
5386
5387        #[inline]
5388        unsafe fn decode(
5389            &mut self,
5390            decoder: &mut fidl::encoding::Decoder<'_, D>,
5391            offset: usize,
5392            _depth: fidl::encoding::Depth,
5393        ) -> fidl::Result<()> {
5394            decoder.debug_check_bounds::<Self>(offset);
5395            // Verify that padding bytes are zero.
5396            fidl::decode!(
5397                fidl_fuchsia_net__common::Ipv4Address,
5398                D,
5399                &mut self.value,
5400                decoder,
5401                offset + 0,
5402                _depth
5403            )?;
5404            Ok(())
5405        }
5406    }
5407
5408    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastLoopbackResponse {
5409        type Borrowed<'a> = &'a Self;
5410        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5411            value
5412        }
5413    }
5414
5415    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastLoopbackResponse {
5416        type Owned = Self;
5417
5418        #[inline(always)]
5419        fn inline_align(_context: fidl::encoding::Context) -> usize {
5420            1
5421        }
5422
5423        #[inline(always)]
5424        fn inline_size(_context: fidl::encoding::Context) -> usize {
5425            1
5426        }
5427    }
5428
5429    unsafe impl<D: fidl::encoding::ResourceDialect>
5430        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastLoopbackResponse, D>
5431        for &BaseNetworkSocketGetIpMulticastLoopbackResponse
5432    {
5433        #[inline]
5434        unsafe fn encode(
5435            self,
5436            encoder: &mut fidl::encoding::Encoder<'_, D>,
5437            offset: usize,
5438            _depth: fidl::encoding::Depth,
5439        ) -> fidl::Result<()> {
5440            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastLoopbackResponse>(offset);
5441            // Delegate to tuple encoding.
5442            fidl::encoding::Encode::<BaseNetworkSocketGetIpMulticastLoopbackResponse, D>::encode(
5443                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5444                encoder,
5445                offset,
5446                _depth,
5447            )
5448        }
5449    }
5450    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5451        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastLoopbackResponse, D> for (T0,)
5452    {
5453        #[inline]
5454        unsafe fn encode(
5455            self,
5456            encoder: &mut fidl::encoding::Encoder<'_, D>,
5457            offset: usize,
5458            depth: fidl::encoding::Depth,
5459        ) -> fidl::Result<()> {
5460            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastLoopbackResponse>(offset);
5461            // Zero out padding regions. There's no need to apply masks
5462            // because the unmasked parts will be overwritten by fields.
5463            // Write the fields.
5464            self.0.encode(encoder, offset + 0, depth)?;
5465            Ok(())
5466        }
5467    }
5468
5469    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5470        for BaseNetworkSocketGetIpMulticastLoopbackResponse
5471    {
5472        #[inline(always)]
5473        fn new_empty() -> Self {
5474            Self { value: fidl::new_empty!(bool, D) }
5475        }
5476
5477        #[inline]
5478        unsafe fn decode(
5479            &mut self,
5480            decoder: &mut fidl::encoding::Decoder<'_, D>,
5481            offset: usize,
5482            _depth: fidl::encoding::Depth,
5483        ) -> fidl::Result<()> {
5484            decoder.debug_check_bounds::<Self>(offset);
5485            // Verify that padding bytes are zero.
5486            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5487            Ok(())
5488        }
5489    }
5490
5491    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastTtlResponse {
5492        type Borrowed<'a> = &'a Self;
5493        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5494            value
5495        }
5496    }
5497
5498    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastTtlResponse {
5499        type Owned = Self;
5500
5501        #[inline(always)]
5502        fn inline_align(_context: fidl::encoding::Context) -> usize {
5503            1
5504        }
5505
5506        #[inline(always)]
5507        fn inline_size(_context: fidl::encoding::Context) -> usize {
5508            1
5509        }
5510        #[inline(always)]
5511        fn encode_is_copy() -> bool {
5512            true
5513        }
5514
5515        #[inline(always)]
5516        fn decode_is_copy() -> bool {
5517            true
5518        }
5519    }
5520
5521    unsafe impl<D: fidl::encoding::ResourceDialect>
5522        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastTtlResponse, D>
5523        for &BaseNetworkSocketGetIpMulticastTtlResponse
5524    {
5525        #[inline]
5526        unsafe fn encode(
5527            self,
5528            encoder: &mut fidl::encoding::Encoder<'_, D>,
5529            offset: usize,
5530            _depth: fidl::encoding::Depth,
5531        ) -> fidl::Result<()> {
5532            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastTtlResponse>(offset);
5533            unsafe {
5534                // Copy the object into the buffer.
5535                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5536                (buf_ptr as *mut BaseNetworkSocketGetIpMulticastTtlResponse).write_unaligned(
5537                    (self as *const BaseNetworkSocketGetIpMulticastTtlResponse).read(),
5538                );
5539                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5540                // done second because the memcpy will write garbage to these bytes.
5541            }
5542            Ok(())
5543        }
5544    }
5545    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
5546        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastTtlResponse, D> for (T0,)
5547    {
5548        #[inline]
5549        unsafe fn encode(
5550            self,
5551            encoder: &mut fidl::encoding::Encoder<'_, D>,
5552            offset: usize,
5553            depth: fidl::encoding::Depth,
5554        ) -> fidl::Result<()> {
5555            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastTtlResponse>(offset);
5556            // Zero out padding regions. There's no need to apply masks
5557            // because the unmasked parts will be overwritten by fields.
5558            // Write the fields.
5559            self.0.encode(encoder, offset + 0, depth)?;
5560            Ok(())
5561        }
5562    }
5563
5564    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5565        for BaseNetworkSocketGetIpMulticastTtlResponse
5566    {
5567        #[inline(always)]
5568        fn new_empty() -> Self {
5569            Self { value: fidl::new_empty!(u8, D) }
5570        }
5571
5572        #[inline]
5573        unsafe fn decode(
5574            &mut self,
5575            decoder: &mut fidl::encoding::Decoder<'_, D>,
5576            offset: usize,
5577            _depth: fidl::encoding::Depth,
5578        ) -> fidl::Result<()> {
5579            decoder.debug_check_bounds::<Self>(offset);
5580            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5581            // Verify that padding bytes are zero.
5582            // Copy from the buffer into the object.
5583            unsafe {
5584                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
5585            }
5586            Ok(())
5587        }
5588    }
5589
5590    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpPacketInfoResponse {
5591        type Borrowed<'a> = &'a Self;
5592        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5593            value
5594        }
5595    }
5596
5597    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpPacketInfoResponse {
5598        type Owned = Self;
5599
5600        #[inline(always)]
5601        fn inline_align(_context: fidl::encoding::Context) -> usize {
5602            1
5603        }
5604
5605        #[inline(always)]
5606        fn inline_size(_context: fidl::encoding::Context) -> usize {
5607            1
5608        }
5609    }
5610
5611    unsafe impl<D: fidl::encoding::ResourceDialect>
5612        fidl::encoding::Encode<BaseNetworkSocketGetIpPacketInfoResponse, D>
5613        for &BaseNetworkSocketGetIpPacketInfoResponse
5614    {
5615        #[inline]
5616        unsafe fn encode(
5617            self,
5618            encoder: &mut fidl::encoding::Encoder<'_, D>,
5619            offset: usize,
5620            _depth: fidl::encoding::Depth,
5621        ) -> fidl::Result<()> {
5622            encoder.debug_check_bounds::<BaseNetworkSocketGetIpPacketInfoResponse>(offset);
5623            // Delegate to tuple encoding.
5624            fidl::encoding::Encode::<BaseNetworkSocketGetIpPacketInfoResponse, D>::encode(
5625                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5626                encoder,
5627                offset,
5628                _depth,
5629            )
5630        }
5631    }
5632    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5633        fidl::encoding::Encode<BaseNetworkSocketGetIpPacketInfoResponse, D> for (T0,)
5634    {
5635        #[inline]
5636        unsafe fn encode(
5637            self,
5638            encoder: &mut fidl::encoding::Encoder<'_, D>,
5639            offset: usize,
5640            depth: fidl::encoding::Depth,
5641        ) -> fidl::Result<()> {
5642            encoder.debug_check_bounds::<BaseNetworkSocketGetIpPacketInfoResponse>(offset);
5643            // Zero out padding regions. There's no need to apply masks
5644            // because the unmasked parts will be overwritten by fields.
5645            // Write the fields.
5646            self.0.encode(encoder, offset + 0, depth)?;
5647            Ok(())
5648        }
5649    }
5650
5651    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5652        for BaseNetworkSocketGetIpPacketInfoResponse
5653    {
5654        #[inline(always)]
5655        fn new_empty() -> Self {
5656            Self { value: fidl::new_empty!(bool, D) }
5657        }
5658
5659        #[inline]
5660        unsafe fn decode(
5661            &mut self,
5662            decoder: &mut fidl::encoding::Decoder<'_, D>,
5663            offset: usize,
5664            _depth: fidl::encoding::Depth,
5665        ) -> fidl::Result<()> {
5666            decoder.debug_check_bounds::<Self>(offset);
5667            // Verify that padding bytes are zero.
5668            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5669            Ok(())
5670        }
5671    }
5672
5673    impl fidl::encoding::ValueTypeMarker
5674        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5675    {
5676        type Borrowed<'a> = &'a Self;
5677        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5678            value
5679        }
5680    }
5681
5682    unsafe impl fidl::encoding::TypeMarker
5683        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5684    {
5685        type Owned = Self;
5686
5687        #[inline(always)]
5688        fn inline_align(_context: fidl::encoding::Context) -> usize {
5689            1
5690        }
5691
5692        #[inline(always)]
5693        fn inline_size(_context: fidl::encoding::Context) -> usize {
5694            1
5695        }
5696    }
5697
5698    unsafe impl<D: fidl::encoding::ResourceDialect>
5699        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse, D>
5700        for &BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5701    {
5702        #[inline]
5703        unsafe fn encode(
5704            self,
5705            encoder: &mut fidl::encoding::Encoder<'_, D>,
5706            offset: usize,
5707            _depth: fidl::encoding::Depth,
5708        ) -> fidl::Result<()> {
5709            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse>(offset);
5710            // Delegate to tuple encoding.
5711            fidl::encoding::Encode::<
5712                BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse,
5713                D,
5714            >::encode(
5715                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5716                encoder,
5717                offset,
5718                _depth,
5719            )
5720        }
5721    }
5722    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5723        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse, D>
5724        for (T0,)
5725    {
5726        #[inline]
5727        unsafe fn encode(
5728            self,
5729            encoder: &mut fidl::encoding::Encoder<'_, D>,
5730            offset: usize,
5731            depth: fidl::encoding::Depth,
5732        ) -> fidl::Result<()> {
5733            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse>(offset);
5734            // Zero out padding regions. There's no need to apply masks
5735            // because the unmasked parts will be overwritten by fields.
5736            // Write the fields.
5737            self.0.encode(encoder, offset + 0, depth)?;
5738            Ok(())
5739        }
5740    }
5741
5742    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5743        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5744    {
5745        #[inline(always)]
5746        fn new_empty() -> Self {
5747            Self { value: fidl::new_empty!(bool, D) }
5748        }
5749
5750        #[inline]
5751        unsafe fn decode(
5752            &mut self,
5753            decoder: &mut fidl::encoding::Decoder<'_, D>,
5754            offset: usize,
5755            _depth: fidl::encoding::Depth,
5756        ) -> fidl::Result<()> {
5757            decoder.debug_check_bounds::<Self>(offset);
5758            // Verify that padding bytes are zero.
5759            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5760            Ok(())
5761        }
5762    }
5763
5764    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpReceiveTtlResponse {
5765        type Borrowed<'a> = &'a Self;
5766        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5767            value
5768        }
5769    }
5770
5771    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpReceiveTtlResponse {
5772        type Owned = Self;
5773
5774        #[inline(always)]
5775        fn inline_align(_context: fidl::encoding::Context) -> usize {
5776            1
5777        }
5778
5779        #[inline(always)]
5780        fn inline_size(_context: fidl::encoding::Context) -> usize {
5781            1
5782        }
5783    }
5784
5785    unsafe impl<D: fidl::encoding::ResourceDialect>
5786        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTtlResponse, D>
5787        for &BaseNetworkSocketGetIpReceiveTtlResponse
5788    {
5789        #[inline]
5790        unsafe fn encode(
5791            self,
5792            encoder: &mut fidl::encoding::Encoder<'_, D>,
5793            offset: usize,
5794            _depth: fidl::encoding::Depth,
5795        ) -> fidl::Result<()> {
5796            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveTtlResponse>(offset);
5797            // Delegate to tuple encoding.
5798            fidl::encoding::Encode::<BaseNetworkSocketGetIpReceiveTtlResponse, D>::encode(
5799                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5800                encoder,
5801                offset,
5802                _depth,
5803            )
5804        }
5805    }
5806    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5807        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTtlResponse, D> for (T0,)
5808    {
5809        #[inline]
5810        unsafe fn encode(
5811            self,
5812            encoder: &mut fidl::encoding::Encoder<'_, D>,
5813            offset: usize,
5814            depth: fidl::encoding::Depth,
5815        ) -> fidl::Result<()> {
5816            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveTtlResponse>(offset);
5817            // Zero out padding regions. There's no need to apply masks
5818            // because the unmasked parts will be overwritten by fields.
5819            // Write the fields.
5820            self.0.encode(encoder, offset + 0, depth)?;
5821            Ok(())
5822        }
5823    }
5824
5825    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5826        for BaseNetworkSocketGetIpReceiveTtlResponse
5827    {
5828        #[inline(always)]
5829        fn new_empty() -> Self {
5830            Self { value: fidl::new_empty!(bool, D) }
5831        }
5832
5833        #[inline]
5834        unsafe fn decode(
5835            &mut self,
5836            decoder: &mut fidl::encoding::Decoder<'_, D>,
5837            offset: usize,
5838            _depth: fidl::encoding::Depth,
5839        ) -> fidl::Result<()> {
5840            decoder.debug_check_bounds::<Self>(offset);
5841            // Verify that padding bytes are zero.
5842            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5843            Ok(())
5844        }
5845    }
5846
5847    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
5848        type Borrowed<'a> = &'a Self;
5849        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5850            value
5851        }
5852    }
5853
5854    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
5855        type Owned = Self;
5856
5857        #[inline(always)]
5858        fn inline_align(_context: fidl::encoding::Context) -> usize {
5859            1
5860        }
5861
5862        #[inline(always)]
5863        fn inline_size(_context: fidl::encoding::Context) -> usize {
5864            1
5865        }
5866    }
5867
5868    unsafe impl<D: fidl::encoding::ResourceDialect>
5869        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D>
5870        for &BaseNetworkSocketGetIpReceiveTypeOfServiceResponse
5871    {
5872        #[inline]
5873        unsafe fn encode(
5874            self,
5875            encoder: &mut fidl::encoding::Encoder<'_, D>,
5876            offset: usize,
5877            _depth: fidl::encoding::Depth,
5878        ) -> fidl::Result<()> {
5879            encoder
5880                .debug_check_bounds::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse>(offset);
5881            // Delegate to tuple encoding.
5882            fidl::encoding::Encode::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D>::encode(
5883                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5884                encoder,
5885                offset,
5886                _depth,
5887            )
5888        }
5889    }
5890    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5891        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D> for (T0,)
5892    {
5893        #[inline]
5894        unsafe fn encode(
5895            self,
5896            encoder: &mut fidl::encoding::Encoder<'_, D>,
5897            offset: usize,
5898            depth: fidl::encoding::Depth,
5899        ) -> fidl::Result<()> {
5900            encoder
5901                .debug_check_bounds::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse>(offset);
5902            // Zero out padding regions. There's no need to apply masks
5903            // because the unmasked parts will be overwritten by fields.
5904            // Write the fields.
5905            self.0.encode(encoder, offset + 0, depth)?;
5906            Ok(())
5907        }
5908    }
5909
5910    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5911        for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse
5912    {
5913        #[inline(always)]
5914        fn new_empty() -> Self {
5915            Self { value: fidl::new_empty!(bool, D) }
5916        }
5917
5918        #[inline]
5919        unsafe fn decode(
5920            &mut self,
5921            decoder: &mut fidl::encoding::Decoder<'_, D>,
5922            offset: usize,
5923            _depth: fidl::encoding::Depth,
5924        ) -> fidl::Result<()> {
5925            decoder.debug_check_bounds::<Self>(offset);
5926            // Verify that padding bytes are zero.
5927            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5928            Ok(())
5929        }
5930    }
5931
5932    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTransparentResponse {
5933        type Borrowed<'a> = &'a Self;
5934        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5935            value
5936        }
5937    }
5938
5939    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTransparentResponse {
5940        type Owned = Self;
5941
5942        #[inline(always)]
5943        fn inline_align(_context: fidl::encoding::Context) -> usize {
5944            1
5945        }
5946
5947        #[inline(always)]
5948        fn inline_size(_context: fidl::encoding::Context) -> usize {
5949            1
5950        }
5951    }
5952
5953    unsafe impl<D: fidl::encoding::ResourceDialect>
5954        fidl::encoding::Encode<BaseNetworkSocketGetIpTransparentResponse, D>
5955        for &BaseNetworkSocketGetIpTransparentResponse
5956    {
5957        #[inline]
5958        unsafe fn encode(
5959            self,
5960            encoder: &mut fidl::encoding::Encoder<'_, D>,
5961            offset: usize,
5962            _depth: fidl::encoding::Depth,
5963        ) -> fidl::Result<()> {
5964            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTransparentResponse>(offset);
5965            // Delegate to tuple encoding.
5966            fidl::encoding::Encode::<BaseNetworkSocketGetIpTransparentResponse, D>::encode(
5967                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5968                encoder,
5969                offset,
5970                _depth,
5971            )
5972        }
5973    }
5974    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5975        fidl::encoding::Encode<BaseNetworkSocketGetIpTransparentResponse, D> for (T0,)
5976    {
5977        #[inline]
5978        unsafe fn encode(
5979            self,
5980            encoder: &mut fidl::encoding::Encoder<'_, D>,
5981            offset: usize,
5982            depth: fidl::encoding::Depth,
5983        ) -> fidl::Result<()> {
5984            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTransparentResponse>(offset);
5985            // Zero out padding regions. There's no need to apply masks
5986            // because the unmasked parts will be overwritten by fields.
5987            // Write the fields.
5988            self.0.encode(encoder, offset + 0, depth)?;
5989            Ok(())
5990        }
5991    }
5992
5993    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5994        for BaseNetworkSocketGetIpTransparentResponse
5995    {
5996        #[inline(always)]
5997        fn new_empty() -> Self {
5998            Self { value: fidl::new_empty!(bool, D) }
5999        }
6000
6001        #[inline]
6002        unsafe fn decode(
6003            &mut self,
6004            decoder: &mut fidl::encoding::Decoder<'_, D>,
6005            offset: usize,
6006            _depth: fidl::encoding::Depth,
6007        ) -> fidl::Result<()> {
6008            decoder.debug_check_bounds::<Self>(offset);
6009            // Verify that padding bytes are zero.
6010            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6011            Ok(())
6012        }
6013    }
6014
6015    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTtlResponse {
6016        type Borrowed<'a> = &'a Self;
6017        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6018            value
6019        }
6020    }
6021
6022    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTtlResponse {
6023        type Owned = Self;
6024
6025        #[inline(always)]
6026        fn inline_align(_context: fidl::encoding::Context) -> usize {
6027            1
6028        }
6029
6030        #[inline(always)]
6031        fn inline_size(_context: fidl::encoding::Context) -> usize {
6032            1
6033        }
6034        #[inline(always)]
6035        fn encode_is_copy() -> bool {
6036            true
6037        }
6038
6039        #[inline(always)]
6040        fn decode_is_copy() -> bool {
6041            true
6042        }
6043    }
6044
6045    unsafe impl<D: fidl::encoding::ResourceDialect>
6046        fidl::encoding::Encode<BaseNetworkSocketGetIpTtlResponse, D>
6047        for &BaseNetworkSocketGetIpTtlResponse
6048    {
6049        #[inline]
6050        unsafe fn encode(
6051            self,
6052            encoder: &mut fidl::encoding::Encoder<'_, D>,
6053            offset: usize,
6054            _depth: fidl::encoding::Depth,
6055        ) -> fidl::Result<()> {
6056            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTtlResponse>(offset);
6057            unsafe {
6058                // Copy the object into the buffer.
6059                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6060                (buf_ptr as *mut BaseNetworkSocketGetIpTtlResponse)
6061                    .write_unaligned((self as *const BaseNetworkSocketGetIpTtlResponse).read());
6062                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6063                // done second because the memcpy will write garbage to these bytes.
6064            }
6065            Ok(())
6066        }
6067    }
6068    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6069        fidl::encoding::Encode<BaseNetworkSocketGetIpTtlResponse, D> for (T0,)
6070    {
6071        #[inline]
6072        unsafe fn encode(
6073            self,
6074            encoder: &mut fidl::encoding::Encoder<'_, D>,
6075            offset: usize,
6076            depth: fidl::encoding::Depth,
6077        ) -> fidl::Result<()> {
6078            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTtlResponse>(offset);
6079            // Zero out padding regions. There's no need to apply masks
6080            // because the unmasked parts will be overwritten by fields.
6081            // Write the fields.
6082            self.0.encode(encoder, offset + 0, depth)?;
6083            Ok(())
6084        }
6085    }
6086
6087    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6088        for BaseNetworkSocketGetIpTtlResponse
6089    {
6090        #[inline(always)]
6091        fn new_empty() -> Self {
6092            Self { value: fidl::new_empty!(u8, D) }
6093        }
6094
6095        #[inline]
6096        unsafe fn decode(
6097            &mut self,
6098            decoder: &mut fidl::encoding::Decoder<'_, D>,
6099            offset: usize,
6100            _depth: fidl::encoding::Depth,
6101        ) -> fidl::Result<()> {
6102            decoder.debug_check_bounds::<Self>(offset);
6103            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6104            // Verify that padding bytes are zero.
6105            // Copy from the buffer into the object.
6106            unsafe {
6107                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6108            }
6109            Ok(())
6110        }
6111    }
6112
6113    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTypeOfServiceResponse {
6114        type Borrowed<'a> = &'a Self;
6115        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6116            value
6117        }
6118    }
6119
6120    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTypeOfServiceResponse {
6121        type Owned = Self;
6122
6123        #[inline(always)]
6124        fn inline_align(_context: fidl::encoding::Context) -> usize {
6125            1
6126        }
6127
6128        #[inline(always)]
6129        fn inline_size(_context: fidl::encoding::Context) -> usize {
6130            1
6131        }
6132        #[inline(always)]
6133        fn encode_is_copy() -> bool {
6134            true
6135        }
6136
6137        #[inline(always)]
6138        fn decode_is_copy() -> bool {
6139            true
6140        }
6141    }
6142
6143    unsafe impl<D: fidl::encoding::ResourceDialect>
6144        fidl::encoding::Encode<BaseNetworkSocketGetIpTypeOfServiceResponse, D>
6145        for &BaseNetworkSocketGetIpTypeOfServiceResponse
6146    {
6147        #[inline]
6148        unsafe fn encode(
6149            self,
6150            encoder: &mut fidl::encoding::Encoder<'_, D>,
6151            offset: usize,
6152            _depth: fidl::encoding::Depth,
6153        ) -> fidl::Result<()> {
6154            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTypeOfServiceResponse>(offset);
6155            unsafe {
6156                // Copy the object into the buffer.
6157                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6158                (buf_ptr as *mut BaseNetworkSocketGetIpTypeOfServiceResponse).write_unaligned(
6159                    (self as *const BaseNetworkSocketGetIpTypeOfServiceResponse).read(),
6160                );
6161                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6162                // done second because the memcpy will write garbage to these bytes.
6163            }
6164            Ok(())
6165        }
6166    }
6167    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6168        fidl::encoding::Encode<BaseNetworkSocketGetIpTypeOfServiceResponse, D> for (T0,)
6169    {
6170        #[inline]
6171        unsafe fn encode(
6172            self,
6173            encoder: &mut fidl::encoding::Encoder<'_, D>,
6174            offset: usize,
6175            depth: fidl::encoding::Depth,
6176        ) -> fidl::Result<()> {
6177            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTypeOfServiceResponse>(offset);
6178            // Zero out padding regions. There's no need to apply masks
6179            // because the unmasked parts will be overwritten by fields.
6180            // Write the fields.
6181            self.0.encode(encoder, offset + 0, depth)?;
6182            Ok(())
6183        }
6184    }
6185
6186    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6187        for BaseNetworkSocketGetIpTypeOfServiceResponse
6188    {
6189        #[inline(always)]
6190        fn new_empty() -> Self {
6191            Self { value: fidl::new_empty!(u8, D) }
6192        }
6193
6194        #[inline]
6195        unsafe fn decode(
6196            &mut self,
6197            decoder: &mut fidl::encoding::Decoder<'_, D>,
6198            offset: usize,
6199            _depth: fidl::encoding::Depth,
6200        ) -> fidl::Result<()> {
6201            decoder.debug_check_bounds::<Self>(offset);
6202            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6203            // Verify that padding bytes are zero.
6204            // Copy from the buffer into the object.
6205            unsafe {
6206                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6207            }
6208            Ok(())
6209        }
6210    }
6211
6212    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastHopsResponse {
6213        type Borrowed<'a> = &'a Self;
6214        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6215            value
6216        }
6217    }
6218
6219    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastHopsResponse {
6220        type Owned = Self;
6221
6222        #[inline(always)]
6223        fn inline_align(_context: fidl::encoding::Context) -> usize {
6224            1
6225        }
6226
6227        #[inline(always)]
6228        fn inline_size(_context: fidl::encoding::Context) -> usize {
6229            1
6230        }
6231        #[inline(always)]
6232        fn encode_is_copy() -> bool {
6233            true
6234        }
6235
6236        #[inline(always)]
6237        fn decode_is_copy() -> bool {
6238            true
6239        }
6240    }
6241
6242    unsafe impl<D: fidl::encoding::ResourceDialect>
6243        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastHopsResponse, D>
6244        for &BaseNetworkSocketGetIpv6MulticastHopsResponse
6245    {
6246        #[inline]
6247        unsafe fn encode(
6248            self,
6249            encoder: &mut fidl::encoding::Encoder<'_, D>,
6250            offset: usize,
6251            _depth: fidl::encoding::Depth,
6252        ) -> fidl::Result<()> {
6253            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastHopsResponse>(offset);
6254            unsafe {
6255                // Copy the object into the buffer.
6256                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6257                (buf_ptr as *mut BaseNetworkSocketGetIpv6MulticastHopsResponse).write_unaligned(
6258                    (self as *const BaseNetworkSocketGetIpv6MulticastHopsResponse).read(),
6259                );
6260                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6261                // done second because the memcpy will write garbage to these bytes.
6262            }
6263            Ok(())
6264        }
6265    }
6266    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6267        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastHopsResponse, D> for (T0,)
6268    {
6269        #[inline]
6270        unsafe fn encode(
6271            self,
6272            encoder: &mut fidl::encoding::Encoder<'_, D>,
6273            offset: usize,
6274            depth: fidl::encoding::Depth,
6275        ) -> fidl::Result<()> {
6276            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastHopsResponse>(offset);
6277            // Zero out padding regions. There's no need to apply masks
6278            // because the unmasked parts will be overwritten by fields.
6279            // Write the fields.
6280            self.0.encode(encoder, offset + 0, depth)?;
6281            Ok(())
6282        }
6283    }
6284
6285    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6286        for BaseNetworkSocketGetIpv6MulticastHopsResponse
6287    {
6288        #[inline(always)]
6289        fn new_empty() -> Self {
6290            Self { value: fidl::new_empty!(u8, D) }
6291        }
6292
6293        #[inline]
6294        unsafe fn decode(
6295            &mut self,
6296            decoder: &mut fidl::encoding::Decoder<'_, D>,
6297            offset: usize,
6298            _depth: fidl::encoding::Depth,
6299        ) -> fidl::Result<()> {
6300            decoder.debug_check_bounds::<Self>(offset);
6301            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6302            // Verify that padding bytes are zero.
6303            // Copy from the buffer into the object.
6304            unsafe {
6305                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6306            }
6307            Ok(())
6308        }
6309    }
6310
6311    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
6312        type Borrowed<'a> = &'a Self;
6313        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6314            value
6315        }
6316    }
6317
6318    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
6319        type Owned = Self;
6320
6321        #[inline(always)]
6322        fn inline_align(_context: fidl::encoding::Context) -> usize {
6323            8
6324        }
6325
6326        #[inline(always)]
6327        fn inline_size(_context: fidl::encoding::Context) -> usize {
6328            8
6329        }
6330        #[inline(always)]
6331        fn encode_is_copy() -> bool {
6332            true
6333        }
6334
6335        #[inline(always)]
6336        fn decode_is_copy() -> bool {
6337            true
6338        }
6339    }
6340
6341    unsafe impl<D: fidl::encoding::ResourceDialect>
6342        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastInterfaceResponse, D>
6343        for &BaseNetworkSocketGetIpv6MulticastInterfaceResponse
6344    {
6345        #[inline]
6346        unsafe fn encode(
6347            self,
6348            encoder: &mut fidl::encoding::Encoder<'_, D>,
6349            offset: usize,
6350            _depth: fidl::encoding::Depth,
6351        ) -> fidl::Result<()> {
6352            encoder
6353                .debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastInterfaceResponse>(offset);
6354            unsafe {
6355                // Copy the object into the buffer.
6356                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6357                (buf_ptr as *mut BaseNetworkSocketGetIpv6MulticastInterfaceResponse)
6358                    .write_unaligned(
6359                        (self as *const BaseNetworkSocketGetIpv6MulticastInterfaceResponse).read(),
6360                    );
6361                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6362                // done second because the memcpy will write garbage to these bytes.
6363            }
6364            Ok(())
6365        }
6366    }
6367    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
6368        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastInterfaceResponse, D> for (T0,)
6369    {
6370        #[inline]
6371        unsafe fn encode(
6372            self,
6373            encoder: &mut fidl::encoding::Encoder<'_, D>,
6374            offset: usize,
6375            depth: fidl::encoding::Depth,
6376        ) -> fidl::Result<()> {
6377            encoder
6378                .debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastInterfaceResponse>(offset);
6379            // Zero out padding regions. There's no need to apply masks
6380            // because the unmasked parts will be overwritten by fields.
6381            // Write the fields.
6382            self.0.encode(encoder, offset + 0, depth)?;
6383            Ok(())
6384        }
6385    }
6386
6387    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6388        for BaseNetworkSocketGetIpv6MulticastInterfaceResponse
6389    {
6390        #[inline(always)]
6391        fn new_empty() -> Self {
6392            Self { value: fidl::new_empty!(u64, D) }
6393        }
6394
6395        #[inline]
6396        unsafe fn decode(
6397            &mut self,
6398            decoder: &mut fidl::encoding::Decoder<'_, D>,
6399            offset: usize,
6400            _depth: fidl::encoding::Depth,
6401        ) -> fidl::Result<()> {
6402            decoder.debug_check_bounds::<Self>(offset);
6403            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6404            // Verify that padding bytes are zero.
6405            // Copy from the buffer into the object.
6406            unsafe {
6407                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
6408            }
6409            Ok(())
6410        }
6411    }
6412
6413    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
6414        type Borrowed<'a> = &'a Self;
6415        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6416            value
6417        }
6418    }
6419
6420    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
6421        type Owned = Self;
6422
6423        #[inline(always)]
6424        fn inline_align(_context: fidl::encoding::Context) -> usize {
6425            1
6426        }
6427
6428        #[inline(always)]
6429        fn inline_size(_context: fidl::encoding::Context) -> usize {
6430            1
6431        }
6432    }
6433
6434    unsafe impl<D: fidl::encoding::ResourceDialect>
6435        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D>
6436        for &BaseNetworkSocketGetIpv6MulticastLoopbackResponse
6437    {
6438        #[inline]
6439        unsafe fn encode(
6440            self,
6441            encoder: &mut fidl::encoding::Encoder<'_, D>,
6442            offset: usize,
6443            _depth: fidl::encoding::Depth,
6444        ) -> fidl::Result<()> {
6445            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse>(offset);
6446            // Delegate to tuple encoding.
6447            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D>::encode(
6448                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6449                encoder,
6450                offset,
6451                _depth,
6452            )
6453        }
6454    }
6455    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6456        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D> for (T0,)
6457    {
6458        #[inline]
6459        unsafe fn encode(
6460            self,
6461            encoder: &mut fidl::encoding::Encoder<'_, D>,
6462            offset: usize,
6463            depth: fidl::encoding::Depth,
6464        ) -> fidl::Result<()> {
6465            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse>(offset);
6466            // Zero out padding regions. There's no need to apply masks
6467            // because the unmasked parts will be overwritten by fields.
6468            // Write the fields.
6469            self.0.encode(encoder, offset + 0, depth)?;
6470            Ok(())
6471        }
6472    }
6473
6474    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6475        for BaseNetworkSocketGetIpv6MulticastLoopbackResponse
6476    {
6477        #[inline(always)]
6478        fn new_empty() -> Self {
6479            Self { value: fidl::new_empty!(bool, D) }
6480        }
6481
6482        #[inline]
6483        unsafe fn decode(
6484            &mut self,
6485            decoder: &mut fidl::encoding::Decoder<'_, D>,
6486            offset: usize,
6487            _depth: fidl::encoding::Depth,
6488        ) -> fidl::Result<()> {
6489            decoder.debug_check_bounds::<Self>(offset);
6490            // Verify that padding bytes are zero.
6491            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6492            Ok(())
6493        }
6494    }
6495
6496    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6OnlyResponse {
6497        type Borrowed<'a> = &'a Self;
6498        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6499            value
6500        }
6501    }
6502
6503    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6OnlyResponse {
6504        type Owned = Self;
6505
6506        #[inline(always)]
6507        fn inline_align(_context: fidl::encoding::Context) -> usize {
6508            1
6509        }
6510
6511        #[inline(always)]
6512        fn inline_size(_context: fidl::encoding::Context) -> usize {
6513            1
6514        }
6515    }
6516
6517    unsafe impl<D: fidl::encoding::ResourceDialect>
6518        fidl::encoding::Encode<BaseNetworkSocketGetIpv6OnlyResponse, D>
6519        for &BaseNetworkSocketGetIpv6OnlyResponse
6520    {
6521        #[inline]
6522        unsafe fn encode(
6523            self,
6524            encoder: &mut fidl::encoding::Encoder<'_, D>,
6525            offset: usize,
6526            _depth: fidl::encoding::Depth,
6527        ) -> fidl::Result<()> {
6528            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6OnlyResponse>(offset);
6529            // Delegate to tuple encoding.
6530            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6OnlyResponse, D>::encode(
6531                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6532                encoder,
6533                offset,
6534                _depth,
6535            )
6536        }
6537    }
6538    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6539        fidl::encoding::Encode<BaseNetworkSocketGetIpv6OnlyResponse, D> for (T0,)
6540    {
6541        #[inline]
6542        unsafe fn encode(
6543            self,
6544            encoder: &mut fidl::encoding::Encoder<'_, D>,
6545            offset: usize,
6546            depth: fidl::encoding::Depth,
6547        ) -> fidl::Result<()> {
6548            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6OnlyResponse>(offset);
6549            // Zero out padding regions. There's no need to apply masks
6550            // because the unmasked parts will be overwritten by fields.
6551            // Write the fields.
6552            self.0.encode(encoder, offset + 0, depth)?;
6553            Ok(())
6554        }
6555    }
6556
6557    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6558        for BaseNetworkSocketGetIpv6OnlyResponse
6559    {
6560        #[inline(always)]
6561        fn new_empty() -> Self {
6562            Self { value: fidl::new_empty!(bool, D) }
6563        }
6564
6565        #[inline]
6566        unsafe fn decode(
6567            &mut self,
6568            decoder: &mut fidl::encoding::Decoder<'_, D>,
6569            offset: usize,
6570            _depth: fidl::encoding::Depth,
6571        ) -> fidl::Result<()> {
6572            decoder.debug_check_bounds::<Self>(offset);
6573            // Verify that padding bytes are zero.
6574            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6575            Ok(())
6576        }
6577    }
6578
6579    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
6580        type Borrowed<'a> = &'a Self;
6581        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6582            value
6583        }
6584    }
6585
6586    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
6587        type Owned = Self;
6588
6589        #[inline(always)]
6590        fn inline_align(_context: fidl::encoding::Context) -> usize {
6591            1
6592        }
6593
6594        #[inline(always)]
6595        fn inline_size(_context: fidl::encoding::Context) -> usize {
6596            1
6597        }
6598    }
6599
6600    unsafe impl<D: fidl::encoding::ResourceDialect>
6601        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D>
6602        for &BaseNetworkSocketGetIpv6ReceiveHopLimitResponse
6603    {
6604        #[inline]
6605        unsafe fn encode(
6606            self,
6607            encoder: &mut fidl::encoding::Encoder<'_, D>,
6608            offset: usize,
6609            _depth: fidl::encoding::Depth,
6610        ) -> fidl::Result<()> {
6611            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse>(offset);
6612            // Delegate to tuple encoding.
6613            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D>::encode(
6614                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6615                encoder,
6616                offset,
6617                _depth,
6618            )
6619        }
6620    }
6621    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6622        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D> for (T0,)
6623    {
6624        #[inline]
6625        unsafe fn encode(
6626            self,
6627            encoder: &mut fidl::encoding::Encoder<'_, D>,
6628            offset: usize,
6629            depth: fidl::encoding::Depth,
6630        ) -> fidl::Result<()> {
6631            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse>(offset);
6632            // Zero out padding regions. There's no need to apply masks
6633            // because the unmasked parts will be overwritten by fields.
6634            // Write the fields.
6635            self.0.encode(encoder, offset + 0, depth)?;
6636            Ok(())
6637        }
6638    }
6639
6640    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6641        for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse
6642    {
6643        #[inline(always)]
6644        fn new_empty() -> Self {
6645            Self { value: fidl::new_empty!(bool, D) }
6646        }
6647
6648        #[inline]
6649        unsafe fn decode(
6650            &mut self,
6651            decoder: &mut fidl::encoding::Decoder<'_, D>,
6652            offset: usize,
6653            _depth: fidl::encoding::Depth,
6654        ) -> fidl::Result<()> {
6655            decoder.debug_check_bounds::<Self>(offset);
6656            // Verify that padding bytes are zero.
6657            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6658            Ok(())
6659        }
6660    }
6661
6662    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
6663        type Borrowed<'a> = &'a Self;
6664        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6665            value
6666        }
6667    }
6668
6669    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
6670        type Owned = Self;
6671
6672        #[inline(always)]
6673        fn inline_align(_context: fidl::encoding::Context) -> usize {
6674            1
6675        }
6676
6677        #[inline(always)]
6678        fn inline_size(_context: fidl::encoding::Context) -> usize {
6679            1
6680        }
6681    }
6682
6683    unsafe impl<D: fidl::encoding::ResourceDialect>
6684        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D>
6685        for &BaseNetworkSocketGetIpv6ReceivePacketInfoResponse
6686    {
6687        #[inline]
6688        unsafe fn encode(
6689            self,
6690            encoder: &mut fidl::encoding::Encoder<'_, D>,
6691            offset: usize,
6692            _depth: fidl::encoding::Depth,
6693        ) -> fidl::Result<()> {
6694            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse>(offset);
6695            // Delegate to tuple encoding.
6696            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D>::encode(
6697                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6698                encoder,
6699                offset,
6700                _depth,
6701            )
6702        }
6703    }
6704    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6705        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D> for (T0,)
6706    {
6707        #[inline]
6708        unsafe fn encode(
6709            self,
6710            encoder: &mut fidl::encoding::Encoder<'_, D>,
6711            offset: usize,
6712            depth: fidl::encoding::Depth,
6713        ) -> fidl::Result<()> {
6714            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse>(offset);
6715            // Zero out padding regions. There's no need to apply masks
6716            // because the unmasked parts will be overwritten by fields.
6717            // Write the fields.
6718            self.0.encode(encoder, offset + 0, depth)?;
6719            Ok(())
6720        }
6721    }
6722
6723    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6724        for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse
6725    {
6726        #[inline(always)]
6727        fn new_empty() -> Self {
6728            Self { value: fidl::new_empty!(bool, D) }
6729        }
6730
6731        #[inline]
6732        unsafe fn decode(
6733            &mut self,
6734            decoder: &mut fidl::encoding::Decoder<'_, D>,
6735            offset: usize,
6736            _depth: fidl::encoding::Depth,
6737        ) -> fidl::Result<()> {
6738            decoder.debug_check_bounds::<Self>(offset);
6739            // Verify that padding bytes are zero.
6740            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6741            Ok(())
6742        }
6743    }
6744
6745    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
6746        type Borrowed<'a> = &'a Self;
6747        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6748            value
6749        }
6750    }
6751
6752    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
6753        type Owned = Self;
6754
6755        #[inline(always)]
6756        fn inline_align(_context: fidl::encoding::Context) -> usize {
6757            1
6758        }
6759
6760        #[inline(always)]
6761        fn inline_size(_context: fidl::encoding::Context) -> usize {
6762            1
6763        }
6764    }
6765
6766    unsafe impl<D: fidl::encoding::ResourceDialect>
6767        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D>
6768        for &BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse
6769    {
6770        #[inline]
6771        unsafe fn encode(
6772            self,
6773            encoder: &mut fidl::encoding::Encoder<'_, D>,
6774            offset: usize,
6775            _depth: fidl::encoding::Depth,
6776        ) -> fidl::Result<()> {
6777            encoder
6778                .debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse>(offset);
6779            // Delegate to tuple encoding.
6780            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D>::encode(
6781                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6782                encoder,
6783                offset,
6784                _depth,
6785            )
6786        }
6787    }
6788    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6789        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D> for (T0,)
6790    {
6791        #[inline]
6792        unsafe fn encode(
6793            self,
6794            encoder: &mut fidl::encoding::Encoder<'_, D>,
6795            offset: usize,
6796            depth: fidl::encoding::Depth,
6797        ) -> fidl::Result<()> {
6798            encoder
6799                .debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse>(offset);
6800            // Zero out padding regions. There's no need to apply masks
6801            // because the unmasked parts will be overwritten by fields.
6802            // Write the fields.
6803            self.0.encode(encoder, offset + 0, depth)?;
6804            Ok(())
6805        }
6806    }
6807
6808    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6809        for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse
6810    {
6811        #[inline(always)]
6812        fn new_empty() -> Self {
6813            Self { value: fidl::new_empty!(bool, D) }
6814        }
6815
6816        #[inline]
6817        unsafe fn decode(
6818            &mut self,
6819            decoder: &mut fidl::encoding::Decoder<'_, D>,
6820            offset: usize,
6821            _depth: fidl::encoding::Depth,
6822        ) -> fidl::Result<()> {
6823            decoder.debug_check_bounds::<Self>(offset);
6824            // Verify that padding bytes are zero.
6825            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6826            Ok(())
6827        }
6828    }
6829
6830    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6TrafficClassResponse {
6831        type Borrowed<'a> = &'a Self;
6832        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6833            value
6834        }
6835    }
6836
6837    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6TrafficClassResponse {
6838        type Owned = Self;
6839
6840        #[inline(always)]
6841        fn inline_align(_context: fidl::encoding::Context) -> usize {
6842            1
6843        }
6844
6845        #[inline(always)]
6846        fn inline_size(_context: fidl::encoding::Context) -> usize {
6847            1
6848        }
6849        #[inline(always)]
6850        fn encode_is_copy() -> bool {
6851            true
6852        }
6853
6854        #[inline(always)]
6855        fn decode_is_copy() -> bool {
6856            true
6857        }
6858    }
6859
6860    unsafe impl<D: fidl::encoding::ResourceDialect>
6861        fidl::encoding::Encode<BaseNetworkSocketGetIpv6TrafficClassResponse, D>
6862        for &BaseNetworkSocketGetIpv6TrafficClassResponse
6863    {
6864        #[inline]
6865        unsafe fn encode(
6866            self,
6867            encoder: &mut fidl::encoding::Encoder<'_, D>,
6868            offset: usize,
6869            _depth: fidl::encoding::Depth,
6870        ) -> fidl::Result<()> {
6871            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6TrafficClassResponse>(offset);
6872            unsafe {
6873                // Copy the object into the buffer.
6874                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6875                (buf_ptr as *mut BaseNetworkSocketGetIpv6TrafficClassResponse).write_unaligned(
6876                    (self as *const BaseNetworkSocketGetIpv6TrafficClassResponse).read(),
6877                );
6878                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6879                // done second because the memcpy will write garbage to these bytes.
6880            }
6881            Ok(())
6882        }
6883    }
6884    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6885        fidl::encoding::Encode<BaseNetworkSocketGetIpv6TrafficClassResponse, D> for (T0,)
6886    {
6887        #[inline]
6888        unsafe fn encode(
6889            self,
6890            encoder: &mut fidl::encoding::Encoder<'_, D>,
6891            offset: usize,
6892            depth: fidl::encoding::Depth,
6893        ) -> fidl::Result<()> {
6894            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6TrafficClassResponse>(offset);
6895            // Zero out padding regions. There's no need to apply masks
6896            // because the unmasked parts will be overwritten by fields.
6897            // Write the fields.
6898            self.0.encode(encoder, offset + 0, depth)?;
6899            Ok(())
6900        }
6901    }
6902
6903    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6904        for BaseNetworkSocketGetIpv6TrafficClassResponse
6905    {
6906        #[inline(always)]
6907        fn new_empty() -> Self {
6908            Self { value: fidl::new_empty!(u8, D) }
6909        }
6910
6911        #[inline]
6912        unsafe fn decode(
6913            &mut self,
6914            decoder: &mut fidl::encoding::Decoder<'_, D>,
6915            offset: usize,
6916            _depth: fidl::encoding::Depth,
6917        ) -> fidl::Result<()> {
6918            decoder.debug_check_bounds::<Self>(offset);
6919            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6920            // Verify that padding bytes are zero.
6921            // Copy from the buffer into the object.
6922            unsafe {
6923                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6924            }
6925            Ok(())
6926        }
6927    }
6928
6929    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6UnicastHopsResponse {
6930        type Borrowed<'a> = &'a Self;
6931        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6932            value
6933        }
6934    }
6935
6936    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6UnicastHopsResponse {
6937        type Owned = Self;
6938
6939        #[inline(always)]
6940        fn inline_align(_context: fidl::encoding::Context) -> usize {
6941            1
6942        }
6943
6944        #[inline(always)]
6945        fn inline_size(_context: fidl::encoding::Context) -> usize {
6946            1
6947        }
6948        #[inline(always)]
6949        fn encode_is_copy() -> bool {
6950            true
6951        }
6952
6953        #[inline(always)]
6954        fn decode_is_copy() -> bool {
6955            true
6956        }
6957    }
6958
6959    unsafe impl<D: fidl::encoding::ResourceDialect>
6960        fidl::encoding::Encode<BaseNetworkSocketGetIpv6UnicastHopsResponse, D>
6961        for &BaseNetworkSocketGetIpv6UnicastHopsResponse
6962    {
6963        #[inline]
6964        unsafe fn encode(
6965            self,
6966            encoder: &mut fidl::encoding::Encoder<'_, D>,
6967            offset: usize,
6968            _depth: fidl::encoding::Depth,
6969        ) -> fidl::Result<()> {
6970            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6UnicastHopsResponse>(offset);
6971            unsafe {
6972                // Copy the object into the buffer.
6973                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6974                (buf_ptr as *mut BaseNetworkSocketGetIpv6UnicastHopsResponse).write_unaligned(
6975                    (self as *const BaseNetworkSocketGetIpv6UnicastHopsResponse).read(),
6976                );
6977                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6978                // done second because the memcpy will write garbage to these bytes.
6979            }
6980            Ok(())
6981        }
6982    }
6983    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6984        fidl::encoding::Encode<BaseNetworkSocketGetIpv6UnicastHopsResponse, D> for (T0,)
6985    {
6986        #[inline]
6987        unsafe fn encode(
6988            self,
6989            encoder: &mut fidl::encoding::Encoder<'_, D>,
6990            offset: usize,
6991            depth: fidl::encoding::Depth,
6992        ) -> fidl::Result<()> {
6993            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6UnicastHopsResponse>(offset);
6994            // Zero out padding regions. There's no need to apply masks
6995            // because the unmasked parts will be overwritten by fields.
6996            // Write the fields.
6997            self.0.encode(encoder, offset + 0, depth)?;
6998            Ok(())
6999        }
7000    }
7001
7002    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7003        for BaseNetworkSocketGetIpv6UnicastHopsResponse
7004    {
7005        #[inline(always)]
7006        fn new_empty() -> Self {
7007            Self { value: fidl::new_empty!(u8, D) }
7008        }
7009
7010        #[inline]
7011        unsafe fn decode(
7012            &mut self,
7013            decoder: &mut fidl::encoding::Decoder<'_, D>,
7014            offset: usize,
7015            _depth: fidl::encoding::Depth,
7016        ) -> fidl::Result<()> {
7017            decoder.debug_check_bounds::<Self>(offset);
7018            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7019            // Verify that padding bytes are zero.
7020            // Copy from the buffer into the object.
7021            unsafe {
7022                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
7023            }
7024            Ok(())
7025        }
7026    }
7027
7028    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetOriginalDestinationResponse {
7029        type Borrowed<'a> = &'a Self;
7030        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7031            value
7032        }
7033    }
7034
7035    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetOriginalDestinationResponse {
7036        type Owned = Self;
7037
7038        #[inline(always)]
7039        fn inline_align(_context: fidl::encoding::Context) -> usize {
7040            8
7041        }
7042
7043        #[inline(always)]
7044        fn inline_size(_context: fidl::encoding::Context) -> usize {
7045            16
7046        }
7047    }
7048
7049    unsafe impl<D: fidl::encoding::ResourceDialect>
7050        fidl::encoding::Encode<BaseNetworkSocketGetOriginalDestinationResponse, D>
7051        for &BaseNetworkSocketGetOriginalDestinationResponse
7052    {
7053        #[inline]
7054        unsafe fn encode(
7055            self,
7056            encoder: &mut fidl::encoding::Encoder<'_, D>,
7057            offset: usize,
7058            _depth: fidl::encoding::Depth,
7059        ) -> fidl::Result<()> {
7060            encoder.debug_check_bounds::<BaseNetworkSocketGetOriginalDestinationResponse>(offset);
7061            // Delegate to tuple encoding.
7062            fidl::encoding::Encode::<BaseNetworkSocketGetOriginalDestinationResponse, D>::encode(
7063                (
7064                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
7065                ),
7066                encoder, offset, _depth
7067            )
7068        }
7069    }
7070    unsafe impl<
7071        D: fidl::encoding::ResourceDialect,
7072        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7073    > fidl::encoding::Encode<BaseNetworkSocketGetOriginalDestinationResponse, D> for (T0,)
7074    {
7075        #[inline]
7076        unsafe fn encode(
7077            self,
7078            encoder: &mut fidl::encoding::Encoder<'_, D>,
7079            offset: usize,
7080            depth: fidl::encoding::Depth,
7081        ) -> fidl::Result<()> {
7082            encoder.debug_check_bounds::<BaseNetworkSocketGetOriginalDestinationResponse>(offset);
7083            // Zero out padding regions. There's no need to apply masks
7084            // because the unmasked parts will be overwritten by fields.
7085            // Write the fields.
7086            self.0.encode(encoder, offset + 0, depth)?;
7087            Ok(())
7088        }
7089    }
7090
7091    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7092        for BaseNetworkSocketGetOriginalDestinationResponse
7093    {
7094        #[inline(always)]
7095        fn new_empty() -> Self {
7096            Self { value: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7097        }
7098
7099        #[inline]
7100        unsafe fn decode(
7101            &mut self,
7102            decoder: &mut fidl::encoding::Decoder<'_, D>,
7103            offset: usize,
7104            _depth: fidl::encoding::Depth,
7105        ) -> fidl::Result<()> {
7106            decoder.debug_check_bounds::<Self>(offset);
7107            // Verify that padding bytes are zero.
7108            fidl::decode!(
7109                fidl_fuchsia_net__common::SocketAddress,
7110                D,
7111                &mut self.value,
7112                decoder,
7113                offset + 0,
7114                _depth
7115            )?;
7116            Ok(())
7117        }
7118    }
7119
7120    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetPeerNameResponse {
7121        type Borrowed<'a> = &'a Self;
7122        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7123            value
7124        }
7125    }
7126
7127    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetPeerNameResponse {
7128        type Owned = Self;
7129
7130        #[inline(always)]
7131        fn inline_align(_context: fidl::encoding::Context) -> usize {
7132            8
7133        }
7134
7135        #[inline(always)]
7136        fn inline_size(_context: fidl::encoding::Context) -> usize {
7137            16
7138        }
7139    }
7140
7141    unsafe impl<D: fidl::encoding::ResourceDialect>
7142        fidl::encoding::Encode<BaseNetworkSocketGetPeerNameResponse, D>
7143        for &BaseNetworkSocketGetPeerNameResponse
7144    {
7145        #[inline]
7146        unsafe fn encode(
7147            self,
7148            encoder: &mut fidl::encoding::Encoder<'_, D>,
7149            offset: usize,
7150            _depth: fidl::encoding::Depth,
7151        ) -> fidl::Result<()> {
7152            encoder.debug_check_bounds::<BaseNetworkSocketGetPeerNameResponse>(offset);
7153            // Delegate to tuple encoding.
7154            fidl::encoding::Encode::<BaseNetworkSocketGetPeerNameResponse, D>::encode(
7155                (
7156                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
7157                ),
7158                encoder, offset, _depth
7159            )
7160        }
7161    }
7162    unsafe impl<
7163        D: fidl::encoding::ResourceDialect,
7164        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7165    > fidl::encoding::Encode<BaseNetworkSocketGetPeerNameResponse, D> for (T0,)
7166    {
7167        #[inline]
7168        unsafe fn encode(
7169            self,
7170            encoder: &mut fidl::encoding::Encoder<'_, D>,
7171            offset: usize,
7172            depth: fidl::encoding::Depth,
7173        ) -> fidl::Result<()> {
7174            encoder.debug_check_bounds::<BaseNetworkSocketGetPeerNameResponse>(offset);
7175            // Zero out padding regions. There's no need to apply masks
7176            // because the unmasked parts will be overwritten by fields.
7177            // Write the fields.
7178            self.0.encode(encoder, offset + 0, depth)?;
7179            Ok(())
7180        }
7181    }
7182
7183    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7184        for BaseNetworkSocketGetPeerNameResponse
7185    {
7186        #[inline(always)]
7187        fn new_empty() -> Self {
7188            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7189        }
7190
7191        #[inline]
7192        unsafe fn decode(
7193            &mut self,
7194            decoder: &mut fidl::encoding::Decoder<'_, D>,
7195            offset: usize,
7196            _depth: fidl::encoding::Depth,
7197        ) -> fidl::Result<()> {
7198            decoder.debug_check_bounds::<Self>(offset);
7199            // Verify that padding bytes are zero.
7200            fidl::decode!(
7201                fidl_fuchsia_net__common::SocketAddress,
7202                D,
7203                &mut self.addr,
7204                decoder,
7205                offset + 0,
7206                _depth
7207            )?;
7208            Ok(())
7209        }
7210    }
7211
7212    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetSockNameResponse {
7213        type Borrowed<'a> = &'a Self;
7214        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7215            value
7216        }
7217    }
7218
7219    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetSockNameResponse {
7220        type Owned = Self;
7221
7222        #[inline(always)]
7223        fn inline_align(_context: fidl::encoding::Context) -> usize {
7224            8
7225        }
7226
7227        #[inline(always)]
7228        fn inline_size(_context: fidl::encoding::Context) -> usize {
7229            16
7230        }
7231    }
7232
7233    unsafe impl<D: fidl::encoding::ResourceDialect>
7234        fidl::encoding::Encode<BaseNetworkSocketGetSockNameResponse, D>
7235        for &BaseNetworkSocketGetSockNameResponse
7236    {
7237        #[inline]
7238        unsafe fn encode(
7239            self,
7240            encoder: &mut fidl::encoding::Encoder<'_, D>,
7241            offset: usize,
7242            _depth: fidl::encoding::Depth,
7243        ) -> fidl::Result<()> {
7244            encoder.debug_check_bounds::<BaseNetworkSocketGetSockNameResponse>(offset);
7245            // Delegate to tuple encoding.
7246            fidl::encoding::Encode::<BaseNetworkSocketGetSockNameResponse, D>::encode(
7247                (
7248                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
7249                ),
7250                encoder, offset, _depth
7251            )
7252        }
7253    }
7254    unsafe impl<
7255        D: fidl::encoding::ResourceDialect,
7256        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7257    > fidl::encoding::Encode<BaseNetworkSocketGetSockNameResponse, D> for (T0,)
7258    {
7259        #[inline]
7260        unsafe fn encode(
7261            self,
7262            encoder: &mut fidl::encoding::Encoder<'_, D>,
7263            offset: usize,
7264            depth: fidl::encoding::Depth,
7265        ) -> fidl::Result<()> {
7266            encoder.debug_check_bounds::<BaseNetworkSocketGetSockNameResponse>(offset);
7267            // Zero out padding regions. There's no need to apply masks
7268            // because the unmasked parts will be overwritten by fields.
7269            // Write the fields.
7270            self.0.encode(encoder, offset + 0, depth)?;
7271            Ok(())
7272        }
7273    }
7274
7275    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7276        for BaseNetworkSocketGetSockNameResponse
7277    {
7278        #[inline(always)]
7279        fn new_empty() -> Self {
7280            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7281        }
7282
7283        #[inline]
7284        unsafe fn decode(
7285            &mut self,
7286            decoder: &mut fidl::encoding::Decoder<'_, D>,
7287            offset: usize,
7288            _depth: fidl::encoding::Depth,
7289        ) -> fidl::Result<()> {
7290            decoder.debug_check_bounds::<Self>(offset);
7291            // Verify that padding bytes are zero.
7292            fidl::decode!(
7293                fidl_fuchsia_net__common::SocketAddress,
7294                D,
7295                &mut self.addr,
7296                decoder,
7297                offset + 0,
7298                _depth
7299            )?;
7300            Ok(())
7301        }
7302    }
7303
7304    impl fidl::encoding::ValueTypeMarker for BaseSocketGetMarkRequest {
7305        type Borrowed<'a> = &'a Self;
7306        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7307            value
7308        }
7309    }
7310
7311    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetMarkRequest {
7312        type Owned = Self;
7313
7314        #[inline(always)]
7315        fn inline_align(_context: fidl::encoding::Context) -> usize {
7316            1
7317        }
7318
7319        #[inline(always)]
7320        fn inline_size(_context: fidl::encoding::Context) -> usize {
7321            1
7322        }
7323    }
7324
7325    unsafe impl<D: fidl::encoding::ResourceDialect>
7326        fidl::encoding::Encode<BaseSocketGetMarkRequest, D> for &BaseSocketGetMarkRequest
7327    {
7328        #[inline]
7329        unsafe fn encode(
7330            self,
7331            encoder: &mut fidl::encoding::Encoder<'_, D>,
7332            offset: usize,
7333            _depth: fidl::encoding::Depth,
7334        ) -> fidl::Result<()> {
7335            encoder.debug_check_bounds::<BaseSocketGetMarkRequest>(offset);
7336            // Delegate to tuple encoding.
7337            fidl::encoding::Encode::<BaseSocketGetMarkRequest, D>::encode(
7338                (
7339                    <fidl_fuchsia_net__common::MarkDomain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
7340                ),
7341                encoder, offset, _depth
7342            )
7343        }
7344    }
7345    unsafe impl<
7346        D: fidl::encoding::ResourceDialect,
7347        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::MarkDomain, D>,
7348    > fidl::encoding::Encode<BaseSocketGetMarkRequest, D> for (T0,)
7349    {
7350        #[inline]
7351        unsafe fn encode(
7352            self,
7353            encoder: &mut fidl::encoding::Encoder<'_, D>,
7354            offset: usize,
7355            depth: fidl::encoding::Depth,
7356        ) -> fidl::Result<()> {
7357            encoder.debug_check_bounds::<BaseSocketGetMarkRequest>(offset);
7358            // Zero out padding regions. There's no need to apply masks
7359            // because the unmasked parts will be overwritten by fields.
7360            // Write the fields.
7361            self.0.encode(encoder, offset + 0, depth)?;
7362            Ok(())
7363        }
7364    }
7365
7366    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7367        for BaseSocketGetMarkRequest
7368    {
7369        #[inline(always)]
7370        fn new_empty() -> Self {
7371            Self { domain: fidl::new_empty!(fidl_fuchsia_net__common::MarkDomain, D) }
7372        }
7373
7374        #[inline]
7375        unsafe fn decode(
7376            &mut self,
7377            decoder: &mut fidl::encoding::Decoder<'_, D>,
7378            offset: usize,
7379            _depth: fidl::encoding::Depth,
7380        ) -> fidl::Result<()> {
7381            decoder.debug_check_bounds::<Self>(offset);
7382            // Verify that padding bytes are zero.
7383            fidl::decode!(
7384                fidl_fuchsia_net__common::MarkDomain,
7385                D,
7386                &mut self.domain,
7387                decoder,
7388                offset + 0,
7389                _depth
7390            )?;
7391            Ok(())
7392        }
7393    }
7394
7395    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBindToDeviceRequest {
7396        type Borrowed<'a> = &'a Self;
7397        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7398            value
7399        }
7400    }
7401
7402    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBindToDeviceRequest {
7403        type Owned = Self;
7404
7405        #[inline(always)]
7406        fn inline_align(_context: fidl::encoding::Context) -> usize {
7407            8
7408        }
7409
7410        #[inline(always)]
7411        fn inline_size(_context: fidl::encoding::Context) -> usize {
7412            16
7413        }
7414    }
7415
7416    unsafe impl<D: fidl::encoding::ResourceDialect>
7417        fidl::encoding::Encode<BaseSocketSetBindToDeviceRequest, D>
7418        for &BaseSocketSetBindToDeviceRequest
7419    {
7420        #[inline]
7421        unsafe fn encode(
7422            self,
7423            encoder: &mut fidl::encoding::Encoder<'_, D>,
7424            offset: usize,
7425            _depth: fidl::encoding::Depth,
7426        ) -> fidl::Result<()> {
7427            encoder.debug_check_bounds::<BaseSocketSetBindToDeviceRequest>(offset);
7428            // Delegate to tuple encoding.
7429            fidl::encoding::Encode::<BaseSocketSetBindToDeviceRequest, D>::encode(
7430                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
7431                    &self.value,
7432                ),),
7433                encoder,
7434                offset,
7435                _depth,
7436            )
7437        }
7438    }
7439    unsafe impl<
7440        D: fidl::encoding::ResourceDialect,
7441        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
7442    > fidl::encoding::Encode<BaseSocketSetBindToDeviceRequest, D> for (T0,)
7443    {
7444        #[inline]
7445        unsafe fn encode(
7446            self,
7447            encoder: &mut fidl::encoding::Encoder<'_, D>,
7448            offset: usize,
7449            depth: fidl::encoding::Depth,
7450        ) -> fidl::Result<()> {
7451            encoder.debug_check_bounds::<BaseSocketSetBindToDeviceRequest>(offset);
7452            // Zero out padding regions. There's no need to apply masks
7453            // because the unmasked parts will be overwritten by fields.
7454            // Write the fields.
7455            self.0.encode(encoder, offset + 0, depth)?;
7456            Ok(())
7457        }
7458    }
7459
7460    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7461        for BaseSocketSetBindToDeviceRequest
7462    {
7463        #[inline(always)]
7464        fn new_empty() -> Self {
7465            Self { value: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
7466        }
7467
7468        #[inline]
7469        unsafe fn decode(
7470            &mut self,
7471            decoder: &mut fidl::encoding::Decoder<'_, D>,
7472            offset: usize,
7473            _depth: fidl::encoding::Depth,
7474        ) -> fidl::Result<()> {
7475            decoder.debug_check_bounds::<Self>(offset);
7476            // Verify that padding bytes are zero.
7477            fidl::decode!(
7478                fidl::encoding::BoundedString<15>,
7479                D,
7480                &mut self.value,
7481                decoder,
7482                offset + 0,
7483                _depth
7484            )?;
7485            Ok(())
7486        }
7487    }
7488
7489    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBindToInterfaceIndexRequest {
7490        type Borrowed<'a> = &'a Self;
7491        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7492            value
7493        }
7494    }
7495
7496    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBindToInterfaceIndexRequest {
7497        type Owned = Self;
7498
7499        #[inline(always)]
7500        fn inline_align(_context: fidl::encoding::Context) -> usize {
7501            8
7502        }
7503
7504        #[inline(always)]
7505        fn inline_size(_context: fidl::encoding::Context) -> usize {
7506            8
7507        }
7508        #[inline(always)]
7509        fn encode_is_copy() -> bool {
7510            true
7511        }
7512
7513        #[inline(always)]
7514        fn decode_is_copy() -> bool {
7515            true
7516        }
7517    }
7518
7519    unsafe impl<D: fidl::encoding::ResourceDialect>
7520        fidl::encoding::Encode<BaseSocketSetBindToInterfaceIndexRequest, D>
7521        for &BaseSocketSetBindToInterfaceIndexRequest
7522    {
7523        #[inline]
7524        unsafe fn encode(
7525            self,
7526            encoder: &mut fidl::encoding::Encoder<'_, D>,
7527            offset: usize,
7528            _depth: fidl::encoding::Depth,
7529        ) -> fidl::Result<()> {
7530            encoder.debug_check_bounds::<BaseSocketSetBindToInterfaceIndexRequest>(offset);
7531            unsafe {
7532                // Copy the object into the buffer.
7533                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7534                (buf_ptr as *mut BaseSocketSetBindToInterfaceIndexRequest).write_unaligned(
7535                    (self as *const BaseSocketSetBindToInterfaceIndexRequest).read(),
7536                );
7537                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7538                // done second because the memcpy will write garbage to these bytes.
7539            }
7540            Ok(())
7541        }
7542    }
7543    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
7544        fidl::encoding::Encode<BaseSocketSetBindToInterfaceIndexRequest, D> for (T0,)
7545    {
7546        #[inline]
7547        unsafe fn encode(
7548            self,
7549            encoder: &mut fidl::encoding::Encoder<'_, D>,
7550            offset: usize,
7551            depth: fidl::encoding::Depth,
7552        ) -> fidl::Result<()> {
7553            encoder.debug_check_bounds::<BaseSocketSetBindToInterfaceIndexRequest>(offset);
7554            // Zero out padding regions. There's no need to apply masks
7555            // because the unmasked parts will be overwritten by fields.
7556            // Write the fields.
7557            self.0.encode(encoder, offset + 0, depth)?;
7558            Ok(())
7559        }
7560    }
7561
7562    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7563        for BaseSocketSetBindToInterfaceIndexRequest
7564    {
7565        #[inline(always)]
7566        fn new_empty() -> Self {
7567            Self { value: fidl::new_empty!(u64, D) }
7568        }
7569
7570        #[inline]
7571        unsafe fn decode(
7572            &mut self,
7573            decoder: &mut fidl::encoding::Decoder<'_, D>,
7574            offset: usize,
7575            _depth: fidl::encoding::Depth,
7576        ) -> fidl::Result<()> {
7577            decoder.debug_check_bounds::<Self>(offset);
7578            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7579            // Verify that padding bytes are zero.
7580            // Copy from the buffer into the object.
7581            unsafe {
7582                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7583            }
7584            Ok(())
7585        }
7586    }
7587
7588    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBroadcastRequest {
7589        type Borrowed<'a> = &'a Self;
7590        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7591            value
7592        }
7593    }
7594
7595    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBroadcastRequest {
7596        type Owned = Self;
7597
7598        #[inline(always)]
7599        fn inline_align(_context: fidl::encoding::Context) -> usize {
7600            1
7601        }
7602
7603        #[inline(always)]
7604        fn inline_size(_context: fidl::encoding::Context) -> usize {
7605            1
7606        }
7607    }
7608
7609    unsafe impl<D: fidl::encoding::ResourceDialect>
7610        fidl::encoding::Encode<BaseSocketSetBroadcastRequest, D>
7611        for &BaseSocketSetBroadcastRequest
7612    {
7613        #[inline]
7614        unsafe fn encode(
7615            self,
7616            encoder: &mut fidl::encoding::Encoder<'_, D>,
7617            offset: usize,
7618            _depth: fidl::encoding::Depth,
7619        ) -> fidl::Result<()> {
7620            encoder.debug_check_bounds::<BaseSocketSetBroadcastRequest>(offset);
7621            // Delegate to tuple encoding.
7622            fidl::encoding::Encode::<BaseSocketSetBroadcastRequest, D>::encode(
7623                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7624                encoder,
7625                offset,
7626                _depth,
7627            )
7628        }
7629    }
7630    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7631        fidl::encoding::Encode<BaseSocketSetBroadcastRequest, D> for (T0,)
7632    {
7633        #[inline]
7634        unsafe fn encode(
7635            self,
7636            encoder: &mut fidl::encoding::Encoder<'_, D>,
7637            offset: usize,
7638            depth: fidl::encoding::Depth,
7639        ) -> fidl::Result<()> {
7640            encoder.debug_check_bounds::<BaseSocketSetBroadcastRequest>(offset);
7641            // Zero out padding regions. There's no need to apply masks
7642            // because the unmasked parts will be overwritten by fields.
7643            // Write the fields.
7644            self.0.encode(encoder, offset + 0, depth)?;
7645            Ok(())
7646        }
7647    }
7648
7649    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7650        for BaseSocketSetBroadcastRequest
7651    {
7652        #[inline(always)]
7653        fn new_empty() -> Self {
7654            Self { value: fidl::new_empty!(bool, D) }
7655        }
7656
7657        #[inline]
7658        unsafe fn decode(
7659            &mut self,
7660            decoder: &mut fidl::encoding::Decoder<'_, D>,
7661            offset: usize,
7662            _depth: fidl::encoding::Depth,
7663        ) -> fidl::Result<()> {
7664            decoder.debug_check_bounds::<Self>(offset);
7665            // Verify that padding bytes are zero.
7666            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7667            Ok(())
7668        }
7669    }
7670
7671    impl fidl::encoding::ValueTypeMarker for BaseSocketSetKeepAliveRequest {
7672        type Borrowed<'a> = &'a Self;
7673        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7674            value
7675        }
7676    }
7677
7678    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetKeepAliveRequest {
7679        type Owned = Self;
7680
7681        #[inline(always)]
7682        fn inline_align(_context: fidl::encoding::Context) -> usize {
7683            1
7684        }
7685
7686        #[inline(always)]
7687        fn inline_size(_context: fidl::encoding::Context) -> usize {
7688            1
7689        }
7690    }
7691
7692    unsafe impl<D: fidl::encoding::ResourceDialect>
7693        fidl::encoding::Encode<BaseSocketSetKeepAliveRequest, D>
7694        for &BaseSocketSetKeepAliveRequest
7695    {
7696        #[inline]
7697        unsafe fn encode(
7698            self,
7699            encoder: &mut fidl::encoding::Encoder<'_, D>,
7700            offset: usize,
7701            _depth: fidl::encoding::Depth,
7702        ) -> fidl::Result<()> {
7703            encoder.debug_check_bounds::<BaseSocketSetKeepAliveRequest>(offset);
7704            // Delegate to tuple encoding.
7705            fidl::encoding::Encode::<BaseSocketSetKeepAliveRequest, D>::encode(
7706                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7707                encoder,
7708                offset,
7709                _depth,
7710            )
7711        }
7712    }
7713    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7714        fidl::encoding::Encode<BaseSocketSetKeepAliveRequest, D> for (T0,)
7715    {
7716        #[inline]
7717        unsafe fn encode(
7718            self,
7719            encoder: &mut fidl::encoding::Encoder<'_, D>,
7720            offset: usize,
7721            depth: fidl::encoding::Depth,
7722        ) -> fidl::Result<()> {
7723            encoder.debug_check_bounds::<BaseSocketSetKeepAliveRequest>(offset);
7724            // Zero out padding regions. There's no need to apply masks
7725            // because the unmasked parts will be overwritten by fields.
7726            // Write the fields.
7727            self.0.encode(encoder, offset + 0, depth)?;
7728            Ok(())
7729        }
7730    }
7731
7732    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7733        for BaseSocketSetKeepAliveRequest
7734    {
7735        #[inline(always)]
7736        fn new_empty() -> Self {
7737            Self { value: fidl::new_empty!(bool, D) }
7738        }
7739
7740        #[inline]
7741        unsafe fn decode(
7742            &mut self,
7743            decoder: &mut fidl::encoding::Decoder<'_, D>,
7744            offset: usize,
7745            _depth: fidl::encoding::Depth,
7746        ) -> fidl::Result<()> {
7747            decoder.debug_check_bounds::<Self>(offset);
7748            // Verify that padding bytes are zero.
7749            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7750            Ok(())
7751        }
7752    }
7753
7754    impl fidl::encoding::ValueTypeMarker for BaseSocketSetLingerRequest {
7755        type Borrowed<'a> = &'a Self;
7756        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7757            value
7758        }
7759    }
7760
7761    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetLingerRequest {
7762        type Owned = Self;
7763
7764        #[inline(always)]
7765        fn inline_align(_context: fidl::encoding::Context) -> usize {
7766            4
7767        }
7768
7769        #[inline(always)]
7770        fn inline_size(_context: fidl::encoding::Context) -> usize {
7771            8
7772        }
7773    }
7774
7775    unsafe impl<D: fidl::encoding::ResourceDialect>
7776        fidl::encoding::Encode<BaseSocketSetLingerRequest, D> for &BaseSocketSetLingerRequest
7777    {
7778        #[inline]
7779        unsafe fn encode(
7780            self,
7781            encoder: &mut fidl::encoding::Encoder<'_, D>,
7782            offset: usize,
7783            _depth: fidl::encoding::Depth,
7784        ) -> fidl::Result<()> {
7785            encoder.debug_check_bounds::<BaseSocketSetLingerRequest>(offset);
7786            // Delegate to tuple encoding.
7787            fidl::encoding::Encode::<BaseSocketSetLingerRequest, D>::encode(
7788                (
7789                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.linger),
7790                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length_secs),
7791                ),
7792                encoder,
7793                offset,
7794                _depth,
7795            )
7796        }
7797    }
7798    unsafe impl<
7799        D: fidl::encoding::ResourceDialect,
7800        T0: fidl::encoding::Encode<bool, D>,
7801        T1: fidl::encoding::Encode<u32, D>,
7802    > fidl::encoding::Encode<BaseSocketSetLingerRequest, D> for (T0, T1)
7803    {
7804        #[inline]
7805        unsafe fn encode(
7806            self,
7807            encoder: &mut fidl::encoding::Encoder<'_, D>,
7808            offset: usize,
7809            depth: fidl::encoding::Depth,
7810        ) -> fidl::Result<()> {
7811            encoder.debug_check_bounds::<BaseSocketSetLingerRequest>(offset);
7812            // Zero out padding regions. There's no need to apply masks
7813            // because the unmasked parts will be overwritten by fields.
7814            unsafe {
7815                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7816                (ptr as *mut u32).write_unaligned(0);
7817            }
7818            // Write the fields.
7819            self.0.encode(encoder, offset + 0, depth)?;
7820            self.1.encode(encoder, offset + 4, depth)?;
7821            Ok(())
7822        }
7823    }
7824
7825    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7826        for BaseSocketSetLingerRequest
7827    {
7828        #[inline(always)]
7829        fn new_empty() -> Self {
7830            Self { linger: fidl::new_empty!(bool, D), length_secs: fidl::new_empty!(u32, D) }
7831        }
7832
7833        #[inline]
7834        unsafe fn decode(
7835            &mut self,
7836            decoder: &mut fidl::encoding::Decoder<'_, D>,
7837            offset: usize,
7838            _depth: fidl::encoding::Depth,
7839        ) -> fidl::Result<()> {
7840            decoder.debug_check_bounds::<Self>(offset);
7841            // Verify that padding bytes are zero.
7842            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7843            let padval = unsafe { (ptr as *const u32).read_unaligned() };
7844            let mask = 0xffffff00u32;
7845            let maskedval = padval & mask;
7846            if maskedval != 0 {
7847                return Err(fidl::Error::NonZeroPadding {
7848                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7849                });
7850            }
7851            fidl::decode!(bool, D, &mut self.linger, decoder, offset + 0, _depth)?;
7852            fidl::decode!(u32, D, &mut self.length_secs, decoder, offset + 4, _depth)?;
7853            Ok(())
7854        }
7855    }
7856
7857    impl fidl::encoding::ValueTypeMarker for BaseSocketSetMarkRequest {
7858        type Borrowed<'a> = &'a Self;
7859        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7860            value
7861        }
7862    }
7863
7864    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetMarkRequest {
7865        type Owned = Self;
7866
7867        #[inline(always)]
7868        fn inline_align(_context: fidl::encoding::Context) -> usize {
7869            8
7870        }
7871
7872        #[inline(always)]
7873        fn inline_size(_context: fidl::encoding::Context) -> usize {
7874            24
7875        }
7876    }
7877
7878    unsafe impl<D: fidl::encoding::ResourceDialect>
7879        fidl::encoding::Encode<BaseSocketSetMarkRequest, D> for &BaseSocketSetMarkRequest
7880    {
7881        #[inline]
7882        unsafe fn encode(
7883            self,
7884            encoder: &mut fidl::encoding::Encoder<'_, D>,
7885            offset: usize,
7886            _depth: fidl::encoding::Depth,
7887        ) -> fidl::Result<()> {
7888            encoder.debug_check_bounds::<BaseSocketSetMarkRequest>(offset);
7889            // Delegate to tuple encoding.
7890            fidl::encoding::Encode::<BaseSocketSetMarkRequest, D>::encode(
7891                (
7892                    <fidl_fuchsia_net__common::MarkDomain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
7893                    <OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mark),
7894                ),
7895                encoder, offset, _depth
7896            )
7897        }
7898    }
7899    unsafe impl<
7900        D: fidl::encoding::ResourceDialect,
7901        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::MarkDomain, D>,
7902        T1: fidl::encoding::Encode<OptionalUint32, D>,
7903    > fidl::encoding::Encode<BaseSocketSetMarkRequest, D> for (T0, T1)
7904    {
7905        #[inline]
7906        unsafe fn encode(
7907            self,
7908            encoder: &mut fidl::encoding::Encoder<'_, D>,
7909            offset: usize,
7910            depth: fidl::encoding::Depth,
7911        ) -> fidl::Result<()> {
7912            encoder.debug_check_bounds::<BaseSocketSetMarkRequest>(offset);
7913            // Zero out padding regions. There's no need to apply masks
7914            // because the unmasked parts will be overwritten by fields.
7915            unsafe {
7916                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7917                (ptr as *mut u64).write_unaligned(0);
7918            }
7919            // Write the fields.
7920            self.0.encode(encoder, offset + 0, depth)?;
7921            self.1.encode(encoder, offset + 8, depth)?;
7922            Ok(())
7923        }
7924    }
7925
7926    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7927        for BaseSocketSetMarkRequest
7928    {
7929        #[inline(always)]
7930        fn new_empty() -> Self {
7931            Self {
7932                domain: fidl::new_empty!(fidl_fuchsia_net__common::MarkDomain, D),
7933                mark: fidl::new_empty!(OptionalUint32, D),
7934            }
7935        }
7936
7937        #[inline]
7938        unsafe fn decode(
7939            &mut self,
7940            decoder: &mut fidl::encoding::Decoder<'_, D>,
7941            offset: usize,
7942            _depth: fidl::encoding::Depth,
7943        ) -> fidl::Result<()> {
7944            decoder.debug_check_bounds::<Self>(offset);
7945            // Verify that padding bytes are zero.
7946            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7947            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7948            let mask = 0xffffffffffffff00u64;
7949            let maskedval = padval & mask;
7950            if maskedval != 0 {
7951                return Err(fidl::Error::NonZeroPadding {
7952                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7953                });
7954            }
7955            fidl::decode!(
7956                fidl_fuchsia_net__common::MarkDomain,
7957                D,
7958                &mut self.domain,
7959                decoder,
7960                offset + 0,
7961                _depth
7962            )?;
7963            fidl::decode!(OptionalUint32, D, &mut self.mark, decoder, offset + 8, _depth)?;
7964            Ok(())
7965        }
7966    }
7967
7968    impl fidl::encoding::ValueTypeMarker for BaseSocketSetNoCheckRequest {
7969        type Borrowed<'a> = &'a Self;
7970        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7971            value
7972        }
7973    }
7974
7975    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetNoCheckRequest {
7976        type Owned = Self;
7977
7978        #[inline(always)]
7979        fn inline_align(_context: fidl::encoding::Context) -> usize {
7980            1
7981        }
7982
7983        #[inline(always)]
7984        fn inline_size(_context: fidl::encoding::Context) -> usize {
7985            1
7986        }
7987    }
7988
7989    unsafe impl<D: fidl::encoding::ResourceDialect>
7990        fidl::encoding::Encode<BaseSocketSetNoCheckRequest, D> for &BaseSocketSetNoCheckRequest
7991    {
7992        #[inline]
7993        unsafe fn encode(
7994            self,
7995            encoder: &mut fidl::encoding::Encoder<'_, D>,
7996            offset: usize,
7997            _depth: fidl::encoding::Depth,
7998        ) -> fidl::Result<()> {
7999            encoder.debug_check_bounds::<BaseSocketSetNoCheckRequest>(offset);
8000            // Delegate to tuple encoding.
8001            fidl::encoding::Encode::<BaseSocketSetNoCheckRequest, D>::encode(
8002                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8003                encoder,
8004                offset,
8005                _depth,
8006            )
8007        }
8008    }
8009    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8010        fidl::encoding::Encode<BaseSocketSetNoCheckRequest, D> for (T0,)
8011    {
8012        #[inline]
8013        unsafe fn encode(
8014            self,
8015            encoder: &mut fidl::encoding::Encoder<'_, D>,
8016            offset: usize,
8017            depth: fidl::encoding::Depth,
8018        ) -> fidl::Result<()> {
8019            encoder.debug_check_bounds::<BaseSocketSetNoCheckRequest>(offset);
8020            // Zero out padding regions. There's no need to apply masks
8021            // because the unmasked parts will be overwritten by fields.
8022            // Write the fields.
8023            self.0.encode(encoder, offset + 0, depth)?;
8024            Ok(())
8025        }
8026    }
8027
8028    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8029        for BaseSocketSetNoCheckRequest
8030    {
8031        #[inline(always)]
8032        fn new_empty() -> Self {
8033            Self { value: fidl::new_empty!(bool, D) }
8034        }
8035
8036        #[inline]
8037        unsafe fn decode(
8038            &mut self,
8039            decoder: &mut fidl::encoding::Decoder<'_, D>,
8040            offset: usize,
8041            _depth: fidl::encoding::Depth,
8042        ) -> fidl::Result<()> {
8043            decoder.debug_check_bounds::<Self>(offset);
8044            // Verify that padding bytes are zero.
8045            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8046            Ok(())
8047        }
8048    }
8049
8050    impl fidl::encoding::ValueTypeMarker for BaseSocketSetOutOfBandInlineRequest {
8051        type Borrowed<'a> = &'a Self;
8052        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8053            value
8054        }
8055    }
8056
8057    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetOutOfBandInlineRequest {
8058        type Owned = Self;
8059
8060        #[inline(always)]
8061        fn inline_align(_context: fidl::encoding::Context) -> usize {
8062            1
8063        }
8064
8065        #[inline(always)]
8066        fn inline_size(_context: fidl::encoding::Context) -> usize {
8067            1
8068        }
8069    }
8070
8071    unsafe impl<D: fidl::encoding::ResourceDialect>
8072        fidl::encoding::Encode<BaseSocketSetOutOfBandInlineRequest, D>
8073        for &BaseSocketSetOutOfBandInlineRequest
8074    {
8075        #[inline]
8076        unsafe fn encode(
8077            self,
8078            encoder: &mut fidl::encoding::Encoder<'_, D>,
8079            offset: usize,
8080            _depth: fidl::encoding::Depth,
8081        ) -> fidl::Result<()> {
8082            encoder.debug_check_bounds::<BaseSocketSetOutOfBandInlineRequest>(offset);
8083            // Delegate to tuple encoding.
8084            fidl::encoding::Encode::<BaseSocketSetOutOfBandInlineRequest, D>::encode(
8085                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8086                encoder,
8087                offset,
8088                _depth,
8089            )
8090        }
8091    }
8092    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8093        fidl::encoding::Encode<BaseSocketSetOutOfBandInlineRequest, D> for (T0,)
8094    {
8095        #[inline]
8096        unsafe fn encode(
8097            self,
8098            encoder: &mut fidl::encoding::Encoder<'_, D>,
8099            offset: usize,
8100            depth: fidl::encoding::Depth,
8101        ) -> fidl::Result<()> {
8102            encoder.debug_check_bounds::<BaseSocketSetOutOfBandInlineRequest>(offset);
8103            // Zero out padding regions. There's no need to apply masks
8104            // because the unmasked parts will be overwritten by fields.
8105            // Write the fields.
8106            self.0.encode(encoder, offset + 0, depth)?;
8107            Ok(())
8108        }
8109    }
8110
8111    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8112        for BaseSocketSetOutOfBandInlineRequest
8113    {
8114        #[inline(always)]
8115        fn new_empty() -> Self {
8116            Self { value: fidl::new_empty!(bool, D) }
8117        }
8118
8119        #[inline]
8120        unsafe fn decode(
8121            &mut self,
8122            decoder: &mut fidl::encoding::Decoder<'_, D>,
8123            offset: usize,
8124            _depth: fidl::encoding::Depth,
8125        ) -> fidl::Result<()> {
8126            decoder.debug_check_bounds::<Self>(offset);
8127            // Verify that padding bytes are zero.
8128            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8129            Ok(())
8130        }
8131    }
8132
8133    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReceiveBufferRequest {
8134        type Borrowed<'a> = &'a Self;
8135        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8136            value
8137        }
8138    }
8139
8140    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReceiveBufferRequest {
8141        type Owned = Self;
8142
8143        #[inline(always)]
8144        fn inline_align(_context: fidl::encoding::Context) -> usize {
8145            8
8146        }
8147
8148        #[inline(always)]
8149        fn inline_size(_context: fidl::encoding::Context) -> usize {
8150            8
8151        }
8152        #[inline(always)]
8153        fn encode_is_copy() -> bool {
8154            true
8155        }
8156
8157        #[inline(always)]
8158        fn decode_is_copy() -> bool {
8159            true
8160        }
8161    }
8162
8163    unsafe impl<D: fidl::encoding::ResourceDialect>
8164        fidl::encoding::Encode<BaseSocketSetReceiveBufferRequest, D>
8165        for &BaseSocketSetReceiveBufferRequest
8166    {
8167        #[inline]
8168        unsafe fn encode(
8169            self,
8170            encoder: &mut fidl::encoding::Encoder<'_, D>,
8171            offset: usize,
8172            _depth: fidl::encoding::Depth,
8173        ) -> fidl::Result<()> {
8174            encoder.debug_check_bounds::<BaseSocketSetReceiveBufferRequest>(offset);
8175            unsafe {
8176                // Copy the object into the buffer.
8177                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8178                (buf_ptr as *mut BaseSocketSetReceiveBufferRequest)
8179                    .write_unaligned((self as *const BaseSocketSetReceiveBufferRequest).read());
8180                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8181                // done second because the memcpy will write garbage to these bytes.
8182            }
8183            Ok(())
8184        }
8185    }
8186    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8187        fidl::encoding::Encode<BaseSocketSetReceiveBufferRequest, D> for (T0,)
8188    {
8189        #[inline]
8190        unsafe fn encode(
8191            self,
8192            encoder: &mut fidl::encoding::Encoder<'_, D>,
8193            offset: usize,
8194            depth: fidl::encoding::Depth,
8195        ) -> fidl::Result<()> {
8196            encoder.debug_check_bounds::<BaseSocketSetReceiveBufferRequest>(offset);
8197            // Zero out padding regions. There's no need to apply masks
8198            // because the unmasked parts will be overwritten by fields.
8199            // Write the fields.
8200            self.0.encode(encoder, offset + 0, depth)?;
8201            Ok(())
8202        }
8203    }
8204
8205    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8206        for BaseSocketSetReceiveBufferRequest
8207    {
8208        #[inline(always)]
8209        fn new_empty() -> Self {
8210            Self { value_bytes: fidl::new_empty!(u64, D) }
8211        }
8212
8213        #[inline]
8214        unsafe fn decode(
8215            &mut self,
8216            decoder: &mut fidl::encoding::Decoder<'_, D>,
8217            offset: usize,
8218            _depth: fidl::encoding::Depth,
8219        ) -> fidl::Result<()> {
8220            decoder.debug_check_bounds::<Self>(offset);
8221            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8222            // Verify that padding bytes are zero.
8223            // Copy from the buffer into the object.
8224            unsafe {
8225                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8226            }
8227            Ok(())
8228        }
8229    }
8230
8231    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReuseAddressRequest {
8232        type Borrowed<'a> = &'a Self;
8233        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8234            value
8235        }
8236    }
8237
8238    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReuseAddressRequest {
8239        type Owned = Self;
8240
8241        #[inline(always)]
8242        fn inline_align(_context: fidl::encoding::Context) -> usize {
8243            1
8244        }
8245
8246        #[inline(always)]
8247        fn inline_size(_context: fidl::encoding::Context) -> usize {
8248            1
8249        }
8250    }
8251
8252    unsafe impl<D: fidl::encoding::ResourceDialect>
8253        fidl::encoding::Encode<BaseSocketSetReuseAddressRequest, D>
8254        for &BaseSocketSetReuseAddressRequest
8255    {
8256        #[inline]
8257        unsafe fn encode(
8258            self,
8259            encoder: &mut fidl::encoding::Encoder<'_, D>,
8260            offset: usize,
8261            _depth: fidl::encoding::Depth,
8262        ) -> fidl::Result<()> {
8263            encoder.debug_check_bounds::<BaseSocketSetReuseAddressRequest>(offset);
8264            // Delegate to tuple encoding.
8265            fidl::encoding::Encode::<BaseSocketSetReuseAddressRequest, D>::encode(
8266                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8267                encoder,
8268                offset,
8269                _depth,
8270            )
8271        }
8272    }
8273    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8274        fidl::encoding::Encode<BaseSocketSetReuseAddressRequest, D> for (T0,)
8275    {
8276        #[inline]
8277        unsafe fn encode(
8278            self,
8279            encoder: &mut fidl::encoding::Encoder<'_, D>,
8280            offset: usize,
8281            depth: fidl::encoding::Depth,
8282        ) -> fidl::Result<()> {
8283            encoder.debug_check_bounds::<BaseSocketSetReuseAddressRequest>(offset);
8284            // Zero out padding regions. There's no need to apply masks
8285            // because the unmasked parts will be overwritten by fields.
8286            // Write the fields.
8287            self.0.encode(encoder, offset + 0, depth)?;
8288            Ok(())
8289        }
8290    }
8291
8292    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8293        for BaseSocketSetReuseAddressRequest
8294    {
8295        #[inline(always)]
8296        fn new_empty() -> Self {
8297            Self { value: fidl::new_empty!(bool, D) }
8298        }
8299
8300        #[inline]
8301        unsafe fn decode(
8302            &mut self,
8303            decoder: &mut fidl::encoding::Decoder<'_, D>,
8304            offset: usize,
8305            _depth: fidl::encoding::Depth,
8306        ) -> fidl::Result<()> {
8307            decoder.debug_check_bounds::<Self>(offset);
8308            // Verify that padding bytes are zero.
8309            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8310            Ok(())
8311        }
8312    }
8313
8314    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReusePortRequest {
8315        type Borrowed<'a> = &'a Self;
8316        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8317            value
8318        }
8319    }
8320
8321    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReusePortRequest {
8322        type Owned = Self;
8323
8324        #[inline(always)]
8325        fn inline_align(_context: fidl::encoding::Context) -> usize {
8326            1
8327        }
8328
8329        #[inline(always)]
8330        fn inline_size(_context: fidl::encoding::Context) -> usize {
8331            1
8332        }
8333    }
8334
8335    unsafe impl<D: fidl::encoding::ResourceDialect>
8336        fidl::encoding::Encode<BaseSocketSetReusePortRequest, D>
8337        for &BaseSocketSetReusePortRequest
8338    {
8339        #[inline]
8340        unsafe fn encode(
8341            self,
8342            encoder: &mut fidl::encoding::Encoder<'_, D>,
8343            offset: usize,
8344            _depth: fidl::encoding::Depth,
8345        ) -> fidl::Result<()> {
8346            encoder.debug_check_bounds::<BaseSocketSetReusePortRequest>(offset);
8347            // Delegate to tuple encoding.
8348            fidl::encoding::Encode::<BaseSocketSetReusePortRequest, D>::encode(
8349                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8350                encoder,
8351                offset,
8352                _depth,
8353            )
8354        }
8355    }
8356    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8357        fidl::encoding::Encode<BaseSocketSetReusePortRequest, D> for (T0,)
8358    {
8359        #[inline]
8360        unsafe fn encode(
8361            self,
8362            encoder: &mut fidl::encoding::Encoder<'_, D>,
8363            offset: usize,
8364            depth: fidl::encoding::Depth,
8365        ) -> fidl::Result<()> {
8366            encoder.debug_check_bounds::<BaseSocketSetReusePortRequest>(offset);
8367            // Zero out padding regions. There's no need to apply masks
8368            // because the unmasked parts will be overwritten by fields.
8369            // Write the fields.
8370            self.0.encode(encoder, offset + 0, depth)?;
8371            Ok(())
8372        }
8373    }
8374
8375    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8376        for BaseSocketSetReusePortRequest
8377    {
8378        #[inline(always)]
8379        fn new_empty() -> Self {
8380            Self { value: fidl::new_empty!(bool, D) }
8381        }
8382
8383        #[inline]
8384        unsafe fn decode(
8385            &mut self,
8386            decoder: &mut fidl::encoding::Decoder<'_, D>,
8387            offset: usize,
8388            _depth: fidl::encoding::Depth,
8389        ) -> fidl::Result<()> {
8390            decoder.debug_check_bounds::<Self>(offset);
8391            // Verify that padding bytes are zero.
8392            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8393            Ok(())
8394        }
8395    }
8396
8397    impl fidl::encoding::ValueTypeMarker for BaseSocketSetSendBufferRequest {
8398        type Borrowed<'a> = &'a Self;
8399        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8400            value
8401        }
8402    }
8403
8404    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetSendBufferRequest {
8405        type Owned = Self;
8406
8407        #[inline(always)]
8408        fn inline_align(_context: fidl::encoding::Context) -> usize {
8409            8
8410        }
8411
8412        #[inline(always)]
8413        fn inline_size(_context: fidl::encoding::Context) -> usize {
8414            8
8415        }
8416        #[inline(always)]
8417        fn encode_is_copy() -> bool {
8418            true
8419        }
8420
8421        #[inline(always)]
8422        fn decode_is_copy() -> bool {
8423            true
8424        }
8425    }
8426
8427    unsafe impl<D: fidl::encoding::ResourceDialect>
8428        fidl::encoding::Encode<BaseSocketSetSendBufferRequest, D>
8429        for &BaseSocketSetSendBufferRequest
8430    {
8431        #[inline]
8432        unsafe fn encode(
8433            self,
8434            encoder: &mut fidl::encoding::Encoder<'_, D>,
8435            offset: usize,
8436            _depth: fidl::encoding::Depth,
8437        ) -> fidl::Result<()> {
8438            encoder.debug_check_bounds::<BaseSocketSetSendBufferRequest>(offset);
8439            unsafe {
8440                // Copy the object into the buffer.
8441                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8442                (buf_ptr as *mut BaseSocketSetSendBufferRequest)
8443                    .write_unaligned((self as *const BaseSocketSetSendBufferRequest).read());
8444                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8445                // done second because the memcpy will write garbage to these bytes.
8446            }
8447            Ok(())
8448        }
8449    }
8450    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8451        fidl::encoding::Encode<BaseSocketSetSendBufferRequest, D> for (T0,)
8452    {
8453        #[inline]
8454        unsafe fn encode(
8455            self,
8456            encoder: &mut fidl::encoding::Encoder<'_, D>,
8457            offset: usize,
8458            depth: fidl::encoding::Depth,
8459        ) -> fidl::Result<()> {
8460            encoder.debug_check_bounds::<BaseSocketSetSendBufferRequest>(offset);
8461            // Zero out padding regions. There's no need to apply masks
8462            // because the unmasked parts will be overwritten by fields.
8463            // Write the fields.
8464            self.0.encode(encoder, offset + 0, depth)?;
8465            Ok(())
8466        }
8467    }
8468
8469    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8470        for BaseSocketSetSendBufferRequest
8471    {
8472        #[inline(always)]
8473        fn new_empty() -> Self {
8474            Self { value_bytes: fidl::new_empty!(u64, D) }
8475        }
8476
8477        #[inline]
8478        unsafe fn decode(
8479            &mut self,
8480            decoder: &mut fidl::encoding::Decoder<'_, D>,
8481            offset: usize,
8482            _depth: fidl::encoding::Depth,
8483        ) -> fidl::Result<()> {
8484            decoder.debug_check_bounds::<Self>(offset);
8485            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8486            // Verify that padding bytes are zero.
8487            // Copy from the buffer into the object.
8488            unsafe {
8489                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8490            }
8491            Ok(())
8492        }
8493    }
8494
8495    impl fidl::encoding::ValueTypeMarker for BaseSocketSetTimestampRequest {
8496        type Borrowed<'a> = &'a Self;
8497        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8498            value
8499        }
8500    }
8501
8502    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetTimestampRequest {
8503        type Owned = Self;
8504
8505        #[inline(always)]
8506        fn inline_align(_context: fidl::encoding::Context) -> usize {
8507            4
8508        }
8509
8510        #[inline(always)]
8511        fn inline_size(_context: fidl::encoding::Context) -> usize {
8512            4
8513        }
8514    }
8515
8516    unsafe impl<D: fidl::encoding::ResourceDialect>
8517        fidl::encoding::Encode<BaseSocketSetTimestampRequest, D>
8518        for &BaseSocketSetTimestampRequest
8519    {
8520        #[inline]
8521        unsafe fn encode(
8522            self,
8523            encoder: &mut fidl::encoding::Encoder<'_, D>,
8524            offset: usize,
8525            _depth: fidl::encoding::Depth,
8526        ) -> fidl::Result<()> {
8527            encoder.debug_check_bounds::<BaseSocketSetTimestampRequest>(offset);
8528            // Delegate to tuple encoding.
8529            fidl::encoding::Encode::<BaseSocketSetTimestampRequest, D>::encode(
8530                (<TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8531                encoder,
8532                offset,
8533                _depth,
8534            )
8535        }
8536    }
8537    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TimestampOption, D>>
8538        fidl::encoding::Encode<BaseSocketSetTimestampRequest, D> for (T0,)
8539    {
8540        #[inline]
8541        unsafe fn encode(
8542            self,
8543            encoder: &mut fidl::encoding::Encoder<'_, D>,
8544            offset: usize,
8545            depth: fidl::encoding::Depth,
8546        ) -> fidl::Result<()> {
8547            encoder.debug_check_bounds::<BaseSocketSetTimestampRequest>(offset);
8548            // Zero out padding regions. There's no need to apply masks
8549            // because the unmasked parts will be overwritten by fields.
8550            // Write the fields.
8551            self.0.encode(encoder, offset + 0, depth)?;
8552            Ok(())
8553        }
8554    }
8555
8556    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8557        for BaseSocketSetTimestampRequest
8558    {
8559        #[inline(always)]
8560        fn new_empty() -> Self {
8561            Self { value: fidl::new_empty!(TimestampOption, D) }
8562        }
8563
8564        #[inline]
8565        unsafe fn decode(
8566            &mut self,
8567            decoder: &mut fidl::encoding::Decoder<'_, D>,
8568            offset: usize,
8569            _depth: fidl::encoding::Depth,
8570        ) -> fidl::Result<()> {
8571            decoder.debug_check_bounds::<Self>(offset);
8572            // Verify that padding bytes are zero.
8573            fidl::decode!(TimestampOption, D, &mut self.value, decoder, offset + 0, _depth)?;
8574            Ok(())
8575        }
8576    }
8577
8578    impl fidl::encoding::ValueTypeMarker for BaseSocketGetAcceptConnResponse {
8579        type Borrowed<'a> = &'a Self;
8580        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8581            value
8582        }
8583    }
8584
8585    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetAcceptConnResponse {
8586        type Owned = Self;
8587
8588        #[inline(always)]
8589        fn inline_align(_context: fidl::encoding::Context) -> usize {
8590            1
8591        }
8592
8593        #[inline(always)]
8594        fn inline_size(_context: fidl::encoding::Context) -> usize {
8595            1
8596        }
8597    }
8598
8599    unsafe impl<D: fidl::encoding::ResourceDialect>
8600        fidl::encoding::Encode<BaseSocketGetAcceptConnResponse, D>
8601        for &BaseSocketGetAcceptConnResponse
8602    {
8603        #[inline]
8604        unsafe fn encode(
8605            self,
8606            encoder: &mut fidl::encoding::Encoder<'_, D>,
8607            offset: usize,
8608            _depth: fidl::encoding::Depth,
8609        ) -> fidl::Result<()> {
8610            encoder.debug_check_bounds::<BaseSocketGetAcceptConnResponse>(offset);
8611            // Delegate to tuple encoding.
8612            fidl::encoding::Encode::<BaseSocketGetAcceptConnResponse, D>::encode(
8613                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8614                encoder,
8615                offset,
8616                _depth,
8617            )
8618        }
8619    }
8620    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8621        fidl::encoding::Encode<BaseSocketGetAcceptConnResponse, D> for (T0,)
8622    {
8623        #[inline]
8624        unsafe fn encode(
8625            self,
8626            encoder: &mut fidl::encoding::Encoder<'_, D>,
8627            offset: usize,
8628            depth: fidl::encoding::Depth,
8629        ) -> fidl::Result<()> {
8630            encoder.debug_check_bounds::<BaseSocketGetAcceptConnResponse>(offset);
8631            // Zero out padding regions. There's no need to apply masks
8632            // because the unmasked parts will be overwritten by fields.
8633            // Write the fields.
8634            self.0.encode(encoder, offset + 0, depth)?;
8635            Ok(())
8636        }
8637    }
8638
8639    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8640        for BaseSocketGetAcceptConnResponse
8641    {
8642        #[inline(always)]
8643        fn new_empty() -> Self {
8644            Self { value: fidl::new_empty!(bool, D) }
8645        }
8646
8647        #[inline]
8648        unsafe fn decode(
8649            &mut self,
8650            decoder: &mut fidl::encoding::Decoder<'_, D>,
8651            offset: usize,
8652            _depth: fidl::encoding::Depth,
8653        ) -> fidl::Result<()> {
8654            decoder.debug_check_bounds::<Self>(offset);
8655            // Verify that padding bytes are zero.
8656            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8657            Ok(())
8658        }
8659    }
8660
8661    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBindToDeviceResponse {
8662        type Borrowed<'a> = &'a Self;
8663        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8664            value
8665        }
8666    }
8667
8668    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBindToDeviceResponse {
8669        type Owned = Self;
8670
8671        #[inline(always)]
8672        fn inline_align(_context: fidl::encoding::Context) -> usize {
8673            8
8674        }
8675
8676        #[inline(always)]
8677        fn inline_size(_context: fidl::encoding::Context) -> usize {
8678            16
8679        }
8680    }
8681
8682    unsafe impl<D: fidl::encoding::ResourceDialect>
8683        fidl::encoding::Encode<BaseSocketGetBindToDeviceResponse, D>
8684        for &BaseSocketGetBindToDeviceResponse
8685    {
8686        #[inline]
8687        unsafe fn encode(
8688            self,
8689            encoder: &mut fidl::encoding::Encoder<'_, D>,
8690            offset: usize,
8691            _depth: fidl::encoding::Depth,
8692        ) -> fidl::Result<()> {
8693            encoder.debug_check_bounds::<BaseSocketGetBindToDeviceResponse>(offset);
8694            // Delegate to tuple encoding.
8695            fidl::encoding::Encode::<BaseSocketGetBindToDeviceResponse, D>::encode(
8696                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
8697                    &self.value,
8698                ),),
8699                encoder,
8700                offset,
8701                _depth,
8702            )
8703        }
8704    }
8705    unsafe impl<
8706        D: fidl::encoding::ResourceDialect,
8707        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
8708    > fidl::encoding::Encode<BaseSocketGetBindToDeviceResponse, D> for (T0,)
8709    {
8710        #[inline]
8711        unsafe fn encode(
8712            self,
8713            encoder: &mut fidl::encoding::Encoder<'_, D>,
8714            offset: usize,
8715            depth: fidl::encoding::Depth,
8716        ) -> fidl::Result<()> {
8717            encoder.debug_check_bounds::<BaseSocketGetBindToDeviceResponse>(offset);
8718            // Zero out padding regions. There's no need to apply masks
8719            // because the unmasked parts will be overwritten by fields.
8720            // Write the fields.
8721            self.0.encode(encoder, offset + 0, depth)?;
8722            Ok(())
8723        }
8724    }
8725
8726    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8727        for BaseSocketGetBindToDeviceResponse
8728    {
8729        #[inline(always)]
8730        fn new_empty() -> Self {
8731            Self { value: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
8732        }
8733
8734        #[inline]
8735        unsafe fn decode(
8736            &mut self,
8737            decoder: &mut fidl::encoding::Decoder<'_, D>,
8738            offset: usize,
8739            _depth: fidl::encoding::Depth,
8740        ) -> fidl::Result<()> {
8741            decoder.debug_check_bounds::<Self>(offset);
8742            // Verify that padding bytes are zero.
8743            fidl::decode!(
8744                fidl::encoding::BoundedString<15>,
8745                D,
8746                &mut self.value,
8747                decoder,
8748                offset + 0,
8749                _depth
8750            )?;
8751            Ok(())
8752        }
8753    }
8754
8755    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBindToInterfaceIndexResponse {
8756        type Borrowed<'a> = &'a Self;
8757        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8758            value
8759        }
8760    }
8761
8762    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBindToInterfaceIndexResponse {
8763        type Owned = Self;
8764
8765        #[inline(always)]
8766        fn inline_align(_context: fidl::encoding::Context) -> usize {
8767            8
8768        }
8769
8770        #[inline(always)]
8771        fn inline_size(_context: fidl::encoding::Context) -> usize {
8772            8
8773        }
8774        #[inline(always)]
8775        fn encode_is_copy() -> bool {
8776            true
8777        }
8778
8779        #[inline(always)]
8780        fn decode_is_copy() -> bool {
8781            true
8782        }
8783    }
8784
8785    unsafe impl<D: fidl::encoding::ResourceDialect>
8786        fidl::encoding::Encode<BaseSocketGetBindToInterfaceIndexResponse, D>
8787        for &BaseSocketGetBindToInterfaceIndexResponse
8788    {
8789        #[inline]
8790        unsafe fn encode(
8791            self,
8792            encoder: &mut fidl::encoding::Encoder<'_, D>,
8793            offset: usize,
8794            _depth: fidl::encoding::Depth,
8795        ) -> fidl::Result<()> {
8796            encoder.debug_check_bounds::<BaseSocketGetBindToInterfaceIndexResponse>(offset);
8797            unsafe {
8798                // Copy the object into the buffer.
8799                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8800                (buf_ptr as *mut BaseSocketGetBindToInterfaceIndexResponse).write_unaligned(
8801                    (self as *const BaseSocketGetBindToInterfaceIndexResponse).read(),
8802                );
8803                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8804                // done second because the memcpy will write garbage to these bytes.
8805            }
8806            Ok(())
8807        }
8808    }
8809    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8810        fidl::encoding::Encode<BaseSocketGetBindToInterfaceIndexResponse, D> for (T0,)
8811    {
8812        #[inline]
8813        unsafe fn encode(
8814            self,
8815            encoder: &mut fidl::encoding::Encoder<'_, D>,
8816            offset: usize,
8817            depth: fidl::encoding::Depth,
8818        ) -> fidl::Result<()> {
8819            encoder.debug_check_bounds::<BaseSocketGetBindToInterfaceIndexResponse>(offset);
8820            // Zero out padding regions. There's no need to apply masks
8821            // because the unmasked parts will be overwritten by fields.
8822            // Write the fields.
8823            self.0.encode(encoder, offset + 0, depth)?;
8824            Ok(())
8825        }
8826    }
8827
8828    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8829        for BaseSocketGetBindToInterfaceIndexResponse
8830    {
8831        #[inline(always)]
8832        fn new_empty() -> Self {
8833            Self { value: fidl::new_empty!(u64, D) }
8834        }
8835
8836        #[inline]
8837        unsafe fn decode(
8838            &mut self,
8839            decoder: &mut fidl::encoding::Decoder<'_, D>,
8840            offset: usize,
8841            _depth: fidl::encoding::Depth,
8842        ) -> fidl::Result<()> {
8843            decoder.debug_check_bounds::<Self>(offset);
8844            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8845            // Verify that padding bytes are zero.
8846            // Copy from the buffer into the object.
8847            unsafe {
8848                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8849            }
8850            Ok(())
8851        }
8852    }
8853
8854    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBroadcastResponse {
8855        type Borrowed<'a> = &'a Self;
8856        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8857            value
8858        }
8859    }
8860
8861    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBroadcastResponse {
8862        type Owned = Self;
8863
8864        #[inline(always)]
8865        fn inline_align(_context: fidl::encoding::Context) -> usize {
8866            1
8867        }
8868
8869        #[inline(always)]
8870        fn inline_size(_context: fidl::encoding::Context) -> usize {
8871            1
8872        }
8873    }
8874
8875    unsafe impl<D: fidl::encoding::ResourceDialect>
8876        fidl::encoding::Encode<BaseSocketGetBroadcastResponse, D>
8877        for &BaseSocketGetBroadcastResponse
8878    {
8879        #[inline]
8880        unsafe fn encode(
8881            self,
8882            encoder: &mut fidl::encoding::Encoder<'_, D>,
8883            offset: usize,
8884            _depth: fidl::encoding::Depth,
8885        ) -> fidl::Result<()> {
8886            encoder.debug_check_bounds::<BaseSocketGetBroadcastResponse>(offset);
8887            // Delegate to tuple encoding.
8888            fidl::encoding::Encode::<BaseSocketGetBroadcastResponse, D>::encode(
8889                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8890                encoder,
8891                offset,
8892                _depth,
8893            )
8894        }
8895    }
8896    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8897        fidl::encoding::Encode<BaseSocketGetBroadcastResponse, D> for (T0,)
8898    {
8899        #[inline]
8900        unsafe fn encode(
8901            self,
8902            encoder: &mut fidl::encoding::Encoder<'_, D>,
8903            offset: usize,
8904            depth: fidl::encoding::Depth,
8905        ) -> fidl::Result<()> {
8906            encoder.debug_check_bounds::<BaseSocketGetBroadcastResponse>(offset);
8907            // Zero out padding regions. There's no need to apply masks
8908            // because the unmasked parts will be overwritten by fields.
8909            // Write the fields.
8910            self.0.encode(encoder, offset + 0, depth)?;
8911            Ok(())
8912        }
8913    }
8914
8915    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8916        for BaseSocketGetBroadcastResponse
8917    {
8918        #[inline(always)]
8919        fn new_empty() -> Self {
8920            Self { value: fidl::new_empty!(bool, D) }
8921        }
8922
8923        #[inline]
8924        unsafe fn decode(
8925            &mut self,
8926            decoder: &mut fidl::encoding::Decoder<'_, D>,
8927            offset: usize,
8928            _depth: fidl::encoding::Depth,
8929        ) -> fidl::Result<()> {
8930            decoder.debug_check_bounds::<Self>(offset);
8931            // Verify that padding bytes are zero.
8932            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8933            Ok(())
8934        }
8935    }
8936
8937    impl fidl::encoding::ValueTypeMarker for BaseSocketGetCookieResponse {
8938        type Borrowed<'a> = &'a Self;
8939        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8940            value
8941        }
8942    }
8943
8944    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetCookieResponse {
8945        type Owned = Self;
8946
8947        #[inline(always)]
8948        fn inline_align(_context: fidl::encoding::Context) -> usize {
8949            8
8950        }
8951
8952        #[inline(always)]
8953        fn inline_size(_context: fidl::encoding::Context) -> usize {
8954            8
8955        }
8956        #[inline(always)]
8957        fn encode_is_copy() -> bool {
8958            true
8959        }
8960
8961        #[inline(always)]
8962        fn decode_is_copy() -> bool {
8963            true
8964        }
8965    }
8966
8967    unsafe impl<D: fidl::encoding::ResourceDialect>
8968        fidl::encoding::Encode<BaseSocketGetCookieResponse, D> for &BaseSocketGetCookieResponse
8969    {
8970        #[inline]
8971        unsafe fn encode(
8972            self,
8973            encoder: &mut fidl::encoding::Encoder<'_, D>,
8974            offset: usize,
8975            _depth: fidl::encoding::Depth,
8976        ) -> fidl::Result<()> {
8977            encoder.debug_check_bounds::<BaseSocketGetCookieResponse>(offset);
8978            unsafe {
8979                // Copy the object into the buffer.
8980                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8981                (buf_ptr as *mut BaseSocketGetCookieResponse)
8982                    .write_unaligned((self as *const BaseSocketGetCookieResponse).read());
8983                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8984                // done second because the memcpy will write garbage to these bytes.
8985            }
8986            Ok(())
8987        }
8988    }
8989    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8990        fidl::encoding::Encode<BaseSocketGetCookieResponse, D> for (T0,)
8991    {
8992        #[inline]
8993        unsafe fn encode(
8994            self,
8995            encoder: &mut fidl::encoding::Encoder<'_, D>,
8996            offset: usize,
8997            depth: fidl::encoding::Depth,
8998        ) -> fidl::Result<()> {
8999            encoder.debug_check_bounds::<BaseSocketGetCookieResponse>(offset);
9000            // Zero out padding regions. There's no need to apply masks
9001            // because the unmasked parts will be overwritten by fields.
9002            // Write the fields.
9003            self.0.encode(encoder, offset + 0, depth)?;
9004            Ok(())
9005        }
9006    }
9007
9008    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9009        for BaseSocketGetCookieResponse
9010    {
9011        #[inline(always)]
9012        fn new_empty() -> Self {
9013            Self { value: fidl::new_empty!(u64, D) }
9014        }
9015
9016        #[inline]
9017        unsafe fn decode(
9018            &mut self,
9019            decoder: &mut fidl::encoding::Decoder<'_, D>,
9020            offset: usize,
9021            _depth: fidl::encoding::Depth,
9022        ) -> fidl::Result<()> {
9023            decoder.debug_check_bounds::<Self>(offset);
9024            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9025            // Verify that padding bytes are zero.
9026            // Copy from the buffer into the object.
9027            unsafe {
9028                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9029            }
9030            Ok(())
9031        }
9032    }
9033
9034    impl fidl::encoding::ValueTypeMarker for BaseSocketGetKeepAliveResponse {
9035        type Borrowed<'a> = &'a Self;
9036        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9037            value
9038        }
9039    }
9040
9041    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetKeepAliveResponse {
9042        type Owned = Self;
9043
9044        #[inline(always)]
9045        fn inline_align(_context: fidl::encoding::Context) -> usize {
9046            1
9047        }
9048
9049        #[inline(always)]
9050        fn inline_size(_context: fidl::encoding::Context) -> usize {
9051            1
9052        }
9053    }
9054
9055    unsafe impl<D: fidl::encoding::ResourceDialect>
9056        fidl::encoding::Encode<BaseSocketGetKeepAliveResponse, D>
9057        for &BaseSocketGetKeepAliveResponse
9058    {
9059        #[inline]
9060        unsafe fn encode(
9061            self,
9062            encoder: &mut fidl::encoding::Encoder<'_, D>,
9063            offset: usize,
9064            _depth: fidl::encoding::Depth,
9065        ) -> fidl::Result<()> {
9066            encoder.debug_check_bounds::<BaseSocketGetKeepAliveResponse>(offset);
9067            // Delegate to tuple encoding.
9068            fidl::encoding::Encode::<BaseSocketGetKeepAliveResponse, D>::encode(
9069                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9070                encoder,
9071                offset,
9072                _depth,
9073            )
9074        }
9075    }
9076    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9077        fidl::encoding::Encode<BaseSocketGetKeepAliveResponse, D> for (T0,)
9078    {
9079        #[inline]
9080        unsafe fn encode(
9081            self,
9082            encoder: &mut fidl::encoding::Encoder<'_, D>,
9083            offset: usize,
9084            depth: fidl::encoding::Depth,
9085        ) -> fidl::Result<()> {
9086            encoder.debug_check_bounds::<BaseSocketGetKeepAliveResponse>(offset);
9087            // Zero out padding regions. There's no need to apply masks
9088            // because the unmasked parts will be overwritten by fields.
9089            // Write the fields.
9090            self.0.encode(encoder, offset + 0, depth)?;
9091            Ok(())
9092        }
9093    }
9094
9095    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9096        for BaseSocketGetKeepAliveResponse
9097    {
9098        #[inline(always)]
9099        fn new_empty() -> Self {
9100            Self { value: fidl::new_empty!(bool, D) }
9101        }
9102
9103        #[inline]
9104        unsafe fn decode(
9105            &mut self,
9106            decoder: &mut fidl::encoding::Decoder<'_, D>,
9107            offset: usize,
9108            _depth: fidl::encoding::Depth,
9109        ) -> fidl::Result<()> {
9110            decoder.debug_check_bounds::<Self>(offset);
9111            // Verify that padding bytes are zero.
9112            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9113            Ok(())
9114        }
9115    }
9116
9117    impl fidl::encoding::ValueTypeMarker for BaseSocketGetLingerResponse {
9118        type Borrowed<'a> = &'a Self;
9119        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9120            value
9121        }
9122    }
9123
9124    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetLingerResponse {
9125        type Owned = Self;
9126
9127        #[inline(always)]
9128        fn inline_align(_context: fidl::encoding::Context) -> usize {
9129            4
9130        }
9131
9132        #[inline(always)]
9133        fn inline_size(_context: fidl::encoding::Context) -> usize {
9134            8
9135        }
9136    }
9137
9138    unsafe impl<D: fidl::encoding::ResourceDialect>
9139        fidl::encoding::Encode<BaseSocketGetLingerResponse, D> for &BaseSocketGetLingerResponse
9140    {
9141        #[inline]
9142        unsafe fn encode(
9143            self,
9144            encoder: &mut fidl::encoding::Encoder<'_, D>,
9145            offset: usize,
9146            _depth: fidl::encoding::Depth,
9147        ) -> fidl::Result<()> {
9148            encoder.debug_check_bounds::<BaseSocketGetLingerResponse>(offset);
9149            // Delegate to tuple encoding.
9150            fidl::encoding::Encode::<BaseSocketGetLingerResponse, D>::encode(
9151                (
9152                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.linger),
9153                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length_secs),
9154                ),
9155                encoder,
9156                offset,
9157                _depth,
9158            )
9159        }
9160    }
9161    unsafe impl<
9162        D: fidl::encoding::ResourceDialect,
9163        T0: fidl::encoding::Encode<bool, D>,
9164        T1: fidl::encoding::Encode<u32, D>,
9165    > fidl::encoding::Encode<BaseSocketGetLingerResponse, D> for (T0, T1)
9166    {
9167        #[inline]
9168        unsafe fn encode(
9169            self,
9170            encoder: &mut fidl::encoding::Encoder<'_, D>,
9171            offset: usize,
9172            depth: fidl::encoding::Depth,
9173        ) -> fidl::Result<()> {
9174            encoder.debug_check_bounds::<BaseSocketGetLingerResponse>(offset);
9175            // Zero out padding regions. There's no need to apply masks
9176            // because the unmasked parts will be overwritten by fields.
9177            unsafe {
9178                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9179                (ptr as *mut u32).write_unaligned(0);
9180            }
9181            // Write the fields.
9182            self.0.encode(encoder, offset + 0, depth)?;
9183            self.1.encode(encoder, offset + 4, depth)?;
9184            Ok(())
9185        }
9186    }
9187
9188    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9189        for BaseSocketGetLingerResponse
9190    {
9191        #[inline(always)]
9192        fn new_empty() -> Self {
9193            Self { linger: fidl::new_empty!(bool, D), length_secs: fidl::new_empty!(u32, D) }
9194        }
9195
9196        #[inline]
9197        unsafe fn decode(
9198            &mut self,
9199            decoder: &mut fidl::encoding::Decoder<'_, D>,
9200            offset: usize,
9201            _depth: fidl::encoding::Depth,
9202        ) -> fidl::Result<()> {
9203            decoder.debug_check_bounds::<Self>(offset);
9204            // Verify that padding bytes are zero.
9205            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9206            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9207            let mask = 0xffffff00u32;
9208            let maskedval = padval & mask;
9209            if maskedval != 0 {
9210                return Err(fidl::Error::NonZeroPadding {
9211                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9212                });
9213            }
9214            fidl::decode!(bool, D, &mut self.linger, decoder, offset + 0, _depth)?;
9215            fidl::decode!(u32, D, &mut self.length_secs, decoder, offset + 4, _depth)?;
9216            Ok(())
9217        }
9218    }
9219
9220    impl fidl::encoding::ValueTypeMarker for BaseSocketGetMarkResponse {
9221        type Borrowed<'a> = &'a Self;
9222        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9223            value
9224        }
9225    }
9226
9227    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetMarkResponse {
9228        type Owned = Self;
9229
9230        #[inline(always)]
9231        fn inline_align(_context: fidl::encoding::Context) -> usize {
9232            8
9233        }
9234
9235        #[inline(always)]
9236        fn inline_size(_context: fidl::encoding::Context) -> usize {
9237            16
9238        }
9239    }
9240
9241    unsafe impl<D: fidl::encoding::ResourceDialect>
9242        fidl::encoding::Encode<BaseSocketGetMarkResponse, D> for &BaseSocketGetMarkResponse
9243    {
9244        #[inline]
9245        unsafe fn encode(
9246            self,
9247            encoder: &mut fidl::encoding::Encoder<'_, D>,
9248            offset: usize,
9249            _depth: fidl::encoding::Depth,
9250        ) -> fidl::Result<()> {
9251            encoder.debug_check_bounds::<BaseSocketGetMarkResponse>(offset);
9252            // Delegate to tuple encoding.
9253            fidl::encoding::Encode::<BaseSocketGetMarkResponse, D>::encode(
9254                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mark),),
9255                encoder,
9256                offset,
9257                _depth,
9258            )
9259        }
9260    }
9261    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
9262        fidl::encoding::Encode<BaseSocketGetMarkResponse, D> for (T0,)
9263    {
9264        #[inline]
9265        unsafe fn encode(
9266            self,
9267            encoder: &mut fidl::encoding::Encoder<'_, D>,
9268            offset: usize,
9269            depth: fidl::encoding::Depth,
9270        ) -> fidl::Result<()> {
9271            encoder.debug_check_bounds::<BaseSocketGetMarkResponse>(offset);
9272            // Zero out padding regions. There's no need to apply masks
9273            // because the unmasked parts will be overwritten by fields.
9274            // Write the fields.
9275            self.0.encode(encoder, offset + 0, depth)?;
9276            Ok(())
9277        }
9278    }
9279
9280    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9281        for BaseSocketGetMarkResponse
9282    {
9283        #[inline(always)]
9284        fn new_empty() -> Self {
9285            Self { mark: fidl::new_empty!(OptionalUint32, D) }
9286        }
9287
9288        #[inline]
9289        unsafe fn decode(
9290            &mut self,
9291            decoder: &mut fidl::encoding::Decoder<'_, D>,
9292            offset: usize,
9293            _depth: fidl::encoding::Depth,
9294        ) -> fidl::Result<()> {
9295            decoder.debug_check_bounds::<Self>(offset);
9296            // Verify that padding bytes are zero.
9297            fidl::decode!(OptionalUint32, D, &mut self.mark, decoder, offset + 0, _depth)?;
9298            Ok(())
9299        }
9300    }
9301
9302    impl fidl::encoding::ValueTypeMarker for BaseSocketGetNoCheckResponse {
9303        type Borrowed<'a> = &'a Self;
9304        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9305            value
9306        }
9307    }
9308
9309    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetNoCheckResponse {
9310        type Owned = Self;
9311
9312        #[inline(always)]
9313        fn inline_align(_context: fidl::encoding::Context) -> usize {
9314            1
9315        }
9316
9317        #[inline(always)]
9318        fn inline_size(_context: fidl::encoding::Context) -> usize {
9319            1
9320        }
9321    }
9322
9323    unsafe impl<D: fidl::encoding::ResourceDialect>
9324        fidl::encoding::Encode<BaseSocketGetNoCheckResponse, D> for &BaseSocketGetNoCheckResponse
9325    {
9326        #[inline]
9327        unsafe fn encode(
9328            self,
9329            encoder: &mut fidl::encoding::Encoder<'_, D>,
9330            offset: usize,
9331            _depth: fidl::encoding::Depth,
9332        ) -> fidl::Result<()> {
9333            encoder.debug_check_bounds::<BaseSocketGetNoCheckResponse>(offset);
9334            // Delegate to tuple encoding.
9335            fidl::encoding::Encode::<BaseSocketGetNoCheckResponse, D>::encode(
9336                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9337                encoder,
9338                offset,
9339                _depth,
9340            )
9341        }
9342    }
9343    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9344        fidl::encoding::Encode<BaseSocketGetNoCheckResponse, D> for (T0,)
9345    {
9346        #[inline]
9347        unsafe fn encode(
9348            self,
9349            encoder: &mut fidl::encoding::Encoder<'_, D>,
9350            offset: usize,
9351            depth: fidl::encoding::Depth,
9352        ) -> fidl::Result<()> {
9353            encoder.debug_check_bounds::<BaseSocketGetNoCheckResponse>(offset);
9354            // Zero out padding regions. There's no need to apply masks
9355            // because the unmasked parts will be overwritten by fields.
9356            // Write the fields.
9357            self.0.encode(encoder, offset + 0, depth)?;
9358            Ok(())
9359        }
9360    }
9361
9362    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9363        for BaseSocketGetNoCheckResponse
9364    {
9365        #[inline(always)]
9366        fn new_empty() -> Self {
9367            Self { value: fidl::new_empty!(bool, D) }
9368        }
9369
9370        #[inline]
9371        unsafe fn decode(
9372            &mut self,
9373            decoder: &mut fidl::encoding::Decoder<'_, D>,
9374            offset: usize,
9375            _depth: fidl::encoding::Depth,
9376        ) -> fidl::Result<()> {
9377            decoder.debug_check_bounds::<Self>(offset);
9378            // Verify that padding bytes are zero.
9379            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9380            Ok(())
9381        }
9382    }
9383
9384    impl fidl::encoding::ValueTypeMarker for BaseSocketGetOutOfBandInlineResponse {
9385        type Borrowed<'a> = &'a Self;
9386        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9387            value
9388        }
9389    }
9390
9391    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetOutOfBandInlineResponse {
9392        type Owned = Self;
9393
9394        #[inline(always)]
9395        fn inline_align(_context: fidl::encoding::Context) -> usize {
9396            1
9397        }
9398
9399        #[inline(always)]
9400        fn inline_size(_context: fidl::encoding::Context) -> usize {
9401            1
9402        }
9403    }
9404
9405    unsafe impl<D: fidl::encoding::ResourceDialect>
9406        fidl::encoding::Encode<BaseSocketGetOutOfBandInlineResponse, D>
9407        for &BaseSocketGetOutOfBandInlineResponse
9408    {
9409        #[inline]
9410        unsafe fn encode(
9411            self,
9412            encoder: &mut fidl::encoding::Encoder<'_, D>,
9413            offset: usize,
9414            _depth: fidl::encoding::Depth,
9415        ) -> fidl::Result<()> {
9416            encoder.debug_check_bounds::<BaseSocketGetOutOfBandInlineResponse>(offset);
9417            // Delegate to tuple encoding.
9418            fidl::encoding::Encode::<BaseSocketGetOutOfBandInlineResponse, D>::encode(
9419                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9420                encoder,
9421                offset,
9422                _depth,
9423            )
9424        }
9425    }
9426    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9427        fidl::encoding::Encode<BaseSocketGetOutOfBandInlineResponse, D> for (T0,)
9428    {
9429        #[inline]
9430        unsafe fn encode(
9431            self,
9432            encoder: &mut fidl::encoding::Encoder<'_, D>,
9433            offset: usize,
9434            depth: fidl::encoding::Depth,
9435        ) -> fidl::Result<()> {
9436            encoder.debug_check_bounds::<BaseSocketGetOutOfBandInlineResponse>(offset);
9437            // Zero out padding regions. There's no need to apply masks
9438            // because the unmasked parts will be overwritten by fields.
9439            // Write the fields.
9440            self.0.encode(encoder, offset + 0, depth)?;
9441            Ok(())
9442        }
9443    }
9444
9445    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9446        for BaseSocketGetOutOfBandInlineResponse
9447    {
9448        #[inline(always)]
9449        fn new_empty() -> Self {
9450            Self { value: fidl::new_empty!(bool, D) }
9451        }
9452
9453        #[inline]
9454        unsafe fn decode(
9455            &mut self,
9456            decoder: &mut fidl::encoding::Decoder<'_, D>,
9457            offset: usize,
9458            _depth: fidl::encoding::Depth,
9459        ) -> fidl::Result<()> {
9460            decoder.debug_check_bounds::<Self>(offset);
9461            // Verify that padding bytes are zero.
9462            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9463            Ok(())
9464        }
9465    }
9466
9467    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReceiveBufferResponse {
9468        type Borrowed<'a> = &'a Self;
9469        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9470            value
9471        }
9472    }
9473
9474    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReceiveBufferResponse {
9475        type Owned = Self;
9476
9477        #[inline(always)]
9478        fn inline_align(_context: fidl::encoding::Context) -> usize {
9479            8
9480        }
9481
9482        #[inline(always)]
9483        fn inline_size(_context: fidl::encoding::Context) -> usize {
9484            8
9485        }
9486        #[inline(always)]
9487        fn encode_is_copy() -> bool {
9488            true
9489        }
9490
9491        #[inline(always)]
9492        fn decode_is_copy() -> bool {
9493            true
9494        }
9495    }
9496
9497    unsafe impl<D: fidl::encoding::ResourceDialect>
9498        fidl::encoding::Encode<BaseSocketGetReceiveBufferResponse, D>
9499        for &BaseSocketGetReceiveBufferResponse
9500    {
9501        #[inline]
9502        unsafe fn encode(
9503            self,
9504            encoder: &mut fidl::encoding::Encoder<'_, D>,
9505            offset: usize,
9506            _depth: fidl::encoding::Depth,
9507        ) -> fidl::Result<()> {
9508            encoder.debug_check_bounds::<BaseSocketGetReceiveBufferResponse>(offset);
9509            unsafe {
9510                // Copy the object into the buffer.
9511                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9512                (buf_ptr as *mut BaseSocketGetReceiveBufferResponse)
9513                    .write_unaligned((self as *const BaseSocketGetReceiveBufferResponse).read());
9514                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9515                // done second because the memcpy will write garbage to these bytes.
9516            }
9517            Ok(())
9518        }
9519    }
9520    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9521        fidl::encoding::Encode<BaseSocketGetReceiveBufferResponse, D> for (T0,)
9522    {
9523        #[inline]
9524        unsafe fn encode(
9525            self,
9526            encoder: &mut fidl::encoding::Encoder<'_, D>,
9527            offset: usize,
9528            depth: fidl::encoding::Depth,
9529        ) -> fidl::Result<()> {
9530            encoder.debug_check_bounds::<BaseSocketGetReceiveBufferResponse>(offset);
9531            // Zero out padding regions. There's no need to apply masks
9532            // because the unmasked parts will be overwritten by fields.
9533            // Write the fields.
9534            self.0.encode(encoder, offset + 0, depth)?;
9535            Ok(())
9536        }
9537    }
9538
9539    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9540        for BaseSocketGetReceiveBufferResponse
9541    {
9542        #[inline(always)]
9543        fn new_empty() -> Self {
9544            Self { value_bytes: fidl::new_empty!(u64, D) }
9545        }
9546
9547        #[inline]
9548        unsafe fn decode(
9549            &mut self,
9550            decoder: &mut fidl::encoding::Decoder<'_, D>,
9551            offset: usize,
9552            _depth: fidl::encoding::Depth,
9553        ) -> fidl::Result<()> {
9554            decoder.debug_check_bounds::<Self>(offset);
9555            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9556            // Verify that padding bytes are zero.
9557            // Copy from the buffer into the object.
9558            unsafe {
9559                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9560            }
9561            Ok(())
9562        }
9563    }
9564
9565    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReuseAddressResponse {
9566        type Borrowed<'a> = &'a Self;
9567        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9568            value
9569        }
9570    }
9571
9572    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReuseAddressResponse {
9573        type Owned = Self;
9574
9575        #[inline(always)]
9576        fn inline_align(_context: fidl::encoding::Context) -> usize {
9577            1
9578        }
9579
9580        #[inline(always)]
9581        fn inline_size(_context: fidl::encoding::Context) -> usize {
9582            1
9583        }
9584    }
9585
9586    unsafe impl<D: fidl::encoding::ResourceDialect>
9587        fidl::encoding::Encode<BaseSocketGetReuseAddressResponse, D>
9588        for &BaseSocketGetReuseAddressResponse
9589    {
9590        #[inline]
9591        unsafe fn encode(
9592            self,
9593            encoder: &mut fidl::encoding::Encoder<'_, D>,
9594            offset: usize,
9595            _depth: fidl::encoding::Depth,
9596        ) -> fidl::Result<()> {
9597            encoder.debug_check_bounds::<BaseSocketGetReuseAddressResponse>(offset);
9598            // Delegate to tuple encoding.
9599            fidl::encoding::Encode::<BaseSocketGetReuseAddressResponse, D>::encode(
9600                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9601                encoder,
9602                offset,
9603                _depth,
9604            )
9605        }
9606    }
9607    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9608        fidl::encoding::Encode<BaseSocketGetReuseAddressResponse, D> for (T0,)
9609    {
9610        #[inline]
9611        unsafe fn encode(
9612            self,
9613            encoder: &mut fidl::encoding::Encoder<'_, D>,
9614            offset: usize,
9615            depth: fidl::encoding::Depth,
9616        ) -> fidl::Result<()> {
9617            encoder.debug_check_bounds::<BaseSocketGetReuseAddressResponse>(offset);
9618            // Zero out padding regions. There's no need to apply masks
9619            // because the unmasked parts will be overwritten by fields.
9620            // Write the fields.
9621            self.0.encode(encoder, offset + 0, depth)?;
9622            Ok(())
9623        }
9624    }
9625
9626    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9627        for BaseSocketGetReuseAddressResponse
9628    {
9629        #[inline(always)]
9630        fn new_empty() -> Self {
9631            Self { value: fidl::new_empty!(bool, D) }
9632        }
9633
9634        #[inline]
9635        unsafe fn decode(
9636            &mut self,
9637            decoder: &mut fidl::encoding::Decoder<'_, D>,
9638            offset: usize,
9639            _depth: fidl::encoding::Depth,
9640        ) -> fidl::Result<()> {
9641            decoder.debug_check_bounds::<Self>(offset);
9642            // Verify that padding bytes are zero.
9643            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9644            Ok(())
9645        }
9646    }
9647
9648    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReusePortResponse {
9649        type Borrowed<'a> = &'a Self;
9650        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9651            value
9652        }
9653    }
9654
9655    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReusePortResponse {
9656        type Owned = Self;
9657
9658        #[inline(always)]
9659        fn inline_align(_context: fidl::encoding::Context) -> usize {
9660            1
9661        }
9662
9663        #[inline(always)]
9664        fn inline_size(_context: fidl::encoding::Context) -> usize {
9665            1
9666        }
9667    }
9668
9669    unsafe impl<D: fidl::encoding::ResourceDialect>
9670        fidl::encoding::Encode<BaseSocketGetReusePortResponse, D>
9671        for &BaseSocketGetReusePortResponse
9672    {
9673        #[inline]
9674        unsafe fn encode(
9675            self,
9676            encoder: &mut fidl::encoding::Encoder<'_, D>,
9677            offset: usize,
9678            _depth: fidl::encoding::Depth,
9679        ) -> fidl::Result<()> {
9680            encoder.debug_check_bounds::<BaseSocketGetReusePortResponse>(offset);
9681            // Delegate to tuple encoding.
9682            fidl::encoding::Encode::<BaseSocketGetReusePortResponse, D>::encode(
9683                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9684                encoder,
9685                offset,
9686                _depth,
9687            )
9688        }
9689    }
9690    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9691        fidl::encoding::Encode<BaseSocketGetReusePortResponse, D> for (T0,)
9692    {
9693        #[inline]
9694        unsafe fn encode(
9695            self,
9696            encoder: &mut fidl::encoding::Encoder<'_, D>,
9697            offset: usize,
9698            depth: fidl::encoding::Depth,
9699        ) -> fidl::Result<()> {
9700            encoder.debug_check_bounds::<BaseSocketGetReusePortResponse>(offset);
9701            // Zero out padding regions. There's no need to apply masks
9702            // because the unmasked parts will be overwritten by fields.
9703            // Write the fields.
9704            self.0.encode(encoder, offset + 0, depth)?;
9705            Ok(())
9706        }
9707    }
9708
9709    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9710        for BaseSocketGetReusePortResponse
9711    {
9712        #[inline(always)]
9713        fn new_empty() -> Self {
9714            Self { value: fidl::new_empty!(bool, D) }
9715        }
9716
9717        #[inline]
9718        unsafe fn decode(
9719            &mut self,
9720            decoder: &mut fidl::encoding::Decoder<'_, D>,
9721            offset: usize,
9722            _depth: fidl::encoding::Depth,
9723        ) -> fidl::Result<()> {
9724            decoder.debug_check_bounds::<Self>(offset);
9725            // Verify that padding bytes are zero.
9726            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9727            Ok(())
9728        }
9729    }
9730
9731    impl fidl::encoding::ValueTypeMarker for BaseSocketGetSendBufferResponse {
9732        type Borrowed<'a> = &'a Self;
9733        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9734            value
9735        }
9736    }
9737
9738    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetSendBufferResponse {
9739        type Owned = Self;
9740
9741        #[inline(always)]
9742        fn inline_align(_context: fidl::encoding::Context) -> usize {
9743            8
9744        }
9745
9746        #[inline(always)]
9747        fn inline_size(_context: fidl::encoding::Context) -> usize {
9748            8
9749        }
9750        #[inline(always)]
9751        fn encode_is_copy() -> bool {
9752            true
9753        }
9754
9755        #[inline(always)]
9756        fn decode_is_copy() -> bool {
9757            true
9758        }
9759    }
9760
9761    unsafe impl<D: fidl::encoding::ResourceDialect>
9762        fidl::encoding::Encode<BaseSocketGetSendBufferResponse, D>
9763        for &BaseSocketGetSendBufferResponse
9764    {
9765        #[inline]
9766        unsafe fn encode(
9767            self,
9768            encoder: &mut fidl::encoding::Encoder<'_, D>,
9769            offset: usize,
9770            _depth: fidl::encoding::Depth,
9771        ) -> fidl::Result<()> {
9772            encoder.debug_check_bounds::<BaseSocketGetSendBufferResponse>(offset);
9773            unsafe {
9774                // Copy the object into the buffer.
9775                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9776                (buf_ptr as *mut BaseSocketGetSendBufferResponse)
9777                    .write_unaligned((self as *const BaseSocketGetSendBufferResponse).read());
9778                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9779                // done second because the memcpy will write garbage to these bytes.
9780            }
9781            Ok(())
9782        }
9783    }
9784    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9785        fidl::encoding::Encode<BaseSocketGetSendBufferResponse, D> for (T0,)
9786    {
9787        #[inline]
9788        unsafe fn encode(
9789            self,
9790            encoder: &mut fidl::encoding::Encoder<'_, D>,
9791            offset: usize,
9792            depth: fidl::encoding::Depth,
9793        ) -> fidl::Result<()> {
9794            encoder.debug_check_bounds::<BaseSocketGetSendBufferResponse>(offset);
9795            // Zero out padding regions. There's no need to apply masks
9796            // because the unmasked parts will be overwritten by fields.
9797            // Write the fields.
9798            self.0.encode(encoder, offset + 0, depth)?;
9799            Ok(())
9800        }
9801    }
9802
9803    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9804        for BaseSocketGetSendBufferResponse
9805    {
9806        #[inline(always)]
9807        fn new_empty() -> Self {
9808            Self { value_bytes: fidl::new_empty!(u64, D) }
9809        }
9810
9811        #[inline]
9812        unsafe fn decode(
9813            &mut self,
9814            decoder: &mut fidl::encoding::Decoder<'_, D>,
9815            offset: usize,
9816            _depth: fidl::encoding::Depth,
9817        ) -> fidl::Result<()> {
9818            decoder.debug_check_bounds::<Self>(offset);
9819            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9820            // Verify that padding bytes are zero.
9821            // Copy from the buffer into the object.
9822            unsafe {
9823                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9824            }
9825            Ok(())
9826        }
9827    }
9828
9829    impl fidl::encoding::ValueTypeMarker for BaseSocketGetTimestampResponse {
9830        type Borrowed<'a> = &'a Self;
9831        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9832            value
9833        }
9834    }
9835
9836    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetTimestampResponse {
9837        type Owned = Self;
9838
9839        #[inline(always)]
9840        fn inline_align(_context: fidl::encoding::Context) -> usize {
9841            4
9842        }
9843
9844        #[inline(always)]
9845        fn inline_size(_context: fidl::encoding::Context) -> usize {
9846            4
9847        }
9848    }
9849
9850    unsafe impl<D: fidl::encoding::ResourceDialect>
9851        fidl::encoding::Encode<BaseSocketGetTimestampResponse, D>
9852        for &BaseSocketGetTimestampResponse
9853    {
9854        #[inline]
9855        unsafe fn encode(
9856            self,
9857            encoder: &mut fidl::encoding::Encoder<'_, D>,
9858            offset: usize,
9859            _depth: fidl::encoding::Depth,
9860        ) -> fidl::Result<()> {
9861            encoder.debug_check_bounds::<BaseSocketGetTimestampResponse>(offset);
9862            // Delegate to tuple encoding.
9863            fidl::encoding::Encode::<BaseSocketGetTimestampResponse, D>::encode(
9864                (<TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9865                encoder,
9866                offset,
9867                _depth,
9868            )
9869        }
9870    }
9871    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TimestampOption, D>>
9872        fidl::encoding::Encode<BaseSocketGetTimestampResponse, D> for (T0,)
9873    {
9874        #[inline]
9875        unsafe fn encode(
9876            self,
9877            encoder: &mut fidl::encoding::Encoder<'_, D>,
9878            offset: usize,
9879            depth: fidl::encoding::Depth,
9880        ) -> fidl::Result<()> {
9881            encoder.debug_check_bounds::<BaseSocketGetTimestampResponse>(offset);
9882            // Zero out padding regions. There's no need to apply masks
9883            // because the unmasked parts will be overwritten by fields.
9884            // Write the fields.
9885            self.0.encode(encoder, offset + 0, depth)?;
9886            Ok(())
9887        }
9888    }
9889
9890    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9891        for BaseSocketGetTimestampResponse
9892    {
9893        #[inline(always)]
9894        fn new_empty() -> Self {
9895            Self { value: fidl::new_empty!(TimestampOption, D) }
9896        }
9897
9898        #[inline]
9899        unsafe fn decode(
9900            &mut self,
9901            decoder: &mut fidl::encoding::Decoder<'_, D>,
9902            offset: usize,
9903            _depth: fidl::encoding::Depth,
9904        ) -> fidl::Result<()> {
9905            decoder.debug_check_bounds::<Self>(offset);
9906            // Verify that padding bytes are zero.
9907            fidl::decode!(TimestampOption, D, &mut self.value, decoder, offset + 0, _depth)?;
9908            Ok(())
9909        }
9910    }
9911
9912    impl fidl::encoding::ValueTypeMarker for Empty {
9913        type Borrowed<'a> = &'a Self;
9914        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9915            value
9916        }
9917    }
9918
9919    unsafe impl fidl::encoding::TypeMarker for Empty {
9920        type Owned = Self;
9921
9922        #[inline(always)]
9923        fn inline_align(_context: fidl::encoding::Context) -> usize {
9924            1
9925        }
9926
9927        #[inline(always)]
9928        fn inline_size(_context: fidl::encoding::Context) -> usize {
9929            1
9930        }
9931    }
9932
9933    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
9934        #[inline]
9935        unsafe fn encode(
9936            self,
9937            encoder: &mut fidl::encoding::Encoder<'_, D>,
9938            offset: usize,
9939            _depth: fidl::encoding::Depth,
9940        ) -> fidl::Result<()> {
9941            encoder.debug_check_bounds::<Empty>(offset);
9942            encoder.write_num(0u8, offset);
9943            Ok(())
9944        }
9945    }
9946
9947    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
9948        #[inline(always)]
9949        fn new_empty() -> Self {
9950            Self
9951        }
9952
9953        #[inline]
9954        unsafe fn decode(
9955            &mut self,
9956            decoder: &mut fidl::encoding::Decoder<'_, D>,
9957            offset: usize,
9958            _depth: fidl::encoding::Depth,
9959        ) -> fidl::Result<()> {
9960            decoder.debug_check_bounds::<Self>(offset);
9961            match decoder.read_num::<u8>(offset) {
9962                0 => Ok(()),
9963                _ => Err(fidl::Error::Invalid),
9964            }
9965        }
9966    }
9967
9968    impl fidl::encoding::ValueTypeMarker for IpMulticastMembership {
9969        type Borrowed<'a> = &'a Self;
9970        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9971            value
9972        }
9973    }
9974
9975    unsafe impl fidl::encoding::TypeMarker for IpMulticastMembership {
9976        type Owned = Self;
9977
9978        #[inline(always)]
9979        fn inline_align(_context: fidl::encoding::Context) -> usize {
9980            8
9981        }
9982
9983        #[inline(always)]
9984        fn inline_size(_context: fidl::encoding::Context) -> usize {
9985            16
9986        }
9987    }
9988
9989    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpMulticastMembership, D>
9990        for &IpMulticastMembership
9991    {
9992        #[inline]
9993        unsafe fn encode(
9994            self,
9995            encoder: &mut fidl::encoding::Encoder<'_, D>,
9996            offset: usize,
9997            _depth: fidl::encoding::Depth,
9998        ) -> fidl::Result<()> {
9999            encoder.debug_check_bounds::<IpMulticastMembership>(offset);
10000            // Delegate to tuple encoding.
10001            fidl::encoding::Encode::<IpMulticastMembership, D>::encode(
10002                (
10003                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10004                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.local_addr),
10005                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.mcast_addr),
10006                ),
10007                encoder, offset, _depth
10008            )
10009        }
10010    }
10011    unsafe impl<
10012        D: fidl::encoding::ResourceDialect,
10013        T0: fidl::encoding::Encode<u64, D>,
10014        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
10015        T2: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
10016    > fidl::encoding::Encode<IpMulticastMembership, D> for (T0, T1, T2)
10017    {
10018        #[inline]
10019        unsafe fn encode(
10020            self,
10021            encoder: &mut fidl::encoding::Encoder<'_, D>,
10022            offset: usize,
10023            depth: fidl::encoding::Depth,
10024        ) -> fidl::Result<()> {
10025            encoder.debug_check_bounds::<IpMulticastMembership>(offset);
10026            // Zero out padding regions. There's no need to apply masks
10027            // because the unmasked parts will be overwritten by fields.
10028            // Write the fields.
10029            self.0.encode(encoder, offset + 0, depth)?;
10030            self.1.encode(encoder, offset + 8, depth)?;
10031            self.2.encode(encoder, offset + 12, depth)?;
10032            Ok(())
10033        }
10034    }
10035
10036    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpMulticastMembership {
10037        #[inline(always)]
10038        fn new_empty() -> Self {
10039            Self {
10040                iface: fidl::new_empty!(u64, D),
10041                local_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
10042                mcast_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
10043            }
10044        }
10045
10046        #[inline]
10047        unsafe fn decode(
10048            &mut self,
10049            decoder: &mut fidl::encoding::Decoder<'_, D>,
10050            offset: usize,
10051            _depth: fidl::encoding::Depth,
10052        ) -> fidl::Result<()> {
10053            decoder.debug_check_bounds::<Self>(offset);
10054            // Verify that padding bytes are zero.
10055            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10056            fidl::decode!(
10057                fidl_fuchsia_net__common::Ipv4Address,
10058                D,
10059                &mut self.local_addr,
10060                decoder,
10061                offset + 8,
10062                _depth
10063            )?;
10064            fidl::decode!(
10065                fidl_fuchsia_net__common::Ipv4Address,
10066                D,
10067                &mut self.mcast_addr,
10068                decoder,
10069                offset + 12,
10070                _depth
10071            )?;
10072            Ok(())
10073        }
10074    }
10075
10076    impl fidl::encoding::ValueTypeMarker for Ipv6MulticastMembership {
10077        type Borrowed<'a> = &'a Self;
10078        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10079            value
10080        }
10081    }
10082
10083    unsafe impl fidl::encoding::TypeMarker for Ipv6MulticastMembership {
10084        type Owned = Self;
10085
10086        #[inline(always)]
10087        fn inline_align(_context: fidl::encoding::Context) -> usize {
10088            8
10089        }
10090
10091        #[inline(always)]
10092        fn inline_size(_context: fidl::encoding::Context) -> usize {
10093            24
10094        }
10095    }
10096
10097    unsafe impl<D: fidl::encoding::ResourceDialect>
10098        fidl::encoding::Encode<Ipv6MulticastMembership, D> for &Ipv6MulticastMembership
10099    {
10100        #[inline]
10101        unsafe fn encode(
10102            self,
10103            encoder: &mut fidl::encoding::Encoder<'_, D>,
10104            offset: usize,
10105            _depth: fidl::encoding::Depth,
10106        ) -> fidl::Result<()> {
10107            encoder.debug_check_bounds::<Ipv6MulticastMembership>(offset);
10108            // Delegate to tuple encoding.
10109            fidl::encoding::Encode::<Ipv6MulticastMembership, D>::encode(
10110                (
10111                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10112                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.mcast_addr),
10113                ),
10114                encoder, offset, _depth
10115            )
10116        }
10117    }
10118    unsafe impl<
10119        D: fidl::encoding::ResourceDialect,
10120        T0: fidl::encoding::Encode<u64, D>,
10121        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10122    > fidl::encoding::Encode<Ipv6MulticastMembership, D> for (T0, T1)
10123    {
10124        #[inline]
10125        unsafe fn encode(
10126            self,
10127            encoder: &mut fidl::encoding::Encoder<'_, D>,
10128            offset: usize,
10129            depth: fidl::encoding::Depth,
10130        ) -> fidl::Result<()> {
10131            encoder.debug_check_bounds::<Ipv6MulticastMembership>(offset);
10132            // Zero out padding regions. There's no need to apply masks
10133            // because the unmasked parts will be overwritten by fields.
10134            // Write the fields.
10135            self.0.encode(encoder, offset + 0, depth)?;
10136            self.1.encode(encoder, offset + 8, depth)?;
10137            Ok(())
10138        }
10139    }
10140
10141    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10142        for Ipv6MulticastMembership
10143    {
10144        #[inline(always)]
10145        fn new_empty() -> Self {
10146            Self {
10147                iface: fidl::new_empty!(u64, D),
10148                mcast_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10149            }
10150        }
10151
10152        #[inline]
10153        unsafe fn decode(
10154            &mut self,
10155            decoder: &mut fidl::encoding::Decoder<'_, D>,
10156            offset: usize,
10157            _depth: fidl::encoding::Depth,
10158        ) -> fidl::Result<()> {
10159            decoder.debug_check_bounds::<Self>(offset);
10160            // Verify that padding bytes are zero.
10161            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10162            fidl::decode!(
10163                fidl_fuchsia_net__common::Ipv6Address,
10164                D,
10165                &mut self.mcast_addr,
10166                decoder,
10167                offset + 8,
10168                _depth
10169            )?;
10170            Ok(())
10171        }
10172    }
10173
10174    impl fidl::encoding::ValueTypeMarker for Ipv6PktInfoRecvControlData {
10175        type Borrowed<'a> = &'a Self;
10176        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10177            value
10178        }
10179    }
10180
10181    unsafe impl fidl::encoding::TypeMarker for Ipv6PktInfoRecvControlData {
10182        type Owned = Self;
10183
10184        #[inline(always)]
10185        fn inline_align(_context: fidl::encoding::Context) -> usize {
10186            8
10187        }
10188
10189        #[inline(always)]
10190        fn inline_size(_context: fidl::encoding::Context) -> usize {
10191            24
10192        }
10193    }
10194
10195    unsafe impl<D: fidl::encoding::ResourceDialect>
10196        fidl::encoding::Encode<Ipv6PktInfoRecvControlData, D> for &Ipv6PktInfoRecvControlData
10197    {
10198        #[inline]
10199        unsafe fn encode(
10200            self,
10201            encoder: &mut fidl::encoding::Encoder<'_, D>,
10202            offset: usize,
10203            _depth: fidl::encoding::Depth,
10204        ) -> fidl::Result<()> {
10205            encoder.debug_check_bounds::<Ipv6PktInfoRecvControlData>(offset);
10206            // Delegate to tuple encoding.
10207            fidl::encoding::Encode::<Ipv6PktInfoRecvControlData, D>::encode(
10208                (
10209                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10210                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.header_destination_addr),
10211                ),
10212                encoder, offset, _depth
10213            )
10214        }
10215    }
10216    unsafe impl<
10217        D: fidl::encoding::ResourceDialect,
10218        T0: fidl::encoding::Encode<u64, D>,
10219        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10220    > fidl::encoding::Encode<Ipv6PktInfoRecvControlData, D> for (T0, T1)
10221    {
10222        #[inline]
10223        unsafe fn encode(
10224            self,
10225            encoder: &mut fidl::encoding::Encoder<'_, D>,
10226            offset: usize,
10227            depth: fidl::encoding::Depth,
10228        ) -> fidl::Result<()> {
10229            encoder.debug_check_bounds::<Ipv6PktInfoRecvControlData>(offset);
10230            // Zero out padding regions. There's no need to apply masks
10231            // because the unmasked parts will be overwritten by fields.
10232            // Write the fields.
10233            self.0.encode(encoder, offset + 0, depth)?;
10234            self.1.encode(encoder, offset + 8, depth)?;
10235            Ok(())
10236        }
10237    }
10238
10239    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10240        for Ipv6PktInfoRecvControlData
10241    {
10242        #[inline(always)]
10243        fn new_empty() -> Self {
10244            Self {
10245                iface: fidl::new_empty!(u64, D),
10246                header_destination_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10247            }
10248        }
10249
10250        #[inline]
10251        unsafe fn decode(
10252            &mut self,
10253            decoder: &mut fidl::encoding::Decoder<'_, D>,
10254            offset: usize,
10255            _depth: fidl::encoding::Depth,
10256        ) -> fidl::Result<()> {
10257            decoder.debug_check_bounds::<Self>(offset);
10258            // Verify that padding bytes are zero.
10259            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10260            fidl::decode!(
10261                fidl_fuchsia_net__common::Ipv6Address,
10262                D,
10263                &mut self.header_destination_addr,
10264                decoder,
10265                offset + 8,
10266                _depth
10267            )?;
10268            Ok(())
10269        }
10270    }
10271
10272    impl fidl::encoding::ValueTypeMarker for Ipv6PktInfoSendControlData {
10273        type Borrowed<'a> = &'a Self;
10274        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10275            value
10276        }
10277    }
10278
10279    unsafe impl fidl::encoding::TypeMarker for Ipv6PktInfoSendControlData {
10280        type Owned = Self;
10281
10282        #[inline(always)]
10283        fn inline_align(_context: fidl::encoding::Context) -> usize {
10284            8
10285        }
10286
10287        #[inline(always)]
10288        fn inline_size(_context: fidl::encoding::Context) -> usize {
10289            24
10290        }
10291    }
10292
10293    unsafe impl<D: fidl::encoding::ResourceDialect>
10294        fidl::encoding::Encode<Ipv6PktInfoSendControlData, D> for &Ipv6PktInfoSendControlData
10295    {
10296        #[inline]
10297        unsafe fn encode(
10298            self,
10299            encoder: &mut fidl::encoding::Encoder<'_, D>,
10300            offset: usize,
10301            _depth: fidl::encoding::Depth,
10302        ) -> fidl::Result<()> {
10303            encoder.debug_check_bounds::<Ipv6PktInfoSendControlData>(offset);
10304            // Delegate to tuple encoding.
10305            fidl::encoding::Encode::<Ipv6PktInfoSendControlData, D>::encode(
10306                (
10307                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10308                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.local_addr),
10309                ),
10310                encoder, offset, _depth
10311            )
10312        }
10313    }
10314    unsafe impl<
10315        D: fidl::encoding::ResourceDialect,
10316        T0: fidl::encoding::Encode<u64, D>,
10317        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10318    > fidl::encoding::Encode<Ipv6PktInfoSendControlData, D> for (T0, T1)
10319    {
10320        #[inline]
10321        unsafe fn encode(
10322            self,
10323            encoder: &mut fidl::encoding::Encoder<'_, D>,
10324            offset: usize,
10325            depth: fidl::encoding::Depth,
10326        ) -> fidl::Result<()> {
10327            encoder.debug_check_bounds::<Ipv6PktInfoSendControlData>(offset);
10328            // Zero out padding regions. There's no need to apply masks
10329            // because the unmasked parts will be overwritten by fields.
10330            // Write the fields.
10331            self.0.encode(encoder, offset + 0, depth)?;
10332            self.1.encode(encoder, offset + 8, depth)?;
10333            Ok(())
10334        }
10335    }
10336
10337    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10338        for Ipv6PktInfoSendControlData
10339    {
10340        #[inline(always)]
10341        fn new_empty() -> Self {
10342            Self {
10343                iface: fidl::new_empty!(u64, D),
10344                local_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10345            }
10346        }
10347
10348        #[inline]
10349        unsafe fn decode(
10350            &mut self,
10351            decoder: &mut fidl::encoding::Decoder<'_, D>,
10352            offset: usize,
10353            _depth: fidl::encoding::Depth,
10354        ) -> fidl::Result<()> {
10355            decoder.debug_check_bounds::<Self>(offset);
10356            // Verify that padding bytes are zero.
10357            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10358            fidl::decode!(
10359                fidl_fuchsia_net__common::Ipv6Address,
10360                D,
10361                &mut self.local_addr,
10362                decoder,
10363                offset + 8,
10364                _depth
10365            )?;
10366            Ok(())
10367        }
10368    }
10369
10370    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketDeprecatedRequest {
10371        type Borrowed<'a> = &'a Self;
10372        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10373            value
10374        }
10375    }
10376
10377    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketDeprecatedRequest {
10378        type Owned = Self;
10379
10380        #[inline(always)]
10381        fn inline_align(_context: fidl::encoding::Context) -> usize {
10382            4
10383        }
10384
10385        #[inline(always)]
10386        fn inline_size(_context: fidl::encoding::Context) -> usize {
10387            8
10388        }
10389    }
10390
10391    unsafe impl<D: fidl::encoding::ResourceDialect>
10392        fidl::encoding::Encode<ProviderDatagramSocketDeprecatedRequest, D>
10393        for &ProviderDatagramSocketDeprecatedRequest
10394    {
10395        #[inline]
10396        unsafe fn encode(
10397            self,
10398            encoder: &mut fidl::encoding::Encoder<'_, D>,
10399            offset: usize,
10400            _depth: fidl::encoding::Depth,
10401        ) -> fidl::Result<()> {
10402            encoder.debug_check_bounds::<ProviderDatagramSocketDeprecatedRequest>(offset);
10403            // Delegate to tuple encoding.
10404            fidl::encoding::Encode::<ProviderDatagramSocketDeprecatedRequest, D>::encode(
10405                (
10406                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10407                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10408                        &self.proto,
10409                    ),
10410                ),
10411                encoder,
10412                offset,
10413                _depth,
10414            )
10415        }
10416    }
10417    unsafe impl<
10418        D: fidl::encoding::ResourceDialect,
10419        T0: fidl::encoding::Encode<Domain, D>,
10420        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10421    > fidl::encoding::Encode<ProviderDatagramSocketDeprecatedRequest, D> for (T0, T1)
10422    {
10423        #[inline]
10424        unsafe fn encode(
10425            self,
10426            encoder: &mut fidl::encoding::Encoder<'_, D>,
10427            offset: usize,
10428            depth: fidl::encoding::Depth,
10429        ) -> fidl::Result<()> {
10430            encoder.debug_check_bounds::<ProviderDatagramSocketDeprecatedRequest>(offset);
10431            // Zero out padding regions. There's no need to apply masks
10432            // because the unmasked parts will be overwritten by fields.
10433            unsafe {
10434                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10435                (ptr as *mut u32).write_unaligned(0);
10436            }
10437            // Write the fields.
10438            self.0.encode(encoder, offset + 0, depth)?;
10439            self.1.encode(encoder, offset + 4, depth)?;
10440            Ok(())
10441        }
10442    }
10443
10444    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10445        for ProviderDatagramSocketDeprecatedRequest
10446    {
10447        #[inline(always)]
10448        fn new_empty() -> Self {
10449            Self {
10450                domain: fidl::new_empty!(Domain, D),
10451                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10452            }
10453        }
10454
10455        #[inline]
10456        unsafe fn decode(
10457            &mut self,
10458            decoder: &mut fidl::encoding::Decoder<'_, D>,
10459            offset: usize,
10460            _depth: fidl::encoding::Depth,
10461        ) -> fidl::Result<()> {
10462            decoder.debug_check_bounds::<Self>(offset);
10463            // Verify that padding bytes are zero.
10464            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10465            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10466            let mask = 0xffff0000u32;
10467            let maskedval = padval & mask;
10468            if maskedval != 0 {
10469                return Err(fidl::Error::NonZeroPadding {
10470                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10471                });
10472            }
10473            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10474            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10475            Ok(())
10476        }
10477    }
10478
10479    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketRequest {
10480        type Borrowed<'a> = &'a Self;
10481        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10482            value
10483        }
10484    }
10485
10486    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketRequest {
10487        type Owned = Self;
10488
10489        #[inline(always)]
10490        fn inline_align(_context: fidl::encoding::Context) -> usize {
10491            4
10492        }
10493
10494        #[inline(always)]
10495        fn inline_size(_context: fidl::encoding::Context) -> usize {
10496            8
10497        }
10498    }
10499
10500    unsafe impl<D: fidl::encoding::ResourceDialect>
10501        fidl::encoding::Encode<ProviderDatagramSocketRequest, D>
10502        for &ProviderDatagramSocketRequest
10503    {
10504        #[inline]
10505        unsafe fn encode(
10506            self,
10507            encoder: &mut fidl::encoding::Encoder<'_, D>,
10508            offset: usize,
10509            _depth: fidl::encoding::Depth,
10510        ) -> fidl::Result<()> {
10511            encoder.debug_check_bounds::<ProviderDatagramSocketRequest>(offset);
10512            // Delegate to tuple encoding.
10513            fidl::encoding::Encode::<ProviderDatagramSocketRequest, D>::encode(
10514                (
10515                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10516                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10517                        &self.proto,
10518                    ),
10519                ),
10520                encoder,
10521                offset,
10522                _depth,
10523            )
10524        }
10525    }
10526    unsafe impl<
10527        D: fidl::encoding::ResourceDialect,
10528        T0: fidl::encoding::Encode<Domain, D>,
10529        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10530    > fidl::encoding::Encode<ProviderDatagramSocketRequest, D> for (T0, T1)
10531    {
10532        #[inline]
10533        unsafe fn encode(
10534            self,
10535            encoder: &mut fidl::encoding::Encoder<'_, D>,
10536            offset: usize,
10537            depth: fidl::encoding::Depth,
10538        ) -> fidl::Result<()> {
10539            encoder.debug_check_bounds::<ProviderDatagramSocketRequest>(offset);
10540            // Zero out padding regions. There's no need to apply masks
10541            // because the unmasked parts will be overwritten by fields.
10542            unsafe {
10543                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10544                (ptr as *mut u32).write_unaligned(0);
10545            }
10546            // Write the fields.
10547            self.0.encode(encoder, offset + 0, depth)?;
10548            self.1.encode(encoder, offset + 4, depth)?;
10549            Ok(())
10550        }
10551    }
10552
10553    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10554        for ProviderDatagramSocketRequest
10555    {
10556        #[inline(always)]
10557        fn new_empty() -> Self {
10558            Self {
10559                domain: fidl::new_empty!(Domain, D),
10560                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10561            }
10562        }
10563
10564        #[inline]
10565        unsafe fn decode(
10566            &mut self,
10567            decoder: &mut fidl::encoding::Decoder<'_, D>,
10568            offset: usize,
10569            _depth: fidl::encoding::Depth,
10570        ) -> fidl::Result<()> {
10571            decoder.debug_check_bounds::<Self>(offset);
10572            // Verify that padding bytes are zero.
10573            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10574            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10575            let mask = 0xffff0000u32;
10576            let maskedval = padval & mask;
10577            if maskedval != 0 {
10578                return Err(fidl::Error::NonZeroPadding {
10579                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10580                });
10581            }
10582            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10583            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10584            Ok(())
10585        }
10586    }
10587
10588    impl fidl::encoding::ValueTypeMarker for ProviderGetInterfaceAddressesResponse {
10589        type Borrowed<'a> = &'a Self;
10590        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10591            value
10592        }
10593    }
10594
10595    unsafe impl fidl::encoding::TypeMarker for ProviderGetInterfaceAddressesResponse {
10596        type Owned = Self;
10597
10598        #[inline(always)]
10599        fn inline_align(_context: fidl::encoding::Context) -> usize {
10600            8
10601        }
10602
10603        #[inline(always)]
10604        fn inline_size(_context: fidl::encoding::Context) -> usize {
10605            16
10606        }
10607    }
10608
10609    unsafe impl<D: fidl::encoding::ResourceDialect>
10610        fidl::encoding::Encode<ProviderGetInterfaceAddressesResponse, D>
10611        for &ProviderGetInterfaceAddressesResponse
10612    {
10613        #[inline]
10614        unsafe fn encode(
10615            self,
10616            encoder: &mut fidl::encoding::Encoder<'_, D>,
10617            offset: usize,
10618            _depth: fidl::encoding::Depth,
10619        ) -> fidl::Result<()> {
10620            encoder.debug_check_bounds::<ProviderGetInterfaceAddressesResponse>(offset);
10621            // Delegate to tuple encoding.
10622            fidl::encoding::Encode::<ProviderGetInterfaceAddressesResponse, D>::encode(
10623                (
10624                    <fidl::encoding::UnboundedVector<InterfaceAddresses> as fidl::encoding::ValueTypeMarker>::borrow(&self.interfaces),
10625                ),
10626                encoder, offset, _depth
10627            )
10628        }
10629    }
10630    unsafe impl<
10631        D: fidl::encoding::ResourceDialect,
10632        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<InterfaceAddresses>, D>,
10633    > fidl::encoding::Encode<ProviderGetInterfaceAddressesResponse, D> for (T0,)
10634    {
10635        #[inline]
10636        unsafe fn encode(
10637            self,
10638            encoder: &mut fidl::encoding::Encoder<'_, D>,
10639            offset: usize,
10640            depth: fidl::encoding::Depth,
10641        ) -> fidl::Result<()> {
10642            encoder.debug_check_bounds::<ProviderGetInterfaceAddressesResponse>(offset);
10643            // Zero out padding regions. There's no need to apply masks
10644            // because the unmasked parts will be overwritten by fields.
10645            // Write the fields.
10646            self.0.encode(encoder, offset + 0, depth)?;
10647            Ok(())
10648        }
10649    }
10650
10651    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10652        for ProviderGetInterfaceAddressesResponse
10653    {
10654        #[inline(always)]
10655        fn new_empty() -> Self {
10656            Self {
10657                interfaces: fidl::new_empty!(
10658                    fidl::encoding::UnboundedVector<InterfaceAddresses>,
10659                    D
10660                ),
10661            }
10662        }
10663
10664        #[inline]
10665        unsafe fn decode(
10666            &mut self,
10667            decoder: &mut fidl::encoding::Decoder<'_, D>,
10668            offset: usize,
10669            _depth: fidl::encoding::Depth,
10670        ) -> fidl::Result<()> {
10671            decoder.debug_check_bounds::<Self>(offset);
10672            // Verify that padding bytes are zero.
10673            fidl::decode!(
10674                fidl::encoding::UnboundedVector<InterfaceAddresses>,
10675                D,
10676                &mut self.interfaces,
10677                decoder,
10678                offset + 0,
10679                _depth
10680            )?;
10681            Ok(())
10682        }
10683    }
10684
10685    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceIndexToNameRequest {
10686        type Borrowed<'a> = &'a Self;
10687        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10688            value
10689        }
10690    }
10691
10692    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceIndexToNameRequest {
10693        type Owned = Self;
10694
10695        #[inline(always)]
10696        fn inline_align(_context: fidl::encoding::Context) -> usize {
10697            8
10698        }
10699
10700        #[inline(always)]
10701        fn inline_size(_context: fidl::encoding::Context) -> usize {
10702            8
10703        }
10704        #[inline(always)]
10705        fn encode_is_copy() -> bool {
10706            true
10707        }
10708
10709        #[inline(always)]
10710        fn decode_is_copy() -> bool {
10711            true
10712        }
10713    }
10714
10715    unsafe impl<D: fidl::encoding::ResourceDialect>
10716        fidl::encoding::Encode<ProviderInterfaceIndexToNameRequest, D>
10717        for &ProviderInterfaceIndexToNameRequest
10718    {
10719        #[inline]
10720        unsafe fn encode(
10721            self,
10722            encoder: &mut fidl::encoding::Encoder<'_, D>,
10723            offset: usize,
10724            _depth: fidl::encoding::Depth,
10725        ) -> fidl::Result<()> {
10726            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameRequest>(offset);
10727            unsafe {
10728                // Copy the object into the buffer.
10729                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10730                (buf_ptr as *mut ProviderInterfaceIndexToNameRequest)
10731                    .write_unaligned((self as *const ProviderInterfaceIndexToNameRequest).read());
10732                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10733                // done second because the memcpy will write garbage to these bytes.
10734            }
10735            Ok(())
10736        }
10737    }
10738    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
10739        fidl::encoding::Encode<ProviderInterfaceIndexToNameRequest, D> for (T0,)
10740    {
10741        #[inline]
10742        unsafe fn encode(
10743            self,
10744            encoder: &mut fidl::encoding::Encoder<'_, D>,
10745            offset: usize,
10746            depth: fidl::encoding::Depth,
10747        ) -> fidl::Result<()> {
10748            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameRequest>(offset);
10749            // Zero out padding regions. There's no need to apply masks
10750            // because the unmasked parts will be overwritten by fields.
10751            // Write the fields.
10752            self.0.encode(encoder, offset + 0, depth)?;
10753            Ok(())
10754        }
10755    }
10756
10757    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10758        for ProviderInterfaceIndexToNameRequest
10759    {
10760        #[inline(always)]
10761        fn new_empty() -> Self {
10762            Self { index: fidl::new_empty!(u64, D) }
10763        }
10764
10765        #[inline]
10766        unsafe fn decode(
10767            &mut self,
10768            decoder: &mut fidl::encoding::Decoder<'_, D>,
10769            offset: usize,
10770            _depth: fidl::encoding::Depth,
10771        ) -> fidl::Result<()> {
10772            decoder.debug_check_bounds::<Self>(offset);
10773            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10774            // Verify that padding bytes are zero.
10775            // Copy from the buffer into the object.
10776            unsafe {
10777                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
10778            }
10779            Ok(())
10780        }
10781    }
10782
10783    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToFlagsRequest {
10784        type Borrowed<'a> = &'a Self;
10785        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10786            value
10787        }
10788    }
10789
10790    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToFlagsRequest {
10791        type Owned = Self;
10792
10793        #[inline(always)]
10794        fn inline_align(_context: fidl::encoding::Context) -> usize {
10795            8
10796        }
10797
10798        #[inline(always)]
10799        fn inline_size(_context: fidl::encoding::Context) -> usize {
10800            16
10801        }
10802    }
10803
10804    unsafe impl<D: fidl::encoding::ResourceDialect>
10805        fidl::encoding::Encode<ProviderInterfaceNameToFlagsRequest, D>
10806        for &ProviderInterfaceNameToFlagsRequest
10807    {
10808        #[inline]
10809        unsafe fn encode(
10810            self,
10811            encoder: &mut fidl::encoding::Encoder<'_, D>,
10812            offset: usize,
10813            _depth: fidl::encoding::Depth,
10814        ) -> fidl::Result<()> {
10815            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsRequest>(offset);
10816            // Delegate to tuple encoding.
10817            fidl::encoding::Encode::<ProviderInterfaceNameToFlagsRequest, D>::encode(
10818                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
10819                    &self.name,
10820                ),),
10821                encoder,
10822                offset,
10823                _depth,
10824            )
10825        }
10826    }
10827    unsafe impl<
10828        D: fidl::encoding::ResourceDialect,
10829        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
10830    > fidl::encoding::Encode<ProviderInterfaceNameToFlagsRequest, D> for (T0,)
10831    {
10832        #[inline]
10833        unsafe fn encode(
10834            self,
10835            encoder: &mut fidl::encoding::Encoder<'_, D>,
10836            offset: usize,
10837            depth: fidl::encoding::Depth,
10838        ) -> fidl::Result<()> {
10839            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsRequest>(offset);
10840            // Zero out padding regions. There's no need to apply masks
10841            // because the unmasked parts will be overwritten by fields.
10842            // Write the fields.
10843            self.0.encode(encoder, offset + 0, depth)?;
10844            Ok(())
10845        }
10846    }
10847
10848    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10849        for ProviderInterfaceNameToFlagsRequest
10850    {
10851        #[inline(always)]
10852        fn new_empty() -> Self {
10853            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
10854        }
10855
10856        #[inline]
10857        unsafe fn decode(
10858            &mut self,
10859            decoder: &mut fidl::encoding::Decoder<'_, D>,
10860            offset: usize,
10861            _depth: fidl::encoding::Depth,
10862        ) -> fidl::Result<()> {
10863            decoder.debug_check_bounds::<Self>(offset);
10864            // Verify that padding bytes are zero.
10865            fidl::decode!(
10866                fidl::encoding::BoundedString<15>,
10867                D,
10868                &mut self.name,
10869                decoder,
10870                offset + 0,
10871                _depth
10872            )?;
10873            Ok(())
10874        }
10875    }
10876
10877    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToIndexRequest {
10878        type Borrowed<'a> = &'a Self;
10879        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10880            value
10881        }
10882    }
10883
10884    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToIndexRequest {
10885        type Owned = Self;
10886
10887        #[inline(always)]
10888        fn inline_align(_context: fidl::encoding::Context) -> usize {
10889            8
10890        }
10891
10892        #[inline(always)]
10893        fn inline_size(_context: fidl::encoding::Context) -> usize {
10894            16
10895        }
10896    }
10897
10898    unsafe impl<D: fidl::encoding::ResourceDialect>
10899        fidl::encoding::Encode<ProviderInterfaceNameToIndexRequest, D>
10900        for &ProviderInterfaceNameToIndexRequest
10901    {
10902        #[inline]
10903        unsafe fn encode(
10904            self,
10905            encoder: &mut fidl::encoding::Encoder<'_, D>,
10906            offset: usize,
10907            _depth: fidl::encoding::Depth,
10908        ) -> fidl::Result<()> {
10909            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexRequest>(offset);
10910            // Delegate to tuple encoding.
10911            fidl::encoding::Encode::<ProviderInterfaceNameToIndexRequest, D>::encode(
10912                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
10913                    &self.name,
10914                ),),
10915                encoder,
10916                offset,
10917                _depth,
10918            )
10919        }
10920    }
10921    unsafe impl<
10922        D: fidl::encoding::ResourceDialect,
10923        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
10924    > fidl::encoding::Encode<ProviderInterfaceNameToIndexRequest, D> for (T0,)
10925    {
10926        #[inline]
10927        unsafe fn encode(
10928            self,
10929            encoder: &mut fidl::encoding::Encoder<'_, D>,
10930            offset: usize,
10931            depth: fidl::encoding::Depth,
10932        ) -> fidl::Result<()> {
10933            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexRequest>(offset);
10934            // Zero out padding regions. There's no need to apply masks
10935            // because the unmasked parts will be overwritten by fields.
10936            // Write the fields.
10937            self.0.encode(encoder, offset + 0, depth)?;
10938            Ok(())
10939        }
10940    }
10941
10942    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10943        for ProviderInterfaceNameToIndexRequest
10944    {
10945        #[inline(always)]
10946        fn new_empty() -> Self {
10947            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
10948        }
10949
10950        #[inline]
10951        unsafe fn decode(
10952            &mut self,
10953            decoder: &mut fidl::encoding::Decoder<'_, D>,
10954            offset: usize,
10955            _depth: fidl::encoding::Depth,
10956        ) -> fidl::Result<()> {
10957            decoder.debug_check_bounds::<Self>(offset);
10958            // Verify that padding bytes are zero.
10959            fidl::decode!(
10960                fidl::encoding::BoundedString<15>,
10961                D,
10962                &mut self.name,
10963                decoder,
10964                offset + 0,
10965                _depth
10966            )?;
10967            Ok(())
10968        }
10969    }
10970
10971    impl fidl::encoding::ValueTypeMarker for ProviderStreamSocketRequest {
10972        type Borrowed<'a> = &'a Self;
10973        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10974            value
10975        }
10976    }
10977
10978    unsafe impl fidl::encoding::TypeMarker for ProviderStreamSocketRequest {
10979        type Owned = Self;
10980
10981        #[inline(always)]
10982        fn inline_align(_context: fidl::encoding::Context) -> usize {
10983            4
10984        }
10985
10986        #[inline(always)]
10987        fn inline_size(_context: fidl::encoding::Context) -> usize {
10988            8
10989        }
10990    }
10991
10992    unsafe impl<D: fidl::encoding::ResourceDialect>
10993        fidl::encoding::Encode<ProviderStreamSocketRequest, D> for &ProviderStreamSocketRequest
10994    {
10995        #[inline]
10996        unsafe fn encode(
10997            self,
10998            encoder: &mut fidl::encoding::Encoder<'_, D>,
10999            offset: usize,
11000            _depth: fidl::encoding::Depth,
11001        ) -> fidl::Result<()> {
11002            encoder.debug_check_bounds::<ProviderStreamSocketRequest>(offset);
11003            // Delegate to tuple encoding.
11004            fidl::encoding::Encode::<ProviderStreamSocketRequest, D>::encode(
11005                (
11006                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
11007                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
11008                ),
11009                encoder,
11010                offset,
11011                _depth,
11012            )
11013        }
11014    }
11015    unsafe impl<
11016        D: fidl::encoding::ResourceDialect,
11017        T0: fidl::encoding::Encode<Domain, D>,
11018        T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
11019    > fidl::encoding::Encode<ProviderStreamSocketRequest, D> for (T0, T1)
11020    {
11021        #[inline]
11022        unsafe fn encode(
11023            self,
11024            encoder: &mut fidl::encoding::Encoder<'_, D>,
11025            offset: usize,
11026            depth: fidl::encoding::Depth,
11027        ) -> fidl::Result<()> {
11028            encoder.debug_check_bounds::<ProviderStreamSocketRequest>(offset);
11029            // Zero out padding regions. There's no need to apply masks
11030            // because the unmasked parts will be overwritten by fields.
11031            unsafe {
11032                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
11033                (ptr as *mut u32).write_unaligned(0);
11034            }
11035            // Write the fields.
11036            self.0.encode(encoder, offset + 0, depth)?;
11037            self.1.encode(encoder, offset + 4, depth)?;
11038            Ok(())
11039        }
11040    }
11041
11042    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11043        for ProviderStreamSocketRequest
11044    {
11045        #[inline(always)]
11046        fn new_empty() -> Self {
11047            Self {
11048                domain: fidl::new_empty!(Domain, D),
11049                proto: fidl::new_empty!(StreamSocketProtocol, D),
11050            }
11051        }
11052
11053        #[inline]
11054        unsafe fn decode(
11055            &mut self,
11056            decoder: &mut fidl::encoding::Decoder<'_, D>,
11057            offset: usize,
11058            _depth: fidl::encoding::Depth,
11059        ) -> fidl::Result<()> {
11060            decoder.debug_check_bounds::<Self>(offset);
11061            // Verify that padding bytes are zero.
11062            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
11063            let padval = unsafe { (ptr as *const u32).read_unaligned() };
11064            let mask = 0xffff0000u32;
11065            let maskedval = padval & mask;
11066            if maskedval != 0 {
11067                return Err(fidl::Error::NonZeroPadding {
11068                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
11069                });
11070            }
11071            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
11072            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
11073            Ok(())
11074        }
11075    }
11076
11077    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceIndexToNameResponse {
11078        type Borrowed<'a> = &'a Self;
11079        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11080            value
11081        }
11082    }
11083
11084    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceIndexToNameResponse {
11085        type Owned = Self;
11086
11087        #[inline(always)]
11088        fn inline_align(_context: fidl::encoding::Context) -> usize {
11089            8
11090        }
11091
11092        #[inline(always)]
11093        fn inline_size(_context: fidl::encoding::Context) -> usize {
11094            16
11095        }
11096    }
11097
11098    unsafe impl<D: fidl::encoding::ResourceDialect>
11099        fidl::encoding::Encode<ProviderInterfaceIndexToNameResponse, D>
11100        for &ProviderInterfaceIndexToNameResponse
11101    {
11102        #[inline]
11103        unsafe fn encode(
11104            self,
11105            encoder: &mut fidl::encoding::Encoder<'_, D>,
11106            offset: usize,
11107            _depth: fidl::encoding::Depth,
11108        ) -> fidl::Result<()> {
11109            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameResponse>(offset);
11110            // Delegate to tuple encoding.
11111            fidl::encoding::Encode::<ProviderInterfaceIndexToNameResponse, D>::encode(
11112                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
11113                    &self.name,
11114                ),),
11115                encoder,
11116                offset,
11117                _depth,
11118            )
11119        }
11120    }
11121    unsafe impl<
11122        D: fidl::encoding::ResourceDialect,
11123        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
11124    > fidl::encoding::Encode<ProviderInterfaceIndexToNameResponse, D> for (T0,)
11125    {
11126        #[inline]
11127        unsafe fn encode(
11128            self,
11129            encoder: &mut fidl::encoding::Encoder<'_, D>,
11130            offset: usize,
11131            depth: fidl::encoding::Depth,
11132        ) -> fidl::Result<()> {
11133            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameResponse>(offset);
11134            // Zero out padding regions. There's no need to apply masks
11135            // because the unmasked parts will be overwritten by fields.
11136            // Write the fields.
11137            self.0.encode(encoder, offset + 0, depth)?;
11138            Ok(())
11139        }
11140    }
11141
11142    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11143        for ProviderInterfaceIndexToNameResponse
11144    {
11145        #[inline(always)]
11146        fn new_empty() -> Self {
11147            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
11148        }
11149
11150        #[inline]
11151        unsafe fn decode(
11152            &mut self,
11153            decoder: &mut fidl::encoding::Decoder<'_, D>,
11154            offset: usize,
11155            _depth: fidl::encoding::Depth,
11156        ) -> fidl::Result<()> {
11157            decoder.debug_check_bounds::<Self>(offset);
11158            // Verify that padding bytes are zero.
11159            fidl::decode!(
11160                fidl::encoding::BoundedString<15>,
11161                D,
11162                &mut self.name,
11163                decoder,
11164                offset + 0,
11165                _depth
11166            )?;
11167            Ok(())
11168        }
11169    }
11170
11171    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToFlagsResponse {
11172        type Borrowed<'a> = &'a Self;
11173        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11174            value
11175        }
11176    }
11177
11178    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToFlagsResponse {
11179        type Owned = Self;
11180
11181        #[inline(always)]
11182        fn inline_align(_context: fidl::encoding::Context) -> usize {
11183            2
11184        }
11185
11186        #[inline(always)]
11187        fn inline_size(_context: fidl::encoding::Context) -> usize {
11188            2
11189        }
11190    }
11191
11192    unsafe impl<D: fidl::encoding::ResourceDialect>
11193        fidl::encoding::Encode<ProviderInterfaceNameToFlagsResponse, D>
11194        for &ProviderInterfaceNameToFlagsResponse
11195    {
11196        #[inline]
11197        unsafe fn encode(
11198            self,
11199            encoder: &mut fidl::encoding::Encoder<'_, D>,
11200            offset: usize,
11201            _depth: fidl::encoding::Depth,
11202        ) -> fidl::Result<()> {
11203            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsResponse>(offset);
11204            // Delegate to tuple encoding.
11205            fidl::encoding::Encode::<ProviderInterfaceNameToFlagsResponse, D>::encode(
11206                (<InterfaceFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),),
11207                encoder,
11208                offset,
11209                _depth,
11210            )
11211        }
11212    }
11213    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<InterfaceFlags, D>>
11214        fidl::encoding::Encode<ProviderInterfaceNameToFlagsResponse, D> for (T0,)
11215    {
11216        #[inline]
11217        unsafe fn encode(
11218            self,
11219            encoder: &mut fidl::encoding::Encoder<'_, D>,
11220            offset: usize,
11221            depth: fidl::encoding::Depth,
11222        ) -> fidl::Result<()> {
11223            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsResponse>(offset);
11224            // Zero out padding regions. There's no need to apply masks
11225            // because the unmasked parts will be overwritten by fields.
11226            // Write the fields.
11227            self.0.encode(encoder, offset + 0, depth)?;
11228            Ok(())
11229        }
11230    }
11231
11232    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11233        for ProviderInterfaceNameToFlagsResponse
11234    {
11235        #[inline(always)]
11236        fn new_empty() -> Self {
11237            Self { flags: fidl::new_empty!(InterfaceFlags, D) }
11238        }
11239
11240        #[inline]
11241        unsafe fn decode(
11242            &mut self,
11243            decoder: &mut fidl::encoding::Decoder<'_, D>,
11244            offset: usize,
11245            _depth: fidl::encoding::Depth,
11246        ) -> fidl::Result<()> {
11247            decoder.debug_check_bounds::<Self>(offset);
11248            // Verify that padding bytes are zero.
11249            fidl::decode!(InterfaceFlags, D, &mut self.flags, decoder, offset + 0, _depth)?;
11250            Ok(())
11251        }
11252    }
11253
11254    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToIndexResponse {
11255        type Borrowed<'a> = &'a Self;
11256        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11257            value
11258        }
11259    }
11260
11261    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToIndexResponse {
11262        type Owned = Self;
11263
11264        #[inline(always)]
11265        fn inline_align(_context: fidl::encoding::Context) -> usize {
11266            8
11267        }
11268
11269        #[inline(always)]
11270        fn inline_size(_context: fidl::encoding::Context) -> usize {
11271            8
11272        }
11273        #[inline(always)]
11274        fn encode_is_copy() -> bool {
11275            true
11276        }
11277
11278        #[inline(always)]
11279        fn decode_is_copy() -> bool {
11280            true
11281        }
11282    }
11283
11284    unsafe impl<D: fidl::encoding::ResourceDialect>
11285        fidl::encoding::Encode<ProviderInterfaceNameToIndexResponse, D>
11286        for &ProviderInterfaceNameToIndexResponse
11287    {
11288        #[inline]
11289        unsafe fn encode(
11290            self,
11291            encoder: &mut fidl::encoding::Encoder<'_, D>,
11292            offset: usize,
11293            _depth: fidl::encoding::Depth,
11294        ) -> fidl::Result<()> {
11295            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexResponse>(offset);
11296            unsafe {
11297                // Copy the object into the buffer.
11298                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11299                (buf_ptr as *mut ProviderInterfaceNameToIndexResponse)
11300                    .write_unaligned((self as *const ProviderInterfaceNameToIndexResponse).read());
11301                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11302                // done second because the memcpy will write garbage to these bytes.
11303            }
11304            Ok(())
11305        }
11306    }
11307    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
11308        fidl::encoding::Encode<ProviderInterfaceNameToIndexResponse, D> for (T0,)
11309    {
11310        #[inline]
11311        unsafe fn encode(
11312            self,
11313            encoder: &mut fidl::encoding::Encoder<'_, D>,
11314            offset: usize,
11315            depth: fidl::encoding::Depth,
11316        ) -> fidl::Result<()> {
11317            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexResponse>(offset);
11318            // Zero out padding regions. There's no need to apply masks
11319            // because the unmasked parts will be overwritten by fields.
11320            // Write the fields.
11321            self.0.encode(encoder, offset + 0, depth)?;
11322            Ok(())
11323        }
11324    }
11325
11326    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11327        for ProviderInterfaceNameToIndexResponse
11328    {
11329        #[inline(always)]
11330        fn new_empty() -> Self {
11331            Self { index: fidl::new_empty!(u64, D) }
11332        }
11333
11334        #[inline]
11335        unsafe fn decode(
11336            &mut self,
11337            decoder: &mut fidl::encoding::Decoder<'_, D>,
11338            offset: usize,
11339            _depth: fidl::encoding::Depth,
11340        ) -> fidl::Result<()> {
11341            decoder.debug_check_bounds::<Self>(offset);
11342            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11343            // Verify that padding bytes are zero.
11344            // Copy from the buffer into the object.
11345            unsafe {
11346                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11347            }
11348            Ok(())
11349        }
11350    }
11351
11352    impl fidl::encoding::ValueTypeMarker for StreamSocketAcceptRequest {
11353        type Borrowed<'a> = &'a Self;
11354        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11355            value
11356        }
11357    }
11358
11359    unsafe impl fidl::encoding::TypeMarker for StreamSocketAcceptRequest {
11360        type Owned = Self;
11361
11362        #[inline(always)]
11363        fn inline_align(_context: fidl::encoding::Context) -> usize {
11364            1
11365        }
11366
11367        #[inline(always)]
11368        fn inline_size(_context: fidl::encoding::Context) -> usize {
11369            1
11370        }
11371    }
11372
11373    unsafe impl<D: fidl::encoding::ResourceDialect>
11374        fidl::encoding::Encode<StreamSocketAcceptRequest, D> for &StreamSocketAcceptRequest
11375    {
11376        #[inline]
11377        unsafe fn encode(
11378            self,
11379            encoder: &mut fidl::encoding::Encoder<'_, D>,
11380            offset: usize,
11381            _depth: fidl::encoding::Depth,
11382        ) -> fidl::Result<()> {
11383            encoder.debug_check_bounds::<StreamSocketAcceptRequest>(offset);
11384            // Delegate to tuple encoding.
11385            fidl::encoding::Encode::<StreamSocketAcceptRequest, D>::encode(
11386                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_addr),),
11387                encoder,
11388                offset,
11389                _depth,
11390            )
11391        }
11392    }
11393    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11394        fidl::encoding::Encode<StreamSocketAcceptRequest, D> for (T0,)
11395    {
11396        #[inline]
11397        unsafe fn encode(
11398            self,
11399            encoder: &mut fidl::encoding::Encoder<'_, D>,
11400            offset: usize,
11401            depth: fidl::encoding::Depth,
11402        ) -> fidl::Result<()> {
11403            encoder.debug_check_bounds::<StreamSocketAcceptRequest>(offset);
11404            // Zero out padding regions. There's no need to apply masks
11405            // because the unmasked parts will be overwritten by fields.
11406            // Write the fields.
11407            self.0.encode(encoder, offset + 0, depth)?;
11408            Ok(())
11409        }
11410    }
11411
11412    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11413        for StreamSocketAcceptRequest
11414    {
11415        #[inline(always)]
11416        fn new_empty() -> Self {
11417            Self { want_addr: fidl::new_empty!(bool, D) }
11418        }
11419
11420        #[inline]
11421        unsafe fn decode(
11422            &mut self,
11423            decoder: &mut fidl::encoding::Decoder<'_, D>,
11424            offset: usize,
11425            _depth: fidl::encoding::Depth,
11426        ) -> fidl::Result<()> {
11427            decoder.debug_check_bounds::<Self>(offset);
11428            // Verify that padding bytes are zero.
11429            fidl::decode!(bool, D, &mut self.want_addr, decoder, offset + 0, _depth)?;
11430            Ok(())
11431        }
11432    }
11433
11434    impl fidl::encoding::ValueTypeMarker for StreamSocketListenRequest {
11435        type Borrowed<'a> = &'a Self;
11436        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11437            value
11438        }
11439    }
11440
11441    unsafe impl fidl::encoding::TypeMarker for StreamSocketListenRequest {
11442        type Owned = Self;
11443
11444        #[inline(always)]
11445        fn inline_align(_context: fidl::encoding::Context) -> usize {
11446            2
11447        }
11448
11449        #[inline(always)]
11450        fn inline_size(_context: fidl::encoding::Context) -> usize {
11451            2
11452        }
11453        #[inline(always)]
11454        fn encode_is_copy() -> bool {
11455            true
11456        }
11457
11458        #[inline(always)]
11459        fn decode_is_copy() -> bool {
11460            true
11461        }
11462    }
11463
11464    unsafe impl<D: fidl::encoding::ResourceDialect>
11465        fidl::encoding::Encode<StreamSocketListenRequest, D> for &StreamSocketListenRequest
11466    {
11467        #[inline]
11468        unsafe fn encode(
11469            self,
11470            encoder: &mut fidl::encoding::Encoder<'_, D>,
11471            offset: usize,
11472            _depth: fidl::encoding::Depth,
11473        ) -> fidl::Result<()> {
11474            encoder.debug_check_bounds::<StreamSocketListenRequest>(offset);
11475            unsafe {
11476                // Copy the object into the buffer.
11477                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11478                (buf_ptr as *mut StreamSocketListenRequest)
11479                    .write_unaligned((self as *const StreamSocketListenRequest).read());
11480                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11481                // done second because the memcpy will write garbage to these bytes.
11482            }
11483            Ok(())
11484        }
11485    }
11486    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
11487        fidl::encoding::Encode<StreamSocketListenRequest, D> for (T0,)
11488    {
11489        #[inline]
11490        unsafe fn encode(
11491            self,
11492            encoder: &mut fidl::encoding::Encoder<'_, D>,
11493            offset: usize,
11494            depth: fidl::encoding::Depth,
11495        ) -> fidl::Result<()> {
11496            encoder.debug_check_bounds::<StreamSocketListenRequest>(offset);
11497            // Zero out padding regions. There's no need to apply masks
11498            // because the unmasked parts will be overwritten by fields.
11499            // Write the fields.
11500            self.0.encode(encoder, offset + 0, depth)?;
11501            Ok(())
11502        }
11503    }
11504
11505    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11506        for StreamSocketListenRequest
11507    {
11508        #[inline(always)]
11509        fn new_empty() -> Self {
11510            Self { backlog: fidl::new_empty!(i16, D) }
11511        }
11512
11513        #[inline]
11514        unsafe fn decode(
11515            &mut self,
11516            decoder: &mut fidl::encoding::Decoder<'_, D>,
11517            offset: usize,
11518            _depth: fidl::encoding::Depth,
11519        ) -> fidl::Result<()> {
11520            decoder.debug_check_bounds::<Self>(offset);
11521            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11522            // Verify that padding bytes are zero.
11523            // Copy from the buffer into the object.
11524            unsafe {
11525                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
11526            }
11527            Ok(())
11528        }
11529    }
11530
11531    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpCongestionRequest {
11532        type Borrowed<'a> = &'a Self;
11533        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11534            value
11535        }
11536    }
11537
11538    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpCongestionRequest {
11539        type Owned = Self;
11540
11541        #[inline(always)]
11542        fn inline_align(_context: fidl::encoding::Context) -> usize {
11543            4
11544        }
11545
11546        #[inline(always)]
11547        fn inline_size(_context: fidl::encoding::Context) -> usize {
11548            4
11549        }
11550    }
11551
11552    unsafe impl<D: fidl::encoding::ResourceDialect>
11553        fidl::encoding::Encode<StreamSocketSetTcpCongestionRequest, D>
11554        for &StreamSocketSetTcpCongestionRequest
11555    {
11556        #[inline]
11557        unsafe fn encode(
11558            self,
11559            encoder: &mut fidl::encoding::Encoder<'_, D>,
11560            offset: usize,
11561            _depth: fidl::encoding::Depth,
11562        ) -> fidl::Result<()> {
11563            encoder.debug_check_bounds::<StreamSocketSetTcpCongestionRequest>(offset);
11564            // Delegate to tuple encoding.
11565            fidl::encoding::Encode::<StreamSocketSetTcpCongestionRequest, D>::encode(
11566                (<TcpCongestionControl as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
11567                encoder,
11568                offset,
11569                _depth,
11570            )
11571        }
11572    }
11573    unsafe impl<
11574        D: fidl::encoding::ResourceDialect,
11575        T0: fidl::encoding::Encode<TcpCongestionControl, D>,
11576    > fidl::encoding::Encode<StreamSocketSetTcpCongestionRequest, D> for (T0,)
11577    {
11578        #[inline]
11579        unsafe fn encode(
11580            self,
11581            encoder: &mut fidl::encoding::Encoder<'_, D>,
11582            offset: usize,
11583            depth: fidl::encoding::Depth,
11584        ) -> fidl::Result<()> {
11585            encoder.debug_check_bounds::<StreamSocketSetTcpCongestionRequest>(offset);
11586            // Zero out padding regions. There's no need to apply masks
11587            // because the unmasked parts will be overwritten by fields.
11588            // Write the fields.
11589            self.0.encode(encoder, offset + 0, depth)?;
11590            Ok(())
11591        }
11592    }
11593
11594    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11595        for StreamSocketSetTcpCongestionRequest
11596    {
11597        #[inline(always)]
11598        fn new_empty() -> Self {
11599            Self { value: fidl::new_empty!(TcpCongestionControl, D) }
11600        }
11601
11602        #[inline]
11603        unsafe fn decode(
11604            &mut self,
11605            decoder: &mut fidl::encoding::Decoder<'_, D>,
11606            offset: usize,
11607            _depth: fidl::encoding::Depth,
11608        ) -> fidl::Result<()> {
11609            decoder.debug_check_bounds::<Self>(offset);
11610            // Verify that padding bytes are zero.
11611            fidl::decode!(TcpCongestionControl, D, &mut self.value, decoder, offset + 0, _depth)?;
11612            Ok(())
11613        }
11614    }
11615
11616    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpCorkRequest {
11617        type Borrowed<'a> = &'a Self;
11618        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11619            value
11620        }
11621    }
11622
11623    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpCorkRequest {
11624        type Owned = Self;
11625
11626        #[inline(always)]
11627        fn inline_align(_context: fidl::encoding::Context) -> usize {
11628            1
11629        }
11630
11631        #[inline(always)]
11632        fn inline_size(_context: fidl::encoding::Context) -> usize {
11633            1
11634        }
11635    }
11636
11637    unsafe impl<D: fidl::encoding::ResourceDialect>
11638        fidl::encoding::Encode<StreamSocketSetTcpCorkRequest, D>
11639        for &StreamSocketSetTcpCorkRequest
11640    {
11641        #[inline]
11642        unsafe fn encode(
11643            self,
11644            encoder: &mut fidl::encoding::Encoder<'_, D>,
11645            offset: usize,
11646            _depth: fidl::encoding::Depth,
11647        ) -> fidl::Result<()> {
11648            encoder.debug_check_bounds::<StreamSocketSetTcpCorkRequest>(offset);
11649            // Delegate to tuple encoding.
11650            fidl::encoding::Encode::<StreamSocketSetTcpCorkRequest, D>::encode(
11651                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
11652                encoder,
11653                offset,
11654                _depth,
11655            )
11656        }
11657    }
11658    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11659        fidl::encoding::Encode<StreamSocketSetTcpCorkRequest, D> for (T0,)
11660    {
11661        #[inline]
11662        unsafe fn encode(
11663            self,
11664            encoder: &mut fidl::encoding::Encoder<'_, D>,
11665            offset: usize,
11666            depth: fidl::encoding::Depth,
11667        ) -> fidl::Result<()> {
11668            encoder.debug_check_bounds::<StreamSocketSetTcpCorkRequest>(offset);
11669            // Zero out padding regions. There's no need to apply masks
11670            // because the unmasked parts will be overwritten by fields.
11671            // Write the fields.
11672            self.0.encode(encoder, offset + 0, depth)?;
11673            Ok(())
11674        }
11675    }
11676
11677    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11678        for StreamSocketSetTcpCorkRequest
11679    {
11680        #[inline(always)]
11681        fn new_empty() -> Self {
11682            Self { value: fidl::new_empty!(bool, D) }
11683        }
11684
11685        #[inline]
11686        unsafe fn decode(
11687            &mut self,
11688            decoder: &mut fidl::encoding::Decoder<'_, D>,
11689            offset: usize,
11690            _depth: fidl::encoding::Depth,
11691        ) -> fidl::Result<()> {
11692            decoder.debug_check_bounds::<Self>(offset);
11693            // Verify that padding bytes are zero.
11694            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
11695            Ok(())
11696        }
11697    }
11698
11699    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpDeferAcceptRequest {
11700        type Borrowed<'a> = &'a Self;
11701        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11702            value
11703        }
11704    }
11705
11706    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpDeferAcceptRequest {
11707        type Owned = Self;
11708
11709        #[inline(always)]
11710        fn inline_align(_context: fidl::encoding::Context) -> usize {
11711            4
11712        }
11713
11714        #[inline(always)]
11715        fn inline_size(_context: fidl::encoding::Context) -> usize {
11716            4
11717        }
11718        #[inline(always)]
11719        fn encode_is_copy() -> bool {
11720            true
11721        }
11722
11723        #[inline(always)]
11724        fn decode_is_copy() -> bool {
11725            true
11726        }
11727    }
11728
11729    unsafe impl<D: fidl::encoding::ResourceDialect>
11730        fidl::encoding::Encode<StreamSocketSetTcpDeferAcceptRequest, D>
11731        for &StreamSocketSetTcpDeferAcceptRequest
11732    {
11733        #[inline]
11734        unsafe fn encode(
11735            self,
11736            encoder: &mut fidl::encoding::Encoder<'_, D>,
11737            offset: usize,
11738            _depth: fidl::encoding::Depth,
11739        ) -> fidl::Result<()> {
11740            encoder.debug_check_bounds::<StreamSocketSetTcpDeferAcceptRequest>(offset);
11741            unsafe {
11742                // Copy the object into the buffer.
11743                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11744                (buf_ptr as *mut StreamSocketSetTcpDeferAcceptRequest)
11745                    .write_unaligned((self as *const StreamSocketSetTcpDeferAcceptRequest).read());
11746                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11747                // done second because the memcpy will write garbage to these bytes.
11748            }
11749            Ok(())
11750        }
11751    }
11752    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11753        fidl::encoding::Encode<StreamSocketSetTcpDeferAcceptRequest, 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::<StreamSocketSetTcpDeferAcceptRequest>(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 StreamSocketSetTcpDeferAcceptRequest
11773    {
11774        #[inline(always)]
11775        fn new_empty() -> Self {
11776            Self { value_secs: fidl::new_empty!(u32, 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            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11788            // Verify that padding bytes are zero.
11789            // Copy from the buffer into the object.
11790            unsafe {
11791                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11792            }
11793            Ok(())
11794        }
11795    }
11796
11797    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveCountRequest {
11798        type Borrowed<'a> = &'a Self;
11799        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11800            value
11801        }
11802    }
11803
11804    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveCountRequest {
11805        type Owned = Self;
11806
11807        #[inline(always)]
11808        fn inline_align(_context: fidl::encoding::Context) -> usize {
11809            4
11810        }
11811
11812        #[inline(always)]
11813        fn inline_size(_context: fidl::encoding::Context) -> usize {
11814            4
11815        }
11816        #[inline(always)]
11817        fn encode_is_copy() -> bool {
11818            true
11819        }
11820
11821        #[inline(always)]
11822        fn decode_is_copy() -> bool {
11823            true
11824        }
11825    }
11826
11827    unsafe impl<D: fidl::encoding::ResourceDialect>
11828        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveCountRequest, D>
11829        for &StreamSocketSetTcpKeepAliveCountRequest
11830    {
11831        #[inline]
11832        unsafe fn encode(
11833            self,
11834            encoder: &mut fidl::encoding::Encoder<'_, D>,
11835            offset: usize,
11836            _depth: fidl::encoding::Depth,
11837        ) -> fidl::Result<()> {
11838            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveCountRequest>(offset);
11839            unsafe {
11840                // Copy the object into the buffer.
11841                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11842                (buf_ptr as *mut StreamSocketSetTcpKeepAliveCountRequest).write_unaligned(
11843                    (self as *const StreamSocketSetTcpKeepAliveCountRequest).read(),
11844                );
11845                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11846                // done second because the memcpy will write garbage to these bytes.
11847            }
11848            Ok(())
11849        }
11850    }
11851    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11852        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveCountRequest, D> for (T0,)
11853    {
11854        #[inline]
11855        unsafe fn encode(
11856            self,
11857            encoder: &mut fidl::encoding::Encoder<'_, D>,
11858            offset: usize,
11859            depth: fidl::encoding::Depth,
11860        ) -> fidl::Result<()> {
11861            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveCountRequest>(offset);
11862            // Zero out padding regions. There's no need to apply masks
11863            // because the unmasked parts will be overwritten by fields.
11864            // Write the fields.
11865            self.0.encode(encoder, offset + 0, depth)?;
11866            Ok(())
11867        }
11868    }
11869
11870    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11871        for StreamSocketSetTcpKeepAliveCountRequest
11872    {
11873        #[inline(always)]
11874        fn new_empty() -> Self {
11875            Self { value: fidl::new_empty!(u32, D) }
11876        }
11877
11878        #[inline]
11879        unsafe fn decode(
11880            &mut self,
11881            decoder: &mut fidl::encoding::Decoder<'_, D>,
11882            offset: usize,
11883            _depth: fidl::encoding::Depth,
11884        ) -> fidl::Result<()> {
11885            decoder.debug_check_bounds::<Self>(offset);
11886            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11887            // Verify that padding bytes are zero.
11888            // Copy from the buffer into the object.
11889            unsafe {
11890                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11891            }
11892            Ok(())
11893        }
11894    }
11895
11896    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveIdleRequest {
11897        type Borrowed<'a> = &'a Self;
11898        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11899            value
11900        }
11901    }
11902
11903    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveIdleRequest {
11904        type Owned = Self;
11905
11906        #[inline(always)]
11907        fn inline_align(_context: fidl::encoding::Context) -> usize {
11908            4
11909        }
11910
11911        #[inline(always)]
11912        fn inline_size(_context: fidl::encoding::Context) -> usize {
11913            4
11914        }
11915        #[inline(always)]
11916        fn encode_is_copy() -> bool {
11917            true
11918        }
11919
11920        #[inline(always)]
11921        fn decode_is_copy() -> bool {
11922            true
11923        }
11924    }
11925
11926    unsafe impl<D: fidl::encoding::ResourceDialect>
11927        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIdleRequest, D>
11928        for &StreamSocketSetTcpKeepAliveIdleRequest
11929    {
11930        #[inline]
11931        unsafe fn encode(
11932            self,
11933            encoder: &mut fidl::encoding::Encoder<'_, D>,
11934            offset: usize,
11935            _depth: fidl::encoding::Depth,
11936        ) -> fidl::Result<()> {
11937            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIdleRequest>(offset);
11938            unsafe {
11939                // Copy the object into the buffer.
11940                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11941                (buf_ptr as *mut StreamSocketSetTcpKeepAliveIdleRequest).write_unaligned(
11942                    (self as *const StreamSocketSetTcpKeepAliveIdleRequest).read(),
11943                );
11944                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11945                // done second because the memcpy will write garbage to these bytes.
11946            }
11947            Ok(())
11948        }
11949    }
11950    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11951        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIdleRequest, D> for (T0,)
11952    {
11953        #[inline]
11954        unsafe fn encode(
11955            self,
11956            encoder: &mut fidl::encoding::Encoder<'_, D>,
11957            offset: usize,
11958            depth: fidl::encoding::Depth,
11959        ) -> fidl::Result<()> {
11960            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIdleRequest>(offset);
11961            // Zero out padding regions. There's no need to apply masks
11962            // because the unmasked parts will be overwritten by fields.
11963            // Write the fields.
11964            self.0.encode(encoder, offset + 0, depth)?;
11965            Ok(())
11966        }
11967    }
11968
11969    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11970        for StreamSocketSetTcpKeepAliveIdleRequest
11971    {
11972        #[inline(always)]
11973        fn new_empty() -> Self {
11974            Self { value_secs: fidl::new_empty!(u32, D) }
11975        }
11976
11977        #[inline]
11978        unsafe fn decode(
11979            &mut self,
11980            decoder: &mut fidl::encoding::Decoder<'_, D>,
11981            offset: usize,
11982            _depth: fidl::encoding::Depth,
11983        ) -> fidl::Result<()> {
11984            decoder.debug_check_bounds::<Self>(offset);
11985            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11986            // Verify that padding bytes are zero.
11987            // Copy from the buffer into the object.
11988            unsafe {
11989                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11990            }
11991            Ok(())
11992        }
11993    }
11994
11995    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveIntervalRequest {
11996        type Borrowed<'a> = &'a Self;
11997        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11998            value
11999        }
12000    }
12001
12002    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveIntervalRequest {
12003        type Owned = Self;
12004
12005        #[inline(always)]
12006        fn inline_align(_context: fidl::encoding::Context) -> usize {
12007            4
12008        }
12009
12010        #[inline(always)]
12011        fn inline_size(_context: fidl::encoding::Context) -> usize {
12012            4
12013        }
12014        #[inline(always)]
12015        fn encode_is_copy() -> bool {
12016            true
12017        }
12018
12019        #[inline(always)]
12020        fn decode_is_copy() -> bool {
12021            true
12022        }
12023    }
12024
12025    unsafe impl<D: fidl::encoding::ResourceDialect>
12026        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIntervalRequest, D>
12027        for &StreamSocketSetTcpKeepAliveIntervalRequest
12028    {
12029        #[inline]
12030        unsafe fn encode(
12031            self,
12032            encoder: &mut fidl::encoding::Encoder<'_, D>,
12033            offset: usize,
12034            _depth: fidl::encoding::Depth,
12035        ) -> fidl::Result<()> {
12036            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIntervalRequest>(offset);
12037            unsafe {
12038                // Copy the object into the buffer.
12039                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12040                (buf_ptr as *mut StreamSocketSetTcpKeepAliveIntervalRequest).write_unaligned(
12041                    (self as *const StreamSocketSetTcpKeepAliveIntervalRequest).read(),
12042                );
12043                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12044                // done second because the memcpy will write garbage to these bytes.
12045            }
12046            Ok(())
12047        }
12048    }
12049    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12050        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIntervalRequest, D> for (T0,)
12051    {
12052        #[inline]
12053        unsafe fn encode(
12054            self,
12055            encoder: &mut fidl::encoding::Encoder<'_, D>,
12056            offset: usize,
12057            depth: fidl::encoding::Depth,
12058        ) -> fidl::Result<()> {
12059            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIntervalRequest>(offset);
12060            // Zero out padding regions. There's no need to apply masks
12061            // because the unmasked parts will be overwritten by fields.
12062            // Write the fields.
12063            self.0.encode(encoder, offset + 0, depth)?;
12064            Ok(())
12065        }
12066    }
12067
12068    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12069        for StreamSocketSetTcpKeepAliveIntervalRequest
12070    {
12071        #[inline(always)]
12072        fn new_empty() -> Self {
12073            Self { value_secs: fidl::new_empty!(u32, D) }
12074        }
12075
12076        #[inline]
12077        unsafe fn decode(
12078            &mut self,
12079            decoder: &mut fidl::encoding::Decoder<'_, D>,
12080            offset: usize,
12081            _depth: fidl::encoding::Depth,
12082        ) -> fidl::Result<()> {
12083            decoder.debug_check_bounds::<Self>(offset);
12084            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12085            // Verify that padding bytes are zero.
12086            // Copy from the buffer into the object.
12087            unsafe {
12088                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12089            }
12090            Ok(())
12091        }
12092    }
12093
12094    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpLingerRequest {
12095        type Borrowed<'a> = &'a Self;
12096        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12097            value
12098        }
12099    }
12100
12101    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpLingerRequest {
12102        type Owned = Self;
12103
12104        #[inline(always)]
12105        fn inline_align(_context: fidl::encoding::Context) -> usize {
12106            8
12107        }
12108
12109        #[inline(always)]
12110        fn inline_size(_context: fidl::encoding::Context) -> usize {
12111            16
12112        }
12113    }
12114
12115    unsafe impl<D: fidl::encoding::ResourceDialect>
12116        fidl::encoding::Encode<StreamSocketSetTcpLingerRequest, D>
12117        for &StreamSocketSetTcpLingerRequest
12118    {
12119        #[inline]
12120        unsafe fn encode(
12121            self,
12122            encoder: &mut fidl::encoding::Encoder<'_, D>,
12123            offset: usize,
12124            _depth: fidl::encoding::Depth,
12125        ) -> fidl::Result<()> {
12126            encoder.debug_check_bounds::<StreamSocketSetTcpLingerRequest>(offset);
12127            // Delegate to tuple encoding.
12128            fidl::encoding::Encode::<StreamSocketSetTcpLingerRequest, D>::encode(
12129                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value_secs),),
12130                encoder,
12131                offset,
12132                _depth,
12133            )
12134        }
12135    }
12136    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
12137        fidl::encoding::Encode<StreamSocketSetTcpLingerRequest, D> for (T0,)
12138    {
12139        #[inline]
12140        unsafe fn encode(
12141            self,
12142            encoder: &mut fidl::encoding::Encoder<'_, D>,
12143            offset: usize,
12144            depth: fidl::encoding::Depth,
12145        ) -> fidl::Result<()> {
12146            encoder.debug_check_bounds::<StreamSocketSetTcpLingerRequest>(offset);
12147            // Zero out padding regions. There's no need to apply masks
12148            // because the unmasked parts will be overwritten by fields.
12149            // Write the fields.
12150            self.0.encode(encoder, offset + 0, depth)?;
12151            Ok(())
12152        }
12153    }
12154
12155    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12156        for StreamSocketSetTcpLingerRequest
12157    {
12158        #[inline(always)]
12159        fn new_empty() -> Self {
12160            Self { value_secs: fidl::new_empty!(OptionalUint32, D) }
12161        }
12162
12163        #[inline]
12164        unsafe fn decode(
12165            &mut self,
12166            decoder: &mut fidl::encoding::Decoder<'_, D>,
12167            offset: usize,
12168            _depth: fidl::encoding::Depth,
12169        ) -> fidl::Result<()> {
12170            decoder.debug_check_bounds::<Self>(offset);
12171            // Verify that padding bytes are zero.
12172            fidl::decode!(OptionalUint32, D, &mut self.value_secs, decoder, offset + 0, _depth)?;
12173            Ok(())
12174        }
12175    }
12176
12177    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpMaxSegmentRequest {
12178        type Borrowed<'a> = &'a Self;
12179        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12180            value
12181        }
12182    }
12183
12184    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpMaxSegmentRequest {
12185        type Owned = Self;
12186
12187        #[inline(always)]
12188        fn inline_align(_context: fidl::encoding::Context) -> usize {
12189            4
12190        }
12191
12192        #[inline(always)]
12193        fn inline_size(_context: fidl::encoding::Context) -> usize {
12194            4
12195        }
12196        #[inline(always)]
12197        fn encode_is_copy() -> bool {
12198            true
12199        }
12200
12201        #[inline(always)]
12202        fn decode_is_copy() -> bool {
12203            true
12204        }
12205    }
12206
12207    unsafe impl<D: fidl::encoding::ResourceDialect>
12208        fidl::encoding::Encode<StreamSocketSetTcpMaxSegmentRequest, D>
12209        for &StreamSocketSetTcpMaxSegmentRequest
12210    {
12211        #[inline]
12212        unsafe fn encode(
12213            self,
12214            encoder: &mut fidl::encoding::Encoder<'_, D>,
12215            offset: usize,
12216            _depth: fidl::encoding::Depth,
12217        ) -> fidl::Result<()> {
12218            encoder.debug_check_bounds::<StreamSocketSetTcpMaxSegmentRequest>(offset);
12219            unsafe {
12220                // Copy the object into the buffer.
12221                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12222                (buf_ptr as *mut StreamSocketSetTcpMaxSegmentRequest)
12223                    .write_unaligned((self as *const StreamSocketSetTcpMaxSegmentRequest).read());
12224                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12225                // done second because the memcpy will write garbage to these bytes.
12226            }
12227            Ok(())
12228        }
12229    }
12230    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12231        fidl::encoding::Encode<StreamSocketSetTcpMaxSegmentRequest, D> for (T0,)
12232    {
12233        #[inline]
12234        unsafe fn encode(
12235            self,
12236            encoder: &mut fidl::encoding::Encoder<'_, D>,
12237            offset: usize,
12238            depth: fidl::encoding::Depth,
12239        ) -> fidl::Result<()> {
12240            encoder.debug_check_bounds::<StreamSocketSetTcpMaxSegmentRequest>(offset);
12241            // Zero out padding regions. There's no need to apply masks
12242            // because the unmasked parts will be overwritten by fields.
12243            // Write the fields.
12244            self.0.encode(encoder, offset + 0, depth)?;
12245            Ok(())
12246        }
12247    }
12248
12249    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12250        for StreamSocketSetTcpMaxSegmentRequest
12251    {
12252        #[inline(always)]
12253        fn new_empty() -> Self {
12254            Self { value_bytes: fidl::new_empty!(u32, D) }
12255        }
12256
12257        #[inline]
12258        unsafe fn decode(
12259            &mut self,
12260            decoder: &mut fidl::encoding::Decoder<'_, D>,
12261            offset: usize,
12262            _depth: fidl::encoding::Depth,
12263        ) -> fidl::Result<()> {
12264            decoder.debug_check_bounds::<Self>(offset);
12265            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12266            // Verify that padding bytes are zero.
12267            // Copy from the buffer into the object.
12268            unsafe {
12269                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12270            }
12271            Ok(())
12272        }
12273    }
12274
12275    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpNoDelayRequest {
12276        type Borrowed<'a> = &'a Self;
12277        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12278            value
12279        }
12280    }
12281
12282    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpNoDelayRequest {
12283        type Owned = Self;
12284
12285        #[inline(always)]
12286        fn inline_align(_context: fidl::encoding::Context) -> usize {
12287            1
12288        }
12289
12290        #[inline(always)]
12291        fn inline_size(_context: fidl::encoding::Context) -> usize {
12292            1
12293        }
12294    }
12295
12296    unsafe impl<D: fidl::encoding::ResourceDialect>
12297        fidl::encoding::Encode<StreamSocketSetTcpNoDelayRequest, D>
12298        for &StreamSocketSetTcpNoDelayRequest
12299    {
12300        #[inline]
12301        unsafe fn encode(
12302            self,
12303            encoder: &mut fidl::encoding::Encoder<'_, D>,
12304            offset: usize,
12305            _depth: fidl::encoding::Depth,
12306        ) -> fidl::Result<()> {
12307            encoder.debug_check_bounds::<StreamSocketSetTcpNoDelayRequest>(offset);
12308            // Delegate to tuple encoding.
12309            fidl::encoding::Encode::<StreamSocketSetTcpNoDelayRequest, D>::encode(
12310                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12311                encoder,
12312                offset,
12313                _depth,
12314            )
12315        }
12316    }
12317    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12318        fidl::encoding::Encode<StreamSocketSetTcpNoDelayRequest, D> for (T0,)
12319    {
12320        #[inline]
12321        unsafe fn encode(
12322            self,
12323            encoder: &mut fidl::encoding::Encoder<'_, D>,
12324            offset: usize,
12325            depth: fidl::encoding::Depth,
12326        ) -> fidl::Result<()> {
12327            encoder.debug_check_bounds::<StreamSocketSetTcpNoDelayRequest>(offset);
12328            // Zero out padding regions. There's no need to apply masks
12329            // because the unmasked parts will be overwritten by fields.
12330            // Write the fields.
12331            self.0.encode(encoder, offset + 0, depth)?;
12332            Ok(())
12333        }
12334    }
12335
12336    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12337        for StreamSocketSetTcpNoDelayRequest
12338    {
12339        #[inline(always)]
12340        fn new_empty() -> Self {
12341            Self { value: fidl::new_empty!(bool, D) }
12342        }
12343
12344        #[inline]
12345        unsafe fn decode(
12346            &mut self,
12347            decoder: &mut fidl::encoding::Decoder<'_, D>,
12348            offset: usize,
12349            _depth: fidl::encoding::Depth,
12350        ) -> fidl::Result<()> {
12351            decoder.debug_check_bounds::<Self>(offset);
12352            // Verify that padding bytes are zero.
12353            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12354            Ok(())
12355        }
12356    }
12357
12358    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpQuickAckRequest {
12359        type Borrowed<'a> = &'a Self;
12360        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12361            value
12362        }
12363    }
12364
12365    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpQuickAckRequest {
12366        type Owned = Self;
12367
12368        #[inline(always)]
12369        fn inline_align(_context: fidl::encoding::Context) -> usize {
12370            1
12371        }
12372
12373        #[inline(always)]
12374        fn inline_size(_context: fidl::encoding::Context) -> usize {
12375            1
12376        }
12377    }
12378
12379    unsafe impl<D: fidl::encoding::ResourceDialect>
12380        fidl::encoding::Encode<StreamSocketSetTcpQuickAckRequest, D>
12381        for &StreamSocketSetTcpQuickAckRequest
12382    {
12383        #[inline]
12384        unsafe fn encode(
12385            self,
12386            encoder: &mut fidl::encoding::Encoder<'_, D>,
12387            offset: usize,
12388            _depth: fidl::encoding::Depth,
12389        ) -> fidl::Result<()> {
12390            encoder.debug_check_bounds::<StreamSocketSetTcpQuickAckRequest>(offset);
12391            // Delegate to tuple encoding.
12392            fidl::encoding::Encode::<StreamSocketSetTcpQuickAckRequest, D>::encode(
12393                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12394                encoder,
12395                offset,
12396                _depth,
12397            )
12398        }
12399    }
12400    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12401        fidl::encoding::Encode<StreamSocketSetTcpQuickAckRequest, D> for (T0,)
12402    {
12403        #[inline]
12404        unsafe fn encode(
12405            self,
12406            encoder: &mut fidl::encoding::Encoder<'_, D>,
12407            offset: usize,
12408            depth: fidl::encoding::Depth,
12409        ) -> fidl::Result<()> {
12410            encoder.debug_check_bounds::<StreamSocketSetTcpQuickAckRequest>(offset);
12411            // Zero out padding regions. There's no need to apply masks
12412            // because the unmasked parts will be overwritten by fields.
12413            // Write the fields.
12414            self.0.encode(encoder, offset + 0, depth)?;
12415            Ok(())
12416        }
12417    }
12418
12419    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12420        for StreamSocketSetTcpQuickAckRequest
12421    {
12422        #[inline(always)]
12423        fn new_empty() -> Self {
12424            Self { value: fidl::new_empty!(bool, D) }
12425        }
12426
12427        #[inline]
12428        unsafe fn decode(
12429            &mut self,
12430            decoder: &mut fidl::encoding::Decoder<'_, D>,
12431            offset: usize,
12432            _depth: fidl::encoding::Depth,
12433        ) -> fidl::Result<()> {
12434            decoder.debug_check_bounds::<Self>(offset);
12435            // Verify that padding bytes are zero.
12436            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12437            Ok(())
12438        }
12439    }
12440
12441    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpSynCountRequest {
12442        type Borrowed<'a> = &'a Self;
12443        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12444            value
12445        }
12446    }
12447
12448    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpSynCountRequest {
12449        type Owned = Self;
12450
12451        #[inline(always)]
12452        fn inline_align(_context: fidl::encoding::Context) -> usize {
12453            4
12454        }
12455
12456        #[inline(always)]
12457        fn inline_size(_context: fidl::encoding::Context) -> usize {
12458            4
12459        }
12460        #[inline(always)]
12461        fn encode_is_copy() -> bool {
12462            true
12463        }
12464
12465        #[inline(always)]
12466        fn decode_is_copy() -> bool {
12467            true
12468        }
12469    }
12470
12471    unsafe impl<D: fidl::encoding::ResourceDialect>
12472        fidl::encoding::Encode<StreamSocketSetTcpSynCountRequest, D>
12473        for &StreamSocketSetTcpSynCountRequest
12474    {
12475        #[inline]
12476        unsafe fn encode(
12477            self,
12478            encoder: &mut fidl::encoding::Encoder<'_, D>,
12479            offset: usize,
12480            _depth: fidl::encoding::Depth,
12481        ) -> fidl::Result<()> {
12482            encoder.debug_check_bounds::<StreamSocketSetTcpSynCountRequest>(offset);
12483            unsafe {
12484                // Copy the object into the buffer.
12485                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12486                (buf_ptr as *mut StreamSocketSetTcpSynCountRequest)
12487                    .write_unaligned((self as *const StreamSocketSetTcpSynCountRequest).read());
12488                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12489                // done second because the memcpy will write garbage to these bytes.
12490            }
12491            Ok(())
12492        }
12493    }
12494    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12495        fidl::encoding::Encode<StreamSocketSetTcpSynCountRequest, D> for (T0,)
12496    {
12497        #[inline]
12498        unsafe fn encode(
12499            self,
12500            encoder: &mut fidl::encoding::Encoder<'_, D>,
12501            offset: usize,
12502            depth: fidl::encoding::Depth,
12503        ) -> fidl::Result<()> {
12504            encoder.debug_check_bounds::<StreamSocketSetTcpSynCountRequest>(offset);
12505            // Zero out padding regions. There's no need to apply masks
12506            // because the unmasked parts will be overwritten by fields.
12507            // Write the fields.
12508            self.0.encode(encoder, offset + 0, depth)?;
12509            Ok(())
12510        }
12511    }
12512
12513    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12514        for StreamSocketSetTcpSynCountRequest
12515    {
12516        #[inline(always)]
12517        fn new_empty() -> Self {
12518            Self { value: fidl::new_empty!(u32, D) }
12519        }
12520
12521        #[inline]
12522        unsafe fn decode(
12523            &mut self,
12524            decoder: &mut fidl::encoding::Decoder<'_, D>,
12525            offset: usize,
12526            _depth: fidl::encoding::Depth,
12527        ) -> fidl::Result<()> {
12528            decoder.debug_check_bounds::<Self>(offset);
12529            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12530            // Verify that padding bytes are zero.
12531            // Copy from the buffer into the object.
12532            unsafe {
12533                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12534            }
12535            Ok(())
12536        }
12537    }
12538
12539    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpUserTimeoutRequest {
12540        type Borrowed<'a> = &'a Self;
12541        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12542            value
12543        }
12544    }
12545
12546    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpUserTimeoutRequest {
12547        type Owned = Self;
12548
12549        #[inline(always)]
12550        fn inline_align(_context: fidl::encoding::Context) -> usize {
12551            4
12552        }
12553
12554        #[inline(always)]
12555        fn inline_size(_context: fidl::encoding::Context) -> usize {
12556            4
12557        }
12558        #[inline(always)]
12559        fn encode_is_copy() -> bool {
12560            true
12561        }
12562
12563        #[inline(always)]
12564        fn decode_is_copy() -> bool {
12565            true
12566        }
12567    }
12568
12569    unsafe impl<D: fidl::encoding::ResourceDialect>
12570        fidl::encoding::Encode<StreamSocketSetTcpUserTimeoutRequest, D>
12571        for &StreamSocketSetTcpUserTimeoutRequest
12572    {
12573        #[inline]
12574        unsafe fn encode(
12575            self,
12576            encoder: &mut fidl::encoding::Encoder<'_, D>,
12577            offset: usize,
12578            _depth: fidl::encoding::Depth,
12579        ) -> fidl::Result<()> {
12580            encoder.debug_check_bounds::<StreamSocketSetTcpUserTimeoutRequest>(offset);
12581            unsafe {
12582                // Copy the object into the buffer.
12583                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12584                (buf_ptr as *mut StreamSocketSetTcpUserTimeoutRequest)
12585                    .write_unaligned((self as *const StreamSocketSetTcpUserTimeoutRequest).read());
12586                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12587                // done second because the memcpy will write garbage to these bytes.
12588            }
12589            Ok(())
12590        }
12591    }
12592    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12593        fidl::encoding::Encode<StreamSocketSetTcpUserTimeoutRequest, D> for (T0,)
12594    {
12595        #[inline]
12596        unsafe fn encode(
12597            self,
12598            encoder: &mut fidl::encoding::Encoder<'_, D>,
12599            offset: usize,
12600            depth: fidl::encoding::Depth,
12601        ) -> fidl::Result<()> {
12602            encoder.debug_check_bounds::<StreamSocketSetTcpUserTimeoutRequest>(offset);
12603            // Zero out padding regions. There's no need to apply masks
12604            // because the unmasked parts will be overwritten by fields.
12605            // Write the fields.
12606            self.0.encode(encoder, offset + 0, depth)?;
12607            Ok(())
12608        }
12609    }
12610
12611    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12612        for StreamSocketSetTcpUserTimeoutRequest
12613    {
12614        #[inline(always)]
12615        fn new_empty() -> Self {
12616            Self { value_millis: fidl::new_empty!(u32, D) }
12617        }
12618
12619        #[inline]
12620        unsafe fn decode(
12621            &mut self,
12622            decoder: &mut fidl::encoding::Decoder<'_, D>,
12623            offset: usize,
12624            _depth: fidl::encoding::Depth,
12625        ) -> fidl::Result<()> {
12626            decoder.debug_check_bounds::<Self>(offset);
12627            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12628            // Verify that padding bytes are zero.
12629            // Copy from the buffer into the object.
12630            unsafe {
12631                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12632            }
12633            Ok(())
12634        }
12635    }
12636
12637    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpWindowClampRequest {
12638        type Borrowed<'a> = &'a Self;
12639        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12640            value
12641        }
12642    }
12643
12644    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpWindowClampRequest {
12645        type Owned = Self;
12646
12647        #[inline(always)]
12648        fn inline_align(_context: fidl::encoding::Context) -> usize {
12649            4
12650        }
12651
12652        #[inline(always)]
12653        fn inline_size(_context: fidl::encoding::Context) -> usize {
12654            4
12655        }
12656        #[inline(always)]
12657        fn encode_is_copy() -> bool {
12658            true
12659        }
12660
12661        #[inline(always)]
12662        fn decode_is_copy() -> bool {
12663            true
12664        }
12665    }
12666
12667    unsafe impl<D: fidl::encoding::ResourceDialect>
12668        fidl::encoding::Encode<StreamSocketSetTcpWindowClampRequest, D>
12669        for &StreamSocketSetTcpWindowClampRequest
12670    {
12671        #[inline]
12672        unsafe fn encode(
12673            self,
12674            encoder: &mut fidl::encoding::Encoder<'_, D>,
12675            offset: usize,
12676            _depth: fidl::encoding::Depth,
12677        ) -> fidl::Result<()> {
12678            encoder.debug_check_bounds::<StreamSocketSetTcpWindowClampRequest>(offset);
12679            unsafe {
12680                // Copy the object into the buffer.
12681                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12682                (buf_ptr as *mut StreamSocketSetTcpWindowClampRequest)
12683                    .write_unaligned((self as *const StreamSocketSetTcpWindowClampRequest).read());
12684                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12685                // done second because the memcpy will write garbage to these bytes.
12686            }
12687            Ok(())
12688        }
12689    }
12690    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12691        fidl::encoding::Encode<StreamSocketSetTcpWindowClampRequest, D> for (T0,)
12692    {
12693        #[inline]
12694        unsafe fn encode(
12695            self,
12696            encoder: &mut fidl::encoding::Encoder<'_, D>,
12697            offset: usize,
12698            depth: fidl::encoding::Depth,
12699        ) -> fidl::Result<()> {
12700            encoder.debug_check_bounds::<StreamSocketSetTcpWindowClampRequest>(offset);
12701            // Zero out padding regions. There's no need to apply masks
12702            // because the unmasked parts will be overwritten by fields.
12703            // Write the fields.
12704            self.0.encode(encoder, offset + 0, depth)?;
12705            Ok(())
12706        }
12707    }
12708
12709    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12710        for StreamSocketSetTcpWindowClampRequest
12711    {
12712        #[inline(always)]
12713        fn new_empty() -> Self {
12714            Self { value: fidl::new_empty!(u32, D) }
12715        }
12716
12717        #[inline]
12718        unsafe fn decode(
12719            &mut self,
12720            decoder: &mut fidl::encoding::Decoder<'_, D>,
12721            offset: usize,
12722            _depth: fidl::encoding::Depth,
12723        ) -> fidl::Result<()> {
12724            decoder.debug_check_bounds::<Self>(offset);
12725            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12726            // Verify that padding bytes are zero.
12727            // Copy from the buffer into the object.
12728            unsafe {
12729                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12730            }
12731            Ok(())
12732        }
12733    }
12734
12735    impl fidl::encoding::ValueTypeMarker for StreamSocketGetInfoResponse {
12736        type Borrowed<'a> = &'a Self;
12737        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12738            value
12739        }
12740    }
12741
12742    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetInfoResponse {
12743        type Owned = Self;
12744
12745        #[inline(always)]
12746        fn inline_align(_context: fidl::encoding::Context) -> usize {
12747            4
12748        }
12749
12750        #[inline(always)]
12751        fn inline_size(_context: fidl::encoding::Context) -> usize {
12752            8
12753        }
12754    }
12755
12756    unsafe impl<D: fidl::encoding::ResourceDialect>
12757        fidl::encoding::Encode<StreamSocketGetInfoResponse, D> for &StreamSocketGetInfoResponse
12758    {
12759        #[inline]
12760        unsafe fn encode(
12761            self,
12762            encoder: &mut fidl::encoding::Encoder<'_, D>,
12763            offset: usize,
12764            _depth: fidl::encoding::Depth,
12765        ) -> fidl::Result<()> {
12766            encoder.debug_check_bounds::<StreamSocketGetInfoResponse>(offset);
12767            // Delegate to tuple encoding.
12768            fidl::encoding::Encode::<StreamSocketGetInfoResponse, D>::encode(
12769                (
12770                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
12771                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
12772                ),
12773                encoder,
12774                offset,
12775                _depth,
12776            )
12777        }
12778    }
12779    unsafe impl<
12780        D: fidl::encoding::ResourceDialect,
12781        T0: fidl::encoding::Encode<Domain, D>,
12782        T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
12783    > fidl::encoding::Encode<StreamSocketGetInfoResponse, D> for (T0, T1)
12784    {
12785        #[inline]
12786        unsafe fn encode(
12787            self,
12788            encoder: &mut fidl::encoding::Encoder<'_, D>,
12789            offset: usize,
12790            depth: fidl::encoding::Depth,
12791        ) -> fidl::Result<()> {
12792            encoder.debug_check_bounds::<StreamSocketGetInfoResponse>(offset);
12793            // Zero out padding regions. There's no need to apply masks
12794            // because the unmasked parts will be overwritten by fields.
12795            unsafe {
12796                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
12797                (ptr as *mut u32).write_unaligned(0);
12798            }
12799            // Write the fields.
12800            self.0.encode(encoder, offset + 0, depth)?;
12801            self.1.encode(encoder, offset + 4, depth)?;
12802            Ok(())
12803        }
12804    }
12805
12806    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12807        for StreamSocketGetInfoResponse
12808    {
12809        #[inline(always)]
12810        fn new_empty() -> Self {
12811            Self {
12812                domain: fidl::new_empty!(Domain, D),
12813                proto: fidl::new_empty!(StreamSocketProtocol, D),
12814            }
12815        }
12816
12817        #[inline]
12818        unsafe fn decode(
12819            &mut self,
12820            decoder: &mut fidl::encoding::Decoder<'_, D>,
12821            offset: usize,
12822            _depth: fidl::encoding::Depth,
12823        ) -> fidl::Result<()> {
12824            decoder.debug_check_bounds::<Self>(offset);
12825            // Verify that padding bytes are zero.
12826            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
12827            let padval = unsafe { (ptr as *const u32).read_unaligned() };
12828            let mask = 0xffff0000u32;
12829            let maskedval = padval & mask;
12830            if maskedval != 0 {
12831                return Err(fidl::Error::NonZeroPadding {
12832                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
12833                });
12834            }
12835            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
12836            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
12837            Ok(())
12838        }
12839    }
12840
12841    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpCongestionResponse {
12842        type Borrowed<'a> = &'a Self;
12843        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12844            value
12845        }
12846    }
12847
12848    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpCongestionResponse {
12849        type Owned = Self;
12850
12851        #[inline(always)]
12852        fn inline_align(_context: fidl::encoding::Context) -> usize {
12853            4
12854        }
12855
12856        #[inline(always)]
12857        fn inline_size(_context: fidl::encoding::Context) -> usize {
12858            4
12859        }
12860    }
12861
12862    unsafe impl<D: fidl::encoding::ResourceDialect>
12863        fidl::encoding::Encode<StreamSocketGetTcpCongestionResponse, D>
12864        for &StreamSocketGetTcpCongestionResponse
12865    {
12866        #[inline]
12867        unsafe fn encode(
12868            self,
12869            encoder: &mut fidl::encoding::Encoder<'_, D>,
12870            offset: usize,
12871            _depth: fidl::encoding::Depth,
12872        ) -> fidl::Result<()> {
12873            encoder.debug_check_bounds::<StreamSocketGetTcpCongestionResponse>(offset);
12874            // Delegate to tuple encoding.
12875            fidl::encoding::Encode::<StreamSocketGetTcpCongestionResponse, D>::encode(
12876                (<TcpCongestionControl as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12877                encoder,
12878                offset,
12879                _depth,
12880            )
12881        }
12882    }
12883    unsafe impl<
12884        D: fidl::encoding::ResourceDialect,
12885        T0: fidl::encoding::Encode<TcpCongestionControl, D>,
12886    > fidl::encoding::Encode<StreamSocketGetTcpCongestionResponse, D> for (T0,)
12887    {
12888        #[inline]
12889        unsafe fn encode(
12890            self,
12891            encoder: &mut fidl::encoding::Encoder<'_, D>,
12892            offset: usize,
12893            depth: fidl::encoding::Depth,
12894        ) -> fidl::Result<()> {
12895            encoder.debug_check_bounds::<StreamSocketGetTcpCongestionResponse>(offset);
12896            // Zero out padding regions. There's no need to apply masks
12897            // because the unmasked parts will be overwritten by fields.
12898            // Write the fields.
12899            self.0.encode(encoder, offset + 0, depth)?;
12900            Ok(())
12901        }
12902    }
12903
12904    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12905        for StreamSocketGetTcpCongestionResponse
12906    {
12907        #[inline(always)]
12908        fn new_empty() -> Self {
12909            Self { value: fidl::new_empty!(TcpCongestionControl, D) }
12910        }
12911
12912        #[inline]
12913        unsafe fn decode(
12914            &mut self,
12915            decoder: &mut fidl::encoding::Decoder<'_, D>,
12916            offset: usize,
12917            _depth: fidl::encoding::Depth,
12918        ) -> fidl::Result<()> {
12919            decoder.debug_check_bounds::<Self>(offset);
12920            // Verify that padding bytes are zero.
12921            fidl::decode!(TcpCongestionControl, D, &mut self.value, decoder, offset + 0, _depth)?;
12922            Ok(())
12923        }
12924    }
12925
12926    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpCorkResponse {
12927        type Borrowed<'a> = &'a Self;
12928        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12929            value
12930        }
12931    }
12932
12933    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpCorkResponse {
12934        type Owned = Self;
12935
12936        #[inline(always)]
12937        fn inline_align(_context: fidl::encoding::Context) -> usize {
12938            1
12939        }
12940
12941        #[inline(always)]
12942        fn inline_size(_context: fidl::encoding::Context) -> usize {
12943            1
12944        }
12945    }
12946
12947    unsafe impl<D: fidl::encoding::ResourceDialect>
12948        fidl::encoding::Encode<StreamSocketGetTcpCorkResponse, D>
12949        for &StreamSocketGetTcpCorkResponse
12950    {
12951        #[inline]
12952        unsafe fn encode(
12953            self,
12954            encoder: &mut fidl::encoding::Encoder<'_, D>,
12955            offset: usize,
12956            _depth: fidl::encoding::Depth,
12957        ) -> fidl::Result<()> {
12958            encoder.debug_check_bounds::<StreamSocketGetTcpCorkResponse>(offset);
12959            // Delegate to tuple encoding.
12960            fidl::encoding::Encode::<StreamSocketGetTcpCorkResponse, D>::encode(
12961                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12962                encoder,
12963                offset,
12964                _depth,
12965            )
12966        }
12967    }
12968    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12969        fidl::encoding::Encode<StreamSocketGetTcpCorkResponse, D> for (T0,)
12970    {
12971        #[inline]
12972        unsafe fn encode(
12973            self,
12974            encoder: &mut fidl::encoding::Encoder<'_, D>,
12975            offset: usize,
12976            depth: fidl::encoding::Depth,
12977        ) -> fidl::Result<()> {
12978            encoder.debug_check_bounds::<StreamSocketGetTcpCorkResponse>(offset);
12979            // Zero out padding regions. There's no need to apply masks
12980            // because the unmasked parts will be overwritten by fields.
12981            // Write the fields.
12982            self.0.encode(encoder, offset + 0, depth)?;
12983            Ok(())
12984        }
12985    }
12986
12987    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12988        for StreamSocketGetTcpCorkResponse
12989    {
12990        #[inline(always)]
12991        fn new_empty() -> Self {
12992            Self { value: fidl::new_empty!(bool, D) }
12993        }
12994
12995        #[inline]
12996        unsafe fn decode(
12997            &mut self,
12998            decoder: &mut fidl::encoding::Decoder<'_, D>,
12999            offset: usize,
13000            _depth: fidl::encoding::Depth,
13001        ) -> fidl::Result<()> {
13002            decoder.debug_check_bounds::<Self>(offset);
13003            // Verify that padding bytes are zero.
13004            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13005            Ok(())
13006        }
13007    }
13008
13009    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpDeferAcceptResponse {
13010        type Borrowed<'a> = &'a Self;
13011        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13012            value
13013        }
13014    }
13015
13016    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpDeferAcceptResponse {
13017        type Owned = Self;
13018
13019        #[inline(always)]
13020        fn inline_align(_context: fidl::encoding::Context) -> usize {
13021            4
13022        }
13023
13024        #[inline(always)]
13025        fn inline_size(_context: fidl::encoding::Context) -> usize {
13026            4
13027        }
13028        #[inline(always)]
13029        fn encode_is_copy() -> bool {
13030            true
13031        }
13032
13033        #[inline(always)]
13034        fn decode_is_copy() -> bool {
13035            true
13036        }
13037    }
13038
13039    unsafe impl<D: fidl::encoding::ResourceDialect>
13040        fidl::encoding::Encode<StreamSocketGetTcpDeferAcceptResponse, D>
13041        for &StreamSocketGetTcpDeferAcceptResponse
13042    {
13043        #[inline]
13044        unsafe fn encode(
13045            self,
13046            encoder: &mut fidl::encoding::Encoder<'_, D>,
13047            offset: usize,
13048            _depth: fidl::encoding::Depth,
13049        ) -> fidl::Result<()> {
13050            encoder.debug_check_bounds::<StreamSocketGetTcpDeferAcceptResponse>(offset);
13051            unsafe {
13052                // Copy the object into the buffer.
13053                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13054                (buf_ptr as *mut StreamSocketGetTcpDeferAcceptResponse)
13055                    .write_unaligned((self as *const StreamSocketGetTcpDeferAcceptResponse).read());
13056                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13057                // done second because the memcpy will write garbage to these bytes.
13058            }
13059            Ok(())
13060        }
13061    }
13062    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13063        fidl::encoding::Encode<StreamSocketGetTcpDeferAcceptResponse, D> for (T0,)
13064    {
13065        #[inline]
13066        unsafe fn encode(
13067            self,
13068            encoder: &mut fidl::encoding::Encoder<'_, D>,
13069            offset: usize,
13070            depth: fidl::encoding::Depth,
13071        ) -> fidl::Result<()> {
13072            encoder.debug_check_bounds::<StreamSocketGetTcpDeferAcceptResponse>(offset);
13073            // Zero out padding regions. There's no need to apply masks
13074            // because the unmasked parts will be overwritten by fields.
13075            // Write the fields.
13076            self.0.encode(encoder, offset + 0, depth)?;
13077            Ok(())
13078        }
13079    }
13080
13081    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13082        for StreamSocketGetTcpDeferAcceptResponse
13083    {
13084        #[inline(always)]
13085        fn new_empty() -> Self {
13086            Self { value_secs: fidl::new_empty!(u32, D) }
13087        }
13088
13089        #[inline]
13090        unsafe fn decode(
13091            &mut self,
13092            decoder: &mut fidl::encoding::Decoder<'_, D>,
13093            offset: usize,
13094            _depth: fidl::encoding::Depth,
13095        ) -> fidl::Result<()> {
13096            decoder.debug_check_bounds::<Self>(offset);
13097            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13098            // Verify that padding bytes are zero.
13099            // Copy from the buffer into the object.
13100            unsafe {
13101                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13102            }
13103            Ok(())
13104        }
13105    }
13106
13107    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpInfoResponse {
13108        type Borrowed<'a> = &'a Self;
13109        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13110            value
13111        }
13112    }
13113
13114    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpInfoResponse {
13115        type Owned = Self;
13116
13117        #[inline(always)]
13118        fn inline_align(_context: fidl::encoding::Context) -> usize {
13119            8
13120        }
13121
13122        #[inline(always)]
13123        fn inline_size(_context: fidl::encoding::Context) -> usize {
13124            16
13125        }
13126    }
13127
13128    unsafe impl<D: fidl::encoding::ResourceDialect>
13129        fidl::encoding::Encode<StreamSocketGetTcpInfoResponse, D>
13130        for &StreamSocketGetTcpInfoResponse
13131    {
13132        #[inline]
13133        unsafe fn encode(
13134            self,
13135            encoder: &mut fidl::encoding::Encoder<'_, D>,
13136            offset: usize,
13137            _depth: fidl::encoding::Depth,
13138        ) -> fidl::Result<()> {
13139            encoder.debug_check_bounds::<StreamSocketGetTcpInfoResponse>(offset);
13140            // Delegate to tuple encoding.
13141            fidl::encoding::Encode::<StreamSocketGetTcpInfoResponse, D>::encode(
13142                (<TcpInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
13143                encoder,
13144                offset,
13145                _depth,
13146            )
13147        }
13148    }
13149    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TcpInfo, D>>
13150        fidl::encoding::Encode<StreamSocketGetTcpInfoResponse, D> for (T0,)
13151    {
13152        #[inline]
13153        unsafe fn encode(
13154            self,
13155            encoder: &mut fidl::encoding::Encoder<'_, D>,
13156            offset: usize,
13157            depth: fidl::encoding::Depth,
13158        ) -> fidl::Result<()> {
13159            encoder.debug_check_bounds::<StreamSocketGetTcpInfoResponse>(offset);
13160            // Zero out padding regions. There's no need to apply masks
13161            // because the unmasked parts will be overwritten by fields.
13162            // Write the fields.
13163            self.0.encode(encoder, offset + 0, depth)?;
13164            Ok(())
13165        }
13166    }
13167
13168    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13169        for StreamSocketGetTcpInfoResponse
13170    {
13171        #[inline(always)]
13172        fn new_empty() -> Self {
13173            Self { info: fidl::new_empty!(TcpInfo, D) }
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            fidl::decode!(TcpInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
13186            Ok(())
13187        }
13188    }
13189
13190    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveCountResponse {
13191        type Borrowed<'a> = &'a Self;
13192        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13193            value
13194        }
13195    }
13196
13197    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveCountResponse {
13198        type Owned = Self;
13199
13200        #[inline(always)]
13201        fn inline_align(_context: fidl::encoding::Context) -> usize {
13202            4
13203        }
13204
13205        #[inline(always)]
13206        fn inline_size(_context: fidl::encoding::Context) -> usize {
13207            4
13208        }
13209        #[inline(always)]
13210        fn encode_is_copy() -> bool {
13211            true
13212        }
13213
13214        #[inline(always)]
13215        fn decode_is_copy() -> bool {
13216            true
13217        }
13218    }
13219
13220    unsafe impl<D: fidl::encoding::ResourceDialect>
13221        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveCountResponse, D>
13222        for &StreamSocketGetTcpKeepAliveCountResponse
13223    {
13224        #[inline]
13225        unsafe fn encode(
13226            self,
13227            encoder: &mut fidl::encoding::Encoder<'_, D>,
13228            offset: usize,
13229            _depth: fidl::encoding::Depth,
13230        ) -> fidl::Result<()> {
13231            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveCountResponse>(offset);
13232            unsafe {
13233                // Copy the object into the buffer.
13234                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13235                (buf_ptr as *mut StreamSocketGetTcpKeepAliveCountResponse).write_unaligned(
13236                    (self as *const StreamSocketGetTcpKeepAliveCountResponse).read(),
13237                );
13238                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13239                // done second because the memcpy will write garbage to these bytes.
13240            }
13241            Ok(())
13242        }
13243    }
13244    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13245        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveCountResponse, 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::<StreamSocketGetTcpKeepAliveCountResponse>(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 StreamSocketGetTcpKeepAliveCountResponse
13265    {
13266        #[inline(always)]
13267        fn new_empty() -> Self {
13268            Self { value: fidl::new_empty!(u32, 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            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13280            // Verify that padding bytes are zero.
13281            // Copy from the buffer into the object.
13282            unsafe {
13283                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13284            }
13285            Ok(())
13286        }
13287    }
13288
13289    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveIdleResponse {
13290        type Borrowed<'a> = &'a Self;
13291        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13292            value
13293        }
13294    }
13295
13296    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveIdleResponse {
13297        type Owned = Self;
13298
13299        #[inline(always)]
13300        fn inline_align(_context: fidl::encoding::Context) -> usize {
13301            4
13302        }
13303
13304        #[inline(always)]
13305        fn inline_size(_context: fidl::encoding::Context) -> usize {
13306            4
13307        }
13308        #[inline(always)]
13309        fn encode_is_copy() -> bool {
13310            true
13311        }
13312
13313        #[inline(always)]
13314        fn decode_is_copy() -> bool {
13315            true
13316        }
13317    }
13318
13319    unsafe impl<D: fidl::encoding::ResourceDialect>
13320        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIdleResponse, D>
13321        for &StreamSocketGetTcpKeepAliveIdleResponse
13322    {
13323        #[inline]
13324        unsafe fn encode(
13325            self,
13326            encoder: &mut fidl::encoding::Encoder<'_, D>,
13327            offset: usize,
13328            _depth: fidl::encoding::Depth,
13329        ) -> fidl::Result<()> {
13330            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIdleResponse>(offset);
13331            unsafe {
13332                // Copy the object into the buffer.
13333                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13334                (buf_ptr as *mut StreamSocketGetTcpKeepAliveIdleResponse).write_unaligned(
13335                    (self as *const StreamSocketGetTcpKeepAliveIdleResponse).read(),
13336                );
13337                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13338                // done second because the memcpy will write garbage to these bytes.
13339            }
13340            Ok(())
13341        }
13342    }
13343    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13344        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIdleResponse, D> for (T0,)
13345    {
13346        #[inline]
13347        unsafe fn encode(
13348            self,
13349            encoder: &mut fidl::encoding::Encoder<'_, D>,
13350            offset: usize,
13351            depth: fidl::encoding::Depth,
13352        ) -> fidl::Result<()> {
13353            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIdleResponse>(offset);
13354            // Zero out padding regions. There's no need to apply masks
13355            // because the unmasked parts will be overwritten by fields.
13356            // Write the fields.
13357            self.0.encode(encoder, offset + 0, depth)?;
13358            Ok(())
13359        }
13360    }
13361
13362    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13363        for StreamSocketGetTcpKeepAliveIdleResponse
13364    {
13365        #[inline(always)]
13366        fn new_empty() -> Self {
13367            Self { value_secs: fidl::new_empty!(u32, D) }
13368        }
13369
13370        #[inline]
13371        unsafe fn decode(
13372            &mut self,
13373            decoder: &mut fidl::encoding::Decoder<'_, D>,
13374            offset: usize,
13375            _depth: fidl::encoding::Depth,
13376        ) -> fidl::Result<()> {
13377            decoder.debug_check_bounds::<Self>(offset);
13378            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13379            // Verify that padding bytes are zero.
13380            // Copy from the buffer into the object.
13381            unsafe {
13382                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13383            }
13384            Ok(())
13385        }
13386    }
13387
13388    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveIntervalResponse {
13389        type Borrowed<'a> = &'a Self;
13390        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13391            value
13392        }
13393    }
13394
13395    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveIntervalResponse {
13396        type Owned = Self;
13397
13398        #[inline(always)]
13399        fn inline_align(_context: fidl::encoding::Context) -> usize {
13400            4
13401        }
13402
13403        #[inline(always)]
13404        fn inline_size(_context: fidl::encoding::Context) -> usize {
13405            4
13406        }
13407        #[inline(always)]
13408        fn encode_is_copy() -> bool {
13409            true
13410        }
13411
13412        #[inline(always)]
13413        fn decode_is_copy() -> bool {
13414            true
13415        }
13416    }
13417
13418    unsafe impl<D: fidl::encoding::ResourceDialect>
13419        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIntervalResponse, D>
13420        for &StreamSocketGetTcpKeepAliveIntervalResponse
13421    {
13422        #[inline]
13423        unsafe fn encode(
13424            self,
13425            encoder: &mut fidl::encoding::Encoder<'_, D>,
13426            offset: usize,
13427            _depth: fidl::encoding::Depth,
13428        ) -> fidl::Result<()> {
13429            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIntervalResponse>(offset);
13430            unsafe {
13431                // Copy the object into the buffer.
13432                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13433                (buf_ptr as *mut StreamSocketGetTcpKeepAliveIntervalResponse).write_unaligned(
13434                    (self as *const StreamSocketGetTcpKeepAliveIntervalResponse).read(),
13435                );
13436                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13437                // done second because the memcpy will write garbage to these bytes.
13438            }
13439            Ok(())
13440        }
13441    }
13442    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13443        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIntervalResponse, D> for (T0,)
13444    {
13445        #[inline]
13446        unsafe fn encode(
13447            self,
13448            encoder: &mut fidl::encoding::Encoder<'_, D>,
13449            offset: usize,
13450            depth: fidl::encoding::Depth,
13451        ) -> fidl::Result<()> {
13452            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIntervalResponse>(offset);
13453            // Zero out padding regions. There's no need to apply masks
13454            // because the unmasked parts will be overwritten by fields.
13455            // Write the fields.
13456            self.0.encode(encoder, offset + 0, depth)?;
13457            Ok(())
13458        }
13459    }
13460
13461    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13462        for StreamSocketGetTcpKeepAliveIntervalResponse
13463    {
13464        #[inline(always)]
13465        fn new_empty() -> Self {
13466            Self { value_secs: fidl::new_empty!(u32, D) }
13467        }
13468
13469        #[inline]
13470        unsafe fn decode(
13471            &mut self,
13472            decoder: &mut fidl::encoding::Decoder<'_, D>,
13473            offset: usize,
13474            _depth: fidl::encoding::Depth,
13475        ) -> fidl::Result<()> {
13476            decoder.debug_check_bounds::<Self>(offset);
13477            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13478            // Verify that padding bytes are zero.
13479            // Copy from the buffer into the object.
13480            unsafe {
13481                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13482            }
13483            Ok(())
13484        }
13485    }
13486
13487    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpLingerResponse {
13488        type Borrowed<'a> = &'a Self;
13489        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13490            value
13491        }
13492    }
13493
13494    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpLingerResponse {
13495        type Owned = Self;
13496
13497        #[inline(always)]
13498        fn inline_align(_context: fidl::encoding::Context) -> usize {
13499            8
13500        }
13501
13502        #[inline(always)]
13503        fn inline_size(_context: fidl::encoding::Context) -> usize {
13504            16
13505        }
13506    }
13507
13508    unsafe impl<D: fidl::encoding::ResourceDialect>
13509        fidl::encoding::Encode<StreamSocketGetTcpLingerResponse, D>
13510        for &StreamSocketGetTcpLingerResponse
13511    {
13512        #[inline]
13513        unsafe fn encode(
13514            self,
13515            encoder: &mut fidl::encoding::Encoder<'_, D>,
13516            offset: usize,
13517            _depth: fidl::encoding::Depth,
13518        ) -> fidl::Result<()> {
13519            encoder.debug_check_bounds::<StreamSocketGetTcpLingerResponse>(offset);
13520            // Delegate to tuple encoding.
13521            fidl::encoding::Encode::<StreamSocketGetTcpLingerResponse, D>::encode(
13522                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value_secs),),
13523                encoder,
13524                offset,
13525                _depth,
13526            )
13527        }
13528    }
13529    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
13530        fidl::encoding::Encode<StreamSocketGetTcpLingerResponse, D> for (T0,)
13531    {
13532        #[inline]
13533        unsafe fn encode(
13534            self,
13535            encoder: &mut fidl::encoding::Encoder<'_, D>,
13536            offset: usize,
13537            depth: fidl::encoding::Depth,
13538        ) -> fidl::Result<()> {
13539            encoder.debug_check_bounds::<StreamSocketGetTcpLingerResponse>(offset);
13540            // Zero out padding regions. There's no need to apply masks
13541            // because the unmasked parts will be overwritten by fields.
13542            // Write the fields.
13543            self.0.encode(encoder, offset + 0, depth)?;
13544            Ok(())
13545        }
13546    }
13547
13548    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13549        for StreamSocketGetTcpLingerResponse
13550    {
13551        #[inline(always)]
13552        fn new_empty() -> Self {
13553            Self { value_secs: fidl::new_empty!(OptionalUint32, D) }
13554        }
13555
13556        #[inline]
13557        unsafe fn decode(
13558            &mut self,
13559            decoder: &mut fidl::encoding::Decoder<'_, D>,
13560            offset: usize,
13561            _depth: fidl::encoding::Depth,
13562        ) -> fidl::Result<()> {
13563            decoder.debug_check_bounds::<Self>(offset);
13564            // Verify that padding bytes are zero.
13565            fidl::decode!(OptionalUint32, D, &mut self.value_secs, decoder, offset + 0, _depth)?;
13566            Ok(())
13567        }
13568    }
13569
13570    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpMaxSegmentResponse {
13571        type Borrowed<'a> = &'a Self;
13572        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13573            value
13574        }
13575    }
13576
13577    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpMaxSegmentResponse {
13578        type Owned = Self;
13579
13580        #[inline(always)]
13581        fn inline_align(_context: fidl::encoding::Context) -> usize {
13582            4
13583        }
13584
13585        #[inline(always)]
13586        fn inline_size(_context: fidl::encoding::Context) -> usize {
13587            4
13588        }
13589        #[inline(always)]
13590        fn encode_is_copy() -> bool {
13591            true
13592        }
13593
13594        #[inline(always)]
13595        fn decode_is_copy() -> bool {
13596            true
13597        }
13598    }
13599
13600    unsafe impl<D: fidl::encoding::ResourceDialect>
13601        fidl::encoding::Encode<StreamSocketGetTcpMaxSegmentResponse, D>
13602        for &StreamSocketGetTcpMaxSegmentResponse
13603    {
13604        #[inline]
13605        unsafe fn encode(
13606            self,
13607            encoder: &mut fidl::encoding::Encoder<'_, D>,
13608            offset: usize,
13609            _depth: fidl::encoding::Depth,
13610        ) -> fidl::Result<()> {
13611            encoder.debug_check_bounds::<StreamSocketGetTcpMaxSegmentResponse>(offset);
13612            unsafe {
13613                // Copy the object into the buffer.
13614                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13615                (buf_ptr as *mut StreamSocketGetTcpMaxSegmentResponse)
13616                    .write_unaligned((self as *const StreamSocketGetTcpMaxSegmentResponse).read());
13617                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13618                // done second because the memcpy will write garbage to these bytes.
13619            }
13620            Ok(())
13621        }
13622    }
13623    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13624        fidl::encoding::Encode<StreamSocketGetTcpMaxSegmentResponse, D> for (T0,)
13625    {
13626        #[inline]
13627        unsafe fn encode(
13628            self,
13629            encoder: &mut fidl::encoding::Encoder<'_, D>,
13630            offset: usize,
13631            depth: fidl::encoding::Depth,
13632        ) -> fidl::Result<()> {
13633            encoder.debug_check_bounds::<StreamSocketGetTcpMaxSegmentResponse>(offset);
13634            // Zero out padding regions. There's no need to apply masks
13635            // because the unmasked parts will be overwritten by fields.
13636            // Write the fields.
13637            self.0.encode(encoder, offset + 0, depth)?;
13638            Ok(())
13639        }
13640    }
13641
13642    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13643        for StreamSocketGetTcpMaxSegmentResponse
13644    {
13645        #[inline(always)]
13646        fn new_empty() -> Self {
13647            Self { value_bytes: fidl::new_empty!(u32, D) }
13648        }
13649
13650        #[inline]
13651        unsafe fn decode(
13652            &mut self,
13653            decoder: &mut fidl::encoding::Decoder<'_, D>,
13654            offset: usize,
13655            _depth: fidl::encoding::Depth,
13656        ) -> fidl::Result<()> {
13657            decoder.debug_check_bounds::<Self>(offset);
13658            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13659            // Verify that padding bytes are zero.
13660            // Copy from the buffer into the object.
13661            unsafe {
13662                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13663            }
13664            Ok(())
13665        }
13666    }
13667
13668    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpNoDelayResponse {
13669        type Borrowed<'a> = &'a Self;
13670        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13671            value
13672        }
13673    }
13674
13675    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpNoDelayResponse {
13676        type Owned = Self;
13677
13678        #[inline(always)]
13679        fn inline_align(_context: fidl::encoding::Context) -> usize {
13680            1
13681        }
13682
13683        #[inline(always)]
13684        fn inline_size(_context: fidl::encoding::Context) -> usize {
13685            1
13686        }
13687    }
13688
13689    unsafe impl<D: fidl::encoding::ResourceDialect>
13690        fidl::encoding::Encode<StreamSocketGetTcpNoDelayResponse, D>
13691        for &StreamSocketGetTcpNoDelayResponse
13692    {
13693        #[inline]
13694        unsafe fn encode(
13695            self,
13696            encoder: &mut fidl::encoding::Encoder<'_, D>,
13697            offset: usize,
13698            _depth: fidl::encoding::Depth,
13699        ) -> fidl::Result<()> {
13700            encoder.debug_check_bounds::<StreamSocketGetTcpNoDelayResponse>(offset);
13701            // Delegate to tuple encoding.
13702            fidl::encoding::Encode::<StreamSocketGetTcpNoDelayResponse, D>::encode(
13703                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
13704                encoder,
13705                offset,
13706                _depth,
13707            )
13708        }
13709    }
13710    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
13711        fidl::encoding::Encode<StreamSocketGetTcpNoDelayResponse, D> for (T0,)
13712    {
13713        #[inline]
13714        unsafe fn encode(
13715            self,
13716            encoder: &mut fidl::encoding::Encoder<'_, D>,
13717            offset: usize,
13718            depth: fidl::encoding::Depth,
13719        ) -> fidl::Result<()> {
13720            encoder.debug_check_bounds::<StreamSocketGetTcpNoDelayResponse>(offset);
13721            // Zero out padding regions. There's no need to apply masks
13722            // because the unmasked parts will be overwritten by fields.
13723            // Write the fields.
13724            self.0.encode(encoder, offset + 0, depth)?;
13725            Ok(())
13726        }
13727    }
13728
13729    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13730        for StreamSocketGetTcpNoDelayResponse
13731    {
13732        #[inline(always)]
13733        fn new_empty() -> Self {
13734            Self { value: fidl::new_empty!(bool, D) }
13735        }
13736
13737        #[inline]
13738        unsafe fn decode(
13739            &mut self,
13740            decoder: &mut fidl::encoding::Decoder<'_, D>,
13741            offset: usize,
13742            _depth: fidl::encoding::Depth,
13743        ) -> fidl::Result<()> {
13744            decoder.debug_check_bounds::<Self>(offset);
13745            // Verify that padding bytes are zero.
13746            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13747            Ok(())
13748        }
13749    }
13750
13751    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpQuickAckResponse {
13752        type Borrowed<'a> = &'a Self;
13753        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13754            value
13755        }
13756    }
13757
13758    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpQuickAckResponse {
13759        type Owned = Self;
13760
13761        #[inline(always)]
13762        fn inline_align(_context: fidl::encoding::Context) -> usize {
13763            1
13764        }
13765
13766        #[inline(always)]
13767        fn inline_size(_context: fidl::encoding::Context) -> usize {
13768            1
13769        }
13770    }
13771
13772    unsafe impl<D: fidl::encoding::ResourceDialect>
13773        fidl::encoding::Encode<StreamSocketGetTcpQuickAckResponse, D>
13774        for &StreamSocketGetTcpQuickAckResponse
13775    {
13776        #[inline]
13777        unsafe fn encode(
13778            self,
13779            encoder: &mut fidl::encoding::Encoder<'_, D>,
13780            offset: usize,
13781            _depth: fidl::encoding::Depth,
13782        ) -> fidl::Result<()> {
13783            encoder.debug_check_bounds::<StreamSocketGetTcpQuickAckResponse>(offset);
13784            // Delegate to tuple encoding.
13785            fidl::encoding::Encode::<StreamSocketGetTcpQuickAckResponse, D>::encode(
13786                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
13787                encoder,
13788                offset,
13789                _depth,
13790            )
13791        }
13792    }
13793    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
13794        fidl::encoding::Encode<StreamSocketGetTcpQuickAckResponse, D> for (T0,)
13795    {
13796        #[inline]
13797        unsafe fn encode(
13798            self,
13799            encoder: &mut fidl::encoding::Encoder<'_, D>,
13800            offset: usize,
13801            depth: fidl::encoding::Depth,
13802        ) -> fidl::Result<()> {
13803            encoder.debug_check_bounds::<StreamSocketGetTcpQuickAckResponse>(offset);
13804            // Zero out padding regions. There's no need to apply masks
13805            // because the unmasked parts will be overwritten by fields.
13806            // Write the fields.
13807            self.0.encode(encoder, offset + 0, depth)?;
13808            Ok(())
13809        }
13810    }
13811
13812    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13813        for StreamSocketGetTcpQuickAckResponse
13814    {
13815        #[inline(always)]
13816        fn new_empty() -> Self {
13817            Self { value: fidl::new_empty!(bool, D) }
13818        }
13819
13820        #[inline]
13821        unsafe fn decode(
13822            &mut self,
13823            decoder: &mut fidl::encoding::Decoder<'_, D>,
13824            offset: usize,
13825            _depth: fidl::encoding::Depth,
13826        ) -> fidl::Result<()> {
13827            decoder.debug_check_bounds::<Self>(offset);
13828            // Verify that padding bytes are zero.
13829            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13830            Ok(())
13831        }
13832    }
13833
13834    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpSynCountResponse {
13835        type Borrowed<'a> = &'a Self;
13836        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13837            value
13838        }
13839    }
13840
13841    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpSynCountResponse {
13842        type Owned = Self;
13843
13844        #[inline(always)]
13845        fn inline_align(_context: fidl::encoding::Context) -> usize {
13846            4
13847        }
13848
13849        #[inline(always)]
13850        fn inline_size(_context: fidl::encoding::Context) -> usize {
13851            4
13852        }
13853        #[inline(always)]
13854        fn encode_is_copy() -> bool {
13855            true
13856        }
13857
13858        #[inline(always)]
13859        fn decode_is_copy() -> bool {
13860            true
13861        }
13862    }
13863
13864    unsafe impl<D: fidl::encoding::ResourceDialect>
13865        fidl::encoding::Encode<StreamSocketGetTcpSynCountResponse, D>
13866        for &StreamSocketGetTcpSynCountResponse
13867    {
13868        #[inline]
13869        unsafe fn encode(
13870            self,
13871            encoder: &mut fidl::encoding::Encoder<'_, D>,
13872            offset: usize,
13873            _depth: fidl::encoding::Depth,
13874        ) -> fidl::Result<()> {
13875            encoder.debug_check_bounds::<StreamSocketGetTcpSynCountResponse>(offset);
13876            unsafe {
13877                // Copy the object into the buffer.
13878                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13879                (buf_ptr as *mut StreamSocketGetTcpSynCountResponse)
13880                    .write_unaligned((self as *const StreamSocketGetTcpSynCountResponse).read());
13881                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13882                // done second because the memcpy will write garbage to these bytes.
13883            }
13884            Ok(())
13885        }
13886    }
13887    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13888        fidl::encoding::Encode<StreamSocketGetTcpSynCountResponse, D> for (T0,)
13889    {
13890        #[inline]
13891        unsafe fn encode(
13892            self,
13893            encoder: &mut fidl::encoding::Encoder<'_, D>,
13894            offset: usize,
13895            depth: fidl::encoding::Depth,
13896        ) -> fidl::Result<()> {
13897            encoder.debug_check_bounds::<StreamSocketGetTcpSynCountResponse>(offset);
13898            // Zero out padding regions. There's no need to apply masks
13899            // because the unmasked parts will be overwritten by fields.
13900            // Write the fields.
13901            self.0.encode(encoder, offset + 0, depth)?;
13902            Ok(())
13903        }
13904    }
13905
13906    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13907        for StreamSocketGetTcpSynCountResponse
13908    {
13909        #[inline(always)]
13910        fn new_empty() -> Self {
13911            Self { value: fidl::new_empty!(u32, D) }
13912        }
13913
13914        #[inline]
13915        unsafe fn decode(
13916            &mut self,
13917            decoder: &mut fidl::encoding::Decoder<'_, D>,
13918            offset: usize,
13919            _depth: fidl::encoding::Depth,
13920        ) -> fidl::Result<()> {
13921            decoder.debug_check_bounds::<Self>(offset);
13922            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13923            // Verify that padding bytes are zero.
13924            // Copy from the buffer into the object.
13925            unsafe {
13926                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13927            }
13928            Ok(())
13929        }
13930    }
13931
13932    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpUserTimeoutResponse {
13933        type Borrowed<'a> = &'a Self;
13934        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13935            value
13936        }
13937    }
13938
13939    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpUserTimeoutResponse {
13940        type Owned = Self;
13941
13942        #[inline(always)]
13943        fn inline_align(_context: fidl::encoding::Context) -> usize {
13944            4
13945        }
13946
13947        #[inline(always)]
13948        fn inline_size(_context: fidl::encoding::Context) -> usize {
13949            4
13950        }
13951        #[inline(always)]
13952        fn encode_is_copy() -> bool {
13953            true
13954        }
13955
13956        #[inline(always)]
13957        fn decode_is_copy() -> bool {
13958            true
13959        }
13960    }
13961
13962    unsafe impl<D: fidl::encoding::ResourceDialect>
13963        fidl::encoding::Encode<StreamSocketGetTcpUserTimeoutResponse, D>
13964        for &StreamSocketGetTcpUserTimeoutResponse
13965    {
13966        #[inline]
13967        unsafe fn encode(
13968            self,
13969            encoder: &mut fidl::encoding::Encoder<'_, D>,
13970            offset: usize,
13971            _depth: fidl::encoding::Depth,
13972        ) -> fidl::Result<()> {
13973            encoder.debug_check_bounds::<StreamSocketGetTcpUserTimeoutResponse>(offset);
13974            unsafe {
13975                // Copy the object into the buffer.
13976                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13977                (buf_ptr as *mut StreamSocketGetTcpUserTimeoutResponse)
13978                    .write_unaligned((self as *const StreamSocketGetTcpUserTimeoutResponse).read());
13979                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13980                // done second because the memcpy will write garbage to these bytes.
13981            }
13982            Ok(())
13983        }
13984    }
13985    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13986        fidl::encoding::Encode<StreamSocketGetTcpUserTimeoutResponse, D> for (T0,)
13987    {
13988        #[inline]
13989        unsafe fn encode(
13990            self,
13991            encoder: &mut fidl::encoding::Encoder<'_, D>,
13992            offset: usize,
13993            depth: fidl::encoding::Depth,
13994        ) -> fidl::Result<()> {
13995            encoder.debug_check_bounds::<StreamSocketGetTcpUserTimeoutResponse>(offset);
13996            // Zero out padding regions. There's no need to apply masks
13997            // because the unmasked parts will be overwritten by fields.
13998            // Write the fields.
13999            self.0.encode(encoder, offset + 0, depth)?;
14000            Ok(())
14001        }
14002    }
14003
14004    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14005        for StreamSocketGetTcpUserTimeoutResponse
14006    {
14007        #[inline(always)]
14008        fn new_empty() -> Self {
14009            Self { value_millis: fidl::new_empty!(u32, D) }
14010        }
14011
14012        #[inline]
14013        unsafe fn decode(
14014            &mut self,
14015            decoder: &mut fidl::encoding::Decoder<'_, D>,
14016            offset: usize,
14017            _depth: fidl::encoding::Depth,
14018        ) -> fidl::Result<()> {
14019            decoder.debug_check_bounds::<Self>(offset);
14020            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14021            // Verify that padding bytes are zero.
14022            // Copy from the buffer into the object.
14023            unsafe {
14024                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14025            }
14026            Ok(())
14027        }
14028    }
14029
14030    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpWindowClampResponse {
14031        type Borrowed<'a> = &'a Self;
14032        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14033            value
14034        }
14035    }
14036
14037    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpWindowClampResponse {
14038        type Owned = Self;
14039
14040        #[inline(always)]
14041        fn inline_align(_context: fidl::encoding::Context) -> usize {
14042            4
14043        }
14044
14045        #[inline(always)]
14046        fn inline_size(_context: fidl::encoding::Context) -> usize {
14047            4
14048        }
14049        #[inline(always)]
14050        fn encode_is_copy() -> bool {
14051            true
14052        }
14053
14054        #[inline(always)]
14055        fn decode_is_copy() -> bool {
14056            true
14057        }
14058    }
14059
14060    unsafe impl<D: fidl::encoding::ResourceDialect>
14061        fidl::encoding::Encode<StreamSocketGetTcpWindowClampResponse, D>
14062        for &StreamSocketGetTcpWindowClampResponse
14063    {
14064        #[inline]
14065        unsafe fn encode(
14066            self,
14067            encoder: &mut fidl::encoding::Encoder<'_, D>,
14068            offset: usize,
14069            _depth: fidl::encoding::Depth,
14070        ) -> fidl::Result<()> {
14071            encoder.debug_check_bounds::<StreamSocketGetTcpWindowClampResponse>(offset);
14072            unsafe {
14073                // Copy the object into the buffer.
14074                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14075                (buf_ptr as *mut StreamSocketGetTcpWindowClampResponse)
14076                    .write_unaligned((self as *const StreamSocketGetTcpWindowClampResponse).read());
14077                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14078                // done second because the memcpy will write garbage to these bytes.
14079            }
14080            Ok(())
14081        }
14082    }
14083    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
14084        fidl::encoding::Encode<StreamSocketGetTcpWindowClampResponse, D> for (T0,)
14085    {
14086        #[inline]
14087        unsafe fn encode(
14088            self,
14089            encoder: &mut fidl::encoding::Encoder<'_, D>,
14090            offset: usize,
14091            depth: fidl::encoding::Depth,
14092        ) -> fidl::Result<()> {
14093            encoder.debug_check_bounds::<StreamSocketGetTcpWindowClampResponse>(offset);
14094            // Zero out padding regions. There's no need to apply masks
14095            // because the unmasked parts will be overwritten by fields.
14096            // Write the fields.
14097            self.0.encode(encoder, offset + 0, depth)?;
14098            Ok(())
14099        }
14100    }
14101
14102    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14103        for StreamSocketGetTcpWindowClampResponse
14104    {
14105        #[inline(always)]
14106        fn new_empty() -> Self {
14107            Self { value: fidl::new_empty!(u32, D) }
14108        }
14109
14110        #[inline]
14111        unsafe fn decode(
14112            &mut self,
14113            decoder: &mut fidl::encoding::Decoder<'_, D>,
14114            offset: usize,
14115            _depth: fidl::encoding::Depth,
14116        ) -> fidl::Result<()> {
14117            decoder.debug_check_bounds::<Self>(offset);
14118            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14119            // Verify that padding bytes are zero.
14120            // Copy from the buffer into the object.
14121            unsafe {
14122                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14123            }
14124            Ok(())
14125        }
14126    }
14127
14128    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketRecvMsgRequest {
14129        type Borrowed<'a> = &'a Self;
14130        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14131            value
14132        }
14133    }
14134
14135    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketRecvMsgRequest {
14136        type Owned = Self;
14137
14138        #[inline(always)]
14139        fn inline_align(_context: fidl::encoding::Context) -> usize {
14140            4
14141        }
14142
14143        #[inline(always)]
14144        fn inline_size(_context: fidl::encoding::Context) -> usize {
14145            12
14146        }
14147    }
14148
14149    unsafe impl<D: fidl::encoding::ResourceDialect>
14150        fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgRequest, D>
14151        for &SynchronousDatagramSocketRecvMsgRequest
14152    {
14153        #[inline]
14154        unsafe fn encode(
14155            self,
14156            encoder: &mut fidl::encoding::Encoder<'_, D>,
14157            offset: usize,
14158            _depth: fidl::encoding::Depth,
14159        ) -> fidl::Result<()> {
14160            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgRequest>(offset);
14161            // Delegate to tuple encoding.
14162            fidl::encoding::Encode::<SynchronousDatagramSocketRecvMsgRequest, D>::encode(
14163                (
14164                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_addr),
14165                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data_len),
14166                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_control),
14167                    <RecvMsgFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
14168                ),
14169                encoder,
14170                offset,
14171                _depth,
14172            )
14173        }
14174    }
14175    unsafe impl<
14176        D: fidl::encoding::ResourceDialect,
14177        T0: fidl::encoding::Encode<bool, D>,
14178        T1: fidl::encoding::Encode<u32, D>,
14179        T2: fidl::encoding::Encode<bool, D>,
14180        T3: fidl::encoding::Encode<RecvMsgFlags, D>,
14181    > fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgRequest, D> for (T0, T1, T2, T3)
14182    {
14183        #[inline]
14184        unsafe fn encode(
14185            self,
14186            encoder: &mut fidl::encoding::Encoder<'_, D>,
14187            offset: usize,
14188            depth: fidl::encoding::Depth,
14189        ) -> fidl::Result<()> {
14190            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgRequest>(offset);
14191            // Zero out padding regions. There's no need to apply masks
14192            // because the unmasked parts will be overwritten by fields.
14193            unsafe {
14194                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
14195                (ptr as *mut u32).write_unaligned(0);
14196            }
14197            unsafe {
14198                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
14199                (ptr as *mut u32).write_unaligned(0);
14200            }
14201            // Write the fields.
14202            self.0.encode(encoder, offset + 0, depth)?;
14203            self.1.encode(encoder, offset + 4, depth)?;
14204            self.2.encode(encoder, offset + 8, depth)?;
14205            self.3.encode(encoder, offset + 10, depth)?;
14206            Ok(())
14207        }
14208    }
14209
14210    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14211        for SynchronousDatagramSocketRecvMsgRequest
14212    {
14213        #[inline(always)]
14214        fn new_empty() -> Self {
14215            Self {
14216                want_addr: fidl::new_empty!(bool, D),
14217                data_len: fidl::new_empty!(u32, D),
14218                want_control: fidl::new_empty!(bool, D),
14219                flags: fidl::new_empty!(RecvMsgFlags, D),
14220            }
14221        }
14222
14223        #[inline]
14224        unsafe fn decode(
14225            &mut self,
14226            decoder: &mut fidl::encoding::Decoder<'_, D>,
14227            offset: usize,
14228            _depth: fidl::encoding::Depth,
14229        ) -> fidl::Result<()> {
14230            decoder.debug_check_bounds::<Self>(offset);
14231            // Verify that padding bytes are zero.
14232            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
14233            let padval = unsafe { (ptr as *const u32).read_unaligned() };
14234            let mask = 0xffffff00u32;
14235            let maskedval = padval & mask;
14236            if maskedval != 0 {
14237                return Err(fidl::Error::NonZeroPadding {
14238                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
14239                });
14240            }
14241            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
14242            let padval = unsafe { (ptr as *const u32).read_unaligned() };
14243            let mask = 0xff00u32;
14244            let maskedval = padval & mask;
14245            if maskedval != 0 {
14246                return Err(fidl::Error::NonZeroPadding {
14247                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
14248                });
14249            }
14250            fidl::decode!(bool, D, &mut self.want_addr, decoder, offset + 0, _depth)?;
14251            fidl::decode!(u32, D, &mut self.data_len, decoder, offset + 4, _depth)?;
14252            fidl::decode!(bool, D, &mut self.want_control, decoder, offset + 8, _depth)?;
14253            fidl::decode!(RecvMsgFlags, D, &mut self.flags, decoder, offset + 10, _depth)?;
14254            Ok(())
14255        }
14256    }
14257
14258    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketSendMsgRequest {
14259        type Borrowed<'a> = &'a Self;
14260        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14261            value
14262        }
14263    }
14264
14265    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketSendMsgRequest {
14266        type Owned = Self;
14267
14268        #[inline(always)]
14269        fn inline_align(_context: fidl::encoding::Context) -> usize {
14270            8
14271        }
14272
14273        #[inline(always)]
14274        fn inline_size(_context: fidl::encoding::Context) -> usize {
14275            56
14276        }
14277    }
14278
14279    unsafe impl<D: fidl::encoding::ResourceDialect>
14280        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgRequest, D>
14281        for &SynchronousDatagramSocketSendMsgRequest
14282    {
14283        #[inline]
14284        unsafe fn encode(
14285            self,
14286            encoder: &mut fidl::encoding::Encoder<'_, D>,
14287            offset: usize,
14288            _depth: fidl::encoding::Depth,
14289        ) -> fidl::Result<()> {
14290            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgRequest>(offset);
14291            // Delegate to tuple encoding.
14292            fidl::encoding::Encode::<SynchronousDatagramSocketSendMsgRequest, D>::encode(
14293                (
14294                    <fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress> as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
14295                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
14296                    <DatagramSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow(&self.control),
14297                    <SendMsgFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
14298                ),
14299                encoder, offset, _depth
14300            )
14301        }
14302    }
14303    unsafe impl<
14304        D: fidl::encoding::ResourceDialect,
14305        T0: fidl::encoding::Encode<
14306                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14307                D,
14308            >,
14309        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
14310        T2: fidl::encoding::Encode<DatagramSocketSendControlData, D>,
14311        T3: fidl::encoding::Encode<SendMsgFlags, D>,
14312    > fidl::encoding::Encode<SynchronousDatagramSocketSendMsgRequest, D> for (T0, T1, T2, T3)
14313    {
14314        #[inline]
14315        unsafe fn encode(
14316            self,
14317            encoder: &mut fidl::encoding::Encoder<'_, D>,
14318            offset: usize,
14319            depth: fidl::encoding::Depth,
14320        ) -> fidl::Result<()> {
14321            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgRequest>(offset);
14322            // Zero out padding regions. There's no need to apply masks
14323            // because the unmasked parts will be overwritten by fields.
14324            unsafe {
14325                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
14326                (ptr as *mut u64).write_unaligned(0);
14327            }
14328            // Write the fields.
14329            self.0.encode(encoder, offset + 0, depth)?;
14330            self.1.encode(encoder, offset + 16, depth)?;
14331            self.2.encode(encoder, offset + 32, depth)?;
14332            self.3.encode(encoder, offset + 48, depth)?;
14333            Ok(())
14334        }
14335    }
14336
14337    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14338        for SynchronousDatagramSocketSendMsgRequest
14339    {
14340        #[inline(always)]
14341        fn new_empty() -> Self {
14342            Self {
14343                addr: fidl::new_empty!(
14344                    fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14345                    D
14346                ),
14347                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
14348                control: fidl::new_empty!(DatagramSocketSendControlData, D),
14349                flags: fidl::new_empty!(SendMsgFlags, D),
14350            }
14351        }
14352
14353        #[inline]
14354        unsafe fn decode(
14355            &mut self,
14356            decoder: &mut fidl::encoding::Decoder<'_, D>,
14357            offset: usize,
14358            _depth: fidl::encoding::Depth,
14359        ) -> fidl::Result<()> {
14360            decoder.debug_check_bounds::<Self>(offset);
14361            // Verify that padding bytes are zero.
14362            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
14363            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14364            let mask = 0xffffffffffff0000u64;
14365            let maskedval = padval & mask;
14366            if maskedval != 0 {
14367                return Err(fidl::Error::NonZeroPadding {
14368                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
14369                });
14370            }
14371            fidl::decode!(
14372                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14373                D,
14374                &mut self.addr,
14375                decoder,
14376                offset + 0,
14377                _depth
14378            )?;
14379            fidl::decode!(
14380                fidl::encoding::UnboundedVector<u8>,
14381                D,
14382                &mut self.data,
14383                decoder,
14384                offset + 16,
14385                _depth
14386            )?;
14387            fidl::decode!(
14388                DatagramSocketSendControlData,
14389                D,
14390                &mut self.control,
14391                decoder,
14392                offset + 32,
14393                _depth
14394            )?;
14395            fidl::decode!(SendMsgFlags, D, &mut self.flags, decoder, offset + 48, _depth)?;
14396            Ok(())
14397        }
14398    }
14399
14400    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketRecvMsgResponse {
14401        type Borrowed<'a> = &'a Self;
14402        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14403            value
14404        }
14405    }
14406
14407    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketRecvMsgResponse {
14408        type Owned = Self;
14409
14410        #[inline(always)]
14411        fn inline_align(_context: fidl::encoding::Context) -> usize {
14412            8
14413        }
14414
14415        #[inline(always)]
14416        fn inline_size(_context: fidl::encoding::Context) -> usize {
14417            56
14418        }
14419    }
14420
14421    unsafe impl<D: fidl::encoding::ResourceDialect>
14422        fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgResponse, D>
14423        for &SynchronousDatagramSocketRecvMsgResponse
14424    {
14425        #[inline]
14426        unsafe fn encode(
14427            self,
14428            encoder: &mut fidl::encoding::Encoder<'_, D>,
14429            offset: usize,
14430            _depth: fidl::encoding::Depth,
14431        ) -> fidl::Result<()> {
14432            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgResponse>(offset);
14433            // Delegate to tuple encoding.
14434            fidl::encoding::Encode::<SynchronousDatagramSocketRecvMsgResponse, D>::encode(
14435                (
14436                    <fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress> as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
14437                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
14438                    <DatagramSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow(&self.control),
14439                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.truncated),
14440                ),
14441                encoder, offset, _depth
14442            )
14443        }
14444    }
14445    unsafe impl<
14446        D: fidl::encoding::ResourceDialect,
14447        T0: fidl::encoding::Encode<
14448                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14449                D,
14450            >,
14451        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
14452        T2: fidl::encoding::Encode<DatagramSocketRecvControlData, D>,
14453        T3: fidl::encoding::Encode<u32, D>,
14454    > fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgResponse, D> for (T0, T1, T2, T3)
14455    {
14456        #[inline]
14457        unsafe fn encode(
14458            self,
14459            encoder: &mut fidl::encoding::Encoder<'_, D>,
14460            offset: usize,
14461            depth: fidl::encoding::Depth,
14462        ) -> fidl::Result<()> {
14463            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgResponse>(offset);
14464            // Zero out padding regions. There's no need to apply masks
14465            // because the unmasked parts will be overwritten by fields.
14466            unsafe {
14467                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
14468                (ptr as *mut u64).write_unaligned(0);
14469            }
14470            // Write the fields.
14471            self.0.encode(encoder, offset + 0, depth)?;
14472            self.1.encode(encoder, offset + 16, depth)?;
14473            self.2.encode(encoder, offset + 32, depth)?;
14474            self.3.encode(encoder, offset + 48, depth)?;
14475            Ok(())
14476        }
14477    }
14478
14479    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14480        for SynchronousDatagramSocketRecvMsgResponse
14481    {
14482        #[inline(always)]
14483        fn new_empty() -> Self {
14484            Self {
14485                addr: fidl::new_empty!(
14486                    fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14487                    D
14488                ),
14489                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
14490                control: fidl::new_empty!(DatagramSocketRecvControlData, D),
14491                truncated: fidl::new_empty!(u32, D),
14492            }
14493        }
14494
14495        #[inline]
14496        unsafe fn decode(
14497            &mut self,
14498            decoder: &mut fidl::encoding::Decoder<'_, D>,
14499            offset: usize,
14500            _depth: fidl::encoding::Depth,
14501        ) -> fidl::Result<()> {
14502            decoder.debug_check_bounds::<Self>(offset);
14503            // Verify that padding bytes are zero.
14504            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
14505            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14506            let mask = 0xffffffff00000000u64;
14507            let maskedval = padval & mask;
14508            if maskedval != 0 {
14509                return Err(fidl::Error::NonZeroPadding {
14510                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
14511                });
14512            }
14513            fidl::decode!(
14514                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14515                D,
14516                &mut self.addr,
14517                decoder,
14518                offset + 0,
14519                _depth
14520            )?;
14521            fidl::decode!(
14522                fidl::encoding::UnboundedVector<u8>,
14523                D,
14524                &mut self.data,
14525                decoder,
14526                offset + 16,
14527                _depth
14528            )?;
14529            fidl::decode!(
14530                DatagramSocketRecvControlData,
14531                D,
14532                &mut self.control,
14533                decoder,
14534                offset + 32,
14535                _depth
14536            )?;
14537            fidl::decode!(u32, D, &mut self.truncated, decoder, offset + 48, _depth)?;
14538            Ok(())
14539        }
14540    }
14541
14542    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketSendMsgResponse {
14543        type Borrowed<'a> = &'a Self;
14544        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14545            value
14546        }
14547    }
14548
14549    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketSendMsgResponse {
14550        type Owned = Self;
14551
14552        #[inline(always)]
14553        fn inline_align(_context: fidl::encoding::Context) -> usize {
14554            8
14555        }
14556
14557        #[inline(always)]
14558        fn inline_size(_context: fidl::encoding::Context) -> usize {
14559            8
14560        }
14561        #[inline(always)]
14562        fn encode_is_copy() -> bool {
14563            true
14564        }
14565
14566        #[inline(always)]
14567        fn decode_is_copy() -> bool {
14568            true
14569        }
14570    }
14571
14572    unsafe impl<D: fidl::encoding::ResourceDialect>
14573        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgResponse, D>
14574        for &SynchronousDatagramSocketSendMsgResponse
14575    {
14576        #[inline]
14577        unsafe fn encode(
14578            self,
14579            encoder: &mut fidl::encoding::Encoder<'_, D>,
14580            offset: usize,
14581            _depth: fidl::encoding::Depth,
14582        ) -> fidl::Result<()> {
14583            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgResponse>(offset);
14584            unsafe {
14585                // Copy the object into the buffer.
14586                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14587                (buf_ptr as *mut SynchronousDatagramSocketSendMsgResponse).write_unaligned(
14588                    (self as *const SynchronousDatagramSocketSendMsgResponse).read(),
14589                );
14590                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14591                // done second because the memcpy will write garbage to these bytes.
14592            }
14593            Ok(())
14594        }
14595    }
14596    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
14597        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgResponse, D> for (T0,)
14598    {
14599        #[inline]
14600        unsafe fn encode(
14601            self,
14602            encoder: &mut fidl::encoding::Encoder<'_, D>,
14603            offset: usize,
14604            depth: fidl::encoding::Depth,
14605        ) -> fidl::Result<()> {
14606            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgResponse>(offset);
14607            // Zero out padding regions. There's no need to apply masks
14608            // because the unmasked parts will be overwritten by fields.
14609            // Write the fields.
14610            self.0.encode(encoder, offset + 0, depth)?;
14611            Ok(())
14612        }
14613    }
14614
14615    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14616        for SynchronousDatagramSocketSendMsgResponse
14617    {
14618        #[inline(always)]
14619        fn new_empty() -> Self {
14620            Self { len: fidl::new_empty!(i64, D) }
14621        }
14622
14623        #[inline]
14624        unsafe fn decode(
14625            &mut self,
14626            decoder: &mut fidl::encoding::Decoder<'_, D>,
14627            offset: usize,
14628            _depth: fidl::encoding::Depth,
14629        ) -> fidl::Result<()> {
14630            decoder.debug_check_bounds::<Self>(offset);
14631            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14632            // Verify that padding bytes are zero.
14633            // Copy from the buffer into the object.
14634            unsafe {
14635                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
14636            }
14637            Ok(())
14638        }
14639    }
14640
14641    impl fidl::encoding::ValueTypeMarker for Timestamp {
14642        type Borrowed<'a> = &'a Self;
14643        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14644            value
14645        }
14646    }
14647
14648    unsafe impl fidl::encoding::TypeMarker for Timestamp {
14649        type Owned = Self;
14650
14651        #[inline(always)]
14652        fn inline_align(_context: fidl::encoding::Context) -> usize {
14653            8
14654        }
14655
14656        #[inline(always)]
14657        fn inline_size(_context: fidl::encoding::Context) -> usize {
14658            16
14659        }
14660    }
14661
14662    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Timestamp, D>
14663        for &Timestamp
14664    {
14665        #[inline]
14666        unsafe fn encode(
14667            self,
14668            encoder: &mut fidl::encoding::Encoder<'_, D>,
14669            offset: usize,
14670            _depth: fidl::encoding::Depth,
14671        ) -> fidl::Result<()> {
14672            encoder.debug_check_bounds::<Timestamp>(offset);
14673            // Delegate to tuple encoding.
14674            fidl::encoding::Encode::<Timestamp, D>::encode(
14675                (
14676                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.nanoseconds),
14677                    <TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.requested),
14678                ),
14679                encoder,
14680                offset,
14681                _depth,
14682            )
14683        }
14684    }
14685    unsafe impl<
14686        D: fidl::encoding::ResourceDialect,
14687        T0: fidl::encoding::Encode<i64, D>,
14688        T1: fidl::encoding::Encode<TimestampOption, D>,
14689    > fidl::encoding::Encode<Timestamp, D> for (T0, T1)
14690    {
14691        #[inline]
14692        unsafe fn encode(
14693            self,
14694            encoder: &mut fidl::encoding::Encoder<'_, D>,
14695            offset: usize,
14696            depth: fidl::encoding::Depth,
14697        ) -> fidl::Result<()> {
14698            encoder.debug_check_bounds::<Timestamp>(offset);
14699            // Zero out padding regions. There's no need to apply masks
14700            // because the unmasked parts will be overwritten by fields.
14701            unsafe {
14702                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
14703                (ptr as *mut u64).write_unaligned(0);
14704            }
14705            // Write the fields.
14706            self.0.encode(encoder, offset + 0, depth)?;
14707            self.1.encode(encoder, offset + 8, depth)?;
14708            Ok(())
14709        }
14710    }
14711
14712    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Timestamp {
14713        #[inline(always)]
14714        fn new_empty() -> Self {
14715            Self {
14716                nanoseconds: fidl::new_empty!(i64, D),
14717                requested: fidl::new_empty!(TimestampOption, D),
14718            }
14719        }
14720
14721        #[inline]
14722        unsafe fn decode(
14723            &mut self,
14724            decoder: &mut fidl::encoding::Decoder<'_, D>,
14725            offset: usize,
14726            _depth: fidl::encoding::Depth,
14727        ) -> fidl::Result<()> {
14728            decoder.debug_check_bounds::<Self>(offset);
14729            // Verify that padding bytes are zero.
14730            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
14731            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14732            let mask = 0xffffffff00000000u64;
14733            let maskedval = padval & mask;
14734            if maskedval != 0 {
14735                return Err(fidl::Error::NonZeroPadding {
14736                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
14737                });
14738            }
14739            fidl::decode!(i64, D, &mut self.nanoseconds, decoder, offset + 0, _depth)?;
14740            fidl::decode!(TimestampOption, D, &mut self.requested, decoder, offset + 8, _depth)?;
14741            Ok(())
14742        }
14743    }
14744
14745    impl DatagramSocketRecvControlData {
14746        #[inline(always)]
14747        fn max_ordinal_present(&self) -> u64 {
14748            if let Some(_) = self.network {
14749                return 1;
14750            }
14751            0
14752        }
14753    }
14754
14755    impl fidl::encoding::ValueTypeMarker for DatagramSocketRecvControlData {
14756        type Borrowed<'a> = &'a Self;
14757        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14758            value
14759        }
14760    }
14761
14762    unsafe impl fidl::encoding::TypeMarker for DatagramSocketRecvControlData {
14763        type Owned = Self;
14764
14765        #[inline(always)]
14766        fn inline_align(_context: fidl::encoding::Context) -> usize {
14767            8
14768        }
14769
14770        #[inline(always)]
14771        fn inline_size(_context: fidl::encoding::Context) -> usize {
14772            16
14773        }
14774    }
14775
14776    unsafe impl<D: fidl::encoding::ResourceDialect>
14777        fidl::encoding::Encode<DatagramSocketRecvControlData, D>
14778        for &DatagramSocketRecvControlData
14779    {
14780        unsafe fn encode(
14781            self,
14782            encoder: &mut fidl::encoding::Encoder<'_, D>,
14783            offset: usize,
14784            mut depth: fidl::encoding::Depth,
14785        ) -> fidl::Result<()> {
14786            encoder.debug_check_bounds::<DatagramSocketRecvControlData>(offset);
14787            // Vector header
14788            let max_ordinal: u64 = self.max_ordinal_present();
14789            encoder.write_num(max_ordinal, offset);
14790            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14791            // Calling encoder.out_of_line_offset(0) is not allowed.
14792            if max_ordinal == 0 {
14793                return Ok(());
14794            }
14795            depth.increment()?;
14796            let envelope_size = 8;
14797            let bytes_len = max_ordinal as usize * envelope_size;
14798            #[allow(unused_variables)]
14799            let offset = encoder.out_of_line_offset(bytes_len);
14800            let mut _prev_end_offset: usize = 0;
14801            if 1 > max_ordinal {
14802                return Ok(());
14803            }
14804
14805            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14806            // are envelope_size bytes.
14807            let cur_offset: usize = (1 - 1) * envelope_size;
14808
14809            // Zero reserved fields.
14810            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14811
14812            // Safety:
14813            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
14814            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
14815            //   envelope_size bytes, there is always sufficient room.
14816            fidl::encoding::encode_in_envelope_optional::<NetworkSocketRecvControlData, D>(
14817                self.network
14818                    .as_ref()
14819                    .map(<NetworkSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
14820                encoder,
14821                offset + cur_offset,
14822                depth,
14823            )?;
14824
14825            _prev_end_offset = cur_offset + envelope_size;
14826
14827            Ok(())
14828        }
14829    }
14830
14831    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14832        for DatagramSocketRecvControlData
14833    {
14834        #[inline(always)]
14835        fn new_empty() -> Self {
14836            Self::default()
14837        }
14838
14839        unsafe fn decode(
14840            &mut self,
14841            decoder: &mut fidl::encoding::Decoder<'_, D>,
14842            offset: usize,
14843            mut depth: fidl::encoding::Depth,
14844        ) -> fidl::Result<()> {
14845            decoder.debug_check_bounds::<Self>(offset);
14846            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14847                None => return Err(fidl::Error::NotNullable),
14848                Some(len) => len,
14849            };
14850            // Calling decoder.out_of_line_offset(0) is not allowed.
14851            if len == 0 {
14852                return Ok(());
14853            };
14854            depth.increment()?;
14855            let envelope_size = 8;
14856            let bytes_len = len * envelope_size;
14857            let offset = decoder.out_of_line_offset(bytes_len)?;
14858            // Decode the envelope for each type.
14859            let mut _next_ordinal_to_read = 0;
14860            let mut next_offset = offset;
14861            let end_offset = offset + bytes_len;
14862            _next_ordinal_to_read += 1;
14863            if next_offset >= end_offset {
14864                return Ok(());
14865            }
14866
14867            // Decode unknown envelopes for gaps in ordinals.
14868            while _next_ordinal_to_read < 1 {
14869                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14870                _next_ordinal_to_read += 1;
14871                next_offset += envelope_size;
14872            }
14873
14874            let next_out_of_line = decoder.next_out_of_line();
14875            let handles_before = decoder.remaining_handles();
14876            if let Some((inlined, num_bytes, num_handles)) =
14877                fidl::encoding::decode_envelope_header(decoder, next_offset)?
14878            {
14879                let member_inline_size =
14880                    <NetworkSocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
14881                        decoder.context,
14882                    );
14883                if inlined != (member_inline_size <= 4) {
14884                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
14885                }
14886                let inner_offset;
14887                let mut inner_depth = depth.clone();
14888                if inlined {
14889                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14890                    inner_offset = next_offset;
14891                } else {
14892                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14893                    inner_depth.increment()?;
14894                }
14895                let val_ref = self
14896                    .network
14897                    .get_or_insert_with(|| fidl::new_empty!(NetworkSocketRecvControlData, D));
14898                fidl::decode!(
14899                    NetworkSocketRecvControlData,
14900                    D,
14901                    val_ref,
14902                    decoder,
14903                    inner_offset,
14904                    inner_depth
14905                )?;
14906                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14907                {
14908                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
14909                }
14910                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14911                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14912                }
14913            }
14914
14915            next_offset += envelope_size;
14916
14917            // Decode the remaining unknown envelopes.
14918            while next_offset < end_offset {
14919                _next_ordinal_to_read += 1;
14920                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14921                next_offset += envelope_size;
14922            }
14923
14924            Ok(())
14925        }
14926    }
14927
14928    impl DatagramSocketSendControlData {
14929        #[inline(always)]
14930        fn max_ordinal_present(&self) -> u64 {
14931            if let Some(_) = self.network {
14932                return 1;
14933            }
14934            0
14935        }
14936    }
14937
14938    impl fidl::encoding::ValueTypeMarker for DatagramSocketSendControlData {
14939        type Borrowed<'a> = &'a Self;
14940        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14941            value
14942        }
14943    }
14944
14945    unsafe impl fidl::encoding::TypeMarker for DatagramSocketSendControlData {
14946        type Owned = Self;
14947
14948        #[inline(always)]
14949        fn inline_align(_context: fidl::encoding::Context) -> usize {
14950            8
14951        }
14952
14953        #[inline(always)]
14954        fn inline_size(_context: fidl::encoding::Context) -> usize {
14955            16
14956        }
14957    }
14958
14959    unsafe impl<D: fidl::encoding::ResourceDialect>
14960        fidl::encoding::Encode<DatagramSocketSendControlData, D>
14961        for &DatagramSocketSendControlData
14962    {
14963        unsafe fn encode(
14964            self,
14965            encoder: &mut fidl::encoding::Encoder<'_, D>,
14966            offset: usize,
14967            mut depth: fidl::encoding::Depth,
14968        ) -> fidl::Result<()> {
14969            encoder.debug_check_bounds::<DatagramSocketSendControlData>(offset);
14970            // Vector header
14971            let max_ordinal: u64 = self.max_ordinal_present();
14972            encoder.write_num(max_ordinal, offset);
14973            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14974            // Calling encoder.out_of_line_offset(0) is not allowed.
14975            if max_ordinal == 0 {
14976                return Ok(());
14977            }
14978            depth.increment()?;
14979            let envelope_size = 8;
14980            let bytes_len = max_ordinal as usize * envelope_size;
14981            #[allow(unused_variables)]
14982            let offset = encoder.out_of_line_offset(bytes_len);
14983            let mut _prev_end_offset: usize = 0;
14984            if 1 > max_ordinal {
14985                return Ok(());
14986            }
14987
14988            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14989            // are envelope_size bytes.
14990            let cur_offset: usize = (1 - 1) * envelope_size;
14991
14992            // Zero reserved fields.
14993            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14994
14995            // Safety:
14996            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
14997            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
14998            //   envelope_size bytes, there is always sufficient room.
14999            fidl::encoding::encode_in_envelope_optional::<NetworkSocketSendControlData, D>(
15000                self.network
15001                    .as_ref()
15002                    .map(<NetworkSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
15003                encoder,
15004                offset + cur_offset,
15005                depth,
15006            )?;
15007
15008            _prev_end_offset = cur_offset + envelope_size;
15009
15010            Ok(())
15011        }
15012    }
15013
15014    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15015        for DatagramSocketSendControlData
15016    {
15017        #[inline(always)]
15018        fn new_empty() -> Self {
15019            Self::default()
15020        }
15021
15022        unsafe fn decode(
15023            &mut self,
15024            decoder: &mut fidl::encoding::Decoder<'_, D>,
15025            offset: usize,
15026            mut depth: fidl::encoding::Depth,
15027        ) -> fidl::Result<()> {
15028            decoder.debug_check_bounds::<Self>(offset);
15029            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15030                None => return Err(fidl::Error::NotNullable),
15031                Some(len) => len,
15032            };
15033            // Calling decoder.out_of_line_offset(0) is not allowed.
15034            if len == 0 {
15035                return Ok(());
15036            };
15037            depth.increment()?;
15038            let envelope_size = 8;
15039            let bytes_len = len * envelope_size;
15040            let offset = decoder.out_of_line_offset(bytes_len)?;
15041            // Decode the envelope for each type.
15042            let mut _next_ordinal_to_read = 0;
15043            let mut next_offset = offset;
15044            let end_offset = offset + bytes_len;
15045            _next_ordinal_to_read += 1;
15046            if next_offset >= end_offset {
15047                return Ok(());
15048            }
15049
15050            // Decode unknown envelopes for gaps in ordinals.
15051            while _next_ordinal_to_read < 1 {
15052                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15053                _next_ordinal_to_read += 1;
15054                next_offset += envelope_size;
15055            }
15056
15057            let next_out_of_line = decoder.next_out_of_line();
15058            let handles_before = decoder.remaining_handles();
15059            if let Some((inlined, num_bytes, num_handles)) =
15060                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15061            {
15062                let member_inline_size =
15063                    <NetworkSocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
15064                        decoder.context,
15065                    );
15066                if inlined != (member_inline_size <= 4) {
15067                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15068                }
15069                let inner_offset;
15070                let mut inner_depth = depth.clone();
15071                if inlined {
15072                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15073                    inner_offset = next_offset;
15074                } else {
15075                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15076                    inner_depth.increment()?;
15077                }
15078                let val_ref = self
15079                    .network
15080                    .get_or_insert_with(|| fidl::new_empty!(NetworkSocketSendControlData, D));
15081                fidl::decode!(
15082                    NetworkSocketSendControlData,
15083                    D,
15084                    val_ref,
15085                    decoder,
15086                    inner_offset,
15087                    inner_depth
15088                )?;
15089                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15090                {
15091                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15092                }
15093                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15094                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15095                }
15096            }
15097
15098            next_offset += envelope_size;
15099
15100            // Decode the remaining unknown envelopes.
15101            while next_offset < end_offset {
15102                _next_ordinal_to_read += 1;
15103                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15104                next_offset += envelope_size;
15105            }
15106
15107            Ok(())
15108        }
15109    }
15110
15111    impl DatagramSocketSendMsgPreflightRequest {
15112        #[inline(always)]
15113        fn max_ordinal_present(&self) -> u64 {
15114            if let Some(_) = self.ipv6_pktinfo {
15115                return 2;
15116            }
15117            if let Some(_) = self.to {
15118                return 1;
15119            }
15120            0
15121        }
15122    }
15123
15124    impl fidl::encoding::ValueTypeMarker for DatagramSocketSendMsgPreflightRequest {
15125        type Borrowed<'a> = &'a Self;
15126        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15127            value
15128        }
15129    }
15130
15131    unsafe impl fidl::encoding::TypeMarker for DatagramSocketSendMsgPreflightRequest {
15132        type Owned = Self;
15133
15134        #[inline(always)]
15135        fn inline_align(_context: fidl::encoding::Context) -> usize {
15136            8
15137        }
15138
15139        #[inline(always)]
15140        fn inline_size(_context: fidl::encoding::Context) -> usize {
15141            16
15142        }
15143    }
15144
15145    unsafe impl<D: fidl::encoding::ResourceDialect>
15146        fidl::encoding::Encode<DatagramSocketSendMsgPreflightRequest, D>
15147        for &DatagramSocketSendMsgPreflightRequest
15148    {
15149        unsafe fn encode(
15150            self,
15151            encoder: &mut fidl::encoding::Encoder<'_, D>,
15152            offset: usize,
15153            mut depth: fidl::encoding::Depth,
15154        ) -> fidl::Result<()> {
15155            encoder.debug_check_bounds::<DatagramSocketSendMsgPreflightRequest>(offset);
15156            // Vector header
15157            let max_ordinal: u64 = self.max_ordinal_present();
15158            encoder.write_num(max_ordinal, offset);
15159            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15160            // Calling encoder.out_of_line_offset(0) is not allowed.
15161            if max_ordinal == 0 {
15162                return Ok(());
15163            }
15164            depth.increment()?;
15165            let envelope_size = 8;
15166            let bytes_len = max_ordinal as usize * envelope_size;
15167            #[allow(unused_variables)]
15168            let offset = encoder.out_of_line_offset(bytes_len);
15169            let mut _prev_end_offset: usize = 0;
15170            if 1 > max_ordinal {
15171                return Ok(());
15172            }
15173
15174            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15175            // are envelope_size bytes.
15176            let cur_offset: usize = (1 - 1) * envelope_size;
15177
15178            // Zero reserved fields.
15179            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15180
15181            // Safety:
15182            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15183            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15184            //   envelope_size bytes, there is always sufficient room.
15185            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
15186            self.to.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
15187            encoder, offset + cur_offset, depth
15188        )?;
15189
15190            _prev_end_offset = cur_offset + envelope_size;
15191            if 2 > max_ordinal {
15192                return Ok(());
15193            }
15194
15195            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15196            // are envelope_size bytes.
15197            let cur_offset: usize = (2 - 1) * envelope_size;
15198
15199            // Zero reserved fields.
15200            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15201
15202            // Safety:
15203            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15204            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15205            //   envelope_size bytes, there is always sufficient room.
15206            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoSendControlData, D>(
15207                self.ipv6_pktinfo
15208                    .as_ref()
15209                    .map(<Ipv6PktInfoSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
15210                encoder,
15211                offset + cur_offset,
15212                depth,
15213            )?;
15214
15215            _prev_end_offset = cur_offset + envelope_size;
15216
15217            Ok(())
15218        }
15219    }
15220
15221    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15222        for DatagramSocketSendMsgPreflightRequest
15223    {
15224        #[inline(always)]
15225        fn new_empty() -> Self {
15226            Self::default()
15227        }
15228
15229        unsafe fn decode(
15230            &mut self,
15231            decoder: &mut fidl::encoding::Decoder<'_, D>,
15232            offset: usize,
15233            mut depth: fidl::encoding::Depth,
15234        ) -> fidl::Result<()> {
15235            decoder.debug_check_bounds::<Self>(offset);
15236            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15237                None => return Err(fidl::Error::NotNullable),
15238                Some(len) => len,
15239            };
15240            // Calling decoder.out_of_line_offset(0) is not allowed.
15241            if len == 0 {
15242                return Ok(());
15243            };
15244            depth.increment()?;
15245            let envelope_size = 8;
15246            let bytes_len = len * envelope_size;
15247            let offset = decoder.out_of_line_offset(bytes_len)?;
15248            // Decode the envelope for each type.
15249            let mut _next_ordinal_to_read = 0;
15250            let mut next_offset = offset;
15251            let end_offset = offset + bytes_len;
15252            _next_ordinal_to_read += 1;
15253            if next_offset >= end_offset {
15254                return Ok(());
15255            }
15256
15257            // Decode unknown envelopes for gaps in ordinals.
15258            while _next_ordinal_to_read < 1 {
15259                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15260                _next_ordinal_to_read += 1;
15261                next_offset += envelope_size;
15262            }
15263
15264            let next_out_of_line = decoder.next_out_of_line();
15265            let handles_before = decoder.remaining_handles();
15266            if let Some((inlined, num_bytes, num_handles)) =
15267                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15268            {
15269                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15270                if inlined != (member_inline_size <= 4) {
15271                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15272                }
15273                let inner_offset;
15274                let mut inner_depth = depth.clone();
15275                if inlined {
15276                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15277                    inner_offset = next_offset;
15278                } else {
15279                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15280                    inner_depth.increment()?;
15281                }
15282                let val_ref = self.to.get_or_insert_with(|| {
15283                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
15284                });
15285                fidl::decode!(
15286                    fidl_fuchsia_net__common::SocketAddress,
15287                    D,
15288                    val_ref,
15289                    decoder,
15290                    inner_offset,
15291                    inner_depth
15292                )?;
15293                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15294                {
15295                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15296                }
15297                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15298                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15299                }
15300            }
15301
15302            next_offset += envelope_size;
15303            _next_ordinal_to_read += 1;
15304            if next_offset >= end_offset {
15305                return Ok(());
15306            }
15307
15308            // Decode unknown envelopes for gaps in ordinals.
15309            while _next_ordinal_to_read < 2 {
15310                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15311                _next_ordinal_to_read += 1;
15312                next_offset += envelope_size;
15313            }
15314
15315            let next_out_of_line = decoder.next_out_of_line();
15316            let handles_before = decoder.remaining_handles();
15317            if let Some((inlined, num_bytes, num_handles)) =
15318                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15319            {
15320                let member_inline_size =
15321                    <Ipv6PktInfoSendControlData as fidl::encoding::TypeMarker>::inline_size(
15322                        decoder.context,
15323                    );
15324                if inlined != (member_inline_size <= 4) {
15325                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15326                }
15327                let inner_offset;
15328                let mut inner_depth = depth.clone();
15329                if inlined {
15330                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15331                    inner_offset = next_offset;
15332                } else {
15333                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15334                    inner_depth.increment()?;
15335                }
15336                let val_ref = self
15337                    .ipv6_pktinfo
15338                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoSendControlData, D));
15339                fidl::decode!(
15340                    Ipv6PktInfoSendControlData,
15341                    D,
15342                    val_ref,
15343                    decoder,
15344                    inner_offset,
15345                    inner_depth
15346                )?;
15347                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15348                {
15349                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15350                }
15351                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15352                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15353                }
15354            }
15355
15356            next_offset += envelope_size;
15357
15358            // Decode the remaining unknown envelopes.
15359            while next_offset < end_offset {
15360                _next_ordinal_to_read += 1;
15361                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15362                next_offset += envelope_size;
15363            }
15364
15365            Ok(())
15366        }
15367    }
15368
15369    impl InterfaceAddresses {
15370        #[inline(always)]
15371        fn max_ordinal_present(&self) -> u64 {
15372            if let Some(_) = self.interface_flags {
15373                return 5;
15374            }
15375            if let Some(_) = self.addresses {
15376                return 4;
15377            }
15378            if let Some(_) = self.name {
15379                return 2;
15380            }
15381            if let Some(_) = self.id {
15382                return 1;
15383            }
15384            0
15385        }
15386    }
15387
15388    impl fidl::encoding::ValueTypeMarker for InterfaceAddresses {
15389        type Borrowed<'a> = &'a Self;
15390        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15391            value
15392        }
15393    }
15394
15395    unsafe impl fidl::encoding::TypeMarker for InterfaceAddresses {
15396        type Owned = Self;
15397
15398        #[inline(always)]
15399        fn inline_align(_context: fidl::encoding::Context) -> usize {
15400            8
15401        }
15402
15403        #[inline(always)]
15404        fn inline_size(_context: fidl::encoding::Context) -> usize {
15405            16
15406        }
15407    }
15408
15409    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InterfaceAddresses, D>
15410        for &InterfaceAddresses
15411    {
15412        unsafe fn encode(
15413            self,
15414            encoder: &mut fidl::encoding::Encoder<'_, D>,
15415            offset: usize,
15416            mut depth: fidl::encoding::Depth,
15417        ) -> fidl::Result<()> {
15418            encoder.debug_check_bounds::<InterfaceAddresses>(offset);
15419            // Vector header
15420            let max_ordinal: u64 = self.max_ordinal_present();
15421            encoder.write_num(max_ordinal, offset);
15422            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15423            // Calling encoder.out_of_line_offset(0) is not allowed.
15424            if max_ordinal == 0 {
15425                return Ok(());
15426            }
15427            depth.increment()?;
15428            let envelope_size = 8;
15429            let bytes_len = max_ordinal as usize * envelope_size;
15430            #[allow(unused_variables)]
15431            let offset = encoder.out_of_line_offset(bytes_len);
15432            let mut _prev_end_offset: usize = 0;
15433            if 1 > max_ordinal {
15434                return Ok(());
15435            }
15436
15437            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15438            // are envelope_size bytes.
15439            let cur_offset: usize = (1 - 1) * envelope_size;
15440
15441            // Zero reserved fields.
15442            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15443
15444            // Safety:
15445            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15446            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15447            //   envelope_size bytes, there is always sufficient room.
15448            fidl::encoding::encode_in_envelope_optional::<u64, D>(
15449                self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
15450                encoder,
15451                offset + cur_offset,
15452                depth,
15453            )?;
15454
15455            _prev_end_offset = cur_offset + envelope_size;
15456            if 2 > max_ordinal {
15457                return Ok(());
15458            }
15459
15460            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15461            // are envelope_size bytes.
15462            let cur_offset: usize = (2 - 1) * envelope_size;
15463
15464            // Zero reserved fields.
15465            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15466
15467            // Safety:
15468            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15469            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15470            //   envelope_size bytes, there is always sufficient room.
15471            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<15>, D>(
15472                self.name.as_ref().map(
15473                    <fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow,
15474                ),
15475                encoder,
15476                offset + cur_offset,
15477                depth,
15478            )?;
15479
15480            _prev_end_offset = cur_offset + envelope_size;
15481            if 4 > max_ordinal {
15482                return Ok(());
15483            }
15484
15485            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15486            // are envelope_size bytes.
15487            let cur_offset: usize = (4 - 1) * envelope_size;
15488
15489            // Zero reserved fields.
15490            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15491
15492            // Safety:
15493            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15494            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15495            //   envelope_size bytes, there is always sufficient room.
15496            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>, D>(
15497            self.addresses.as_ref().map(<fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet> as fidl::encoding::ValueTypeMarker>::borrow),
15498            encoder, offset + cur_offset, depth
15499        )?;
15500
15501            _prev_end_offset = cur_offset + envelope_size;
15502            if 5 > max_ordinal {
15503                return Ok(());
15504            }
15505
15506            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15507            // are envelope_size bytes.
15508            let cur_offset: usize = (5 - 1) * envelope_size;
15509
15510            // Zero reserved fields.
15511            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15512
15513            // Safety:
15514            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15515            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15516            //   envelope_size bytes, there is always sufficient room.
15517            fidl::encoding::encode_in_envelope_optional::<InterfaceFlags, D>(
15518                self.interface_flags
15519                    .as_ref()
15520                    .map(<InterfaceFlags as fidl::encoding::ValueTypeMarker>::borrow),
15521                encoder,
15522                offset + cur_offset,
15523                depth,
15524            )?;
15525
15526            _prev_end_offset = cur_offset + envelope_size;
15527
15528            Ok(())
15529        }
15530    }
15531
15532    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceAddresses {
15533        #[inline(always)]
15534        fn new_empty() -> Self {
15535            Self::default()
15536        }
15537
15538        unsafe fn decode(
15539            &mut self,
15540            decoder: &mut fidl::encoding::Decoder<'_, D>,
15541            offset: usize,
15542            mut depth: fidl::encoding::Depth,
15543        ) -> fidl::Result<()> {
15544            decoder.debug_check_bounds::<Self>(offset);
15545            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15546                None => return Err(fidl::Error::NotNullable),
15547                Some(len) => len,
15548            };
15549            // Calling decoder.out_of_line_offset(0) is not allowed.
15550            if len == 0 {
15551                return Ok(());
15552            };
15553            depth.increment()?;
15554            let envelope_size = 8;
15555            let bytes_len = len * envelope_size;
15556            let offset = decoder.out_of_line_offset(bytes_len)?;
15557            // Decode the envelope for each type.
15558            let mut _next_ordinal_to_read = 0;
15559            let mut next_offset = offset;
15560            let end_offset = offset + bytes_len;
15561            _next_ordinal_to_read += 1;
15562            if next_offset >= end_offset {
15563                return Ok(());
15564            }
15565
15566            // Decode unknown envelopes for gaps in ordinals.
15567            while _next_ordinal_to_read < 1 {
15568                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15569                _next_ordinal_to_read += 1;
15570                next_offset += envelope_size;
15571            }
15572
15573            let next_out_of_line = decoder.next_out_of_line();
15574            let handles_before = decoder.remaining_handles();
15575            if let Some((inlined, num_bytes, num_handles)) =
15576                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15577            {
15578                let member_inline_size =
15579                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15580                if inlined != (member_inline_size <= 4) {
15581                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15582                }
15583                let inner_offset;
15584                let mut inner_depth = depth.clone();
15585                if inlined {
15586                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15587                    inner_offset = next_offset;
15588                } else {
15589                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15590                    inner_depth.increment()?;
15591                }
15592                let val_ref = self.id.get_or_insert_with(|| fidl::new_empty!(u64, D));
15593                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
15594                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15595                {
15596                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15597                }
15598                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15599                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15600                }
15601            }
15602
15603            next_offset += envelope_size;
15604            _next_ordinal_to_read += 1;
15605            if next_offset >= end_offset {
15606                return Ok(());
15607            }
15608
15609            // Decode unknown envelopes for gaps in ordinals.
15610            while _next_ordinal_to_read < 2 {
15611                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15612                _next_ordinal_to_read += 1;
15613                next_offset += envelope_size;
15614            }
15615
15616            let next_out_of_line = decoder.next_out_of_line();
15617            let handles_before = decoder.remaining_handles();
15618            if let Some((inlined, num_bytes, num_handles)) =
15619                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15620            {
15621                let member_inline_size =
15622                    <fidl::encoding::BoundedString<15> as fidl::encoding::TypeMarker>::inline_size(
15623                        decoder.context,
15624                    );
15625                if inlined != (member_inline_size <= 4) {
15626                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15627                }
15628                let inner_offset;
15629                let mut inner_depth = depth.clone();
15630                if inlined {
15631                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15632                    inner_offset = next_offset;
15633                } else {
15634                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15635                    inner_depth.increment()?;
15636                }
15637                let val_ref = self
15638                    .name
15639                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<15>, D));
15640                fidl::decode!(
15641                    fidl::encoding::BoundedString<15>,
15642                    D,
15643                    val_ref,
15644                    decoder,
15645                    inner_offset,
15646                    inner_depth
15647                )?;
15648                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15649                {
15650                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15651                }
15652                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15653                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15654                }
15655            }
15656
15657            next_offset += envelope_size;
15658            _next_ordinal_to_read += 1;
15659            if next_offset >= end_offset {
15660                return Ok(());
15661            }
15662
15663            // Decode unknown envelopes for gaps in ordinals.
15664            while _next_ordinal_to_read < 4 {
15665                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15666                _next_ordinal_to_read += 1;
15667                next_offset += envelope_size;
15668            }
15669
15670            let next_out_of_line = decoder.next_out_of_line();
15671            let handles_before = decoder.remaining_handles();
15672            if let Some((inlined, num_bytes, num_handles)) =
15673                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15674            {
15675                let member_inline_size = <fidl::encoding::UnboundedVector<
15676                    fidl_fuchsia_net__common::Subnet,
15677                > as fidl::encoding::TypeMarker>::inline_size(
15678                    decoder.context
15679                );
15680                if inlined != (member_inline_size <= 4) {
15681                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15682                }
15683                let inner_offset;
15684                let mut inner_depth = depth.clone();
15685                if inlined {
15686                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15687                    inner_offset = next_offset;
15688                } else {
15689                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15690                    inner_depth.increment()?;
15691                }
15692                let val_ref = self.addresses.get_or_insert_with(|| {
15693                    fidl::new_empty!(
15694                        fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>,
15695                        D
15696                    )
15697                });
15698                fidl::decode!(
15699                    fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>,
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            _next_ordinal_to_read += 1;
15717            if next_offset >= end_offset {
15718                return Ok(());
15719            }
15720
15721            // Decode unknown envelopes for gaps in ordinals.
15722            while _next_ordinal_to_read < 5 {
15723                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15724                _next_ordinal_to_read += 1;
15725                next_offset += envelope_size;
15726            }
15727
15728            let next_out_of_line = decoder.next_out_of_line();
15729            let handles_before = decoder.remaining_handles();
15730            if let Some((inlined, num_bytes, num_handles)) =
15731                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15732            {
15733                let member_inline_size =
15734                    <InterfaceFlags as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15735                if inlined != (member_inline_size <= 4) {
15736                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15737                }
15738                let inner_offset;
15739                let mut inner_depth = depth.clone();
15740                if inlined {
15741                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15742                    inner_offset = next_offset;
15743                } else {
15744                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15745                    inner_depth.increment()?;
15746                }
15747                let val_ref =
15748                    self.interface_flags.get_or_insert_with(|| fidl::new_empty!(InterfaceFlags, D));
15749                fidl::decode!(InterfaceFlags, D, val_ref, decoder, inner_offset, inner_depth)?;
15750                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15751                {
15752                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15753                }
15754                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15755                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15756                }
15757            }
15758
15759            next_offset += envelope_size;
15760
15761            // Decode the remaining unknown envelopes.
15762            while next_offset < end_offset {
15763                _next_ordinal_to_read += 1;
15764                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15765                next_offset += envelope_size;
15766            }
15767
15768            Ok(())
15769        }
15770    }
15771
15772    impl IpRecvControlData {
15773        #[inline(always)]
15774        fn max_ordinal_present(&self) -> u64 {
15775            if let Some(_) = self.original_destination_address {
15776                return 3;
15777            }
15778            if let Some(_) = self.ttl {
15779                return 2;
15780            }
15781            if let Some(_) = self.tos {
15782                return 1;
15783            }
15784            0
15785        }
15786    }
15787
15788    impl fidl::encoding::ValueTypeMarker for IpRecvControlData {
15789        type Borrowed<'a> = &'a Self;
15790        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15791            value
15792        }
15793    }
15794
15795    unsafe impl fidl::encoding::TypeMarker for IpRecvControlData {
15796        type Owned = Self;
15797
15798        #[inline(always)]
15799        fn inline_align(_context: fidl::encoding::Context) -> usize {
15800            8
15801        }
15802
15803        #[inline(always)]
15804        fn inline_size(_context: fidl::encoding::Context) -> usize {
15805            16
15806        }
15807    }
15808
15809    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpRecvControlData, D>
15810        for &IpRecvControlData
15811    {
15812        unsafe fn encode(
15813            self,
15814            encoder: &mut fidl::encoding::Encoder<'_, D>,
15815            offset: usize,
15816            mut depth: fidl::encoding::Depth,
15817        ) -> fidl::Result<()> {
15818            encoder.debug_check_bounds::<IpRecvControlData>(offset);
15819            // Vector header
15820            let max_ordinal: u64 = self.max_ordinal_present();
15821            encoder.write_num(max_ordinal, offset);
15822            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15823            // Calling encoder.out_of_line_offset(0) is not allowed.
15824            if max_ordinal == 0 {
15825                return Ok(());
15826            }
15827            depth.increment()?;
15828            let envelope_size = 8;
15829            let bytes_len = max_ordinal as usize * envelope_size;
15830            #[allow(unused_variables)]
15831            let offset = encoder.out_of_line_offset(bytes_len);
15832            let mut _prev_end_offset: usize = 0;
15833            if 1 > max_ordinal {
15834                return Ok(());
15835            }
15836
15837            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15838            // are envelope_size bytes.
15839            let cur_offset: usize = (1 - 1) * envelope_size;
15840
15841            // Zero reserved fields.
15842            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15843
15844            // Safety:
15845            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15846            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15847            //   envelope_size bytes, there is always sufficient room.
15848            fidl::encoding::encode_in_envelope_optional::<u8, D>(
15849                self.tos.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
15850                encoder,
15851                offset + cur_offset,
15852                depth,
15853            )?;
15854
15855            _prev_end_offset = cur_offset + envelope_size;
15856            if 2 > max_ordinal {
15857                return Ok(());
15858            }
15859
15860            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15861            // are envelope_size bytes.
15862            let cur_offset: usize = (2 - 1) * envelope_size;
15863
15864            // Zero reserved fields.
15865            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15866
15867            // Safety:
15868            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15869            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15870            //   envelope_size bytes, there is always sufficient room.
15871            fidl::encoding::encode_in_envelope_optional::<u8, D>(
15872                self.ttl.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
15873                encoder,
15874                offset + cur_offset,
15875                depth,
15876            )?;
15877
15878            _prev_end_offset = cur_offset + envelope_size;
15879            if 3 > max_ordinal {
15880                return Ok(());
15881            }
15882
15883            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15884            // are envelope_size bytes.
15885            let cur_offset: usize = (3 - 1) * envelope_size;
15886
15887            // Zero reserved fields.
15888            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15889
15890            // Safety:
15891            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15892            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15893            //   envelope_size bytes, there is always sufficient room.
15894            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
15895            self.original_destination_address.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
15896            encoder, offset + cur_offset, depth
15897        )?;
15898
15899            _prev_end_offset = cur_offset + envelope_size;
15900
15901            Ok(())
15902        }
15903    }
15904
15905    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpRecvControlData {
15906        #[inline(always)]
15907        fn new_empty() -> Self {
15908            Self::default()
15909        }
15910
15911        unsafe fn decode(
15912            &mut self,
15913            decoder: &mut fidl::encoding::Decoder<'_, D>,
15914            offset: usize,
15915            mut depth: fidl::encoding::Depth,
15916        ) -> fidl::Result<()> {
15917            decoder.debug_check_bounds::<Self>(offset);
15918            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15919                None => return Err(fidl::Error::NotNullable),
15920                Some(len) => len,
15921            };
15922            // Calling decoder.out_of_line_offset(0) is not allowed.
15923            if len == 0 {
15924                return Ok(());
15925            };
15926            depth.increment()?;
15927            let envelope_size = 8;
15928            let bytes_len = len * envelope_size;
15929            let offset = decoder.out_of_line_offset(bytes_len)?;
15930            // Decode the envelope for each type.
15931            let mut _next_ordinal_to_read = 0;
15932            let mut next_offset = offset;
15933            let end_offset = offset + bytes_len;
15934            _next_ordinal_to_read += 1;
15935            if next_offset >= end_offset {
15936                return Ok(());
15937            }
15938
15939            // Decode unknown envelopes for gaps in ordinals.
15940            while _next_ordinal_to_read < 1 {
15941                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15942                _next_ordinal_to_read += 1;
15943                next_offset += envelope_size;
15944            }
15945
15946            let next_out_of_line = decoder.next_out_of_line();
15947            let handles_before = decoder.remaining_handles();
15948            if let Some((inlined, num_bytes, num_handles)) =
15949                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15950            {
15951                let member_inline_size =
15952                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15953                if inlined != (member_inline_size <= 4) {
15954                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15955                }
15956                let inner_offset;
15957                let mut inner_depth = depth.clone();
15958                if inlined {
15959                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15960                    inner_offset = next_offset;
15961                } else {
15962                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15963                    inner_depth.increment()?;
15964                }
15965                let val_ref = self.tos.get_or_insert_with(|| fidl::new_empty!(u8, D));
15966                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
15967                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15968                {
15969                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15970                }
15971                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15972                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15973                }
15974            }
15975
15976            next_offset += envelope_size;
15977            _next_ordinal_to_read += 1;
15978            if next_offset >= end_offset {
15979                return Ok(());
15980            }
15981
15982            // Decode unknown envelopes for gaps in ordinals.
15983            while _next_ordinal_to_read < 2 {
15984                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15985                _next_ordinal_to_read += 1;
15986                next_offset += envelope_size;
15987            }
15988
15989            let next_out_of_line = decoder.next_out_of_line();
15990            let handles_before = decoder.remaining_handles();
15991            if let Some((inlined, num_bytes, num_handles)) =
15992                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15993            {
15994                let member_inline_size =
15995                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15996                if inlined != (member_inline_size <= 4) {
15997                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15998                }
15999                let inner_offset;
16000                let mut inner_depth = depth.clone();
16001                if inlined {
16002                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16003                    inner_offset = next_offset;
16004                } else {
16005                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16006                    inner_depth.increment()?;
16007                }
16008                let val_ref = self.ttl.get_or_insert_with(|| fidl::new_empty!(u8, D));
16009                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16010                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16011                {
16012                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16013                }
16014                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16015                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16016                }
16017            }
16018
16019            next_offset += envelope_size;
16020            _next_ordinal_to_read += 1;
16021            if next_offset >= end_offset {
16022                return Ok(());
16023            }
16024
16025            // Decode unknown envelopes for gaps in ordinals.
16026            while _next_ordinal_to_read < 3 {
16027                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16028                _next_ordinal_to_read += 1;
16029                next_offset += envelope_size;
16030            }
16031
16032            let next_out_of_line = decoder.next_out_of_line();
16033            let handles_before = decoder.remaining_handles();
16034            if let Some((inlined, num_bytes, num_handles)) =
16035                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16036            {
16037                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16038                if inlined != (member_inline_size <= 4) {
16039                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16040                }
16041                let inner_offset;
16042                let mut inner_depth = depth.clone();
16043                if inlined {
16044                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16045                    inner_offset = next_offset;
16046                } else {
16047                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16048                    inner_depth.increment()?;
16049                }
16050                let val_ref = self.original_destination_address.get_or_insert_with(|| {
16051                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
16052                });
16053                fidl::decode!(
16054                    fidl_fuchsia_net__common::SocketAddress,
16055                    D,
16056                    val_ref,
16057                    decoder,
16058                    inner_offset,
16059                    inner_depth
16060                )?;
16061                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16062                {
16063                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16064                }
16065                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16066                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16067                }
16068            }
16069
16070            next_offset += envelope_size;
16071
16072            // Decode the remaining unknown envelopes.
16073            while next_offset < end_offset {
16074                _next_ordinal_to_read += 1;
16075                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16076                next_offset += envelope_size;
16077            }
16078
16079            Ok(())
16080        }
16081    }
16082
16083    impl IpSendControlData {
16084        #[inline(always)]
16085        fn max_ordinal_present(&self) -> u64 {
16086            if let Some(_) = self.ttl {
16087                return 2;
16088            }
16089            0
16090        }
16091    }
16092
16093    impl fidl::encoding::ValueTypeMarker for IpSendControlData {
16094        type Borrowed<'a> = &'a Self;
16095        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16096            value
16097        }
16098    }
16099
16100    unsafe impl fidl::encoding::TypeMarker for IpSendControlData {
16101        type Owned = Self;
16102
16103        #[inline(always)]
16104        fn inline_align(_context: fidl::encoding::Context) -> usize {
16105            8
16106        }
16107
16108        #[inline(always)]
16109        fn inline_size(_context: fidl::encoding::Context) -> usize {
16110            16
16111        }
16112    }
16113
16114    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpSendControlData, D>
16115        for &IpSendControlData
16116    {
16117        unsafe fn encode(
16118            self,
16119            encoder: &mut fidl::encoding::Encoder<'_, D>,
16120            offset: usize,
16121            mut depth: fidl::encoding::Depth,
16122        ) -> fidl::Result<()> {
16123            encoder.debug_check_bounds::<IpSendControlData>(offset);
16124            // Vector header
16125            let max_ordinal: u64 = self.max_ordinal_present();
16126            encoder.write_num(max_ordinal, offset);
16127            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16128            // Calling encoder.out_of_line_offset(0) is not allowed.
16129            if max_ordinal == 0 {
16130                return Ok(());
16131            }
16132            depth.increment()?;
16133            let envelope_size = 8;
16134            let bytes_len = max_ordinal as usize * envelope_size;
16135            #[allow(unused_variables)]
16136            let offset = encoder.out_of_line_offset(bytes_len);
16137            let mut _prev_end_offset: usize = 0;
16138            if 2 > max_ordinal {
16139                return Ok(());
16140            }
16141
16142            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16143            // are envelope_size bytes.
16144            let cur_offset: usize = (2 - 1) * envelope_size;
16145
16146            // Zero reserved fields.
16147            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16148
16149            // Safety:
16150            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16151            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16152            //   envelope_size bytes, there is always sufficient room.
16153            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16154                self.ttl.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16155                encoder,
16156                offset + cur_offset,
16157                depth,
16158            )?;
16159
16160            _prev_end_offset = cur_offset + envelope_size;
16161
16162            Ok(())
16163        }
16164    }
16165
16166    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpSendControlData {
16167        #[inline(always)]
16168        fn new_empty() -> Self {
16169            Self::default()
16170        }
16171
16172        unsafe fn decode(
16173            &mut self,
16174            decoder: &mut fidl::encoding::Decoder<'_, D>,
16175            offset: usize,
16176            mut depth: fidl::encoding::Depth,
16177        ) -> fidl::Result<()> {
16178            decoder.debug_check_bounds::<Self>(offset);
16179            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16180                None => return Err(fidl::Error::NotNullable),
16181                Some(len) => len,
16182            };
16183            // Calling decoder.out_of_line_offset(0) is not allowed.
16184            if len == 0 {
16185                return Ok(());
16186            };
16187            depth.increment()?;
16188            let envelope_size = 8;
16189            let bytes_len = len * envelope_size;
16190            let offset = decoder.out_of_line_offset(bytes_len)?;
16191            // Decode the envelope for each type.
16192            let mut _next_ordinal_to_read = 0;
16193            let mut next_offset = offset;
16194            let end_offset = offset + bytes_len;
16195            _next_ordinal_to_read += 1;
16196            if next_offset >= end_offset {
16197                return Ok(());
16198            }
16199
16200            // Decode unknown envelopes for gaps in ordinals.
16201            while _next_ordinal_to_read < 2 {
16202                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16203                _next_ordinal_to_read += 1;
16204                next_offset += envelope_size;
16205            }
16206
16207            let next_out_of_line = decoder.next_out_of_line();
16208            let handles_before = decoder.remaining_handles();
16209            if let Some((inlined, num_bytes, num_handles)) =
16210                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16211            {
16212                let member_inline_size =
16213                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16214                if inlined != (member_inline_size <= 4) {
16215                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16216                }
16217                let inner_offset;
16218                let mut inner_depth = depth.clone();
16219                if inlined {
16220                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16221                    inner_offset = next_offset;
16222                } else {
16223                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16224                    inner_depth.increment()?;
16225                }
16226                let val_ref = self.ttl.get_or_insert_with(|| fidl::new_empty!(u8, D));
16227                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16228                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16229                {
16230                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16231                }
16232                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16233                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16234                }
16235            }
16236
16237            next_offset += envelope_size;
16238
16239            // Decode the remaining unknown envelopes.
16240            while next_offset < end_offset {
16241                _next_ordinal_to_read += 1;
16242                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16243                next_offset += envelope_size;
16244            }
16245
16246            Ok(())
16247        }
16248    }
16249
16250    impl Ipv6RecvControlData {
16251        #[inline(always)]
16252        fn max_ordinal_present(&self) -> u64 {
16253            if let Some(_) = self.pktinfo {
16254                return 3;
16255            }
16256            if let Some(_) = self.hoplimit {
16257                return 2;
16258            }
16259            if let Some(_) = self.tclass {
16260                return 1;
16261            }
16262            0
16263        }
16264    }
16265
16266    impl fidl::encoding::ValueTypeMarker for Ipv6RecvControlData {
16267        type Borrowed<'a> = &'a Self;
16268        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16269            value
16270        }
16271    }
16272
16273    unsafe impl fidl::encoding::TypeMarker for Ipv6RecvControlData {
16274        type Owned = Self;
16275
16276        #[inline(always)]
16277        fn inline_align(_context: fidl::encoding::Context) -> usize {
16278            8
16279        }
16280
16281        #[inline(always)]
16282        fn inline_size(_context: fidl::encoding::Context) -> usize {
16283            16
16284        }
16285    }
16286
16287    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ipv6RecvControlData, D>
16288        for &Ipv6RecvControlData
16289    {
16290        unsafe fn encode(
16291            self,
16292            encoder: &mut fidl::encoding::Encoder<'_, D>,
16293            offset: usize,
16294            mut depth: fidl::encoding::Depth,
16295        ) -> fidl::Result<()> {
16296            encoder.debug_check_bounds::<Ipv6RecvControlData>(offset);
16297            // Vector header
16298            let max_ordinal: u64 = self.max_ordinal_present();
16299            encoder.write_num(max_ordinal, offset);
16300            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16301            // Calling encoder.out_of_line_offset(0) is not allowed.
16302            if max_ordinal == 0 {
16303                return Ok(());
16304            }
16305            depth.increment()?;
16306            let envelope_size = 8;
16307            let bytes_len = max_ordinal as usize * envelope_size;
16308            #[allow(unused_variables)]
16309            let offset = encoder.out_of_line_offset(bytes_len);
16310            let mut _prev_end_offset: usize = 0;
16311            if 1 > max_ordinal {
16312                return Ok(());
16313            }
16314
16315            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16316            // are envelope_size bytes.
16317            let cur_offset: usize = (1 - 1) * envelope_size;
16318
16319            // Zero reserved fields.
16320            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16321
16322            // Safety:
16323            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16324            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16325            //   envelope_size bytes, there is always sufficient room.
16326            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16327                self.tclass.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16328                encoder,
16329                offset + cur_offset,
16330                depth,
16331            )?;
16332
16333            _prev_end_offset = cur_offset + envelope_size;
16334            if 2 > max_ordinal {
16335                return Ok(());
16336            }
16337
16338            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16339            // are envelope_size bytes.
16340            let cur_offset: usize = (2 - 1) * envelope_size;
16341
16342            // Zero reserved fields.
16343            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16344
16345            // Safety:
16346            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16347            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16348            //   envelope_size bytes, there is always sufficient room.
16349            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16350                self.hoplimit.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16351                encoder,
16352                offset + cur_offset,
16353                depth,
16354            )?;
16355
16356            _prev_end_offset = cur_offset + envelope_size;
16357            if 3 > max_ordinal {
16358                return Ok(());
16359            }
16360
16361            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16362            // are envelope_size bytes.
16363            let cur_offset: usize = (3 - 1) * envelope_size;
16364
16365            // Zero reserved fields.
16366            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16367
16368            // Safety:
16369            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16370            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16371            //   envelope_size bytes, there is always sufficient room.
16372            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoRecvControlData, D>(
16373                self.pktinfo
16374                    .as_ref()
16375                    .map(<Ipv6PktInfoRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16376                encoder,
16377                offset + cur_offset,
16378                depth,
16379            )?;
16380
16381            _prev_end_offset = cur_offset + envelope_size;
16382
16383            Ok(())
16384        }
16385    }
16386
16387    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ipv6RecvControlData {
16388        #[inline(always)]
16389        fn new_empty() -> Self {
16390            Self::default()
16391        }
16392
16393        unsafe fn decode(
16394            &mut self,
16395            decoder: &mut fidl::encoding::Decoder<'_, D>,
16396            offset: usize,
16397            mut depth: fidl::encoding::Depth,
16398        ) -> fidl::Result<()> {
16399            decoder.debug_check_bounds::<Self>(offset);
16400            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16401                None => return Err(fidl::Error::NotNullable),
16402                Some(len) => len,
16403            };
16404            // Calling decoder.out_of_line_offset(0) is not allowed.
16405            if len == 0 {
16406                return Ok(());
16407            };
16408            depth.increment()?;
16409            let envelope_size = 8;
16410            let bytes_len = len * envelope_size;
16411            let offset = decoder.out_of_line_offset(bytes_len)?;
16412            // Decode the envelope for each type.
16413            let mut _next_ordinal_to_read = 0;
16414            let mut next_offset = offset;
16415            let end_offset = offset + bytes_len;
16416            _next_ordinal_to_read += 1;
16417            if next_offset >= end_offset {
16418                return Ok(());
16419            }
16420
16421            // Decode unknown envelopes for gaps in ordinals.
16422            while _next_ordinal_to_read < 1 {
16423                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16424                _next_ordinal_to_read += 1;
16425                next_offset += envelope_size;
16426            }
16427
16428            let next_out_of_line = decoder.next_out_of_line();
16429            let handles_before = decoder.remaining_handles();
16430            if let Some((inlined, num_bytes, num_handles)) =
16431                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16432            {
16433                let member_inline_size =
16434                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16435                if inlined != (member_inline_size <= 4) {
16436                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16437                }
16438                let inner_offset;
16439                let mut inner_depth = depth.clone();
16440                if inlined {
16441                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16442                    inner_offset = next_offset;
16443                } else {
16444                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16445                    inner_depth.increment()?;
16446                }
16447                let val_ref = self.tclass.get_or_insert_with(|| fidl::new_empty!(u8, D));
16448                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16449                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16450                {
16451                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16452                }
16453                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16454                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16455                }
16456            }
16457
16458            next_offset += envelope_size;
16459            _next_ordinal_to_read += 1;
16460            if next_offset >= end_offset {
16461                return Ok(());
16462            }
16463
16464            // Decode unknown envelopes for gaps in ordinals.
16465            while _next_ordinal_to_read < 2 {
16466                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16467                _next_ordinal_to_read += 1;
16468                next_offset += envelope_size;
16469            }
16470
16471            let next_out_of_line = decoder.next_out_of_line();
16472            let handles_before = decoder.remaining_handles();
16473            if let Some((inlined, num_bytes, num_handles)) =
16474                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16475            {
16476                let member_inline_size =
16477                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16478                if inlined != (member_inline_size <= 4) {
16479                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16480                }
16481                let inner_offset;
16482                let mut inner_depth = depth.clone();
16483                if inlined {
16484                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16485                    inner_offset = next_offset;
16486                } else {
16487                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16488                    inner_depth.increment()?;
16489                }
16490                let val_ref = self.hoplimit.get_or_insert_with(|| fidl::new_empty!(u8, D));
16491                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16492                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16493                {
16494                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16495                }
16496                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16497                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16498                }
16499            }
16500
16501            next_offset += envelope_size;
16502            _next_ordinal_to_read += 1;
16503            if next_offset >= end_offset {
16504                return Ok(());
16505            }
16506
16507            // Decode unknown envelopes for gaps in ordinals.
16508            while _next_ordinal_to_read < 3 {
16509                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16510                _next_ordinal_to_read += 1;
16511                next_offset += envelope_size;
16512            }
16513
16514            let next_out_of_line = decoder.next_out_of_line();
16515            let handles_before = decoder.remaining_handles();
16516            if let Some((inlined, num_bytes, num_handles)) =
16517                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16518            {
16519                let member_inline_size =
16520                    <Ipv6PktInfoRecvControlData as fidl::encoding::TypeMarker>::inline_size(
16521                        decoder.context,
16522                    );
16523                if inlined != (member_inline_size <= 4) {
16524                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16525                }
16526                let inner_offset;
16527                let mut inner_depth = depth.clone();
16528                if inlined {
16529                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16530                    inner_offset = next_offset;
16531                } else {
16532                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16533                    inner_depth.increment()?;
16534                }
16535                let val_ref = self
16536                    .pktinfo
16537                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoRecvControlData, D));
16538                fidl::decode!(
16539                    Ipv6PktInfoRecvControlData,
16540                    D,
16541                    val_ref,
16542                    decoder,
16543                    inner_offset,
16544                    inner_depth
16545                )?;
16546                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16547                {
16548                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16549                }
16550                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16551                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16552                }
16553            }
16554
16555            next_offset += envelope_size;
16556
16557            // Decode the remaining unknown envelopes.
16558            while next_offset < end_offset {
16559                _next_ordinal_to_read += 1;
16560                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16561                next_offset += envelope_size;
16562            }
16563
16564            Ok(())
16565        }
16566    }
16567
16568    impl Ipv6SendControlData {
16569        #[inline(always)]
16570        fn max_ordinal_present(&self) -> u64 {
16571            if let Some(_) = self.pktinfo {
16572                return 3;
16573            }
16574            if let Some(_) = self.hoplimit {
16575                return 2;
16576            }
16577            0
16578        }
16579    }
16580
16581    impl fidl::encoding::ValueTypeMarker for Ipv6SendControlData {
16582        type Borrowed<'a> = &'a Self;
16583        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16584            value
16585        }
16586    }
16587
16588    unsafe impl fidl::encoding::TypeMarker for Ipv6SendControlData {
16589        type Owned = Self;
16590
16591        #[inline(always)]
16592        fn inline_align(_context: fidl::encoding::Context) -> usize {
16593            8
16594        }
16595
16596        #[inline(always)]
16597        fn inline_size(_context: fidl::encoding::Context) -> usize {
16598            16
16599        }
16600    }
16601
16602    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ipv6SendControlData, D>
16603        for &Ipv6SendControlData
16604    {
16605        unsafe fn encode(
16606            self,
16607            encoder: &mut fidl::encoding::Encoder<'_, D>,
16608            offset: usize,
16609            mut depth: fidl::encoding::Depth,
16610        ) -> fidl::Result<()> {
16611            encoder.debug_check_bounds::<Ipv6SendControlData>(offset);
16612            // Vector header
16613            let max_ordinal: u64 = self.max_ordinal_present();
16614            encoder.write_num(max_ordinal, offset);
16615            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16616            // Calling encoder.out_of_line_offset(0) is not allowed.
16617            if max_ordinal == 0 {
16618                return Ok(());
16619            }
16620            depth.increment()?;
16621            let envelope_size = 8;
16622            let bytes_len = max_ordinal as usize * envelope_size;
16623            #[allow(unused_variables)]
16624            let offset = encoder.out_of_line_offset(bytes_len);
16625            let mut _prev_end_offset: usize = 0;
16626            if 2 > max_ordinal {
16627                return Ok(());
16628            }
16629
16630            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16631            // are envelope_size bytes.
16632            let cur_offset: usize = (2 - 1) * envelope_size;
16633
16634            // Zero reserved fields.
16635            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16636
16637            // Safety:
16638            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16639            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16640            //   envelope_size bytes, there is always sufficient room.
16641            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16642                self.hoplimit.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16643                encoder,
16644                offset + cur_offset,
16645                depth,
16646            )?;
16647
16648            _prev_end_offset = cur_offset + envelope_size;
16649            if 3 > max_ordinal {
16650                return Ok(());
16651            }
16652
16653            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16654            // are envelope_size bytes.
16655            let cur_offset: usize = (3 - 1) * envelope_size;
16656
16657            // Zero reserved fields.
16658            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16659
16660            // Safety:
16661            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16662            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16663            //   envelope_size bytes, there is always sufficient room.
16664            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoSendControlData, D>(
16665                self.pktinfo
16666                    .as_ref()
16667                    .map(<Ipv6PktInfoSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
16668                encoder,
16669                offset + cur_offset,
16670                depth,
16671            )?;
16672
16673            _prev_end_offset = cur_offset + envelope_size;
16674
16675            Ok(())
16676        }
16677    }
16678
16679    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ipv6SendControlData {
16680        #[inline(always)]
16681        fn new_empty() -> Self {
16682            Self::default()
16683        }
16684
16685        unsafe fn decode(
16686            &mut self,
16687            decoder: &mut fidl::encoding::Decoder<'_, D>,
16688            offset: usize,
16689            mut depth: fidl::encoding::Depth,
16690        ) -> fidl::Result<()> {
16691            decoder.debug_check_bounds::<Self>(offset);
16692            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16693                None => return Err(fidl::Error::NotNullable),
16694                Some(len) => len,
16695            };
16696            // Calling decoder.out_of_line_offset(0) is not allowed.
16697            if len == 0 {
16698                return Ok(());
16699            };
16700            depth.increment()?;
16701            let envelope_size = 8;
16702            let bytes_len = len * envelope_size;
16703            let offset = decoder.out_of_line_offset(bytes_len)?;
16704            // Decode the envelope for each type.
16705            let mut _next_ordinal_to_read = 0;
16706            let mut next_offset = offset;
16707            let end_offset = offset + bytes_len;
16708            _next_ordinal_to_read += 1;
16709            if next_offset >= end_offset {
16710                return Ok(());
16711            }
16712
16713            // Decode unknown envelopes for gaps in ordinals.
16714            while _next_ordinal_to_read < 2 {
16715                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16716                _next_ordinal_to_read += 1;
16717                next_offset += envelope_size;
16718            }
16719
16720            let next_out_of_line = decoder.next_out_of_line();
16721            let handles_before = decoder.remaining_handles();
16722            if let Some((inlined, num_bytes, num_handles)) =
16723                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16724            {
16725                let member_inline_size =
16726                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16727                if inlined != (member_inline_size <= 4) {
16728                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16729                }
16730                let inner_offset;
16731                let mut inner_depth = depth.clone();
16732                if inlined {
16733                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16734                    inner_offset = next_offset;
16735                } else {
16736                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16737                    inner_depth.increment()?;
16738                }
16739                let val_ref = self.hoplimit.get_or_insert_with(|| fidl::new_empty!(u8, D));
16740                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16741                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16742                {
16743                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16744                }
16745                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16746                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16747                }
16748            }
16749
16750            next_offset += envelope_size;
16751            _next_ordinal_to_read += 1;
16752            if next_offset >= end_offset {
16753                return Ok(());
16754            }
16755
16756            // Decode unknown envelopes for gaps in ordinals.
16757            while _next_ordinal_to_read < 3 {
16758                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16759                _next_ordinal_to_read += 1;
16760                next_offset += envelope_size;
16761            }
16762
16763            let next_out_of_line = decoder.next_out_of_line();
16764            let handles_before = decoder.remaining_handles();
16765            if let Some((inlined, num_bytes, num_handles)) =
16766                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16767            {
16768                let member_inline_size =
16769                    <Ipv6PktInfoSendControlData as fidl::encoding::TypeMarker>::inline_size(
16770                        decoder.context,
16771                    );
16772                if inlined != (member_inline_size <= 4) {
16773                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16774                }
16775                let inner_offset;
16776                let mut inner_depth = depth.clone();
16777                if inlined {
16778                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16779                    inner_offset = next_offset;
16780                } else {
16781                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16782                    inner_depth.increment()?;
16783                }
16784                let val_ref = self
16785                    .pktinfo
16786                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoSendControlData, D));
16787                fidl::decode!(
16788                    Ipv6PktInfoSendControlData,
16789                    D,
16790                    val_ref,
16791                    decoder,
16792                    inner_offset,
16793                    inner_depth
16794                )?;
16795                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16796                {
16797                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16798                }
16799                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16800                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16801                }
16802            }
16803
16804            next_offset += envelope_size;
16805
16806            // Decode the remaining unknown envelopes.
16807            while next_offset < end_offset {
16808                _next_ordinal_to_read += 1;
16809                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16810                next_offset += envelope_size;
16811            }
16812
16813            Ok(())
16814        }
16815    }
16816
16817    impl NetworkSocketRecvControlData {
16818        #[inline(always)]
16819        fn max_ordinal_present(&self) -> u64 {
16820            if let Some(_) = self.ipv6 {
16821                return 3;
16822            }
16823            if let Some(_) = self.ip {
16824                return 2;
16825            }
16826            if let Some(_) = self.socket {
16827                return 1;
16828            }
16829            0
16830        }
16831    }
16832
16833    impl fidl::encoding::ValueTypeMarker for NetworkSocketRecvControlData {
16834        type Borrowed<'a> = &'a Self;
16835        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16836            value
16837        }
16838    }
16839
16840    unsafe impl fidl::encoding::TypeMarker for NetworkSocketRecvControlData {
16841        type Owned = Self;
16842
16843        #[inline(always)]
16844        fn inline_align(_context: fidl::encoding::Context) -> usize {
16845            8
16846        }
16847
16848        #[inline(always)]
16849        fn inline_size(_context: fidl::encoding::Context) -> usize {
16850            16
16851        }
16852    }
16853
16854    unsafe impl<D: fidl::encoding::ResourceDialect>
16855        fidl::encoding::Encode<NetworkSocketRecvControlData, D> for &NetworkSocketRecvControlData
16856    {
16857        unsafe fn encode(
16858            self,
16859            encoder: &mut fidl::encoding::Encoder<'_, D>,
16860            offset: usize,
16861            mut depth: fidl::encoding::Depth,
16862        ) -> fidl::Result<()> {
16863            encoder.debug_check_bounds::<NetworkSocketRecvControlData>(offset);
16864            // Vector header
16865            let max_ordinal: u64 = self.max_ordinal_present();
16866            encoder.write_num(max_ordinal, offset);
16867            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16868            // Calling encoder.out_of_line_offset(0) is not allowed.
16869            if max_ordinal == 0 {
16870                return Ok(());
16871            }
16872            depth.increment()?;
16873            let envelope_size = 8;
16874            let bytes_len = max_ordinal as usize * envelope_size;
16875            #[allow(unused_variables)]
16876            let offset = encoder.out_of_line_offset(bytes_len);
16877            let mut _prev_end_offset: usize = 0;
16878            if 1 > max_ordinal {
16879                return Ok(());
16880            }
16881
16882            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16883            // are envelope_size bytes.
16884            let cur_offset: usize = (1 - 1) * envelope_size;
16885
16886            // Zero reserved fields.
16887            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16888
16889            // Safety:
16890            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16891            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16892            //   envelope_size bytes, there is always sufficient room.
16893            fidl::encoding::encode_in_envelope_optional::<SocketRecvControlData, D>(
16894                self.socket
16895                    .as_ref()
16896                    .map(<SocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16897                encoder,
16898                offset + cur_offset,
16899                depth,
16900            )?;
16901
16902            _prev_end_offset = cur_offset + envelope_size;
16903            if 2 > max_ordinal {
16904                return Ok(());
16905            }
16906
16907            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16908            // are envelope_size bytes.
16909            let cur_offset: usize = (2 - 1) * envelope_size;
16910
16911            // Zero reserved fields.
16912            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16913
16914            // Safety:
16915            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16916            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16917            //   envelope_size bytes, there is always sufficient room.
16918            fidl::encoding::encode_in_envelope_optional::<IpRecvControlData, D>(
16919                self.ip
16920                    .as_ref()
16921                    .map(<IpRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16922                encoder,
16923                offset + cur_offset,
16924                depth,
16925            )?;
16926
16927            _prev_end_offset = cur_offset + envelope_size;
16928            if 3 > max_ordinal {
16929                return Ok(());
16930            }
16931
16932            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16933            // are envelope_size bytes.
16934            let cur_offset: usize = (3 - 1) * envelope_size;
16935
16936            // Zero reserved fields.
16937            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16938
16939            // Safety:
16940            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16941            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16942            //   envelope_size bytes, there is always sufficient room.
16943            fidl::encoding::encode_in_envelope_optional::<Ipv6RecvControlData, D>(
16944                self.ipv6
16945                    .as_ref()
16946                    .map(<Ipv6RecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16947                encoder,
16948                offset + cur_offset,
16949                depth,
16950            )?;
16951
16952            _prev_end_offset = cur_offset + envelope_size;
16953
16954            Ok(())
16955        }
16956    }
16957
16958    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16959        for NetworkSocketRecvControlData
16960    {
16961        #[inline(always)]
16962        fn new_empty() -> Self {
16963            Self::default()
16964        }
16965
16966        unsafe fn decode(
16967            &mut self,
16968            decoder: &mut fidl::encoding::Decoder<'_, D>,
16969            offset: usize,
16970            mut depth: fidl::encoding::Depth,
16971        ) -> fidl::Result<()> {
16972            decoder.debug_check_bounds::<Self>(offset);
16973            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16974                None => return Err(fidl::Error::NotNullable),
16975                Some(len) => len,
16976            };
16977            // Calling decoder.out_of_line_offset(0) is not allowed.
16978            if len == 0 {
16979                return Ok(());
16980            };
16981            depth.increment()?;
16982            let envelope_size = 8;
16983            let bytes_len = len * envelope_size;
16984            let offset = decoder.out_of_line_offset(bytes_len)?;
16985            // Decode the envelope for each type.
16986            let mut _next_ordinal_to_read = 0;
16987            let mut next_offset = offset;
16988            let end_offset = offset + bytes_len;
16989            _next_ordinal_to_read += 1;
16990            if next_offset >= end_offset {
16991                return Ok(());
16992            }
16993
16994            // Decode unknown envelopes for gaps in ordinals.
16995            while _next_ordinal_to_read < 1 {
16996                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16997                _next_ordinal_to_read += 1;
16998                next_offset += envelope_size;
16999            }
17000
17001            let next_out_of_line = decoder.next_out_of_line();
17002            let handles_before = decoder.remaining_handles();
17003            if let Some((inlined, num_bytes, num_handles)) =
17004                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17005            {
17006                let member_inline_size =
17007                    <SocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
17008                        decoder.context,
17009                    );
17010                if inlined != (member_inline_size <= 4) {
17011                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17012                }
17013                let inner_offset;
17014                let mut inner_depth = depth.clone();
17015                if inlined {
17016                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17017                    inner_offset = next_offset;
17018                } else {
17019                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17020                    inner_depth.increment()?;
17021                }
17022                let val_ref =
17023                    self.socket.get_or_insert_with(|| fidl::new_empty!(SocketRecvControlData, D));
17024                fidl::decode!(
17025                    SocketRecvControlData,
17026                    D,
17027                    val_ref,
17028                    decoder,
17029                    inner_offset,
17030                    inner_depth
17031                )?;
17032                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17033                {
17034                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17035                }
17036                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17037                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17038                }
17039            }
17040
17041            next_offset += envelope_size;
17042            _next_ordinal_to_read += 1;
17043            if next_offset >= end_offset {
17044                return Ok(());
17045            }
17046
17047            // Decode unknown envelopes for gaps in ordinals.
17048            while _next_ordinal_to_read < 2 {
17049                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17050                _next_ordinal_to_read += 1;
17051                next_offset += envelope_size;
17052            }
17053
17054            let next_out_of_line = decoder.next_out_of_line();
17055            let handles_before = decoder.remaining_handles();
17056            if let Some((inlined, num_bytes, num_handles)) =
17057                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17058            {
17059                let member_inline_size =
17060                    <IpRecvControlData as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17061                if inlined != (member_inline_size <= 4) {
17062                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17063                }
17064                let inner_offset;
17065                let mut inner_depth = depth.clone();
17066                if inlined {
17067                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17068                    inner_offset = next_offset;
17069                } else {
17070                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17071                    inner_depth.increment()?;
17072                }
17073                let val_ref = self.ip.get_or_insert_with(|| fidl::new_empty!(IpRecvControlData, D));
17074                fidl::decode!(IpRecvControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17075                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17076                {
17077                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17078                }
17079                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17080                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17081                }
17082            }
17083
17084            next_offset += envelope_size;
17085            _next_ordinal_to_read += 1;
17086            if next_offset >= end_offset {
17087                return Ok(());
17088            }
17089
17090            // Decode unknown envelopes for gaps in ordinals.
17091            while _next_ordinal_to_read < 3 {
17092                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17093                _next_ordinal_to_read += 1;
17094                next_offset += envelope_size;
17095            }
17096
17097            let next_out_of_line = decoder.next_out_of_line();
17098            let handles_before = decoder.remaining_handles();
17099            if let Some((inlined, num_bytes, num_handles)) =
17100                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17101            {
17102                let member_inline_size =
17103                    <Ipv6RecvControlData as fidl::encoding::TypeMarker>::inline_size(
17104                        decoder.context,
17105                    );
17106                if inlined != (member_inline_size <= 4) {
17107                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17108                }
17109                let inner_offset;
17110                let mut inner_depth = depth.clone();
17111                if inlined {
17112                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17113                    inner_offset = next_offset;
17114                } else {
17115                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17116                    inner_depth.increment()?;
17117                }
17118                let val_ref =
17119                    self.ipv6.get_or_insert_with(|| fidl::new_empty!(Ipv6RecvControlData, D));
17120                fidl::decode!(Ipv6RecvControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17121                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17122                {
17123                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17124                }
17125                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17126                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17127                }
17128            }
17129
17130            next_offset += envelope_size;
17131
17132            // Decode the remaining unknown envelopes.
17133            while next_offset < end_offset {
17134                _next_ordinal_to_read += 1;
17135                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17136                next_offset += envelope_size;
17137            }
17138
17139            Ok(())
17140        }
17141    }
17142
17143    impl NetworkSocketSendControlData {
17144        #[inline(always)]
17145        fn max_ordinal_present(&self) -> u64 {
17146            if let Some(_) = self.ipv6 {
17147                return 3;
17148            }
17149            if let Some(_) = self.ip {
17150                return 2;
17151            }
17152            if let Some(_) = self.socket {
17153                return 1;
17154            }
17155            0
17156        }
17157    }
17158
17159    impl fidl::encoding::ValueTypeMarker for NetworkSocketSendControlData {
17160        type Borrowed<'a> = &'a Self;
17161        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17162            value
17163        }
17164    }
17165
17166    unsafe impl fidl::encoding::TypeMarker for NetworkSocketSendControlData {
17167        type Owned = Self;
17168
17169        #[inline(always)]
17170        fn inline_align(_context: fidl::encoding::Context) -> usize {
17171            8
17172        }
17173
17174        #[inline(always)]
17175        fn inline_size(_context: fidl::encoding::Context) -> usize {
17176            16
17177        }
17178    }
17179
17180    unsafe impl<D: fidl::encoding::ResourceDialect>
17181        fidl::encoding::Encode<NetworkSocketSendControlData, D> for &NetworkSocketSendControlData
17182    {
17183        unsafe fn encode(
17184            self,
17185            encoder: &mut fidl::encoding::Encoder<'_, D>,
17186            offset: usize,
17187            mut depth: fidl::encoding::Depth,
17188        ) -> fidl::Result<()> {
17189            encoder.debug_check_bounds::<NetworkSocketSendControlData>(offset);
17190            // Vector header
17191            let max_ordinal: u64 = self.max_ordinal_present();
17192            encoder.write_num(max_ordinal, offset);
17193            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17194            // Calling encoder.out_of_line_offset(0) is not allowed.
17195            if max_ordinal == 0 {
17196                return Ok(());
17197            }
17198            depth.increment()?;
17199            let envelope_size = 8;
17200            let bytes_len = max_ordinal as usize * envelope_size;
17201            #[allow(unused_variables)]
17202            let offset = encoder.out_of_line_offset(bytes_len);
17203            let mut _prev_end_offset: usize = 0;
17204            if 1 > max_ordinal {
17205                return Ok(());
17206            }
17207
17208            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17209            // are envelope_size bytes.
17210            let cur_offset: usize = (1 - 1) * envelope_size;
17211
17212            // Zero reserved fields.
17213            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17214
17215            // Safety:
17216            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17217            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17218            //   envelope_size bytes, there is always sufficient room.
17219            fidl::encoding::encode_in_envelope_optional::<SocketSendControlData, D>(
17220                self.socket
17221                    .as_ref()
17222                    .map(<SocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17223                encoder,
17224                offset + cur_offset,
17225                depth,
17226            )?;
17227
17228            _prev_end_offset = cur_offset + envelope_size;
17229            if 2 > max_ordinal {
17230                return Ok(());
17231            }
17232
17233            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17234            // are envelope_size bytes.
17235            let cur_offset: usize = (2 - 1) * envelope_size;
17236
17237            // Zero reserved fields.
17238            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17239
17240            // Safety:
17241            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17242            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17243            //   envelope_size bytes, there is always sufficient room.
17244            fidl::encoding::encode_in_envelope_optional::<IpSendControlData, D>(
17245                self.ip
17246                    .as_ref()
17247                    .map(<IpSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17248                encoder,
17249                offset + cur_offset,
17250                depth,
17251            )?;
17252
17253            _prev_end_offset = cur_offset + envelope_size;
17254            if 3 > max_ordinal {
17255                return Ok(());
17256            }
17257
17258            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17259            // are envelope_size bytes.
17260            let cur_offset: usize = (3 - 1) * envelope_size;
17261
17262            // Zero reserved fields.
17263            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17264
17265            // Safety:
17266            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17267            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17268            //   envelope_size bytes, there is always sufficient room.
17269            fidl::encoding::encode_in_envelope_optional::<Ipv6SendControlData, D>(
17270                self.ipv6
17271                    .as_ref()
17272                    .map(<Ipv6SendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17273                encoder,
17274                offset + cur_offset,
17275                depth,
17276            )?;
17277
17278            _prev_end_offset = cur_offset + envelope_size;
17279
17280            Ok(())
17281        }
17282    }
17283
17284    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17285        for NetworkSocketSendControlData
17286    {
17287        #[inline(always)]
17288        fn new_empty() -> Self {
17289            Self::default()
17290        }
17291
17292        unsafe fn decode(
17293            &mut self,
17294            decoder: &mut fidl::encoding::Decoder<'_, D>,
17295            offset: usize,
17296            mut depth: fidl::encoding::Depth,
17297        ) -> fidl::Result<()> {
17298            decoder.debug_check_bounds::<Self>(offset);
17299            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17300                None => return Err(fidl::Error::NotNullable),
17301                Some(len) => len,
17302            };
17303            // Calling decoder.out_of_line_offset(0) is not allowed.
17304            if len == 0 {
17305                return Ok(());
17306            };
17307            depth.increment()?;
17308            let envelope_size = 8;
17309            let bytes_len = len * envelope_size;
17310            let offset = decoder.out_of_line_offset(bytes_len)?;
17311            // Decode the envelope for each type.
17312            let mut _next_ordinal_to_read = 0;
17313            let mut next_offset = offset;
17314            let end_offset = offset + bytes_len;
17315            _next_ordinal_to_read += 1;
17316            if next_offset >= end_offset {
17317                return Ok(());
17318            }
17319
17320            // Decode unknown envelopes for gaps in ordinals.
17321            while _next_ordinal_to_read < 1 {
17322                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17323                _next_ordinal_to_read += 1;
17324                next_offset += envelope_size;
17325            }
17326
17327            let next_out_of_line = decoder.next_out_of_line();
17328            let handles_before = decoder.remaining_handles();
17329            if let Some((inlined, num_bytes, num_handles)) =
17330                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17331            {
17332                let member_inline_size =
17333                    <SocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
17334                        decoder.context,
17335                    );
17336                if inlined != (member_inline_size <= 4) {
17337                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17338                }
17339                let inner_offset;
17340                let mut inner_depth = depth.clone();
17341                if inlined {
17342                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17343                    inner_offset = next_offset;
17344                } else {
17345                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17346                    inner_depth.increment()?;
17347                }
17348                let val_ref =
17349                    self.socket.get_or_insert_with(|| fidl::new_empty!(SocketSendControlData, D));
17350                fidl::decode!(
17351                    SocketSendControlData,
17352                    D,
17353                    val_ref,
17354                    decoder,
17355                    inner_offset,
17356                    inner_depth
17357                )?;
17358                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17359                {
17360                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17361                }
17362                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17363                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17364                }
17365            }
17366
17367            next_offset += envelope_size;
17368            _next_ordinal_to_read += 1;
17369            if next_offset >= end_offset {
17370                return Ok(());
17371            }
17372
17373            // Decode unknown envelopes for gaps in ordinals.
17374            while _next_ordinal_to_read < 2 {
17375                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17376                _next_ordinal_to_read += 1;
17377                next_offset += envelope_size;
17378            }
17379
17380            let next_out_of_line = decoder.next_out_of_line();
17381            let handles_before = decoder.remaining_handles();
17382            if let Some((inlined, num_bytes, num_handles)) =
17383                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17384            {
17385                let member_inline_size =
17386                    <IpSendControlData as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17387                if inlined != (member_inline_size <= 4) {
17388                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17389                }
17390                let inner_offset;
17391                let mut inner_depth = depth.clone();
17392                if inlined {
17393                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17394                    inner_offset = next_offset;
17395                } else {
17396                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17397                    inner_depth.increment()?;
17398                }
17399                let val_ref = self.ip.get_or_insert_with(|| fidl::new_empty!(IpSendControlData, D));
17400                fidl::decode!(IpSendControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17401                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17402                {
17403                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17404                }
17405                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17406                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17407                }
17408            }
17409
17410            next_offset += envelope_size;
17411            _next_ordinal_to_read += 1;
17412            if next_offset >= end_offset {
17413                return Ok(());
17414            }
17415
17416            // Decode unknown envelopes for gaps in ordinals.
17417            while _next_ordinal_to_read < 3 {
17418                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17419                _next_ordinal_to_read += 1;
17420                next_offset += envelope_size;
17421            }
17422
17423            let next_out_of_line = decoder.next_out_of_line();
17424            let handles_before = decoder.remaining_handles();
17425            if let Some((inlined, num_bytes, num_handles)) =
17426                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17427            {
17428                let member_inline_size =
17429                    <Ipv6SendControlData as fidl::encoding::TypeMarker>::inline_size(
17430                        decoder.context,
17431                    );
17432                if inlined != (member_inline_size <= 4) {
17433                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17434                }
17435                let inner_offset;
17436                let mut inner_depth = depth.clone();
17437                if inlined {
17438                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17439                    inner_offset = next_offset;
17440                } else {
17441                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17442                    inner_depth.increment()?;
17443                }
17444                let val_ref =
17445                    self.ipv6.get_or_insert_with(|| fidl::new_empty!(Ipv6SendControlData, D));
17446                fidl::decode!(Ipv6SendControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17447                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17448                {
17449                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17450                }
17451                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17452                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17453                }
17454            }
17455
17456            next_offset += envelope_size;
17457
17458            // Decode the remaining unknown envelopes.
17459            while next_offset < end_offset {
17460                _next_ordinal_to_read += 1;
17461                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17462                next_offset += envelope_size;
17463            }
17464
17465            Ok(())
17466        }
17467    }
17468
17469    impl RecvMsgMeta {
17470        #[inline(always)]
17471        fn max_ordinal_present(&self) -> u64 {
17472            if let Some(_) = self.payload_len {
17473                return 3;
17474            }
17475            if let Some(_) = self.control {
17476                return 2;
17477            }
17478            if let Some(_) = self.from {
17479                return 1;
17480            }
17481            0
17482        }
17483    }
17484
17485    impl fidl::encoding::ValueTypeMarker for RecvMsgMeta {
17486        type Borrowed<'a> = &'a Self;
17487        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17488            value
17489        }
17490    }
17491
17492    unsafe impl fidl::encoding::TypeMarker for RecvMsgMeta {
17493        type Owned = Self;
17494
17495        #[inline(always)]
17496        fn inline_align(_context: fidl::encoding::Context) -> usize {
17497            8
17498        }
17499
17500        #[inline(always)]
17501        fn inline_size(_context: fidl::encoding::Context) -> usize {
17502            16
17503        }
17504    }
17505
17506    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecvMsgMeta, D>
17507        for &RecvMsgMeta
17508    {
17509        unsafe fn encode(
17510            self,
17511            encoder: &mut fidl::encoding::Encoder<'_, D>,
17512            offset: usize,
17513            mut depth: fidl::encoding::Depth,
17514        ) -> fidl::Result<()> {
17515            encoder.debug_check_bounds::<RecvMsgMeta>(offset);
17516            // Vector header
17517            let max_ordinal: u64 = self.max_ordinal_present();
17518            encoder.write_num(max_ordinal, offset);
17519            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17520            // Calling encoder.out_of_line_offset(0) is not allowed.
17521            if max_ordinal == 0 {
17522                return Ok(());
17523            }
17524            depth.increment()?;
17525            let envelope_size = 8;
17526            let bytes_len = max_ordinal as usize * envelope_size;
17527            #[allow(unused_variables)]
17528            let offset = encoder.out_of_line_offset(bytes_len);
17529            let mut _prev_end_offset: usize = 0;
17530            if 1 > max_ordinal {
17531                return Ok(());
17532            }
17533
17534            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17535            // are envelope_size bytes.
17536            let cur_offset: usize = (1 - 1) * envelope_size;
17537
17538            // Zero reserved fields.
17539            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17540
17541            // Safety:
17542            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17543            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17544            //   envelope_size bytes, there is always sufficient room.
17545            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
17546            self.from.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
17547            encoder, offset + cur_offset, depth
17548        )?;
17549
17550            _prev_end_offset = cur_offset + envelope_size;
17551            if 2 > max_ordinal {
17552                return Ok(());
17553            }
17554
17555            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17556            // are envelope_size bytes.
17557            let cur_offset: usize = (2 - 1) * envelope_size;
17558
17559            // Zero reserved fields.
17560            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17561
17562            // Safety:
17563            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17564            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17565            //   envelope_size bytes, there is always sufficient room.
17566            fidl::encoding::encode_in_envelope_optional::<DatagramSocketRecvControlData, D>(
17567                self.control.as_ref().map(
17568                    <DatagramSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow,
17569                ),
17570                encoder,
17571                offset + cur_offset,
17572                depth,
17573            )?;
17574
17575            _prev_end_offset = cur_offset + envelope_size;
17576            if 3 > max_ordinal {
17577                return Ok(());
17578            }
17579
17580            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17581            // are envelope_size bytes.
17582            let cur_offset: usize = (3 - 1) * envelope_size;
17583
17584            // Zero reserved fields.
17585            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17586
17587            // Safety:
17588            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17589            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17590            //   envelope_size bytes, there is always sufficient room.
17591            fidl::encoding::encode_in_envelope_optional::<u16, D>(
17592                self.payload_len.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
17593                encoder,
17594                offset + cur_offset,
17595                depth,
17596            )?;
17597
17598            _prev_end_offset = cur_offset + envelope_size;
17599
17600            Ok(())
17601        }
17602    }
17603
17604    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecvMsgMeta {
17605        #[inline(always)]
17606        fn new_empty() -> Self {
17607            Self::default()
17608        }
17609
17610        unsafe fn decode(
17611            &mut self,
17612            decoder: &mut fidl::encoding::Decoder<'_, D>,
17613            offset: usize,
17614            mut depth: fidl::encoding::Depth,
17615        ) -> fidl::Result<()> {
17616            decoder.debug_check_bounds::<Self>(offset);
17617            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17618                None => return Err(fidl::Error::NotNullable),
17619                Some(len) => len,
17620            };
17621            // Calling decoder.out_of_line_offset(0) is not allowed.
17622            if len == 0 {
17623                return Ok(());
17624            };
17625            depth.increment()?;
17626            let envelope_size = 8;
17627            let bytes_len = len * envelope_size;
17628            let offset = decoder.out_of_line_offset(bytes_len)?;
17629            // Decode the envelope for each type.
17630            let mut _next_ordinal_to_read = 0;
17631            let mut next_offset = offset;
17632            let end_offset = offset + bytes_len;
17633            _next_ordinal_to_read += 1;
17634            if next_offset >= end_offset {
17635                return Ok(());
17636            }
17637
17638            // Decode unknown envelopes for gaps in ordinals.
17639            while _next_ordinal_to_read < 1 {
17640                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17641                _next_ordinal_to_read += 1;
17642                next_offset += envelope_size;
17643            }
17644
17645            let next_out_of_line = decoder.next_out_of_line();
17646            let handles_before = decoder.remaining_handles();
17647            if let Some((inlined, num_bytes, num_handles)) =
17648                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17649            {
17650                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17651                if inlined != (member_inline_size <= 4) {
17652                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17653                }
17654                let inner_offset;
17655                let mut inner_depth = depth.clone();
17656                if inlined {
17657                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17658                    inner_offset = next_offset;
17659                } else {
17660                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17661                    inner_depth.increment()?;
17662                }
17663                let val_ref = self.from.get_or_insert_with(|| {
17664                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
17665                });
17666                fidl::decode!(
17667                    fidl_fuchsia_net__common::SocketAddress,
17668                    D,
17669                    val_ref,
17670                    decoder,
17671                    inner_offset,
17672                    inner_depth
17673                )?;
17674                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17675                {
17676                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17677                }
17678                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17679                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17680                }
17681            }
17682
17683            next_offset += envelope_size;
17684            _next_ordinal_to_read += 1;
17685            if next_offset >= end_offset {
17686                return Ok(());
17687            }
17688
17689            // Decode unknown envelopes for gaps in ordinals.
17690            while _next_ordinal_to_read < 2 {
17691                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17692                _next_ordinal_to_read += 1;
17693                next_offset += envelope_size;
17694            }
17695
17696            let next_out_of_line = decoder.next_out_of_line();
17697            let handles_before = decoder.remaining_handles();
17698            if let Some((inlined, num_bytes, num_handles)) =
17699                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17700            {
17701                let member_inline_size =
17702                    <DatagramSocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
17703                        decoder.context,
17704                    );
17705                if inlined != (member_inline_size <= 4) {
17706                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17707                }
17708                let inner_offset;
17709                let mut inner_depth = depth.clone();
17710                if inlined {
17711                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17712                    inner_offset = next_offset;
17713                } else {
17714                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17715                    inner_depth.increment()?;
17716                }
17717                let val_ref = self
17718                    .control
17719                    .get_or_insert_with(|| fidl::new_empty!(DatagramSocketRecvControlData, D));
17720                fidl::decode!(
17721                    DatagramSocketRecvControlData,
17722                    D,
17723                    val_ref,
17724                    decoder,
17725                    inner_offset,
17726                    inner_depth
17727                )?;
17728                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17729                {
17730                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17731                }
17732                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17733                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17734                }
17735            }
17736
17737            next_offset += envelope_size;
17738            _next_ordinal_to_read += 1;
17739            if next_offset >= end_offset {
17740                return Ok(());
17741            }
17742
17743            // Decode unknown envelopes for gaps in ordinals.
17744            while _next_ordinal_to_read < 3 {
17745                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17746                _next_ordinal_to_read += 1;
17747                next_offset += envelope_size;
17748            }
17749
17750            let next_out_of_line = decoder.next_out_of_line();
17751            let handles_before = decoder.remaining_handles();
17752            if let Some((inlined, num_bytes, num_handles)) =
17753                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17754            {
17755                let member_inline_size =
17756                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17757                if inlined != (member_inline_size <= 4) {
17758                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17759                }
17760                let inner_offset;
17761                let mut inner_depth = depth.clone();
17762                if inlined {
17763                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17764                    inner_offset = next_offset;
17765                } else {
17766                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17767                    inner_depth.increment()?;
17768                }
17769                let val_ref = self.payload_len.get_or_insert_with(|| fidl::new_empty!(u16, D));
17770                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
17771                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17772                {
17773                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17774                }
17775                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17776                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17777                }
17778            }
17779
17780            next_offset += envelope_size;
17781
17782            // Decode the remaining unknown envelopes.
17783            while next_offset < end_offset {
17784                _next_ordinal_to_read += 1;
17785                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17786                next_offset += envelope_size;
17787            }
17788
17789            Ok(())
17790        }
17791    }
17792
17793    impl SendMsgMeta {
17794        #[inline(always)]
17795        fn max_ordinal_present(&self) -> u64 {
17796            if let Some(_) = self.control {
17797                return 2;
17798            }
17799            if let Some(_) = self.to {
17800                return 1;
17801            }
17802            0
17803        }
17804    }
17805
17806    impl fidl::encoding::ValueTypeMarker for SendMsgMeta {
17807        type Borrowed<'a> = &'a Self;
17808        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17809            value
17810        }
17811    }
17812
17813    unsafe impl fidl::encoding::TypeMarker for SendMsgMeta {
17814        type Owned = Self;
17815
17816        #[inline(always)]
17817        fn inline_align(_context: fidl::encoding::Context) -> usize {
17818            8
17819        }
17820
17821        #[inline(always)]
17822        fn inline_size(_context: fidl::encoding::Context) -> usize {
17823            16
17824        }
17825    }
17826
17827    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SendMsgMeta, D>
17828        for &SendMsgMeta
17829    {
17830        unsafe fn encode(
17831            self,
17832            encoder: &mut fidl::encoding::Encoder<'_, D>,
17833            offset: usize,
17834            mut depth: fidl::encoding::Depth,
17835        ) -> fidl::Result<()> {
17836            encoder.debug_check_bounds::<SendMsgMeta>(offset);
17837            // Vector header
17838            let max_ordinal: u64 = self.max_ordinal_present();
17839            encoder.write_num(max_ordinal, offset);
17840            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17841            // Calling encoder.out_of_line_offset(0) is not allowed.
17842            if max_ordinal == 0 {
17843                return Ok(());
17844            }
17845            depth.increment()?;
17846            let envelope_size = 8;
17847            let bytes_len = max_ordinal as usize * envelope_size;
17848            #[allow(unused_variables)]
17849            let offset = encoder.out_of_line_offset(bytes_len);
17850            let mut _prev_end_offset: usize = 0;
17851            if 1 > max_ordinal {
17852                return Ok(());
17853            }
17854
17855            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17856            // are envelope_size bytes.
17857            let cur_offset: usize = (1 - 1) * envelope_size;
17858
17859            // Zero reserved fields.
17860            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17861
17862            // Safety:
17863            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17864            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17865            //   envelope_size bytes, there is always sufficient room.
17866            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
17867            self.to.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
17868            encoder, offset + cur_offset, depth
17869        )?;
17870
17871            _prev_end_offset = cur_offset + envelope_size;
17872            if 2 > max_ordinal {
17873                return Ok(());
17874            }
17875
17876            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17877            // are envelope_size bytes.
17878            let cur_offset: usize = (2 - 1) * envelope_size;
17879
17880            // Zero reserved fields.
17881            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17882
17883            // Safety:
17884            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17885            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17886            //   envelope_size bytes, there is always sufficient room.
17887            fidl::encoding::encode_in_envelope_optional::<DatagramSocketSendControlData, D>(
17888                self.control.as_ref().map(
17889                    <DatagramSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow,
17890                ),
17891                encoder,
17892                offset + cur_offset,
17893                depth,
17894            )?;
17895
17896            _prev_end_offset = cur_offset + envelope_size;
17897
17898            Ok(())
17899        }
17900    }
17901
17902    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SendMsgMeta {
17903        #[inline(always)]
17904        fn new_empty() -> Self {
17905            Self::default()
17906        }
17907
17908        unsafe fn decode(
17909            &mut self,
17910            decoder: &mut fidl::encoding::Decoder<'_, D>,
17911            offset: usize,
17912            mut depth: fidl::encoding::Depth,
17913        ) -> fidl::Result<()> {
17914            decoder.debug_check_bounds::<Self>(offset);
17915            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17916                None => return Err(fidl::Error::NotNullable),
17917                Some(len) => len,
17918            };
17919            // Calling decoder.out_of_line_offset(0) is not allowed.
17920            if len == 0 {
17921                return Ok(());
17922            };
17923            depth.increment()?;
17924            let envelope_size = 8;
17925            let bytes_len = len * envelope_size;
17926            let offset = decoder.out_of_line_offset(bytes_len)?;
17927            // Decode the envelope for each type.
17928            let mut _next_ordinal_to_read = 0;
17929            let mut next_offset = offset;
17930            let end_offset = offset + bytes_len;
17931            _next_ordinal_to_read += 1;
17932            if next_offset >= end_offset {
17933                return Ok(());
17934            }
17935
17936            // Decode unknown envelopes for gaps in ordinals.
17937            while _next_ordinal_to_read < 1 {
17938                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17939                _next_ordinal_to_read += 1;
17940                next_offset += envelope_size;
17941            }
17942
17943            let next_out_of_line = decoder.next_out_of_line();
17944            let handles_before = decoder.remaining_handles();
17945            if let Some((inlined, num_bytes, num_handles)) =
17946                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17947            {
17948                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17949                if inlined != (member_inline_size <= 4) {
17950                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17951                }
17952                let inner_offset;
17953                let mut inner_depth = depth.clone();
17954                if inlined {
17955                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17956                    inner_offset = next_offset;
17957                } else {
17958                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17959                    inner_depth.increment()?;
17960                }
17961                let val_ref = self.to.get_or_insert_with(|| {
17962                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
17963                });
17964                fidl::decode!(
17965                    fidl_fuchsia_net__common::SocketAddress,
17966                    D,
17967                    val_ref,
17968                    decoder,
17969                    inner_offset,
17970                    inner_depth
17971                )?;
17972                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17973                {
17974                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17975                }
17976                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17977                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17978                }
17979            }
17980
17981            next_offset += envelope_size;
17982            _next_ordinal_to_read += 1;
17983            if next_offset >= end_offset {
17984                return Ok(());
17985            }
17986
17987            // Decode unknown envelopes for gaps in ordinals.
17988            while _next_ordinal_to_read < 2 {
17989                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17990                _next_ordinal_to_read += 1;
17991                next_offset += envelope_size;
17992            }
17993
17994            let next_out_of_line = decoder.next_out_of_line();
17995            let handles_before = decoder.remaining_handles();
17996            if let Some((inlined, num_bytes, num_handles)) =
17997                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17998            {
17999                let member_inline_size =
18000                    <DatagramSocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
18001                        decoder.context,
18002                    );
18003                if inlined != (member_inline_size <= 4) {
18004                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18005                }
18006                let inner_offset;
18007                let mut inner_depth = depth.clone();
18008                if inlined {
18009                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18010                    inner_offset = next_offset;
18011                } else {
18012                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18013                    inner_depth.increment()?;
18014                }
18015                let val_ref = self
18016                    .control
18017                    .get_or_insert_with(|| fidl::new_empty!(DatagramSocketSendControlData, D));
18018                fidl::decode!(
18019                    DatagramSocketSendControlData,
18020                    D,
18021                    val_ref,
18022                    decoder,
18023                    inner_offset,
18024                    inner_depth
18025                )?;
18026                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18027                {
18028                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18029                }
18030                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18031                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18032                }
18033            }
18034
18035            next_offset += envelope_size;
18036
18037            // Decode the remaining unknown envelopes.
18038            while next_offset < end_offset {
18039                _next_ordinal_to_read += 1;
18040                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18041                next_offset += envelope_size;
18042            }
18043
18044            Ok(())
18045        }
18046    }
18047
18048    impl SocketRecvControlData {
18049        #[inline(always)]
18050        fn max_ordinal_present(&self) -> u64 {
18051            if let Some(_) = self.timestamp {
18052                return 3;
18053            }
18054            0
18055        }
18056    }
18057
18058    impl fidl::encoding::ValueTypeMarker for SocketRecvControlData {
18059        type Borrowed<'a> = &'a Self;
18060        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18061            value
18062        }
18063    }
18064
18065    unsafe impl fidl::encoding::TypeMarker for SocketRecvControlData {
18066        type Owned = Self;
18067
18068        #[inline(always)]
18069        fn inline_align(_context: fidl::encoding::Context) -> usize {
18070            8
18071        }
18072
18073        #[inline(always)]
18074        fn inline_size(_context: fidl::encoding::Context) -> usize {
18075            16
18076        }
18077    }
18078
18079    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketRecvControlData, D>
18080        for &SocketRecvControlData
18081    {
18082        unsafe fn encode(
18083            self,
18084            encoder: &mut fidl::encoding::Encoder<'_, D>,
18085            offset: usize,
18086            mut depth: fidl::encoding::Depth,
18087        ) -> fidl::Result<()> {
18088            encoder.debug_check_bounds::<SocketRecvControlData>(offset);
18089            // Vector header
18090            let max_ordinal: u64 = self.max_ordinal_present();
18091            encoder.write_num(max_ordinal, offset);
18092            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18093            // Calling encoder.out_of_line_offset(0) is not allowed.
18094            if max_ordinal == 0 {
18095                return Ok(());
18096            }
18097            depth.increment()?;
18098            let envelope_size = 8;
18099            let bytes_len = max_ordinal as usize * envelope_size;
18100            #[allow(unused_variables)]
18101            let offset = encoder.out_of_line_offset(bytes_len);
18102            let mut _prev_end_offset: usize = 0;
18103            if 3 > max_ordinal {
18104                return Ok(());
18105            }
18106
18107            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18108            // are envelope_size bytes.
18109            let cur_offset: usize = (3 - 1) * envelope_size;
18110
18111            // Zero reserved fields.
18112            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18113
18114            // Safety:
18115            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18116            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18117            //   envelope_size bytes, there is always sufficient room.
18118            fidl::encoding::encode_in_envelope_optional::<Timestamp, D>(
18119                self.timestamp.as_ref().map(<Timestamp as fidl::encoding::ValueTypeMarker>::borrow),
18120                encoder,
18121                offset + cur_offset,
18122                depth,
18123            )?;
18124
18125            _prev_end_offset = cur_offset + envelope_size;
18126
18127            Ok(())
18128        }
18129    }
18130
18131    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketRecvControlData {
18132        #[inline(always)]
18133        fn new_empty() -> Self {
18134            Self::default()
18135        }
18136
18137        unsafe fn decode(
18138            &mut self,
18139            decoder: &mut fidl::encoding::Decoder<'_, D>,
18140            offset: usize,
18141            mut depth: fidl::encoding::Depth,
18142        ) -> fidl::Result<()> {
18143            decoder.debug_check_bounds::<Self>(offset);
18144            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18145                None => return Err(fidl::Error::NotNullable),
18146                Some(len) => len,
18147            };
18148            // Calling decoder.out_of_line_offset(0) is not allowed.
18149            if len == 0 {
18150                return Ok(());
18151            };
18152            depth.increment()?;
18153            let envelope_size = 8;
18154            let bytes_len = len * envelope_size;
18155            let offset = decoder.out_of_line_offset(bytes_len)?;
18156            // Decode the envelope for each type.
18157            let mut _next_ordinal_to_read = 0;
18158            let mut next_offset = offset;
18159            let end_offset = offset + bytes_len;
18160            _next_ordinal_to_read += 1;
18161            if next_offset >= end_offset {
18162                return Ok(());
18163            }
18164
18165            // Decode unknown envelopes for gaps in ordinals.
18166            while _next_ordinal_to_read < 3 {
18167                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18168                _next_ordinal_to_read += 1;
18169                next_offset += envelope_size;
18170            }
18171
18172            let next_out_of_line = decoder.next_out_of_line();
18173            let handles_before = decoder.remaining_handles();
18174            if let Some((inlined, num_bytes, num_handles)) =
18175                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18176            {
18177                let member_inline_size =
18178                    <Timestamp as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18179                if inlined != (member_inline_size <= 4) {
18180                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18181                }
18182                let inner_offset;
18183                let mut inner_depth = depth.clone();
18184                if inlined {
18185                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18186                    inner_offset = next_offset;
18187                } else {
18188                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18189                    inner_depth.increment()?;
18190                }
18191                let val_ref = self.timestamp.get_or_insert_with(|| fidl::new_empty!(Timestamp, D));
18192                fidl::decode!(Timestamp, D, val_ref, decoder, inner_offset, inner_depth)?;
18193                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18194                {
18195                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18196                }
18197                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18198                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18199                }
18200            }
18201
18202            next_offset += envelope_size;
18203
18204            // Decode the remaining unknown envelopes.
18205            while next_offset < end_offset {
18206                _next_ordinal_to_read += 1;
18207                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18208                next_offset += envelope_size;
18209            }
18210
18211            Ok(())
18212        }
18213    }
18214
18215    impl SocketSendControlData {
18216        #[inline(always)]
18217        fn max_ordinal_present(&self) -> u64 {
18218            0
18219        }
18220    }
18221
18222    impl fidl::encoding::ValueTypeMarker for SocketSendControlData {
18223        type Borrowed<'a> = &'a Self;
18224        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18225            value
18226        }
18227    }
18228
18229    unsafe impl fidl::encoding::TypeMarker for SocketSendControlData {
18230        type Owned = Self;
18231
18232        #[inline(always)]
18233        fn inline_align(_context: fidl::encoding::Context) -> usize {
18234            8
18235        }
18236
18237        #[inline(always)]
18238        fn inline_size(_context: fidl::encoding::Context) -> usize {
18239            16
18240        }
18241    }
18242
18243    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketSendControlData, D>
18244        for &SocketSendControlData
18245    {
18246        unsafe fn encode(
18247            self,
18248            encoder: &mut fidl::encoding::Encoder<'_, D>,
18249            offset: usize,
18250            mut depth: fidl::encoding::Depth,
18251        ) -> fidl::Result<()> {
18252            encoder.debug_check_bounds::<SocketSendControlData>(offset);
18253            // Vector header
18254            let max_ordinal: u64 = self.max_ordinal_present();
18255            encoder.write_num(max_ordinal, offset);
18256            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18257            // Calling encoder.out_of_line_offset(0) is not allowed.
18258            if max_ordinal == 0 {
18259                return Ok(());
18260            }
18261            depth.increment()?;
18262            let envelope_size = 8;
18263            let bytes_len = max_ordinal as usize * envelope_size;
18264            #[allow(unused_variables)]
18265            let offset = encoder.out_of_line_offset(bytes_len);
18266            let mut _prev_end_offset: usize = 0;
18267
18268            Ok(())
18269        }
18270    }
18271
18272    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketSendControlData {
18273        #[inline(always)]
18274        fn new_empty() -> Self {
18275            Self::default()
18276        }
18277
18278        unsafe fn decode(
18279            &mut self,
18280            decoder: &mut fidl::encoding::Decoder<'_, D>,
18281            offset: usize,
18282            mut depth: fidl::encoding::Depth,
18283        ) -> fidl::Result<()> {
18284            decoder.debug_check_bounds::<Self>(offset);
18285            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18286                None => return Err(fidl::Error::NotNullable),
18287                Some(len) => len,
18288            };
18289            // Calling decoder.out_of_line_offset(0) is not allowed.
18290            if len == 0 {
18291                return Ok(());
18292            };
18293            depth.increment()?;
18294            let envelope_size = 8;
18295            let bytes_len = len * envelope_size;
18296            let offset = decoder.out_of_line_offset(bytes_len)?;
18297            // Decode the envelope for each type.
18298            let mut _next_ordinal_to_read = 0;
18299            let mut next_offset = offset;
18300            let end_offset = offset + bytes_len;
18301
18302            // Decode the remaining unknown envelopes.
18303            while next_offset < end_offset {
18304                _next_ordinal_to_read += 1;
18305                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18306                next_offset += envelope_size;
18307            }
18308
18309            Ok(())
18310        }
18311    }
18312
18313    impl TcpInfo {
18314        #[inline(always)]
18315        fn max_ordinal_present(&self) -> u64 {
18316            if let Some(_) = self.reorder_seen {
18317                return 54;
18318            }
18319            if let Some(_) = self.snd_cwnd {
18320                return 29;
18321            }
18322            if let Some(_) = self.snd_ssthresh {
18323                return 28;
18324            }
18325            if let Some(_) = self.rtt_var_usec {
18326                return 27;
18327            }
18328            if let Some(_) = self.rtt_usec {
18329                return 26;
18330            }
18331            if let Some(_) = self.rto_usec {
18332                return 11;
18333            }
18334            if let Some(_) = self.ca_state {
18335                return 2;
18336            }
18337            if let Some(_) = self.state {
18338                return 1;
18339            }
18340            0
18341        }
18342    }
18343
18344    impl fidl::encoding::ValueTypeMarker for TcpInfo {
18345        type Borrowed<'a> = &'a Self;
18346        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18347            value
18348        }
18349    }
18350
18351    unsafe impl fidl::encoding::TypeMarker for TcpInfo {
18352        type Owned = Self;
18353
18354        #[inline(always)]
18355        fn inline_align(_context: fidl::encoding::Context) -> usize {
18356            8
18357        }
18358
18359        #[inline(always)]
18360        fn inline_size(_context: fidl::encoding::Context) -> usize {
18361            16
18362        }
18363    }
18364
18365    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TcpInfo, D> for &TcpInfo {
18366        unsafe fn encode(
18367            self,
18368            encoder: &mut fidl::encoding::Encoder<'_, D>,
18369            offset: usize,
18370            mut depth: fidl::encoding::Depth,
18371        ) -> fidl::Result<()> {
18372            encoder.debug_check_bounds::<TcpInfo>(offset);
18373            // Vector header
18374            let max_ordinal: u64 = self.max_ordinal_present();
18375            encoder.write_num(max_ordinal, offset);
18376            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18377            // Calling encoder.out_of_line_offset(0) is not allowed.
18378            if max_ordinal == 0 {
18379                return Ok(());
18380            }
18381            depth.increment()?;
18382            let envelope_size = 8;
18383            let bytes_len = max_ordinal as usize * envelope_size;
18384            #[allow(unused_variables)]
18385            let offset = encoder.out_of_line_offset(bytes_len);
18386            let mut _prev_end_offset: usize = 0;
18387            if 1 > max_ordinal {
18388                return Ok(());
18389            }
18390
18391            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18392            // are envelope_size bytes.
18393            let cur_offset: usize = (1 - 1) * envelope_size;
18394
18395            // Zero reserved fields.
18396            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18397
18398            // Safety:
18399            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18400            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18401            //   envelope_size bytes, there is always sufficient room.
18402            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net_tcp__common::State, D>(
18403            self.state.as_ref().map(<fidl_fuchsia_net_tcp__common::State as fidl::encoding::ValueTypeMarker>::borrow),
18404            encoder, offset + cur_offset, depth
18405        )?;
18406
18407            _prev_end_offset = cur_offset + envelope_size;
18408            if 2 > max_ordinal {
18409                return Ok(());
18410            }
18411
18412            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18413            // are envelope_size bytes.
18414            let cur_offset: usize = (2 - 1) * envelope_size;
18415
18416            // Zero reserved fields.
18417            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18418
18419            // Safety:
18420            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18421            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18422            //   envelope_size bytes, there is always sufficient room.
18423            fidl::encoding::encode_in_envelope_optional::<TcpCongestionControlState, D>(
18424                self.ca_state
18425                    .as_ref()
18426                    .map(<TcpCongestionControlState as fidl::encoding::ValueTypeMarker>::borrow),
18427                encoder,
18428                offset + cur_offset,
18429                depth,
18430            )?;
18431
18432            _prev_end_offset = cur_offset + envelope_size;
18433            if 11 > max_ordinal {
18434                return Ok(());
18435            }
18436
18437            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18438            // are envelope_size bytes.
18439            let cur_offset: usize = (11 - 1) * envelope_size;
18440
18441            // Zero reserved fields.
18442            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18443
18444            // Safety:
18445            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18446            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18447            //   envelope_size bytes, there is always sufficient room.
18448            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18449                self.rto_usec.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18450                encoder,
18451                offset + cur_offset,
18452                depth,
18453            )?;
18454
18455            _prev_end_offset = cur_offset + envelope_size;
18456            if 26 > max_ordinal {
18457                return Ok(());
18458            }
18459
18460            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18461            // are envelope_size bytes.
18462            let cur_offset: usize = (26 - 1) * envelope_size;
18463
18464            // Zero reserved fields.
18465            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18466
18467            // Safety:
18468            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18469            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18470            //   envelope_size bytes, there is always sufficient room.
18471            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18472                self.rtt_usec.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18473                encoder,
18474                offset + cur_offset,
18475                depth,
18476            )?;
18477
18478            _prev_end_offset = cur_offset + envelope_size;
18479            if 27 > max_ordinal {
18480                return Ok(());
18481            }
18482
18483            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18484            // are envelope_size bytes.
18485            let cur_offset: usize = (27 - 1) * envelope_size;
18486
18487            // Zero reserved fields.
18488            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18489
18490            // Safety:
18491            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18492            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18493            //   envelope_size bytes, there is always sufficient room.
18494            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18495                self.rtt_var_usec.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18496                encoder,
18497                offset + cur_offset,
18498                depth,
18499            )?;
18500
18501            _prev_end_offset = cur_offset + envelope_size;
18502            if 28 > max_ordinal {
18503                return Ok(());
18504            }
18505
18506            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18507            // are envelope_size bytes.
18508            let cur_offset: usize = (28 - 1) * envelope_size;
18509
18510            // Zero reserved fields.
18511            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18512
18513            // Safety:
18514            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18515            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18516            //   envelope_size bytes, there is always sufficient room.
18517            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18518                self.snd_ssthresh.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18519                encoder,
18520                offset + cur_offset,
18521                depth,
18522            )?;
18523
18524            _prev_end_offset = cur_offset + envelope_size;
18525            if 29 > max_ordinal {
18526                return Ok(());
18527            }
18528
18529            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18530            // are envelope_size bytes.
18531            let cur_offset: usize = (29 - 1) * envelope_size;
18532
18533            // Zero reserved fields.
18534            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18535
18536            // Safety:
18537            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18538            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18539            //   envelope_size bytes, there is always sufficient room.
18540            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18541                self.snd_cwnd.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18542                encoder,
18543                offset + cur_offset,
18544                depth,
18545            )?;
18546
18547            _prev_end_offset = cur_offset + envelope_size;
18548            if 54 > max_ordinal {
18549                return Ok(());
18550            }
18551
18552            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18553            // are envelope_size bytes.
18554            let cur_offset: usize = (54 - 1) * envelope_size;
18555
18556            // Zero reserved fields.
18557            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18558
18559            // Safety:
18560            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18561            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18562            //   envelope_size bytes, there is always sufficient room.
18563            fidl::encoding::encode_in_envelope_optional::<bool, D>(
18564                self.reorder_seen.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
18565                encoder,
18566                offset + cur_offset,
18567                depth,
18568            )?;
18569
18570            _prev_end_offset = cur_offset + envelope_size;
18571
18572            Ok(())
18573        }
18574    }
18575
18576    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TcpInfo {
18577        #[inline(always)]
18578        fn new_empty() -> Self {
18579            Self::default()
18580        }
18581
18582        unsafe fn decode(
18583            &mut self,
18584            decoder: &mut fidl::encoding::Decoder<'_, D>,
18585            offset: usize,
18586            mut depth: fidl::encoding::Depth,
18587        ) -> fidl::Result<()> {
18588            decoder.debug_check_bounds::<Self>(offset);
18589            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18590                None => return Err(fidl::Error::NotNullable),
18591                Some(len) => len,
18592            };
18593            // Calling decoder.out_of_line_offset(0) is not allowed.
18594            if len == 0 {
18595                return Ok(());
18596            };
18597            depth.increment()?;
18598            let envelope_size = 8;
18599            let bytes_len = len * envelope_size;
18600            let offset = decoder.out_of_line_offset(bytes_len)?;
18601            // Decode the envelope for each type.
18602            let mut _next_ordinal_to_read = 0;
18603            let mut next_offset = offset;
18604            let end_offset = offset + bytes_len;
18605            _next_ordinal_to_read += 1;
18606            if next_offset >= end_offset {
18607                return Ok(());
18608            }
18609
18610            // Decode unknown envelopes for gaps in ordinals.
18611            while _next_ordinal_to_read < 1 {
18612                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18613                _next_ordinal_to_read += 1;
18614                next_offset += envelope_size;
18615            }
18616
18617            let next_out_of_line = decoder.next_out_of_line();
18618            let handles_before = decoder.remaining_handles();
18619            if let Some((inlined, num_bytes, num_handles)) =
18620                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18621            {
18622                let member_inline_size = <fidl_fuchsia_net_tcp__common::State as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18623                if inlined != (member_inline_size <= 4) {
18624                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18625                }
18626                let inner_offset;
18627                let mut inner_depth = depth.clone();
18628                if inlined {
18629                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18630                    inner_offset = next_offset;
18631                } else {
18632                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18633                    inner_depth.increment()?;
18634                }
18635                let val_ref = self.state.get_or_insert_with(|| {
18636                    fidl::new_empty!(fidl_fuchsia_net_tcp__common::State, D)
18637                });
18638                fidl::decode!(
18639                    fidl_fuchsia_net_tcp__common::State,
18640                    D,
18641                    val_ref,
18642                    decoder,
18643                    inner_offset,
18644                    inner_depth
18645                )?;
18646                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18647                {
18648                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18649                }
18650                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18651                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18652                }
18653            }
18654
18655            next_offset += envelope_size;
18656            _next_ordinal_to_read += 1;
18657            if next_offset >= end_offset {
18658                return Ok(());
18659            }
18660
18661            // Decode unknown envelopes for gaps in ordinals.
18662            while _next_ordinal_to_read < 2 {
18663                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18664                _next_ordinal_to_read += 1;
18665                next_offset += envelope_size;
18666            }
18667
18668            let next_out_of_line = decoder.next_out_of_line();
18669            let handles_before = decoder.remaining_handles();
18670            if let Some((inlined, num_bytes, num_handles)) =
18671                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18672            {
18673                let member_inline_size =
18674                    <TcpCongestionControlState as fidl::encoding::TypeMarker>::inline_size(
18675                        decoder.context,
18676                    );
18677                if inlined != (member_inline_size <= 4) {
18678                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18679                }
18680                let inner_offset;
18681                let mut inner_depth = depth.clone();
18682                if inlined {
18683                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18684                    inner_offset = next_offset;
18685                } else {
18686                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18687                    inner_depth.increment()?;
18688                }
18689                let val_ref = self
18690                    .ca_state
18691                    .get_or_insert_with(|| fidl::new_empty!(TcpCongestionControlState, D));
18692                fidl::decode!(
18693                    TcpCongestionControlState,
18694                    D,
18695                    val_ref,
18696                    decoder,
18697                    inner_offset,
18698                    inner_depth
18699                )?;
18700                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18701                {
18702                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18703                }
18704                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18705                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18706                }
18707            }
18708
18709            next_offset += envelope_size;
18710            _next_ordinal_to_read += 1;
18711            if next_offset >= end_offset {
18712                return Ok(());
18713            }
18714
18715            // Decode unknown envelopes for gaps in ordinals.
18716            while _next_ordinal_to_read < 11 {
18717                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18718                _next_ordinal_to_read += 1;
18719                next_offset += envelope_size;
18720            }
18721
18722            let next_out_of_line = decoder.next_out_of_line();
18723            let handles_before = decoder.remaining_handles();
18724            if let Some((inlined, num_bytes, num_handles)) =
18725                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18726            {
18727                let member_inline_size =
18728                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18729                if inlined != (member_inline_size <= 4) {
18730                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18731                }
18732                let inner_offset;
18733                let mut inner_depth = depth.clone();
18734                if inlined {
18735                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18736                    inner_offset = next_offset;
18737                } else {
18738                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18739                    inner_depth.increment()?;
18740                }
18741                let val_ref = self.rto_usec.get_or_insert_with(|| fidl::new_empty!(u32, D));
18742                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18743                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18744                {
18745                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18746                }
18747                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18748                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18749                }
18750            }
18751
18752            next_offset += envelope_size;
18753            _next_ordinal_to_read += 1;
18754            if next_offset >= end_offset {
18755                return Ok(());
18756            }
18757
18758            // Decode unknown envelopes for gaps in ordinals.
18759            while _next_ordinal_to_read < 26 {
18760                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18761                _next_ordinal_to_read += 1;
18762                next_offset += envelope_size;
18763            }
18764
18765            let next_out_of_line = decoder.next_out_of_line();
18766            let handles_before = decoder.remaining_handles();
18767            if let Some((inlined, num_bytes, num_handles)) =
18768                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18769            {
18770                let member_inline_size =
18771                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18772                if inlined != (member_inline_size <= 4) {
18773                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18774                }
18775                let inner_offset;
18776                let mut inner_depth = depth.clone();
18777                if inlined {
18778                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18779                    inner_offset = next_offset;
18780                } else {
18781                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18782                    inner_depth.increment()?;
18783                }
18784                let val_ref = self.rtt_usec.get_or_insert_with(|| fidl::new_empty!(u32, D));
18785                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18786                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18787                {
18788                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18789                }
18790                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18791                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18792                }
18793            }
18794
18795            next_offset += envelope_size;
18796            _next_ordinal_to_read += 1;
18797            if next_offset >= end_offset {
18798                return Ok(());
18799            }
18800
18801            // Decode unknown envelopes for gaps in ordinals.
18802            while _next_ordinal_to_read < 27 {
18803                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18804                _next_ordinal_to_read += 1;
18805                next_offset += envelope_size;
18806            }
18807
18808            let next_out_of_line = decoder.next_out_of_line();
18809            let handles_before = decoder.remaining_handles();
18810            if let Some((inlined, num_bytes, num_handles)) =
18811                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18812            {
18813                let member_inline_size =
18814                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18815                if inlined != (member_inline_size <= 4) {
18816                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18817                }
18818                let inner_offset;
18819                let mut inner_depth = depth.clone();
18820                if inlined {
18821                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18822                    inner_offset = next_offset;
18823                } else {
18824                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18825                    inner_depth.increment()?;
18826                }
18827                let val_ref = self.rtt_var_usec.get_or_insert_with(|| fidl::new_empty!(u32, D));
18828                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18829                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18830                {
18831                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18832                }
18833                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18834                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18835                }
18836            }
18837
18838            next_offset += envelope_size;
18839            _next_ordinal_to_read += 1;
18840            if next_offset >= end_offset {
18841                return Ok(());
18842            }
18843
18844            // Decode unknown envelopes for gaps in ordinals.
18845            while _next_ordinal_to_read < 28 {
18846                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18847                _next_ordinal_to_read += 1;
18848                next_offset += envelope_size;
18849            }
18850
18851            let next_out_of_line = decoder.next_out_of_line();
18852            let handles_before = decoder.remaining_handles();
18853            if let Some((inlined, num_bytes, num_handles)) =
18854                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18855            {
18856                let member_inline_size =
18857                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18858                if inlined != (member_inline_size <= 4) {
18859                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18860                }
18861                let inner_offset;
18862                let mut inner_depth = depth.clone();
18863                if inlined {
18864                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18865                    inner_offset = next_offset;
18866                } else {
18867                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18868                    inner_depth.increment()?;
18869                }
18870                let val_ref = self.snd_ssthresh.get_or_insert_with(|| fidl::new_empty!(u32, D));
18871                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18872                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18873                {
18874                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18875                }
18876                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18877                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18878                }
18879            }
18880
18881            next_offset += envelope_size;
18882            _next_ordinal_to_read += 1;
18883            if next_offset >= end_offset {
18884                return Ok(());
18885            }
18886
18887            // Decode unknown envelopes for gaps in ordinals.
18888            while _next_ordinal_to_read < 29 {
18889                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18890                _next_ordinal_to_read += 1;
18891                next_offset += envelope_size;
18892            }
18893
18894            let next_out_of_line = decoder.next_out_of_line();
18895            let handles_before = decoder.remaining_handles();
18896            if let Some((inlined, num_bytes, num_handles)) =
18897                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18898            {
18899                let member_inline_size =
18900                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18901                if inlined != (member_inline_size <= 4) {
18902                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18903                }
18904                let inner_offset;
18905                let mut inner_depth = depth.clone();
18906                if inlined {
18907                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18908                    inner_offset = next_offset;
18909                } else {
18910                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18911                    inner_depth.increment()?;
18912                }
18913                let val_ref = self.snd_cwnd.get_or_insert_with(|| fidl::new_empty!(u32, D));
18914                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18915                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18916                {
18917                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18918                }
18919                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18920                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18921                }
18922            }
18923
18924            next_offset += envelope_size;
18925            _next_ordinal_to_read += 1;
18926            if next_offset >= end_offset {
18927                return Ok(());
18928            }
18929
18930            // Decode unknown envelopes for gaps in ordinals.
18931            while _next_ordinal_to_read < 54 {
18932                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18933                _next_ordinal_to_read += 1;
18934                next_offset += envelope_size;
18935            }
18936
18937            let next_out_of_line = decoder.next_out_of_line();
18938            let handles_before = decoder.remaining_handles();
18939            if let Some((inlined, num_bytes, num_handles)) =
18940                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18941            {
18942                let member_inline_size =
18943                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18944                if inlined != (member_inline_size <= 4) {
18945                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18946                }
18947                let inner_offset;
18948                let mut inner_depth = depth.clone();
18949                if inlined {
18950                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18951                    inner_offset = next_offset;
18952                } else {
18953                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18954                    inner_depth.increment()?;
18955                }
18956                let val_ref = self.reorder_seen.get_or_insert_with(|| fidl::new_empty!(bool, D));
18957                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
18958                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18959                {
18960                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18961                }
18962                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18963                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18964                }
18965            }
18966
18967            next_offset += envelope_size;
18968
18969            // Decode the remaining unknown envelopes.
18970            while next_offset < end_offset {
18971                _next_ordinal_to_read += 1;
18972                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18973                next_offset += envelope_size;
18974            }
18975
18976            Ok(())
18977        }
18978    }
18979
18980    impl fidl::encoding::ValueTypeMarker for OptionalUint32 {
18981        type Borrowed<'a> = &'a Self;
18982        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18983            value
18984        }
18985    }
18986
18987    unsafe impl fidl::encoding::TypeMarker for OptionalUint32 {
18988        type Owned = Self;
18989
18990        #[inline(always)]
18991        fn inline_align(_context: fidl::encoding::Context) -> usize {
18992            8
18993        }
18994
18995        #[inline(always)]
18996        fn inline_size(_context: fidl::encoding::Context) -> usize {
18997            16
18998        }
18999    }
19000
19001    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalUint32, D>
19002        for &OptionalUint32
19003    {
19004        #[inline]
19005        unsafe fn encode(
19006            self,
19007            encoder: &mut fidl::encoding::Encoder<'_, D>,
19008            offset: usize,
19009            _depth: fidl::encoding::Depth,
19010        ) -> fidl::Result<()> {
19011            encoder.debug_check_bounds::<OptionalUint32>(offset);
19012            encoder.write_num::<u64>(self.ordinal(), offset);
19013            match self {
19014                OptionalUint32::Value(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
19015                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
19016                    encoder,
19017                    offset + 8,
19018                    _depth,
19019                ),
19020                OptionalUint32::Unset(ref val) => fidl::encoding::encode_in_envelope::<Empty, D>(
19021                    <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
19022                    encoder,
19023                    offset + 8,
19024                    _depth,
19025                ),
19026            }
19027        }
19028    }
19029
19030    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalUint32 {
19031        #[inline(always)]
19032        fn new_empty() -> Self {
19033            Self::Value(fidl::new_empty!(u32, D))
19034        }
19035
19036        #[inline]
19037        unsafe fn decode(
19038            &mut self,
19039            decoder: &mut fidl::encoding::Decoder<'_, D>,
19040            offset: usize,
19041            mut depth: fidl::encoding::Depth,
19042        ) -> fidl::Result<()> {
19043            decoder.debug_check_bounds::<Self>(offset);
19044            #[allow(unused_variables)]
19045            let next_out_of_line = decoder.next_out_of_line();
19046            let handles_before = decoder.remaining_handles();
19047            let (ordinal, inlined, num_bytes, num_handles) =
19048                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
19049
19050            let member_inline_size = match ordinal {
19051                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19052                2 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19053                _ => return Err(fidl::Error::UnknownUnionTag),
19054            };
19055
19056            if inlined != (member_inline_size <= 4) {
19057                return Err(fidl::Error::InvalidInlineBitInEnvelope);
19058            }
19059            let _inner_offset;
19060            if inlined {
19061                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
19062                _inner_offset = offset + 8;
19063            } else {
19064                depth.increment()?;
19065                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19066            }
19067            match ordinal {
19068                1 => {
19069                    #[allow(irrefutable_let_patterns)]
19070                    if let OptionalUint32::Value(_) = self {
19071                        // Do nothing, read the value into the object
19072                    } else {
19073                        // Initialize `self` to the right variant
19074                        *self = OptionalUint32::Value(fidl::new_empty!(u32, D));
19075                    }
19076                    #[allow(irrefutable_let_patterns)]
19077                    if let OptionalUint32::Value(ref mut val) = self {
19078                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
19079                    } else {
19080                        unreachable!()
19081                    }
19082                }
19083                2 => {
19084                    #[allow(irrefutable_let_patterns)]
19085                    if let OptionalUint32::Unset(_) = self {
19086                        // Do nothing, read the value into the object
19087                    } else {
19088                        // Initialize `self` to the right variant
19089                        *self = OptionalUint32::Unset(fidl::new_empty!(Empty, D));
19090                    }
19091                    #[allow(irrefutable_let_patterns)]
19092                    if let OptionalUint32::Unset(ref mut val) = self {
19093                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
19094                    } else {
19095                        unreachable!()
19096                    }
19097                }
19098                ordinal => panic!("unexpected ordinal {:?}", ordinal),
19099            }
19100            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
19101                return Err(fidl::Error::InvalidNumBytesInEnvelope);
19102            }
19103            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19104                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19105            }
19106            Ok(())
19107        }
19108    }
19109
19110    impl fidl::encoding::ValueTypeMarker for OptionalUint8 {
19111        type Borrowed<'a> = &'a Self;
19112        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19113            value
19114        }
19115    }
19116
19117    unsafe impl fidl::encoding::TypeMarker for OptionalUint8 {
19118        type Owned = Self;
19119
19120        #[inline(always)]
19121        fn inline_align(_context: fidl::encoding::Context) -> usize {
19122            8
19123        }
19124
19125        #[inline(always)]
19126        fn inline_size(_context: fidl::encoding::Context) -> usize {
19127            16
19128        }
19129    }
19130
19131    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalUint8, D>
19132        for &OptionalUint8
19133    {
19134        #[inline]
19135        unsafe fn encode(
19136            self,
19137            encoder: &mut fidl::encoding::Encoder<'_, D>,
19138            offset: usize,
19139            _depth: fidl::encoding::Depth,
19140        ) -> fidl::Result<()> {
19141            encoder.debug_check_bounds::<OptionalUint8>(offset);
19142            encoder.write_num::<u64>(self.ordinal(), offset);
19143            match self {
19144                OptionalUint8::Value(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
19145                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
19146                    encoder,
19147                    offset + 8,
19148                    _depth,
19149                ),
19150                OptionalUint8::Unset(ref val) => fidl::encoding::encode_in_envelope::<Empty, D>(
19151                    <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
19152                    encoder,
19153                    offset + 8,
19154                    _depth,
19155                ),
19156            }
19157        }
19158    }
19159
19160    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalUint8 {
19161        #[inline(always)]
19162        fn new_empty() -> Self {
19163            Self::Value(fidl::new_empty!(u8, D))
19164        }
19165
19166        #[inline]
19167        unsafe fn decode(
19168            &mut self,
19169            decoder: &mut fidl::encoding::Decoder<'_, D>,
19170            offset: usize,
19171            mut depth: fidl::encoding::Depth,
19172        ) -> fidl::Result<()> {
19173            decoder.debug_check_bounds::<Self>(offset);
19174            #[allow(unused_variables)]
19175            let next_out_of_line = decoder.next_out_of_line();
19176            let handles_before = decoder.remaining_handles();
19177            let (ordinal, inlined, num_bytes, num_handles) =
19178                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
19179
19180            let member_inline_size = match ordinal {
19181                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19182                2 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19183                _ => return Err(fidl::Error::UnknownUnionTag),
19184            };
19185
19186            if inlined != (member_inline_size <= 4) {
19187                return Err(fidl::Error::InvalidInlineBitInEnvelope);
19188            }
19189            let _inner_offset;
19190            if inlined {
19191                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
19192                _inner_offset = offset + 8;
19193            } else {
19194                depth.increment()?;
19195                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19196            }
19197            match ordinal {
19198                1 => {
19199                    #[allow(irrefutable_let_patterns)]
19200                    if let OptionalUint8::Value(_) = self {
19201                        // Do nothing, read the value into the object
19202                    } else {
19203                        // Initialize `self` to the right variant
19204                        *self = OptionalUint8::Value(fidl::new_empty!(u8, D));
19205                    }
19206                    #[allow(irrefutable_let_patterns)]
19207                    if let OptionalUint8::Value(ref mut val) = self {
19208                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
19209                    } else {
19210                        unreachable!()
19211                    }
19212                }
19213                2 => {
19214                    #[allow(irrefutable_let_patterns)]
19215                    if let OptionalUint8::Unset(_) = self {
19216                        // Do nothing, read the value into the object
19217                    } else {
19218                        // Initialize `self` to the right variant
19219                        *self = OptionalUint8::Unset(fidl::new_empty!(Empty, D));
19220                    }
19221                    #[allow(irrefutable_let_patterns)]
19222                    if let OptionalUint8::Unset(ref mut val) = self {
19223                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
19224                    } else {
19225                        unreachable!()
19226                    }
19227                }
19228                ordinal => panic!("unexpected ordinal {:?}", ordinal),
19229            }
19230            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
19231                return Err(fidl::Error::InvalidNumBytesInEnvelope);
19232            }
19233            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19234                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19235            }
19236            Ok(())
19237        }
19238    }
19239}