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_PORT2: u64 = 0x547dc9cc0455189e;
1661    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1662    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1663    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1664    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1665    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1666    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1667    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1668    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1669    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1670    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1671    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1672    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1673    pub const BIND: u64 = 0x4bc6400ae92125d;
1674    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1675    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1676    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1677    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1678    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1679    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1680    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1681    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1682    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1683    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1684    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1685    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1686    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1687    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1688    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1689    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1690    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1691    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1692    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1693    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1694    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1695    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1696    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1697    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1698    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1699    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1700    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1701    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1702    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1703    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1704    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1705    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1706    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1707    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1708    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1709    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1710    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1711    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1712    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1713    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1714    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1715    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1716    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1717    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1718    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1719    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1720    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1721    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1722    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
1723}
1724
1725pub mod base_network_socket_ordinals {
1726    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1727    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1728    pub const QUERY: u64 = 0x2658edee9decfc06;
1729    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1730    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1731    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1732    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1733    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1734    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1735    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1736    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1737    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1738    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1739    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1740    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1741    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1742    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1743    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1744    pub const SET_LINGER: u64 = 0x45386351246e998e;
1745    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1746    pub const SET_REUSE_PORT2: u64 = 0x547dc9cc0455189e;
1747    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1748    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1749    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1750    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1751    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1752    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1753    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1754    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1755    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1756    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1757    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1758    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1759    pub const BIND: u64 = 0x4bc6400ae92125d;
1760    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1761    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1762    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1763    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1764    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1765    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1766    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1767    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1768    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1769    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1770    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1771    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1772    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1773    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1774    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1775    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1776    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1777    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1778    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1779    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1780    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1781    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1782    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1783    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1784    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1785    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1786    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1787    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1788    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1789    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1790    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1791    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1792    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1793    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1794    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1795    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1796    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1797    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1798    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1799    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1800    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1801    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1802    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1803    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1804    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1805    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1806    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1807    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1808}
1809
1810pub mod base_socket_ordinals {
1811    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1812    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1813    pub const QUERY: u64 = 0x2658edee9decfc06;
1814    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1815    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1816    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1817    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1818    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1819    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1820    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1821    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1822    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1823    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1824    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1825    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1826    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1827    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1828    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1829    pub const SET_LINGER: u64 = 0x45386351246e998e;
1830    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1831    pub const SET_REUSE_PORT2: u64 = 0x547dc9cc0455189e;
1832    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1833    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1834    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1835    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1836    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1837    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1838    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1839    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1840    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1841    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1842    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1843    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1844}
1845
1846pub mod datagram_socket_ordinals {
1847    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1848    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1849    pub const QUERY: u64 = 0x2658edee9decfc06;
1850    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1851    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1852    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1853    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1854    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1855    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1856    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1857    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1858    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1859    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1860    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1861    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1862    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1863    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1864    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1865    pub const SET_LINGER: u64 = 0x45386351246e998e;
1866    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1867    pub const SET_REUSE_PORT2: u64 = 0x547dc9cc0455189e;
1868    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1869    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1870    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1871    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1872    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1873    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1874    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1875    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1876    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1877    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1878    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1879    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1880    pub const BIND: u64 = 0x4bc6400ae92125d;
1881    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1882    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1883    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1884    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1885    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1886    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1887    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1888    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1889    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1890    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1891    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1892    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1893    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1894    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1895    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1896    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1897    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1898    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1899    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1900    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1901    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1902    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1903    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1904    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1905    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1906    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1907    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1908    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1909    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1910    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1911    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1912    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1913    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1914    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1915    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1916    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1917    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1918    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1919    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1920    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1921    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1922    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1923    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1924    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1925    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1926    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1927    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1928    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1929    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
1930    pub const DESCRIBE: u64 = 0xbf1e2f0a86601f3;
1931    pub const SEND_MSG_PREFLIGHT: u64 = 0x5362e668e777248a;
1932    pub const RECV_MSG_POSTFLIGHT: u64 = 0x1a7cdeca5f3eb8e2;
1933}
1934
1935pub mod provider_ordinals {
1936    pub const STREAM_SOCKET_WITH_OPTIONS: u64 = 0x3969bf7eb78386e0;
1937    pub const STREAM_SOCKET: u64 = 0x27c3581da2155545;
1938    pub const DATAGRAM_SOCKET_DEPRECATED: u64 = 0x38876c87cf031cb1;
1939    pub const DATAGRAM_SOCKET: u64 = 0x4021b4fa1b6452f2;
1940    pub const DATAGRAM_SOCKET_WITH_OPTIONS: u64 = 0x4cd0cffbffa39eb1;
1941    pub const INTERFACE_INDEX_TO_NAME: u64 = 0x4d59a64fce98272f;
1942    pub const INTERFACE_NAME_TO_INDEX: u64 = 0x690cd8d2f2d650f8;
1943    pub const INTERFACE_NAME_TO_FLAGS: u64 = 0x25d0efcdb6671a0b;
1944    pub const GET_INTERFACE_ADDRESSES: u64 = 0x2e7b9aaf327c870;
1945}
1946
1947pub mod stream_socket_ordinals {
1948    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1949    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1950    pub const QUERY: u64 = 0x2658edee9decfc06;
1951    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1952    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1953    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1954    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1955    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1956    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1957    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1958    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1959    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1960    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1961    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1962    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1963    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1964    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1965    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1966    pub const SET_LINGER: u64 = 0x45386351246e998e;
1967    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1968    pub const SET_REUSE_PORT2: u64 = 0x547dc9cc0455189e;
1969    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
1970    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1971    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1972    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1973    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1974    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1975    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1976    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1977    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1978    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1979    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1980    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1981    pub const BIND: u64 = 0x4bc6400ae92125d;
1982    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1983    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1984    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1985    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1986    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1987    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1988    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1989    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1990    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1991    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1992    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1993    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1994    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1995    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1996    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1997    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1998    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1999    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
2000    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
2001    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
2002    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
2003    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
2004    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
2005    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
2006    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
2007    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
2008    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
2009    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
2010    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
2011    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
2012    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
2013    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
2014    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
2015    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
2016    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
2017    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
2018    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
2019    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
2020    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
2021    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
2022    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
2023    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
2024    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
2025    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
2026    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
2027    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
2028    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
2029    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
2030    pub const DESCRIBE: u64 = 0x29e22969a7dadc32;
2031    pub const LISTEN: u64 = 0x3d0a65ced3d10108;
2032    pub const ACCEPT: u64 = 0x5ab7ad620424c163;
2033    pub const GET_INFO: u64 = 0x87cfa55d19f878f;
2034    pub const SET_TCP_NO_DELAY: u64 = 0x5a59b778f7333ada;
2035    pub const GET_TCP_NO_DELAY: u64 = 0xac219a3218b0799;
2036    pub const SET_TCP_MAX_SEGMENT: u64 = 0xb3d30c498266d18;
2037    pub const GET_TCP_MAX_SEGMENT: u64 = 0x637404d1b4b9982c;
2038    pub const SET_TCP_CORK: u64 = 0x62e26891541143a0;
2039    pub const GET_TCP_CORK: u64 = 0x435bb232e0e74f32;
2040    pub const SET_TCP_KEEP_ALIVE_IDLE: u64 = 0x196d053d8363c42;
2041    pub const GET_TCP_KEEP_ALIVE_IDLE: u64 = 0x35ec58564879dac;
2042    pub const SET_TCP_KEEP_ALIVE_INTERVAL: u64 = 0x485ffbc2da1243f2;
2043    pub const GET_TCP_KEEP_ALIVE_INTERVAL: u64 = 0x264eaf46306b284;
2044    pub const SET_TCP_KEEP_ALIVE_COUNT: u64 = 0x2ab2e8c111708421;
2045    pub const GET_TCP_KEEP_ALIVE_COUNT: u64 = 0x2f176ae271fe7a09;
2046    pub const SET_TCP_SYN_COUNT: u64 = 0x4dcd6ab5573c1eb3;
2047    pub const GET_TCP_SYN_COUNT: u64 = 0x7d457cba8f5f3ee6;
2048    pub const SET_TCP_LINGER: u64 = 0xd5cc1e8654d36e4;
2049    pub const GET_TCP_LINGER: u64 = 0xad870d311cf30eb;
2050    pub const SET_TCP_DEFER_ACCEPT: u64 = 0x15092f181e57c404;
2051    pub const GET_TCP_DEFER_ACCEPT: u64 = 0x64589790842cb7c6;
2052    pub const SET_TCP_WINDOW_CLAMP: u64 = 0x4a26ce07d847f1c6;
2053    pub const GET_TCP_WINDOW_CLAMP: u64 = 0x2df6b636bf0a6a4e;
2054    pub const GET_TCP_INFO: u64 = 0x1ffb123d9f03ead2;
2055    pub const SET_TCP_QUICK_ACK: u64 = 0x6fa811be8fde7457;
2056    pub const GET_TCP_QUICK_ACK: u64 = 0x7356a949bef2df32;
2057    pub const SET_TCP_CONGESTION: u64 = 0x7924c6eabde7819e;
2058    pub const GET_TCP_CONGESTION: u64 = 0x11e16397e1b72a47;
2059    pub const SET_TCP_USER_TIMEOUT: u64 = 0x6b459e81c3741a60;
2060    pub const GET_TCP_USER_TIMEOUT: u64 = 0x24bbd5858ad8c380;
2061}
2062
2063pub mod synchronous_datagram_socket_ordinals {
2064    pub const CLONE: u64 = 0x20d8a7aba2168a79;
2065    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
2066    pub const QUERY: u64 = 0x2658edee9decfc06;
2067    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
2068    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
2069    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
2070    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
2071    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
2072    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
2073    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
2074    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
2075    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
2076    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
2077    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
2078    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
2079    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
2080    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
2081    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
2082    pub const SET_LINGER: u64 = 0x45386351246e998e;
2083    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
2084    pub const SET_REUSE_PORT2: u64 = 0x547dc9cc0455189e;
2085    pub const SET_REUSE_PORT: u64 = 0x24dd3e5cb36d9ccb;
2086    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
2087    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
2088    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
2089    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
2090    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
2091    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
2092    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
2093    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
2094    pub const SET_MARK: u64 = 0x6ead6de09f653236;
2095    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
2096    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
2097    pub const BIND: u64 = 0x4bc6400ae92125d;
2098    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
2099    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
2100    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
2101    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
2102    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
2103    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
2104    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
2105    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
2106    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
2107    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
2108    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
2109    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
2110    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
2111    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
2112    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
2113    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
2114    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
2115    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
2116    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
2117    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
2118    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
2119    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
2120    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
2121    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
2122    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
2123    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
2124    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
2125    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
2126    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
2127    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
2128    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
2129    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
2130    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
2131    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
2132    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
2133    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
2134    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
2135    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
2136    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
2137    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
2138    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
2139    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
2140    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
2141    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
2142    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
2143    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
2144    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
2145    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
2146    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
2147    pub const DESCRIBE: u64 = 0x585f20b73631070d;
2148    pub const RECV_MSG: u64 = 0x28e494e48fb5dbf3;
2149    pub const SEND_MSG: u64 = 0x12dc2fceab6cefaa;
2150}
2151
2152mod internal {
2153    use super::*;
2154    unsafe impl fidl::encoding::TypeMarker for CmsgRequests {
2155        type Owned = Self;
2156
2157        #[inline(always)]
2158        fn inline_align(_context: fidl::encoding::Context) -> usize {
2159            4
2160        }
2161
2162        #[inline(always)]
2163        fn inline_size(_context: fidl::encoding::Context) -> usize {
2164            4
2165        }
2166    }
2167
2168    impl fidl::encoding::ValueTypeMarker for CmsgRequests {
2169        type Borrowed<'a> = Self;
2170        #[inline(always)]
2171        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2172            *value
2173        }
2174    }
2175
2176    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CmsgRequests {
2177        #[inline]
2178        unsafe fn encode(
2179            self,
2180            encoder: &mut fidl::encoding::Encoder<'_, D>,
2181            offset: usize,
2182            _depth: fidl::encoding::Depth,
2183        ) -> fidl::Result<()> {
2184            encoder.debug_check_bounds::<Self>(offset);
2185            encoder.write_num(self.bits(), offset);
2186            Ok(())
2187        }
2188    }
2189
2190    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CmsgRequests {
2191        #[inline(always)]
2192        fn new_empty() -> Self {
2193            Self::empty()
2194        }
2195
2196        #[inline]
2197        unsafe fn decode(
2198            &mut self,
2199            decoder: &mut fidl::encoding::Decoder<'_, D>,
2200            offset: usize,
2201            _depth: fidl::encoding::Depth,
2202        ) -> fidl::Result<()> {
2203            decoder.debug_check_bounds::<Self>(offset);
2204            let prim = decoder.read_num::<u32>(offset);
2205            *self = Self::from_bits_allow_unknown(prim);
2206            Ok(())
2207        }
2208    }
2209    unsafe impl fidl::encoding::TypeMarker for InterfaceFlags {
2210        type Owned = Self;
2211
2212        #[inline(always)]
2213        fn inline_align(_context: fidl::encoding::Context) -> usize {
2214            2
2215        }
2216
2217        #[inline(always)]
2218        fn inline_size(_context: fidl::encoding::Context) -> usize {
2219            2
2220        }
2221    }
2222
2223    impl fidl::encoding::ValueTypeMarker for InterfaceFlags {
2224        type Borrowed<'a> = Self;
2225        #[inline(always)]
2226        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2227            *value
2228        }
2229    }
2230
2231    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for InterfaceFlags {
2232        #[inline]
2233        unsafe fn encode(
2234            self,
2235            encoder: &mut fidl::encoding::Encoder<'_, D>,
2236            offset: usize,
2237            _depth: fidl::encoding::Depth,
2238        ) -> fidl::Result<()> {
2239            encoder.debug_check_bounds::<Self>(offset);
2240            if self.bits() & Self::all().bits() != self.bits() {
2241                return Err(fidl::Error::InvalidBitsValue);
2242            }
2243            encoder.write_num(self.bits(), offset);
2244            Ok(())
2245        }
2246    }
2247
2248    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceFlags {
2249        #[inline(always)]
2250        fn new_empty() -> Self {
2251            Self::empty()
2252        }
2253
2254        #[inline]
2255        unsafe fn decode(
2256            &mut self,
2257            decoder: &mut fidl::encoding::Decoder<'_, D>,
2258            offset: usize,
2259            _depth: fidl::encoding::Depth,
2260        ) -> fidl::Result<()> {
2261            decoder.debug_check_bounds::<Self>(offset);
2262            let prim = decoder.read_num::<u16>(offset);
2263            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2264            Ok(())
2265        }
2266    }
2267    unsafe impl fidl::encoding::TypeMarker for RecvMsgFlags {
2268        type Owned = Self;
2269
2270        #[inline(always)]
2271        fn inline_align(_context: fidl::encoding::Context) -> usize {
2272            2
2273        }
2274
2275        #[inline(always)]
2276        fn inline_size(_context: fidl::encoding::Context) -> usize {
2277            2
2278        }
2279    }
2280
2281    impl fidl::encoding::ValueTypeMarker for RecvMsgFlags {
2282        type Borrowed<'a> = Self;
2283        #[inline(always)]
2284        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2285            *value
2286        }
2287    }
2288
2289    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RecvMsgFlags {
2290        #[inline]
2291        unsafe fn encode(
2292            self,
2293            encoder: &mut fidl::encoding::Encoder<'_, D>,
2294            offset: usize,
2295            _depth: fidl::encoding::Depth,
2296        ) -> fidl::Result<()> {
2297            encoder.debug_check_bounds::<Self>(offset);
2298            if self.bits() & Self::all().bits() != self.bits() {
2299                return Err(fidl::Error::InvalidBitsValue);
2300            }
2301            encoder.write_num(self.bits(), offset);
2302            Ok(())
2303        }
2304    }
2305
2306    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecvMsgFlags {
2307        #[inline(always)]
2308        fn new_empty() -> Self {
2309            Self::empty()
2310        }
2311
2312        #[inline]
2313        unsafe fn decode(
2314            &mut self,
2315            decoder: &mut fidl::encoding::Decoder<'_, D>,
2316            offset: usize,
2317            _depth: fidl::encoding::Depth,
2318        ) -> fidl::Result<()> {
2319            decoder.debug_check_bounds::<Self>(offset);
2320            let prim = decoder.read_num::<u16>(offset);
2321            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2322            Ok(())
2323        }
2324    }
2325    unsafe impl fidl::encoding::TypeMarker for SendMsgFlags {
2326        type Owned = Self;
2327
2328        #[inline(always)]
2329        fn inline_align(_context: fidl::encoding::Context) -> usize {
2330            2
2331        }
2332
2333        #[inline(always)]
2334        fn inline_size(_context: fidl::encoding::Context) -> usize {
2335            2
2336        }
2337    }
2338
2339    impl fidl::encoding::ValueTypeMarker for SendMsgFlags {
2340        type Borrowed<'a> = Self;
2341        #[inline(always)]
2342        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2343            *value
2344        }
2345    }
2346
2347    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SendMsgFlags {
2348        #[inline]
2349        unsafe fn encode(
2350            self,
2351            encoder: &mut fidl::encoding::Encoder<'_, D>,
2352            offset: usize,
2353            _depth: fidl::encoding::Depth,
2354        ) -> fidl::Result<()> {
2355            encoder.debug_check_bounds::<Self>(offset);
2356            if self.bits() & Self::all().bits() != self.bits() {
2357                return Err(fidl::Error::InvalidBitsValue);
2358            }
2359            encoder.write_num(self.bits(), offset);
2360            Ok(())
2361        }
2362    }
2363
2364    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SendMsgFlags {
2365        #[inline(always)]
2366        fn new_empty() -> Self {
2367            Self::empty()
2368        }
2369
2370        #[inline]
2371        unsafe fn decode(
2372            &mut self,
2373            decoder: &mut fidl::encoding::Decoder<'_, D>,
2374            offset: usize,
2375            _depth: fidl::encoding::Depth,
2376        ) -> fidl::Result<()> {
2377            decoder.debug_check_bounds::<Self>(offset);
2378            let prim = decoder.read_num::<u16>(offset);
2379            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2380            Ok(())
2381        }
2382    }
2383    unsafe impl fidl::encoding::TypeMarker for ShutdownMode {
2384        type Owned = Self;
2385
2386        #[inline(always)]
2387        fn inline_align(_context: fidl::encoding::Context) -> usize {
2388            2
2389        }
2390
2391        #[inline(always)]
2392        fn inline_size(_context: fidl::encoding::Context) -> usize {
2393            2
2394        }
2395    }
2396
2397    impl fidl::encoding::ValueTypeMarker for ShutdownMode {
2398        type Borrowed<'a> = Self;
2399        #[inline(always)]
2400        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2401            *value
2402        }
2403    }
2404
2405    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ShutdownMode {
2406        #[inline]
2407        unsafe fn encode(
2408            self,
2409            encoder: &mut fidl::encoding::Encoder<'_, D>,
2410            offset: usize,
2411            _depth: fidl::encoding::Depth,
2412        ) -> fidl::Result<()> {
2413            encoder.debug_check_bounds::<Self>(offset);
2414            if self.bits() & Self::all().bits() != self.bits() {
2415                return Err(fidl::Error::InvalidBitsValue);
2416            }
2417            encoder.write_num(self.bits(), offset);
2418            Ok(())
2419        }
2420    }
2421
2422    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ShutdownMode {
2423        #[inline(always)]
2424        fn new_empty() -> Self {
2425            Self::empty()
2426        }
2427
2428        #[inline]
2429        unsafe fn decode(
2430            &mut self,
2431            decoder: &mut fidl::encoding::Decoder<'_, D>,
2432            offset: usize,
2433            _depth: fidl::encoding::Depth,
2434        ) -> fidl::Result<()> {
2435            decoder.debug_check_bounds::<Self>(offset);
2436            let prim = decoder.read_num::<u16>(offset);
2437            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2438            Ok(())
2439        }
2440    }
2441    unsafe impl fidl::encoding::TypeMarker for DatagramSocketProtocol {
2442        type Owned = Self;
2443
2444        #[inline(always)]
2445        fn inline_align(_context: fidl::encoding::Context) -> usize {
2446            std::mem::align_of::<u32>()
2447        }
2448
2449        #[inline(always)]
2450        fn inline_size(_context: fidl::encoding::Context) -> usize {
2451            std::mem::size_of::<u32>()
2452        }
2453
2454        #[inline(always)]
2455        fn encode_is_copy() -> bool {
2456            true
2457        }
2458
2459        #[inline(always)]
2460        fn decode_is_copy() -> bool {
2461            false
2462        }
2463    }
2464
2465    impl fidl::encoding::ValueTypeMarker for DatagramSocketProtocol {
2466        type Borrowed<'a> = Self;
2467        #[inline(always)]
2468        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2469            *value
2470        }
2471    }
2472
2473    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2474        for DatagramSocketProtocol
2475    {
2476        #[inline]
2477        unsafe fn encode(
2478            self,
2479            encoder: &mut fidl::encoding::Encoder<'_, D>,
2480            offset: usize,
2481            _depth: fidl::encoding::Depth,
2482        ) -> fidl::Result<()> {
2483            encoder.debug_check_bounds::<Self>(offset);
2484            encoder.write_num(self.into_primitive(), offset);
2485            Ok(())
2486        }
2487    }
2488
2489    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2490        for DatagramSocketProtocol
2491    {
2492        #[inline(always)]
2493        fn new_empty() -> Self {
2494            Self::Udp
2495        }
2496
2497        #[inline]
2498        unsafe fn decode(
2499            &mut self,
2500            decoder: &mut fidl::encoding::Decoder<'_, D>,
2501            offset: usize,
2502            _depth: fidl::encoding::Depth,
2503        ) -> fidl::Result<()> {
2504            decoder.debug_check_bounds::<Self>(offset);
2505            let prim = decoder.read_num::<u32>(offset);
2506
2507            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2508            Ok(())
2509        }
2510    }
2511    unsafe impl fidl::encoding::TypeMarker for Domain {
2512        type Owned = Self;
2513
2514        #[inline(always)]
2515        fn inline_align(_context: fidl::encoding::Context) -> usize {
2516            std::mem::align_of::<i16>()
2517        }
2518
2519        #[inline(always)]
2520        fn inline_size(_context: fidl::encoding::Context) -> usize {
2521            std::mem::size_of::<i16>()
2522        }
2523
2524        #[inline(always)]
2525        fn encode_is_copy() -> bool {
2526            true
2527        }
2528
2529        #[inline(always)]
2530        fn decode_is_copy() -> bool {
2531            false
2532        }
2533    }
2534
2535    impl fidl::encoding::ValueTypeMarker for Domain {
2536        type Borrowed<'a> = Self;
2537        #[inline(always)]
2538        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2539            *value
2540        }
2541    }
2542
2543    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Domain {
2544        #[inline]
2545        unsafe fn encode(
2546            self,
2547            encoder: &mut fidl::encoding::Encoder<'_, D>,
2548            offset: usize,
2549            _depth: fidl::encoding::Depth,
2550        ) -> fidl::Result<()> {
2551            encoder.debug_check_bounds::<Self>(offset);
2552            encoder.write_num(self.into_primitive(), offset);
2553            Ok(())
2554        }
2555    }
2556
2557    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Domain {
2558        #[inline(always)]
2559        fn new_empty() -> Self {
2560            Self::Ipv4
2561        }
2562
2563        #[inline]
2564        unsafe fn decode(
2565            &mut self,
2566            decoder: &mut fidl::encoding::Decoder<'_, D>,
2567            offset: usize,
2568            _depth: fidl::encoding::Depth,
2569        ) -> fidl::Result<()> {
2570            decoder.debug_check_bounds::<Self>(offset);
2571            let prim = decoder.read_num::<i16>(offset);
2572
2573            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2574            Ok(())
2575        }
2576    }
2577    unsafe impl fidl::encoding::TypeMarker for StreamSocketProtocol {
2578        type Owned = Self;
2579
2580        #[inline(always)]
2581        fn inline_align(_context: fidl::encoding::Context) -> usize {
2582            std::mem::align_of::<u32>()
2583        }
2584
2585        #[inline(always)]
2586        fn inline_size(_context: fidl::encoding::Context) -> usize {
2587            std::mem::size_of::<u32>()
2588        }
2589
2590        #[inline(always)]
2591        fn encode_is_copy() -> bool {
2592            true
2593        }
2594
2595        #[inline(always)]
2596        fn decode_is_copy() -> bool {
2597            false
2598        }
2599    }
2600
2601    impl fidl::encoding::ValueTypeMarker for StreamSocketProtocol {
2602        type Borrowed<'a> = Self;
2603        #[inline(always)]
2604        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2605            *value
2606        }
2607    }
2608
2609    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2610        for StreamSocketProtocol
2611    {
2612        #[inline]
2613        unsafe fn encode(
2614            self,
2615            encoder: &mut fidl::encoding::Encoder<'_, D>,
2616            offset: usize,
2617            _depth: fidl::encoding::Depth,
2618        ) -> fidl::Result<()> {
2619            encoder.debug_check_bounds::<Self>(offset);
2620            encoder.write_num(self.into_primitive(), offset);
2621            Ok(())
2622        }
2623    }
2624
2625    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StreamSocketProtocol {
2626        #[inline(always)]
2627        fn new_empty() -> Self {
2628            Self::Tcp
2629        }
2630
2631        #[inline]
2632        unsafe fn decode(
2633            &mut self,
2634            decoder: &mut fidl::encoding::Decoder<'_, D>,
2635            offset: usize,
2636            _depth: fidl::encoding::Depth,
2637        ) -> fidl::Result<()> {
2638            decoder.debug_check_bounds::<Self>(offset);
2639            let prim = decoder.read_num::<u32>(offset);
2640
2641            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2642            Ok(())
2643        }
2644    }
2645    unsafe impl fidl::encoding::TypeMarker for TcpCongestionControl {
2646        type Owned = Self;
2647
2648        #[inline(always)]
2649        fn inline_align(_context: fidl::encoding::Context) -> usize {
2650            std::mem::align_of::<u32>()
2651        }
2652
2653        #[inline(always)]
2654        fn inline_size(_context: fidl::encoding::Context) -> usize {
2655            std::mem::size_of::<u32>()
2656        }
2657
2658        #[inline(always)]
2659        fn encode_is_copy() -> bool {
2660            true
2661        }
2662
2663        #[inline(always)]
2664        fn decode_is_copy() -> bool {
2665            false
2666        }
2667    }
2668
2669    impl fidl::encoding::ValueTypeMarker for TcpCongestionControl {
2670        type Borrowed<'a> = Self;
2671        #[inline(always)]
2672        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2673            *value
2674        }
2675    }
2676
2677    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2678        for TcpCongestionControl
2679    {
2680        #[inline]
2681        unsafe fn encode(
2682            self,
2683            encoder: &mut fidl::encoding::Encoder<'_, D>,
2684            offset: usize,
2685            _depth: fidl::encoding::Depth,
2686        ) -> fidl::Result<()> {
2687            encoder.debug_check_bounds::<Self>(offset);
2688            encoder.write_num(self.into_primitive(), offset);
2689            Ok(())
2690        }
2691    }
2692
2693    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TcpCongestionControl {
2694        #[inline(always)]
2695        fn new_empty() -> Self {
2696            Self::Reno
2697        }
2698
2699        #[inline]
2700        unsafe fn decode(
2701            &mut self,
2702            decoder: &mut fidl::encoding::Decoder<'_, D>,
2703            offset: usize,
2704            _depth: fidl::encoding::Depth,
2705        ) -> fidl::Result<()> {
2706            decoder.debug_check_bounds::<Self>(offset);
2707            let prim = decoder.read_num::<u32>(offset);
2708
2709            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2710            Ok(())
2711        }
2712    }
2713    unsafe impl fidl::encoding::TypeMarker for TcpCongestionControlState {
2714        type Owned = Self;
2715
2716        #[inline(always)]
2717        fn inline_align(_context: fidl::encoding::Context) -> usize {
2718            std::mem::align_of::<u32>()
2719        }
2720
2721        #[inline(always)]
2722        fn inline_size(_context: fidl::encoding::Context) -> usize {
2723            std::mem::size_of::<u32>()
2724        }
2725
2726        #[inline(always)]
2727        fn encode_is_copy() -> bool {
2728            true
2729        }
2730
2731        #[inline(always)]
2732        fn decode_is_copy() -> bool {
2733            false
2734        }
2735    }
2736
2737    impl fidl::encoding::ValueTypeMarker for TcpCongestionControlState {
2738        type Borrowed<'a> = Self;
2739        #[inline(always)]
2740        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2741            *value
2742        }
2743    }
2744
2745    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2746        for TcpCongestionControlState
2747    {
2748        #[inline]
2749        unsafe fn encode(
2750            self,
2751            encoder: &mut fidl::encoding::Encoder<'_, D>,
2752            offset: usize,
2753            _depth: fidl::encoding::Depth,
2754        ) -> fidl::Result<()> {
2755            encoder.debug_check_bounds::<Self>(offset);
2756            encoder.write_num(self.into_primitive(), offset);
2757            Ok(())
2758        }
2759    }
2760
2761    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2762        for TcpCongestionControlState
2763    {
2764        #[inline(always)]
2765        fn new_empty() -> Self {
2766            Self::Open
2767        }
2768
2769        #[inline]
2770        unsafe fn decode(
2771            &mut self,
2772            decoder: &mut fidl::encoding::Decoder<'_, D>,
2773            offset: usize,
2774            _depth: fidl::encoding::Depth,
2775        ) -> fidl::Result<()> {
2776            decoder.debug_check_bounds::<Self>(offset);
2777            let prim = decoder.read_num::<u32>(offset);
2778
2779            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2780            Ok(())
2781        }
2782    }
2783    unsafe impl fidl::encoding::TypeMarker for TimestampOption {
2784        type Owned = Self;
2785
2786        #[inline(always)]
2787        fn inline_align(_context: fidl::encoding::Context) -> usize {
2788            std::mem::align_of::<u32>()
2789        }
2790
2791        #[inline(always)]
2792        fn inline_size(_context: fidl::encoding::Context) -> usize {
2793            std::mem::size_of::<u32>()
2794        }
2795
2796        #[inline(always)]
2797        fn encode_is_copy() -> bool {
2798            true
2799        }
2800
2801        #[inline(always)]
2802        fn decode_is_copy() -> bool {
2803            false
2804        }
2805    }
2806
2807    impl fidl::encoding::ValueTypeMarker for TimestampOption {
2808        type Borrowed<'a> = Self;
2809        #[inline(always)]
2810        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2811            *value
2812        }
2813    }
2814
2815    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2816        for TimestampOption
2817    {
2818        #[inline]
2819        unsafe fn encode(
2820            self,
2821            encoder: &mut fidl::encoding::Encoder<'_, D>,
2822            offset: usize,
2823            _depth: fidl::encoding::Depth,
2824        ) -> fidl::Result<()> {
2825            encoder.debug_check_bounds::<Self>(offset);
2826            encoder.write_num(self.into_primitive(), offset);
2827            Ok(())
2828        }
2829    }
2830
2831    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TimestampOption {
2832        #[inline(always)]
2833        fn new_empty() -> Self {
2834            Self::Disabled
2835        }
2836
2837        #[inline]
2838        unsafe fn decode(
2839            &mut self,
2840            decoder: &mut fidl::encoding::Decoder<'_, D>,
2841            offset: usize,
2842            _depth: fidl::encoding::Depth,
2843        ) -> fidl::Result<()> {
2844            decoder.debug_check_bounds::<Self>(offset);
2845            let prim = decoder.read_num::<u32>(offset);
2846
2847            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2848            Ok(())
2849        }
2850    }
2851    unsafe impl fidl::encoding::TypeMarker for UdpMetadataEncodingProtocolVersion {
2852        type Owned = Self;
2853
2854        #[inline(always)]
2855        fn inline_align(_context: fidl::encoding::Context) -> usize {
2856            std::mem::align_of::<u16>()
2857        }
2858
2859        #[inline(always)]
2860        fn inline_size(_context: fidl::encoding::Context) -> usize {
2861            std::mem::size_of::<u16>()
2862        }
2863
2864        #[inline(always)]
2865        fn encode_is_copy() -> bool {
2866            false
2867        }
2868
2869        #[inline(always)]
2870        fn decode_is_copy() -> bool {
2871            false
2872        }
2873    }
2874
2875    impl fidl::encoding::ValueTypeMarker for UdpMetadataEncodingProtocolVersion {
2876        type Borrowed<'a> = Self;
2877        #[inline(always)]
2878        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2879            *value
2880        }
2881    }
2882
2883    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2884        for UdpMetadataEncodingProtocolVersion
2885    {
2886        #[inline]
2887        unsafe fn encode(
2888            self,
2889            encoder: &mut fidl::encoding::Encoder<'_, D>,
2890            offset: usize,
2891            _depth: fidl::encoding::Depth,
2892        ) -> fidl::Result<()> {
2893            encoder.debug_check_bounds::<Self>(offset);
2894            encoder.write_num(self.into_primitive(), offset);
2895            Ok(())
2896        }
2897    }
2898
2899    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2900        for UdpMetadataEncodingProtocolVersion
2901    {
2902        #[inline(always)]
2903        fn new_empty() -> Self {
2904            Self::unknown()
2905        }
2906
2907        #[inline]
2908        unsafe fn decode(
2909            &mut self,
2910            decoder: &mut fidl::encoding::Decoder<'_, D>,
2911            offset: usize,
2912            _depth: fidl::encoding::Depth,
2913        ) -> fidl::Result<()> {
2914            decoder.debug_check_bounds::<Self>(offset);
2915            let prim = decoder.read_num::<u16>(offset);
2916
2917            *self = Self::from_primitive_allow_unknown(prim);
2918            Ok(())
2919        }
2920    }
2921
2922    impl fidl::encoding::ValueTypeMarker for BaseDatagramSocketGetInfoResponse {
2923        type Borrowed<'a> = &'a Self;
2924        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2925            value
2926        }
2927    }
2928
2929    unsafe impl fidl::encoding::TypeMarker for BaseDatagramSocketGetInfoResponse {
2930        type Owned = Self;
2931
2932        #[inline(always)]
2933        fn inline_align(_context: fidl::encoding::Context) -> usize {
2934            4
2935        }
2936
2937        #[inline(always)]
2938        fn inline_size(_context: fidl::encoding::Context) -> usize {
2939            8
2940        }
2941    }
2942
2943    unsafe impl<D: fidl::encoding::ResourceDialect>
2944        fidl::encoding::Encode<BaseDatagramSocketGetInfoResponse, D>
2945        for &BaseDatagramSocketGetInfoResponse
2946    {
2947        #[inline]
2948        unsafe fn encode(
2949            self,
2950            encoder: &mut fidl::encoding::Encoder<'_, D>,
2951            offset: usize,
2952            _depth: fidl::encoding::Depth,
2953        ) -> fidl::Result<()> {
2954            encoder.debug_check_bounds::<BaseDatagramSocketGetInfoResponse>(offset);
2955            // Delegate to tuple encoding.
2956            fidl::encoding::Encode::<BaseDatagramSocketGetInfoResponse, D>::encode(
2957                (
2958                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
2959                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
2960                        &self.proto,
2961                    ),
2962                ),
2963                encoder,
2964                offset,
2965                _depth,
2966            )
2967        }
2968    }
2969    unsafe impl<
2970        D: fidl::encoding::ResourceDialect,
2971        T0: fidl::encoding::Encode<Domain, D>,
2972        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
2973    > fidl::encoding::Encode<BaseDatagramSocketGetInfoResponse, D> for (T0, T1)
2974    {
2975        #[inline]
2976        unsafe fn encode(
2977            self,
2978            encoder: &mut fidl::encoding::Encoder<'_, D>,
2979            offset: usize,
2980            depth: fidl::encoding::Depth,
2981        ) -> fidl::Result<()> {
2982            encoder.debug_check_bounds::<BaseDatagramSocketGetInfoResponse>(offset);
2983            // Zero out padding regions. There's no need to apply masks
2984            // because the unmasked parts will be overwritten by fields.
2985            unsafe {
2986                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2987                (ptr as *mut u32).write_unaligned(0);
2988            }
2989            // Write the fields.
2990            self.0.encode(encoder, offset + 0, depth)?;
2991            self.1.encode(encoder, offset + 4, depth)?;
2992            Ok(())
2993        }
2994    }
2995
2996    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2997        for BaseDatagramSocketGetInfoResponse
2998    {
2999        #[inline(always)]
3000        fn new_empty() -> Self {
3001            Self {
3002                domain: fidl::new_empty!(Domain, D),
3003                proto: fidl::new_empty!(DatagramSocketProtocol, D),
3004            }
3005        }
3006
3007        #[inline]
3008        unsafe fn decode(
3009            &mut self,
3010            decoder: &mut fidl::encoding::Decoder<'_, D>,
3011            offset: usize,
3012            _depth: fidl::encoding::Depth,
3013        ) -> fidl::Result<()> {
3014            decoder.debug_check_bounds::<Self>(offset);
3015            // Verify that padding bytes are zero.
3016            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3017            let padval = unsafe { (ptr as *const u32).read_unaligned() };
3018            let mask = 0xffff0000u32;
3019            let maskedval = padval & mask;
3020            if maskedval != 0 {
3021                return Err(fidl::Error::NonZeroPadding {
3022                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3023                });
3024            }
3025            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
3026            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
3027            Ok(())
3028        }
3029    }
3030
3031    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketAddIpMembershipRequest {
3032        type Borrowed<'a> = &'a Self;
3033        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3034            value
3035        }
3036    }
3037
3038    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketAddIpMembershipRequest {
3039        type Owned = Self;
3040
3041        #[inline(always)]
3042        fn inline_align(_context: fidl::encoding::Context) -> usize {
3043            8
3044        }
3045
3046        #[inline(always)]
3047        fn inline_size(_context: fidl::encoding::Context) -> usize {
3048            16
3049        }
3050    }
3051
3052    unsafe impl<D: fidl::encoding::ResourceDialect>
3053        fidl::encoding::Encode<BaseNetworkSocketAddIpMembershipRequest, D>
3054        for &BaseNetworkSocketAddIpMembershipRequest
3055    {
3056        #[inline]
3057        unsafe fn encode(
3058            self,
3059            encoder: &mut fidl::encoding::Encoder<'_, D>,
3060            offset: usize,
3061            _depth: fidl::encoding::Depth,
3062        ) -> fidl::Result<()> {
3063            encoder.debug_check_bounds::<BaseNetworkSocketAddIpMembershipRequest>(offset);
3064            // Delegate to tuple encoding.
3065            fidl::encoding::Encode::<BaseNetworkSocketAddIpMembershipRequest, D>::encode(
3066                (<IpMulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3067                    &self.membership,
3068                ),),
3069                encoder,
3070                offset,
3071                _depth,
3072            )
3073        }
3074    }
3075    unsafe impl<
3076        D: fidl::encoding::ResourceDialect,
3077        T0: fidl::encoding::Encode<IpMulticastMembership, D>,
3078    > fidl::encoding::Encode<BaseNetworkSocketAddIpMembershipRequest, D> for (T0,)
3079    {
3080        #[inline]
3081        unsafe fn encode(
3082            self,
3083            encoder: &mut fidl::encoding::Encoder<'_, D>,
3084            offset: usize,
3085            depth: fidl::encoding::Depth,
3086        ) -> fidl::Result<()> {
3087            encoder.debug_check_bounds::<BaseNetworkSocketAddIpMembershipRequest>(offset);
3088            // Zero out padding regions. There's no need to apply masks
3089            // because the unmasked parts will be overwritten by fields.
3090            // Write the fields.
3091            self.0.encode(encoder, offset + 0, depth)?;
3092            Ok(())
3093        }
3094    }
3095
3096    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3097        for BaseNetworkSocketAddIpMembershipRequest
3098    {
3099        #[inline(always)]
3100        fn new_empty() -> Self {
3101            Self { membership: fidl::new_empty!(IpMulticastMembership, D) }
3102        }
3103
3104        #[inline]
3105        unsafe fn decode(
3106            &mut self,
3107            decoder: &mut fidl::encoding::Decoder<'_, D>,
3108            offset: usize,
3109            _depth: fidl::encoding::Depth,
3110        ) -> fidl::Result<()> {
3111            decoder.debug_check_bounds::<Self>(offset);
3112            // Verify that padding bytes are zero.
3113            fidl::decode!(
3114                IpMulticastMembership,
3115                D,
3116                &mut self.membership,
3117                decoder,
3118                offset + 0,
3119                _depth
3120            )?;
3121            Ok(())
3122        }
3123    }
3124
3125    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketAddIpv6MembershipRequest {
3126        type Borrowed<'a> = &'a Self;
3127        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3128            value
3129        }
3130    }
3131
3132    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketAddIpv6MembershipRequest {
3133        type Owned = Self;
3134
3135        #[inline(always)]
3136        fn inline_align(_context: fidl::encoding::Context) -> usize {
3137            8
3138        }
3139
3140        #[inline(always)]
3141        fn inline_size(_context: fidl::encoding::Context) -> usize {
3142            24
3143        }
3144    }
3145
3146    unsafe impl<D: fidl::encoding::ResourceDialect>
3147        fidl::encoding::Encode<BaseNetworkSocketAddIpv6MembershipRequest, D>
3148        for &BaseNetworkSocketAddIpv6MembershipRequest
3149    {
3150        #[inline]
3151        unsafe fn encode(
3152            self,
3153            encoder: &mut fidl::encoding::Encoder<'_, D>,
3154            offset: usize,
3155            _depth: fidl::encoding::Depth,
3156        ) -> fidl::Result<()> {
3157            encoder.debug_check_bounds::<BaseNetworkSocketAddIpv6MembershipRequest>(offset);
3158            // Delegate to tuple encoding.
3159            fidl::encoding::Encode::<BaseNetworkSocketAddIpv6MembershipRequest, D>::encode(
3160                (<Ipv6MulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3161                    &self.membership,
3162                ),),
3163                encoder,
3164                offset,
3165                _depth,
3166            )
3167        }
3168    }
3169    unsafe impl<
3170        D: fidl::encoding::ResourceDialect,
3171        T0: fidl::encoding::Encode<Ipv6MulticastMembership, D>,
3172    > fidl::encoding::Encode<BaseNetworkSocketAddIpv6MembershipRequest, D> for (T0,)
3173    {
3174        #[inline]
3175        unsafe fn encode(
3176            self,
3177            encoder: &mut fidl::encoding::Encoder<'_, D>,
3178            offset: usize,
3179            depth: fidl::encoding::Depth,
3180        ) -> fidl::Result<()> {
3181            encoder.debug_check_bounds::<BaseNetworkSocketAddIpv6MembershipRequest>(offset);
3182            // Zero out padding regions. There's no need to apply masks
3183            // because the unmasked parts will be overwritten by fields.
3184            // Write the fields.
3185            self.0.encode(encoder, offset + 0, depth)?;
3186            Ok(())
3187        }
3188    }
3189
3190    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3191        for BaseNetworkSocketAddIpv6MembershipRequest
3192    {
3193        #[inline(always)]
3194        fn new_empty() -> Self {
3195            Self { membership: fidl::new_empty!(Ipv6MulticastMembership, D) }
3196        }
3197
3198        #[inline]
3199        unsafe fn decode(
3200            &mut self,
3201            decoder: &mut fidl::encoding::Decoder<'_, D>,
3202            offset: usize,
3203            _depth: fidl::encoding::Depth,
3204        ) -> fidl::Result<()> {
3205            decoder.debug_check_bounds::<Self>(offset);
3206            // Verify that padding bytes are zero.
3207            fidl::decode!(
3208                Ipv6MulticastMembership,
3209                D,
3210                &mut self.membership,
3211                decoder,
3212                offset + 0,
3213                _depth
3214            )?;
3215            Ok(())
3216        }
3217    }
3218
3219    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketBindRequest {
3220        type Borrowed<'a> = &'a Self;
3221        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3222            value
3223        }
3224    }
3225
3226    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketBindRequest {
3227        type Owned = Self;
3228
3229        #[inline(always)]
3230        fn inline_align(_context: fidl::encoding::Context) -> usize {
3231            8
3232        }
3233
3234        #[inline(always)]
3235        fn inline_size(_context: fidl::encoding::Context) -> usize {
3236            16
3237        }
3238    }
3239
3240    unsafe impl<D: fidl::encoding::ResourceDialect>
3241        fidl::encoding::Encode<BaseNetworkSocketBindRequest, D> for &BaseNetworkSocketBindRequest
3242    {
3243        #[inline]
3244        unsafe fn encode(
3245            self,
3246            encoder: &mut fidl::encoding::Encoder<'_, D>,
3247            offset: usize,
3248            _depth: fidl::encoding::Depth,
3249        ) -> fidl::Result<()> {
3250            encoder.debug_check_bounds::<BaseNetworkSocketBindRequest>(offset);
3251            // Delegate to tuple encoding.
3252            fidl::encoding::Encode::<BaseNetworkSocketBindRequest, D>::encode(
3253                (
3254                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
3255                ),
3256                encoder, offset, _depth
3257            )
3258        }
3259    }
3260    unsafe impl<
3261        D: fidl::encoding::ResourceDialect,
3262        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
3263    > fidl::encoding::Encode<BaseNetworkSocketBindRequest, D> for (T0,)
3264    {
3265        #[inline]
3266        unsafe fn encode(
3267            self,
3268            encoder: &mut fidl::encoding::Encoder<'_, D>,
3269            offset: usize,
3270            depth: fidl::encoding::Depth,
3271        ) -> fidl::Result<()> {
3272            encoder.debug_check_bounds::<BaseNetworkSocketBindRequest>(offset);
3273            // Zero out padding regions. There's no need to apply masks
3274            // because the unmasked parts will be overwritten by fields.
3275            // Write the fields.
3276            self.0.encode(encoder, offset + 0, depth)?;
3277            Ok(())
3278        }
3279    }
3280
3281    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3282        for BaseNetworkSocketBindRequest
3283    {
3284        #[inline(always)]
3285        fn new_empty() -> Self {
3286            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
3287        }
3288
3289        #[inline]
3290        unsafe fn decode(
3291            &mut self,
3292            decoder: &mut fidl::encoding::Decoder<'_, D>,
3293            offset: usize,
3294            _depth: fidl::encoding::Depth,
3295        ) -> fidl::Result<()> {
3296            decoder.debug_check_bounds::<Self>(offset);
3297            // Verify that padding bytes are zero.
3298            fidl::decode!(
3299                fidl_fuchsia_net__common::SocketAddress,
3300                D,
3301                &mut self.addr,
3302                decoder,
3303                offset + 0,
3304                _depth
3305            )?;
3306            Ok(())
3307        }
3308    }
3309
3310    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketConnectRequest {
3311        type Borrowed<'a> = &'a Self;
3312        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3313            value
3314        }
3315    }
3316
3317    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketConnectRequest {
3318        type Owned = Self;
3319
3320        #[inline(always)]
3321        fn inline_align(_context: fidl::encoding::Context) -> usize {
3322            8
3323        }
3324
3325        #[inline(always)]
3326        fn inline_size(_context: fidl::encoding::Context) -> usize {
3327            16
3328        }
3329    }
3330
3331    unsafe impl<D: fidl::encoding::ResourceDialect>
3332        fidl::encoding::Encode<BaseNetworkSocketConnectRequest, D>
3333        for &BaseNetworkSocketConnectRequest
3334    {
3335        #[inline]
3336        unsafe fn encode(
3337            self,
3338            encoder: &mut fidl::encoding::Encoder<'_, D>,
3339            offset: usize,
3340            _depth: fidl::encoding::Depth,
3341        ) -> fidl::Result<()> {
3342            encoder.debug_check_bounds::<BaseNetworkSocketConnectRequest>(offset);
3343            // Delegate to tuple encoding.
3344            fidl::encoding::Encode::<BaseNetworkSocketConnectRequest, D>::encode(
3345                (
3346                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
3347                ),
3348                encoder, offset, _depth
3349            )
3350        }
3351    }
3352    unsafe impl<
3353        D: fidl::encoding::ResourceDialect,
3354        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
3355    > fidl::encoding::Encode<BaseNetworkSocketConnectRequest, D> for (T0,)
3356    {
3357        #[inline]
3358        unsafe fn encode(
3359            self,
3360            encoder: &mut fidl::encoding::Encoder<'_, D>,
3361            offset: usize,
3362            depth: fidl::encoding::Depth,
3363        ) -> fidl::Result<()> {
3364            encoder.debug_check_bounds::<BaseNetworkSocketConnectRequest>(offset);
3365            // Zero out padding regions. There's no need to apply masks
3366            // because the unmasked parts will be overwritten by fields.
3367            // Write the fields.
3368            self.0.encode(encoder, offset + 0, depth)?;
3369            Ok(())
3370        }
3371    }
3372
3373    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3374        for BaseNetworkSocketConnectRequest
3375    {
3376        #[inline(always)]
3377        fn new_empty() -> Self {
3378            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
3379        }
3380
3381        #[inline]
3382        unsafe fn decode(
3383            &mut self,
3384            decoder: &mut fidl::encoding::Decoder<'_, D>,
3385            offset: usize,
3386            _depth: fidl::encoding::Depth,
3387        ) -> fidl::Result<()> {
3388            decoder.debug_check_bounds::<Self>(offset);
3389            // Verify that padding bytes are zero.
3390            fidl::decode!(
3391                fidl_fuchsia_net__common::SocketAddress,
3392                D,
3393                &mut self.addr,
3394                decoder,
3395                offset + 0,
3396                _depth
3397            )?;
3398            Ok(())
3399        }
3400    }
3401
3402    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketDropIpMembershipRequest {
3403        type Borrowed<'a> = &'a Self;
3404        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3405            value
3406        }
3407    }
3408
3409    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketDropIpMembershipRequest {
3410        type Owned = Self;
3411
3412        #[inline(always)]
3413        fn inline_align(_context: fidl::encoding::Context) -> usize {
3414            8
3415        }
3416
3417        #[inline(always)]
3418        fn inline_size(_context: fidl::encoding::Context) -> usize {
3419            16
3420        }
3421    }
3422
3423    unsafe impl<D: fidl::encoding::ResourceDialect>
3424        fidl::encoding::Encode<BaseNetworkSocketDropIpMembershipRequest, D>
3425        for &BaseNetworkSocketDropIpMembershipRequest
3426    {
3427        #[inline]
3428        unsafe fn encode(
3429            self,
3430            encoder: &mut fidl::encoding::Encoder<'_, D>,
3431            offset: usize,
3432            _depth: fidl::encoding::Depth,
3433        ) -> fidl::Result<()> {
3434            encoder.debug_check_bounds::<BaseNetworkSocketDropIpMembershipRequest>(offset);
3435            // Delegate to tuple encoding.
3436            fidl::encoding::Encode::<BaseNetworkSocketDropIpMembershipRequest, D>::encode(
3437                (<IpMulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3438                    &self.membership,
3439                ),),
3440                encoder,
3441                offset,
3442                _depth,
3443            )
3444        }
3445    }
3446    unsafe impl<
3447        D: fidl::encoding::ResourceDialect,
3448        T0: fidl::encoding::Encode<IpMulticastMembership, D>,
3449    > fidl::encoding::Encode<BaseNetworkSocketDropIpMembershipRequest, D> for (T0,)
3450    {
3451        #[inline]
3452        unsafe fn encode(
3453            self,
3454            encoder: &mut fidl::encoding::Encoder<'_, D>,
3455            offset: usize,
3456            depth: fidl::encoding::Depth,
3457        ) -> fidl::Result<()> {
3458            encoder.debug_check_bounds::<BaseNetworkSocketDropIpMembershipRequest>(offset);
3459            // Zero out padding regions. There's no need to apply masks
3460            // because the unmasked parts will be overwritten by fields.
3461            // Write the fields.
3462            self.0.encode(encoder, offset + 0, depth)?;
3463            Ok(())
3464        }
3465    }
3466
3467    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3468        for BaseNetworkSocketDropIpMembershipRequest
3469    {
3470        #[inline(always)]
3471        fn new_empty() -> Self {
3472            Self { membership: fidl::new_empty!(IpMulticastMembership, D) }
3473        }
3474
3475        #[inline]
3476        unsafe fn decode(
3477            &mut self,
3478            decoder: &mut fidl::encoding::Decoder<'_, D>,
3479            offset: usize,
3480            _depth: fidl::encoding::Depth,
3481        ) -> fidl::Result<()> {
3482            decoder.debug_check_bounds::<Self>(offset);
3483            // Verify that padding bytes are zero.
3484            fidl::decode!(
3485                IpMulticastMembership,
3486                D,
3487                &mut self.membership,
3488                decoder,
3489                offset + 0,
3490                _depth
3491            )?;
3492            Ok(())
3493        }
3494    }
3495
3496    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketDropIpv6MembershipRequest {
3497        type Borrowed<'a> = &'a Self;
3498        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3499            value
3500        }
3501    }
3502
3503    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketDropIpv6MembershipRequest {
3504        type Owned = Self;
3505
3506        #[inline(always)]
3507        fn inline_align(_context: fidl::encoding::Context) -> usize {
3508            8
3509        }
3510
3511        #[inline(always)]
3512        fn inline_size(_context: fidl::encoding::Context) -> usize {
3513            24
3514        }
3515    }
3516
3517    unsafe impl<D: fidl::encoding::ResourceDialect>
3518        fidl::encoding::Encode<BaseNetworkSocketDropIpv6MembershipRequest, D>
3519        for &BaseNetworkSocketDropIpv6MembershipRequest
3520    {
3521        #[inline]
3522        unsafe fn encode(
3523            self,
3524            encoder: &mut fidl::encoding::Encoder<'_, D>,
3525            offset: usize,
3526            _depth: fidl::encoding::Depth,
3527        ) -> fidl::Result<()> {
3528            encoder.debug_check_bounds::<BaseNetworkSocketDropIpv6MembershipRequest>(offset);
3529            // Delegate to tuple encoding.
3530            fidl::encoding::Encode::<BaseNetworkSocketDropIpv6MembershipRequest, D>::encode(
3531                (<Ipv6MulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3532                    &self.membership,
3533                ),),
3534                encoder,
3535                offset,
3536                _depth,
3537            )
3538        }
3539    }
3540    unsafe impl<
3541        D: fidl::encoding::ResourceDialect,
3542        T0: fidl::encoding::Encode<Ipv6MulticastMembership, D>,
3543    > fidl::encoding::Encode<BaseNetworkSocketDropIpv6MembershipRequest, D> for (T0,)
3544    {
3545        #[inline]
3546        unsafe fn encode(
3547            self,
3548            encoder: &mut fidl::encoding::Encoder<'_, D>,
3549            offset: usize,
3550            depth: fidl::encoding::Depth,
3551        ) -> fidl::Result<()> {
3552            encoder.debug_check_bounds::<BaseNetworkSocketDropIpv6MembershipRequest>(offset);
3553            // Zero out padding regions. There's no need to apply masks
3554            // because the unmasked parts will be overwritten by fields.
3555            // Write the fields.
3556            self.0.encode(encoder, offset + 0, depth)?;
3557            Ok(())
3558        }
3559    }
3560
3561    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3562        for BaseNetworkSocketDropIpv6MembershipRequest
3563    {
3564        #[inline(always)]
3565        fn new_empty() -> Self {
3566            Self { membership: fidl::new_empty!(Ipv6MulticastMembership, D) }
3567        }
3568
3569        #[inline]
3570        unsafe fn decode(
3571            &mut self,
3572            decoder: &mut fidl::encoding::Decoder<'_, D>,
3573            offset: usize,
3574            _depth: fidl::encoding::Depth,
3575        ) -> fidl::Result<()> {
3576            decoder.debug_check_bounds::<Self>(offset);
3577            // Verify that padding bytes are zero.
3578            fidl::decode!(
3579                Ipv6MulticastMembership,
3580                D,
3581                &mut self.membership,
3582                decoder,
3583                offset + 0,
3584                _depth
3585            )?;
3586            Ok(())
3587        }
3588    }
3589
3590    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastInterfaceRequest {
3591        type Borrowed<'a> = &'a Self;
3592        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3593            value
3594        }
3595    }
3596
3597    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastInterfaceRequest {
3598        type Owned = Self;
3599
3600        #[inline(always)]
3601        fn inline_align(_context: fidl::encoding::Context) -> usize {
3602            8
3603        }
3604
3605        #[inline(always)]
3606        fn inline_size(_context: fidl::encoding::Context) -> usize {
3607            16
3608        }
3609    }
3610
3611    unsafe impl<D: fidl::encoding::ResourceDialect>
3612        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastInterfaceRequest, D>
3613        for &BaseNetworkSocketSetIpMulticastInterfaceRequest
3614    {
3615        #[inline]
3616        unsafe fn encode(
3617            self,
3618            encoder: &mut fidl::encoding::Encoder<'_, D>,
3619            offset: usize,
3620            _depth: fidl::encoding::Depth,
3621        ) -> fidl::Result<()> {
3622            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastInterfaceRequest>(offset);
3623            // Delegate to tuple encoding.
3624            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastInterfaceRequest, D>::encode(
3625                (
3626                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
3627                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.address),
3628                ),
3629                encoder, offset, _depth
3630            )
3631        }
3632    }
3633    unsafe impl<
3634        D: fidl::encoding::ResourceDialect,
3635        T0: fidl::encoding::Encode<u64, D>,
3636        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
3637    > fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastInterfaceRequest, D> for (T0, T1)
3638    {
3639        #[inline]
3640        unsafe fn encode(
3641            self,
3642            encoder: &mut fidl::encoding::Encoder<'_, D>,
3643            offset: usize,
3644            depth: fidl::encoding::Depth,
3645        ) -> fidl::Result<()> {
3646            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastInterfaceRequest>(offset);
3647            // Zero out padding regions. There's no need to apply masks
3648            // because the unmasked parts will be overwritten by fields.
3649            unsafe {
3650                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3651                (ptr as *mut u64).write_unaligned(0);
3652            }
3653            // Write the fields.
3654            self.0.encode(encoder, offset + 0, depth)?;
3655            self.1.encode(encoder, offset + 8, depth)?;
3656            Ok(())
3657        }
3658    }
3659
3660    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3661        for BaseNetworkSocketSetIpMulticastInterfaceRequest
3662    {
3663        #[inline(always)]
3664        fn new_empty() -> Self {
3665            Self {
3666                iface: fidl::new_empty!(u64, D),
3667                address: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
3668            }
3669        }
3670
3671        #[inline]
3672        unsafe fn decode(
3673            &mut self,
3674            decoder: &mut fidl::encoding::Decoder<'_, D>,
3675            offset: usize,
3676            _depth: fidl::encoding::Depth,
3677        ) -> fidl::Result<()> {
3678            decoder.debug_check_bounds::<Self>(offset);
3679            // Verify that padding bytes are zero.
3680            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3681            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3682            let mask = 0xffffffff00000000u64;
3683            let maskedval = padval & mask;
3684            if maskedval != 0 {
3685                return Err(fidl::Error::NonZeroPadding {
3686                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3687                });
3688            }
3689            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
3690            fidl::decode!(
3691                fidl_fuchsia_net__common::Ipv4Address,
3692                D,
3693                &mut self.address,
3694                decoder,
3695                offset + 8,
3696                _depth
3697            )?;
3698            Ok(())
3699        }
3700    }
3701
3702    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastLoopbackRequest {
3703        type Borrowed<'a> = &'a Self;
3704        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3705            value
3706        }
3707    }
3708
3709    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastLoopbackRequest {
3710        type Owned = Self;
3711
3712        #[inline(always)]
3713        fn inline_align(_context: fidl::encoding::Context) -> usize {
3714            1
3715        }
3716
3717        #[inline(always)]
3718        fn inline_size(_context: fidl::encoding::Context) -> usize {
3719            1
3720        }
3721    }
3722
3723    unsafe impl<D: fidl::encoding::ResourceDialect>
3724        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastLoopbackRequest, D>
3725        for &BaseNetworkSocketSetIpMulticastLoopbackRequest
3726    {
3727        #[inline]
3728        unsafe fn encode(
3729            self,
3730            encoder: &mut fidl::encoding::Encoder<'_, D>,
3731            offset: usize,
3732            _depth: fidl::encoding::Depth,
3733        ) -> fidl::Result<()> {
3734            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastLoopbackRequest>(offset);
3735            // Delegate to tuple encoding.
3736            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastLoopbackRequest, D>::encode(
3737                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3738                encoder,
3739                offset,
3740                _depth,
3741            )
3742        }
3743    }
3744    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3745        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastLoopbackRequest, D> for (T0,)
3746    {
3747        #[inline]
3748        unsafe fn encode(
3749            self,
3750            encoder: &mut fidl::encoding::Encoder<'_, D>,
3751            offset: usize,
3752            depth: fidl::encoding::Depth,
3753        ) -> fidl::Result<()> {
3754            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastLoopbackRequest>(offset);
3755            // Zero out padding regions. There's no need to apply masks
3756            // because the unmasked parts will be overwritten by fields.
3757            // Write the fields.
3758            self.0.encode(encoder, offset + 0, depth)?;
3759            Ok(())
3760        }
3761    }
3762
3763    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3764        for BaseNetworkSocketSetIpMulticastLoopbackRequest
3765    {
3766        #[inline(always)]
3767        fn new_empty() -> Self {
3768            Self { value: fidl::new_empty!(bool, D) }
3769        }
3770
3771        #[inline]
3772        unsafe fn decode(
3773            &mut self,
3774            decoder: &mut fidl::encoding::Decoder<'_, D>,
3775            offset: usize,
3776            _depth: fidl::encoding::Depth,
3777        ) -> fidl::Result<()> {
3778            decoder.debug_check_bounds::<Self>(offset);
3779            // Verify that padding bytes are zero.
3780            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
3781            Ok(())
3782        }
3783    }
3784
3785    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastTtlRequest {
3786        type Borrowed<'a> = &'a Self;
3787        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3788            value
3789        }
3790    }
3791
3792    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastTtlRequest {
3793        type Owned = Self;
3794
3795        #[inline(always)]
3796        fn inline_align(_context: fidl::encoding::Context) -> usize {
3797            8
3798        }
3799
3800        #[inline(always)]
3801        fn inline_size(_context: fidl::encoding::Context) -> usize {
3802            16
3803        }
3804    }
3805
3806    unsafe impl<D: fidl::encoding::ResourceDialect>
3807        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastTtlRequest, D>
3808        for &BaseNetworkSocketSetIpMulticastTtlRequest
3809    {
3810        #[inline]
3811        unsafe fn encode(
3812            self,
3813            encoder: &mut fidl::encoding::Encoder<'_, D>,
3814            offset: usize,
3815            _depth: fidl::encoding::Depth,
3816        ) -> fidl::Result<()> {
3817            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastTtlRequest>(offset);
3818            // Delegate to tuple encoding.
3819            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastTtlRequest, D>::encode(
3820                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3821                encoder,
3822                offset,
3823                _depth,
3824            )
3825        }
3826    }
3827    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
3828        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastTtlRequest, D> for (T0,)
3829    {
3830        #[inline]
3831        unsafe fn encode(
3832            self,
3833            encoder: &mut fidl::encoding::Encoder<'_, D>,
3834            offset: usize,
3835            depth: fidl::encoding::Depth,
3836        ) -> fidl::Result<()> {
3837            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastTtlRequest>(offset);
3838            // Zero out padding regions. There's no need to apply masks
3839            // because the unmasked parts will be overwritten by fields.
3840            // Write the fields.
3841            self.0.encode(encoder, offset + 0, depth)?;
3842            Ok(())
3843        }
3844    }
3845
3846    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3847        for BaseNetworkSocketSetIpMulticastTtlRequest
3848    {
3849        #[inline(always)]
3850        fn new_empty() -> Self {
3851            Self { value: fidl::new_empty!(OptionalUint8, D) }
3852        }
3853
3854        #[inline]
3855        unsafe fn decode(
3856            &mut self,
3857            decoder: &mut fidl::encoding::Decoder<'_, D>,
3858            offset: usize,
3859            _depth: fidl::encoding::Depth,
3860        ) -> fidl::Result<()> {
3861            decoder.debug_check_bounds::<Self>(offset);
3862            // Verify that padding bytes are zero.
3863            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
3864            Ok(())
3865        }
3866    }
3867
3868    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpPacketInfoRequest {
3869        type Borrowed<'a> = &'a Self;
3870        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3871            value
3872        }
3873    }
3874
3875    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpPacketInfoRequest {
3876        type Owned = Self;
3877
3878        #[inline(always)]
3879        fn inline_align(_context: fidl::encoding::Context) -> usize {
3880            1
3881        }
3882
3883        #[inline(always)]
3884        fn inline_size(_context: fidl::encoding::Context) -> usize {
3885            1
3886        }
3887    }
3888
3889    unsafe impl<D: fidl::encoding::ResourceDialect>
3890        fidl::encoding::Encode<BaseNetworkSocketSetIpPacketInfoRequest, D>
3891        for &BaseNetworkSocketSetIpPacketInfoRequest
3892    {
3893        #[inline]
3894        unsafe fn encode(
3895            self,
3896            encoder: &mut fidl::encoding::Encoder<'_, D>,
3897            offset: usize,
3898            _depth: fidl::encoding::Depth,
3899        ) -> fidl::Result<()> {
3900            encoder.debug_check_bounds::<BaseNetworkSocketSetIpPacketInfoRequest>(offset);
3901            // Delegate to tuple encoding.
3902            fidl::encoding::Encode::<BaseNetworkSocketSetIpPacketInfoRequest, D>::encode(
3903                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3904                encoder,
3905                offset,
3906                _depth,
3907            )
3908        }
3909    }
3910    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3911        fidl::encoding::Encode<BaseNetworkSocketSetIpPacketInfoRequest, D> for (T0,)
3912    {
3913        #[inline]
3914        unsafe fn encode(
3915            self,
3916            encoder: &mut fidl::encoding::Encoder<'_, D>,
3917            offset: usize,
3918            depth: fidl::encoding::Depth,
3919        ) -> fidl::Result<()> {
3920            encoder.debug_check_bounds::<BaseNetworkSocketSetIpPacketInfoRequest>(offset);
3921            // Zero out padding regions. There's no need to apply masks
3922            // because the unmasked parts will be overwritten by fields.
3923            // Write the fields.
3924            self.0.encode(encoder, offset + 0, depth)?;
3925            Ok(())
3926        }
3927    }
3928
3929    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3930        for BaseNetworkSocketSetIpPacketInfoRequest
3931    {
3932        #[inline(always)]
3933        fn new_empty() -> Self {
3934            Self { value: fidl::new_empty!(bool, D) }
3935        }
3936
3937        #[inline]
3938        unsafe fn decode(
3939            &mut self,
3940            decoder: &mut fidl::encoding::Decoder<'_, D>,
3941            offset: usize,
3942            _depth: fidl::encoding::Depth,
3943        ) -> fidl::Result<()> {
3944            decoder.debug_check_bounds::<Self>(offset);
3945            // Verify that padding bytes are zero.
3946            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
3947            Ok(())
3948        }
3949    }
3950
3951    impl fidl::encoding::ValueTypeMarker
3952        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
3953    {
3954        type Borrowed<'a> = &'a Self;
3955        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3956            value
3957        }
3958    }
3959
3960    unsafe impl fidl::encoding::TypeMarker
3961        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
3962    {
3963        type Owned = Self;
3964
3965        #[inline(always)]
3966        fn inline_align(_context: fidl::encoding::Context) -> usize {
3967            1
3968        }
3969
3970        #[inline(always)]
3971        fn inline_size(_context: fidl::encoding::Context) -> usize {
3972            1
3973        }
3974    }
3975
3976    unsafe impl<D: fidl::encoding::ResourceDialect>
3977        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest, D>
3978        for &BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
3979    {
3980        #[inline]
3981        unsafe fn encode(
3982            self,
3983            encoder: &mut fidl::encoding::Encoder<'_, D>,
3984            offset: usize,
3985            _depth: fidl::encoding::Depth,
3986        ) -> fidl::Result<()> {
3987            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest>(offset);
3988            // Delegate to tuple encoding.
3989            fidl::encoding::Encode::<
3990                BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest,
3991                D,
3992            >::encode(
3993                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3994                encoder,
3995                offset,
3996                _depth,
3997            )
3998        }
3999    }
4000    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4001        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest, D>
4002        for (T0,)
4003    {
4004        #[inline]
4005        unsafe fn encode(
4006            self,
4007            encoder: &mut fidl::encoding::Encoder<'_, D>,
4008            offset: usize,
4009            depth: fidl::encoding::Depth,
4010        ) -> fidl::Result<()> {
4011            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest>(offset);
4012            // Zero out padding regions. There's no need to apply masks
4013            // because the unmasked parts will be overwritten by fields.
4014            // Write the fields.
4015            self.0.encode(encoder, offset + 0, depth)?;
4016            Ok(())
4017        }
4018    }
4019
4020    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4021        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
4022    {
4023        #[inline(always)]
4024        fn new_empty() -> Self {
4025            Self { value: fidl::new_empty!(bool, D) }
4026        }
4027
4028        #[inline]
4029        unsafe fn decode(
4030            &mut self,
4031            decoder: &mut fidl::encoding::Decoder<'_, D>,
4032            offset: usize,
4033            _depth: fidl::encoding::Depth,
4034        ) -> fidl::Result<()> {
4035            decoder.debug_check_bounds::<Self>(offset);
4036            // Verify that padding bytes are zero.
4037            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4038            Ok(())
4039        }
4040    }
4041
4042    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpReceiveTtlRequest {
4043        type Borrowed<'a> = &'a Self;
4044        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4045            value
4046        }
4047    }
4048
4049    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpReceiveTtlRequest {
4050        type Owned = Self;
4051
4052        #[inline(always)]
4053        fn inline_align(_context: fidl::encoding::Context) -> usize {
4054            1
4055        }
4056
4057        #[inline(always)]
4058        fn inline_size(_context: fidl::encoding::Context) -> usize {
4059            1
4060        }
4061    }
4062
4063    unsafe impl<D: fidl::encoding::ResourceDialect>
4064        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTtlRequest, D>
4065        for &BaseNetworkSocketSetIpReceiveTtlRequest
4066    {
4067        #[inline]
4068        unsafe fn encode(
4069            self,
4070            encoder: &mut fidl::encoding::Encoder<'_, D>,
4071            offset: usize,
4072            _depth: fidl::encoding::Depth,
4073        ) -> fidl::Result<()> {
4074            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTtlRequest>(offset);
4075            // Delegate to tuple encoding.
4076            fidl::encoding::Encode::<BaseNetworkSocketSetIpReceiveTtlRequest, D>::encode(
4077                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4078                encoder,
4079                offset,
4080                _depth,
4081            )
4082        }
4083    }
4084    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4085        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTtlRequest, D> for (T0,)
4086    {
4087        #[inline]
4088        unsafe fn encode(
4089            self,
4090            encoder: &mut fidl::encoding::Encoder<'_, D>,
4091            offset: usize,
4092            depth: fidl::encoding::Depth,
4093        ) -> fidl::Result<()> {
4094            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTtlRequest>(offset);
4095            // Zero out padding regions. There's no need to apply masks
4096            // because the unmasked parts will be overwritten by fields.
4097            // Write the fields.
4098            self.0.encode(encoder, offset + 0, depth)?;
4099            Ok(())
4100        }
4101    }
4102
4103    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4104        for BaseNetworkSocketSetIpReceiveTtlRequest
4105    {
4106        #[inline(always)]
4107        fn new_empty() -> Self {
4108            Self { value: fidl::new_empty!(bool, D) }
4109        }
4110
4111        #[inline]
4112        unsafe fn decode(
4113            &mut self,
4114            decoder: &mut fidl::encoding::Decoder<'_, D>,
4115            offset: usize,
4116            _depth: fidl::encoding::Depth,
4117        ) -> fidl::Result<()> {
4118            decoder.debug_check_bounds::<Self>(offset);
4119            // Verify that padding bytes are zero.
4120            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4121            Ok(())
4122        }
4123    }
4124
4125    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
4126        type Borrowed<'a> = &'a Self;
4127        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4128            value
4129        }
4130    }
4131
4132    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
4133        type Owned = Self;
4134
4135        #[inline(always)]
4136        fn inline_align(_context: fidl::encoding::Context) -> usize {
4137            1
4138        }
4139
4140        #[inline(always)]
4141        fn inline_size(_context: fidl::encoding::Context) -> usize {
4142            1
4143        }
4144    }
4145
4146    unsafe impl<D: fidl::encoding::ResourceDialect>
4147        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D>
4148        for &BaseNetworkSocketSetIpReceiveTypeOfServiceRequest
4149    {
4150        #[inline]
4151        unsafe fn encode(
4152            self,
4153            encoder: &mut fidl::encoding::Encoder<'_, D>,
4154            offset: usize,
4155            _depth: fidl::encoding::Depth,
4156        ) -> fidl::Result<()> {
4157            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest>(offset);
4158            // Delegate to tuple encoding.
4159            fidl::encoding::Encode::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D>::encode(
4160                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4161                encoder,
4162                offset,
4163                _depth,
4164            )
4165        }
4166    }
4167    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4168        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D> for (T0,)
4169    {
4170        #[inline]
4171        unsafe fn encode(
4172            self,
4173            encoder: &mut fidl::encoding::Encoder<'_, D>,
4174            offset: usize,
4175            depth: fidl::encoding::Depth,
4176        ) -> fidl::Result<()> {
4177            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest>(offset);
4178            // Zero out padding regions. There's no need to apply masks
4179            // because the unmasked parts will be overwritten by fields.
4180            // Write the fields.
4181            self.0.encode(encoder, offset + 0, depth)?;
4182            Ok(())
4183        }
4184    }
4185
4186    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4187        for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest
4188    {
4189        #[inline(always)]
4190        fn new_empty() -> Self {
4191            Self { value: fidl::new_empty!(bool, D) }
4192        }
4193
4194        #[inline]
4195        unsafe fn decode(
4196            &mut self,
4197            decoder: &mut fidl::encoding::Decoder<'_, D>,
4198            offset: usize,
4199            _depth: fidl::encoding::Depth,
4200        ) -> fidl::Result<()> {
4201            decoder.debug_check_bounds::<Self>(offset);
4202            // Verify that padding bytes are zero.
4203            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4204            Ok(())
4205        }
4206    }
4207
4208    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTransparentRequest {
4209        type Borrowed<'a> = &'a Self;
4210        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4211            value
4212        }
4213    }
4214
4215    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTransparentRequest {
4216        type Owned = Self;
4217
4218        #[inline(always)]
4219        fn inline_align(_context: fidl::encoding::Context) -> usize {
4220            1
4221        }
4222
4223        #[inline(always)]
4224        fn inline_size(_context: fidl::encoding::Context) -> usize {
4225            1
4226        }
4227    }
4228
4229    unsafe impl<D: fidl::encoding::ResourceDialect>
4230        fidl::encoding::Encode<BaseNetworkSocketSetIpTransparentRequest, D>
4231        for &BaseNetworkSocketSetIpTransparentRequest
4232    {
4233        #[inline]
4234        unsafe fn encode(
4235            self,
4236            encoder: &mut fidl::encoding::Encoder<'_, D>,
4237            offset: usize,
4238            _depth: fidl::encoding::Depth,
4239        ) -> fidl::Result<()> {
4240            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTransparentRequest>(offset);
4241            // Delegate to tuple encoding.
4242            fidl::encoding::Encode::<BaseNetworkSocketSetIpTransparentRequest, D>::encode(
4243                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4244                encoder,
4245                offset,
4246                _depth,
4247            )
4248        }
4249    }
4250    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4251        fidl::encoding::Encode<BaseNetworkSocketSetIpTransparentRequest, D> for (T0,)
4252    {
4253        #[inline]
4254        unsafe fn encode(
4255            self,
4256            encoder: &mut fidl::encoding::Encoder<'_, D>,
4257            offset: usize,
4258            depth: fidl::encoding::Depth,
4259        ) -> fidl::Result<()> {
4260            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTransparentRequest>(offset);
4261            // Zero out padding regions. There's no need to apply masks
4262            // because the unmasked parts will be overwritten by fields.
4263            // Write the fields.
4264            self.0.encode(encoder, offset + 0, depth)?;
4265            Ok(())
4266        }
4267    }
4268
4269    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4270        for BaseNetworkSocketSetIpTransparentRequest
4271    {
4272        #[inline(always)]
4273        fn new_empty() -> Self {
4274            Self { value: fidl::new_empty!(bool, D) }
4275        }
4276
4277        #[inline]
4278        unsafe fn decode(
4279            &mut self,
4280            decoder: &mut fidl::encoding::Decoder<'_, D>,
4281            offset: usize,
4282            _depth: fidl::encoding::Depth,
4283        ) -> fidl::Result<()> {
4284            decoder.debug_check_bounds::<Self>(offset);
4285            // Verify that padding bytes are zero.
4286            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4287            Ok(())
4288        }
4289    }
4290
4291    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTtlRequest {
4292        type Borrowed<'a> = &'a Self;
4293        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4294            value
4295        }
4296    }
4297
4298    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTtlRequest {
4299        type Owned = Self;
4300
4301        #[inline(always)]
4302        fn inline_align(_context: fidl::encoding::Context) -> usize {
4303            8
4304        }
4305
4306        #[inline(always)]
4307        fn inline_size(_context: fidl::encoding::Context) -> usize {
4308            16
4309        }
4310    }
4311
4312    unsafe impl<D: fidl::encoding::ResourceDialect>
4313        fidl::encoding::Encode<BaseNetworkSocketSetIpTtlRequest, D>
4314        for &BaseNetworkSocketSetIpTtlRequest
4315    {
4316        #[inline]
4317        unsafe fn encode(
4318            self,
4319            encoder: &mut fidl::encoding::Encoder<'_, D>,
4320            offset: usize,
4321            _depth: fidl::encoding::Depth,
4322        ) -> fidl::Result<()> {
4323            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTtlRequest>(offset);
4324            // Delegate to tuple encoding.
4325            fidl::encoding::Encode::<BaseNetworkSocketSetIpTtlRequest, D>::encode(
4326                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4327                encoder,
4328                offset,
4329                _depth,
4330            )
4331        }
4332    }
4333    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
4334        fidl::encoding::Encode<BaseNetworkSocketSetIpTtlRequest, D> for (T0,)
4335    {
4336        #[inline]
4337        unsafe fn encode(
4338            self,
4339            encoder: &mut fidl::encoding::Encoder<'_, D>,
4340            offset: usize,
4341            depth: fidl::encoding::Depth,
4342        ) -> fidl::Result<()> {
4343            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTtlRequest>(offset);
4344            // Zero out padding regions. There's no need to apply masks
4345            // because the unmasked parts will be overwritten by fields.
4346            // Write the fields.
4347            self.0.encode(encoder, offset + 0, depth)?;
4348            Ok(())
4349        }
4350    }
4351
4352    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4353        for BaseNetworkSocketSetIpTtlRequest
4354    {
4355        #[inline(always)]
4356        fn new_empty() -> Self {
4357            Self { value: fidl::new_empty!(OptionalUint8, D) }
4358        }
4359
4360        #[inline]
4361        unsafe fn decode(
4362            &mut self,
4363            decoder: &mut fidl::encoding::Decoder<'_, D>,
4364            offset: usize,
4365            _depth: fidl::encoding::Depth,
4366        ) -> fidl::Result<()> {
4367            decoder.debug_check_bounds::<Self>(offset);
4368            // Verify that padding bytes are zero.
4369            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
4370            Ok(())
4371        }
4372    }
4373
4374    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTypeOfServiceRequest {
4375        type Borrowed<'a> = &'a Self;
4376        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4377            value
4378        }
4379    }
4380
4381    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTypeOfServiceRequest {
4382        type Owned = Self;
4383
4384        #[inline(always)]
4385        fn inline_align(_context: fidl::encoding::Context) -> usize {
4386            1
4387        }
4388
4389        #[inline(always)]
4390        fn inline_size(_context: fidl::encoding::Context) -> usize {
4391            1
4392        }
4393        #[inline(always)]
4394        fn encode_is_copy() -> bool {
4395            true
4396        }
4397
4398        #[inline(always)]
4399        fn decode_is_copy() -> bool {
4400            true
4401        }
4402    }
4403
4404    unsafe impl<D: fidl::encoding::ResourceDialect>
4405        fidl::encoding::Encode<BaseNetworkSocketSetIpTypeOfServiceRequest, D>
4406        for &BaseNetworkSocketSetIpTypeOfServiceRequest
4407    {
4408        #[inline]
4409        unsafe fn encode(
4410            self,
4411            encoder: &mut fidl::encoding::Encoder<'_, D>,
4412            offset: usize,
4413            _depth: fidl::encoding::Depth,
4414        ) -> fidl::Result<()> {
4415            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTypeOfServiceRequest>(offset);
4416            unsafe {
4417                // Copy the object into the buffer.
4418                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4419                (buf_ptr as *mut BaseNetworkSocketSetIpTypeOfServiceRequest).write_unaligned(
4420                    (self as *const BaseNetworkSocketSetIpTypeOfServiceRequest).read(),
4421                );
4422                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4423                // done second because the memcpy will write garbage to these bytes.
4424            }
4425            Ok(())
4426        }
4427    }
4428    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
4429        fidl::encoding::Encode<BaseNetworkSocketSetIpTypeOfServiceRequest, D> for (T0,)
4430    {
4431        #[inline]
4432        unsafe fn encode(
4433            self,
4434            encoder: &mut fidl::encoding::Encoder<'_, D>,
4435            offset: usize,
4436            depth: fidl::encoding::Depth,
4437        ) -> fidl::Result<()> {
4438            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTypeOfServiceRequest>(offset);
4439            // Zero out padding regions. There's no need to apply masks
4440            // because the unmasked parts will be overwritten by fields.
4441            // Write the fields.
4442            self.0.encode(encoder, offset + 0, depth)?;
4443            Ok(())
4444        }
4445    }
4446
4447    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4448        for BaseNetworkSocketSetIpTypeOfServiceRequest
4449    {
4450        #[inline(always)]
4451        fn new_empty() -> Self {
4452            Self { value: fidl::new_empty!(u8, D) }
4453        }
4454
4455        #[inline]
4456        unsafe fn decode(
4457            &mut self,
4458            decoder: &mut fidl::encoding::Decoder<'_, D>,
4459            offset: usize,
4460            _depth: fidl::encoding::Depth,
4461        ) -> fidl::Result<()> {
4462            decoder.debug_check_bounds::<Self>(offset);
4463            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4464            // Verify that padding bytes are zero.
4465            // Copy from the buffer into the object.
4466            unsafe {
4467                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
4468            }
4469            Ok(())
4470        }
4471    }
4472
4473    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastHopsRequest {
4474        type Borrowed<'a> = &'a Self;
4475        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4476            value
4477        }
4478    }
4479
4480    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastHopsRequest {
4481        type Owned = Self;
4482
4483        #[inline(always)]
4484        fn inline_align(_context: fidl::encoding::Context) -> usize {
4485            8
4486        }
4487
4488        #[inline(always)]
4489        fn inline_size(_context: fidl::encoding::Context) -> usize {
4490            16
4491        }
4492    }
4493
4494    unsafe impl<D: fidl::encoding::ResourceDialect>
4495        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastHopsRequest, D>
4496        for &BaseNetworkSocketSetIpv6MulticastHopsRequest
4497    {
4498        #[inline]
4499        unsafe fn encode(
4500            self,
4501            encoder: &mut fidl::encoding::Encoder<'_, D>,
4502            offset: usize,
4503            _depth: fidl::encoding::Depth,
4504        ) -> fidl::Result<()> {
4505            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastHopsRequest>(offset);
4506            // Delegate to tuple encoding.
4507            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6MulticastHopsRequest, D>::encode(
4508                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4509                encoder,
4510                offset,
4511                _depth,
4512            )
4513        }
4514    }
4515    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
4516        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastHopsRequest, D> for (T0,)
4517    {
4518        #[inline]
4519        unsafe fn encode(
4520            self,
4521            encoder: &mut fidl::encoding::Encoder<'_, D>,
4522            offset: usize,
4523            depth: fidl::encoding::Depth,
4524        ) -> fidl::Result<()> {
4525            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastHopsRequest>(offset);
4526            // Zero out padding regions. There's no need to apply masks
4527            // because the unmasked parts will be overwritten by fields.
4528            // Write the fields.
4529            self.0.encode(encoder, offset + 0, depth)?;
4530            Ok(())
4531        }
4532    }
4533
4534    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4535        for BaseNetworkSocketSetIpv6MulticastHopsRequest
4536    {
4537        #[inline(always)]
4538        fn new_empty() -> Self {
4539            Self { value: fidl::new_empty!(OptionalUint8, D) }
4540        }
4541
4542        #[inline]
4543        unsafe fn decode(
4544            &mut self,
4545            decoder: &mut fidl::encoding::Decoder<'_, D>,
4546            offset: usize,
4547            _depth: fidl::encoding::Depth,
4548        ) -> fidl::Result<()> {
4549            decoder.debug_check_bounds::<Self>(offset);
4550            // Verify that padding bytes are zero.
4551            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
4552            Ok(())
4553        }
4554    }
4555
4556    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
4557        type Borrowed<'a> = &'a Self;
4558        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4559            value
4560        }
4561    }
4562
4563    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
4564        type Owned = Self;
4565
4566        #[inline(always)]
4567        fn inline_align(_context: fidl::encoding::Context) -> usize {
4568            8
4569        }
4570
4571        #[inline(always)]
4572        fn inline_size(_context: fidl::encoding::Context) -> usize {
4573            8
4574        }
4575        #[inline(always)]
4576        fn encode_is_copy() -> bool {
4577            true
4578        }
4579
4580        #[inline(always)]
4581        fn decode_is_copy() -> bool {
4582            true
4583        }
4584    }
4585
4586    unsafe impl<D: fidl::encoding::ResourceDialect>
4587        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastInterfaceRequest, D>
4588        for &BaseNetworkSocketSetIpv6MulticastInterfaceRequest
4589    {
4590        #[inline]
4591        unsafe fn encode(
4592            self,
4593            encoder: &mut fidl::encoding::Encoder<'_, D>,
4594            offset: usize,
4595            _depth: fidl::encoding::Depth,
4596        ) -> fidl::Result<()> {
4597            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastInterfaceRequest>(offset);
4598            unsafe {
4599                // Copy the object into the buffer.
4600                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4601                (buf_ptr as *mut BaseNetworkSocketSetIpv6MulticastInterfaceRequest)
4602                    .write_unaligned(
4603                        (self as *const BaseNetworkSocketSetIpv6MulticastInterfaceRequest).read(),
4604                    );
4605                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4606                // done second because the memcpy will write garbage to these bytes.
4607            }
4608            Ok(())
4609        }
4610    }
4611    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
4612        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastInterfaceRequest, D> for (T0,)
4613    {
4614        #[inline]
4615        unsafe fn encode(
4616            self,
4617            encoder: &mut fidl::encoding::Encoder<'_, D>,
4618            offset: usize,
4619            depth: fidl::encoding::Depth,
4620        ) -> fidl::Result<()> {
4621            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastInterfaceRequest>(offset);
4622            // Zero out padding regions. There's no need to apply masks
4623            // because the unmasked parts will be overwritten by fields.
4624            // Write the fields.
4625            self.0.encode(encoder, offset + 0, depth)?;
4626            Ok(())
4627        }
4628    }
4629
4630    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4631        for BaseNetworkSocketSetIpv6MulticastInterfaceRequest
4632    {
4633        #[inline(always)]
4634        fn new_empty() -> Self {
4635            Self { value: fidl::new_empty!(u64, D) }
4636        }
4637
4638        #[inline]
4639        unsafe fn decode(
4640            &mut self,
4641            decoder: &mut fidl::encoding::Decoder<'_, D>,
4642            offset: usize,
4643            _depth: fidl::encoding::Depth,
4644        ) -> fidl::Result<()> {
4645            decoder.debug_check_bounds::<Self>(offset);
4646            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4647            // Verify that padding bytes are zero.
4648            // Copy from the buffer into the object.
4649            unsafe {
4650                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4651            }
4652            Ok(())
4653        }
4654    }
4655
4656    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
4657        type Borrowed<'a> = &'a Self;
4658        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4659            value
4660        }
4661    }
4662
4663    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
4664        type Owned = Self;
4665
4666        #[inline(always)]
4667        fn inline_align(_context: fidl::encoding::Context) -> usize {
4668            1
4669        }
4670
4671        #[inline(always)]
4672        fn inline_size(_context: fidl::encoding::Context) -> usize {
4673            1
4674        }
4675    }
4676
4677    unsafe impl<D: fidl::encoding::ResourceDialect>
4678        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D>
4679        for &BaseNetworkSocketSetIpv6MulticastLoopbackRequest
4680    {
4681        #[inline]
4682        unsafe fn encode(
4683            self,
4684            encoder: &mut fidl::encoding::Encoder<'_, D>,
4685            offset: usize,
4686            _depth: fidl::encoding::Depth,
4687        ) -> fidl::Result<()> {
4688            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest>(offset);
4689            // Delegate to tuple encoding.
4690            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D>::encode(
4691                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4692                encoder,
4693                offset,
4694                _depth,
4695            )
4696        }
4697    }
4698    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4699        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D> for (T0,)
4700    {
4701        #[inline]
4702        unsafe fn encode(
4703            self,
4704            encoder: &mut fidl::encoding::Encoder<'_, D>,
4705            offset: usize,
4706            depth: fidl::encoding::Depth,
4707        ) -> fidl::Result<()> {
4708            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest>(offset);
4709            // Zero out padding regions. There's no need to apply masks
4710            // because the unmasked parts will be overwritten by fields.
4711            // Write the fields.
4712            self.0.encode(encoder, offset + 0, depth)?;
4713            Ok(())
4714        }
4715    }
4716
4717    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4718        for BaseNetworkSocketSetIpv6MulticastLoopbackRequest
4719    {
4720        #[inline(always)]
4721        fn new_empty() -> Self {
4722            Self { value: fidl::new_empty!(bool, D) }
4723        }
4724
4725        #[inline]
4726        unsafe fn decode(
4727            &mut self,
4728            decoder: &mut fidl::encoding::Decoder<'_, D>,
4729            offset: usize,
4730            _depth: fidl::encoding::Depth,
4731        ) -> fidl::Result<()> {
4732            decoder.debug_check_bounds::<Self>(offset);
4733            // Verify that padding bytes are zero.
4734            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4735            Ok(())
4736        }
4737    }
4738
4739    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6OnlyRequest {
4740        type Borrowed<'a> = &'a Self;
4741        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4742            value
4743        }
4744    }
4745
4746    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6OnlyRequest {
4747        type Owned = Self;
4748
4749        #[inline(always)]
4750        fn inline_align(_context: fidl::encoding::Context) -> usize {
4751            1
4752        }
4753
4754        #[inline(always)]
4755        fn inline_size(_context: fidl::encoding::Context) -> usize {
4756            1
4757        }
4758    }
4759
4760    unsafe impl<D: fidl::encoding::ResourceDialect>
4761        fidl::encoding::Encode<BaseNetworkSocketSetIpv6OnlyRequest, D>
4762        for &BaseNetworkSocketSetIpv6OnlyRequest
4763    {
4764        #[inline]
4765        unsafe fn encode(
4766            self,
4767            encoder: &mut fidl::encoding::Encoder<'_, D>,
4768            offset: usize,
4769            _depth: fidl::encoding::Depth,
4770        ) -> fidl::Result<()> {
4771            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6OnlyRequest>(offset);
4772            // Delegate to tuple encoding.
4773            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6OnlyRequest, D>::encode(
4774                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4775                encoder,
4776                offset,
4777                _depth,
4778            )
4779        }
4780    }
4781    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4782        fidl::encoding::Encode<BaseNetworkSocketSetIpv6OnlyRequest, D> for (T0,)
4783    {
4784        #[inline]
4785        unsafe fn encode(
4786            self,
4787            encoder: &mut fidl::encoding::Encoder<'_, D>,
4788            offset: usize,
4789            depth: fidl::encoding::Depth,
4790        ) -> fidl::Result<()> {
4791            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6OnlyRequest>(offset);
4792            // Zero out padding regions. There's no need to apply masks
4793            // because the unmasked parts will be overwritten by fields.
4794            // Write the fields.
4795            self.0.encode(encoder, offset + 0, depth)?;
4796            Ok(())
4797        }
4798    }
4799
4800    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4801        for BaseNetworkSocketSetIpv6OnlyRequest
4802    {
4803        #[inline(always)]
4804        fn new_empty() -> Self {
4805            Self { value: fidl::new_empty!(bool, D) }
4806        }
4807
4808        #[inline]
4809        unsafe fn decode(
4810            &mut self,
4811            decoder: &mut fidl::encoding::Decoder<'_, D>,
4812            offset: usize,
4813            _depth: fidl::encoding::Depth,
4814        ) -> fidl::Result<()> {
4815            decoder.debug_check_bounds::<Self>(offset);
4816            // Verify that padding bytes are zero.
4817            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4818            Ok(())
4819        }
4820    }
4821
4822    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
4823        type Borrowed<'a> = &'a Self;
4824        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4825            value
4826        }
4827    }
4828
4829    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
4830        type Owned = Self;
4831
4832        #[inline(always)]
4833        fn inline_align(_context: fidl::encoding::Context) -> usize {
4834            1
4835        }
4836
4837        #[inline(always)]
4838        fn inline_size(_context: fidl::encoding::Context) -> usize {
4839            1
4840        }
4841    }
4842
4843    unsafe impl<D: fidl::encoding::ResourceDialect>
4844        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D>
4845        for &BaseNetworkSocketSetIpv6ReceiveHopLimitRequest
4846    {
4847        #[inline]
4848        unsafe fn encode(
4849            self,
4850            encoder: &mut fidl::encoding::Encoder<'_, D>,
4851            offset: usize,
4852            _depth: fidl::encoding::Depth,
4853        ) -> fidl::Result<()> {
4854            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest>(offset);
4855            // Delegate to tuple encoding.
4856            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D>::encode(
4857                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4858                encoder,
4859                offset,
4860                _depth,
4861            )
4862        }
4863    }
4864    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4865        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D> for (T0,)
4866    {
4867        #[inline]
4868        unsafe fn encode(
4869            self,
4870            encoder: &mut fidl::encoding::Encoder<'_, D>,
4871            offset: usize,
4872            depth: fidl::encoding::Depth,
4873        ) -> fidl::Result<()> {
4874            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest>(offset);
4875            // Zero out padding regions. There's no need to apply masks
4876            // because the unmasked parts will be overwritten by fields.
4877            // Write the fields.
4878            self.0.encode(encoder, offset + 0, depth)?;
4879            Ok(())
4880        }
4881    }
4882
4883    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4884        for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest
4885    {
4886        #[inline(always)]
4887        fn new_empty() -> Self {
4888            Self { value: fidl::new_empty!(bool, D) }
4889        }
4890
4891        #[inline]
4892        unsafe fn decode(
4893            &mut self,
4894            decoder: &mut fidl::encoding::Decoder<'_, D>,
4895            offset: usize,
4896            _depth: fidl::encoding::Depth,
4897        ) -> fidl::Result<()> {
4898            decoder.debug_check_bounds::<Self>(offset);
4899            // Verify that padding bytes are zero.
4900            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4901            Ok(())
4902        }
4903    }
4904
4905    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
4906        type Borrowed<'a> = &'a Self;
4907        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4908            value
4909        }
4910    }
4911
4912    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
4913        type Owned = Self;
4914
4915        #[inline(always)]
4916        fn inline_align(_context: fidl::encoding::Context) -> usize {
4917            1
4918        }
4919
4920        #[inline(always)]
4921        fn inline_size(_context: fidl::encoding::Context) -> usize {
4922            1
4923        }
4924    }
4925
4926    unsafe impl<D: fidl::encoding::ResourceDialect>
4927        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D>
4928        for &BaseNetworkSocketSetIpv6ReceivePacketInfoRequest
4929    {
4930        #[inline]
4931        unsafe fn encode(
4932            self,
4933            encoder: &mut fidl::encoding::Encoder<'_, D>,
4934            offset: usize,
4935            _depth: fidl::encoding::Depth,
4936        ) -> fidl::Result<()> {
4937            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest>(offset);
4938            // Delegate to tuple encoding.
4939            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D>::encode(
4940                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4941                encoder,
4942                offset,
4943                _depth,
4944            )
4945        }
4946    }
4947    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4948        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D> for (T0,)
4949    {
4950        #[inline]
4951        unsafe fn encode(
4952            self,
4953            encoder: &mut fidl::encoding::Encoder<'_, D>,
4954            offset: usize,
4955            depth: fidl::encoding::Depth,
4956        ) -> fidl::Result<()> {
4957            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest>(offset);
4958            // Zero out padding regions. There's no need to apply masks
4959            // because the unmasked parts will be overwritten by fields.
4960            // Write the fields.
4961            self.0.encode(encoder, offset + 0, depth)?;
4962            Ok(())
4963        }
4964    }
4965
4966    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4967        for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest
4968    {
4969        #[inline(always)]
4970        fn new_empty() -> Self {
4971            Self { value: fidl::new_empty!(bool, D) }
4972        }
4973
4974        #[inline]
4975        unsafe fn decode(
4976            &mut self,
4977            decoder: &mut fidl::encoding::Decoder<'_, D>,
4978            offset: usize,
4979            _depth: fidl::encoding::Depth,
4980        ) -> fidl::Result<()> {
4981            decoder.debug_check_bounds::<Self>(offset);
4982            // Verify that padding bytes are zero.
4983            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4984            Ok(())
4985        }
4986    }
4987
4988    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
4989        type Borrowed<'a> = &'a Self;
4990        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4991            value
4992        }
4993    }
4994
4995    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
4996        type Owned = Self;
4997
4998        #[inline(always)]
4999        fn inline_align(_context: fidl::encoding::Context) -> usize {
5000            1
5001        }
5002
5003        #[inline(always)]
5004        fn inline_size(_context: fidl::encoding::Context) -> usize {
5005            1
5006        }
5007    }
5008
5009    unsafe impl<D: fidl::encoding::ResourceDialect>
5010        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D>
5011        for &BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest
5012    {
5013        #[inline]
5014        unsafe fn encode(
5015            self,
5016            encoder: &mut fidl::encoding::Encoder<'_, D>,
5017            offset: usize,
5018            _depth: fidl::encoding::Depth,
5019        ) -> fidl::Result<()> {
5020            encoder
5021                .debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest>(offset);
5022            // Delegate to tuple encoding.
5023            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D>::encode(
5024                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5025                encoder,
5026                offset,
5027                _depth,
5028            )
5029        }
5030    }
5031    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5032        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D> for (T0,)
5033    {
5034        #[inline]
5035        unsafe fn encode(
5036            self,
5037            encoder: &mut fidl::encoding::Encoder<'_, D>,
5038            offset: usize,
5039            depth: fidl::encoding::Depth,
5040        ) -> fidl::Result<()> {
5041            encoder
5042                .debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest>(offset);
5043            // Zero out padding regions. There's no need to apply masks
5044            // because the unmasked parts will be overwritten by fields.
5045            // Write the fields.
5046            self.0.encode(encoder, offset + 0, depth)?;
5047            Ok(())
5048        }
5049    }
5050
5051    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5052        for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest
5053    {
5054        #[inline(always)]
5055        fn new_empty() -> Self {
5056            Self { value: fidl::new_empty!(bool, D) }
5057        }
5058
5059        #[inline]
5060        unsafe fn decode(
5061            &mut self,
5062            decoder: &mut fidl::encoding::Decoder<'_, D>,
5063            offset: usize,
5064            _depth: fidl::encoding::Depth,
5065        ) -> fidl::Result<()> {
5066            decoder.debug_check_bounds::<Self>(offset);
5067            // Verify that padding bytes are zero.
5068            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5069            Ok(())
5070        }
5071    }
5072
5073    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6TrafficClassRequest {
5074        type Borrowed<'a> = &'a Self;
5075        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5076            value
5077        }
5078    }
5079
5080    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6TrafficClassRequest {
5081        type Owned = Self;
5082
5083        #[inline(always)]
5084        fn inline_align(_context: fidl::encoding::Context) -> usize {
5085            8
5086        }
5087
5088        #[inline(always)]
5089        fn inline_size(_context: fidl::encoding::Context) -> usize {
5090            16
5091        }
5092    }
5093
5094    unsafe impl<D: fidl::encoding::ResourceDialect>
5095        fidl::encoding::Encode<BaseNetworkSocketSetIpv6TrafficClassRequest, D>
5096        for &BaseNetworkSocketSetIpv6TrafficClassRequest
5097    {
5098        #[inline]
5099        unsafe fn encode(
5100            self,
5101            encoder: &mut fidl::encoding::Encoder<'_, D>,
5102            offset: usize,
5103            _depth: fidl::encoding::Depth,
5104        ) -> fidl::Result<()> {
5105            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6TrafficClassRequest>(offset);
5106            // Delegate to tuple encoding.
5107            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6TrafficClassRequest, D>::encode(
5108                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5109                encoder,
5110                offset,
5111                _depth,
5112            )
5113        }
5114    }
5115    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
5116        fidl::encoding::Encode<BaseNetworkSocketSetIpv6TrafficClassRequest, D> for (T0,)
5117    {
5118        #[inline]
5119        unsafe fn encode(
5120            self,
5121            encoder: &mut fidl::encoding::Encoder<'_, D>,
5122            offset: usize,
5123            depth: fidl::encoding::Depth,
5124        ) -> fidl::Result<()> {
5125            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6TrafficClassRequest>(offset);
5126            // Zero out padding regions. There's no need to apply masks
5127            // because the unmasked parts will be overwritten by fields.
5128            // Write the fields.
5129            self.0.encode(encoder, offset + 0, depth)?;
5130            Ok(())
5131        }
5132    }
5133
5134    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5135        for BaseNetworkSocketSetIpv6TrafficClassRequest
5136    {
5137        #[inline(always)]
5138        fn new_empty() -> Self {
5139            Self { value: fidl::new_empty!(OptionalUint8, D) }
5140        }
5141
5142        #[inline]
5143        unsafe fn decode(
5144            &mut self,
5145            decoder: &mut fidl::encoding::Decoder<'_, D>,
5146            offset: usize,
5147            _depth: fidl::encoding::Depth,
5148        ) -> fidl::Result<()> {
5149            decoder.debug_check_bounds::<Self>(offset);
5150            // Verify that padding bytes are zero.
5151            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
5152            Ok(())
5153        }
5154    }
5155
5156    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6UnicastHopsRequest {
5157        type Borrowed<'a> = &'a Self;
5158        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5159            value
5160        }
5161    }
5162
5163    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6UnicastHopsRequest {
5164        type Owned = Self;
5165
5166        #[inline(always)]
5167        fn inline_align(_context: fidl::encoding::Context) -> usize {
5168            8
5169        }
5170
5171        #[inline(always)]
5172        fn inline_size(_context: fidl::encoding::Context) -> usize {
5173            16
5174        }
5175    }
5176
5177    unsafe impl<D: fidl::encoding::ResourceDialect>
5178        fidl::encoding::Encode<BaseNetworkSocketSetIpv6UnicastHopsRequest, D>
5179        for &BaseNetworkSocketSetIpv6UnicastHopsRequest
5180    {
5181        #[inline]
5182        unsafe fn encode(
5183            self,
5184            encoder: &mut fidl::encoding::Encoder<'_, D>,
5185            offset: usize,
5186            _depth: fidl::encoding::Depth,
5187        ) -> fidl::Result<()> {
5188            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6UnicastHopsRequest>(offset);
5189            // Delegate to tuple encoding.
5190            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6UnicastHopsRequest, D>::encode(
5191                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5192                encoder,
5193                offset,
5194                _depth,
5195            )
5196        }
5197    }
5198    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
5199        fidl::encoding::Encode<BaseNetworkSocketSetIpv6UnicastHopsRequest, D> for (T0,)
5200    {
5201        #[inline]
5202        unsafe fn encode(
5203            self,
5204            encoder: &mut fidl::encoding::Encoder<'_, D>,
5205            offset: usize,
5206            depth: fidl::encoding::Depth,
5207        ) -> fidl::Result<()> {
5208            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6UnicastHopsRequest>(offset);
5209            // Zero out padding regions. There's no need to apply masks
5210            // because the unmasked parts will be overwritten by fields.
5211            // Write the fields.
5212            self.0.encode(encoder, offset + 0, depth)?;
5213            Ok(())
5214        }
5215    }
5216
5217    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5218        for BaseNetworkSocketSetIpv6UnicastHopsRequest
5219    {
5220        #[inline(always)]
5221        fn new_empty() -> Self {
5222            Self { value: fidl::new_empty!(OptionalUint8, D) }
5223        }
5224
5225        #[inline]
5226        unsafe fn decode(
5227            &mut self,
5228            decoder: &mut fidl::encoding::Decoder<'_, D>,
5229            offset: usize,
5230            _depth: fidl::encoding::Depth,
5231        ) -> fidl::Result<()> {
5232            decoder.debug_check_bounds::<Self>(offset);
5233            // Verify that padding bytes are zero.
5234            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
5235            Ok(())
5236        }
5237    }
5238
5239    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketShutdownRequest {
5240        type Borrowed<'a> = &'a Self;
5241        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5242            value
5243        }
5244    }
5245
5246    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketShutdownRequest {
5247        type Owned = Self;
5248
5249        #[inline(always)]
5250        fn inline_align(_context: fidl::encoding::Context) -> usize {
5251            2
5252        }
5253
5254        #[inline(always)]
5255        fn inline_size(_context: fidl::encoding::Context) -> usize {
5256            2
5257        }
5258    }
5259
5260    unsafe impl<D: fidl::encoding::ResourceDialect>
5261        fidl::encoding::Encode<BaseNetworkSocketShutdownRequest, D>
5262        for &BaseNetworkSocketShutdownRequest
5263    {
5264        #[inline]
5265        unsafe fn encode(
5266            self,
5267            encoder: &mut fidl::encoding::Encoder<'_, D>,
5268            offset: usize,
5269            _depth: fidl::encoding::Depth,
5270        ) -> fidl::Result<()> {
5271            encoder.debug_check_bounds::<BaseNetworkSocketShutdownRequest>(offset);
5272            // Delegate to tuple encoding.
5273            fidl::encoding::Encode::<BaseNetworkSocketShutdownRequest, D>::encode(
5274                (<ShutdownMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),),
5275                encoder,
5276                offset,
5277                _depth,
5278            )
5279        }
5280    }
5281    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ShutdownMode, D>>
5282        fidl::encoding::Encode<BaseNetworkSocketShutdownRequest, D> for (T0,)
5283    {
5284        #[inline]
5285        unsafe fn encode(
5286            self,
5287            encoder: &mut fidl::encoding::Encoder<'_, D>,
5288            offset: usize,
5289            depth: fidl::encoding::Depth,
5290        ) -> fidl::Result<()> {
5291            encoder.debug_check_bounds::<BaseNetworkSocketShutdownRequest>(offset);
5292            // Zero out padding regions. There's no need to apply masks
5293            // because the unmasked parts will be overwritten by fields.
5294            // Write the fields.
5295            self.0.encode(encoder, offset + 0, depth)?;
5296            Ok(())
5297        }
5298    }
5299
5300    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5301        for BaseNetworkSocketShutdownRequest
5302    {
5303        #[inline(always)]
5304        fn new_empty() -> Self {
5305            Self { mode: fidl::new_empty!(ShutdownMode, D) }
5306        }
5307
5308        #[inline]
5309        unsafe fn decode(
5310            &mut self,
5311            decoder: &mut fidl::encoding::Decoder<'_, D>,
5312            offset: usize,
5313            _depth: fidl::encoding::Depth,
5314        ) -> fidl::Result<()> {
5315            decoder.debug_check_bounds::<Self>(offset);
5316            // Verify that padding bytes are zero.
5317            fidl::decode!(ShutdownMode, D, &mut self.mode, decoder, offset + 0, _depth)?;
5318            Ok(())
5319        }
5320    }
5321
5322    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastInterfaceResponse {
5323        type Borrowed<'a> = &'a Self;
5324        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5325            value
5326        }
5327    }
5328
5329    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastInterfaceResponse {
5330        type Owned = Self;
5331
5332        #[inline(always)]
5333        fn inline_align(_context: fidl::encoding::Context) -> usize {
5334            1
5335        }
5336
5337        #[inline(always)]
5338        fn inline_size(_context: fidl::encoding::Context) -> usize {
5339            4
5340        }
5341    }
5342
5343    unsafe impl<D: fidl::encoding::ResourceDialect>
5344        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastInterfaceResponse, D>
5345        for &BaseNetworkSocketGetIpMulticastInterfaceResponse
5346    {
5347        #[inline]
5348        unsafe fn encode(
5349            self,
5350            encoder: &mut fidl::encoding::Encoder<'_, D>,
5351            offset: usize,
5352            _depth: fidl::encoding::Depth,
5353        ) -> fidl::Result<()> {
5354            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastInterfaceResponse>(offset);
5355            // Delegate to tuple encoding.
5356            fidl::encoding::Encode::<BaseNetworkSocketGetIpMulticastInterfaceResponse, D>::encode(
5357                (
5358                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
5359                ),
5360                encoder, offset, _depth
5361            )
5362        }
5363    }
5364    unsafe impl<
5365        D: fidl::encoding::ResourceDialect,
5366        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
5367    > fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastInterfaceResponse, D> for (T0,)
5368    {
5369        #[inline]
5370        unsafe fn encode(
5371            self,
5372            encoder: &mut fidl::encoding::Encoder<'_, D>,
5373            offset: usize,
5374            depth: fidl::encoding::Depth,
5375        ) -> fidl::Result<()> {
5376            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastInterfaceResponse>(offset);
5377            // Zero out padding regions. There's no need to apply masks
5378            // because the unmasked parts will be overwritten by fields.
5379            // Write the fields.
5380            self.0.encode(encoder, offset + 0, depth)?;
5381            Ok(())
5382        }
5383    }
5384
5385    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5386        for BaseNetworkSocketGetIpMulticastInterfaceResponse
5387    {
5388        #[inline(always)]
5389        fn new_empty() -> Self {
5390            Self { value: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D) }
5391        }
5392
5393        #[inline]
5394        unsafe fn decode(
5395            &mut self,
5396            decoder: &mut fidl::encoding::Decoder<'_, D>,
5397            offset: usize,
5398            _depth: fidl::encoding::Depth,
5399        ) -> fidl::Result<()> {
5400            decoder.debug_check_bounds::<Self>(offset);
5401            // Verify that padding bytes are zero.
5402            fidl::decode!(
5403                fidl_fuchsia_net__common::Ipv4Address,
5404                D,
5405                &mut self.value,
5406                decoder,
5407                offset + 0,
5408                _depth
5409            )?;
5410            Ok(())
5411        }
5412    }
5413
5414    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastLoopbackResponse {
5415        type Borrowed<'a> = &'a Self;
5416        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5417            value
5418        }
5419    }
5420
5421    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastLoopbackResponse {
5422        type Owned = Self;
5423
5424        #[inline(always)]
5425        fn inline_align(_context: fidl::encoding::Context) -> usize {
5426            1
5427        }
5428
5429        #[inline(always)]
5430        fn inline_size(_context: fidl::encoding::Context) -> usize {
5431            1
5432        }
5433    }
5434
5435    unsafe impl<D: fidl::encoding::ResourceDialect>
5436        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastLoopbackResponse, D>
5437        for &BaseNetworkSocketGetIpMulticastLoopbackResponse
5438    {
5439        #[inline]
5440        unsafe fn encode(
5441            self,
5442            encoder: &mut fidl::encoding::Encoder<'_, D>,
5443            offset: usize,
5444            _depth: fidl::encoding::Depth,
5445        ) -> fidl::Result<()> {
5446            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastLoopbackResponse>(offset);
5447            // Delegate to tuple encoding.
5448            fidl::encoding::Encode::<BaseNetworkSocketGetIpMulticastLoopbackResponse, D>::encode(
5449                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5450                encoder,
5451                offset,
5452                _depth,
5453            )
5454        }
5455    }
5456    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5457        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastLoopbackResponse, D> for (T0,)
5458    {
5459        #[inline]
5460        unsafe fn encode(
5461            self,
5462            encoder: &mut fidl::encoding::Encoder<'_, D>,
5463            offset: usize,
5464            depth: fidl::encoding::Depth,
5465        ) -> fidl::Result<()> {
5466            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastLoopbackResponse>(offset);
5467            // Zero out padding regions. There's no need to apply masks
5468            // because the unmasked parts will be overwritten by fields.
5469            // Write the fields.
5470            self.0.encode(encoder, offset + 0, depth)?;
5471            Ok(())
5472        }
5473    }
5474
5475    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5476        for BaseNetworkSocketGetIpMulticastLoopbackResponse
5477    {
5478        #[inline(always)]
5479        fn new_empty() -> Self {
5480            Self { value: fidl::new_empty!(bool, D) }
5481        }
5482
5483        #[inline]
5484        unsafe fn decode(
5485            &mut self,
5486            decoder: &mut fidl::encoding::Decoder<'_, D>,
5487            offset: usize,
5488            _depth: fidl::encoding::Depth,
5489        ) -> fidl::Result<()> {
5490            decoder.debug_check_bounds::<Self>(offset);
5491            // Verify that padding bytes are zero.
5492            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5493            Ok(())
5494        }
5495    }
5496
5497    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastTtlResponse {
5498        type Borrowed<'a> = &'a Self;
5499        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5500            value
5501        }
5502    }
5503
5504    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastTtlResponse {
5505        type Owned = Self;
5506
5507        #[inline(always)]
5508        fn inline_align(_context: fidl::encoding::Context) -> usize {
5509            1
5510        }
5511
5512        #[inline(always)]
5513        fn inline_size(_context: fidl::encoding::Context) -> usize {
5514            1
5515        }
5516        #[inline(always)]
5517        fn encode_is_copy() -> bool {
5518            true
5519        }
5520
5521        #[inline(always)]
5522        fn decode_is_copy() -> bool {
5523            true
5524        }
5525    }
5526
5527    unsafe impl<D: fidl::encoding::ResourceDialect>
5528        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastTtlResponse, D>
5529        for &BaseNetworkSocketGetIpMulticastTtlResponse
5530    {
5531        #[inline]
5532        unsafe fn encode(
5533            self,
5534            encoder: &mut fidl::encoding::Encoder<'_, D>,
5535            offset: usize,
5536            _depth: fidl::encoding::Depth,
5537        ) -> fidl::Result<()> {
5538            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastTtlResponse>(offset);
5539            unsafe {
5540                // Copy the object into the buffer.
5541                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5542                (buf_ptr as *mut BaseNetworkSocketGetIpMulticastTtlResponse).write_unaligned(
5543                    (self as *const BaseNetworkSocketGetIpMulticastTtlResponse).read(),
5544                );
5545                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5546                // done second because the memcpy will write garbage to these bytes.
5547            }
5548            Ok(())
5549        }
5550    }
5551    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
5552        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastTtlResponse, D> for (T0,)
5553    {
5554        #[inline]
5555        unsafe fn encode(
5556            self,
5557            encoder: &mut fidl::encoding::Encoder<'_, D>,
5558            offset: usize,
5559            depth: fidl::encoding::Depth,
5560        ) -> fidl::Result<()> {
5561            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastTtlResponse>(offset);
5562            // Zero out padding regions. There's no need to apply masks
5563            // because the unmasked parts will be overwritten by fields.
5564            // Write the fields.
5565            self.0.encode(encoder, offset + 0, depth)?;
5566            Ok(())
5567        }
5568    }
5569
5570    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5571        for BaseNetworkSocketGetIpMulticastTtlResponse
5572    {
5573        #[inline(always)]
5574        fn new_empty() -> Self {
5575            Self { value: fidl::new_empty!(u8, D) }
5576        }
5577
5578        #[inline]
5579        unsafe fn decode(
5580            &mut self,
5581            decoder: &mut fidl::encoding::Decoder<'_, D>,
5582            offset: usize,
5583            _depth: fidl::encoding::Depth,
5584        ) -> fidl::Result<()> {
5585            decoder.debug_check_bounds::<Self>(offset);
5586            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5587            // Verify that padding bytes are zero.
5588            // Copy from the buffer into the object.
5589            unsafe {
5590                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
5591            }
5592            Ok(())
5593        }
5594    }
5595
5596    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpPacketInfoResponse {
5597        type Borrowed<'a> = &'a Self;
5598        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5599            value
5600        }
5601    }
5602
5603    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpPacketInfoResponse {
5604        type Owned = Self;
5605
5606        #[inline(always)]
5607        fn inline_align(_context: fidl::encoding::Context) -> usize {
5608            1
5609        }
5610
5611        #[inline(always)]
5612        fn inline_size(_context: fidl::encoding::Context) -> usize {
5613            1
5614        }
5615    }
5616
5617    unsafe impl<D: fidl::encoding::ResourceDialect>
5618        fidl::encoding::Encode<BaseNetworkSocketGetIpPacketInfoResponse, D>
5619        for &BaseNetworkSocketGetIpPacketInfoResponse
5620    {
5621        #[inline]
5622        unsafe fn encode(
5623            self,
5624            encoder: &mut fidl::encoding::Encoder<'_, D>,
5625            offset: usize,
5626            _depth: fidl::encoding::Depth,
5627        ) -> fidl::Result<()> {
5628            encoder.debug_check_bounds::<BaseNetworkSocketGetIpPacketInfoResponse>(offset);
5629            // Delegate to tuple encoding.
5630            fidl::encoding::Encode::<BaseNetworkSocketGetIpPacketInfoResponse, D>::encode(
5631                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5632                encoder,
5633                offset,
5634                _depth,
5635            )
5636        }
5637    }
5638    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5639        fidl::encoding::Encode<BaseNetworkSocketGetIpPacketInfoResponse, D> for (T0,)
5640    {
5641        #[inline]
5642        unsafe fn encode(
5643            self,
5644            encoder: &mut fidl::encoding::Encoder<'_, D>,
5645            offset: usize,
5646            depth: fidl::encoding::Depth,
5647        ) -> fidl::Result<()> {
5648            encoder.debug_check_bounds::<BaseNetworkSocketGetIpPacketInfoResponse>(offset);
5649            // Zero out padding regions. There's no need to apply masks
5650            // because the unmasked parts will be overwritten by fields.
5651            // Write the fields.
5652            self.0.encode(encoder, offset + 0, depth)?;
5653            Ok(())
5654        }
5655    }
5656
5657    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5658        for BaseNetworkSocketGetIpPacketInfoResponse
5659    {
5660        #[inline(always)]
5661        fn new_empty() -> Self {
5662            Self { value: fidl::new_empty!(bool, D) }
5663        }
5664
5665        #[inline]
5666        unsafe fn decode(
5667            &mut self,
5668            decoder: &mut fidl::encoding::Decoder<'_, D>,
5669            offset: usize,
5670            _depth: fidl::encoding::Depth,
5671        ) -> fidl::Result<()> {
5672            decoder.debug_check_bounds::<Self>(offset);
5673            // Verify that padding bytes are zero.
5674            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5675            Ok(())
5676        }
5677    }
5678
5679    impl fidl::encoding::ValueTypeMarker
5680        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5681    {
5682        type Borrowed<'a> = &'a Self;
5683        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5684            value
5685        }
5686    }
5687
5688    unsafe impl fidl::encoding::TypeMarker
5689        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5690    {
5691        type Owned = Self;
5692
5693        #[inline(always)]
5694        fn inline_align(_context: fidl::encoding::Context) -> usize {
5695            1
5696        }
5697
5698        #[inline(always)]
5699        fn inline_size(_context: fidl::encoding::Context) -> usize {
5700            1
5701        }
5702    }
5703
5704    unsafe impl<D: fidl::encoding::ResourceDialect>
5705        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse, D>
5706        for &BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5707    {
5708        #[inline]
5709        unsafe fn encode(
5710            self,
5711            encoder: &mut fidl::encoding::Encoder<'_, D>,
5712            offset: usize,
5713            _depth: fidl::encoding::Depth,
5714        ) -> fidl::Result<()> {
5715            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse>(offset);
5716            // Delegate to tuple encoding.
5717            fidl::encoding::Encode::<
5718                BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse,
5719                D,
5720            >::encode(
5721                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5722                encoder,
5723                offset,
5724                _depth,
5725            )
5726        }
5727    }
5728    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5729        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse, D>
5730        for (T0,)
5731    {
5732        #[inline]
5733        unsafe fn encode(
5734            self,
5735            encoder: &mut fidl::encoding::Encoder<'_, D>,
5736            offset: usize,
5737            depth: fidl::encoding::Depth,
5738        ) -> fidl::Result<()> {
5739            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse>(offset);
5740            // Zero out padding regions. There's no need to apply masks
5741            // because the unmasked parts will be overwritten by fields.
5742            // Write the fields.
5743            self.0.encode(encoder, offset + 0, depth)?;
5744            Ok(())
5745        }
5746    }
5747
5748    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5749        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5750    {
5751        #[inline(always)]
5752        fn new_empty() -> Self {
5753            Self { value: fidl::new_empty!(bool, D) }
5754        }
5755
5756        #[inline]
5757        unsafe fn decode(
5758            &mut self,
5759            decoder: &mut fidl::encoding::Decoder<'_, D>,
5760            offset: usize,
5761            _depth: fidl::encoding::Depth,
5762        ) -> fidl::Result<()> {
5763            decoder.debug_check_bounds::<Self>(offset);
5764            // Verify that padding bytes are zero.
5765            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5766            Ok(())
5767        }
5768    }
5769
5770    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpReceiveTtlResponse {
5771        type Borrowed<'a> = &'a Self;
5772        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5773            value
5774        }
5775    }
5776
5777    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpReceiveTtlResponse {
5778        type Owned = Self;
5779
5780        #[inline(always)]
5781        fn inline_align(_context: fidl::encoding::Context) -> usize {
5782            1
5783        }
5784
5785        #[inline(always)]
5786        fn inline_size(_context: fidl::encoding::Context) -> usize {
5787            1
5788        }
5789    }
5790
5791    unsafe impl<D: fidl::encoding::ResourceDialect>
5792        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTtlResponse, D>
5793        for &BaseNetworkSocketGetIpReceiveTtlResponse
5794    {
5795        #[inline]
5796        unsafe fn encode(
5797            self,
5798            encoder: &mut fidl::encoding::Encoder<'_, D>,
5799            offset: usize,
5800            _depth: fidl::encoding::Depth,
5801        ) -> fidl::Result<()> {
5802            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveTtlResponse>(offset);
5803            // Delegate to tuple encoding.
5804            fidl::encoding::Encode::<BaseNetworkSocketGetIpReceiveTtlResponse, D>::encode(
5805                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5806                encoder,
5807                offset,
5808                _depth,
5809            )
5810        }
5811    }
5812    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5813        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTtlResponse, D> for (T0,)
5814    {
5815        #[inline]
5816        unsafe fn encode(
5817            self,
5818            encoder: &mut fidl::encoding::Encoder<'_, D>,
5819            offset: usize,
5820            depth: fidl::encoding::Depth,
5821        ) -> fidl::Result<()> {
5822            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveTtlResponse>(offset);
5823            // Zero out padding regions. There's no need to apply masks
5824            // because the unmasked parts will be overwritten by fields.
5825            // Write the fields.
5826            self.0.encode(encoder, offset + 0, depth)?;
5827            Ok(())
5828        }
5829    }
5830
5831    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5832        for BaseNetworkSocketGetIpReceiveTtlResponse
5833    {
5834        #[inline(always)]
5835        fn new_empty() -> Self {
5836            Self { value: fidl::new_empty!(bool, D) }
5837        }
5838
5839        #[inline]
5840        unsafe fn decode(
5841            &mut self,
5842            decoder: &mut fidl::encoding::Decoder<'_, D>,
5843            offset: usize,
5844            _depth: fidl::encoding::Depth,
5845        ) -> fidl::Result<()> {
5846            decoder.debug_check_bounds::<Self>(offset);
5847            // Verify that padding bytes are zero.
5848            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5849            Ok(())
5850        }
5851    }
5852
5853    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
5854        type Borrowed<'a> = &'a Self;
5855        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5856            value
5857        }
5858    }
5859
5860    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
5861        type Owned = Self;
5862
5863        #[inline(always)]
5864        fn inline_align(_context: fidl::encoding::Context) -> usize {
5865            1
5866        }
5867
5868        #[inline(always)]
5869        fn inline_size(_context: fidl::encoding::Context) -> usize {
5870            1
5871        }
5872    }
5873
5874    unsafe impl<D: fidl::encoding::ResourceDialect>
5875        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D>
5876        for &BaseNetworkSocketGetIpReceiveTypeOfServiceResponse
5877    {
5878        #[inline]
5879        unsafe fn encode(
5880            self,
5881            encoder: &mut fidl::encoding::Encoder<'_, D>,
5882            offset: usize,
5883            _depth: fidl::encoding::Depth,
5884        ) -> fidl::Result<()> {
5885            encoder
5886                .debug_check_bounds::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse>(offset);
5887            // Delegate to tuple encoding.
5888            fidl::encoding::Encode::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D>::encode(
5889                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5890                encoder,
5891                offset,
5892                _depth,
5893            )
5894        }
5895    }
5896    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5897        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D> for (T0,)
5898    {
5899        #[inline]
5900        unsafe fn encode(
5901            self,
5902            encoder: &mut fidl::encoding::Encoder<'_, D>,
5903            offset: usize,
5904            depth: fidl::encoding::Depth,
5905        ) -> fidl::Result<()> {
5906            encoder
5907                .debug_check_bounds::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse>(offset);
5908            // Zero out padding regions. There's no need to apply masks
5909            // because the unmasked parts will be overwritten by fields.
5910            // Write the fields.
5911            self.0.encode(encoder, offset + 0, depth)?;
5912            Ok(())
5913        }
5914    }
5915
5916    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5917        for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse
5918    {
5919        #[inline(always)]
5920        fn new_empty() -> Self {
5921            Self { value: fidl::new_empty!(bool, D) }
5922        }
5923
5924        #[inline]
5925        unsafe fn decode(
5926            &mut self,
5927            decoder: &mut fidl::encoding::Decoder<'_, D>,
5928            offset: usize,
5929            _depth: fidl::encoding::Depth,
5930        ) -> fidl::Result<()> {
5931            decoder.debug_check_bounds::<Self>(offset);
5932            // Verify that padding bytes are zero.
5933            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5934            Ok(())
5935        }
5936    }
5937
5938    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTransparentResponse {
5939        type Borrowed<'a> = &'a Self;
5940        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5941            value
5942        }
5943    }
5944
5945    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTransparentResponse {
5946        type Owned = Self;
5947
5948        #[inline(always)]
5949        fn inline_align(_context: fidl::encoding::Context) -> usize {
5950            1
5951        }
5952
5953        #[inline(always)]
5954        fn inline_size(_context: fidl::encoding::Context) -> usize {
5955            1
5956        }
5957    }
5958
5959    unsafe impl<D: fidl::encoding::ResourceDialect>
5960        fidl::encoding::Encode<BaseNetworkSocketGetIpTransparentResponse, D>
5961        for &BaseNetworkSocketGetIpTransparentResponse
5962    {
5963        #[inline]
5964        unsafe fn encode(
5965            self,
5966            encoder: &mut fidl::encoding::Encoder<'_, D>,
5967            offset: usize,
5968            _depth: fidl::encoding::Depth,
5969        ) -> fidl::Result<()> {
5970            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTransparentResponse>(offset);
5971            // Delegate to tuple encoding.
5972            fidl::encoding::Encode::<BaseNetworkSocketGetIpTransparentResponse, D>::encode(
5973                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5974                encoder,
5975                offset,
5976                _depth,
5977            )
5978        }
5979    }
5980    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5981        fidl::encoding::Encode<BaseNetworkSocketGetIpTransparentResponse, D> for (T0,)
5982    {
5983        #[inline]
5984        unsafe fn encode(
5985            self,
5986            encoder: &mut fidl::encoding::Encoder<'_, D>,
5987            offset: usize,
5988            depth: fidl::encoding::Depth,
5989        ) -> fidl::Result<()> {
5990            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTransparentResponse>(offset);
5991            // Zero out padding regions. There's no need to apply masks
5992            // because the unmasked parts will be overwritten by fields.
5993            // Write the fields.
5994            self.0.encode(encoder, offset + 0, depth)?;
5995            Ok(())
5996        }
5997    }
5998
5999    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6000        for BaseNetworkSocketGetIpTransparentResponse
6001    {
6002        #[inline(always)]
6003        fn new_empty() -> Self {
6004            Self { value: fidl::new_empty!(bool, D) }
6005        }
6006
6007        #[inline]
6008        unsafe fn decode(
6009            &mut self,
6010            decoder: &mut fidl::encoding::Decoder<'_, D>,
6011            offset: usize,
6012            _depth: fidl::encoding::Depth,
6013        ) -> fidl::Result<()> {
6014            decoder.debug_check_bounds::<Self>(offset);
6015            // Verify that padding bytes are zero.
6016            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6017            Ok(())
6018        }
6019    }
6020
6021    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTtlResponse {
6022        type Borrowed<'a> = &'a Self;
6023        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6024            value
6025        }
6026    }
6027
6028    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTtlResponse {
6029        type Owned = Self;
6030
6031        #[inline(always)]
6032        fn inline_align(_context: fidl::encoding::Context) -> usize {
6033            1
6034        }
6035
6036        #[inline(always)]
6037        fn inline_size(_context: fidl::encoding::Context) -> usize {
6038            1
6039        }
6040        #[inline(always)]
6041        fn encode_is_copy() -> bool {
6042            true
6043        }
6044
6045        #[inline(always)]
6046        fn decode_is_copy() -> bool {
6047            true
6048        }
6049    }
6050
6051    unsafe impl<D: fidl::encoding::ResourceDialect>
6052        fidl::encoding::Encode<BaseNetworkSocketGetIpTtlResponse, D>
6053        for &BaseNetworkSocketGetIpTtlResponse
6054    {
6055        #[inline]
6056        unsafe fn encode(
6057            self,
6058            encoder: &mut fidl::encoding::Encoder<'_, D>,
6059            offset: usize,
6060            _depth: fidl::encoding::Depth,
6061        ) -> fidl::Result<()> {
6062            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTtlResponse>(offset);
6063            unsafe {
6064                // Copy the object into the buffer.
6065                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6066                (buf_ptr as *mut BaseNetworkSocketGetIpTtlResponse)
6067                    .write_unaligned((self as *const BaseNetworkSocketGetIpTtlResponse).read());
6068                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6069                // done second because the memcpy will write garbage to these bytes.
6070            }
6071            Ok(())
6072        }
6073    }
6074    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6075        fidl::encoding::Encode<BaseNetworkSocketGetIpTtlResponse, D> for (T0,)
6076    {
6077        #[inline]
6078        unsafe fn encode(
6079            self,
6080            encoder: &mut fidl::encoding::Encoder<'_, D>,
6081            offset: usize,
6082            depth: fidl::encoding::Depth,
6083        ) -> fidl::Result<()> {
6084            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTtlResponse>(offset);
6085            // Zero out padding regions. There's no need to apply masks
6086            // because the unmasked parts will be overwritten by fields.
6087            // Write the fields.
6088            self.0.encode(encoder, offset + 0, depth)?;
6089            Ok(())
6090        }
6091    }
6092
6093    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6094        for BaseNetworkSocketGetIpTtlResponse
6095    {
6096        #[inline(always)]
6097        fn new_empty() -> Self {
6098            Self { value: fidl::new_empty!(u8, D) }
6099        }
6100
6101        #[inline]
6102        unsafe fn decode(
6103            &mut self,
6104            decoder: &mut fidl::encoding::Decoder<'_, D>,
6105            offset: usize,
6106            _depth: fidl::encoding::Depth,
6107        ) -> fidl::Result<()> {
6108            decoder.debug_check_bounds::<Self>(offset);
6109            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6110            // Verify that padding bytes are zero.
6111            // Copy from the buffer into the object.
6112            unsafe {
6113                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6114            }
6115            Ok(())
6116        }
6117    }
6118
6119    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTypeOfServiceResponse {
6120        type Borrowed<'a> = &'a Self;
6121        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6122            value
6123        }
6124    }
6125
6126    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTypeOfServiceResponse {
6127        type Owned = Self;
6128
6129        #[inline(always)]
6130        fn inline_align(_context: fidl::encoding::Context) -> usize {
6131            1
6132        }
6133
6134        #[inline(always)]
6135        fn inline_size(_context: fidl::encoding::Context) -> usize {
6136            1
6137        }
6138        #[inline(always)]
6139        fn encode_is_copy() -> bool {
6140            true
6141        }
6142
6143        #[inline(always)]
6144        fn decode_is_copy() -> bool {
6145            true
6146        }
6147    }
6148
6149    unsafe impl<D: fidl::encoding::ResourceDialect>
6150        fidl::encoding::Encode<BaseNetworkSocketGetIpTypeOfServiceResponse, D>
6151        for &BaseNetworkSocketGetIpTypeOfServiceResponse
6152    {
6153        #[inline]
6154        unsafe fn encode(
6155            self,
6156            encoder: &mut fidl::encoding::Encoder<'_, D>,
6157            offset: usize,
6158            _depth: fidl::encoding::Depth,
6159        ) -> fidl::Result<()> {
6160            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTypeOfServiceResponse>(offset);
6161            unsafe {
6162                // Copy the object into the buffer.
6163                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6164                (buf_ptr as *mut BaseNetworkSocketGetIpTypeOfServiceResponse).write_unaligned(
6165                    (self as *const BaseNetworkSocketGetIpTypeOfServiceResponse).read(),
6166                );
6167                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6168                // done second because the memcpy will write garbage to these bytes.
6169            }
6170            Ok(())
6171        }
6172    }
6173    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6174        fidl::encoding::Encode<BaseNetworkSocketGetIpTypeOfServiceResponse, D> for (T0,)
6175    {
6176        #[inline]
6177        unsafe fn encode(
6178            self,
6179            encoder: &mut fidl::encoding::Encoder<'_, D>,
6180            offset: usize,
6181            depth: fidl::encoding::Depth,
6182        ) -> fidl::Result<()> {
6183            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTypeOfServiceResponse>(offset);
6184            // Zero out padding regions. There's no need to apply masks
6185            // because the unmasked parts will be overwritten by fields.
6186            // Write the fields.
6187            self.0.encode(encoder, offset + 0, depth)?;
6188            Ok(())
6189        }
6190    }
6191
6192    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6193        for BaseNetworkSocketGetIpTypeOfServiceResponse
6194    {
6195        #[inline(always)]
6196        fn new_empty() -> Self {
6197            Self { value: fidl::new_empty!(u8, D) }
6198        }
6199
6200        #[inline]
6201        unsafe fn decode(
6202            &mut self,
6203            decoder: &mut fidl::encoding::Decoder<'_, D>,
6204            offset: usize,
6205            _depth: fidl::encoding::Depth,
6206        ) -> fidl::Result<()> {
6207            decoder.debug_check_bounds::<Self>(offset);
6208            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6209            // Verify that padding bytes are zero.
6210            // Copy from the buffer into the object.
6211            unsafe {
6212                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6213            }
6214            Ok(())
6215        }
6216    }
6217
6218    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastHopsResponse {
6219        type Borrowed<'a> = &'a Self;
6220        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6221            value
6222        }
6223    }
6224
6225    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastHopsResponse {
6226        type Owned = Self;
6227
6228        #[inline(always)]
6229        fn inline_align(_context: fidl::encoding::Context) -> usize {
6230            1
6231        }
6232
6233        #[inline(always)]
6234        fn inline_size(_context: fidl::encoding::Context) -> usize {
6235            1
6236        }
6237        #[inline(always)]
6238        fn encode_is_copy() -> bool {
6239            true
6240        }
6241
6242        #[inline(always)]
6243        fn decode_is_copy() -> bool {
6244            true
6245        }
6246    }
6247
6248    unsafe impl<D: fidl::encoding::ResourceDialect>
6249        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastHopsResponse, D>
6250        for &BaseNetworkSocketGetIpv6MulticastHopsResponse
6251    {
6252        #[inline]
6253        unsafe fn encode(
6254            self,
6255            encoder: &mut fidl::encoding::Encoder<'_, D>,
6256            offset: usize,
6257            _depth: fidl::encoding::Depth,
6258        ) -> fidl::Result<()> {
6259            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastHopsResponse>(offset);
6260            unsafe {
6261                // Copy the object into the buffer.
6262                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6263                (buf_ptr as *mut BaseNetworkSocketGetIpv6MulticastHopsResponse).write_unaligned(
6264                    (self as *const BaseNetworkSocketGetIpv6MulticastHopsResponse).read(),
6265                );
6266                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6267                // done second because the memcpy will write garbage to these bytes.
6268            }
6269            Ok(())
6270        }
6271    }
6272    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6273        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastHopsResponse, D> for (T0,)
6274    {
6275        #[inline]
6276        unsafe fn encode(
6277            self,
6278            encoder: &mut fidl::encoding::Encoder<'_, D>,
6279            offset: usize,
6280            depth: fidl::encoding::Depth,
6281        ) -> fidl::Result<()> {
6282            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastHopsResponse>(offset);
6283            // Zero out padding regions. There's no need to apply masks
6284            // because the unmasked parts will be overwritten by fields.
6285            // Write the fields.
6286            self.0.encode(encoder, offset + 0, depth)?;
6287            Ok(())
6288        }
6289    }
6290
6291    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6292        for BaseNetworkSocketGetIpv6MulticastHopsResponse
6293    {
6294        #[inline(always)]
6295        fn new_empty() -> Self {
6296            Self { value: fidl::new_empty!(u8, D) }
6297        }
6298
6299        #[inline]
6300        unsafe fn decode(
6301            &mut self,
6302            decoder: &mut fidl::encoding::Decoder<'_, D>,
6303            offset: usize,
6304            _depth: fidl::encoding::Depth,
6305        ) -> fidl::Result<()> {
6306            decoder.debug_check_bounds::<Self>(offset);
6307            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6308            // Verify that padding bytes are zero.
6309            // Copy from the buffer into the object.
6310            unsafe {
6311                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6312            }
6313            Ok(())
6314        }
6315    }
6316
6317    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
6318        type Borrowed<'a> = &'a Self;
6319        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6320            value
6321        }
6322    }
6323
6324    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
6325        type Owned = Self;
6326
6327        #[inline(always)]
6328        fn inline_align(_context: fidl::encoding::Context) -> usize {
6329            8
6330        }
6331
6332        #[inline(always)]
6333        fn inline_size(_context: fidl::encoding::Context) -> usize {
6334            8
6335        }
6336        #[inline(always)]
6337        fn encode_is_copy() -> bool {
6338            true
6339        }
6340
6341        #[inline(always)]
6342        fn decode_is_copy() -> bool {
6343            true
6344        }
6345    }
6346
6347    unsafe impl<D: fidl::encoding::ResourceDialect>
6348        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastInterfaceResponse, D>
6349        for &BaseNetworkSocketGetIpv6MulticastInterfaceResponse
6350    {
6351        #[inline]
6352        unsafe fn encode(
6353            self,
6354            encoder: &mut fidl::encoding::Encoder<'_, D>,
6355            offset: usize,
6356            _depth: fidl::encoding::Depth,
6357        ) -> fidl::Result<()> {
6358            encoder
6359                .debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastInterfaceResponse>(offset);
6360            unsafe {
6361                // Copy the object into the buffer.
6362                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6363                (buf_ptr as *mut BaseNetworkSocketGetIpv6MulticastInterfaceResponse)
6364                    .write_unaligned(
6365                        (self as *const BaseNetworkSocketGetIpv6MulticastInterfaceResponse).read(),
6366                    );
6367                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6368                // done second because the memcpy will write garbage to these bytes.
6369            }
6370            Ok(())
6371        }
6372    }
6373    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
6374        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastInterfaceResponse, D> for (T0,)
6375    {
6376        #[inline]
6377        unsafe fn encode(
6378            self,
6379            encoder: &mut fidl::encoding::Encoder<'_, D>,
6380            offset: usize,
6381            depth: fidl::encoding::Depth,
6382        ) -> fidl::Result<()> {
6383            encoder
6384                .debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastInterfaceResponse>(offset);
6385            // Zero out padding regions. There's no need to apply masks
6386            // because the unmasked parts will be overwritten by fields.
6387            // Write the fields.
6388            self.0.encode(encoder, offset + 0, depth)?;
6389            Ok(())
6390        }
6391    }
6392
6393    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6394        for BaseNetworkSocketGetIpv6MulticastInterfaceResponse
6395    {
6396        #[inline(always)]
6397        fn new_empty() -> Self {
6398            Self { value: fidl::new_empty!(u64, D) }
6399        }
6400
6401        #[inline]
6402        unsafe fn decode(
6403            &mut self,
6404            decoder: &mut fidl::encoding::Decoder<'_, D>,
6405            offset: usize,
6406            _depth: fidl::encoding::Depth,
6407        ) -> fidl::Result<()> {
6408            decoder.debug_check_bounds::<Self>(offset);
6409            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6410            // Verify that padding bytes are zero.
6411            // Copy from the buffer into the object.
6412            unsafe {
6413                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
6414            }
6415            Ok(())
6416        }
6417    }
6418
6419    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
6420        type Borrowed<'a> = &'a Self;
6421        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6422            value
6423        }
6424    }
6425
6426    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
6427        type Owned = Self;
6428
6429        #[inline(always)]
6430        fn inline_align(_context: fidl::encoding::Context) -> usize {
6431            1
6432        }
6433
6434        #[inline(always)]
6435        fn inline_size(_context: fidl::encoding::Context) -> usize {
6436            1
6437        }
6438    }
6439
6440    unsafe impl<D: fidl::encoding::ResourceDialect>
6441        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D>
6442        for &BaseNetworkSocketGetIpv6MulticastLoopbackResponse
6443    {
6444        #[inline]
6445        unsafe fn encode(
6446            self,
6447            encoder: &mut fidl::encoding::Encoder<'_, D>,
6448            offset: usize,
6449            _depth: fidl::encoding::Depth,
6450        ) -> fidl::Result<()> {
6451            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse>(offset);
6452            // Delegate to tuple encoding.
6453            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D>::encode(
6454                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6455                encoder,
6456                offset,
6457                _depth,
6458            )
6459        }
6460    }
6461    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6462        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D> for (T0,)
6463    {
6464        #[inline]
6465        unsafe fn encode(
6466            self,
6467            encoder: &mut fidl::encoding::Encoder<'_, D>,
6468            offset: usize,
6469            depth: fidl::encoding::Depth,
6470        ) -> fidl::Result<()> {
6471            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse>(offset);
6472            // Zero out padding regions. There's no need to apply masks
6473            // because the unmasked parts will be overwritten by fields.
6474            // Write the fields.
6475            self.0.encode(encoder, offset + 0, depth)?;
6476            Ok(())
6477        }
6478    }
6479
6480    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6481        for BaseNetworkSocketGetIpv6MulticastLoopbackResponse
6482    {
6483        #[inline(always)]
6484        fn new_empty() -> Self {
6485            Self { value: fidl::new_empty!(bool, D) }
6486        }
6487
6488        #[inline]
6489        unsafe fn decode(
6490            &mut self,
6491            decoder: &mut fidl::encoding::Decoder<'_, D>,
6492            offset: usize,
6493            _depth: fidl::encoding::Depth,
6494        ) -> fidl::Result<()> {
6495            decoder.debug_check_bounds::<Self>(offset);
6496            // Verify that padding bytes are zero.
6497            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6498            Ok(())
6499        }
6500    }
6501
6502    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6OnlyResponse {
6503        type Borrowed<'a> = &'a Self;
6504        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6505            value
6506        }
6507    }
6508
6509    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6OnlyResponse {
6510        type Owned = Self;
6511
6512        #[inline(always)]
6513        fn inline_align(_context: fidl::encoding::Context) -> usize {
6514            1
6515        }
6516
6517        #[inline(always)]
6518        fn inline_size(_context: fidl::encoding::Context) -> usize {
6519            1
6520        }
6521    }
6522
6523    unsafe impl<D: fidl::encoding::ResourceDialect>
6524        fidl::encoding::Encode<BaseNetworkSocketGetIpv6OnlyResponse, D>
6525        for &BaseNetworkSocketGetIpv6OnlyResponse
6526    {
6527        #[inline]
6528        unsafe fn encode(
6529            self,
6530            encoder: &mut fidl::encoding::Encoder<'_, D>,
6531            offset: usize,
6532            _depth: fidl::encoding::Depth,
6533        ) -> fidl::Result<()> {
6534            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6OnlyResponse>(offset);
6535            // Delegate to tuple encoding.
6536            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6OnlyResponse, D>::encode(
6537                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6538                encoder,
6539                offset,
6540                _depth,
6541            )
6542        }
6543    }
6544    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6545        fidl::encoding::Encode<BaseNetworkSocketGetIpv6OnlyResponse, D> for (T0,)
6546    {
6547        #[inline]
6548        unsafe fn encode(
6549            self,
6550            encoder: &mut fidl::encoding::Encoder<'_, D>,
6551            offset: usize,
6552            depth: fidl::encoding::Depth,
6553        ) -> fidl::Result<()> {
6554            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6OnlyResponse>(offset);
6555            // Zero out padding regions. There's no need to apply masks
6556            // because the unmasked parts will be overwritten by fields.
6557            // Write the fields.
6558            self.0.encode(encoder, offset + 0, depth)?;
6559            Ok(())
6560        }
6561    }
6562
6563    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6564        for BaseNetworkSocketGetIpv6OnlyResponse
6565    {
6566        #[inline(always)]
6567        fn new_empty() -> Self {
6568            Self { value: fidl::new_empty!(bool, D) }
6569        }
6570
6571        #[inline]
6572        unsafe fn decode(
6573            &mut self,
6574            decoder: &mut fidl::encoding::Decoder<'_, D>,
6575            offset: usize,
6576            _depth: fidl::encoding::Depth,
6577        ) -> fidl::Result<()> {
6578            decoder.debug_check_bounds::<Self>(offset);
6579            // Verify that padding bytes are zero.
6580            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6581            Ok(())
6582        }
6583    }
6584
6585    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
6586        type Borrowed<'a> = &'a Self;
6587        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6588            value
6589        }
6590    }
6591
6592    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
6593        type Owned = Self;
6594
6595        #[inline(always)]
6596        fn inline_align(_context: fidl::encoding::Context) -> usize {
6597            1
6598        }
6599
6600        #[inline(always)]
6601        fn inline_size(_context: fidl::encoding::Context) -> usize {
6602            1
6603        }
6604    }
6605
6606    unsafe impl<D: fidl::encoding::ResourceDialect>
6607        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D>
6608        for &BaseNetworkSocketGetIpv6ReceiveHopLimitResponse
6609    {
6610        #[inline]
6611        unsafe fn encode(
6612            self,
6613            encoder: &mut fidl::encoding::Encoder<'_, D>,
6614            offset: usize,
6615            _depth: fidl::encoding::Depth,
6616        ) -> fidl::Result<()> {
6617            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse>(offset);
6618            // Delegate to tuple encoding.
6619            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D>::encode(
6620                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6621                encoder,
6622                offset,
6623                _depth,
6624            )
6625        }
6626    }
6627    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6628        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D> for (T0,)
6629    {
6630        #[inline]
6631        unsafe fn encode(
6632            self,
6633            encoder: &mut fidl::encoding::Encoder<'_, D>,
6634            offset: usize,
6635            depth: fidl::encoding::Depth,
6636        ) -> fidl::Result<()> {
6637            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse>(offset);
6638            // Zero out padding regions. There's no need to apply masks
6639            // because the unmasked parts will be overwritten by fields.
6640            // Write the fields.
6641            self.0.encode(encoder, offset + 0, depth)?;
6642            Ok(())
6643        }
6644    }
6645
6646    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6647        for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse
6648    {
6649        #[inline(always)]
6650        fn new_empty() -> Self {
6651            Self { value: fidl::new_empty!(bool, D) }
6652        }
6653
6654        #[inline]
6655        unsafe fn decode(
6656            &mut self,
6657            decoder: &mut fidl::encoding::Decoder<'_, D>,
6658            offset: usize,
6659            _depth: fidl::encoding::Depth,
6660        ) -> fidl::Result<()> {
6661            decoder.debug_check_bounds::<Self>(offset);
6662            // Verify that padding bytes are zero.
6663            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6664            Ok(())
6665        }
6666    }
6667
6668    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
6669        type Borrowed<'a> = &'a Self;
6670        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6671            value
6672        }
6673    }
6674
6675    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
6676        type Owned = Self;
6677
6678        #[inline(always)]
6679        fn inline_align(_context: fidl::encoding::Context) -> usize {
6680            1
6681        }
6682
6683        #[inline(always)]
6684        fn inline_size(_context: fidl::encoding::Context) -> usize {
6685            1
6686        }
6687    }
6688
6689    unsafe impl<D: fidl::encoding::ResourceDialect>
6690        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D>
6691        for &BaseNetworkSocketGetIpv6ReceivePacketInfoResponse
6692    {
6693        #[inline]
6694        unsafe fn encode(
6695            self,
6696            encoder: &mut fidl::encoding::Encoder<'_, D>,
6697            offset: usize,
6698            _depth: fidl::encoding::Depth,
6699        ) -> fidl::Result<()> {
6700            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse>(offset);
6701            // Delegate to tuple encoding.
6702            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D>::encode(
6703                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6704                encoder,
6705                offset,
6706                _depth,
6707            )
6708        }
6709    }
6710    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6711        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D> for (T0,)
6712    {
6713        #[inline]
6714        unsafe fn encode(
6715            self,
6716            encoder: &mut fidl::encoding::Encoder<'_, D>,
6717            offset: usize,
6718            depth: fidl::encoding::Depth,
6719        ) -> fidl::Result<()> {
6720            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse>(offset);
6721            // Zero out padding regions. There's no need to apply masks
6722            // because the unmasked parts will be overwritten by fields.
6723            // Write the fields.
6724            self.0.encode(encoder, offset + 0, depth)?;
6725            Ok(())
6726        }
6727    }
6728
6729    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6730        for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse
6731    {
6732        #[inline(always)]
6733        fn new_empty() -> Self {
6734            Self { value: fidl::new_empty!(bool, D) }
6735        }
6736
6737        #[inline]
6738        unsafe fn decode(
6739            &mut self,
6740            decoder: &mut fidl::encoding::Decoder<'_, D>,
6741            offset: usize,
6742            _depth: fidl::encoding::Depth,
6743        ) -> fidl::Result<()> {
6744            decoder.debug_check_bounds::<Self>(offset);
6745            // Verify that padding bytes are zero.
6746            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6747            Ok(())
6748        }
6749    }
6750
6751    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
6752        type Borrowed<'a> = &'a Self;
6753        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6754            value
6755        }
6756    }
6757
6758    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
6759        type Owned = Self;
6760
6761        #[inline(always)]
6762        fn inline_align(_context: fidl::encoding::Context) -> usize {
6763            1
6764        }
6765
6766        #[inline(always)]
6767        fn inline_size(_context: fidl::encoding::Context) -> usize {
6768            1
6769        }
6770    }
6771
6772    unsafe impl<D: fidl::encoding::ResourceDialect>
6773        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D>
6774        for &BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse
6775    {
6776        #[inline]
6777        unsafe fn encode(
6778            self,
6779            encoder: &mut fidl::encoding::Encoder<'_, D>,
6780            offset: usize,
6781            _depth: fidl::encoding::Depth,
6782        ) -> fidl::Result<()> {
6783            encoder
6784                .debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse>(offset);
6785            // Delegate to tuple encoding.
6786            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D>::encode(
6787                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6788                encoder,
6789                offset,
6790                _depth,
6791            )
6792        }
6793    }
6794    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6795        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D> for (T0,)
6796    {
6797        #[inline]
6798        unsafe fn encode(
6799            self,
6800            encoder: &mut fidl::encoding::Encoder<'_, D>,
6801            offset: usize,
6802            depth: fidl::encoding::Depth,
6803        ) -> fidl::Result<()> {
6804            encoder
6805                .debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse>(offset);
6806            // Zero out padding regions. There's no need to apply masks
6807            // because the unmasked parts will be overwritten by fields.
6808            // Write the fields.
6809            self.0.encode(encoder, offset + 0, depth)?;
6810            Ok(())
6811        }
6812    }
6813
6814    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6815        for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse
6816    {
6817        #[inline(always)]
6818        fn new_empty() -> Self {
6819            Self { value: fidl::new_empty!(bool, D) }
6820        }
6821
6822        #[inline]
6823        unsafe fn decode(
6824            &mut self,
6825            decoder: &mut fidl::encoding::Decoder<'_, D>,
6826            offset: usize,
6827            _depth: fidl::encoding::Depth,
6828        ) -> fidl::Result<()> {
6829            decoder.debug_check_bounds::<Self>(offset);
6830            // Verify that padding bytes are zero.
6831            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6832            Ok(())
6833        }
6834    }
6835
6836    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6TrafficClassResponse {
6837        type Borrowed<'a> = &'a Self;
6838        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6839            value
6840        }
6841    }
6842
6843    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6TrafficClassResponse {
6844        type Owned = Self;
6845
6846        #[inline(always)]
6847        fn inline_align(_context: fidl::encoding::Context) -> usize {
6848            1
6849        }
6850
6851        #[inline(always)]
6852        fn inline_size(_context: fidl::encoding::Context) -> usize {
6853            1
6854        }
6855        #[inline(always)]
6856        fn encode_is_copy() -> bool {
6857            true
6858        }
6859
6860        #[inline(always)]
6861        fn decode_is_copy() -> bool {
6862            true
6863        }
6864    }
6865
6866    unsafe impl<D: fidl::encoding::ResourceDialect>
6867        fidl::encoding::Encode<BaseNetworkSocketGetIpv6TrafficClassResponse, D>
6868        for &BaseNetworkSocketGetIpv6TrafficClassResponse
6869    {
6870        #[inline]
6871        unsafe fn encode(
6872            self,
6873            encoder: &mut fidl::encoding::Encoder<'_, D>,
6874            offset: usize,
6875            _depth: fidl::encoding::Depth,
6876        ) -> fidl::Result<()> {
6877            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6TrafficClassResponse>(offset);
6878            unsafe {
6879                // Copy the object into the buffer.
6880                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6881                (buf_ptr as *mut BaseNetworkSocketGetIpv6TrafficClassResponse).write_unaligned(
6882                    (self as *const BaseNetworkSocketGetIpv6TrafficClassResponse).read(),
6883                );
6884                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6885                // done second because the memcpy will write garbage to these bytes.
6886            }
6887            Ok(())
6888        }
6889    }
6890    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6891        fidl::encoding::Encode<BaseNetworkSocketGetIpv6TrafficClassResponse, D> for (T0,)
6892    {
6893        #[inline]
6894        unsafe fn encode(
6895            self,
6896            encoder: &mut fidl::encoding::Encoder<'_, D>,
6897            offset: usize,
6898            depth: fidl::encoding::Depth,
6899        ) -> fidl::Result<()> {
6900            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6TrafficClassResponse>(offset);
6901            // Zero out padding regions. There's no need to apply masks
6902            // because the unmasked parts will be overwritten by fields.
6903            // Write the fields.
6904            self.0.encode(encoder, offset + 0, depth)?;
6905            Ok(())
6906        }
6907    }
6908
6909    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6910        for BaseNetworkSocketGetIpv6TrafficClassResponse
6911    {
6912        #[inline(always)]
6913        fn new_empty() -> Self {
6914            Self { value: fidl::new_empty!(u8, D) }
6915        }
6916
6917        #[inline]
6918        unsafe fn decode(
6919            &mut self,
6920            decoder: &mut fidl::encoding::Decoder<'_, D>,
6921            offset: usize,
6922            _depth: fidl::encoding::Depth,
6923        ) -> fidl::Result<()> {
6924            decoder.debug_check_bounds::<Self>(offset);
6925            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6926            // Verify that padding bytes are zero.
6927            // Copy from the buffer into the object.
6928            unsafe {
6929                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6930            }
6931            Ok(())
6932        }
6933    }
6934
6935    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6UnicastHopsResponse {
6936        type Borrowed<'a> = &'a Self;
6937        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6938            value
6939        }
6940    }
6941
6942    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6UnicastHopsResponse {
6943        type Owned = Self;
6944
6945        #[inline(always)]
6946        fn inline_align(_context: fidl::encoding::Context) -> usize {
6947            1
6948        }
6949
6950        #[inline(always)]
6951        fn inline_size(_context: fidl::encoding::Context) -> usize {
6952            1
6953        }
6954        #[inline(always)]
6955        fn encode_is_copy() -> bool {
6956            true
6957        }
6958
6959        #[inline(always)]
6960        fn decode_is_copy() -> bool {
6961            true
6962        }
6963    }
6964
6965    unsafe impl<D: fidl::encoding::ResourceDialect>
6966        fidl::encoding::Encode<BaseNetworkSocketGetIpv6UnicastHopsResponse, D>
6967        for &BaseNetworkSocketGetIpv6UnicastHopsResponse
6968    {
6969        #[inline]
6970        unsafe fn encode(
6971            self,
6972            encoder: &mut fidl::encoding::Encoder<'_, D>,
6973            offset: usize,
6974            _depth: fidl::encoding::Depth,
6975        ) -> fidl::Result<()> {
6976            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6UnicastHopsResponse>(offset);
6977            unsafe {
6978                // Copy the object into the buffer.
6979                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6980                (buf_ptr as *mut BaseNetworkSocketGetIpv6UnicastHopsResponse).write_unaligned(
6981                    (self as *const BaseNetworkSocketGetIpv6UnicastHopsResponse).read(),
6982                );
6983                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6984                // done second because the memcpy will write garbage to these bytes.
6985            }
6986            Ok(())
6987        }
6988    }
6989    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6990        fidl::encoding::Encode<BaseNetworkSocketGetIpv6UnicastHopsResponse, D> for (T0,)
6991    {
6992        #[inline]
6993        unsafe fn encode(
6994            self,
6995            encoder: &mut fidl::encoding::Encoder<'_, D>,
6996            offset: usize,
6997            depth: fidl::encoding::Depth,
6998        ) -> fidl::Result<()> {
6999            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6UnicastHopsResponse>(offset);
7000            // Zero out padding regions. There's no need to apply masks
7001            // because the unmasked parts will be overwritten by fields.
7002            // Write the fields.
7003            self.0.encode(encoder, offset + 0, depth)?;
7004            Ok(())
7005        }
7006    }
7007
7008    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7009        for BaseNetworkSocketGetIpv6UnicastHopsResponse
7010    {
7011        #[inline(always)]
7012        fn new_empty() -> Self {
7013            Self { value: fidl::new_empty!(u8, D) }
7014        }
7015
7016        #[inline]
7017        unsafe fn decode(
7018            &mut self,
7019            decoder: &mut fidl::encoding::Decoder<'_, D>,
7020            offset: usize,
7021            _depth: fidl::encoding::Depth,
7022        ) -> fidl::Result<()> {
7023            decoder.debug_check_bounds::<Self>(offset);
7024            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7025            // Verify that padding bytes are zero.
7026            // Copy from the buffer into the object.
7027            unsafe {
7028                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
7029            }
7030            Ok(())
7031        }
7032    }
7033
7034    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetOriginalDestinationResponse {
7035        type Borrowed<'a> = &'a Self;
7036        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7037            value
7038        }
7039    }
7040
7041    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetOriginalDestinationResponse {
7042        type Owned = Self;
7043
7044        #[inline(always)]
7045        fn inline_align(_context: fidl::encoding::Context) -> usize {
7046            8
7047        }
7048
7049        #[inline(always)]
7050        fn inline_size(_context: fidl::encoding::Context) -> usize {
7051            16
7052        }
7053    }
7054
7055    unsafe impl<D: fidl::encoding::ResourceDialect>
7056        fidl::encoding::Encode<BaseNetworkSocketGetOriginalDestinationResponse, D>
7057        for &BaseNetworkSocketGetOriginalDestinationResponse
7058    {
7059        #[inline]
7060        unsafe fn encode(
7061            self,
7062            encoder: &mut fidl::encoding::Encoder<'_, D>,
7063            offset: usize,
7064            _depth: fidl::encoding::Depth,
7065        ) -> fidl::Result<()> {
7066            encoder.debug_check_bounds::<BaseNetworkSocketGetOriginalDestinationResponse>(offset);
7067            // Delegate to tuple encoding.
7068            fidl::encoding::Encode::<BaseNetworkSocketGetOriginalDestinationResponse, D>::encode(
7069                (
7070                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
7071                ),
7072                encoder, offset, _depth
7073            )
7074        }
7075    }
7076    unsafe impl<
7077        D: fidl::encoding::ResourceDialect,
7078        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7079    > fidl::encoding::Encode<BaseNetworkSocketGetOriginalDestinationResponse, D> for (T0,)
7080    {
7081        #[inline]
7082        unsafe fn encode(
7083            self,
7084            encoder: &mut fidl::encoding::Encoder<'_, D>,
7085            offset: usize,
7086            depth: fidl::encoding::Depth,
7087        ) -> fidl::Result<()> {
7088            encoder.debug_check_bounds::<BaseNetworkSocketGetOriginalDestinationResponse>(offset);
7089            // Zero out padding regions. There's no need to apply masks
7090            // because the unmasked parts will be overwritten by fields.
7091            // Write the fields.
7092            self.0.encode(encoder, offset + 0, depth)?;
7093            Ok(())
7094        }
7095    }
7096
7097    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7098        for BaseNetworkSocketGetOriginalDestinationResponse
7099    {
7100        #[inline(always)]
7101        fn new_empty() -> Self {
7102            Self { value: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7103        }
7104
7105        #[inline]
7106        unsafe fn decode(
7107            &mut self,
7108            decoder: &mut fidl::encoding::Decoder<'_, D>,
7109            offset: usize,
7110            _depth: fidl::encoding::Depth,
7111        ) -> fidl::Result<()> {
7112            decoder.debug_check_bounds::<Self>(offset);
7113            // Verify that padding bytes are zero.
7114            fidl::decode!(
7115                fidl_fuchsia_net__common::SocketAddress,
7116                D,
7117                &mut self.value,
7118                decoder,
7119                offset + 0,
7120                _depth
7121            )?;
7122            Ok(())
7123        }
7124    }
7125
7126    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetPeerNameResponse {
7127        type Borrowed<'a> = &'a Self;
7128        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7129            value
7130        }
7131    }
7132
7133    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetPeerNameResponse {
7134        type Owned = Self;
7135
7136        #[inline(always)]
7137        fn inline_align(_context: fidl::encoding::Context) -> usize {
7138            8
7139        }
7140
7141        #[inline(always)]
7142        fn inline_size(_context: fidl::encoding::Context) -> usize {
7143            16
7144        }
7145    }
7146
7147    unsafe impl<D: fidl::encoding::ResourceDialect>
7148        fidl::encoding::Encode<BaseNetworkSocketGetPeerNameResponse, D>
7149        for &BaseNetworkSocketGetPeerNameResponse
7150    {
7151        #[inline]
7152        unsafe fn encode(
7153            self,
7154            encoder: &mut fidl::encoding::Encoder<'_, D>,
7155            offset: usize,
7156            _depth: fidl::encoding::Depth,
7157        ) -> fidl::Result<()> {
7158            encoder.debug_check_bounds::<BaseNetworkSocketGetPeerNameResponse>(offset);
7159            // Delegate to tuple encoding.
7160            fidl::encoding::Encode::<BaseNetworkSocketGetPeerNameResponse, D>::encode(
7161                (
7162                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
7163                ),
7164                encoder, offset, _depth
7165            )
7166        }
7167    }
7168    unsafe impl<
7169        D: fidl::encoding::ResourceDialect,
7170        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7171    > fidl::encoding::Encode<BaseNetworkSocketGetPeerNameResponse, D> for (T0,)
7172    {
7173        #[inline]
7174        unsafe fn encode(
7175            self,
7176            encoder: &mut fidl::encoding::Encoder<'_, D>,
7177            offset: usize,
7178            depth: fidl::encoding::Depth,
7179        ) -> fidl::Result<()> {
7180            encoder.debug_check_bounds::<BaseNetworkSocketGetPeerNameResponse>(offset);
7181            // Zero out padding regions. There's no need to apply masks
7182            // because the unmasked parts will be overwritten by fields.
7183            // Write the fields.
7184            self.0.encode(encoder, offset + 0, depth)?;
7185            Ok(())
7186        }
7187    }
7188
7189    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7190        for BaseNetworkSocketGetPeerNameResponse
7191    {
7192        #[inline(always)]
7193        fn new_empty() -> Self {
7194            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7195        }
7196
7197        #[inline]
7198        unsafe fn decode(
7199            &mut self,
7200            decoder: &mut fidl::encoding::Decoder<'_, D>,
7201            offset: usize,
7202            _depth: fidl::encoding::Depth,
7203        ) -> fidl::Result<()> {
7204            decoder.debug_check_bounds::<Self>(offset);
7205            // Verify that padding bytes are zero.
7206            fidl::decode!(
7207                fidl_fuchsia_net__common::SocketAddress,
7208                D,
7209                &mut self.addr,
7210                decoder,
7211                offset + 0,
7212                _depth
7213            )?;
7214            Ok(())
7215        }
7216    }
7217
7218    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetSockNameResponse {
7219        type Borrowed<'a> = &'a Self;
7220        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7221            value
7222        }
7223    }
7224
7225    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetSockNameResponse {
7226        type Owned = Self;
7227
7228        #[inline(always)]
7229        fn inline_align(_context: fidl::encoding::Context) -> usize {
7230            8
7231        }
7232
7233        #[inline(always)]
7234        fn inline_size(_context: fidl::encoding::Context) -> usize {
7235            16
7236        }
7237    }
7238
7239    unsafe impl<D: fidl::encoding::ResourceDialect>
7240        fidl::encoding::Encode<BaseNetworkSocketGetSockNameResponse, D>
7241        for &BaseNetworkSocketGetSockNameResponse
7242    {
7243        #[inline]
7244        unsafe fn encode(
7245            self,
7246            encoder: &mut fidl::encoding::Encoder<'_, D>,
7247            offset: usize,
7248            _depth: fidl::encoding::Depth,
7249        ) -> fidl::Result<()> {
7250            encoder.debug_check_bounds::<BaseNetworkSocketGetSockNameResponse>(offset);
7251            // Delegate to tuple encoding.
7252            fidl::encoding::Encode::<BaseNetworkSocketGetSockNameResponse, D>::encode(
7253                (
7254                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
7255                ),
7256                encoder, offset, _depth
7257            )
7258        }
7259    }
7260    unsafe impl<
7261        D: fidl::encoding::ResourceDialect,
7262        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7263    > fidl::encoding::Encode<BaseNetworkSocketGetSockNameResponse, D> for (T0,)
7264    {
7265        #[inline]
7266        unsafe fn encode(
7267            self,
7268            encoder: &mut fidl::encoding::Encoder<'_, D>,
7269            offset: usize,
7270            depth: fidl::encoding::Depth,
7271        ) -> fidl::Result<()> {
7272            encoder.debug_check_bounds::<BaseNetworkSocketGetSockNameResponse>(offset);
7273            // Zero out padding regions. There's no need to apply masks
7274            // because the unmasked parts will be overwritten by fields.
7275            // Write the fields.
7276            self.0.encode(encoder, offset + 0, depth)?;
7277            Ok(())
7278        }
7279    }
7280
7281    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7282        for BaseNetworkSocketGetSockNameResponse
7283    {
7284        #[inline(always)]
7285        fn new_empty() -> Self {
7286            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7287        }
7288
7289        #[inline]
7290        unsafe fn decode(
7291            &mut self,
7292            decoder: &mut fidl::encoding::Decoder<'_, D>,
7293            offset: usize,
7294            _depth: fidl::encoding::Depth,
7295        ) -> fidl::Result<()> {
7296            decoder.debug_check_bounds::<Self>(offset);
7297            // Verify that padding bytes are zero.
7298            fidl::decode!(
7299                fidl_fuchsia_net__common::SocketAddress,
7300                D,
7301                &mut self.addr,
7302                decoder,
7303                offset + 0,
7304                _depth
7305            )?;
7306            Ok(())
7307        }
7308    }
7309
7310    impl fidl::encoding::ValueTypeMarker for BaseSocketGetMarkRequest {
7311        type Borrowed<'a> = &'a Self;
7312        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7313            value
7314        }
7315    }
7316
7317    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetMarkRequest {
7318        type Owned = Self;
7319
7320        #[inline(always)]
7321        fn inline_align(_context: fidl::encoding::Context) -> usize {
7322            1
7323        }
7324
7325        #[inline(always)]
7326        fn inline_size(_context: fidl::encoding::Context) -> usize {
7327            1
7328        }
7329    }
7330
7331    unsafe impl<D: fidl::encoding::ResourceDialect>
7332        fidl::encoding::Encode<BaseSocketGetMarkRequest, D> for &BaseSocketGetMarkRequest
7333    {
7334        #[inline]
7335        unsafe fn encode(
7336            self,
7337            encoder: &mut fidl::encoding::Encoder<'_, D>,
7338            offset: usize,
7339            _depth: fidl::encoding::Depth,
7340        ) -> fidl::Result<()> {
7341            encoder.debug_check_bounds::<BaseSocketGetMarkRequest>(offset);
7342            // Delegate to tuple encoding.
7343            fidl::encoding::Encode::<BaseSocketGetMarkRequest, D>::encode(
7344                (
7345                    <fidl_fuchsia_net__common::MarkDomain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
7346                ),
7347                encoder, offset, _depth
7348            )
7349        }
7350    }
7351    unsafe impl<
7352        D: fidl::encoding::ResourceDialect,
7353        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::MarkDomain, D>,
7354    > fidl::encoding::Encode<BaseSocketGetMarkRequest, D> for (T0,)
7355    {
7356        #[inline]
7357        unsafe fn encode(
7358            self,
7359            encoder: &mut fidl::encoding::Encoder<'_, D>,
7360            offset: usize,
7361            depth: fidl::encoding::Depth,
7362        ) -> fidl::Result<()> {
7363            encoder.debug_check_bounds::<BaseSocketGetMarkRequest>(offset);
7364            // Zero out padding regions. There's no need to apply masks
7365            // because the unmasked parts will be overwritten by fields.
7366            // Write the fields.
7367            self.0.encode(encoder, offset + 0, depth)?;
7368            Ok(())
7369        }
7370    }
7371
7372    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7373        for BaseSocketGetMarkRequest
7374    {
7375        #[inline(always)]
7376        fn new_empty() -> Self {
7377            Self { domain: fidl::new_empty!(fidl_fuchsia_net__common::MarkDomain, D) }
7378        }
7379
7380        #[inline]
7381        unsafe fn decode(
7382            &mut self,
7383            decoder: &mut fidl::encoding::Decoder<'_, D>,
7384            offset: usize,
7385            _depth: fidl::encoding::Depth,
7386        ) -> fidl::Result<()> {
7387            decoder.debug_check_bounds::<Self>(offset);
7388            // Verify that padding bytes are zero.
7389            fidl::decode!(
7390                fidl_fuchsia_net__common::MarkDomain,
7391                D,
7392                &mut self.domain,
7393                decoder,
7394                offset + 0,
7395                _depth
7396            )?;
7397            Ok(())
7398        }
7399    }
7400
7401    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBindToDeviceRequest {
7402        type Borrowed<'a> = &'a Self;
7403        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7404            value
7405        }
7406    }
7407
7408    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBindToDeviceRequest {
7409        type Owned = Self;
7410
7411        #[inline(always)]
7412        fn inline_align(_context: fidl::encoding::Context) -> usize {
7413            8
7414        }
7415
7416        #[inline(always)]
7417        fn inline_size(_context: fidl::encoding::Context) -> usize {
7418            16
7419        }
7420    }
7421
7422    unsafe impl<D: fidl::encoding::ResourceDialect>
7423        fidl::encoding::Encode<BaseSocketSetBindToDeviceRequest, D>
7424        for &BaseSocketSetBindToDeviceRequest
7425    {
7426        #[inline]
7427        unsafe fn encode(
7428            self,
7429            encoder: &mut fidl::encoding::Encoder<'_, D>,
7430            offset: usize,
7431            _depth: fidl::encoding::Depth,
7432        ) -> fidl::Result<()> {
7433            encoder.debug_check_bounds::<BaseSocketSetBindToDeviceRequest>(offset);
7434            // Delegate to tuple encoding.
7435            fidl::encoding::Encode::<BaseSocketSetBindToDeviceRequest, D>::encode(
7436                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
7437                    &self.value,
7438                ),),
7439                encoder,
7440                offset,
7441                _depth,
7442            )
7443        }
7444    }
7445    unsafe impl<
7446        D: fidl::encoding::ResourceDialect,
7447        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
7448    > fidl::encoding::Encode<BaseSocketSetBindToDeviceRequest, D> for (T0,)
7449    {
7450        #[inline]
7451        unsafe fn encode(
7452            self,
7453            encoder: &mut fidl::encoding::Encoder<'_, D>,
7454            offset: usize,
7455            depth: fidl::encoding::Depth,
7456        ) -> fidl::Result<()> {
7457            encoder.debug_check_bounds::<BaseSocketSetBindToDeviceRequest>(offset);
7458            // Zero out padding regions. There's no need to apply masks
7459            // because the unmasked parts will be overwritten by fields.
7460            // Write the fields.
7461            self.0.encode(encoder, offset + 0, depth)?;
7462            Ok(())
7463        }
7464    }
7465
7466    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7467        for BaseSocketSetBindToDeviceRequest
7468    {
7469        #[inline(always)]
7470        fn new_empty() -> Self {
7471            Self { value: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
7472        }
7473
7474        #[inline]
7475        unsafe fn decode(
7476            &mut self,
7477            decoder: &mut fidl::encoding::Decoder<'_, D>,
7478            offset: usize,
7479            _depth: fidl::encoding::Depth,
7480        ) -> fidl::Result<()> {
7481            decoder.debug_check_bounds::<Self>(offset);
7482            // Verify that padding bytes are zero.
7483            fidl::decode!(
7484                fidl::encoding::BoundedString<15>,
7485                D,
7486                &mut self.value,
7487                decoder,
7488                offset + 0,
7489                _depth
7490            )?;
7491            Ok(())
7492        }
7493    }
7494
7495    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBindToInterfaceIndexRequest {
7496        type Borrowed<'a> = &'a Self;
7497        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7498            value
7499        }
7500    }
7501
7502    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBindToInterfaceIndexRequest {
7503        type Owned = Self;
7504
7505        #[inline(always)]
7506        fn inline_align(_context: fidl::encoding::Context) -> usize {
7507            8
7508        }
7509
7510        #[inline(always)]
7511        fn inline_size(_context: fidl::encoding::Context) -> usize {
7512            8
7513        }
7514        #[inline(always)]
7515        fn encode_is_copy() -> bool {
7516            true
7517        }
7518
7519        #[inline(always)]
7520        fn decode_is_copy() -> bool {
7521            true
7522        }
7523    }
7524
7525    unsafe impl<D: fidl::encoding::ResourceDialect>
7526        fidl::encoding::Encode<BaseSocketSetBindToInterfaceIndexRequest, D>
7527        for &BaseSocketSetBindToInterfaceIndexRequest
7528    {
7529        #[inline]
7530        unsafe fn encode(
7531            self,
7532            encoder: &mut fidl::encoding::Encoder<'_, D>,
7533            offset: usize,
7534            _depth: fidl::encoding::Depth,
7535        ) -> fidl::Result<()> {
7536            encoder.debug_check_bounds::<BaseSocketSetBindToInterfaceIndexRequest>(offset);
7537            unsafe {
7538                // Copy the object into the buffer.
7539                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7540                (buf_ptr as *mut BaseSocketSetBindToInterfaceIndexRequest).write_unaligned(
7541                    (self as *const BaseSocketSetBindToInterfaceIndexRequest).read(),
7542                );
7543                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7544                // done second because the memcpy will write garbage to these bytes.
7545            }
7546            Ok(())
7547        }
7548    }
7549    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
7550        fidl::encoding::Encode<BaseSocketSetBindToInterfaceIndexRequest, D> for (T0,)
7551    {
7552        #[inline]
7553        unsafe fn encode(
7554            self,
7555            encoder: &mut fidl::encoding::Encoder<'_, D>,
7556            offset: usize,
7557            depth: fidl::encoding::Depth,
7558        ) -> fidl::Result<()> {
7559            encoder.debug_check_bounds::<BaseSocketSetBindToInterfaceIndexRequest>(offset);
7560            // Zero out padding regions. There's no need to apply masks
7561            // because the unmasked parts will be overwritten by fields.
7562            // Write the fields.
7563            self.0.encode(encoder, offset + 0, depth)?;
7564            Ok(())
7565        }
7566    }
7567
7568    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7569        for BaseSocketSetBindToInterfaceIndexRequest
7570    {
7571        #[inline(always)]
7572        fn new_empty() -> Self {
7573            Self { value: fidl::new_empty!(u64, D) }
7574        }
7575
7576        #[inline]
7577        unsafe fn decode(
7578            &mut self,
7579            decoder: &mut fidl::encoding::Decoder<'_, D>,
7580            offset: usize,
7581            _depth: fidl::encoding::Depth,
7582        ) -> fidl::Result<()> {
7583            decoder.debug_check_bounds::<Self>(offset);
7584            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7585            // Verify that padding bytes are zero.
7586            // Copy from the buffer into the object.
7587            unsafe {
7588                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7589            }
7590            Ok(())
7591        }
7592    }
7593
7594    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBroadcastRequest {
7595        type Borrowed<'a> = &'a Self;
7596        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7597            value
7598        }
7599    }
7600
7601    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBroadcastRequest {
7602        type Owned = Self;
7603
7604        #[inline(always)]
7605        fn inline_align(_context: fidl::encoding::Context) -> usize {
7606            1
7607        }
7608
7609        #[inline(always)]
7610        fn inline_size(_context: fidl::encoding::Context) -> usize {
7611            1
7612        }
7613    }
7614
7615    unsafe impl<D: fidl::encoding::ResourceDialect>
7616        fidl::encoding::Encode<BaseSocketSetBroadcastRequest, D>
7617        for &BaseSocketSetBroadcastRequest
7618    {
7619        #[inline]
7620        unsafe fn encode(
7621            self,
7622            encoder: &mut fidl::encoding::Encoder<'_, D>,
7623            offset: usize,
7624            _depth: fidl::encoding::Depth,
7625        ) -> fidl::Result<()> {
7626            encoder.debug_check_bounds::<BaseSocketSetBroadcastRequest>(offset);
7627            // Delegate to tuple encoding.
7628            fidl::encoding::Encode::<BaseSocketSetBroadcastRequest, D>::encode(
7629                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7630                encoder,
7631                offset,
7632                _depth,
7633            )
7634        }
7635    }
7636    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7637        fidl::encoding::Encode<BaseSocketSetBroadcastRequest, D> for (T0,)
7638    {
7639        #[inline]
7640        unsafe fn encode(
7641            self,
7642            encoder: &mut fidl::encoding::Encoder<'_, D>,
7643            offset: usize,
7644            depth: fidl::encoding::Depth,
7645        ) -> fidl::Result<()> {
7646            encoder.debug_check_bounds::<BaseSocketSetBroadcastRequest>(offset);
7647            // Zero out padding regions. There's no need to apply masks
7648            // because the unmasked parts will be overwritten by fields.
7649            // Write the fields.
7650            self.0.encode(encoder, offset + 0, depth)?;
7651            Ok(())
7652        }
7653    }
7654
7655    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7656        for BaseSocketSetBroadcastRequest
7657    {
7658        #[inline(always)]
7659        fn new_empty() -> Self {
7660            Self { value: fidl::new_empty!(bool, D) }
7661        }
7662
7663        #[inline]
7664        unsafe fn decode(
7665            &mut self,
7666            decoder: &mut fidl::encoding::Decoder<'_, D>,
7667            offset: usize,
7668            _depth: fidl::encoding::Depth,
7669        ) -> fidl::Result<()> {
7670            decoder.debug_check_bounds::<Self>(offset);
7671            // Verify that padding bytes are zero.
7672            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7673            Ok(())
7674        }
7675    }
7676
7677    impl fidl::encoding::ValueTypeMarker for BaseSocketSetKeepAliveRequest {
7678        type Borrowed<'a> = &'a Self;
7679        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7680            value
7681        }
7682    }
7683
7684    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetKeepAliveRequest {
7685        type Owned = Self;
7686
7687        #[inline(always)]
7688        fn inline_align(_context: fidl::encoding::Context) -> usize {
7689            1
7690        }
7691
7692        #[inline(always)]
7693        fn inline_size(_context: fidl::encoding::Context) -> usize {
7694            1
7695        }
7696    }
7697
7698    unsafe impl<D: fidl::encoding::ResourceDialect>
7699        fidl::encoding::Encode<BaseSocketSetKeepAliveRequest, D>
7700        for &BaseSocketSetKeepAliveRequest
7701    {
7702        #[inline]
7703        unsafe fn encode(
7704            self,
7705            encoder: &mut fidl::encoding::Encoder<'_, D>,
7706            offset: usize,
7707            _depth: fidl::encoding::Depth,
7708        ) -> fidl::Result<()> {
7709            encoder.debug_check_bounds::<BaseSocketSetKeepAliveRequest>(offset);
7710            // Delegate to tuple encoding.
7711            fidl::encoding::Encode::<BaseSocketSetKeepAliveRequest, D>::encode(
7712                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7713                encoder,
7714                offset,
7715                _depth,
7716            )
7717        }
7718    }
7719    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7720        fidl::encoding::Encode<BaseSocketSetKeepAliveRequest, D> for (T0,)
7721    {
7722        #[inline]
7723        unsafe fn encode(
7724            self,
7725            encoder: &mut fidl::encoding::Encoder<'_, D>,
7726            offset: usize,
7727            depth: fidl::encoding::Depth,
7728        ) -> fidl::Result<()> {
7729            encoder.debug_check_bounds::<BaseSocketSetKeepAliveRequest>(offset);
7730            // Zero out padding regions. There's no need to apply masks
7731            // because the unmasked parts will be overwritten by fields.
7732            // Write the fields.
7733            self.0.encode(encoder, offset + 0, depth)?;
7734            Ok(())
7735        }
7736    }
7737
7738    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7739        for BaseSocketSetKeepAliveRequest
7740    {
7741        #[inline(always)]
7742        fn new_empty() -> Self {
7743            Self { value: fidl::new_empty!(bool, D) }
7744        }
7745
7746        #[inline]
7747        unsafe fn decode(
7748            &mut self,
7749            decoder: &mut fidl::encoding::Decoder<'_, D>,
7750            offset: usize,
7751            _depth: fidl::encoding::Depth,
7752        ) -> fidl::Result<()> {
7753            decoder.debug_check_bounds::<Self>(offset);
7754            // Verify that padding bytes are zero.
7755            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7756            Ok(())
7757        }
7758    }
7759
7760    impl fidl::encoding::ValueTypeMarker for BaseSocketSetLingerRequest {
7761        type Borrowed<'a> = &'a Self;
7762        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7763            value
7764        }
7765    }
7766
7767    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetLingerRequest {
7768        type Owned = Self;
7769
7770        #[inline(always)]
7771        fn inline_align(_context: fidl::encoding::Context) -> usize {
7772            4
7773        }
7774
7775        #[inline(always)]
7776        fn inline_size(_context: fidl::encoding::Context) -> usize {
7777            8
7778        }
7779    }
7780
7781    unsafe impl<D: fidl::encoding::ResourceDialect>
7782        fidl::encoding::Encode<BaseSocketSetLingerRequest, D> for &BaseSocketSetLingerRequest
7783    {
7784        #[inline]
7785        unsafe fn encode(
7786            self,
7787            encoder: &mut fidl::encoding::Encoder<'_, D>,
7788            offset: usize,
7789            _depth: fidl::encoding::Depth,
7790        ) -> fidl::Result<()> {
7791            encoder.debug_check_bounds::<BaseSocketSetLingerRequest>(offset);
7792            // Delegate to tuple encoding.
7793            fidl::encoding::Encode::<BaseSocketSetLingerRequest, D>::encode(
7794                (
7795                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.linger),
7796                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length_secs),
7797                ),
7798                encoder,
7799                offset,
7800                _depth,
7801            )
7802        }
7803    }
7804    unsafe impl<
7805        D: fidl::encoding::ResourceDialect,
7806        T0: fidl::encoding::Encode<bool, D>,
7807        T1: fidl::encoding::Encode<u32, D>,
7808    > fidl::encoding::Encode<BaseSocketSetLingerRequest, D> for (T0, T1)
7809    {
7810        #[inline]
7811        unsafe fn encode(
7812            self,
7813            encoder: &mut fidl::encoding::Encoder<'_, D>,
7814            offset: usize,
7815            depth: fidl::encoding::Depth,
7816        ) -> fidl::Result<()> {
7817            encoder.debug_check_bounds::<BaseSocketSetLingerRequest>(offset);
7818            // Zero out padding regions. There's no need to apply masks
7819            // because the unmasked parts will be overwritten by fields.
7820            unsafe {
7821                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7822                (ptr as *mut u32).write_unaligned(0);
7823            }
7824            // Write the fields.
7825            self.0.encode(encoder, offset + 0, depth)?;
7826            self.1.encode(encoder, offset + 4, depth)?;
7827            Ok(())
7828        }
7829    }
7830
7831    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7832        for BaseSocketSetLingerRequest
7833    {
7834        #[inline(always)]
7835        fn new_empty() -> Self {
7836            Self { linger: fidl::new_empty!(bool, D), length_secs: fidl::new_empty!(u32, D) }
7837        }
7838
7839        #[inline]
7840        unsafe fn decode(
7841            &mut self,
7842            decoder: &mut fidl::encoding::Decoder<'_, D>,
7843            offset: usize,
7844            _depth: fidl::encoding::Depth,
7845        ) -> fidl::Result<()> {
7846            decoder.debug_check_bounds::<Self>(offset);
7847            // Verify that padding bytes are zero.
7848            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7849            let padval = unsafe { (ptr as *const u32).read_unaligned() };
7850            let mask = 0xffffff00u32;
7851            let maskedval = padval & mask;
7852            if maskedval != 0 {
7853                return Err(fidl::Error::NonZeroPadding {
7854                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7855                });
7856            }
7857            fidl::decode!(bool, D, &mut self.linger, decoder, offset + 0, _depth)?;
7858            fidl::decode!(u32, D, &mut self.length_secs, decoder, offset + 4, _depth)?;
7859            Ok(())
7860        }
7861    }
7862
7863    impl fidl::encoding::ValueTypeMarker for BaseSocketSetMarkRequest {
7864        type Borrowed<'a> = &'a Self;
7865        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7866            value
7867        }
7868    }
7869
7870    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetMarkRequest {
7871        type Owned = Self;
7872
7873        #[inline(always)]
7874        fn inline_align(_context: fidl::encoding::Context) -> usize {
7875            8
7876        }
7877
7878        #[inline(always)]
7879        fn inline_size(_context: fidl::encoding::Context) -> usize {
7880            24
7881        }
7882    }
7883
7884    unsafe impl<D: fidl::encoding::ResourceDialect>
7885        fidl::encoding::Encode<BaseSocketSetMarkRequest, D> for &BaseSocketSetMarkRequest
7886    {
7887        #[inline]
7888        unsafe fn encode(
7889            self,
7890            encoder: &mut fidl::encoding::Encoder<'_, D>,
7891            offset: usize,
7892            _depth: fidl::encoding::Depth,
7893        ) -> fidl::Result<()> {
7894            encoder.debug_check_bounds::<BaseSocketSetMarkRequest>(offset);
7895            // Delegate to tuple encoding.
7896            fidl::encoding::Encode::<BaseSocketSetMarkRequest, D>::encode(
7897                (
7898                    <fidl_fuchsia_net__common::MarkDomain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
7899                    <OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mark),
7900                ),
7901                encoder, offset, _depth
7902            )
7903        }
7904    }
7905    unsafe impl<
7906        D: fidl::encoding::ResourceDialect,
7907        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::MarkDomain, D>,
7908        T1: fidl::encoding::Encode<OptionalUint32, D>,
7909    > fidl::encoding::Encode<BaseSocketSetMarkRequest, D> for (T0, T1)
7910    {
7911        #[inline]
7912        unsafe fn encode(
7913            self,
7914            encoder: &mut fidl::encoding::Encoder<'_, D>,
7915            offset: usize,
7916            depth: fidl::encoding::Depth,
7917        ) -> fidl::Result<()> {
7918            encoder.debug_check_bounds::<BaseSocketSetMarkRequest>(offset);
7919            // Zero out padding regions. There's no need to apply masks
7920            // because the unmasked parts will be overwritten by fields.
7921            unsafe {
7922                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7923                (ptr as *mut u64).write_unaligned(0);
7924            }
7925            // Write the fields.
7926            self.0.encode(encoder, offset + 0, depth)?;
7927            self.1.encode(encoder, offset + 8, depth)?;
7928            Ok(())
7929        }
7930    }
7931
7932    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7933        for BaseSocketSetMarkRequest
7934    {
7935        #[inline(always)]
7936        fn new_empty() -> Self {
7937            Self {
7938                domain: fidl::new_empty!(fidl_fuchsia_net__common::MarkDomain, D),
7939                mark: fidl::new_empty!(OptionalUint32, D),
7940            }
7941        }
7942
7943        #[inline]
7944        unsafe fn decode(
7945            &mut self,
7946            decoder: &mut fidl::encoding::Decoder<'_, D>,
7947            offset: usize,
7948            _depth: fidl::encoding::Depth,
7949        ) -> fidl::Result<()> {
7950            decoder.debug_check_bounds::<Self>(offset);
7951            // Verify that padding bytes are zero.
7952            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7953            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7954            let mask = 0xffffffffffffff00u64;
7955            let maskedval = padval & mask;
7956            if maskedval != 0 {
7957                return Err(fidl::Error::NonZeroPadding {
7958                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7959                });
7960            }
7961            fidl::decode!(
7962                fidl_fuchsia_net__common::MarkDomain,
7963                D,
7964                &mut self.domain,
7965                decoder,
7966                offset + 0,
7967                _depth
7968            )?;
7969            fidl::decode!(OptionalUint32, D, &mut self.mark, decoder, offset + 8, _depth)?;
7970            Ok(())
7971        }
7972    }
7973
7974    impl fidl::encoding::ValueTypeMarker for BaseSocketSetNoCheckRequest {
7975        type Borrowed<'a> = &'a Self;
7976        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7977            value
7978        }
7979    }
7980
7981    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetNoCheckRequest {
7982        type Owned = Self;
7983
7984        #[inline(always)]
7985        fn inline_align(_context: fidl::encoding::Context) -> usize {
7986            1
7987        }
7988
7989        #[inline(always)]
7990        fn inline_size(_context: fidl::encoding::Context) -> usize {
7991            1
7992        }
7993    }
7994
7995    unsafe impl<D: fidl::encoding::ResourceDialect>
7996        fidl::encoding::Encode<BaseSocketSetNoCheckRequest, D> for &BaseSocketSetNoCheckRequest
7997    {
7998        #[inline]
7999        unsafe fn encode(
8000            self,
8001            encoder: &mut fidl::encoding::Encoder<'_, D>,
8002            offset: usize,
8003            _depth: fidl::encoding::Depth,
8004        ) -> fidl::Result<()> {
8005            encoder.debug_check_bounds::<BaseSocketSetNoCheckRequest>(offset);
8006            // Delegate to tuple encoding.
8007            fidl::encoding::Encode::<BaseSocketSetNoCheckRequest, D>::encode(
8008                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8009                encoder,
8010                offset,
8011                _depth,
8012            )
8013        }
8014    }
8015    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8016        fidl::encoding::Encode<BaseSocketSetNoCheckRequest, D> for (T0,)
8017    {
8018        #[inline]
8019        unsafe fn encode(
8020            self,
8021            encoder: &mut fidl::encoding::Encoder<'_, D>,
8022            offset: usize,
8023            depth: fidl::encoding::Depth,
8024        ) -> fidl::Result<()> {
8025            encoder.debug_check_bounds::<BaseSocketSetNoCheckRequest>(offset);
8026            // Zero out padding regions. There's no need to apply masks
8027            // because the unmasked parts will be overwritten by fields.
8028            // Write the fields.
8029            self.0.encode(encoder, offset + 0, depth)?;
8030            Ok(())
8031        }
8032    }
8033
8034    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8035        for BaseSocketSetNoCheckRequest
8036    {
8037        #[inline(always)]
8038        fn new_empty() -> Self {
8039            Self { value: fidl::new_empty!(bool, D) }
8040        }
8041
8042        #[inline]
8043        unsafe fn decode(
8044            &mut self,
8045            decoder: &mut fidl::encoding::Decoder<'_, D>,
8046            offset: usize,
8047            _depth: fidl::encoding::Depth,
8048        ) -> fidl::Result<()> {
8049            decoder.debug_check_bounds::<Self>(offset);
8050            // Verify that padding bytes are zero.
8051            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8052            Ok(())
8053        }
8054    }
8055
8056    impl fidl::encoding::ValueTypeMarker for BaseSocketSetOutOfBandInlineRequest {
8057        type Borrowed<'a> = &'a Self;
8058        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8059            value
8060        }
8061    }
8062
8063    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetOutOfBandInlineRequest {
8064        type Owned = Self;
8065
8066        #[inline(always)]
8067        fn inline_align(_context: fidl::encoding::Context) -> usize {
8068            1
8069        }
8070
8071        #[inline(always)]
8072        fn inline_size(_context: fidl::encoding::Context) -> usize {
8073            1
8074        }
8075    }
8076
8077    unsafe impl<D: fidl::encoding::ResourceDialect>
8078        fidl::encoding::Encode<BaseSocketSetOutOfBandInlineRequest, D>
8079        for &BaseSocketSetOutOfBandInlineRequest
8080    {
8081        #[inline]
8082        unsafe fn encode(
8083            self,
8084            encoder: &mut fidl::encoding::Encoder<'_, D>,
8085            offset: usize,
8086            _depth: fidl::encoding::Depth,
8087        ) -> fidl::Result<()> {
8088            encoder.debug_check_bounds::<BaseSocketSetOutOfBandInlineRequest>(offset);
8089            // Delegate to tuple encoding.
8090            fidl::encoding::Encode::<BaseSocketSetOutOfBandInlineRequest, D>::encode(
8091                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8092                encoder,
8093                offset,
8094                _depth,
8095            )
8096        }
8097    }
8098    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8099        fidl::encoding::Encode<BaseSocketSetOutOfBandInlineRequest, D> for (T0,)
8100    {
8101        #[inline]
8102        unsafe fn encode(
8103            self,
8104            encoder: &mut fidl::encoding::Encoder<'_, D>,
8105            offset: usize,
8106            depth: fidl::encoding::Depth,
8107        ) -> fidl::Result<()> {
8108            encoder.debug_check_bounds::<BaseSocketSetOutOfBandInlineRequest>(offset);
8109            // Zero out padding regions. There's no need to apply masks
8110            // because the unmasked parts will be overwritten by fields.
8111            // Write the fields.
8112            self.0.encode(encoder, offset + 0, depth)?;
8113            Ok(())
8114        }
8115    }
8116
8117    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8118        for BaseSocketSetOutOfBandInlineRequest
8119    {
8120        #[inline(always)]
8121        fn new_empty() -> Self {
8122            Self { value: fidl::new_empty!(bool, D) }
8123        }
8124
8125        #[inline]
8126        unsafe fn decode(
8127            &mut self,
8128            decoder: &mut fidl::encoding::Decoder<'_, D>,
8129            offset: usize,
8130            _depth: fidl::encoding::Depth,
8131        ) -> fidl::Result<()> {
8132            decoder.debug_check_bounds::<Self>(offset);
8133            // Verify that padding bytes are zero.
8134            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8135            Ok(())
8136        }
8137    }
8138
8139    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReceiveBufferRequest {
8140        type Borrowed<'a> = &'a Self;
8141        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8142            value
8143        }
8144    }
8145
8146    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReceiveBufferRequest {
8147        type Owned = Self;
8148
8149        #[inline(always)]
8150        fn inline_align(_context: fidl::encoding::Context) -> usize {
8151            8
8152        }
8153
8154        #[inline(always)]
8155        fn inline_size(_context: fidl::encoding::Context) -> usize {
8156            8
8157        }
8158        #[inline(always)]
8159        fn encode_is_copy() -> bool {
8160            true
8161        }
8162
8163        #[inline(always)]
8164        fn decode_is_copy() -> bool {
8165            true
8166        }
8167    }
8168
8169    unsafe impl<D: fidl::encoding::ResourceDialect>
8170        fidl::encoding::Encode<BaseSocketSetReceiveBufferRequest, D>
8171        for &BaseSocketSetReceiveBufferRequest
8172    {
8173        #[inline]
8174        unsafe fn encode(
8175            self,
8176            encoder: &mut fidl::encoding::Encoder<'_, D>,
8177            offset: usize,
8178            _depth: fidl::encoding::Depth,
8179        ) -> fidl::Result<()> {
8180            encoder.debug_check_bounds::<BaseSocketSetReceiveBufferRequest>(offset);
8181            unsafe {
8182                // Copy the object into the buffer.
8183                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8184                (buf_ptr as *mut BaseSocketSetReceiveBufferRequest)
8185                    .write_unaligned((self as *const BaseSocketSetReceiveBufferRequest).read());
8186                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8187                // done second because the memcpy will write garbage to these bytes.
8188            }
8189            Ok(())
8190        }
8191    }
8192    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8193        fidl::encoding::Encode<BaseSocketSetReceiveBufferRequest, D> for (T0,)
8194    {
8195        #[inline]
8196        unsafe fn encode(
8197            self,
8198            encoder: &mut fidl::encoding::Encoder<'_, D>,
8199            offset: usize,
8200            depth: fidl::encoding::Depth,
8201        ) -> fidl::Result<()> {
8202            encoder.debug_check_bounds::<BaseSocketSetReceiveBufferRequest>(offset);
8203            // Zero out padding regions. There's no need to apply masks
8204            // because the unmasked parts will be overwritten by fields.
8205            // Write the fields.
8206            self.0.encode(encoder, offset + 0, depth)?;
8207            Ok(())
8208        }
8209    }
8210
8211    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8212        for BaseSocketSetReceiveBufferRequest
8213    {
8214        #[inline(always)]
8215        fn new_empty() -> Self {
8216            Self { value_bytes: fidl::new_empty!(u64, D) }
8217        }
8218
8219        #[inline]
8220        unsafe fn decode(
8221            &mut self,
8222            decoder: &mut fidl::encoding::Decoder<'_, D>,
8223            offset: usize,
8224            _depth: fidl::encoding::Depth,
8225        ) -> fidl::Result<()> {
8226            decoder.debug_check_bounds::<Self>(offset);
8227            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8228            // Verify that padding bytes are zero.
8229            // Copy from the buffer into the object.
8230            unsafe {
8231                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8232            }
8233            Ok(())
8234        }
8235    }
8236
8237    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReuseAddressRequest {
8238        type Borrowed<'a> = &'a Self;
8239        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8240            value
8241        }
8242    }
8243
8244    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReuseAddressRequest {
8245        type Owned = Self;
8246
8247        #[inline(always)]
8248        fn inline_align(_context: fidl::encoding::Context) -> usize {
8249            1
8250        }
8251
8252        #[inline(always)]
8253        fn inline_size(_context: fidl::encoding::Context) -> usize {
8254            1
8255        }
8256    }
8257
8258    unsafe impl<D: fidl::encoding::ResourceDialect>
8259        fidl::encoding::Encode<BaseSocketSetReuseAddressRequest, D>
8260        for &BaseSocketSetReuseAddressRequest
8261    {
8262        #[inline]
8263        unsafe fn encode(
8264            self,
8265            encoder: &mut fidl::encoding::Encoder<'_, D>,
8266            offset: usize,
8267            _depth: fidl::encoding::Depth,
8268        ) -> fidl::Result<()> {
8269            encoder.debug_check_bounds::<BaseSocketSetReuseAddressRequest>(offset);
8270            // Delegate to tuple encoding.
8271            fidl::encoding::Encode::<BaseSocketSetReuseAddressRequest, D>::encode(
8272                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8273                encoder,
8274                offset,
8275                _depth,
8276            )
8277        }
8278    }
8279    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8280        fidl::encoding::Encode<BaseSocketSetReuseAddressRequest, D> for (T0,)
8281    {
8282        #[inline]
8283        unsafe fn encode(
8284            self,
8285            encoder: &mut fidl::encoding::Encoder<'_, D>,
8286            offset: usize,
8287            depth: fidl::encoding::Depth,
8288        ) -> fidl::Result<()> {
8289            encoder.debug_check_bounds::<BaseSocketSetReuseAddressRequest>(offset);
8290            // Zero out padding regions. There's no need to apply masks
8291            // because the unmasked parts will be overwritten by fields.
8292            // Write the fields.
8293            self.0.encode(encoder, offset + 0, depth)?;
8294            Ok(())
8295        }
8296    }
8297
8298    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8299        for BaseSocketSetReuseAddressRequest
8300    {
8301        #[inline(always)]
8302        fn new_empty() -> Self {
8303            Self { value: fidl::new_empty!(bool, D) }
8304        }
8305
8306        #[inline]
8307        unsafe fn decode(
8308            &mut self,
8309            decoder: &mut fidl::encoding::Decoder<'_, D>,
8310            offset: usize,
8311            _depth: fidl::encoding::Depth,
8312        ) -> fidl::Result<()> {
8313            decoder.debug_check_bounds::<Self>(offset);
8314            // Verify that padding bytes are zero.
8315            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8316            Ok(())
8317        }
8318    }
8319
8320    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReusePortRequest {
8321        type Borrowed<'a> = &'a Self;
8322        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8323            value
8324        }
8325    }
8326
8327    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReusePortRequest {
8328        type Owned = Self;
8329
8330        #[inline(always)]
8331        fn inline_align(_context: fidl::encoding::Context) -> usize {
8332            1
8333        }
8334
8335        #[inline(always)]
8336        fn inline_size(_context: fidl::encoding::Context) -> usize {
8337            1
8338        }
8339    }
8340
8341    unsafe impl<D: fidl::encoding::ResourceDialect>
8342        fidl::encoding::Encode<BaseSocketSetReusePortRequest, D>
8343        for &BaseSocketSetReusePortRequest
8344    {
8345        #[inline]
8346        unsafe fn encode(
8347            self,
8348            encoder: &mut fidl::encoding::Encoder<'_, D>,
8349            offset: usize,
8350            _depth: fidl::encoding::Depth,
8351        ) -> fidl::Result<()> {
8352            encoder.debug_check_bounds::<BaseSocketSetReusePortRequest>(offset);
8353            // Delegate to tuple encoding.
8354            fidl::encoding::Encode::<BaseSocketSetReusePortRequest, D>::encode(
8355                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8356                encoder,
8357                offset,
8358                _depth,
8359            )
8360        }
8361    }
8362    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8363        fidl::encoding::Encode<BaseSocketSetReusePortRequest, D> for (T0,)
8364    {
8365        #[inline]
8366        unsafe fn encode(
8367            self,
8368            encoder: &mut fidl::encoding::Encoder<'_, D>,
8369            offset: usize,
8370            depth: fidl::encoding::Depth,
8371        ) -> fidl::Result<()> {
8372            encoder.debug_check_bounds::<BaseSocketSetReusePortRequest>(offset);
8373            // Zero out padding regions. There's no need to apply masks
8374            // because the unmasked parts will be overwritten by fields.
8375            // Write the fields.
8376            self.0.encode(encoder, offset + 0, depth)?;
8377            Ok(())
8378        }
8379    }
8380
8381    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8382        for BaseSocketSetReusePortRequest
8383    {
8384        #[inline(always)]
8385        fn new_empty() -> Self {
8386            Self { value: fidl::new_empty!(bool, D) }
8387        }
8388
8389        #[inline]
8390        unsafe fn decode(
8391            &mut self,
8392            decoder: &mut fidl::encoding::Decoder<'_, D>,
8393            offset: usize,
8394            _depth: fidl::encoding::Depth,
8395        ) -> fidl::Result<()> {
8396            decoder.debug_check_bounds::<Self>(offset);
8397            // Verify that padding bytes are zero.
8398            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8399            Ok(())
8400        }
8401    }
8402
8403    impl fidl::encoding::ValueTypeMarker for BaseSocketSetSendBufferRequest {
8404        type Borrowed<'a> = &'a Self;
8405        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8406            value
8407        }
8408    }
8409
8410    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetSendBufferRequest {
8411        type Owned = Self;
8412
8413        #[inline(always)]
8414        fn inline_align(_context: fidl::encoding::Context) -> usize {
8415            8
8416        }
8417
8418        #[inline(always)]
8419        fn inline_size(_context: fidl::encoding::Context) -> usize {
8420            8
8421        }
8422        #[inline(always)]
8423        fn encode_is_copy() -> bool {
8424            true
8425        }
8426
8427        #[inline(always)]
8428        fn decode_is_copy() -> bool {
8429            true
8430        }
8431    }
8432
8433    unsafe impl<D: fidl::encoding::ResourceDialect>
8434        fidl::encoding::Encode<BaseSocketSetSendBufferRequest, D>
8435        for &BaseSocketSetSendBufferRequest
8436    {
8437        #[inline]
8438        unsafe fn encode(
8439            self,
8440            encoder: &mut fidl::encoding::Encoder<'_, D>,
8441            offset: usize,
8442            _depth: fidl::encoding::Depth,
8443        ) -> fidl::Result<()> {
8444            encoder.debug_check_bounds::<BaseSocketSetSendBufferRequest>(offset);
8445            unsafe {
8446                // Copy the object into the buffer.
8447                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8448                (buf_ptr as *mut BaseSocketSetSendBufferRequest)
8449                    .write_unaligned((self as *const BaseSocketSetSendBufferRequest).read());
8450                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8451                // done second because the memcpy will write garbage to these bytes.
8452            }
8453            Ok(())
8454        }
8455    }
8456    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8457        fidl::encoding::Encode<BaseSocketSetSendBufferRequest, D> for (T0,)
8458    {
8459        #[inline]
8460        unsafe fn encode(
8461            self,
8462            encoder: &mut fidl::encoding::Encoder<'_, D>,
8463            offset: usize,
8464            depth: fidl::encoding::Depth,
8465        ) -> fidl::Result<()> {
8466            encoder.debug_check_bounds::<BaseSocketSetSendBufferRequest>(offset);
8467            // Zero out padding regions. There's no need to apply masks
8468            // because the unmasked parts will be overwritten by fields.
8469            // Write the fields.
8470            self.0.encode(encoder, offset + 0, depth)?;
8471            Ok(())
8472        }
8473    }
8474
8475    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8476        for BaseSocketSetSendBufferRequest
8477    {
8478        #[inline(always)]
8479        fn new_empty() -> Self {
8480            Self { value_bytes: fidl::new_empty!(u64, D) }
8481        }
8482
8483        #[inline]
8484        unsafe fn decode(
8485            &mut self,
8486            decoder: &mut fidl::encoding::Decoder<'_, D>,
8487            offset: usize,
8488            _depth: fidl::encoding::Depth,
8489        ) -> fidl::Result<()> {
8490            decoder.debug_check_bounds::<Self>(offset);
8491            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8492            // Verify that padding bytes are zero.
8493            // Copy from the buffer into the object.
8494            unsafe {
8495                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8496            }
8497            Ok(())
8498        }
8499    }
8500
8501    impl fidl::encoding::ValueTypeMarker for BaseSocketSetTimestampRequest {
8502        type Borrowed<'a> = &'a Self;
8503        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8504            value
8505        }
8506    }
8507
8508    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetTimestampRequest {
8509        type Owned = Self;
8510
8511        #[inline(always)]
8512        fn inline_align(_context: fidl::encoding::Context) -> usize {
8513            4
8514        }
8515
8516        #[inline(always)]
8517        fn inline_size(_context: fidl::encoding::Context) -> usize {
8518            4
8519        }
8520    }
8521
8522    unsafe impl<D: fidl::encoding::ResourceDialect>
8523        fidl::encoding::Encode<BaseSocketSetTimestampRequest, D>
8524        for &BaseSocketSetTimestampRequest
8525    {
8526        #[inline]
8527        unsafe fn encode(
8528            self,
8529            encoder: &mut fidl::encoding::Encoder<'_, D>,
8530            offset: usize,
8531            _depth: fidl::encoding::Depth,
8532        ) -> fidl::Result<()> {
8533            encoder.debug_check_bounds::<BaseSocketSetTimestampRequest>(offset);
8534            // Delegate to tuple encoding.
8535            fidl::encoding::Encode::<BaseSocketSetTimestampRequest, D>::encode(
8536                (<TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8537                encoder,
8538                offset,
8539                _depth,
8540            )
8541        }
8542    }
8543    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TimestampOption, D>>
8544        fidl::encoding::Encode<BaseSocketSetTimestampRequest, D> for (T0,)
8545    {
8546        #[inline]
8547        unsafe fn encode(
8548            self,
8549            encoder: &mut fidl::encoding::Encoder<'_, D>,
8550            offset: usize,
8551            depth: fidl::encoding::Depth,
8552        ) -> fidl::Result<()> {
8553            encoder.debug_check_bounds::<BaseSocketSetTimestampRequest>(offset);
8554            // Zero out padding regions. There's no need to apply masks
8555            // because the unmasked parts will be overwritten by fields.
8556            // Write the fields.
8557            self.0.encode(encoder, offset + 0, depth)?;
8558            Ok(())
8559        }
8560    }
8561
8562    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8563        for BaseSocketSetTimestampRequest
8564    {
8565        #[inline(always)]
8566        fn new_empty() -> Self {
8567            Self { value: fidl::new_empty!(TimestampOption, D) }
8568        }
8569
8570        #[inline]
8571        unsafe fn decode(
8572            &mut self,
8573            decoder: &mut fidl::encoding::Decoder<'_, D>,
8574            offset: usize,
8575            _depth: fidl::encoding::Depth,
8576        ) -> fidl::Result<()> {
8577            decoder.debug_check_bounds::<Self>(offset);
8578            // Verify that padding bytes are zero.
8579            fidl::decode!(TimestampOption, D, &mut self.value, decoder, offset + 0, _depth)?;
8580            Ok(())
8581        }
8582    }
8583
8584    impl fidl::encoding::ValueTypeMarker for BaseSocketGetAcceptConnResponse {
8585        type Borrowed<'a> = &'a Self;
8586        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8587            value
8588        }
8589    }
8590
8591    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetAcceptConnResponse {
8592        type Owned = Self;
8593
8594        #[inline(always)]
8595        fn inline_align(_context: fidl::encoding::Context) -> usize {
8596            1
8597        }
8598
8599        #[inline(always)]
8600        fn inline_size(_context: fidl::encoding::Context) -> usize {
8601            1
8602        }
8603    }
8604
8605    unsafe impl<D: fidl::encoding::ResourceDialect>
8606        fidl::encoding::Encode<BaseSocketGetAcceptConnResponse, D>
8607        for &BaseSocketGetAcceptConnResponse
8608    {
8609        #[inline]
8610        unsafe fn encode(
8611            self,
8612            encoder: &mut fidl::encoding::Encoder<'_, D>,
8613            offset: usize,
8614            _depth: fidl::encoding::Depth,
8615        ) -> fidl::Result<()> {
8616            encoder.debug_check_bounds::<BaseSocketGetAcceptConnResponse>(offset);
8617            // Delegate to tuple encoding.
8618            fidl::encoding::Encode::<BaseSocketGetAcceptConnResponse, D>::encode(
8619                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8620                encoder,
8621                offset,
8622                _depth,
8623            )
8624        }
8625    }
8626    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8627        fidl::encoding::Encode<BaseSocketGetAcceptConnResponse, D> for (T0,)
8628    {
8629        #[inline]
8630        unsafe fn encode(
8631            self,
8632            encoder: &mut fidl::encoding::Encoder<'_, D>,
8633            offset: usize,
8634            depth: fidl::encoding::Depth,
8635        ) -> fidl::Result<()> {
8636            encoder.debug_check_bounds::<BaseSocketGetAcceptConnResponse>(offset);
8637            // Zero out padding regions. There's no need to apply masks
8638            // because the unmasked parts will be overwritten by fields.
8639            // Write the fields.
8640            self.0.encode(encoder, offset + 0, depth)?;
8641            Ok(())
8642        }
8643    }
8644
8645    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8646        for BaseSocketGetAcceptConnResponse
8647    {
8648        #[inline(always)]
8649        fn new_empty() -> Self {
8650            Self { value: fidl::new_empty!(bool, D) }
8651        }
8652
8653        #[inline]
8654        unsafe fn decode(
8655            &mut self,
8656            decoder: &mut fidl::encoding::Decoder<'_, D>,
8657            offset: usize,
8658            _depth: fidl::encoding::Depth,
8659        ) -> fidl::Result<()> {
8660            decoder.debug_check_bounds::<Self>(offset);
8661            // Verify that padding bytes are zero.
8662            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8663            Ok(())
8664        }
8665    }
8666
8667    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBindToDeviceResponse {
8668        type Borrowed<'a> = &'a Self;
8669        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8670            value
8671        }
8672    }
8673
8674    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBindToDeviceResponse {
8675        type Owned = Self;
8676
8677        #[inline(always)]
8678        fn inline_align(_context: fidl::encoding::Context) -> usize {
8679            8
8680        }
8681
8682        #[inline(always)]
8683        fn inline_size(_context: fidl::encoding::Context) -> usize {
8684            16
8685        }
8686    }
8687
8688    unsafe impl<D: fidl::encoding::ResourceDialect>
8689        fidl::encoding::Encode<BaseSocketGetBindToDeviceResponse, D>
8690        for &BaseSocketGetBindToDeviceResponse
8691    {
8692        #[inline]
8693        unsafe fn encode(
8694            self,
8695            encoder: &mut fidl::encoding::Encoder<'_, D>,
8696            offset: usize,
8697            _depth: fidl::encoding::Depth,
8698        ) -> fidl::Result<()> {
8699            encoder.debug_check_bounds::<BaseSocketGetBindToDeviceResponse>(offset);
8700            // Delegate to tuple encoding.
8701            fidl::encoding::Encode::<BaseSocketGetBindToDeviceResponse, D>::encode(
8702                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
8703                    &self.value,
8704                ),),
8705                encoder,
8706                offset,
8707                _depth,
8708            )
8709        }
8710    }
8711    unsafe impl<
8712        D: fidl::encoding::ResourceDialect,
8713        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
8714    > fidl::encoding::Encode<BaseSocketGetBindToDeviceResponse, D> for (T0,)
8715    {
8716        #[inline]
8717        unsafe fn encode(
8718            self,
8719            encoder: &mut fidl::encoding::Encoder<'_, D>,
8720            offset: usize,
8721            depth: fidl::encoding::Depth,
8722        ) -> fidl::Result<()> {
8723            encoder.debug_check_bounds::<BaseSocketGetBindToDeviceResponse>(offset);
8724            // Zero out padding regions. There's no need to apply masks
8725            // because the unmasked parts will be overwritten by fields.
8726            // Write the fields.
8727            self.0.encode(encoder, offset + 0, depth)?;
8728            Ok(())
8729        }
8730    }
8731
8732    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8733        for BaseSocketGetBindToDeviceResponse
8734    {
8735        #[inline(always)]
8736        fn new_empty() -> Self {
8737            Self { value: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
8738        }
8739
8740        #[inline]
8741        unsafe fn decode(
8742            &mut self,
8743            decoder: &mut fidl::encoding::Decoder<'_, D>,
8744            offset: usize,
8745            _depth: fidl::encoding::Depth,
8746        ) -> fidl::Result<()> {
8747            decoder.debug_check_bounds::<Self>(offset);
8748            // Verify that padding bytes are zero.
8749            fidl::decode!(
8750                fidl::encoding::BoundedString<15>,
8751                D,
8752                &mut self.value,
8753                decoder,
8754                offset + 0,
8755                _depth
8756            )?;
8757            Ok(())
8758        }
8759    }
8760
8761    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBindToInterfaceIndexResponse {
8762        type Borrowed<'a> = &'a Self;
8763        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8764            value
8765        }
8766    }
8767
8768    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBindToInterfaceIndexResponse {
8769        type Owned = Self;
8770
8771        #[inline(always)]
8772        fn inline_align(_context: fidl::encoding::Context) -> usize {
8773            8
8774        }
8775
8776        #[inline(always)]
8777        fn inline_size(_context: fidl::encoding::Context) -> usize {
8778            8
8779        }
8780        #[inline(always)]
8781        fn encode_is_copy() -> bool {
8782            true
8783        }
8784
8785        #[inline(always)]
8786        fn decode_is_copy() -> bool {
8787            true
8788        }
8789    }
8790
8791    unsafe impl<D: fidl::encoding::ResourceDialect>
8792        fidl::encoding::Encode<BaseSocketGetBindToInterfaceIndexResponse, D>
8793        for &BaseSocketGetBindToInterfaceIndexResponse
8794    {
8795        #[inline]
8796        unsafe fn encode(
8797            self,
8798            encoder: &mut fidl::encoding::Encoder<'_, D>,
8799            offset: usize,
8800            _depth: fidl::encoding::Depth,
8801        ) -> fidl::Result<()> {
8802            encoder.debug_check_bounds::<BaseSocketGetBindToInterfaceIndexResponse>(offset);
8803            unsafe {
8804                // Copy the object into the buffer.
8805                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8806                (buf_ptr as *mut BaseSocketGetBindToInterfaceIndexResponse).write_unaligned(
8807                    (self as *const BaseSocketGetBindToInterfaceIndexResponse).read(),
8808                );
8809                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8810                // done second because the memcpy will write garbage to these bytes.
8811            }
8812            Ok(())
8813        }
8814    }
8815    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8816        fidl::encoding::Encode<BaseSocketGetBindToInterfaceIndexResponse, D> for (T0,)
8817    {
8818        #[inline]
8819        unsafe fn encode(
8820            self,
8821            encoder: &mut fidl::encoding::Encoder<'_, D>,
8822            offset: usize,
8823            depth: fidl::encoding::Depth,
8824        ) -> fidl::Result<()> {
8825            encoder.debug_check_bounds::<BaseSocketGetBindToInterfaceIndexResponse>(offset);
8826            // Zero out padding regions. There's no need to apply masks
8827            // because the unmasked parts will be overwritten by fields.
8828            // Write the fields.
8829            self.0.encode(encoder, offset + 0, depth)?;
8830            Ok(())
8831        }
8832    }
8833
8834    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8835        for BaseSocketGetBindToInterfaceIndexResponse
8836    {
8837        #[inline(always)]
8838        fn new_empty() -> Self {
8839            Self { value: fidl::new_empty!(u64, D) }
8840        }
8841
8842        #[inline]
8843        unsafe fn decode(
8844            &mut self,
8845            decoder: &mut fidl::encoding::Decoder<'_, D>,
8846            offset: usize,
8847            _depth: fidl::encoding::Depth,
8848        ) -> fidl::Result<()> {
8849            decoder.debug_check_bounds::<Self>(offset);
8850            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8851            // Verify that padding bytes are zero.
8852            // Copy from the buffer into the object.
8853            unsafe {
8854                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8855            }
8856            Ok(())
8857        }
8858    }
8859
8860    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBroadcastResponse {
8861        type Borrowed<'a> = &'a Self;
8862        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8863            value
8864        }
8865    }
8866
8867    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBroadcastResponse {
8868        type Owned = Self;
8869
8870        #[inline(always)]
8871        fn inline_align(_context: fidl::encoding::Context) -> usize {
8872            1
8873        }
8874
8875        #[inline(always)]
8876        fn inline_size(_context: fidl::encoding::Context) -> usize {
8877            1
8878        }
8879    }
8880
8881    unsafe impl<D: fidl::encoding::ResourceDialect>
8882        fidl::encoding::Encode<BaseSocketGetBroadcastResponse, D>
8883        for &BaseSocketGetBroadcastResponse
8884    {
8885        #[inline]
8886        unsafe fn encode(
8887            self,
8888            encoder: &mut fidl::encoding::Encoder<'_, D>,
8889            offset: usize,
8890            _depth: fidl::encoding::Depth,
8891        ) -> fidl::Result<()> {
8892            encoder.debug_check_bounds::<BaseSocketGetBroadcastResponse>(offset);
8893            // Delegate to tuple encoding.
8894            fidl::encoding::Encode::<BaseSocketGetBroadcastResponse, D>::encode(
8895                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8896                encoder,
8897                offset,
8898                _depth,
8899            )
8900        }
8901    }
8902    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8903        fidl::encoding::Encode<BaseSocketGetBroadcastResponse, D> for (T0,)
8904    {
8905        #[inline]
8906        unsafe fn encode(
8907            self,
8908            encoder: &mut fidl::encoding::Encoder<'_, D>,
8909            offset: usize,
8910            depth: fidl::encoding::Depth,
8911        ) -> fidl::Result<()> {
8912            encoder.debug_check_bounds::<BaseSocketGetBroadcastResponse>(offset);
8913            // Zero out padding regions. There's no need to apply masks
8914            // because the unmasked parts will be overwritten by fields.
8915            // Write the fields.
8916            self.0.encode(encoder, offset + 0, depth)?;
8917            Ok(())
8918        }
8919    }
8920
8921    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8922        for BaseSocketGetBroadcastResponse
8923    {
8924        #[inline(always)]
8925        fn new_empty() -> Self {
8926            Self { value: fidl::new_empty!(bool, D) }
8927        }
8928
8929        #[inline]
8930        unsafe fn decode(
8931            &mut self,
8932            decoder: &mut fidl::encoding::Decoder<'_, D>,
8933            offset: usize,
8934            _depth: fidl::encoding::Depth,
8935        ) -> fidl::Result<()> {
8936            decoder.debug_check_bounds::<Self>(offset);
8937            // Verify that padding bytes are zero.
8938            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8939            Ok(())
8940        }
8941    }
8942
8943    impl fidl::encoding::ValueTypeMarker for BaseSocketGetCookieResponse {
8944        type Borrowed<'a> = &'a Self;
8945        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8946            value
8947        }
8948    }
8949
8950    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetCookieResponse {
8951        type Owned = Self;
8952
8953        #[inline(always)]
8954        fn inline_align(_context: fidl::encoding::Context) -> usize {
8955            8
8956        }
8957
8958        #[inline(always)]
8959        fn inline_size(_context: fidl::encoding::Context) -> usize {
8960            8
8961        }
8962        #[inline(always)]
8963        fn encode_is_copy() -> bool {
8964            true
8965        }
8966
8967        #[inline(always)]
8968        fn decode_is_copy() -> bool {
8969            true
8970        }
8971    }
8972
8973    unsafe impl<D: fidl::encoding::ResourceDialect>
8974        fidl::encoding::Encode<BaseSocketGetCookieResponse, D> for &BaseSocketGetCookieResponse
8975    {
8976        #[inline]
8977        unsafe fn encode(
8978            self,
8979            encoder: &mut fidl::encoding::Encoder<'_, D>,
8980            offset: usize,
8981            _depth: fidl::encoding::Depth,
8982        ) -> fidl::Result<()> {
8983            encoder.debug_check_bounds::<BaseSocketGetCookieResponse>(offset);
8984            unsafe {
8985                // Copy the object into the buffer.
8986                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8987                (buf_ptr as *mut BaseSocketGetCookieResponse)
8988                    .write_unaligned((self as *const BaseSocketGetCookieResponse).read());
8989                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8990                // done second because the memcpy will write garbage to these bytes.
8991            }
8992            Ok(())
8993        }
8994    }
8995    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8996        fidl::encoding::Encode<BaseSocketGetCookieResponse, D> for (T0,)
8997    {
8998        #[inline]
8999        unsafe fn encode(
9000            self,
9001            encoder: &mut fidl::encoding::Encoder<'_, D>,
9002            offset: usize,
9003            depth: fidl::encoding::Depth,
9004        ) -> fidl::Result<()> {
9005            encoder.debug_check_bounds::<BaseSocketGetCookieResponse>(offset);
9006            // Zero out padding regions. There's no need to apply masks
9007            // because the unmasked parts will be overwritten by fields.
9008            // Write the fields.
9009            self.0.encode(encoder, offset + 0, depth)?;
9010            Ok(())
9011        }
9012    }
9013
9014    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9015        for BaseSocketGetCookieResponse
9016    {
9017        #[inline(always)]
9018        fn new_empty() -> Self {
9019            Self { value: fidl::new_empty!(u64, D) }
9020        }
9021
9022        #[inline]
9023        unsafe fn decode(
9024            &mut self,
9025            decoder: &mut fidl::encoding::Decoder<'_, D>,
9026            offset: usize,
9027            _depth: fidl::encoding::Depth,
9028        ) -> fidl::Result<()> {
9029            decoder.debug_check_bounds::<Self>(offset);
9030            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9031            // Verify that padding bytes are zero.
9032            // Copy from the buffer into the object.
9033            unsafe {
9034                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9035            }
9036            Ok(())
9037        }
9038    }
9039
9040    impl fidl::encoding::ValueTypeMarker for BaseSocketGetKeepAliveResponse {
9041        type Borrowed<'a> = &'a Self;
9042        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9043            value
9044        }
9045    }
9046
9047    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetKeepAliveResponse {
9048        type Owned = Self;
9049
9050        #[inline(always)]
9051        fn inline_align(_context: fidl::encoding::Context) -> usize {
9052            1
9053        }
9054
9055        #[inline(always)]
9056        fn inline_size(_context: fidl::encoding::Context) -> usize {
9057            1
9058        }
9059    }
9060
9061    unsafe impl<D: fidl::encoding::ResourceDialect>
9062        fidl::encoding::Encode<BaseSocketGetKeepAliveResponse, D>
9063        for &BaseSocketGetKeepAliveResponse
9064    {
9065        #[inline]
9066        unsafe fn encode(
9067            self,
9068            encoder: &mut fidl::encoding::Encoder<'_, D>,
9069            offset: usize,
9070            _depth: fidl::encoding::Depth,
9071        ) -> fidl::Result<()> {
9072            encoder.debug_check_bounds::<BaseSocketGetKeepAliveResponse>(offset);
9073            // Delegate to tuple encoding.
9074            fidl::encoding::Encode::<BaseSocketGetKeepAliveResponse, D>::encode(
9075                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9076                encoder,
9077                offset,
9078                _depth,
9079            )
9080        }
9081    }
9082    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9083        fidl::encoding::Encode<BaseSocketGetKeepAliveResponse, D> for (T0,)
9084    {
9085        #[inline]
9086        unsafe fn encode(
9087            self,
9088            encoder: &mut fidl::encoding::Encoder<'_, D>,
9089            offset: usize,
9090            depth: fidl::encoding::Depth,
9091        ) -> fidl::Result<()> {
9092            encoder.debug_check_bounds::<BaseSocketGetKeepAliveResponse>(offset);
9093            // Zero out padding regions. There's no need to apply masks
9094            // because the unmasked parts will be overwritten by fields.
9095            // Write the fields.
9096            self.0.encode(encoder, offset + 0, depth)?;
9097            Ok(())
9098        }
9099    }
9100
9101    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9102        for BaseSocketGetKeepAliveResponse
9103    {
9104        #[inline(always)]
9105        fn new_empty() -> Self {
9106            Self { value: fidl::new_empty!(bool, D) }
9107        }
9108
9109        #[inline]
9110        unsafe fn decode(
9111            &mut self,
9112            decoder: &mut fidl::encoding::Decoder<'_, D>,
9113            offset: usize,
9114            _depth: fidl::encoding::Depth,
9115        ) -> fidl::Result<()> {
9116            decoder.debug_check_bounds::<Self>(offset);
9117            // Verify that padding bytes are zero.
9118            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9119            Ok(())
9120        }
9121    }
9122
9123    impl fidl::encoding::ValueTypeMarker for BaseSocketGetLingerResponse {
9124        type Borrowed<'a> = &'a Self;
9125        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9126            value
9127        }
9128    }
9129
9130    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetLingerResponse {
9131        type Owned = Self;
9132
9133        #[inline(always)]
9134        fn inline_align(_context: fidl::encoding::Context) -> usize {
9135            4
9136        }
9137
9138        #[inline(always)]
9139        fn inline_size(_context: fidl::encoding::Context) -> usize {
9140            8
9141        }
9142    }
9143
9144    unsafe impl<D: fidl::encoding::ResourceDialect>
9145        fidl::encoding::Encode<BaseSocketGetLingerResponse, D> for &BaseSocketGetLingerResponse
9146    {
9147        #[inline]
9148        unsafe fn encode(
9149            self,
9150            encoder: &mut fidl::encoding::Encoder<'_, D>,
9151            offset: usize,
9152            _depth: fidl::encoding::Depth,
9153        ) -> fidl::Result<()> {
9154            encoder.debug_check_bounds::<BaseSocketGetLingerResponse>(offset);
9155            // Delegate to tuple encoding.
9156            fidl::encoding::Encode::<BaseSocketGetLingerResponse, D>::encode(
9157                (
9158                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.linger),
9159                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length_secs),
9160                ),
9161                encoder,
9162                offset,
9163                _depth,
9164            )
9165        }
9166    }
9167    unsafe impl<
9168        D: fidl::encoding::ResourceDialect,
9169        T0: fidl::encoding::Encode<bool, D>,
9170        T1: fidl::encoding::Encode<u32, D>,
9171    > fidl::encoding::Encode<BaseSocketGetLingerResponse, D> for (T0, T1)
9172    {
9173        #[inline]
9174        unsafe fn encode(
9175            self,
9176            encoder: &mut fidl::encoding::Encoder<'_, D>,
9177            offset: usize,
9178            depth: fidl::encoding::Depth,
9179        ) -> fidl::Result<()> {
9180            encoder.debug_check_bounds::<BaseSocketGetLingerResponse>(offset);
9181            // Zero out padding regions. There's no need to apply masks
9182            // because the unmasked parts will be overwritten by fields.
9183            unsafe {
9184                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9185                (ptr as *mut u32).write_unaligned(0);
9186            }
9187            // Write the fields.
9188            self.0.encode(encoder, offset + 0, depth)?;
9189            self.1.encode(encoder, offset + 4, depth)?;
9190            Ok(())
9191        }
9192    }
9193
9194    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9195        for BaseSocketGetLingerResponse
9196    {
9197        #[inline(always)]
9198        fn new_empty() -> Self {
9199            Self { linger: fidl::new_empty!(bool, D), length_secs: fidl::new_empty!(u32, D) }
9200        }
9201
9202        #[inline]
9203        unsafe fn decode(
9204            &mut self,
9205            decoder: &mut fidl::encoding::Decoder<'_, D>,
9206            offset: usize,
9207            _depth: fidl::encoding::Depth,
9208        ) -> fidl::Result<()> {
9209            decoder.debug_check_bounds::<Self>(offset);
9210            // Verify that padding bytes are zero.
9211            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9212            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9213            let mask = 0xffffff00u32;
9214            let maskedval = padval & mask;
9215            if maskedval != 0 {
9216                return Err(fidl::Error::NonZeroPadding {
9217                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9218                });
9219            }
9220            fidl::decode!(bool, D, &mut self.linger, decoder, offset + 0, _depth)?;
9221            fidl::decode!(u32, D, &mut self.length_secs, decoder, offset + 4, _depth)?;
9222            Ok(())
9223        }
9224    }
9225
9226    impl fidl::encoding::ValueTypeMarker for BaseSocketGetMarkResponse {
9227        type Borrowed<'a> = &'a Self;
9228        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9229            value
9230        }
9231    }
9232
9233    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetMarkResponse {
9234        type Owned = Self;
9235
9236        #[inline(always)]
9237        fn inline_align(_context: fidl::encoding::Context) -> usize {
9238            8
9239        }
9240
9241        #[inline(always)]
9242        fn inline_size(_context: fidl::encoding::Context) -> usize {
9243            16
9244        }
9245    }
9246
9247    unsafe impl<D: fidl::encoding::ResourceDialect>
9248        fidl::encoding::Encode<BaseSocketGetMarkResponse, D> for &BaseSocketGetMarkResponse
9249    {
9250        #[inline]
9251        unsafe fn encode(
9252            self,
9253            encoder: &mut fidl::encoding::Encoder<'_, D>,
9254            offset: usize,
9255            _depth: fidl::encoding::Depth,
9256        ) -> fidl::Result<()> {
9257            encoder.debug_check_bounds::<BaseSocketGetMarkResponse>(offset);
9258            // Delegate to tuple encoding.
9259            fidl::encoding::Encode::<BaseSocketGetMarkResponse, D>::encode(
9260                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mark),),
9261                encoder,
9262                offset,
9263                _depth,
9264            )
9265        }
9266    }
9267    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
9268        fidl::encoding::Encode<BaseSocketGetMarkResponse, D> for (T0,)
9269    {
9270        #[inline]
9271        unsafe fn encode(
9272            self,
9273            encoder: &mut fidl::encoding::Encoder<'_, D>,
9274            offset: usize,
9275            depth: fidl::encoding::Depth,
9276        ) -> fidl::Result<()> {
9277            encoder.debug_check_bounds::<BaseSocketGetMarkResponse>(offset);
9278            // Zero out padding regions. There's no need to apply masks
9279            // because the unmasked parts will be overwritten by fields.
9280            // Write the fields.
9281            self.0.encode(encoder, offset + 0, depth)?;
9282            Ok(())
9283        }
9284    }
9285
9286    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9287        for BaseSocketGetMarkResponse
9288    {
9289        #[inline(always)]
9290        fn new_empty() -> Self {
9291            Self { mark: fidl::new_empty!(OptionalUint32, D) }
9292        }
9293
9294        #[inline]
9295        unsafe fn decode(
9296            &mut self,
9297            decoder: &mut fidl::encoding::Decoder<'_, D>,
9298            offset: usize,
9299            _depth: fidl::encoding::Depth,
9300        ) -> fidl::Result<()> {
9301            decoder.debug_check_bounds::<Self>(offset);
9302            // Verify that padding bytes are zero.
9303            fidl::decode!(OptionalUint32, D, &mut self.mark, decoder, offset + 0, _depth)?;
9304            Ok(())
9305        }
9306    }
9307
9308    impl fidl::encoding::ValueTypeMarker for BaseSocketGetNoCheckResponse {
9309        type Borrowed<'a> = &'a Self;
9310        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9311            value
9312        }
9313    }
9314
9315    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetNoCheckResponse {
9316        type Owned = Self;
9317
9318        #[inline(always)]
9319        fn inline_align(_context: fidl::encoding::Context) -> usize {
9320            1
9321        }
9322
9323        #[inline(always)]
9324        fn inline_size(_context: fidl::encoding::Context) -> usize {
9325            1
9326        }
9327    }
9328
9329    unsafe impl<D: fidl::encoding::ResourceDialect>
9330        fidl::encoding::Encode<BaseSocketGetNoCheckResponse, D> for &BaseSocketGetNoCheckResponse
9331    {
9332        #[inline]
9333        unsafe fn encode(
9334            self,
9335            encoder: &mut fidl::encoding::Encoder<'_, D>,
9336            offset: usize,
9337            _depth: fidl::encoding::Depth,
9338        ) -> fidl::Result<()> {
9339            encoder.debug_check_bounds::<BaseSocketGetNoCheckResponse>(offset);
9340            // Delegate to tuple encoding.
9341            fidl::encoding::Encode::<BaseSocketGetNoCheckResponse, D>::encode(
9342                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9343                encoder,
9344                offset,
9345                _depth,
9346            )
9347        }
9348    }
9349    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9350        fidl::encoding::Encode<BaseSocketGetNoCheckResponse, D> for (T0,)
9351    {
9352        #[inline]
9353        unsafe fn encode(
9354            self,
9355            encoder: &mut fidl::encoding::Encoder<'_, D>,
9356            offset: usize,
9357            depth: fidl::encoding::Depth,
9358        ) -> fidl::Result<()> {
9359            encoder.debug_check_bounds::<BaseSocketGetNoCheckResponse>(offset);
9360            // Zero out padding regions. There's no need to apply masks
9361            // because the unmasked parts will be overwritten by fields.
9362            // Write the fields.
9363            self.0.encode(encoder, offset + 0, depth)?;
9364            Ok(())
9365        }
9366    }
9367
9368    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9369        for BaseSocketGetNoCheckResponse
9370    {
9371        #[inline(always)]
9372        fn new_empty() -> Self {
9373            Self { value: fidl::new_empty!(bool, D) }
9374        }
9375
9376        #[inline]
9377        unsafe fn decode(
9378            &mut self,
9379            decoder: &mut fidl::encoding::Decoder<'_, D>,
9380            offset: usize,
9381            _depth: fidl::encoding::Depth,
9382        ) -> fidl::Result<()> {
9383            decoder.debug_check_bounds::<Self>(offset);
9384            // Verify that padding bytes are zero.
9385            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9386            Ok(())
9387        }
9388    }
9389
9390    impl fidl::encoding::ValueTypeMarker for BaseSocketGetOutOfBandInlineResponse {
9391        type Borrowed<'a> = &'a Self;
9392        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9393            value
9394        }
9395    }
9396
9397    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetOutOfBandInlineResponse {
9398        type Owned = Self;
9399
9400        #[inline(always)]
9401        fn inline_align(_context: fidl::encoding::Context) -> usize {
9402            1
9403        }
9404
9405        #[inline(always)]
9406        fn inline_size(_context: fidl::encoding::Context) -> usize {
9407            1
9408        }
9409    }
9410
9411    unsafe impl<D: fidl::encoding::ResourceDialect>
9412        fidl::encoding::Encode<BaseSocketGetOutOfBandInlineResponse, D>
9413        for &BaseSocketGetOutOfBandInlineResponse
9414    {
9415        #[inline]
9416        unsafe fn encode(
9417            self,
9418            encoder: &mut fidl::encoding::Encoder<'_, D>,
9419            offset: usize,
9420            _depth: fidl::encoding::Depth,
9421        ) -> fidl::Result<()> {
9422            encoder.debug_check_bounds::<BaseSocketGetOutOfBandInlineResponse>(offset);
9423            // Delegate to tuple encoding.
9424            fidl::encoding::Encode::<BaseSocketGetOutOfBandInlineResponse, D>::encode(
9425                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9426                encoder,
9427                offset,
9428                _depth,
9429            )
9430        }
9431    }
9432    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9433        fidl::encoding::Encode<BaseSocketGetOutOfBandInlineResponse, D> for (T0,)
9434    {
9435        #[inline]
9436        unsafe fn encode(
9437            self,
9438            encoder: &mut fidl::encoding::Encoder<'_, D>,
9439            offset: usize,
9440            depth: fidl::encoding::Depth,
9441        ) -> fidl::Result<()> {
9442            encoder.debug_check_bounds::<BaseSocketGetOutOfBandInlineResponse>(offset);
9443            // Zero out padding regions. There's no need to apply masks
9444            // because the unmasked parts will be overwritten by fields.
9445            // Write the fields.
9446            self.0.encode(encoder, offset + 0, depth)?;
9447            Ok(())
9448        }
9449    }
9450
9451    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9452        for BaseSocketGetOutOfBandInlineResponse
9453    {
9454        #[inline(always)]
9455        fn new_empty() -> Self {
9456            Self { value: fidl::new_empty!(bool, D) }
9457        }
9458
9459        #[inline]
9460        unsafe fn decode(
9461            &mut self,
9462            decoder: &mut fidl::encoding::Decoder<'_, D>,
9463            offset: usize,
9464            _depth: fidl::encoding::Depth,
9465        ) -> fidl::Result<()> {
9466            decoder.debug_check_bounds::<Self>(offset);
9467            // Verify that padding bytes are zero.
9468            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9469            Ok(())
9470        }
9471    }
9472
9473    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReceiveBufferResponse {
9474        type Borrowed<'a> = &'a Self;
9475        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9476            value
9477        }
9478    }
9479
9480    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReceiveBufferResponse {
9481        type Owned = Self;
9482
9483        #[inline(always)]
9484        fn inline_align(_context: fidl::encoding::Context) -> usize {
9485            8
9486        }
9487
9488        #[inline(always)]
9489        fn inline_size(_context: fidl::encoding::Context) -> usize {
9490            8
9491        }
9492        #[inline(always)]
9493        fn encode_is_copy() -> bool {
9494            true
9495        }
9496
9497        #[inline(always)]
9498        fn decode_is_copy() -> bool {
9499            true
9500        }
9501    }
9502
9503    unsafe impl<D: fidl::encoding::ResourceDialect>
9504        fidl::encoding::Encode<BaseSocketGetReceiveBufferResponse, D>
9505        for &BaseSocketGetReceiveBufferResponse
9506    {
9507        #[inline]
9508        unsafe fn encode(
9509            self,
9510            encoder: &mut fidl::encoding::Encoder<'_, D>,
9511            offset: usize,
9512            _depth: fidl::encoding::Depth,
9513        ) -> fidl::Result<()> {
9514            encoder.debug_check_bounds::<BaseSocketGetReceiveBufferResponse>(offset);
9515            unsafe {
9516                // Copy the object into the buffer.
9517                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9518                (buf_ptr as *mut BaseSocketGetReceiveBufferResponse)
9519                    .write_unaligned((self as *const BaseSocketGetReceiveBufferResponse).read());
9520                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9521                // done second because the memcpy will write garbage to these bytes.
9522            }
9523            Ok(())
9524        }
9525    }
9526    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9527        fidl::encoding::Encode<BaseSocketGetReceiveBufferResponse, D> for (T0,)
9528    {
9529        #[inline]
9530        unsafe fn encode(
9531            self,
9532            encoder: &mut fidl::encoding::Encoder<'_, D>,
9533            offset: usize,
9534            depth: fidl::encoding::Depth,
9535        ) -> fidl::Result<()> {
9536            encoder.debug_check_bounds::<BaseSocketGetReceiveBufferResponse>(offset);
9537            // Zero out padding regions. There's no need to apply masks
9538            // because the unmasked parts will be overwritten by fields.
9539            // Write the fields.
9540            self.0.encode(encoder, offset + 0, depth)?;
9541            Ok(())
9542        }
9543    }
9544
9545    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9546        for BaseSocketGetReceiveBufferResponse
9547    {
9548        #[inline(always)]
9549        fn new_empty() -> Self {
9550            Self { value_bytes: fidl::new_empty!(u64, D) }
9551        }
9552
9553        #[inline]
9554        unsafe fn decode(
9555            &mut self,
9556            decoder: &mut fidl::encoding::Decoder<'_, D>,
9557            offset: usize,
9558            _depth: fidl::encoding::Depth,
9559        ) -> fidl::Result<()> {
9560            decoder.debug_check_bounds::<Self>(offset);
9561            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9562            // Verify that padding bytes are zero.
9563            // Copy from the buffer into the object.
9564            unsafe {
9565                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9566            }
9567            Ok(())
9568        }
9569    }
9570
9571    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReuseAddressResponse {
9572        type Borrowed<'a> = &'a Self;
9573        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9574            value
9575        }
9576    }
9577
9578    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReuseAddressResponse {
9579        type Owned = Self;
9580
9581        #[inline(always)]
9582        fn inline_align(_context: fidl::encoding::Context) -> usize {
9583            1
9584        }
9585
9586        #[inline(always)]
9587        fn inline_size(_context: fidl::encoding::Context) -> usize {
9588            1
9589        }
9590    }
9591
9592    unsafe impl<D: fidl::encoding::ResourceDialect>
9593        fidl::encoding::Encode<BaseSocketGetReuseAddressResponse, D>
9594        for &BaseSocketGetReuseAddressResponse
9595    {
9596        #[inline]
9597        unsafe fn encode(
9598            self,
9599            encoder: &mut fidl::encoding::Encoder<'_, D>,
9600            offset: usize,
9601            _depth: fidl::encoding::Depth,
9602        ) -> fidl::Result<()> {
9603            encoder.debug_check_bounds::<BaseSocketGetReuseAddressResponse>(offset);
9604            // Delegate to tuple encoding.
9605            fidl::encoding::Encode::<BaseSocketGetReuseAddressResponse, D>::encode(
9606                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9607                encoder,
9608                offset,
9609                _depth,
9610            )
9611        }
9612    }
9613    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9614        fidl::encoding::Encode<BaseSocketGetReuseAddressResponse, D> for (T0,)
9615    {
9616        #[inline]
9617        unsafe fn encode(
9618            self,
9619            encoder: &mut fidl::encoding::Encoder<'_, D>,
9620            offset: usize,
9621            depth: fidl::encoding::Depth,
9622        ) -> fidl::Result<()> {
9623            encoder.debug_check_bounds::<BaseSocketGetReuseAddressResponse>(offset);
9624            // Zero out padding regions. There's no need to apply masks
9625            // because the unmasked parts will be overwritten by fields.
9626            // Write the fields.
9627            self.0.encode(encoder, offset + 0, depth)?;
9628            Ok(())
9629        }
9630    }
9631
9632    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9633        for BaseSocketGetReuseAddressResponse
9634    {
9635        #[inline(always)]
9636        fn new_empty() -> Self {
9637            Self { value: fidl::new_empty!(bool, D) }
9638        }
9639
9640        #[inline]
9641        unsafe fn decode(
9642            &mut self,
9643            decoder: &mut fidl::encoding::Decoder<'_, D>,
9644            offset: usize,
9645            _depth: fidl::encoding::Depth,
9646        ) -> fidl::Result<()> {
9647            decoder.debug_check_bounds::<Self>(offset);
9648            // Verify that padding bytes are zero.
9649            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9650            Ok(())
9651        }
9652    }
9653
9654    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReusePortResponse {
9655        type Borrowed<'a> = &'a Self;
9656        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9657            value
9658        }
9659    }
9660
9661    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReusePortResponse {
9662        type Owned = Self;
9663
9664        #[inline(always)]
9665        fn inline_align(_context: fidl::encoding::Context) -> usize {
9666            1
9667        }
9668
9669        #[inline(always)]
9670        fn inline_size(_context: fidl::encoding::Context) -> usize {
9671            1
9672        }
9673    }
9674
9675    unsafe impl<D: fidl::encoding::ResourceDialect>
9676        fidl::encoding::Encode<BaseSocketGetReusePortResponse, D>
9677        for &BaseSocketGetReusePortResponse
9678    {
9679        #[inline]
9680        unsafe fn encode(
9681            self,
9682            encoder: &mut fidl::encoding::Encoder<'_, D>,
9683            offset: usize,
9684            _depth: fidl::encoding::Depth,
9685        ) -> fidl::Result<()> {
9686            encoder.debug_check_bounds::<BaseSocketGetReusePortResponse>(offset);
9687            // Delegate to tuple encoding.
9688            fidl::encoding::Encode::<BaseSocketGetReusePortResponse, D>::encode(
9689                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9690                encoder,
9691                offset,
9692                _depth,
9693            )
9694        }
9695    }
9696    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9697        fidl::encoding::Encode<BaseSocketGetReusePortResponse, D> for (T0,)
9698    {
9699        #[inline]
9700        unsafe fn encode(
9701            self,
9702            encoder: &mut fidl::encoding::Encoder<'_, D>,
9703            offset: usize,
9704            depth: fidl::encoding::Depth,
9705        ) -> fidl::Result<()> {
9706            encoder.debug_check_bounds::<BaseSocketGetReusePortResponse>(offset);
9707            // Zero out padding regions. There's no need to apply masks
9708            // because the unmasked parts will be overwritten by fields.
9709            // Write the fields.
9710            self.0.encode(encoder, offset + 0, depth)?;
9711            Ok(())
9712        }
9713    }
9714
9715    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9716        for BaseSocketGetReusePortResponse
9717    {
9718        #[inline(always)]
9719        fn new_empty() -> Self {
9720            Self { value: fidl::new_empty!(bool, D) }
9721        }
9722
9723        #[inline]
9724        unsafe fn decode(
9725            &mut self,
9726            decoder: &mut fidl::encoding::Decoder<'_, D>,
9727            offset: usize,
9728            _depth: fidl::encoding::Depth,
9729        ) -> fidl::Result<()> {
9730            decoder.debug_check_bounds::<Self>(offset);
9731            // Verify that padding bytes are zero.
9732            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9733            Ok(())
9734        }
9735    }
9736
9737    impl fidl::encoding::ValueTypeMarker for BaseSocketGetSendBufferResponse {
9738        type Borrowed<'a> = &'a Self;
9739        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9740            value
9741        }
9742    }
9743
9744    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetSendBufferResponse {
9745        type Owned = Self;
9746
9747        #[inline(always)]
9748        fn inline_align(_context: fidl::encoding::Context) -> usize {
9749            8
9750        }
9751
9752        #[inline(always)]
9753        fn inline_size(_context: fidl::encoding::Context) -> usize {
9754            8
9755        }
9756        #[inline(always)]
9757        fn encode_is_copy() -> bool {
9758            true
9759        }
9760
9761        #[inline(always)]
9762        fn decode_is_copy() -> bool {
9763            true
9764        }
9765    }
9766
9767    unsafe impl<D: fidl::encoding::ResourceDialect>
9768        fidl::encoding::Encode<BaseSocketGetSendBufferResponse, D>
9769        for &BaseSocketGetSendBufferResponse
9770    {
9771        #[inline]
9772        unsafe fn encode(
9773            self,
9774            encoder: &mut fidl::encoding::Encoder<'_, D>,
9775            offset: usize,
9776            _depth: fidl::encoding::Depth,
9777        ) -> fidl::Result<()> {
9778            encoder.debug_check_bounds::<BaseSocketGetSendBufferResponse>(offset);
9779            unsafe {
9780                // Copy the object into the buffer.
9781                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9782                (buf_ptr as *mut BaseSocketGetSendBufferResponse)
9783                    .write_unaligned((self as *const BaseSocketGetSendBufferResponse).read());
9784                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9785                // done second because the memcpy will write garbage to these bytes.
9786            }
9787            Ok(())
9788        }
9789    }
9790    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9791        fidl::encoding::Encode<BaseSocketGetSendBufferResponse, D> for (T0,)
9792    {
9793        #[inline]
9794        unsafe fn encode(
9795            self,
9796            encoder: &mut fidl::encoding::Encoder<'_, D>,
9797            offset: usize,
9798            depth: fidl::encoding::Depth,
9799        ) -> fidl::Result<()> {
9800            encoder.debug_check_bounds::<BaseSocketGetSendBufferResponse>(offset);
9801            // Zero out padding regions. There's no need to apply masks
9802            // because the unmasked parts will be overwritten by fields.
9803            // Write the fields.
9804            self.0.encode(encoder, offset + 0, depth)?;
9805            Ok(())
9806        }
9807    }
9808
9809    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9810        for BaseSocketGetSendBufferResponse
9811    {
9812        #[inline(always)]
9813        fn new_empty() -> Self {
9814            Self { value_bytes: fidl::new_empty!(u64, D) }
9815        }
9816
9817        #[inline]
9818        unsafe fn decode(
9819            &mut self,
9820            decoder: &mut fidl::encoding::Decoder<'_, D>,
9821            offset: usize,
9822            _depth: fidl::encoding::Depth,
9823        ) -> fidl::Result<()> {
9824            decoder.debug_check_bounds::<Self>(offset);
9825            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9826            // Verify that padding bytes are zero.
9827            // Copy from the buffer into the object.
9828            unsafe {
9829                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9830            }
9831            Ok(())
9832        }
9833    }
9834
9835    impl fidl::encoding::ValueTypeMarker for BaseSocketGetTimestampResponse {
9836        type Borrowed<'a> = &'a Self;
9837        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9838            value
9839        }
9840    }
9841
9842    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetTimestampResponse {
9843        type Owned = Self;
9844
9845        #[inline(always)]
9846        fn inline_align(_context: fidl::encoding::Context) -> usize {
9847            4
9848        }
9849
9850        #[inline(always)]
9851        fn inline_size(_context: fidl::encoding::Context) -> usize {
9852            4
9853        }
9854    }
9855
9856    unsafe impl<D: fidl::encoding::ResourceDialect>
9857        fidl::encoding::Encode<BaseSocketGetTimestampResponse, D>
9858        for &BaseSocketGetTimestampResponse
9859    {
9860        #[inline]
9861        unsafe fn encode(
9862            self,
9863            encoder: &mut fidl::encoding::Encoder<'_, D>,
9864            offset: usize,
9865            _depth: fidl::encoding::Depth,
9866        ) -> fidl::Result<()> {
9867            encoder.debug_check_bounds::<BaseSocketGetTimestampResponse>(offset);
9868            // Delegate to tuple encoding.
9869            fidl::encoding::Encode::<BaseSocketGetTimestampResponse, D>::encode(
9870                (<TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9871                encoder,
9872                offset,
9873                _depth,
9874            )
9875        }
9876    }
9877    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TimestampOption, D>>
9878        fidl::encoding::Encode<BaseSocketGetTimestampResponse, D> for (T0,)
9879    {
9880        #[inline]
9881        unsafe fn encode(
9882            self,
9883            encoder: &mut fidl::encoding::Encoder<'_, D>,
9884            offset: usize,
9885            depth: fidl::encoding::Depth,
9886        ) -> fidl::Result<()> {
9887            encoder.debug_check_bounds::<BaseSocketGetTimestampResponse>(offset);
9888            // Zero out padding regions. There's no need to apply masks
9889            // because the unmasked parts will be overwritten by fields.
9890            // Write the fields.
9891            self.0.encode(encoder, offset + 0, depth)?;
9892            Ok(())
9893        }
9894    }
9895
9896    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9897        for BaseSocketGetTimestampResponse
9898    {
9899        #[inline(always)]
9900        fn new_empty() -> Self {
9901            Self { value: fidl::new_empty!(TimestampOption, D) }
9902        }
9903
9904        #[inline]
9905        unsafe fn decode(
9906            &mut self,
9907            decoder: &mut fidl::encoding::Decoder<'_, D>,
9908            offset: usize,
9909            _depth: fidl::encoding::Depth,
9910        ) -> fidl::Result<()> {
9911            decoder.debug_check_bounds::<Self>(offset);
9912            // Verify that padding bytes are zero.
9913            fidl::decode!(TimestampOption, D, &mut self.value, decoder, offset + 0, _depth)?;
9914            Ok(())
9915        }
9916    }
9917
9918    impl fidl::encoding::ValueTypeMarker for Empty {
9919        type Borrowed<'a> = &'a Self;
9920        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9921            value
9922        }
9923    }
9924
9925    unsafe impl fidl::encoding::TypeMarker for Empty {
9926        type Owned = Self;
9927
9928        #[inline(always)]
9929        fn inline_align(_context: fidl::encoding::Context) -> usize {
9930            1
9931        }
9932
9933        #[inline(always)]
9934        fn inline_size(_context: fidl::encoding::Context) -> usize {
9935            1
9936        }
9937    }
9938
9939    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
9940        #[inline]
9941        unsafe fn encode(
9942            self,
9943            encoder: &mut fidl::encoding::Encoder<'_, D>,
9944            offset: usize,
9945            _depth: fidl::encoding::Depth,
9946        ) -> fidl::Result<()> {
9947            encoder.debug_check_bounds::<Empty>(offset);
9948            encoder.write_num(0u8, offset);
9949            Ok(())
9950        }
9951    }
9952
9953    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
9954        #[inline(always)]
9955        fn new_empty() -> Self {
9956            Self
9957        }
9958
9959        #[inline]
9960        unsafe fn decode(
9961            &mut self,
9962            decoder: &mut fidl::encoding::Decoder<'_, D>,
9963            offset: usize,
9964            _depth: fidl::encoding::Depth,
9965        ) -> fidl::Result<()> {
9966            decoder.debug_check_bounds::<Self>(offset);
9967            match decoder.read_num::<u8>(offset) {
9968                0 => Ok(()),
9969                _ => Err(fidl::Error::Invalid),
9970            }
9971        }
9972    }
9973
9974    impl fidl::encoding::ValueTypeMarker for IpMulticastMembership {
9975        type Borrowed<'a> = &'a Self;
9976        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9977            value
9978        }
9979    }
9980
9981    unsafe impl fidl::encoding::TypeMarker for IpMulticastMembership {
9982        type Owned = Self;
9983
9984        #[inline(always)]
9985        fn inline_align(_context: fidl::encoding::Context) -> usize {
9986            8
9987        }
9988
9989        #[inline(always)]
9990        fn inline_size(_context: fidl::encoding::Context) -> usize {
9991            16
9992        }
9993    }
9994
9995    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpMulticastMembership, D>
9996        for &IpMulticastMembership
9997    {
9998        #[inline]
9999        unsafe fn encode(
10000            self,
10001            encoder: &mut fidl::encoding::Encoder<'_, D>,
10002            offset: usize,
10003            _depth: fidl::encoding::Depth,
10004        ) -> fidl::Result<()> {
10005            encoder.debug_check_bounds::<IpMulticastMembership>(offset);
10006            // Delegate to tuple encoding.
10007            fidl::encoding::Encode::<IpMulticastMembership, D>::encode(
10008                (
10009                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10010                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.local_addr),
10011                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.mcast_addr),
10012                ),
10013                encoder, offset, _depth
10014            )
10015        }
10016    }
10017    unsafe impl<
10018        D: fidl::encoding::ResourceDialect,
10019        T0: fidl::encoding::Encode<u64, D>,
10020        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
10021        T2: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
10022    > fidl::encoding::Encode<IpMulticastMembership, D> for (T0, T1, T2)
10023    {
10024        #[inline]
10025        unsafe fn encode(
10026            self,
10027            encoder: &mut fidl::encoding::Encoder<'_, D>,
10028            offset: usize,
10029            depth: fidl::encoding::Depth,
10030        ) -> fidl::Result<()> {
10031            encoder.debug_check_bounds::<IpMulticastMembership>(offset);
10032            // Zero out padding regions. There's no need to apply masks
10033            // because the unmasked parts will be overwritten by fields.
10034            // Write the fields.
10035            self.0.encode(encoder, offset + 0, depth)?;
10036            self.1.encode(encoder, offset + 8, depth)?;
10037            self.2.encode(encoder, offset + 12, depth)?;
10038            Ok(())
10039        }
10040    }
10041
10042    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpMulticastMembership {
10043        #[inline(always)]
10044        fn new_empty() -> Self {
10045            Self {
10046                iface: fidl::new_empty!(u64, D),
10047                local_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
10048                mcast_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
10049            }
10050        }
10051
10052        #[inline]
10053        unsafe fn decode(
10054            &mut self,
10055            decoder: &mut fidl::encoding::Decoder<'_, D>,
10056            offset: usize,
10057            _depth: fidl::encoding::Depth,
10058        ) -> fidl::Result<()> {
10059            decoder.debug_check_bounds::<Self>(offset);
10060            // Verify that padding bytes are zero.
10061            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10062            fidl::decode!(
10063                fidl_fuchsia_net__common::Ipv4Address,
10064                D,
10065                &mut self.local_addr,
10066                decoder,
10067                offset + 8,
10068                _depth
10069            )?;
10070            fidl::decode!(
10071                fidl_fuchsia_net__common::Ipv4Address,
10072                D,
10073                &mut self.mcast_addr,
10074                decoder,
10075                offset + 12,
10076                _depth
10077            )?;
10078            Ok(())
10079        }
10080    }
10081
10082    impl fidl::encoding::ValueTypeMarker for Ipv6MulticastMembership {
10083        type Borrowed<'a> = &'a Self;
10084        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10085            value
10086        }
10087    }
10088
10089    unsafe impl fidl::encoding::TypeMarker for Ipv6MulticastMembership {
10090        type Owned = Self;
10091
10092        #[inline(always)]
10093        fn inline_align(_context: fidl::encoding::Context) -> usize {
10094            8
10095        }
10096
10097        #[inline(always)]
10098        fn inline_size(_context: fidl::encoding::Context) -> usize {
10099            24
10100        }
10101    }
10102
10103    unsafe impl<D: fidl::encoding::ResourceDialect>
10104        fidl::encoding::Encode<Ipv6MulticastMembership, D> for &Ipv6MulticastMembership
10105    {
10106        #[inline]
10107        unsafe fn encode(
10108            self,
10109            encoder: &mut fidl::encoding::Encoder<'_, D>,
10110            offset: usize,
10111            _depth: fidl::encoding::Depth,
10112        ) -> fidl::Result<()> {
10113            encoder.debug_check_bounds::<Ipv6MulticastMembership>(offset);
10114            // Delegate to tuple encoding.
10115            fidl::encoding::Encode::<Ipv6MulticastMembership, D>::encode(
10116                (
10117                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10118                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.mcast_addr),
10119                ),
10120                encoder, offset, _depth
10121            )
10122        }
10123    }
10124    unsafe impl<
10125        D: fidl::encoding::ResourceDialect,
10126        T0: fidl::encoding::Encode<u64, D>,
10127        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10128    > fidl::encoding::Encode<Ipv6MulticastMembership, D> for (T0, T1)
10129    {
10130        #[inline]
10131        unsafe fn encode(
10132            self,
10133            encoder: &mut fidl::encoding::Encoder<'_, D>,
10134            offset: usize,
10135            depth: fidl::encoding::Depth,
10136        ) -> fidl::Result<()> {
10137            encoder.debug_check_bounds::<Ipv6MulticastMembership>(offset);
10138            // Zero out padding regions. There's no need to apply masks
10139            // because the unmasked parts will be overwritten by fields.
10140            // Write the fields.
10141            self.0.encode(encoder, offset + 0, depth)?;
10142            self.1.encode(encoder, offset + 8, depth)?;
10143            Ok(())
10144        }
10145    }
10146
10147    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10148        for Ipv6MulticastMembership
10149    {
10150        #[inline(always)]
10151        fn new_empty() -> Self {
10152            Self {
10153                iface: fidl::new_empty!(u64, D),
10154                mcast_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10155            }
10156        }
10157
10158        #[inline]
10159        unsafe fn decode(
10160            &mut self,
10161            decoder: &mut fidl::encoding::Decoder<'_, D>,
10162            offset: usize,
10163            _depth: fidl::encoding::Depth,
10164        ) -> fidl::Result<()> {
10165            decoder.debug_check_bounds::<Self>(offset);
10166            // Verify that padding bytes are zero.
10167            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10168            fidl::decode!(
10169                fidl_fuchsia_net__common::Ipv6Address,
10170                D,
10171                &mut self.mcast_addr,
10172                decoder,
10173                offset + 8,
10174                _depth
10175            )?;
10176            Ok(())
10177        }
10178    }
10179
10180    impl fidl::encoding::ValueTypeMarker for Ipv6PktInfoRecvControlData {
10181        type Borrowed<'a> = &'a Self;
10182        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10183            value
10184        }
10185    }
10186
10187    unsafe impl fidl::encoding::TypeMarker for Ipv6PktInfoRecvControlData {
10188        type Owned = Self;
10189
10190        #[inline(always)]
10191        fn inline_align(_context: fidl::encoding::Context) -> usize {
10192            8
10193        }
10194
10195        #[inline(always)]
10196        fn inline_size(_context: fidl::encoding::Context) -> usize {
10197            24
10198        }
10199    }
10200
10201    unsafe impl<D: fidl::encoding::ResourceDialect>
10202        fidl::encoding::Encode<Ipv6PktInfoRecvControlData, D> for &Ipv6PktInfoRecvControlData
10203    {
10204        #[inline]
10205        unsafe fn encode(
10206            self,
10207            encoder: &mut fidl::encoding::Encoder<'_, D>,
10208            offset: usize,
10209            _depth: fidl::encoding::Depth,
10210        ) -> fidl::Result<()> {
10211            encoder.debug_check_bounds::<Ipv6PktInfoRecvControlData>(offset);
10212            // Delegate to tuple encoding.
10213            fidl::encoding::Encode::<Ipv6PktInfoRecvControlData, D>::encode(
10214                (
10215                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10216                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.header_destination_addr),
10217                ),
10218                encoder, offset, _depth
10219            )
10220        }
10221    }
10222    unsafe impl<
10223        D: fidl::encoding::ResourceDialect,
10224        T0: fidl::encoding::Encode<u64, D>,
10225        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10226    > fidl::encoding::Encode<Ipv6PktInfoRecvControlData, D> for (T0, T1)
10227    {
10228        #[inline]
10229        unsafe fn encode(
10230            self,
10231            encoder: &mut fidl::encoding::Encoder<'_, D>,
10232            offset: usize,
10233            depth: fidl::encoding::Depth,
10234        ) -> fidl::Result<()> {
10235            encoder.debug_check_bounds::<Ipv6PktInfoRecvControlData>(offset);
10236            // Zero out padding regions. There's no need to apply masks
10237            // because the unmasked parts will be overwritten by fields.
10238            // Write the fields.
10239            self.0.encode(encoder, offset + 0, depth)?;
10240            self.1.encode(encoder, offset + 8, depth)?;
10241            Ok(())
10242        }
10243    }
10244
10245    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10246        for Ipv6PktInfoRecvControlData
10247    {
10248        #[inline(always)]
10249        fn new_empty() -> Self {
10250            Self {
10251                iface: fidl::new_empty!(u64, D),
10252                header_destination_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10253            }
10254        }
10255
10256        #[inline]
10257        unsafe fn decode(
10258            &mut self,
10259            decoder: &mut fidl::encoding::Decoder<'_, D>,
10260            offset: usize,
10261            _depth: fidl::encoding::Depth,
10262        ) -> fidl::Result<()> {
10263            decoder.debug_check_bounds::<Self>(offset);
10264            // Verify that padding bytes are zero.
10265            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10266            fidl::decode!(
10267                fidl_fuchsia_net__common::Ipv6Address,
10268                D,
10269                &mut self.header_destination_addr,
10270                decoder,
10271                offset + 8,
10272                _depth
10273            )?;
10274            Ok(())
10275        }
10276    }
10277
10278    impl fidl::encoding::ValueTypeMarker for Ipv6PktInfoSendControlData {
10279        type Borrowed<'a> = &'a Self;
10280        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10281            value
10282        }
10283    }
10284
10285    unsafe impl fidl::encoding::TypeMarker for Ipv6PktInfoSendControlData {
10286        type Owned = Self;
10287
10288        #[inline(always)]
10289        fn inline_align(_context: fidl::encoding::Context) -> usize {
10290            8
10291        }
10292
10293        #[inline(always)]
10294        fn inline_size(_context: fidl::encoding::Context) -> usize {
10295            24
10296        }
10297    }
10298
10299    unsafe impl<D: fidl::encoding::ResourceDialect>
10300        fidl::encoding::Encode<Ipv6PktInfoSendControlData, D> for &Ipv6PktInfoSendControlData
10301    {
10302        #[inline]
10303        unsafe fn encode(
10304            self,
10305            encoder: &mut fidl::encoding::Encoder<'_, D>,
10306            offset: usize,
10307            _depth: fidl::encoding::Depth,
10308        ) -> fidl::Result<()> {
10309            encoder.debug_check_bounds::<Ipv6PktInfoSendControlData>(offset);
10310            // Delegate to tuple encoding.
10311            fidl::encoding::Encode::<Ipv6PktInfoSendControlData, D>::encode(
10312                (
10313                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10314                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.local_addr),
10315                ),
10316                encoder, offset, _depth
10317            )
10318        }
10319    }
10320    unsafe impl<
10321        D: fidl::encoding::ResourceDialect,
10322        T0: fidl::encoding::Encode<u64, D>,
10323        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10324    > fidl::encoding::Encode<Ipv6PktInfoSendControlData, D> for (T0, T1)
10325    {
10326        #[inline]
10327        unsafe fn encode(
10328            self,
10329            encoder: &mut fidl::encoding::Encoder<'_, D>,
10330            offset: usize,
10331            depth: fidl::encoding::Depth,
10332        ) -> fidl::Result<()> {
10333            encoder.debug_check_bounds::<Ipv6PktInfoSendControlData>(offset);
10334            // Zero out padding regions. There's no need to apply masks
10335            // because the unmasked parts will be overwritten by fields.
10336            // Write the fields.
10337            self.0.encode(encoder, offset + 0, depth)?;
10338            self.1.encode(encoder, offset + 8, depth)?;
10339            Ok(())
10340        }
10341    }
10342
10343    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10344        for Ipv6PktInfoSendControlData
10345    {
10346        #[inline(always)]
10347        fn new_empty() -> Self {
10348            Self {
10349                iface: fidl::new_empty!(u64, D),
10350                local_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10351            }
10352        }
10353
10354        #[inline]
10355        unsafe fn decode(
10356            &mut self,
10357            decoder: &mut fidl::encoding::Decoder<'_, D>,
10358            offset: usize,
10359            _depth: fidl::encoding::Depth,
10360        ) -> fidl::Result<()> {
10361            decoder.debug_check_bounds::<Self>(offset);
10362            // Verify that padding bytes are zero.
10363            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10364            fidl::decode!(
10365                fidl_fuchsia_net__common::Ipv6Address,
10366                D,
10367                &mut self.local_addr,
10368                decoder,
10369                offset + 8,
10370                _depth
10371            )?;
10372            Ok(())
10373        }
10374    }
10375
10376    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketDeprecatedRequest {
10377        type Borrowed<'a> = &'a Self;
10378        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10379            value
10380        }
10381    }
10382
10383    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketDeprecatedRequest {
10384        type Owned = Self;
10385
10386        #[inline(always)]
10387        fn inline_align(_context: fidl::encoding::Context) -> usize {
10388            4
10389        }
10390
10391        #[inline(always)]
10392        fn inline_size(_context: fidl::encoding::Context) -> usize {
10393            8
10394        }
10395    }
10396
10397    unsafe impl<D: fidl::encoding::ResourceDialect>
10398        fidl::encoding::Encode<ProviderDatagramSocketDeprecatedRequest, D>
10399        for &ProviderDatagramSocketDeprecatedRequest
10400    {
10401        #[inline]
10402        unsafe fn encode(
10403            self,
10404            encoder: &mut fidl::encoding::Encoder<'_, D>,
10405            offset: usize,
10406            _depth: fidl::encoding::Depth,
10407        ) -> fidl::Result<()> {
10408            encoder.debug_check_bounds::<ProviderDatagramSocketDeprecatedRequest>(offset);
10409            // Delegate to tuple encoding.
10410            fidl::encoding::Encode::<ProviderDatagramSocketDeprecatedRequest, D>::encode(
10411                (
10412                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10413                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10414                        &self.proto,
10415                    ),
10416                ),
10417                encoder,
10418                offset,
10419                _depth,
10420            )
10421        }
10422    }
10423    unsafe impl<
10424        D: fidl::encoding::ResourceDialect,
10425        T0: fidl::encoding::Encode<Domain, D>,
10426        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10427    > fidl::encoding::Encode<ProviderDatagramSocketDeprecatedRequest, D> for (T0, T1)
10428    {
10429        #[inline]
10430        unsafe fn encode(
10431            self,
10432            encoder: &mut fidl::encoding::Encoder<'_, D>,
10433            offset: usize,
10434            depth: fidl::encoding::Depth,
10435        ) -> fidl::Result<()> {
10436            encoder.debug_check_bounds::<ProviderDatagramSocketDeprecatedRequest>(offset);
10437            // Zero out padding regions. There's no need to apply masks
10438            // because the unmasked parts will be overwritten by fields.
10439            unsafe {
10440                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10441                (ptr as *mut u32).write_unaligned(0);
10442            }
10443            // Write the fields.
10444            self.0.encode(encoder, offset + 0, depth)?;
10445            self.1.encode(encoder, offset + 4, depth)?;
10446            Ok(())
10447        }
10448    }
10449
10450    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10451        for ProviderDatagramSocketDeprecatedRequest
10452    {
10453        #[inline(always)]
10454        fn new_empty() -> Self {
10455            Self {
10456                domain: fidl::new_empty!(Domain, D),
10457                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10458            }
10459        }
10460
10461        #[inline]
10462        unsafe fn decode(
10463            &mut self,
10464            decoder: &mut fidl::encoding::Decoder<'_, D>,
10465            offset: usize,
10466            _depth: fidl::encoding::Depth,
10467        ) -> fidl::Result<()> {
10468            decoder.debug_check_bounds::<Self>(offset);
10469            // Verify that padding bytes are zero.
10470            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10471            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10472            let mask = 0xffff0000u32;
10473            let maskedval = padval & mask;
10474            if maskedval != 0 {
10475                return Err(fidl::Error::NonZeroPadding {
10476                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10477                });
10478            }
10479            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10480            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10481            Ok(())
10482        }
10483    }
10484
10485    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketRequest {
10486        type Borrowed<'a> = &'a Self;
10487        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10488            value
10489        }
10490    }
10491
10492    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketRequest {
10493        type Owned = Self;
10494
10495        #[inline(always)]
10496        fn inline_align(_context: fidl::encoding::Context) -> usize {
10497            4
10498        }
10499
10500        #[inline(always)]
10501        fn inline_size(_context: fidl::encoding::Context) -> usize {
10502            8
10503        }
10504    }
10505
10506    unsafe impl<D: fidl::encoding::ResourceDialect>
10507        fidl::encoding::Encode<ProviderDatagramSocketRequest, D>
10508        for &ProviderDatagramSocketRequest
10509    {
10510        #[inline]
10511        unsafe fn encode(
10512            self,
10513            encoder: &mut fidl::encoding::Encoder<'_, D>,
10514            offset: usize,
10515            _depth: fidl::encoding::Depth,
10516        ) -> fidl::Result<()> {
10517            encoder.debug_check_bounds::<ProviderDatagramSocketRequest>(offset);
10518            // Delegate to tuple encoding.
10519            fidl::encoding::Encode::<ProviderDatagramSocketRequest, D>::encode(
10520                (
10521                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10522                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10523                        &self.proto,
10524                    ),
10525                ),
10526                encoder,
10527                offset,
10528                _depth,
10529            )
10530        }
10531    }
10532    unsafe impl<
10533        D: fidl::encoding::ResourceDialect,
10534        T0: fidl::encoding::Encode<Domain, D>,
10535        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10536    > fidl::encoding::Encode<ProviderDatagramSocketRequest, D> for (T0, T1)
10537    {
10538        #[inline]
10539        unsafe fn encode(
10540            self,
10541            encoder: &mut fidl::encoding::Encoder<'_, D>,
10542            offset: usize,
10543            depth: fidl::encoding::Depth,
10544        ) -> fidl::Result<()> {
10545            encoder.debug_check_bounds::<ProviderDatagramSocketRequest>(offset);
10546            // Zero out padding regions. There's no need to apply masks
10547            // because the unmasked parts will be overwritten by fields.
10548            unsafe {
10549                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10550                (ptr as *mut u32).write_unaligned(0);
10551            }
10552            // Write the fields.
10553            self.0.encode(encoder, offset + 0, depth)?;
10554            self.1.encode(encoder, offset + 4, depth)?;
10555            Ok(())
10556        }
10557    }
10558
10559    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10560        for ProviderDatagramSocketRequest
10561    {
10562        #[inline(always)]
10563        fn new_empty() -> Self {
10564            Self {
10565                domain: fidl::new_empty!(Domain, D),
10566                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10567            }
10568        }
10569
10570        #[inline]
10571        unsafe fn decode(
10572            &mut self,
10573            decoder: &mut fidl::encoding::Decoder<'_, D>,
10574            offset: usize,
10575            _depth: fidl::encoding::Depth,
10576        ) -> fidl::Result<()> {
10577            decoder.debug_check_bounds::<Self>(offset);
10578            // Verify that padding bytes are zero.
10579            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10580            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10581            let mask = 0xffff0000u32;
10582            let maskedval = padval & mask;
10583            if maskedval != 0 {
10584                return Err(fidl::Error::NonZeroPadding {
10585                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10586                });
10587            }
10588            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10589            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10590            Ok(())
10591        }
10592    }
10593
10594    impl fidl::encoding::ValueTypeMarker for ProviderGetInterfaceAddressesResponse {
10595        type Borrowed<'a> = &'a Self;
10596        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10597            value
10598        }
10599    }
10600
10601    unsafe impl fidl::encoding::TypeMarker for ProviderGetInterfaceAddressesResponse {
10602        type Owned = Self;
10603
10604        #[inline(always)]
10605        fn inline_align(_context: fidl::encoding::Context) -> usize {
10606            8
10607        }
10608
10609        #[inline(always)]
10610        fn inline_size(_context: fidl::encoding::Context) -> usize {
10611            16
10612        }
10613    }
10614
10615    unsafe impl<D: fidl::encoding::ResourceDialect>
10616        fidl::encoding::Encode<ProviderGetInterfaceAddressesResponse, D>
10617        for &ProviderGetInterfaceAddressesResponse
10618    {
10619        #[inline]
10620        unsafe fn encode(
10621            self,
10622            encoder: &mut fidl::encoding::Encoder<'_, D>,
10623            offset: usize,
10624            _depth: fidl::encoding::Depth,
10625        ) -> fidl::Result<()> {
10626            encoder.debug_check_bounds::<ProviderGetInterfaceAddressesResponse>(offset);
10627            // Delegate to tuple encoding.
10628            fidl::encoding::Encode::<ProviderGetInterfaceAddressesResponse, D>::encode(
10629                (
10630                    <fidl::encoding::UnboundedVector<InterfaceAddresses> as fidl::encoding::ValueTypeMarker>::borrow(&self.interfaces),
10631                ),
10632                encoder, offset, _depth
10633            )
10634        }
10635    }
10636    unsafe impl<
10637        D: fidl::encoding::ResourceDialect,
10638        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<InterfaceAddresses>, D>,
10639    > fidl::encoding::Encode<ProviderGetInterfaceAddressesResponse, D> for (T0,)
10640    {
10641        #[inline]
10642        unsafe fn encode(
10643            self,
10644            encoder: &mut fidl::encoding::Encoder<'_, D>,
10645            offset: usize,
10646            depth: fidl::encoding::Depth,
10647        ) -> fidl::Result<()> {
10648            encoder.debug_check_bounds::<ProviderGetInterfaceAddressesResponse>(offset);
10649            // Zero out padding regions. There's no need to apply masks
10650            // because the unmasked parts will be overwritten by fields.
10651            // Write the fields.
10652            self.0.encode(encoder, offset + 0, depth)?;
10653            Ok(())
10654        }
10655    }
10656
10657    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10658        for ProviderGetInterfaceAddressesResponse
10659    {
10660        #[inline(always)]
10661        fn new_empty() -> Self {
10662            Self {
10663                interfaces: fidl::new_empty!(
10664                    fidl::encoding::UnboundedVector<InterfaceAddresses>,
10665                    D
10666                ),
10667            }
10668        }
10669
10670        #[inline]
10671        unsafe fn decode(
10672            &mut self,
10673            decoder: &mut fidl::encoding::Decoder<'_, D>,
10674            offset: usize,
10675            _depth: fidl::encoding::Depth,
10676        ) -> fidl::Result<()> {
10677            decoder.debug_check_bounds::<Self>(offset);
10678            // Verify that padding bytes are zero.
10679            fidl::decode!(
10680                fidl::encoding::UnboundedVector<InterfaceAddresses>,
10681                D,
10682                &mut self.interfaces,
10683                decoder,
10684                offset + 0,
10685                _depth
10686            )?;
10687            Ok(())
10688        }
10689    }
10690
10691    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceIndexToNameRequest {
10692        type Borrowed<'a> = &'a Self;
10693        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10694            value
10695        }
10696    }
10697
10698    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceIndexToNameRequest {
10699        type Owned = Self;
10700
10701        #[inline(always)]
10702        fn inline_align(_context: fidl::encoding::Context) -> usize {
10703            8
10704        }
10705
10706        #[inline(always)]
10707        fn inline_size(_context: fidl::encoding::Context) -> usize {
10708            8
10709        }
10710        #[inline(always)]
10711        fn encode_is_copy() -> bool {
10712            true
10713        }
10714
10715        #[inline(always)]
10716        fn decode_is_copy() -> bool {
10717            true
10718        }
10719    }
10720
10721    unsafe impl<D: fidl::encoding::ResourceDialect>
10722        fidl::encoding::Encode<ProviderInterfaceIndexToNameRequest, D>
10723        for &ProviderInterfaceIndexToNameRequest
10724    {
10725        #[inline]
10726        unsafe fn encode(
10727            self,
10728            encoder: &mut fidl::encoding::Encoder<'_, D>,
10729            offset: usize,
10730            _depth: fidl::encoding::Depth,
10731        ) -> fidl::Result<()> {
10732            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameRequest>(offset);
10733            unsafe {
10734                // Copy the object into the buffer.
10735                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10736                (buf_ptr as *mut ProviderInterfaceIndexToNameRequest)
10737                    .write_unaligned((self as *const ProviderInterfaceIndexToNameRequest).read());
10738                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10739                // done second because the memcpy will write garbage to these bytes.
10740            }
10741            Ok(())
10742        }
10743    }
10744    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
10745        fidl::encoding::Encode<ProviderInterfaceIndexToNameRequest, D> for (T0,)
10746    {
10747        #[inline]
10748        unsafe fn encode(
10749            self,
10750            encoder: &mut fidl::encoding::Encoder<'_, D>,
10751            offset: usize,
10752            depth: fidl::encoding::Depth,
10753        ) -> fidl::Result<()> {
10754            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameRequest>(offset);
10755            // Zero out padding regions. There's no need to apply masks
10756            // because the unmasked parts will be overwritten by fields.
10757            // Write the fields.
10758            self.0.encode(encoder, offset + 0, depth)?;
10759            Ok(())
10760        }
10761    }
10762
10763    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10764        for ProviderInterfaceIndexToNameRequest
10765    {
10766        #[inline(always)]
10767        fn new_empty() -> Self {
10768            Self { index: fidl::new_empty!(u64, D) }
10769        }
10770
10771        #[inline]
10772        unsafe fn decode(
10773            &mut self,
10774            decoder: &mut fidl::encoding::Decoder<'_, D>,
10775            offset: usize,
10776            _depth: fidl::encoding::Depth,
10777        ) -> fidl::Result<()> {
10778            decoder.debug_check_bounds::<Self>(offset);
10779            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10780            // Verify that padding bytes are zero.
10781            // Copy from the buffer into the object.
10782            unsafe {
10783                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
10784            }
10785            Ok(())
10786        }
10787    }
10788
10789    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToFlagsRequest {
10790        type Borrowed<'a> = &'a Self;
10791        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10792            value
10793        }
10794    }
10795
10796    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToFlagsRequest {
10797        type Owned = Self;
10798
10799        #[inline(always)]
10800        fn inline_align(_context: fidl::encoding::Context) -> usize {
10801            8
10802        }
10803
10804        #[inline(always)]
10805        fn inline_size(_context: fidl::encoding::Context) -> usize {
10806            16
10807        }
10808    }
10809
10810    unsafe impl<D: fidl::encoding::ResourceDialect>
10811        fidl::encoding::Encode<ProviderInterfaceNameToFlagsRequest, D>
10812        for &ProviderInterfaceNameToFlagsRequest
10813    {
10814        #[inline]
10815        unsafe fn encode(
10816            self,
10817            encoder: &mut fidl::encoding::Encoder<'_, D>,
10818            offset: usize,
10819            _depth: fidl::encoding::Depth,
10820        ) -> fidl::Result<()> {
10821            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsRequest>(offset);
10822            // Delegate to tuple encoding.
10823            fidl::encoding::Encode::<ProviderInterfaceNameToFlagsRequest, D>::encode(
10824                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
10825                    &self.name,
10826                ),),
10827                encoder,
10828                offset,
10829                _depth,
10830            )
10831        }
10832    }
10833    unsafe impl<
10834        D: fidl::encoding::ResourceDialect,
10835        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
10836    > fidl::encoding::Encode<ProviderInterfaceNameToFlagsRequest, D> for (T0,)
10837    {
10838        #[inline]
10839        unsafe fn encode(
10840            self,
10841            encoder: &mut fidl::encoding::Encoder<'_, D>,
10842            offset: usize,
10843            depth: fidl::encoding::Depth,
10844        ) -> fidl::Result<()> {
10845            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsRequest>(offset);
10846            // Zero out padding regions. There's no need to apply masks
10847            // because the unmasked parts will be overwritten by fields.
10848            // Write the fields.
10849            self.0.encode(encoder, offset + 0, depth)?;
10850            Ok(())
10851        }
10852    }
10853
10854    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10855        for ProviderInterfaceNameToFlagsRequest
10856    {
10857        #[inline(always)]
10858        fn new_empty() -> Self {
10859            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
10860        }
10861
10862        #[inline]
10863        unsafe fn decode(
10864            &mut self,
10865            decoder: &mut fidl::encoding::Decoder<'_, D>,
10866            offset: usize,
10867            _depth: fidl::encoding::Depth,
10868        ) -> fidl::Result<()> {
10869            decoder.debug_check_bounds::<Self>(offset);
10870            // Verify that padding bytes are zero.
10871            fidl::decode!(
10872                fidl::encoding::BoundedString<15>,
10873                D,
10874                &mut self.name,
10875                decoder,
10876                offset + 0,
10877                _depth
10878            )?;
10879            Ok(())
10880        }
10881    }
10882
10883    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToIndexRequest {
10884        type Borrowed<'a> = &'a Self;
10885        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10886            value
10887        }
10888    }
10889
10890    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToIndexRequest {
10891        type Owned = Self;
10892
10893        #[inline(always)]
10894        fn inline_align(_context: fidl::encoding::Context) -> usize {
10895            8
10896        }
10897
10898        #[inline(always)]
10899        fn inline_size(_context: fidl::encoding::Context) -> usize {
10900            16
10901        }
10902    }
10903
10904    unsafe impl<D: fidl::encoding::ResourceDialect>
10905        fidl::encoding::Encode<ProviderInterfaceNameToIndexRequest, D>
10906        for &ProviderInterfaceNameToIndexRequest
10907    {
10908        #[inline]
10909        unsafe fn encode(
10910            self,
10911            encoder: &mut fidl::encoding::Encoder<'_, D>,
10912            offset: usize,
10913            _depth: fidl::encoding::Depth,
10914        ) -> fidl::Result<()> {
10915            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexRequest>(offset);
10916            // Delegate to tuple encoding.
10917            fidl::encoding::Encode::<ProviderInterfaceNameToIndexRequest, D>::encode(
10918                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
10919                    &self.name,
10920                ),),
10921                encoder,
10922                offset,
10923                _depth,
10924            )
10925        }
10926    }
10927    unsafe impl<
10928        D: fidl::encoding::ResourceDialect,
10929        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
10930    > fidl::encoding::Encode<ProviderInterfaceNameToIndexRequest, D> for (T0,)
10931    {
10932        #[inline]
10933        unsafe fn encode(
10934            self,
10935            encoder: &mut fidl::encoding::Encoder<'_, D>,
10936            offset: usize,
10937            depth: fidl::encoding::Depth,
10938        ) -> fidl::Result<()> {
10939            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexRequest>(offset);
10940            // Zero out padding regions. There's no need to apply masks
10941            // because the unmasked parts will be overwritten by fields.
10942            // Write the fields.
10943            self.0.encode(encoder, offset + 0, depth)?;
10944            Ok(())
10945        }
10946    }
10947
10948    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10949        for ProviderInterfaceNameToIndexRequest
10950    {
10951        #[inline(always)]
10952        fn new_empty() -> Self {
10953            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
10954        }
10955
10956        #[inline]
10957        unsafe fn decode(
10958            &mut self,
10959            decoder: &mut fidl::encoding::Decoder<'_, D>,
10960            offset: usize,
10961            _depth: fidl::encoding::Depth,
10962        ) -> fidl::Result<()> {
10963            decoder.debug_check_bounds::<Self>(offset);
10964            // Verify that padding bytes are zero.
10965            fidl::decode!(
10966                fidl::encoding::BoundedString<15>,
10967                D,
10968                &mut self.name,
10969                decoder,
10970                offset + 0,
10971                _depth
10972            )?;
10973            Ok(())
10974        }
10975    }
10976
10977    impl fidl::encoding::ValueTypeMarker for ProviderStreamSocketRequest {
10978        type Borrowed<'a> = &'a Self;
10979        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10980            value
10981        }
10982    }
10983
10984    unsafe impl fidl::encoding::TypeMarker for ProviderStreamSocketRequest {
10985        type Owned = Self;
10986
10987        #[inline(always)]
10988        fn inline_align(_context: fidl::encoding::Context) -> usize {
10989            4
10990        }
10991
10992        #[inline(always)]
10993        fn inline_size(_context: fidl::encoding::Context) -> usize {
10994            8
10995        }
10996    }
10997
10998    unsafe impl<D: fidl::encoding::ResourceDialect>
10999        fidl::encoding::Encode<ProviderStreamSocketRequest, D> for &ProviderStreamSocketRequest
11000    {
11001        #[inline]
11002        unsafe fn encode(
11003            self,
11004            encoder: &mut fidl::encoding::Encoder<'_, D>,
11005            offset: usize,
11006            _depth: fidl::encoding::Depth,
11007        ) -> fidl::Result<()> {
11008            encoder.debug_check_bounds::<ProviderStreamSocketRequest>(offset);
11009            // Delegate to tuple encoding.
11010            fidl::encoding::Encode::<ProviderStreamSocketRequest, D>::encode(
11011                (
11012                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
11013                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
11014                ),
11015                encoder,
11016                offset,
11017                _depth,
11018            )
11019        }
11020    }
11021    unsafe impl<
11022        D: fidl::encoding::ResourceDialect,
11023        T0: fidl::encoding::Encode<Domain, D>,
11024        T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
11025    > fidl::encoding::Encode<ProviderStreamSocketRequest, D> for (T0, T1)
11026    {
11027        #[inline]
11028        unsafe fn encode(
11029            self,
11030            encoder: &mut fidl::encoding::Encoder<'_, D>,
11031            offset: usize,
11032            depth: fidl::encoding::Depth,
11033        ) -> fidl::Result<()> {
11034            encoder.debug_check_bounds::<ProviderStreamSocketRequest>(offset);
11035            // Zero out padding regions. There's no need to apply masks
11036            // because the unmasked parts will be overwritten by fields.
11037            unsafe {
11038                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
11039                (ptr as *mut u32).write_unaligned(0);
11040            }
11041            // Write the fields.
11042            self.0.encode(encoder, offset + 0, depth)?;
11043            self.1.encode(encoder, offset + 4, depth)?;
11044            Ok(())
11045        }
11046    }
11047
11048    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11049        for ProviderStreamSocketRequest
11050    {
11051        #[inline(always)]
11052        fn new_empty() -> Self {
11053            Self {
11054                domain: fidl::new_empty!(Domain, D),
11055                proto: fidl::new_empty!(StreamSocketProtocol, D),
11056            }
11057        }
11058
11059        #[inline]
11060        unsafe fn decode(
11061            &mut self,
11062            decoder: &mut fidl::encoding::Decoder<'_, D>,
11063            offset: usize,
11064            _depth: fidl::encoding::Depth,
11065        ) -> fidl::Result<()> {
11066            decoder.debug_check_bounds::<Self>(offset);
11067            // Verify that padding bytes are zero.
11068            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
11069            let padval = unsafe { (ptr as *const u32).read_unaligned() };
11070            let mask = 0xffff0000u32;
11071            let maskedval = padval & mask;
11072            if maskedval != 0 {
11073                return Err(fidl::Error::NonZeroPadding {
11074                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
11075                });
11076            }
11077            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
11078            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
11079            Ok(())
11080        }
11081    }
11082
11083    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceIndexToNameResponse {
11084        type Borrowed<'a> = &'a Self;
11085        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11086            value
11087        }
11088    }
11089
11090    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceIndexToNameResponse {
11091        type Owned = Self;
11092
11093        #[inline(always)]
11094        fn inline_align(_context: fidl::encoding::Context) -> usize {
11095            8
11096        }
11097
11098        #[inline(always)]
11099        fn inline_size(_context: fidl::encoding::Context) -> usize {
11100            16
11101        }
11102    }
11103
11104    unsafe impl<D: fidl::encoding::ResourceDialect>
11105        fidl::encoding::Encode<ProviderInterfaceIndexToNameResponse, D>
11106        for &ProviderInterfaceIndexToNameResponse
11107    {
11108        #[inline]
11109        unsafe fn encode(
11110            self,
11111            encoder: &mut fidl::encoding::Encoder<'_, D>,
11112            offset: usize,
11113            _depth: fidl::encoding::Depth,
11114        ) -> fidl::Result<()> {
11115            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameResponse>(offset);
11116            // Delegate to tuple encoding.
11117            fidl::encoding::Encode::<ProviderInterfaceIndexToNameResponse, D>::encode(
11118                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
11119                    &self.name,
11120                ),),
11121                encoder,
11122                offset,
11123                _depth,
11124            )
11125        }
11126    }
11127    unsafe impl<
11128        D: fidl::encoding::ResourceDialect,
11129        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
11130    > fidl::encoding::Encode<ProviderInterfaceIndexToNameResponse, D> for (T0,)
11131    {
11132        #[inline]
11133        unsafe fn encode(
11134            self,
11135            encoder: &mut fidl::encoding::Encoder<'_, D>,
11136            offset: usize,
11137            depth: fidl::encoding::Depth,
11138        ) -> fidl::Result<()> {
11139            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameResponse>(offset);
11140            // Zero out padding regions. There's no need to apply masks
11141            // because the unmasked parts will be overwritten by fields.
11142            // Write the fields.
11143            self.0.encode(encoder, offset + 0, depth)?;
11144            Ok(())
11145        }
11146    }
11147
11148    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11149        for ProviderInterfaceIndexToNameResponse
11150    {
11151        #[inline(always)]
11152        fn new_empty() -> Self {
11153            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
11154        }
11155
11156        #[inline]
11157        unsafe fn decode(
11158            &mut self,
11159            decoder: &mut fidl::encoding::Decoder<'_, D>,
11160            offset: usize,
11161            _depth: fidl::encoding::Depth,
11162        ) -> fidl::Result<()> {
11163            decoder.debug_check_bounds::<Self>(offset);
11164            // Verify that padding bytes are zero.
11165            fidl::decode!(
11166                fidl::encoding::BoundedString<15>,
11167                D,
11168                &mut self.name,
11169                decoder,
11170                offset + 0,
11171                _depth
11172            )?;
11173            Ok(())
11174        }
11175    }
11176
11177    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToFlagsResponse {
11178        type Borrowed<'a> = &'a Self;
11179        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11180            value
11181        }
11182    }
11183
11184    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToFlagsResponse {
11185        type Owned = Self;
11186
11187        #[inline(always)]
11188        fn inline_align(_context: fidl::encoding::Context) -> usize {
11189            2
11190        }
11191
11192        #[inline(always)]
11193        fn inline_size(_context: fidl::encoding::Context) -> usize {
11194            2
11195        }
11196    }
11197
11198    unsafe impl<D: fidl::encoding::ResourceDialect>
11199        fidl::encoding::Encode<ProviderInterfaceNameToFlagsResponse, D>
11200        for &ProviderInterfaceNameToFlagsResponse
11201    {
11202        #[inline]
11203        unsafe fn encode(
11204            self,
11205            encoder: &mut fidl::encoding::Encoder<'_, D>,
11206            offset: usize,
11207            _depth: fidl::encoding::Depth,
11208        ) -> fidl::Result<()> {
11209            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsResponse>(offset);
11210            // Delegate to tuple encoding.
11211            fidl::encoding::Encode::<ProviderInterfaceNameToFlagsResponse, D>::encode(
11212                (<InterfaceFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),),
11213                encoder,
11214                offset,
11215                _depth,
11216            )
11217        }
11218    }
11219    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<InterfaceFlags, D>>
11220        fidl::encoding::Encode<ProviderInterfaceNameToFlagsResponse, D> for (T0,)
11221    {
11222        #[inline]
11223        unsafe fn encode(
11224            self,
11225            encoder: &mut fidl::encoding::Encoder<'_, D>,
11226            offset: usize,
11227            depth: fidl::encoding::Depth,
11228        ) -> fidl::Result<()> {
11229            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsResponse>(offset);
11230            // Zero out padding regions. There's no need to apply masks
11231            // because the unmasked parts will be overwritten by fields.
11232            // Write the fields.
11233            self.0.encode(encoder, offset + 0, depth)?;
11234            Ok(())
11235        }
11236    }
11237
11238    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11239        for ProviderInterfaceNameToFlagsResponse
11240    {
11241        #[inline(always)]
11242        fn new_empty() -> Self {
11243            Self { flags: fidl::new_empty!(InterfaceFlags, D) }
11244        }
11245
11246        #[inline]
11247        unsafe fn decode(
11248            &mut self,
11249            decoder: &mut fidl::encoding::Decoder<'_, D>,
11250            offset: usize,
11251            _depth: fidl::encoding::Depth,
11252        ) -> fidl::Result<()> {
11253            decoder.debug_check_bounds::<Self>(offset);
11254            // Verify that padding bytes are zero.
11255            fidl::decode!(InterfaceFlags, D, &mut self.flags, decoder, offset + 0, _depth)?;
11256            Ok(())
11257        }
11258    }
11259
11260    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToIndexResponse {
11261        type Borrowed<'a> = &'a Self;
11262        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11263            value
11264        }
11265    }
11266
11267    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToIndexResponse {
11268        type Owned = Self;
11269
11270        #[inline(always)]
11271        fn inline_align(_context: fidl::encoding::Context) -> usize {
11272            8
11273        }
11274
11275        #[inline(always)]
11276        fn inline_size(_context: fidl::encoding::Context) -> usize {
11277            8
11278        }
11279        #[inline(always)]
11280        fn encode_is_copy() -> bool {
11281            true
11282        }
11283
11284        #[inline(always)]
11285        fn decode_is_copy() -> bool {
11286            true
11287        }
11288    }
11289
11290    unsafe impl<D: fidl::encoding::ResourceDialect>
11291        fidl::encoding::Encode<ProviderInterfaceNameToIndexResponse, D>
11292        for &ProviderInterfaceNameToIndexResponse
11293    {
11294        #[inline]
11295        unsafe fn encode(
11296            self,
11297            encoder: &mut fidl::encoding::Encoder<'_, D>,
11298            offset: usize,
11299            _depth: fidl::encoding::Depth,
11300        ) -> fidl::Result<()> {
11301            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexResponse>(offset);
11302            unsafe {
11303                // Copy the object into the buffer.
11304                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11305                (buf_ptr as *mut ProviderInterfaceNameToIndexResponse)
11306                    .write_unaligned((self as *const ProviderInterfaceNameToIndexResponse).read());
11307                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11308                // done second because the memcpy will write garbage to these bytes.
11309            }
11310            Ok(())
11311        }
11312    }
11313    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
11314        fidl::encoding::Encode<ProviderInterfaceNameToIndexResponse, D> for (T0,)
11315    {
11316        #[inline]
11317        unsafe fn encode(
11318            self,
11319            encoder: &mut fidl::encoding::Encoder<'_, D>,
11320            offset: usize,
11321            depth: fidl::encoding::Depth,
11322        ) -> fidl::Result<()> {
11323            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexResponse>(offset);
11324            // Zero out padding regions. There's no need to apply masks
11325            // because the unmasked parts will be overwritten by fields.
11326            // Write the fields.
11327            self.0.encode(encoder, offset + 0, depth)?;
11328            Ok(())
11329        }
11330    }
11331
11332    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11333        for ProviderInterfaceNameToIndexResponse
11334    {
11335        #[inline(always)]
11336        fn new_empty() -> Self {
11337            Self { index: fidl::new_empty!(u64, D) }
11338        }
11339
11340        #[inline]
11341        unsafe fn decode(
11342            &mut self,
11343            decoder: &mut fidl::encoding::Decoder<'_, D>,
11344            offset: usize,
11345            _depth: fidl::encoding::Depth,
11346        ) -> fidl::Result<()> {
11347            decoder.debug_check_bounds::<Self>(offset);
11348            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11349            // Verify that padding bytes are zero.
11350            // Copy from the buffer into the object.
11351            unsafe {
11352                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11353            }
11354            Ok(())
11355        }
11356    }
11357
11358    impl fidl::encoding::ValueTypeMarker for StreamSocketAcceptRequest {
11359        type Borrowed<'a> = &'a Self;
11360        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11361            value
11362        }
11363    }
11364
11365    unsafe impl fidl::encoding::TypeMarker for StreamSocketAcceptRequest {
11366        type Owned = Self;
11367
11368        #[inline(always)]
11369        fn inline_align(_context: fidl::encoding::Context) -> usize {
11370            1
11371        }
11372
11373        #[inline(always)]
11374        fn inline_size(_context: fidl::encoding::Context) -> usize {
11375            1
11376        }
11377    }
11378
11379    unsafe impl<D: fidl::encoding::ResourceDialect>
11380        fidl::encoding::Encode<StreamSocketAcceptRequest, D> for &StreamSocketAcceptRequest
11381    {
11382        #[inline]
11383        unsafe fn encode(
11384            self,
11385            encoder: &mut fidl::encoding::Encoder<'_, D>,
11386            offset: usize,
11387            _depth: fidl::encoding::Depth,
11388        ) -> fidl::Result<()> {
11389            encoder.debug_check_bounds::<StreamSocketAcceptRequest>(offset);
11390            // Delegate to tuple encoding.
11391            fidl::encoding::Encode::<StreamSocketAcceptRequest, D>::encode(
11392                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_addr),),
11393                encoder,
11394                offset,
11395                _depth,
11396            )
11397        }
11398    }
11399    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11400        fidl::encoding::Encode<StreamSocketAcceptRequest, D> for (T0,)
11401    {
11402        #[inline]
11403        unsafe fn encode(
11404            self,
11405            encoder: &mut fidl::encoding::Encoder<'_, D>,
11406            offset: usize,
11407            depth: fidl::encoding::Depth,
11408        ) -> fidl::Result<()> {
11409            encoder.debug_check_bounds::<StreamSocketAcceptRequest>(offset);
11410            // Zero out padding regions. There's no need to apply masks
11411            // because the unmasked parts will be overwritten by fields.
11412            // Write the fields.
11413            self.0.encode(encoder, offset + 0, depth)?;
11414            Ok(())
11415        }
11416    }
11417
11418    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11419        for StreamSocketAcceptRequest
11420    {
11421        #[inline(always)]
11422        fn new_empty() -> Self {
11423            Self { want_addr: fidl::new_empty!(bool, D) }
11424        }
11425
11426        #[inline]
11427        unsafe fn decode(
11428            &mut self,
11429            decoder: &mut fidl::encoding::Decoder<'_, D>,
11430            offset: usize,
11431            _depth: fidl::encoding::Depth,
11432        ) -> fidl::Result<()> {
11433            decoder.debug_check_bounds::<Self>(offset);
11434            // Verify that padding bytes are zero.
11435            fidl::decode!(bool, D, &mut self.want_addr, decoder, offset + 0, _depth)?;
11436            Ok(())
11437        }
11438    }
11439
11440    impl fidl::encoding::ValueTypeMarker for StreamSocketListenRequest {
11441        type Borrowed<'a> = &'a Self;
11442        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11443            value
11444        }
11445    }
11446
11447    unsafe impl fidl::encoding::TypeMarker for StreamSocketListenRequest {
11448        type Owned = Self;
11449
11450        #[inline(always)]
11451        fn inline_align(_context: fidl::encoding::Context) -> usize {
11452            2
11453        }
11454
11455        #[inline(always)]
11456        fn inline_size(_context: fidl::encoding::Context) -> usize {
11457            2
11458        }
11459        #[inline(always)]
11460        fn encode_is_copy() -> bool {
11461            true
11462        }
11463
11464        #[inline(always)]
11465        fn decode_is_copy() -> bool {
11466            true
11467        }
11468    }
11469
11470    unsafe impl<D: fidl::encoding::ResourceDialect>
11471        fidl::encoding::Encode<StreamSocketListenRequest, D> for &StreamSocketListenRequest
11472    {
11473        #[inline]
11474        unsafe fn encode(
11475            self,
11476            encoder: &mut fidl::encoding::Encoder<'_, D>,
11477            offset: usize,
11478            _depth: fidl::encoding::Depth,
11479        ) -> fidl::Result<()> {
11480            encoder.debug_check_bounds::<StreamSocketListenRequest>(offset);
11481            unsafe {
11482                // Copy the object into the buffer.
11483                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11484                (buf_ptr as *mut StreamSocketListenRequest)
11485                    .write_unaligned((self as *const StreamSocketListenRequest).read());
11486                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11487                // done second because the memcpy will write garbage to these bytes.
11488            }
11489            Ok(())
11490        }
11491    }
11492    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
11493        fidl::encoding::Encode<StreamSocketListenRequest, D> for (T0,)
11494    {
11495        #[inline]
11496        unsafe fn encode(
11497            self,
11498            encoder: &mut fidl::encoding::Encoder<'_, D>,
11499            offset: usize,
11500            depth: fidl::encoding::Depth,
11501        ) -> fidl::Result<()> {
11502            encoder.debug_check_bounds::<StreamSocketListenRequest>(offset);
11503            // Zero out padding regions. There's no need to apply masks
11504            // because the unmasked parts will be overwritten by fields.
11505            // Write the fields.
11506            self.0.encode(encoder, offset + 0, depth)?;
11507            Ok(())
11508        }
11509    }
11510
11511    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11512        for StreamSocketListenRequest
11513    {
11514        #[inline(always)]
11515        fn new_empty() -> Self {
11516            Self { backlog: fidl::new_empty!(i16, D) }
11517        }
11518
11519        #[inline]
11520        unsafe fn decode(
11521            &mut self,
11522            decoder: &mut fidl::encoding::Decoder<'_, D>,
11523            offset: usize,
11524            _depth: fidl::encoding::Depth,
11525        ) -> fidl::Result<()> {
11526            decoder.debug_check_bounds::<Self>(offset);
11527            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11528            // Verify that padding bytes are zero.
11529            // Copy from the buffer into the object.
11530            unsafe {
11531                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
11532            }
11533            Ok(())
11534        }
11535    }
11536
11537    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpCongestionRequest {
11538        type Borrowed<'a> = &'a Self;
11539        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11540            value
11541        }
11542    }
11543
11544    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpCongestionRequest {
11545        type Owned = Self;
11546
11547        #[inline(always)]
11548        fn inline_align(_context: fidl::encoding::Context) -> usize {
11549            4
11550        }
11551
11552        #[inline(always)]
11553        fn inline_size(_context: fidl::encoding::Context) -> usize {
11554            4
11555        }
11556    }
11557
11558    unsafe impl<D: fidl::encoding::ResourceDialect>
11559        fidl::encoding::Encode<StreamSocketSetTcpCongestionRequest, D>
11560        for &StreamSocketSetTcpCongestionRequest
11561    {
11562        #[inline]
11563        unsafe fn encode(
11564            self,
11565            encoder: &mut fidl::encoding::Encoder<'_, D>,
11566            offset: usize,
11567            _depth: fidl::encoding::Depth,
11568        ) -> fidl::Result<()> {
11569            encoder.debug_check_bounds::<StreamSocketSetTcpCongestionRequest>(offset);
11570            // Delegate to tuple encoding.
11571            fidl::encoding::Encode::<StreamSocketSetTcpCongestionRequest, D>::encode(
11572                (<TcpCongestionControl as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
11573                encoder,
11574                offset,
11575                _depth,
11576            )
11577        }
11578    }
11579    unsafe impl<
11580        D: fidl::encoding::ResourceDialect,
11581        T0: fidl::encoding::Encode<TcpCongestionControl, D>,
11582    > fidl::encoding::Encode<StreamSocketSetTcpCongestionRequest, D> for (T0,)
11583    {
11584        #[inline]
11585        unsafe fn encode(
11586            self,
11587            encoder: &mut fidl::encoding::Encoder<'_, D>,
11588            offset: usize,
11589            depth: fidl::encoding::Depth,
11590        ) -> fidl::Result<()> {
11591            encoder.debug_check_bounds::<StreamSocketSetTcpCongestionRequest>(offset);
11592            // Zero out padding regions. There's no need to apply masks
11593            // because the unmasked parts will be overwritten by fields.
11594            // Write the fields.
11595            self.0.encode(encoder, offset + 0, depth)?;
11596            Ok(())
11597        }
11598    }
11599
11600    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11601        for StreamSocketSetTcpCongestionRequest
11602    {
11603        #[inline(always)]
11604        fn new_empty() -> Self {
11605            Self { value: fidl::new_empty!(TcpCongestionControl, D) }
11606        }
11607
11608        #[inline]
11609        unsafe fn decode(
11610            &mut self,
11611            decoder: &mut fidl::encoding::Decoder<'_, D>,
11612            offset: usize,
11613            _depth: fidl::encoding::Depth,
11614        ) -> fidl::Result<()> {
11615            decoder.debug_check_bounds::<Self>(offset);
11616            // Verify that padding bytes are zero.
11617            fidl::decode!(TcpCongestionControl, D, &mut self.value, decoder, offset + 0, _depth)?;
11618            Ok(())
11619        }
11620    }
11621
11622    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpCorkRequest {
11623        type Borrowed<'a> = &'a Self;
11624        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11625            value
11626        }
11627    }
11628
11629    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpCorkRequest {
11630        type Owned = Self;
11631
11632        #[inline(always)]
11633        fn inline_align(_context: fidl::encoding::Context) -> usize {
11634            1
11635        }
11636
11637        #[inline(always)]
11638        fn inline_size(_context: fidl::encoding::Context) -> usize {
11639            1
11640        }
11641    }
11642
11643    unsafe impl<D: fidl::encoding::ResourceDialect>
11644        fidl::encoding::Encode<StreamSocketSetTcpCorkRequest, D>
11645        for &StreamSocketSetTcpCorkRequest
11646    {
11647        #[inline]
11648        unsafe fn encode(
11649            self,
11650            encoder: &mut fidl::encoding::Encoder<'_, D>,
11651            offset: usize,
11652            _depth: fidl::encoding::Depth,
11653        ) -> fidl::Result<()> {
11654            encoder.debug_check_bounds::<StreamSocketSetTcpCorkRequest>(offset);
11655            // Delegate to tuple encoding.
11656            fidl::encoding::Encode::<StreamSocketSetTcpCorkRequest, D>::encode(
11657                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
11658                encoder,
11659                offset,
11660                _depth,
11661            )
11662        }
11663    }
11664    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11665        fidl::encoding::Encode<StreamSocketSetTcpCorkRequest, D> for (T0,)
11666    {
11667        #[inline]
11668        unsafe fn encode(
11669            self,
11670            encoder: &mut fidl::encoding::Encoder<'_, D>,
11671            offset: usize,
11672            depth: fidl::encoding::Depth,
11673        ) -> fidl::Result<()> {
11674            encoder.debug_check_bounds::<StreamSocketSetTcpCorkRequest>(offset);
11675            // Zero out padding regions. There's no need to apply masks
11676            // because the unmasked parts will be overwritten by fields.
11677            // Write the fields.
11678            self.0.encode(encoder, offset + 0, depth)?;
11679            Ok(())
11680        }
11681    }
11682
11683    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11684        for StreamSocketSetTcpCorkRequest
11685    {
11686        #[inline(always)]
11687        fn new_empty() -> Self {
11688            Self { value: fidl::new_empty!(bool, D) }
11689        }
11690
11691        #[inline]
11692        unsafe fn decode(
11693            &mut self,
11694            decoder: &mut fidl::encoding::Decoder<'_, D>,
11695            offset: usize,
11696            _depth: fidl::encoding::Depth,
11697        ) -> fidl::Result<()> {
11698            decoder.debug_check_bounds::<Self>(offset);
11699            // Verify that padding bytes are zero.
11700            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
11701            Ok(())
11702        }
11703    }
11704
11705    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpDeferAcceptRequest {
11706        type Borrowed<'a> = &'a Self;
11707        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11708            value
11709        }
11710    }
11711
11712    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpDeferAcceptRequest {
11713        type Owned = Self;
11714
11715        #[inline(always)]
11716        fn inline_align(_context: fidl::encoding::Context) -> usize {
11717            4
11718        }
11719
11720        #[inline(always)]
11721        fn inline_size(_context: fidl::encoding::Context) -> usize {
11722            4
11723        }
11724        #[inline(always)]
11725        fn encode_is_copy() -> bool {
11726            true
11727        }
11728
11729        #[inline(always)]
11730        fn decode_is_copy() -> bool {
11731            true
11732        }
11733    }
11734
11735    unsafe impl<D: fidl::encoding::ResourceDialect>
11736        fidl::encoding::Encode<StreamSocketSetTcpDeferAcceptRequest, D>
11737        for &StreamSocketSetTcpDeferAcceptRequest
11738    {
11739        #[inline]
11740        unsafe fn encode(
11741            self,
11742            encoder: &mut fidl::encoding::Encoder<'_, D>,
11743            offset: usize,
11744            _depth: fidl::encoding::Depth,
11745        ) -> fidl::Result<()> {
11746            encoder.debug_check_bounds::<StreamSocketSetTcpDeferAcceptRequest>(offset);
11747            unsafe {
11748                // Copy the object into the buffer.
11749                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11750                (buf_ptr as *mut StreamSocketSetTcpDeferAcceptRequest)
11751                    .write_unaligned((self as *const StreamSocketSetTcpDeferAcceptRequest).read());
11752                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11753                // done second because the memcpy will write garbage to these bytes.
11754            }
11755            Ok(())
11756        }
11757    }
11758    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11759        fidl::encoding::Encode<StreamSocketSetTcpDeferAcceptRequest, D> for (T0,)
11760    {
11761        #[inline]
11762        unsafe fn encode(
11763            self,
11764            encoder: &mut fidl::encoding::Encoder<'_, D>,
11765            offset: usize,
11766            depth: fidl::encoding::Depth,
11767        ) -> fidl::Result<()> {
11768            encoder.debug_check_bounds::<StreamSocketSetTcpDeferAcceptRequest>(offset);
11769            // Zero out padding regions. There's no need to apply masks
11770            // because the unmasked parts will be overwritten by fields.
11771            // Write the fields.
11772            self.0.encode(encoder, offset + 0, depth)?;
11773            Ok(())
11774        }
11775    }
11776
11777    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11778        for StreamSocketSetTcpDeferAcceptRequest
11779    {
11780        #[inline(always)]
11781        fn new_empty() -> Self {
11782            Self { value_secs: fidl::new_empty!(u32, D) }
11783        }
11784
11785        #[inline]
11786        unsafe fn decode(
11787            &mut self,
11788            decoder: &mut fidl::encoding::Decoder<'_, D>,
11789            offset: usize,
11790            _depth: fidl::encoding::Depth,
11791        ) -> fidl::Result<()> {
11792            decoder.debug_check_bounds::<Self>(offset);
11793            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11794            // Verify that padding bytes are zero.
11795            // Copy from the buffer into the object.
11796            unsafe {
11797                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11798            }
11799            Ok(())
11800        }
11801    }
11802
11803    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveCountRequest {
11804        type Borrowed<'a> = &'a Self;
11805        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11806            value
11807        }
11808    }
11809
11810    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveCountRequest {
11811        type Owned = Self;
11812
11813        #[inline(always)]
11814        fn inline_align(_context: fidl::encoding::Context) -> usize {
11815            4
11816        }
11817
11818        #[inline(always)]
11819        fn inline_size(_context: fidl::encoding::Context) -> usize {
11820            4
11821        }
11822        #[inline(always)]
11823        fn encode_is_copy() -> bool {
11824            true
11825        }
11826
11827        #[inline(always)]
11828        fn decode_is_copy() -> bool {
11829            true
11830        }
11831    }
11832
11833    unsafe impl<D: fidl::encoding::ResourceDialect>
11834        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveCountRequest, D>
11835        for &StreamSocketSetTcpKeepAliveCountRequest
11836    {
11837        #[inline]
11838        unsafe fn encode(
11839            self,
11840            encoder: &mut fidl::encoding::Encoder<'_, D>,
11841            offset: usize,
11842            _depth: fidl::encoding::Depth,
11843        ) -> fidl::Result<()> {
11844            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveCountRequest>(offset);
11845            unsafe {
11846                // Copy the object into the buffer.
11847                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11848                (buf_ptr as *mut StreamSocketSetTcpKeepAliveCountRequest).write_unaligned(
11849                    (self as *const StreamSocketSetTcpKeepAliveCountRequest).read(),
11850                );
11851                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11852                // done second because the memcpy will write garbage to these bytes.
11853            }
11854            Ok(())
11855        }
11856    }
11857    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11858        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveCountRequest, D> for (T0,)
11859    {
11860        #[inline]
11861        unsafe fn encode(
11862            self,
11863            encoder: &mut fidl::encoding::Encoder<'_, D>,
11864            offset: usize,
11865            depth: fidl::encoding::Depth,
11866        ) -> fidl::Result<()> {
11867            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveCountRequest>(offset);
11868            // Zero out padding regions. There's no need to apply masks
11869            // because the unmasked parts will be overwritten by fields.
11870            // Write the fields.
11871            self.0.encode(encoder, offset + 0, depth)?;
11872            Ok(())
11873        }
11874    }
11875
11876    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11877        for StreamSocketSetTcpKeepAliveCountRequest
11878    {
11879        #[inline(always)]
11880        fn new_empty() -> Self {
11881            Self { value: fidl::new_empty!(u32, D) }
11882        }
11883
11884        #[inline]
11885        unsafe fn decode(
11886            &mut self,
11887            decoder: &mut fidl::encoding::Decoder<'_, D>,
11888            offset: usize,
11889            _depth: fidl::encoding::Depth,
11890        ) -> fidl::Result<()> {
11891            decoder.debug_check_bounds::<Self>(offset);
11892            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11893            // Verify that padding bytes are zero.
11894            // Copy from the buffer into the object.
11895            unsafe {
11896                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11897            }
11898            Ok(())
11899        }
11900    }
11901
11902    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveIdleRequest {
11903        type Borrowed<'a> = &'a Self;
11904        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11905            value
11906        }
11907    }
11908
11909    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveIdleRequest {
11910        type Owned = Self;
11911
11912        #[inline(always)]
11913        fn inline_align(_context: fidl::encoding::Context) -> usize {
11914            4
11915        }
11916
11917        #[inline(always)]
11918        fn inline_size(_context: fidl::encoding::Context) -> usize {
11919            4
11920        }
11921        #[inline(always)]
11922        fn encode_is_copy() -> bool {
11923            true
11924        }
11925
11926        #[inline(always)]
11927        fn decode_is_copy() -> bool {
11928            true
11929        }
11930    }
11931
11932    unsafe impl<D: fidl::encoding::ResourceDialect>
11933        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIdleRequest, D>
11934        for &StreamSocketSetTcpKeepAliveIdleRequest
11935    {
11936        #[inline]
11937        unsafe fn encode(
11938            self,
11939            encoder: &mut fidl::encoding::Encoder<'_, D>,
11940            offset: usize,
11941            _depth: fidl::encoding::Depth,
11942        ) -> fidl::Result<()> {
11943            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIdleRequest>(offset);
11944            unsafe {
11945                // Copy the object into the buffer.
11946                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11947                (buf_ptr as *mut StreamSocketSetTcpKeepAliveIdleRequest).write_unaligned(
11948                    (self as *const StreamSocketSetTcpKeepAliveIdleRequest).read(),
11949                );
11950                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11951                // done second because the memcpy will write garbage to these bytes.
11952            }
11953            Ok(())
11954        }
11955    }
11956    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11957        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIdleRequest, D> for (T0,)
11958    {
11959        #[inline]
11960        unsafe fn encode(
11961            self,
11962            encoder: &mut fidl::encoding::Encoder<'_, D>,
11963            offset: usize,
11964            depth: fidl::encoding::Depth,
11965        ) -> fidl::Result<()> {
11966            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIdleRequest>(offset);
11967            // Zero out padding regions. There's no need to apply masks
11968            // because the unmasked parts will be overwritten by fields.
11969            // Write the fields.
11970            self.0.encode(encoder, offset + 0, depth)?;
11971            Ok(())
11972        }
11973    }
11974
11975    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11976        for StreamSocketSetTcpKeepAliveIdleRequest
11977    {
11978        #[inline(always)]
11979        fn new_empty() -> Self {
11980            Self { value_secs: fidl::new_empty!(u32, D) }
11981        }
11982
11983        #[inline]
11984        unsafe fn decode(
11985            &mut self,
11986            decoder: &mut fidl::encoding::Decoder<'_, D>,
11987            offset: usize,
11988            _depth: fidl::encoding::Depth,
11989        ) -> fidl::Result<()> {
11990            decoder.debug_check_bounds::<Self>(offset);
11991            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11992            // Verify that padding bytes are zero.
11993            // Copy from the buffer into the object.
11994            unsafe {
11995                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11996            }
11997            Ok(())
11998        }
11999    }
12000
12001    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveIntervalRequest {
12002        type Borrowed<'a> = &'a Self;
12003        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12004            value
12005        }
12006    }
12007
12008    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveIntervalRequest {
12009        type Owned = Self;
12010
12011        #[inline(always)]
12012        fn inline_align(_context: fidl::encoding::Context) -> usize {
12013            4
12014        }
12015
12016        #[inline(always)]
12017        fn inline_size(_context: fidl::encoding::Context) -> usize {
12018            4
12019        }
12020        #[inline(always)]
12021        fn encode_is_copy() -> bool {
12022            true
12023        }
12024
12025        #[inline(always)]
12026        fn decode_is_copy() -> bool {
12027            true
12028        }
12029    }
12030
12031    unsafe impl<D: fidl::encoding::ResourceDialect>
12032        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIntervalRequest, D>
12033        for &StreamSocketSetTcpKeepAliveIntervalRequest
12034    {
12035        #[inline]
12036        unsafe fn encode(
12037            self,
12038            encoder: &mut fidl::encoding::Encoder<'_, D>,
12039            offset: usize,
12040            _depth: fidl::encoding::Depth,
12041        ) -> fidl::Result<()> {
12042            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIntervalRequest>(offset);
12043            unsafe {
12044                // Copy the object into the buffer.
12045                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12046                (buf_ptr as *mut StreamSocketSetTcpKeepAliveIntervalRequest).write_unaligned(
12047                    (self as *const StreamSocketSetTcpKeepAliveIntervalRequest).read(),
12048                );
12049                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12050                // done second because the memcpy will write garbage to these bytes.
12051            }
12052            Ok(())
12053        }
12054    }
12055    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12056        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIntervalRequest, D> for (T0,)
12057    {
12058        #[inline]
12059        unsafe fn encode(
12060            self,
12061            encoder: &mut fidl::encoding::Encoder<'_, D>,
12062            offset: usize,
12063            depth: fidl::encoding::Depth,
12064        ) -> fidl::Result<()> {
12065            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIntervalRequest>(offset);
12066            // Zero out padding regions. There's no need to apply masks
12067            // because the unmasked parts will be overwritten by fields.
12068            // Write the fields.
12069            self.0.encode(encoder, offset + 0, depth)?;
12070            Ok(())
12071        }
12072    }
12073
12074    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12075        for StreamSocketSetTcpKeepAliveIntervalRequest
12076    {
12077        #[inline(always)]
12078        fn new_empty() -> Self {
12079            Self { value_secs: fidl::new_empty!(u32, D) }
12080        }
12081
12082        #[inline]
12083        unsafe fn decode(
12084            &mut self,
12085            decoder: &mut fidl::encoding::Decoder<'_, D>,
12086            offset: usize,
12087            _depth: fidl::encoding::Depth,
12088        ) -> fidl::Result<()> {
12089            decoder.debug_check_bounds::<Self>(offset);
12090            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12091            // Verify that padding bytes are zero.
12092            // Copy from the buffer into the object.
12093            unsafe {
12094                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12095            }
12096            Ok(())
12097        }
12098    }
12099
12100    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpLingerRequest {
12101        type Borrowed<'a> = &'a Self;
12102        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12103            value
12104        }
12105    }
12106
12107    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpLingerRequest {
12108        type Owned = Self;
12109
12110        #[inline(always)]
12111        fn inline_align(_context: fidl::encoding::Context) -> usize {
12112            8
12113        }
12114
12115        #[inline(always)]
12116        fn inline_size(_context: fidl::encoding::Context) -> usize {
12117            16
12118        }
12119    }
12120
12121    unsafe impl<D: fidl::encoding::ResourceDialect>
12122        fidl::encoding::Encode<StreamSocketSetTcpLingerRequest, D>
12123        for &StreamSocketSetTcpLingerRequest
12124    {
12125        #[inline]
12126        unsafe fn encode(
12127            self,
12128            encoder: &mut fidl::encoding::Encoder<'_, D>,
12129            offset: usize,
12130            _depth: fidl::encoding::Depth,
12131        ) -> fidl::Result<()> {
12132            encoder.debug_check_bounds::<StreamSocketSetTcpLingerRequest>(offset);
12133            // Delegate to tuple encoding.
12134            fidl::encoding::Encode::<StreamSocketSetTcpLingerRequest, D>::encode(
12135                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value_secs),),
12136                encoder,
12137                offset,
12138                _depth,
12139            )
12140        }
12141    }
12142    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
12143        fidl::encoding::Encode<StreamSocketSetTcpLingerRequest, D> for (T0,)
12144    {
12145        #[inline]
12146        unsafe fn encode(
12147            self,
12148            encoder: &mut fidl::encoding::Encoder<'_, D>,
12149            offset: usize,
12150            depth: fidl::encoding::Depth,
12151        ) -> fidl::Result<()> {
12152            encoder.debug_check_bounds::<StreamSocketSetTcpLingerRequest>(offset);
12153            // Zero out padding regions. There's no need to apply masks
12154            // because the unmasked parts will be overwritten by fields.
12155            // Write the fields.
12156            self.0.encode(encoder, offset + 0, depth)?;
12157            Ok(())
12158        }
12159    }
12160
12161    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12162        for StreamSocketSetTcpLingerRequest
12163    {
12164        #[inline(always)]
12165        fn new_empty() -> Self {
12166            Self { value_secs: fidl::new_empty!(OptionalUint32, D) }
12167        }
12168
12169        #[inline]
12170        unsafe fn decode(
12171            &mut self,
12172            decoder: &mut fidl::encoding::Decoder<'_, D>,
12173            offset: usize,
12174            _depth: fidl::encoding::Depth,
12175        ) -> fidl::Result<()> {
12176            decoder.debug_check_bounds::<Self>(offset);
12177            // Verify that padding bytes are zero.
12178            fidl::decode!(OptionalUint32, D, &mut self.value_secs, decoder, offset + 0, _depth)?;
12179            Ok(())
12180        }
12181    }
12182
12183    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpMaxSegmentRequest {
12184        type Borrowed<'a> = &'a Self;
12185        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12186            value
12187        }
12188    }
12189
12190    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpMaxSegmentRequest {
12191        type Owned = Self;
12192
12193        #[inline(always)]
12194        fn inline_align(_context: fidl::encoding::Context) -> usize {
12195            4
12196        }
12197
12198        #[inline(always)]
12199        fn inline_size(_context: fidl::encoding::Context) -> usize {
12200            4
12201        }
12202        #[inline(always)]
12203        fn encode_is_copy() -> bool {
12204            true
12205        }
12206
12207        #[inline(always)]
12208        fn decode_is_copy() -> bool {
12209            true
12210        }
12211    }
12212
12213    unsafe impl<D: fidl::encoding::ResourceDialect>
12214        fidl::encoding::Encode<StreamSocketSetTcpMaxSegmentRequest, D>
12215        for &StreamSocketSetTcpMaxSegmentRequest
12216    {
12217        #[inline]
12218        unsafe fn encode(
12219            self,
12220            encoder: &mut fidl::encoding::Encoder<'_, D>,
12221            offset: usize,
12222            _depth: fidl::encoding::Depth,
12223        ) -> fidl::Result<()> {
12224            encoder.debug_check_bounds::<StreamSocketSetTcpMaxSegmentRequest>(offset);
12225            unsafe {
12226                // Copy the object into the buffer.
12227                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12228                (buf_ptr as *mut StreamSocketSetTcpMaxSegmentRequest)
12229                    .write_unaligned((self as *const StreamSocketSetTcpMaxSegmentRequest).read());
12230                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12231                // done second because the memcpy will write garbage to these bytes.
12232            }
12233            Ok(())
12234        }
12235    }
12236    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12237        fidl::encoding::Encode<StreamSocketSetTcpMaxSegmentRequest, D> for (T0,)
12238    {
12239        #[inline]
12240        unsafe fn encode(
12241            self,
12242            encoder: &mut fidl::encoding::Encoder<'_, D>,
12243            offset: usize,
12244            depth: fidl::encoding::Depth,
12245        ) -> fidl::Result<()> {
12246            encoder.debug_check_bounds::<StreamSocketSetTcpMaxSegmentRequest>(offset);
12247            // Zero out padding regions. There's no need to apply masks
12248            // because the unmasked parts will be overwritten by fields.
12249            // Write the fields.
12250            self.0.encode(encoder, offset + 0, depth)?;
12251            Ok(())
12252        }
12253    }
12254
12255    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12256        for StreamSocketSetTcpMaxSegmentRequest
12257    {
12258        #[inline(always)]
12259        fn new_empty() -> Self {
12260            Self { value_bytes: fidl::new_empty!(u32, D) }
12261        }
12262
12263        #[inline]
12264        unsafe fn decode(
12265            &mut self,
12266            decoder: &mut fidl::encoding::Decoder<'_, D>,
12267            offset: usize,
12268            _depth: fidl::encoding::Depth,
12269        ) -> fidl::Result<()> {
12270            decoder.debug_check_bounds::<Self>(offset);
12271            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12272            // Verify that padding bytes are zero.
12273            // Copy from the buffer into the object.
12274            unsafe {
12275                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12276            }
12277            Ok(())
12278        }
12279    }
12280
12281    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpNoDelayRequest {
12282        type Borrowed<'a> = &'a Self;
12283        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12284            value
12285        }
12286    }
12287
12288    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpNoDelayRequest {
12289        type Owned = Self;
12290
12291        #[inline(always)]
12292        fn inline_align(_context: fidl::encoding::Context) -> usize {
12293            1
12294        }
12295
12296        #[inline(always)]
12297        fn inline_size(_context: fidl::encoding::Context) -> usize {
12298            1
12299        }
12300    }
12301
12302    unsafe impl<D: fidl::encoding::ResourceDialect>
12303        fidl::encoding::Encode<StreamSocketSetTcpNoDelayRequest, D>
12304        for &StreamSocketSetTcpNoDelayRequest
12305    {
12306        #[inline]
12307        unsafe fn encode(
12308            self,
12309            encoder: &mut fidl::encoding::Encoder<'_, D>,
12310            offset: usize,
12311            _depth: fidl::encoding::Depth,
12312        ) -> fidl::Result<()> {
12313            encoder.debug_check_bounds::<StreamSocketSetTcpNoDelayRequest>(offset);
12314            // Delegate to tuple encoding.
12315            fidl::encoding::Encode::<StreamSocketSetTcpNoDelayRequest, D>::encode(
12316                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12317                encoder,
12318                offset,
12319                _depth,
12320            )
12321        }
12322    }
12323    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12324        fidl::encoding::Encode<StreamSocketSetTcpNoDelayRequest, D> for (T0,)
12325    {
12326        #[inline]
12327        unsafe fn encode(
12328            self,
12329            encoder: &mut fidl::encoding::Encoder<'_, D>,
12330            offset: usize,
12331            depth: fidl::encoding::Depth,
12332        ) -> fidl::Result<()> {
12333            encoder.debug_check_bounds::<StreamSocketSetTcpNoDelayRequest>(offset);
12334            // Zero out padding regions. There's no need to apply masks
12335            // because the unmasked parts will be overwritten by fields.
12336            // Write the fields.
12337            self.0.encode(encoder, offset + 0, depth)?;
12338            Ok(())
12339        }
12340    }
12341
12342    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12343        for StreamSocketSetTcpNoDelayRequest
12344    {
12345        #[inline(always)]
12346        fn new_empty() -> Self {
12347            Self { value: fidl::new_empty!(bool, D) }
12348        }
12349
12350        #[inline]
12351        unsafe fn decode(
12352            &mut self,
12353            decoder: &mut fidl::encoding::Decoder<'_, D>,
12354            offset: usize,
12355            _depth: fidl::encoding::Depth,
12356        ) -> fidl::Result<()> {
12357            decoder.debug_check_bounds::<Self>(offset);
12358            // Verify that padding bytes are zero.
12359            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12360            Ok(())
12361        }
12362    }
12363
12364    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpQuickAckRequest {
12365        type Borrowed<'a> = &'a Self;
12366        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12367            value
12368        }
12369    }
12370
12371    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpQuickAckRequest {
12372        type Owned = Self;
12373
12374        #[inline(always)]
12375        fn inline_align(_context: fidl::encoding::Context) -> usize {
12376            1
12377        }
12378
12379        #[inline(always)]
12380        fn inline_size(_context: fidl::encoding::Context) -> usize {
12381            1
12382        }
12383    }
12384
12385    unsafe impl<D: fidl::encoding::ResourceDialect>
12386        fidl::encoding::Encode<StreamSocketSetTcpQuickAckRequest, D>
12387        for &StreamSocketSetTcpQuickAckRequest
12388    {
12389        #[inline]
12390        unsafe fn encode(
12391            self,
12392            encoder: &mut fidl::encoding::Encoder<'_, D>,
12393            offset: usize,
12394            _depth: fidl::encoding::Depth,
12395        ) -> fidl::Result<()> {
12396            encoder.debug_check_bounds::<StreamSocketSetTcpQuickAckRequest>(offset);
12397            // Delegate to tuple encoding.
12398            fidl::encoding::Encode::<StreamSocketSetTcpQuickAckRequest, D>::encode(
12399                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12400                encoder,
12401                offset,
12402                _depth,
12403            )
12404        }
12405    }
12406    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12407        fidl::encoding::Encode<StreamSocketSetTcpQuickAckRequest, D> for (T0,)
12408    {
12409        #[inline]
12410        unsafe fn encode(
12411            self,
12412            encoder: &mut fidl::encoding::Encoder<'_, D>,
12413            offset: usize,
12414            depth: fidl::encoding::Depth,
12415        ) -> fidl::Result<()> {
12416            encoder.debug_check_bounds::<StreamSocketSetTcpQuickAckRequest>(offset);
12417            // Zero out padding regions. There's no need to apply masks
12418            // because the unmasked parts will be overwritten by fields.
12419            // Write the fields.
12420            self.0.encode(encoder, offset + 0, depth)?;
12421            Ok(())
12422        }
12423    }
12424
12425    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12426        for StreamSocketSetTcpQuickAckRequest
12427    {
12428        #[inline(always)]
12429        fn new_empty() -> Self {
12430            Self { value: fidl::new_empty!(bool, D) }
12431        }
12432
12433        #[inline]
12434        unsafe fn decode(
12435            &mut self,
12436            decoder: &mut fidl::encoding::Decoder<'_, D>,
12437            offset: usize,
12438            _depth: fidl::encoding::Depth,
12439        ) -> fidl::Result<()> {
12440            decoder.debug_check_bounds::<Self>(offset);
12441            // Verify that padding bytes are zero.
12442            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12443            Ok(())
12444        }
12445    }
12446
12447    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpSynCountRequest {
12448        type Borrowed<'a> = &'a Self;
12449        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12450            value
12451        }
12452    }
12453
12454    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpSynCountRequest {
12455        type Owned = Self;
12456
12457        #[inline(always)]
12458        fn inline_align(_context: fidl::encoding::Context) -> usize {
12459            4
12460        }
12461
12462        #[inline(always)]
12463        fn inline_size(_context: fidl::encoding::Context) -> usize {
12464            4
12465        }
12466        #[inline(always)]
12467        fn encode_is_copy() -> bool {
12468            true
12469        }
12470
12471        #[inline(always)]
12472        fn decode_is_copy() -> bool {
12473            true
12474        }
12475    }
12476
12477    unsafe impl<D: fidl::encoding::ResourceDialect>
12478        fidl::encoding::Encode<StreamSocketSetTcpSynCountRequest, D>
12479        for &StreamSocketSetTcpSynCountRequest
12480    {
12481        #[inline]
12482        unsafe fn encode(
12483            self,
12484            encoder: &mut fidl::encoding::Encoder<'_, D>,
12485            offset: usize,
12486            _depth: fidl::encoding::Depth,
12487        ) -> fidl::Result<()> {
12488            encoder.debug_check_bounds::<StreamSocketSetTcpSynCountRequest>(offset);
12489            unsafe {
12490                // Copy the object into the buffer.
12491                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12492                (buf_ptr as *mut StreamSocketSetTcpSynCountRequest)
12493                    .write_unaligned((self as *const StreamSocketSetTcpSynCountRequest).read());
12494                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12495                // done second because the memcpy will write garbage to these bytes.
12496            }
12497            Ok(())
12498        }
12499    }
12500    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12501        fidl::encoding::Encode<StreamSocketSetTcpSynCountRequest, D> for (T0,)
12502    {
12503        #[inline]
12504        unsafe fn encode(
12505            self,
12506            encoder: &mut fidl::encoding::Encoder<'_, D>,
12507            offset: usize,
12508            depth: fidl::encoding::Depth,
12509        ) -> fidl::Result<()> {
12510            encoder.debug_check_bounds::<StreamSocketSetTcpSynCountRequest>(offset);
12511            // Zero out padding regions. There's no need to apply masks
12512            // because the unmasked parts will be overwritten by fields.
12513            // Write the fields.
12514            self.0.encode(encoder, offset + 0, depth)?;
12515            Ok(())
12516        }
12517    }
12518
12519    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12520        for StreamSocketSetTcpSynCountRequest
12521    {
12522        #[inline(always)]
12523        fn new_empty() -> Self {
12524            Self { value: fidl::new_empty!(u32, D) }
12525        }
12526
12527        #[inline]
12528        unsafe fn decode(
12529            &mut self,
12530            decoder: &mut fidl::encoding::Decoder<'_, D>,
12531            offset: usize,
12532            _depth: fidl::encoding::Depth,
12533        ) -> fidl::Result<()> {
12534            decoder.debug_check_bounds::<Self>(offset);
12535            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12536            // Verify that padding bytes are zero.
12537            // Copy from the buffer into the object.
12538            unsafe {
12539                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12540            }
12541            Ok(())
12542        }
12543    }
12544
12545    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpUserTimeoutRequest {
12546        type Borrowed<'a> = &'a Self;
12547        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12548            value
12549        }
12550    }
12551
12552    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpUserTimeoutRequest {
12553        type Owned = Self;
12554
12555        #[inline(always)]
12556        fn inline_align(_context: fidl::encoding::Context) -> usize {
12557            4
12558        }
12559
12560        #[inline(always)]
12561        fn inline_size(_context: fidl::encoding::Context) -> usize {
12562            4
12563        }
12564        #[inline(always)]
12565        fn encode_is_copy() -> bool {
12566            true
12567        }
12568
12569        #[inline(always)]
12570        fn decode_is_copy() -> bool {
12571            true
12572        }
12573    }
12574
12575    unsafe impl<D: fidl::encoding::ResourceDialect>
12576        fidl::encoding::Encode<StreamSocketSetTcpUserTimeoutRequest, D>
12577        for &StreamSocketSetTcpUserTimeoutRequest
12578    {
12579        #[inline]
12580        unsafe fn encode(
12581            self,
12582            encoder: &mut fidl::encoding::Encoder<'_, D>,
12583            offset: usize,
12584            _depth: fidl::encoding::Depth,
12585        ) -> fidl::Result<()> {
12586            encoder.debug_check_bounds::<StreamSocketSetTcpUserTimeoutRequest>(offset);
12587            unsafe {
12588                // Copy the object into the buffer.
12589                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12590                (buf_ptr as *mut StreamSocketSetTcpUserTimeoutRequest)
12591                    .write_unaligned((self as *const StreamSocketSetTcpUserTimeoutRequest).read());
12592                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12593                // done second because the memcpy will write garbage to these bytes.
12594            }
12595            Ok(())
12596        }
12597    }
12598    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12599        fidl::encoding::Encode<StreamSocketSetTcpUserTimeoutRequest, D> for (T0,)
12600    {
12601        #[inline]
12602        unsafe fn encode(
12603            self,
12604            encoder: &mut fidl::encoding::Encoder<'_, D>,
12605            offset: usize,
12606            depth: fidl::encoding::Depth,
12607        ) -> fidl::Result<()> {
12608            encoder.debug_check_bounds::<StreamSocketSetTcpUserTimeoutRequest>(offset);
12609            // Zero out padding regions. There's no need to apply masks
12610            // because the unmasked parts will be overwritten by fields.
12611            // Write the fields.
12612            self.0.encode(encoder, offset + 0, depth)?;
12613            Ok(())
12614        }
12615    }
12616
12617    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12618        for StreamSocketSetTcpUserTimeoutRequest
12619    {
12620        #[inline(always)]
12621        fn new_empty() -> Self {
12622            Self { value_millis: fidl::new_empty!(u32, D) }
12623        }
12624
12625        #[inline]
12626        unsafe fn decode(
12627            &mut self,
12628            decoder: &mut fidl::encoding::Decoder<'_, D>,
12629            offset: usize,
12630            _depth: fidl::encoding::Depth,
12631        ) -> fidl::Result<()> {
12632            decoder.debug_check_bounds::<Self>(offset);
12633            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12634            // Verify that padding bytes are zero.
12635            // Copy from the buffer into the object.
12636            unsafe {
12637                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12638            }
12639            Ok(())
12640        }
12641    }
12642
12643    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpWindowClampRequest {
12644        type Borrowed<'a> = &'a Self;
12645        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12646            value
12647        }
12648    }
12649
12650    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpWindowClampRequest {
12651        type Owned = Self;
12652
12653        #[inline(always)]
12654        fn inline_align(_context: fidl::encoding::Context) -> usize {
12655            4
12656        }
12657
12658        #[inline(always)]
12659        fn inline_size(_context: fidl::encoding::Context) -> usize {
12660            4
12661        }
12662        #[inline(always)]
12663        fn encode_is_copy() -> bool {
12664            true
12665        }
12666
12667        #[inline(always)]
12668        fn decode_is_copy() -> bool {
12669            true
12670        }
12671    }
12672
12673    unsafe impl<D: fidl::encoding::ResourceDialect>
12674        fidl::encoding::Encode<StreamSocketSetTcpWindowClampRequest, D>
12675        for &StreamSocketSetTcpWindowClampRequest
12676    {
12677        #[inline]
12678        unsafe fn encode(
12679            self,
12680            encoder: &mut fidl::encoding::Encoder<'_, D>,
12681            offset: usize,
12682            _depth: fidl::encoding::Depth,
12683        ) -> fidl::Result<()> {
12684            encoder.debug_check_bounds::<StreamSocketSetTcpWindowClampRequest>(offset);
12685            unsafe {
12686                // Copy the object into the buffer.
12687                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12688                (buf_ptr as *mut StreamSocketSetTcpWindowClampRequest)
12689                    .write_unaligned((self as *const StreamSocketSetTcpWindowClampRequest).read());
12690                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12691                // done second because the memcpy will write garbage to these bytes.
12692            }
12693            Ok(())
12694        }
12695    }
12696    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12697        fidl::encoding::Encode<StreamSocketSetTcpWindowClampRequest, D> for (T0,)
12698    {
12699        #[inline]
12700        unsafe fn encode(
12701            self,
12702            encoder: &mut fidl::encoding::Encoder<'_, D>,
12703            offset: usize,
12704            depth: fidl::encoding::Depth,
12705        ) -> fidl::Result<()> {
12706            encoder.debug_check_bounds::<StreamSocketSetTcpWindowClampRequest>(offset);
12707            // Zero out padding regions. There's no need to apply masks
12708            // because the unmasked parts will be overwritten by fields.
12709            // Write the fields.
12710            self.0.encode(encoder, offset + 0, depth)?;
12711            Ok(())
12712        }
12713    }
12714
12715    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12716        for StreamSocketSetTcpWindowClampRequest
12717    {
12718        #[inline(always)]
12719        fn new_empty() -> Self {
12720            Self { value: fidl::new_empty!(u32, D) }
12721        }
12722
12723        #[inline]
12724        unsafe fn decode(
12725            &mut self,
12726            decoder: &mut fidl::encoding::Decoder<'_, D>,
12727            offset: usize,
12728            _depth: fidl::encoding::Depth,
12729        ) -> fidl::Result<()> {
12730            decoder.debug_check_bounds::<Self>(offset);
12731            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12732            // Verify that padding bytes are zero.
12733            // Copy from the buffer into the object.
12734            unsafe {
12735                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12736            }
12737            Ok(())
12738        }
12739    }
12740
12741    impl fidl::encoding::ValueTypeMarker for StreamSocketGetInfoResponse {
12742        type Borrowed<'a> = &'a Self;
12743        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12744            value
12745        }
12746    }
12747
12748    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetInfoResponse {
12749        type Owned = Self;
12750
12751        #[inline(always)]
12752        fn inline_align(_context: fidl::encoding::Context) -> usize {
12753            4
12754        }
12755
12756        #[inline(always)]
12757        fn inline_size(_context: fidl::encoding::Context) -> usize {
12758            8
12759        }
12760    }
12761
12762    unsafe impl<D: fidl::encoding::ResourceDialect>
12763        fidl::encoding::Encode<StreamSocketGetInfoResponse, D> for &StreamSocketGetInfoResponse
12764    {
12765        #[inline]
12766        unsafe fn encode(
12767            self,
12768            encoder: &mut fidl::encoding::Encoder<'_, D>,
12769            offset: usize,
12770            _depth: fidl::encoding::Depth,
12771        ) -> fidl::Result<()> {
12772            encoder.debug_check_bounds::<StreamSocketGetInfoResponse>(offset);
12773            // Delegate to tuple encoding.
12774            fidl::encoding::Encode::<StreamSocketGetInfoResponse, D>::encode(
12775                (
12776                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
12777                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
12778                ),
12779                encoder,
12780                offset,
12781                _depth,
12782            )
12783        }
12784    }
12785    unsafe impl<
12786        D: fidl::encoding::ResourceDialect,
12787        T0: fidl::encoding::Encode<Domain, D>,
12788        T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
12789    > fidl::encoding::Encode<StreamSocketGetInfoResponse, D> for (T0, T1)
12790    {
12791        #[inline]
12792        unsafe fn encode(
12793            self,
12794            encoder: &mut fidl::encoding::Encoder<'_, D>,
12795            offset: usize,
12796            depth: fidl::encoding::Depth,
12797        ) -> fidl::Result<()> {
12798            encoder.debug_check_bounds::<StreamSocketGetInfoResponse>(offset);
12799            // Zero out padding regions. There's no need to apply masks
12800            // because the unmasked parts will be overwritten by fields.
12801            unsafe {
12802                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
12803                (ptr as *mut u32).write_unaligned(0);
12804            }
12805            // Write the fields.
12806            self.0.encode(encoder, offset + 0, depth)?;
12807            self.1.encode(encoder, offset + 4, depth)?;
12808            Ok(())
12809        }
12810    }
12811
12812    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12813        for StreamSocketGetInfoResponse
12814    {
12815        #[inline(always)]
12816        fn new_empty() -> Self {
12817            Self {
12818                domain: fidl::new_empty!(Domain, D),
12819                proto: fidl::new_empty!(StreamSocketProtocol, D),
12820            }
12821        }
12822
12823        #[inline]
12824        unsafe fn decode(
12825            &mut self,
12826            decoder: &mut fidl::encoding::Decoder<'_, D>,
12827            offset: usize,
12828            _depth: fidl::encoding::Depth,
12829        ) -> fidl::Result<()> {
12830            decoder.debug_check_bounds::<Self>(offset);
12831            // Verify that padding bytes are zero.
12832            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
12833            let padval = unsafe { (ptr as *const u32).read_unaligned() };
12834            let mask = 0xffff0000u32;
12835            let maskedval = padval & mask;
12836            if maskedval != 0 {
12837                return Err(fidl::Error::NonZeroPadding {
12838                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
12839                });
12840            }
12841            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
12842            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
12843            Ok(())
12844        }
12845    }
12846
12847    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpCongestionResponse {
12848        type Borrowed<'a> = &'a Self;
12849        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12850            value
12851        }
12852    }
12853
12854    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpCongestionResponse {
12855        type Owned = Self;
12856
12857        #[inline(always)]
12858        fn inline_align(_context: fidl::encoding::Context) -> usize {
12859            4
12860        }
12861
12862        #[inline(always)]
12863        fn inline_size(_context: fidl::encoding::Context) -> usize {
12864            4
12865        }
12866    }
12867
12868    unsafe impl<D: fidl::encoding::ResourceDialect>
12869        fidl::encoding::Encode<StreamSocketGetTcpCongestionResponse, D>
12870        for &StreamSocketGetTcpCongestionResponse
12871    {
12872        #[inline]
12873        unsafe fn encode(
12874            self,
12875            encoder: &mut fidl::encoding::Encoder<'_, D>,
12876            offset: usize,
12877            _depth: fidl::encoding::Depth,
12878        ) -> fidl::Result<()> {
12879            encoder.debug_check_bounds::<StreamSocketGetTcpCongestionResponse>(offset);
12880            // Delegate to tuple encoding.
12881            fidl::encoding::Encode::<StreamSocketGetTcpCongestionResponse, D>::encode(
12882                (<TcpCongestionControl as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12883                encoder,
12884                offset,
12885                _depth,
12886            )
12887        }
12888    }
12889    unsafe impl<
12890        D: fidl::encoding::ResourceDialect,
12891        T0: fidl::encoding::Encode<TcpCongestionControl, D>,
12892    > fidl::encoding::Encode<StreamSocketGetTcpCongestionResponse, D> for (T0,)
12893    {
12894        #[inline]
12895        unsafe fn encode(
12896            self,
12897            encoder: &mut fidl::encoding::Encoder<'_, D>,
12898            offset: usize,
12899            depth: fidl::encoding::Depth,
12900        ) -> fidl::Result<()> {
12901            encoder.debug_check_bounds::<StreamSocketGetTcpCongestionResponse>(offset);
12902            // Zero out padding regions. There's no need to apply masks
12903            // because the unmasked parts will be overwritten by fields.
12904            // Write the fields.
12905            self.0.encode(encoder, offset + 0, depth)?;
12906            Ok(())
12907        }
12908    }
12909
12910    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12911        for StreamSocketGetTcpCongestionResponse
12912    {
12913        #[inline(always)]
12914        fn new_empty() -> Self {
12915            Self { value: fidl::new_empty!(TcpCongestionControl, D) }
12916        }
12917
12918        #[inline]
12919        unsafe fn decode(
12920            &mut self,
12921            decoder: &mut fidl::encoding::Decoder<'_, D>,
12922            offset: usize,
12923            _depth: fidl::encoding::Depth,
12924        ) -> fidl::Result<()> {
12925            decoder.debug_check_bounds::<Self>(offset);
12926            // Verify that padding bytes are zero.
12927            fidl::decode!(TcpCongestionControl, D, &mut self.value, decoder, offset + 0, _depth)?;
12928            Ok(())
12929        }
12930    }
12931
12932    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpCorkResponse {
12933        type Borrowed<'a> = &'a Self;
12934        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12935            value
12936        }
12937    }
12938
12939    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpCorkResponse {
12940        type Owned = Self;
12941
12942        #[inline(always)]
12943        fn inline_align(_context: fidl::encoding::Context) -> usize {
12944            1
12945        }
12946
12947        #[inline(always)]
12948        fn inline_size(_context: fidl::encoding::Context) -> usize {
12949            1
12950        }
12951    }
12952
12953    unsafe impl<D: fidl::encoding::ResourceDialect>
12954        fidl::encoding::Encode<StreamSocketGetTcpCorkResponse, D>
12955        for &StreamSocketGetTcpCorkResponse
12956    {
12957        #[inline]
12958        unsafe fn encode(
12959            self,
12960            encoder: &mut fidl::encoding::Encoder<'_, D>,
12961            offset: usize,
12962            _depth: fidl::encoding::Depth,
12963        ) -> fidl::Result<()> {
12964            encoder.debug_check_bounds::<StreamSocketGetTcpCorkResponse>(offset);
12965            // Delegate to tuple encoding.
12966            fidl::encoding::Encode::<StreamSocketGetTcpCorkResponse, D>::encode(
12967                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12968                encoder,
12969                offset,
12970                _depth,
12971            )
12972        }
12973    }
12974    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12975        fidl::encoding::Encode<StreamSocketGetTcpCorkResponse, D> for (T0,)
12976    {
12977        #[inline]
12978        unsafe fn encode(
12979            self,
12980            encoder: &mut fidl::encoding::Encoder<'_, D>,
12981            offset: usize,
12982            depth: fidl::encoding::Depth,
12983        ) -> fidl::Result<()> {
12984            encoder.debug_check_bounds::<StreamSocketGetTcpCorkResponse>(offset);
12985            // Zero out padding regions. There's no need to apply masks
12986            // because the unmasked parts will be overwritten by fields.
12987            // Write the fields.
12988            self.0.encode(encoder, offset + 0, depth)?;
12989            Ok(())
12990        }
12991    }
12992
12993    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12994        for StreamSocketGetTcpCorkResponse
12995    {
12996        #[inline(always)]
12997        fn new_empty() -> Self {
12998            Self { value: fidl::new_empty!(bool, D) }
12999        }
13000
13001        #[inline]
13002        unsafe fn decode(
13003            &mut self,
13004            decoder: &mut fidl::encoding::Decoder<'_, D>,
13005            offset: usize,
13006            _depth: fidl::encoding::Depth,
13007        ) -> fidl::Result<()> {
13008            decoder.debug_check_bounds::<Self>(offset);
13009            // Verify that padding bytes are zero.
13010            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13011            Ok(())
13012        }
13013    }
13014
13015    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpDeferAcceptResponse {
13016        type Borrowed<'a> = &'a Self;
13017        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13018            value
13019        }
13020    }
13021
13022    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpDeferAcceptResponse {
13023        type Owned = Self;
13024
13025        #[inline(always)]
13026        fn inline_align(_context: fidl::encoding::Context) -> usize {
13027            4
13028        }
13029
13030        #[inline(always)]
13031        fn inline_size(_context: fidl::encoding::Context) -> usize {
13032            4
13033        }
13034        #[inline(always)]
13035        fn encode_is_copy() -> bool {
13036            true
13037        }
13038
13039        #[inline(always)]
13040        fn decode_is_copy() -> bool {
13041            true
13042        }
13043    }
13044
13045    unsafe impl<D: fidl::encoding::ResourceDialect>
13046        fidl::encoding::Encode<StreamSocketGetTcpDeferAcceptResponse, D>
13047        for &StreamSocketGetTcpDeferAcceptResponse
13048    {
13049        #[inline]
13050        unsafe fn encode(
13051            self,
13052            encoder: &mut fidl::encoding::Encoder<'_, D>,
13053            offset: usize,
13054            _depth: fidl::encoding::Depth,
13055        ) -> fidl::Result<()> {
13056            encoder.debug_check_bounds::<StreamSocketGetTcpDeferAcceptResponse>(offset);
13057            unsafe {
13058                // Copy the object into the buffer.
13059                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13060                (buf_ptr as *mut StreamSocketGetTcpDeferAcceptResponse)
13061                    .write_unaligned((self as *const StreamSocketGetTcpDeferAcceptResponse).read());
13062                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13063                // done second because the memcpy will write garbage to these bytes.
13064            }
13065            Ok(())
13066        }
13067    }
13068    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13069        fidl::encoding::Encode<StreamSocketGetTcpDeferAcceptResponse, D> for (T0,)
13070    {
13071        #[inline]
13072        unsafe fn encode(
13073            self,
13074            encoder: &mut fidl::encoding::Encoder<'_, D>,
13075            offset: usize,
13076            depth: fidl::encoding::Depth,
13077        ) -> fidl::Result<()> {
13078            encoder.debug_check_bounds::<StreamSocketGetTcpDeferAcceptResponse>(offset);
13079            // Zero out padding regions. There's no need to apply masks
13080            // because the unmasked parts will be overwritten by fields.
13081            // Write the fields.
13082            self.0.encode(encoder, offset + 0, depth)?;
13083            Ok(())
13084        }
13085    }
13086
13087    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13088        for StreamSocketGetTcpDeferAcceptResponse
13089    {
13090        #[inline(always)]
13091        fn new_empty() -> Self {
13092            Self { value_secs: fidl::new_empty!(u32, D) }
13093        }
13094
13095        #[inline]
13096        unsafe fn decode(
13097            &mut self,
13098            decoder: &mut fidl::encoding::Decoder<'_, D>,
13099            offset: usize,
13100            _depth: fidl::encoding::Depth,
13101        ) -> fidl::Result<()> {
13102            decoder.debug_check_bounds::<Self>(offset);
13103            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13104            // Verify that padding bytes are zero.
13105            // Copy from the buffer into the object.
13106            unsafe {
13107                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13108            }
13109            Ok(())
13110        }
13111    }
13112
13113    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpInfoResponse {
13114        type Borrowed<'a> = &'a Self;
13115        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13116            value
13117        }
13118    }
13119
13120    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpInfoResponse {
13121        type Owned = Self;
13122
13123        #[inline(always)]
13124        fn inline_align(_context: fidl::encoding::Context) -> usize {
13125            8
13126        }
13127
13128        #[inline(always)]
13129        fn inline_size(_context: fidl::encoding::Context) -> usize {
13130            16
13131        }
13132    }
13133
13134    unsafe impl<D: fidl::encoding::ResourceDialect>
13135        fidl::encoding::Encode<StreamSocketGetTcpInfoResponse, D>
13136        for &StreamSocketGetTcpInfoResponse
13137    {
13138        #[inline]
13139        unsafe fn encode(
13140            self,
13141            encoder: &mut fidl::encoding::Encoder<'_, D>,
13142            offset: usize,
13143            _depth: fidl::encoding::Depth,
13144        ) -> fidl::Result<()> {
13145            encoder.debug_check_bounds::<StreamSocketGetTcpInfoResponse>(offset);
13146            // Delegate to tuple encoding.
13147            fidl::encoding::Encode::<StreamSocketGetTcpInfoResponse, D>::encode(
13148                (<TcpInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
13149                encoder,
13150                offset,
13151                _depth,
13152            )
13153        }
13154    }
13155    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TcpInfo, D>>
13156        fidl::encoding::Encode<StreamSocketGetTcpInfoResponse, D> for (T0,)
13157    {
13158        #[inline]
13159        unsafe fn encode(
13160            self,
13161            encoder: &mut fidl::encoding::Encoder<'_, D>,
13162            offset: usize,
13163            depth: fidl::encoding::Depth,
13164        ) -> fidl::Result<()> {
13165            encoder.debug_check_bounds::<StreamSocketGetTcpInfoResponse>(offset);
13166            // Zero out padding regions. There's no need to apply masks
13167            // because the unmasked parts will be overwritten by fields.
13168            // Write the fields.
13169            self.0.encode(encoder, offset + 0, depth)?;
13170            Ok(())
13171        }
13172    }
13173
13174    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13175        for StreamSocketGetTcpInfoResponse
13176    {
13177        #[inline(always)]
13178        fn new_empty() -> Self {
13179            Self { info: fidl::new_empty!(TcpInfo, D) }
13180        }
13181
13182        #[inline]
13183        unsafe fn decode(
13184            &mut self,
13185            decoder: &mut fidl::encoding::Decoder<'_, D>,
13186            offset: usize,
13187            _depth: fidl::encoding::Depth,
13188        ) -> fidl::Result<()> {
13189            decoder.debug_check_bounds::<Self>(offset);
13190            // Verify that padding bytes are zero.
13191            fidl::decode!(TcpInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
13192            Ok(())
13193        }
13194    }
13195
13196    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveCountResponse {
13197        type Borrowed<'a> = &'a Self;
13198        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13199            value
13200        }
13201    }
13202
13203    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveCountResponse {
13204        type Owned = Self;
13205
13206        #[inline(always)]
13207        fn inline_align(_context: fidl::encoding::Context) -> usize {
13208            4
13209        }
13210
13211        #[inline(always)]
13212        fn inline_size(_context: fidl::encoding::Context) -> usize {
13213            4
13214        }
13215        #[inline(always)]
13216        fn encode_is_copy() -> bool {
13217            true
13218        }
13219
13220        #[inline(always)]
13221        fn decode_is_copy() -> bool {
13222            true
13223        }
13224    }
13225
13226    unsafe impl<D: fidl::encoding::ResourceDialect>
13227        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveCountResponse, D>
13228        for &StreamSocketGetTcpKeepAliveCountResponse
13229    {
13230        #[inline]
13231        unsafe fn encode(
13232            self,
13233            encoder: &mut fidl::encoding::Encoder<'_, D>,
13234            offset: usize,
13235            _depth: fidl::encoding::Depth,
13236        ) -> fidl::Result<()> {
13237            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveCountResponse>(offset);
13238            unsafe {
13239                // Copy the object into the buffer.
13240                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13241                (buf_ptr as *mut StreamSocketGetTcpKeepAliveCountResponse).write_unaligned(
13242                    (self as *const StreamSocketGetTcpKeepAliveCountResponse).read(),
13243                );
13244                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13245                // done second because the memcpy will write garbage to these bytes.
13246            }
13247            Ok(())
13248        }
13249    }
13250    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13251        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveCountResponse, D> for (T0,)
13252    {
13253        #[inline]
13254        unsafe fn encode(
13255            self,
13256            encoder: &mut fidl::encoding::Encoder<'_, D>,
13257            offset: usize,
13258            depth: fidl::encoding::Depth,
13259        ) -> fidl::Result<()> {
13260            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveCountResponse>(offset);
13261            // Zero out padding regions. There's no need to apply masks
13262            // because the unmasked parts will be overwritten by fields.
13263            // Write the fields.
13264            self.0.encode(encoder, offset + 0, depth)?;
13265            Ok(())
13266        }
13267    }
13268
13269    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13270        for StreamSocketGetTcpKeepAliveCountResponse
13271    {
13272        #[inline(always)]
13273        fn new_empty() -> Self {
13274            Self { value: fidl::new_empty!(u32, D) }
13275        }
13276
13277        #[inline]
13278        unsafe fn decode(
13279            &mut self,
13280            decoder: &mut fidl::encoding::Decoder<'_, D>,
13281            offset: usize,
13282            _depth: fidl::encoding::Depth,
13283        ) -> fidl::Result<()> {
13284            decoder.debug_check_bounds::<Self>(offset);
13285            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13286            // Verify that padding bytes are zero.
13287            // Copy from the buffer into the object.
13288            unsafe {
13289                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13290            }
13291            Ok(())
13292        }
13293    }
13294
13295    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveIdleResponse {
13296        type Borrowed<'a> = &'a Self;
13297        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13298            value
13299        }
13300    }
13301
13302    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveIdleResponse {
13303        type Owned = Self;
13304
13305        #[inline(always)]
13306        fn inline_align(_context: fidl::encoding::Context) -> usize {
13307            4
13308        }
13309
13310        #[inline(always)]
13311        fn inline_size(_context: fidl::encoding::Context) -> usize {
13312            4
13313        }
13314        #[inline(always)]
13315        fn encode_is_copy() -> bool {
13316            true
13317        }
13318
13319        #[inline(always)]
13320        fn decode_is_copy() -> bool {
13321            true
13322        }
13323    }
13324
13325    unsafe impl<D: fidl::encoding::ResourceDialect>
13326        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIdleResponse, D>
13327        for &StreamSocketGetTcpKeepAliveIdleResponse
13328    {
13329        #[inline]
13330        unsafe fn encode(
13331            self,
13332            encoder: &mut fidl::encoding::Encoder<'_, D>,
13333            offset: usize,
13334            _depth: fidl::encoding::Depth,
13335        ) -> fidl::Result<()> {
13336            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIdleResponse>(offset);
13337            unsafe {
13338                // Copy the object into the buffer.
13339                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13340                (buf_ptr as *mut StreamSocketGetTcpKeepAliveIdleResponse).write_unaligned(
13341                    (self as *const StreamSocketGetTcpKeepAliveIdleResponse).read(),
13342                );
13343                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13344                // done second because the memcpy will write garbage to these bytes.
13345            }
13346            Ok(())
13347        }
13348    }
13349    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13350        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIdleResponse, D> for (T0,)
13351    {
13352        #[inline]
13353        unsafe fn encode(
13354            self,
13355            encoder: &mut fidl::encoding::Encoder<'_, D>,
13356            offset: usize,
13357            depth: fidl::encoding::Depth,
13358        ) -> fidl::Result<()> {
13359            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIdleResponse>(offset);
13360            // Zero out padding regions. There's no need to apply masks
13361            // because the unmasked parts will be overwritten by fields.
13362            // Write the fields.
13363            self.0.encode(encoder, offset + 0, depth)?;
13364            Ok(())
13365        }
13366    }
13367
13368    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13369        for StreamSocketGetTcpKeepAliveIdleResponse
13370    {
13371        #[inline(always)]
13372        fn new_empty() -> Self {
13373            Self { value_secs: fidl::new_empty!(u32, D) }
13374        }
13375
13376        #[inline]
13377        unsafe fn decode(
13378            &mut self,
13379            decoder: &mut fidl::encoding::Decoder<'_, D>,
13380            offset: usize,
13381            _depth: fidl::encoding::Depth,
13382        ) -> fidl::Result<()> {
13383            decoder.debug_check_bounds::<Self>(offset);
13384            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13385            // Verify that padding bytes are zero.
13386            // Copy from the buffer into the object.
13387            unsafe {
13388                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13389            }
13390            Ok(())
13391        }
13392    }
13393
13394    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveIntervalResponse {
13395        type Borrowed<'a> = &'a Self;
13396        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13397            value
13398        }
13399    }
13400
13401    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveIntervalResponse {
13402        type Owned = Self;
13403
13404        #[inline(always)]
13405        fn inline_align(_context: fidl::encoding::Context) -> usize {
13406            4
13407        }
13408
13409        #[inline(always)]
13410        fn inline_size(_context: fidl::encoding::Context) -> usize {
13411            4
13412        }
13413        #[inline(always)]
13414        fn encode_is_copy() -> bool {
13415            true
13416        }
13417
13418        #[inline(always)]
13419        fn decode_is_copy() -> bool {
13420            true
13421        }
13422    }
13423
13424    unsafe impl<D: fidl::encoding::ResourceDialect>
13425        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIntervalResponse, D>
13426        for &StreamSocketGetTcpKeepAliveIntervalResponse
13427    {
13428        #[inline]
13429        unsafe fn encode(
13430            self,
13431            encoder: &mut fidl::encoding::Encoder<'_, D>,
13432            offset: usize,
13433            _depth: fidl::encoding::Depth,
13434        ) -> fidl::Result<()> {
13435            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIntervalResponse>(offset);
13436            unsafe {
13437                // Copy the object into the buffer.
13438                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13439                (buf_ptr as *mut StreamSocketGetTcpKeepAliveIntervalResponse).write_unaligned(
13440                    (self as *const StreamSocketGetTcpKeepAliveIntervalResponse).read(),
13441                );
13442                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13443                // done second because the memcpy will write garbage to these bytes.
13444            }
13445            Ok(())
13446        }
13447    }
13448    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13449        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIntervalResponse, D> for (T0,)
13450    {
13451        #[inline]
13452        unsafe fn encode(
13453            self,
13454            encoder: &mut fidl::encoding::Encoder<'_, D>,
13455            offset: usize,
13456            depth: fidl::encoding::Depth,
13457        ) -> fidl::Result<()> {
13458            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIntervalResponse>(offset);
13459            // Zero out padding regions. There's no need to apply masks
13460            // because the unmasked parts will be overwritten by fields.
13461            // Write the fields.
13462            self.0.encode(encoder, offset + 0, depth)?;
13463            Ok(())
13464        }
13465    }
13466
13467    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13468        for StreamSocketGetTcpKeepAliveIntervalResponse
13469    {
13470        #[inline(always)]
13471        fn new_empty() -> Self {
13472            Self { value_secs: fidl::new_empty!(u32, D) }
13473        }
13474
13475        #[inline]
13476        unsafe fn decode(
13477            &mut self,
13478            decoder: &mut fidl::encoding::Decoder<'_, D>,
13479            offset: usize,
13480            _depth: fidl::encoding::Depth,
13481        ) -> fidl::Result<()> {
13482            decoder.debug_check_bounds::<Self>(offset);
13483            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13484            // Verify that padding bytes are zero.
13485            // Copy from the buffer into the object.
13486            unsafe {
13487                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13488            }
13489            Ok(())
13490        }
13491    }
13492
13493    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpLingerResponse {
13494        type Borrowed<'a> = &'a Self;
13495        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13496            value
13497        }
13498    }
13499
13500    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpLingerResponse {
13501        type Owned = Self;
13502
13503        #[inline(always)]
13504        fn inline_align(_context: fidl::encoding::Context) -> usize {
13505            8
13506        }
13507
13508        #[inline(always)]
13509        fn inline_size(_context: fidl::encoding::Context) -> usize {
13510            16
13511        }
13512    }
13513
13514    unsafe impl<D: fidl::encoding::ResourceDialect>
13515        fidl::encoding::Encode<StreamSocketGetTcpLingerResponse, D>
13516        for &StreamSocketGetTcpLingerResponse
13517    {
13518        #[inline]
13519        unsafe fn encode(
13520            self,
13521            encoder: &mut fidl::encoding::Encoder<'_, D>,
13522            offset: usize,
13523            _depth: fidl::encoding::Depth,
13524        ) -> fidl::Result<()> {
13525            encoder.debug_check_bounds::<StreamSocketGetTcpLingerResponse>(offset);
13526            // Delegate to tuple encoding.
13527            fidl::encoding::Encode::<StreamSocketGetTcpLingerResponse, D>::encode(
13528                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value_secs),),
13529                encoder,
13530                offset,
13531                _depth,
13532            )
13533        }
13534    }
13535    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
13536        fidl::encoding::Encode<StreamSocketGetTcpLingerResponse, D> for (T0,)
13537    {
13538        #[inline]
13539        unsafe fn encode(
13540            self,
13541            encoder: &mut fidl::encoding::Encoder<'_, D>,
13542            offset: usize,
13543            depth: fidl::encoding::Depth,
13544        ) -> fidl::Result<()> {
13545            encoder.debug_check_bounds::<StreamSocketGetTcpLingerResponse>(offset);
13546            // Zero out padding regions. There's no need to apply masks
13547            // because the unmasked parts will be overwritten by fields.
13548            // Write the fields.
13549            self.0.encode(encoder, offset + 0, depth)?;
13550            Ok(())
13551        }
13552    }
13553
13554    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13555        for StreamSocketGetTcpLingerResponse
13556    {
13557        #[inline(always)]
13558        fn new_empty() -> Self {
13559            Self { value_secs: fidl::new_empty!(OptionalUint32, D) }
13560        }
13561
13562        #[inline]
13563        unsafe fn decode(
13564            &mut self,
13565            decoder: &mut fidl::encoding::Decoder<'_, D>,
13566            offset: usize,
13567            _depth: fidl::encoding::Depth,
13568        ) -> fidl::Result<()> {
13569            decoder.debug_check_bounds::<Self>(offset);
13570            // Verify that padding bytes are zero.
13571            fidl::decode!(OptionalUint32, D, &mut self.value_secs, decoder, offset + 0, _depth)?;
13572            Ok(())
13573        }
13574    }
13575
13576    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpMaxSegmentResponse {
13577        type Borrowed<'a> = &'a Self;
13578        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13579            value
13580        }
13581    }
13582
13583    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpMaxSegmentResponse {
13584        type Owned = Self;
13585
13586        #[inline(always)]
13587        fn inline_align(_context: fidl::encoding::Context) -> usize {
13588            4
13589        }
13590
13591        #[inline(always)]
13592        fn inline_size(_context: fidl::encoding::Context) -> usize {
13593            4
13594        }
13595        #[inline(always)]
13596        fn encode_is_copy() -> bool {
13597            true
13598        }
13599
13600        #[inline(always)]
13601        fn decode_is_copy() -> bool {
13602            true
13603        }
13604    }
13605
13606    unsafe impl<D: fidl::encoding::ResourceDialect>
13607        fidl::encoding::Encode<StreamSocketGetTcpMaxSegmentResponse, D>
13608        for &StreamSocketGetTcpMaxSegmentResponse
13609    {
13610        #[inline]
13611        unsafe fn encode(
13612            self,
13613            encoder: &mut fidl::encoding::Encoder<'_, D>,
13614            offset: usize,
13615            _depth: fidl::encoding::Depth,
13616        ) -> fidl::Result<()> {
13617            encoder.debug_check_bounds::<StreamSocketGetTcpMaxSegmentResponse>(offset);
13618            unsafe {
13619                // Copy the object into the buffer.
13620                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13621                (buf_ptr as *mut StreamSocketGetTcpMaxSegmentResponse)
13622                    .write_unaligned((self as *const StreamSocketGetTcpMaxSegmentResponse).read());
13623                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13624                // done second because the memcpy will write garbage to these bytes.
13625            }
13626            Ok(())
13627        }
13628    }
13629    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13630        fidl::encoding::Encode<StreamSocketGetTcpMaxSegmentResponse, D> for (T0,)
13631    {
13632        #[inline]
13633        unsafe fn encode(
13634            self,
13635            encoder: &mut fidl::encoding::Encoder<'_, D>,
13636            offset: usize,
13637            depth: fidl::encoding::Depth,
13638        ) -> fidl::Result<()> {
13639            encoder.debug_check_bounds::<StreamSocketGetTcpMaxSegmentResponse>(offset);
13640            // Zero out padding regions. There's no need to apply masks
13641            // because the unmasked parts will be overwritten by fields.
13642            // Write the fields.
13643            self.0.encode(encoder, offset + 0, depth)?;
13644            Ok(())
13645        }
13646    }
13647
13648    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13649        for StreamSocketGetTcpMaxSegmentResponse
13650    {
13651        #[inline(always)]
13652        fn new_empty() -> Self {
13653            Self { value_bytes: fidl::new_empty!(u32, D) }
13654        }
13655
13656        #[inline]
13657        unsafe fn decode(
13658            &mut self,
13659            decoder: &mut fidl::encoding::Decoder<'_, D>,
13660            offset: usize,
13661            _depth: fidl::encoding::Depth,
13662        ) -> fidl::Result<()> {
13663            decoder.debug_check_bounds::<Self>(offset);
13664            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13665            // Verify that padding bytes are zero.
13666            // Copy from the buffer into the object.
13667            unsafe {
13668                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13669            }
13670            Ok(())
13671        }
13672    }
13673
13674    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpNoDelayResponse {
13675        type Borrowed<'a> = &'a Self;
13676        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13677            value
13678        }
13679    }
13680
13681    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpNoDelayResponse {
13682        type Owned = Self;
13683
13684        #[inline(always)]
13685        fn inline_align(_context: fidl::encoding::Context) -> usize {
13686            1
13687        }
13688
13689        #[inline(always)]
13690        fn inline_size(_context: fidl::encoding::Context) -> usize {
13691            1
13692        }
13693    }
13694
13695    unsafe impl<D: fidl::encoding::ResourceDialect>
13696        fidl::encoding::Encode<StreamSocketGetTcpNoDelayResponse, D>
13697        for &StreamSocketGetTcpNoDelayResponse
13698    {
13699        #[inline]
13700        unsafe fn encode(
13701            self,
13702            encoder: &mut fidl::encoding::Encoder<'_, D>,
13703            offset: usize,
13704            _depth: fidl::encoding::Depth,
13705        ) -> fidl::Result<()> {
13706            encoder.debug_check_bounds::<StreamSocketGetTcpNoDelayResponse>(offset);
13707            // Delegate to tuple encoding.
13708            fidl::encoding::Encode::<StreamSocketGetTcpNoDelayResponse, D>::encode(
13709                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
13710                encoder,
13711                offset,
13712                _depth,
13713            )
13714        }
13715    }
13716    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
13717        fidl::encoding::Encode<StreamSocketGetTcpNoDelayResponse, D> for (T0,)
13718    {
13719        #[inline]
13720        unsafe fn encode(
13721            self,
13722            encoder: &mut fidl::encoding::Encoder<'_, D>,
13723            offset: usize,
13724            depth: fidl::encoding::Depth,
13725        ) -> fidl::Result<()> {
13726            encoder.debug_check_bounds::<StreamSocketGetTcpNoDelayResponse>(offset);
13727            // Zero out padding regions. There's no need to apply masks
13728            // because the unmasked parts will be overwritten by fields.
13729            // Write the fields.
13730            self.0.encode(encoder, offset + 0, depth)?;
13731            Ok(())
13732        }
13733    }
13734
13735    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13736        for StreamSocketGetTcpNoDelayResponse
13737    {
13738        #[inline(always)]
13739        fn new_empty() -> Self {
13740            Self { value: fidl::new_empty!(bool, D) }
13741        }
13742
13743        #[inline]
13744        unsafe fn decode(
13745            &mut self,
13746            decoder: &mut fidl::encoding::Decoder<'_, D>,
13747            offset: usize,
13748            _depth: fidl::encoding::Depth,
13749        ) -> fidl::Result<()> {
13750            decoder.debug_check_bounds::<Self>(offset);
13751            // Verify that padding bytes are zero.
13752            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13753            Ok(())
13754        }
13755    }
13756
13757    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpQuickAckResponse {
13758        type Borrowed<'a> = &'a Self;
13759        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13760            value
13761        }
13762    }
13763
13764    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpQuickAckResponse {
13765        type Owned = Self;
13766
13767        #[inline(always)]
13768        fn inline_align(_context: fidl::encoding::Context) -> usize {
13769            1
13770        }
13771
13772        #[inline(always)]
13773        fn inline_size(_context: fidl::encoding::Context) -> usize {
13774            1
13775        }
13776    }
13777
13778    unsafe impl<D: fidl::encoding::ResourceDialect>
13779        fidl::encoding::Encode<StreamSocketGetTcpQuickAckResponse, D>
13780        for &StreamSocketGetTcpQuickAckResponse
13781    {
13782        #[inline]
13783        unsafe fn encode(
13784            self,
13785            encoder: &mut fidl::encoding::Encoder<'_, D>,
13786            offset: usize,
13787            _depth: fidl::encoding::Depth,
13788        ) -> fidl::Result<()> {
13789            encoder.debug_check_bounds::<StreamSocketGetTcpQuickAckResponse>(offset);
13790            // Delegate to tuple encoding.
13791            fidl::encoding::Encode::<StreamSocketGetTcpQuickAckResponse, D>::encode(
13792                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
13793                encoder,
13794                offset,
13795                _depth,
13796            )
13797        }
13798    }
13799    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
13800        fidl::encoding::Encode<StreamSocketGetTcpQuickAckResponse, D> for (T0,)
13801    {
13802        #[inline]
13803        unsafe fn encode(
13804            self,
13805            encoder: &mut fidl::encoding::Encoder<'_, D>,
13806            offset: usize,
13807            depth: fidl::encoding::Depth,
13808        ) -> fidl::Result<()> {
13809            encoder.debug_check_bounds::<StreamSocketGetTcpQuickAckResponse>(offset);
13810            // Zero out padding regions. There's no need to apply masks
13811            // because the unmasked parts will be overwritten by fields.
13812            // Write the fields.
13813            self.0.encode(encoder, offset + 0, depth)?;
13814            Ok(())
13815        }
13816    }
13817
13818    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13819        for StreamSocketGetTcpQuickAckResponse
13820    {
13821        #[inline(always)]
13822        fn new_empty() -> Self {
13823            Self { value: fidl::new_empty!(bool, D) }
13824        }
13825
13826        #[inline]
13827        unsafe fn decode(
13828            &mut self,
13829            decoder: &mut fidl::encoding::Decoder<'_, D>,
13830            offset: usize,
13831            _depth: fidl::encoding::Depth,
13832        ) -> fidl::Result<()> {
13833            decoder.debug_check_bounds::<Self>(offset);
13834            // Verify that padding bytes are zero.
13835            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13836            Ok(())
13837        }
13838    }
13839
13840    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpSynCountResponse {
13841        type Borrowed<'a> = &'a Self;
13842        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13843            value
13844        }
13845    }
13846
13847    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpSynCountResponse {
13848        type Owned = Self;
13849
13850        #[inline(always)]
13851        fn inline_align(_context: fidl::encoding::Context) -> usize {
13852            4
13853        }
13854
13855        #[inline(always)]
13856        fn inline_size(_context: fidl::encoding::Context) -> usize {
13857            4
13858        }
13859        #[inline(always)]
13860        fn encode_is_copy() -> bool {
13861            true
13862        }
13863
13864        #[inline(always)]
13865        fn decode_is_copy() -> bool {
13866            true
13867        }
13868    }
13869
13870    unsafe impl<D: fidl::encoding::ResourceDialect>
13871        fidl::encoding::Encode<StreamSocketGetTcpSynCountResponse, D>
13872        for &StreamSocketGetTcpSynCountResponse
13873    {
13874        #[inline]
13875        unsafe fn encode(
13876            self,
13877            encoder: &mut fidl::encoding::Encoder<'_, D>,
13878            offset: usize,
13879            _depth: fidl::encoding::Depth,
13880        ) -> fidl::Result<()> {
13881            encoder.debug_check_bounds::<StreamSocketGetTcpSynCountResponse>(offset);
13882            unsafe {
13883                // Copy the object into the buffer.
13884                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13885                (buf_ptr as *mut StreamSocketGetTcpSynCountResponse)
13886                    .write_unaligned((self as *const StreamSocketGetTcpSynCountResponse).read());
13887                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13888                // done second because the memcpy will write garbage to these bytes.
13889            }
13890            Ok(())
13891        }
13892    }
13893    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13894        fidl::encoding::Encode<StreamSocketGetTcpSynCountResponse, D> for (T0,)
13895    {
13896        #[inline]
13897        unsafe fn encode(
13898            self,
13899            encoder: &mut fidl::encoding::Encoder<'_, D>,
13900            offset: usize,
13901            depth: fidl::encoding::Depth,
13902        ) -> fidl::Result<()> {
13903            encoder.debug_check_bounds::<StreamSocketGetTcpSynCountResponse>(offset);
13904            // Zero out padding regions. There's no need to apply masks
13905            // because the unmasked parts will be overwritten by fields.
13906            // Write the fields.
13907            self.0.encode(encoder, offset + 0, depth)?;
13908            Ok(())
13909        }
13910    }
13911
13912    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13913        for StreamSocketGetTcpSynCountResponse
13914    {
13915        #[inline(always)]
13916        fn new_empty() -> Self {
13917            Self { value: fidl::new_empty!(u32, D) }
13918        }
13919
13920        #[inline]
13921        unsafe fn decode(
13922            &mut self,
13923            decoder: &mut fidl::encoding::Decoder<'_, D>,
13924            offset: usize,
13925            _depth: fidl::encoding::Depth,
13926        ) -> fidl::Result<()> {
13927            decoder.debug_check_bounds::<Self>(offset);
13928            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13929            // Verify that padding bytes are zero.
13930            // Copy from the buffer into the object.
13931            unsafe {
13932                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13933            }
13934            Ok(())
13935        }
13936    }
13937
13938    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpUserTimeoutResponse {
13939        type Borrowed<'a> = &'a Self;
13940        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13941            value
13942        }
13943    }
13944
13945    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpUserTimeoutResponse {
13946        type Owned = Self;
13947
13948        #[inline(always)]
13949        fn inline_align(_context: fidl::encoding::Context) -> usize {
13950            4
13951        }
13952
13953        #[inline(always)]
13954        fn inline_size(_context: fidl::encoding::Context) -> usize {
13955            4
13956        }
13957        #[inline(always)]
13958        fn encode_is_copy() -> bool {
13959            true
13960        }
13961
13962        #[inline(always)]
13963        fn decode_is_copy() -> bool {
13964            true
13965        }
13966    }
13967
13968    unsafe impl<D: fidl::encoding::ResourceDialect>
13969        fidl::encoding::Encode<StreamSocketGetTcpUserTimeoutResponse, D>
13970        for &StreamSocketGetTcpUserTimeoutResponse
13971    {
13972        #[inline]
13973        unsafe fn encode(
13974            self,
13975            encoder: &mut fidl::encoding::Encoder<'_, D>,
13976            offset: usize,
13977            _depth: fidl::encoding::Depth,
13978        ) -> fidl::Result<()> {
13979            encoder.debug_check_bounds::<StreamSocketGetTcpUserTimeoutResponse>(offset);
13980            unsafe {
13981                // Copy the object into the buffer.
13982                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13983                (buf_ptr as *mut StreamSocketGetTcpUserTimeoutResponse)
13984                    .write_unaligned((self as *const StreamSocketGetTcpUserTimeoutResponse).read());
13985                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13986                // done second because the memcpy will write garbage to these bytes.
13987            }
13988            Ok(())
13989        }
13990    }
13991    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13992        fidl::encoding::Encode<StreamSocketGetTcpUserTimeoutResponse, D> for (T0,)
13993    {
13994        #[inline]
13995        unsafe fn encode(
13996            self,
13997            encoder: &mut fidl::encoding::Encoder<'_, D>,
13998            offset: usize,
13999            depth: fidl::encoding::Depth,
14000        ) -> fidl::Result<()> {
14001            encoder.debug_check_bounds::<StreamSocketGetTcpUserTimeoutResponse>(offset);
14002            // Zero out padding regions. There's no need to apply masks
14003            // because the unmasked parts will be overwritten by fields.
14004            // Write the fields.
14005            self.0.encode(encoder, offset + 0, depth)?;
14006            Ok(())
14007        }
14008    }
14009
14010    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14011        for StreamSocketGetTcpUserTimeoutResponse
14012    {
14013        #[inline(always)]
14014        fn new_empty() -> Self {
14015            Self { value_millis: fidl::new_empty!(u32, D) }
14016        }
14017
14018        #[inline]
14019        unsafe fn decode(
14020            &mut self,
14021            decoder: &mut fidl::encoding::Decoder<'_, D>,
14022            offset: usize,
14023            _depth: fidl::encoding::Depth,
14024        ) -> fidl::Result<()> {
14025            decoder.debug_check_bounds::<Self>(offset);
14026            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14027            // Verify that padding bytes are zero.
14028            // Copy from the buffer into the object.
14029            unsafe {
14030                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14031            }
14032            Ok(())
14033        }
14034    }
14035
14036    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpWindowClampResponse {
14037        type Borrowed<'a> = &'a Self;
14038        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14039            value
14040        }
14041    }
14042
14043    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpWindowClampResponse {
14044        type Owned = Self;
14045
14046        #[inline(always)]
14047        fn inline_align(_context: fidl::encoding::Context) -> usize {
14048            4
14049        }
14050
14051        #[inline(always)]
14052        fn inline_size(_context: fidl::encoding::Context) -> usize {
14053            4
14054        }
14055        #[inline(always)]
14056        fn encode_is_copy() -> bool {
14057            true
14058        }
14059
14060        #[inline(always)]
14061        fn decode_is_copy() -> bool {
14062            true
14063        }
14064    }
14065
14066    unsafe impl<D: fidl::encoding::ResourceDialect>
14067        fidl::encoding::Encode<StreamSocketGetTcpWindowClampResponse, D>
14068        for &StreamSocketGetTcpWindowClampResponse
14069    {
14070        #[inline]
14071        unsafe fn encode(
14072            self,
14073            encoder: &mut fidl::encoding::Encoder<'_, D>,
14074            offset: usize,
14075            _depth: fidl::encoding::Depth,
14076        ) -> fidl::Result<()> {
14077            encoder.debug_check_bounds::<StreamSocketGetTcpWindowClampResponse>(offset);
14078            unsafe {
14079                // Copy the object into the buffer.
14080                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14081                (buf_ptr as *mut StreamSocketGetTcpWindowClampResponse)
14082                    .write_unaligned((self as *const StreamSocketGetTcpWindowClampResponse).read());
14083                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14084                // done second because the memcpy will write garbage to these bytes.
14085            }
14086            Ok(())
14087        }
14088    }
14089    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
14090        fidl::encoding::Encode<StreamSocketGetTcpWindowClampResponse, D> for (T0,)
14091    {
14092        #[inline]
14093        unsafe fn encode(
14094            self,
14095            encoder: &mut fidl::encoding::Encoder<'_, D>,
14096            offset: usize,
14097            depth: fidl::encoding::Depth,
14098        ) -> fidl::Result<()> {
14099            encoder.debug_check_bounds::<StreamSocketGetTcpWindowClampResponse>(offset);
14100            // Zero out padding regions. There's no need to apply masks
14101            // because the unmasked parts will be overwritten by fields.
14102            // Write the fields.
14103            self.0.encode(encoder, offset + 0, depth)?;
14104            Ok(())
14105        }
14106    }
14107
14108    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14109        for StreamSocketGetTcpWindowClampResponse
14110    {
14111        #[inline(always)]
14112        fn new_empty() -> Self {
14113            Self { value: fidl::new_empty!(u32, D) }
14114        }
14115
14116        #[inline]
14117        unsafe fn decode(
14118            &mut self,
14119            decoder: &mut fidl::encoding::Decoder<'_, D>,
14120            offset: usize,
14121            _depth: fidl::encoding::Depth,
14122        ) -> fidl::Result<()> {
14123            decoder.debug_check_bounds::<Self>(offset);
14124            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14125            // Verify that padding bytes are zero.
14126            // Copy from the buffer into the object.
14127            unsafe {
14128                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14129            }
14130            Ok(())
14131        }
14132    }
14133
14134    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketRecvMsgRequest {
14135        type Borrowed<'a> = &'a Self;
14136        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14137            value
14138        }
14139    }
14140
14141    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketRecvMsgRequest {
14142        type Owned = Self;
14143
14144        #[inline(always)]
14145        fn inline_align(_context: fidl::encoding::Context) -> usize {
14146            4
14147        }
14148
14149        #[inline(always)]
14150        fn inline_size(_context: fidl::encoding::Context) -> usize {
14151            12
14152        }
14153    }
14154
14155    unsafe impl<D: fidl::encoding::ResourceDialect>
14156        fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgRequest, D>
14157        for &SynchronousDatagramSocketRecvMsgRequest
14158    {
14159        #[inline]
14160        unsafe fn encode(
14161            self,
14162            encoder: &mut fidl::encoding::Encoder<'_, D>,
14163            offset: usize,
14164            _depth: fidl::encoding::Depth,
14165        ) -> fidl::Result<()> {
14166            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgRequest>(offset);
14167            // Delegate to tuple encoding.
14168            fidl::encoding::Encode::<SynchronousDatagramSocketRecvMsgRequest, D>::encode(
14169                (
14170                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_addr),
14171                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data_len),
14172                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_control),
14173                    <RecvMsgFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
14174                ),
14175                encoder,
14176                offset,
14177                _depth,
14178            )
14179        }
14180    }
14181    unsafe impl<
14182        D: fidl::encoding::ResourceDialect,
14183        T0: fidl::encoding::Encode<bool, D>,
14184        T1: fidl::encoding::Encode<u32, D>,
14185        T2: fidl::encoding::Encode<bool, D>,
14186        T3: fidl::encoding::Encode<RecvMsgFlags, D>,
14187    > fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgRequest, D> for (T0, T1, T2, T3)
14188    {
14189        #[inline]
14190        unsafe fn encode(
14191            self,
14192            encoder: &mut fidl::encoding::Encoder<'_, D>,
14193            offset: usize,
14194            depth: fidl::encoding::Depth,
14195        ) -> fidl::Result<()> {
14196            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgRequest>(offset);
14197            // Zero out padding regions. There's no need to apply masks
14198            // because the unmasked parts will be overwritten by fields.
14199            unsafe {
14200                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
14201                (ptr as *mut u32).write_unaligned(0);
14202            }
14203            unsafe {
14204                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
14205                (ptr as *mut u32).write_unaligned(0);
14206            }
14207            // Write the fields.
14208            self.0.encode(encoder, offset + 0, depth)?;
14209            self.1.encode(encoder, offset + 4, depth)?;
14210            self.2.encode(encoder, offset + 8, depth)?;
14211            self.3.encode(encoder, offset + 10, depth)?;
14212            Ok(())
14213        }
14214    }
14215
14216    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14217        for SynchronousDatagramSocketRecvMsgRequest
14218    {
14219        #[inline(always)]
14220        fn new_empty() -> Self {
14221            Self {
14222                want_addr: fidl::new_empty!(bool, D),
14223                data_len: fidl::new_empty!(u32, D),
14224                want_control: fidl::new_empty!(bool, D),
14225                flags: fidl::new_empty!(RecvMsgFlags, D),
14226            }
14227        }
14228
14229        #[inline]
14230        unsafe fn decode(
14231            &mut self,
14232            decoder: &mut fidl::encoding::Decoder<'_, D>,
14233            offset: usize,
14234            _depth: fidl::encoding::Depth,
14235        ) -> fidl::Result<()> {
14236            decoder.debug_check_bounds::<Self>(offset);
14237            // Verify that padding bytes are zero.
14238            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
14239            let padval = unsafe { (ptr as *const u32).read_unaligned() };
14240            let mask = 0xffffff00u32;
14241            let maskedval = padval & mask;
14242            if maskedval != 0 {
14243                return Err(fidl::Error::NonZeroPadding {
14244                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
14245                });
14246            }
14247            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
14248            let padval = unsafe { (ptr as *const u32).read_unaligned() };
14249            let mask = 0xff00u32;
14250            let maskedval = padval & mask;
14251            if maskedval != 0 {
14252                return Err(fidl::Error::NonZeroPadding {
14253                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
14254                });
14255            }
14256            fidl::decode!(bool, D, &mut self.want_addr, decoder, offset + 0, _depth)?;
14257            fidl::decode!(u32, D, &mut self.data_len, decoder, offset + 4, _depth)?;
14258            fidl::decode!(bool, D, &mut self.want_control, decoder, offset + 8, _depth)?;
14259            fidl::decode!(RecvMsgFlags, D, &mut self.flags, decoder, offset + 10, _depth)?;
14260            Ok(())
14261        }
14262    }
14263
14264    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketSendMsgRequest {
14265        type Borrowed<'a> = &'a Self;
14266        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14267            value
14268        }
14269    }
14270
14271    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketSendMsgRequest {
14272        type Owned = Self;
14273
14274        #[inline(always)]
14275        fn inline_align(_context: fidl::encoding::Context) -> usize {
14276            8
14277        }
14278
14279        #[inline(always)]
14280        fn inline_size(_context: fidl::encoding::Context) -> usize {
14281            56
14282        }
14283    }
14284
14285    unsafe impl<D: fidl::encoding::ResourceDialect>
14286        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgRequest, D>
14287        for &SynchronousDatagramSocketSendMsgRequest
14288    {
14289        #[inline]
14290        unsafe fn encode(
14291            self,
14292            encoder: &mut fidl::encoding::Encoder<'_, D>,
14293            offset: usize,
14294            _depth: fidl::encoding::Depth,
14295        ) -> fidl::Result<()> {
14296            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgRequest>(offset);
14297            // Delegate to tuple encoding.
14298            fidl::encoding::Encode::<SynchronousDatagramSocketSendMsgRequest, D>::encode(
14299                (
14300                    <fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress> as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
14301                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
14302                    <DatagramSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow(&self.control),
14303                    <SendMsgFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
14304                ),
14305                encoder, offset, _depth
14306            )
14307        }
14308    }
14309    unsafe impl<
14310        D: fidl::encoding::ResourceDialect,
14311        T0: fidl::encoding::Encode<
14312                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14313                D,
14314            >,
14315        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
14316        T2: fidl::encoding::Encode<DatagramSocketSendControlData, D>,
14317        T3: fidl::encoding::Encode<SendMsgFlags, D>,
14318    > fidl::encoding::Encode<SynchronousDatagramSocketSendMsgRequest, D> for (T0, T1, T2, T3)
14319    {
14320        #[inline]
14321        unsafe fn encode(
14322            self,
14323            encoder: &mut fidl::encoding::Encoder<'_, D>,
14324            offset: usize,
14325            depth: fidl::encoding::Depth,
14326        ) -> fidl::Result<()> {
14327            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgRequest>(offset);
14328            // Zero out padding regions. There's no need to apply masks
14329            // because the unmasked parts will be overwritten by fields.
14330            unsafe {
14331                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
14332                (ptr as *mut u64).write_unaligned(0);
14333            }
14334            // Write the fields.
14335            self.0.encode(encoder, offset + 0, depth)?;
14336            self.1.encode(encoder, offset + 16, depth)?;
14337            self.2.encode(encoder, offset + 32, depth)?;
14338            self.3.encode(encoder, offset + 48, depth)?;
14339            Ok(())
14340        }
14341    }
14342
14343    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14344        for SynchronousDatagramSocketSendMsgRequest
14345    {
14346        #[inline(always)]
14347        fn new_empty() -> Self {
14348            Self {
14349                addr: fidl::new_empty!(
14350                    fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14351                    D
14352                ),
14353                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
14354                control: fidl::new_empty!(DatagramSocketSendControlData, D),
14355                flags: fidl::new_empty!(SendMsgFlags, D),
14356            }
14357        }
14358
14359        #[inline]
14360        unsafe fn decode(
14361            &mut self,
14362            decoder: &mut fidl::encoding::Decoder<'_, D>,
14363            offset: usize,
14364            _depth: fidl::encoding::Depth,
14365        ) -> fidl::Result<()> {
14366            decoder.debug_check_bounds::<Self>(offset);
14367            // Verify that padding bytes are zero.
14368            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
14369            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14370            let mask = 0xffffffffffff0000u64;
14371            let maskedval = padval & mask;
14372            if maskedval != 0 {
14373                return Err(fidl::Error::NonZeroPadding {
14374                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
14375                });
14376            }
14377            fidl::decode!(
14378                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14379                D,
14380                &mut self.addr,
14381                decoder,
14382                offset + 0,
14383                _depth
14384            )?;
14385            fidl::decode!(
14386                fidl::encoding::UnboundedVector<u8>,
14387                D,
14388                &mut self.data,
14389                decoder,
14390                offset + 16,
14391                _depth
14392            )?;
14393            fidl::decode!(
14394                DatagramSocketSendControlData,
14395                D,
14396                &mut self.control,
14397                decoder,
14398                offset + 32,
14399                _depth
14400            )?;
14401            fidl::decode!(SendMsgFlags, D, &mut self.flags, decoder, offset + 48, _depth)?;
14402            Ok(())
14403        }
14404    }
14405
14406    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketRecvMsgResponse {
14407        type Borrowed<'a> = &'a Self;
14408        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14409            value
14410        }
14411    }
14412
14413    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketRecvMsgResponse {
14414        type Owned = Self;
14415
14416        #[inline(always)]
14417        fn inline_align(_context: fidl::encoding::Context) -> usize {
14418            8
14419        }
14420
14421        #[inline(always)]
14422        fn inline_size(_context: fidl::encoding::Context) -> usize {
14423            56
14424        }
14425    }
14426
14427    unsafe impl<D: fidl::encoding::ResourceDialect>
14428        fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgResponse, D>
14429        for &SynchronousDatagramSocketRecvMsgResponse
14430    {
14431        #[inline]
14432        unsafe fn encode(
14433            self,
14434            encoder: &mut fidl::encoding::Encoder<'_, D>,
14435            offset: usize,
14436            _depth: fidl::encoding::Depth,
14437        ) -> fidl::Result<()> {
14438            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgResponse>(offset);
14439            // Delegate to tuple encoding.
14440            fidl::encoding::Encode::<SynchronousDatagramSocketRecvMsgResponse, D>::encode(
14441                (
14442                    <fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress> as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
14443                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
14444                    <DatagramSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow(&self.control),
14445                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.truncated),
14446                ),
14447                encoder, offset, _depth
14448            )
14449        }
14450    }
14451    unsafe impl<
14452        D: fidl::encoding::ResourceDialect,
14453        T0: fidl::encoding::Encode<
14454                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14455                D,
14456            >,
14457        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
14458        T2: fidl::encoding::Encode<DatagramSocketRecvControlData, D>,
14459        T3: fidl::encoding::Encode<u32, D>,
14460    > fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgResponse, D> for (T0, T1, T2, T3)
14461    {
14462        #[inline]
14463        unsafe fn encode(
14464            self,
14465            encoder: &mut fidl::encoding::Encoder<'_, D>,
14466            offset: usize,
14467            depth: fidl::encoding::Depth,
14468        ) -> fidl::Result<()> {
14469            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgResponse>(offset);
14470            // Zero out padding regions. There's no need to apply masks
14471            // because the unmasked parts will be overwritten by fields.
14472            unsafe {
14473                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
14474                (ptr as *mut u64).write_unaligned(0);
14475            }
14476            // Write the fields.
14477            self.0.encode(encoder, offset + 0, depth)?;
14478            self.1.encode(encoder, offset + 16, depth)?;
14479            self.2.encode(encoder, offset + 32, depth)?;
14480            self.3.encode(encoder, offset + 48, depth)?;
14481            Ok(())
14482        }
14483    }
14484
14485    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14486        for SynchronousDatagramSocketRecvMsgResponse
14487    {
14488        #[inline(always)]
14489        fn new_empty() -> Self {
14490            Self {
14491                addr: fidl::new_empty!(
14492                    fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14493                    D
14494                ),
14495                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
14496                control: fidl::new_empty!(DatagramSocketRecvControlData, D),
14497                truncated: fidl::new_empty!(u32, D),
14498            }
14499        }
14500
14501        #[inline]
14502        unsafe fn decode(
14503            &mut self,
14504            decoder: &mut fidl::encoding::Decoder<'_, D>,
14505            offset: usize,
14506            _depth: fidl::encoding::Depth,
14507        ) -> fidl::Result<()> {
14508            decoder.debug_check_bounds::<Self>(offset);
14509            // Verify that padding bytes are zero.
14510            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
14511            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14512            let mask = 0xffffffff00000000u64;
14513            let maskedval = padval & mask;
14514            if maskedval != 0 {
14515                return Err(fidl::Error::NonZeroPadding {
14516                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
14517                });
14518            }
14519            fidl::decode!(
14520                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14521                D,
14522                &mut self.addr,
14523                decoder,
14524                offset + 0,
14525                _depth
14526            )?;
14527            fidl::decode!(
14528                fidl::encoding::UnboundedVector<u8>,
14529                D,
14530                &mut self.data,
14531                decoder,
14532                offset + 16,
14533                _depth
14534            )?;
14535            fidl::decode!(
14536                DatagramSocketRecvControlData,
14537                D,
14538                &mut self.control,
14539                decoder,
14540                offset + 32,
14541                _depth
14542            )?;
14543            fidl::decode!(u32, D, &mut self.truncated, decoder, offset + 48, _depth)?;
14544            Ok(())
14545        }
14546    }
14547
14548    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketSendMsgResponse {
14549        type Borrowed<'a> = &'a Self;
14550        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14551            value
14552        }
14553    }
14554
14555    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketSendMsgResponse {
14556        type Owned = Self;
14557
14558        #[inline(always)]
14559        fn inline_align(_context: fidl::encoding::Context) -> usize {
14560            8
14561        }
14562
14563        #[inline(always)]
14564        fn inline_size(_context: fidl::encoding::Context) -> usize {
14565            8
14566        }
14567        #[inline(always)]
14568        fn encode_is_copy() -> bool {
14569            true
14570        }
14571
14572        #[inline(always)]
14573        fn decode_is_copy() -> bool {
14574            true
14575        }
14576    }
14577
14578    unsafe impl<D: fidl::encoding::ResourceDialect>
14579        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgResponse, D>
14580        for &SynchronousDatagramSocketSendMsgResponse
14581    {
14582        #[inline]
14583        unsafe fn encode(
14584            self,
14585            encoder: &mut fidl::encoding::Encoder<'_, D>,
14586            offset: usize,
14587            _depth: fidl::encoding::Depth,
14588        ) -> fidl::Result<()> {
14589            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgResponse>(offset);
14590            unsafe {
14591                // Copy the object into the buffer.
14592                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14593                (buf_ptr as *mut SynchronousDatagramSocketSendMsgResponse).write_unaligned(
14594                    (self as *const SynchronousDatagramSocketSendMsgResponse).read(),
14595                );
14596                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14597                // done second because the memcpy will write garbage to these bytes.
14598            }
14599            Ok(())
14600        }
14601    }
14602    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
14603        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgResponse, D> for (T0,)
14604    {
14605        #[inline]
14606        unsafe fn encode(
14607            self,
14608            encoder: &mut fidl::encoding::Encoder<'_, D>,
14609            offset: usize,
14610            depth: fidl::encoding::Depth,
14611        ) -> fidl::Result<()> {
14612            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgResponse>(offset);
14613            // Zero out padding regions. There's no need to apply masks
14614            // because the unmasked parts will be overwritten by fields.
14615            // Write the fields.
14616            self.0.encode(encoder, offset + 0, depth)?;
14617            Ok(())
14618        }
14619    }
14620
14621    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14622        for SynchronousDatagramSocketSendMsgResponse
14623    {
14624        #[inline(always)]
14625        fn new_empty() -> Self {
14626            Self { len: fidl::new_empty!(i64, D) }
14627        }
14628
14629        #[inline]
14630        unsafe fn decode(
14631            &mut self,
14632            decoder: &mut fidl::encoding::Decoder<'_, D>,
14633            offset: usize,
14634            _depth: fidl::encoding::Depth,
14635        ) -> fidl::Result<()> {
14636            decoder.debug_check_bounds::<Self>(offset);
14637            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14638            // Verify that padding bytes are zero.
14639            // Copy from the buffer into the object.
14640            unsafe {
14641                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
14642            }
14643            Ok(())
14644        }
14645    }
14646
14647    impl fidl::encoding::ValueTypeMarker for Timestamp {
14648        type Borrowed<'a> = &'a Self;
14649        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14650            value
14651        }
14652    }
14653
14654    unsafe impl fidl::encoding::TypeMarker for Timestamp {
14655        type Owned = Self;
14656
14657        #[inline(always)]
14658        fn inline_align(_context: fidl::encoding::Context) -> usize {
14659            8
14660        }
14661
14662        #[inline(always)]
14663        fn inline_size(_context: fidl::encoding::Context) -> usize {
14664            16
14665        }
14666    }
14667
14668    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Timestamp, D>
14669        for &Timestamp
14670    {
14671        #[inline]
14672        unsafe fn encode(
14673            self,
14674            encoder: &mut fidl::encoding::Encoder<'_, D>,
14675            offset: usize,
14676            _depth: fidl::encoding::Depth,
14677        ) -> fidl::Result<()> {
14678            encoder.debug_check_bounds::<Timestamp>(offset);
14679            // Delegate to tuple encoding.
14680            fidl::encoding::Encode::<Timestamp, D>::encode(
14681                (
14682                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.nanoseconds),
14683                    <TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.requested),
14684                ),
14685                encoder,
14686                offset,
14687                _depth,
14688            )
14689        }
14690    }
14691    unsafe impl<
14692        D: fidl::encoding::ResourceDialect,
14693        T0: fidl::encoding::Encode<i64, D>,
14694        T1: fidl::encoding::Encode<TimestampOption, D>,
14695    > fidl::encoding::Encode<Timestamp, D> for (T0, T1)
14696    {
14697        #[inline]
14698        unsafe fn encode(
14699            self,
14700            encoder: &mut fidl::encoding::Encoder<'_, D>,
14701            offset: usize,
14702            depth: fidl::encoding::Depth,
14703        ) -> fidl::Result<()> {
14704            encoder.debug_check_bounds::<Timestamp>(offset);
14705            // Zero out padding regions. There's no need to apply masks
14706            // because the unmasked parts will be overwritten by fields.
14707            unsafe {
14708                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
14709                (ptr as *mut u64).write_unaligned(0);
14710            }
14711            // Write the fields.
14712            self.0.encode(encoder, offset + 0, depth)?;
14713            self.1.encode(encoder, offset + 8, depth)?;
14714            Ok(())
14715        }
14716    }
14717
14718    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Timestamp {
14719        #[inline(always)]
14720        fn new_empty() -> Self {
14721            Self {
14722                nanoseconds: fidl::new_empty!(i64, D),
14723                requested: fidl::new_empty!(TimestampOption, D),
14724            }
14725        }
14726
14727        #[inline]
14728        unsafe fn decode(
14729            &mut self,
14730            decoder: &mut fidl::encoding::Decoder<'_, D>,
14731            offset: usize,
14732            _depth: fidl::encoding::Depth,
14733        ) -> fidl::Result<()> {
14734            decoder.debug_check_bounds::<Self>(offset);
14735            // Verify that padding bytes are zero.
14736            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
14737            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14738            let mask = 0xffffffff00000000u64;
14739            let maskedval = padval & mask;
14740            if maskedval != 0 {
14741                return Err(fidl::Error::NonZeroPadding {
14742                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
14743                });
14744            }
14745            fidl::decode!(i64, D, &mut self.nanoseconds, decoder, offset + 0, _depth)?;
14746            fidl::decode!(TimestampOption, D, &mut self.requested, decoder, offset + 8, _depth)?;
14747            Ok(())
14748        }
14749    }
14750
14751    impl DatagramSocketRecvControlData {
14752        #[inline(always)]
14753        fn max_ordinal_present(&self) -> u64 {
14754            if let Some(_) = self.network {
14755                return 1;
14756            }
14757            0
14758        }
14759    }
14760
14761    impl fidl::encoding::ValueTypeMarker for DatagramSocketRecvControlData {
14762        type Borrowed<'a> = &'a Self;
14763        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14764            value
14765        }
14766    }
14767
14768    unsafe impl fidl::encoding::TypeMarker for DatagramSocketRecvControlData {
14769        type Owned = Self;
14770
14771        #[inline(always)]
14772        fn inline_align(_context: fidl::encoding::Context) -> usize {
14773            8
14774        }
14775
14776        #[inline(always)]
14777        fn inline_size(_context: fidl::encoding::Context) -> usize {
14778            16
14779        }
14780    }
14781
14782    unsafe impl<D: fidl::encoding::ResourceDialect>
14783        fidl::encoding::Encode<DatagramSocketRecvControlData, D>
14784        for &DatagramSocketRecvControlData
14785    {
14786        unsafe fn encode(
14787            self,
14788            encoder: &mut fidl::encoding::Encoder<'_, D>,
14789            offset: usize,
14790            mut depth: fidl::encoding::Depth,
14791        ) -> fidl::Result<()> {
14792            encoder.debug_check_bounds::<DatagramSocketRecvControlData>(offset);
14793            // Vector header
14794            let max_ordinal: u64 = self.max_ordinal_present();
14795            encoder.write_num(max_ordinal, offset);
14796            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14797            // Calling encoder.out_of_line_offset(0) is not allowed.
14798            if max_ordinal == 0 {
14799                return Ok(());
14800            }
14801            depth.increment()?;
14802            let envelope_size = 8;
14803            let bytes_len = max_ordinal as usize * envelope_size;
14804            #[allow(unused_variables)]
14805            let offset = encoder.out_of_line_offset(bytes_len);
14806            let mut _prev_end_offset: usize = 0;
14807            if 1 > max_ordinal {
14808                return Ok(());
14809            }
14810
14811            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14812            // are envelope_size bytes.
14813            let cur_offset: usize = (1 - 1) * envelope_size;
14814
14815            // Zero reserved fields.
14816            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14817
14818            // Safety:
14819            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
14820            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
14821            //   envelope_size bytes, there is always sufficient room.
14822            fidl::encoding::encode_in_envelope_optional::<NetworkSocketRecvControlData, D>(
14823                self.network
14824                    .as_ref()
14825                    .map(<NetworkSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
14826                encoder,
14827                offset + cur_offset,
14828                depth,
14829            )?;
14830
14831            _prev_end_offset = cur_offset + envelope_size;
14832
14833            Ok(())
14834        }
14835    }
14836
14837    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14838        for DatagramSocketRecvControlData
14839    {
14840        #[inline(always)]
14841        fn new_empty() -> Self {
14842            Self::default()
14843        }
14844
14845        unsafe fn decode(
14846            &mut self,
14847            decoder: &mut fidl::encoding::Decoder<'_, D>,
14848            offset: usize,
14849            mut depth: fidl::encoding::Depth,
14850        ) -> fidl::Result<()> {
14851            decoder.debug_check_bounds::<Self>(offset);
14852            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14853                None => return Err(fidl::Error::NotNullable),
14854                Some(len) => len,
14855            };
14856            // Calling decoder.out_of_line_offset(0) is not allowed.
14857            if len == 0 {
14858                return Ok(());
14859            };
14860            depth.increment()?;
14861            let envelope_size = 8;
14862            let bytes_len = len * envelope_size;
14863            let offset = decoder.out_of_line_offset(bytes_len)?;
14864            // Decode the envelope for each type.
14865            let mut _next_ordinal_to_read = 0;
14866            let mut next_offset = offset;
14867            let end_offset = offset + bytes_len;
14868            _next_ordinal_to_read += 1;
14869            if next_offset >= end_offset {
14870                return Ok(());
14871            }
14872
14873            // Decode unknown envelopes for gaps in ordinals.
14874            while _next_ordinal_to_read < 1 {
14875                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14876                _next_ordinal_to_read += 1;
14877                next_offset += envelope_size;
14878            }
14879
14880            let next_out_of_line = decoder.next_out_of_line();
14881            let handles_before = decoder.remaining_handles();
14882            if let Some((inlined, num_bytes, num_handles)) =
14883                fidl::encoding::decode_envelope_header(decoder, next_offset)?
14884            {
14885                let member_inline_size =
14886                    <NetworkSocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
14887                        decoder.context,
14888                    );
14889                if inlined != (member_inline_size <= 4) {
14890                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
14891                }
14892                let inner_offset;
14893                let mut inner_depth = depth.clone();
14894                if inlined {
14895                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14896                    inner_offset = next_offset;
14897                } else {
14898                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14899                    inner_depth.increment()?;
14900                }
14901                let val_ref = self
14902                    .network
14903                    .get_or_insert_with(|| fidl::new_empty!(NetworkSocketRecvControlData, D));
14904                fidl::decode!(
14905                    NetworkSocketRecvControlData,
14906                    D,
14907                    val_ref,
14908                    decoder,
14909                    inner_offset,
14910                    inner_depth
14911                )?;
14912                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14913                {
14914                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
14915                }
14916                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14917                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14918                }
14919            }
14920
14921            next_offset += envelope_size;
14922
14923            // Decode the remaining unknown envelopes.
14924            while next_offset < end_offset {
14925                _next_ordinal_to_read += 1;
14926                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14927                next_offset += envelope_size;
14928            }
14929
14930            Ok(())
14931        }
14932    }
14933
14934    impl DatagramSocketSendControlData {
14935        #[inline(always)]
14936        fn max_ordinal_present(&self) -> u64 {
14937            if let Some(_) = self.network {
14938                return 1;
14939            }
14940            0
14941        }
14942    }
14943
14944    impl fidl::encoding::ValueTypeMarker for DatagramSocketSendControlData {
14945        type Borrowed<'a> = &'a Self;
14946        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14947            value
14948        }
14949    }
14950
14951    unsafe impl fidl::encoding::TypeMarker for DatagramSocketSendControlData {
14952        type Owned = Self;
14953
14954        #[inline(always)]
14955        fn inline_align(_context: fidl::encoding::Context) -> usize {
14956            8
14957        }
14958
14959        #[inline(always)]
14960        fn inline_size(_context: fidl::encoding::Context) -> usize {
14961            16
14962        }
14963    }
14964
14965    unsafe impl<D: fidl::encoding::ResourceDialect>
14966        fidl::encoding::Encode<DatagramSocketSendControlData, D>
14967        for &DatagramSocketSendControlData
14968    {
14969        unsafe fn encode(
14970            self,
14971            encoder: &mut fidl::encoding::Encoder<'_, D>,
14972            offset: usize,
14973            mut depth: fidl::encoding::Depth,
14974        ) -> fidl::Result<()> {
14975            encoder.debug_check_bounds::<DatagramSocketSendControlData>(offset);
14976            // Vector header
14977            let max_ordinal: u64 = self.max_ordinal_present();
14978            encoder.write_num(max_ordinal, offset);
14979            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14980            // Calling encoder.out_of_line_offset(0) is not allowed.
14981            if max_ordinal == 0 {
14982                return Ok(());
14983            }
14984            depth.increment()?;
14985            let envelope_size = 8;
14986            let bytes_len = max_ordinal as usize * envelope_size;
14987            #[allow(unused_variables)]
14988            let offset = encoder.out_of_line_offset(bytes_len);
14989            let mut _prev_end_offset: usize = 0;
14990            if 1 > max_ordinal {
14991                return Ok(());
14992            }
14993
14994            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14995            // are envelope_size bytes.
14996            let cur_offset: usize = (1 - 1) * envelope_size;
14997
14998            // Zero reserved fields.
14999            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15000
15001            // Safety:
15002            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15003            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15004            //   envelope_size bytes, there is always sufficient room.
15005            fidl::encoding::encode_in_envelope_optional::<NetworkSocketSendControlData, D>(
15006                self.network
15007                    .as_ref()
15008                    .map(<NetworkSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
15009                encoder,
15010                offset + cur_offset,
15011                depth,
15012            )?;
15013
15014            _prev_end_offset = cur_offset + envelope_size;
15015
15016            Ok(())
15017        }
15018    }
15019
15020    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15021        for DatagramSocketSendControlData
15022    {
15023        #[inline(always)]
15024        fn new_empty() -> Self {
15025            Self::default()
15026        }
15027
15028        unsafe fn decode(
15029            &mut self,
15030            decoder: &mut fidl::encoding::Decoder<'_, D>,
15031            offset: usize,
15032            mut depth: fidl::encoding::Depth,
15033        ) -> fidl::Result<()> {
15034            decoder.debug_check_bounds::<Self>(offset);
15035            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15036                None => return Err(fidl::Error::NotNullable),
15037                Some(len) => len,
15038            };
15039            // Calling decoder.out_of_line_offset(0) is not allowed.
15040            if len == 0 {
15041                return Ok(());
15042            };
15043            depth.increment()?;
15044            let envelope_size = 8;
15045            let bytes_len = len * envelope_size;
15046            let offset = decoder.out_of_line_offset(bytes_len)?;
15047            // Decode the envelope for each type.
15048            let mut _next_ordinal_to_read = 0;
15049            let mut next_offset = offset;
15050            let end_offset = offset + bytes_len;
15051            _next_ordinal_to_read += 1;
15052            if next_offset >= end_offset {
15053                return Ok(());
15054            }
15055
15056            // Decode unknown envelopes for gaps in ordinals.
15057            while _next_ordinal_to_read < 1 {
15058                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15059                _next_ordinal_to_read += 1;
15060                next_offset += envelope_size;
15061            }
15062
15063            let next_out_of_line = decoder.next_out_of_line();
15064            let handles_before = decoder.remaining_handles();
15065            if let Some((inlined, num_bytes, num_handles)) =
15066                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15067            {
15068                let member_inline_size =
15069                    <NetworkSocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
15070                        decoder.context,
15071                    );
15072                if inlined != (member_inline_size <= 4) {
15073                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15074                }
15075                let inner_offset;
15076                let mut inner_depth = depth.clone();
15077                if inlined {
15078                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15079                    inner_offset = next_offset;
15080                } else {
15081                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15082                    inner_depth.increment()?;
15083                }
15084                let val_ref = self
15085                    .network
15086                    .get_or_insert_with(|| fidl::new_empty!(NetworkSocketSendControlData, D));
15087                fidl::decode!(
15088                    NetworkSocketSendControlData,
15089                    D,
15090                    val_ref,
15091                    decoder,
15092                    inner_offset,
15093                    inner_depth
15094                )?;
15095                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15096                {
15097                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15098                }
15099                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15100                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15101                }
15102            }
15103
15104            next_offset += envelope_size;
15105
15106            // Decode the remaining unknown envelopes.
15107            while next_offset < end_offset {
15108                _next_ordinal_to_read += 1;
15109                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15110                next_offset += envelope_size;
15111            }
15112
15113            Ok(())
15114        }
15115    }
15116
15117    impl DatagramSocketSendMsgPreflightRequest {
15118        #[inline(always)]
15119        fn max_ordinal_present(&self) -> u64 {
15120            if let Some(_) = self.ipv6_pktinfo {
15121                return 2;
15122            }
15123            if let Some(_) = self.to {
15124                return 1;
15125            }
15126            0
15127        }
15128    }
15129
15130    impl fidl::encoding::ValueTypeMarker for DatagramSocketSendMsgPreflightRequest {
15131        type Borrowed<'a> = &'a Self;
15132        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15133            value
15134        }
15135    }
15136
15137    unsafe impl fidl::encoding::TypeMarker for DatagramSocketSendMsgPreflightRequest {
15138        type Owned = Self;
15139
15140        #[inline(always)]
15141        fn inline_align(_context: fidl::encoding::Context) -> usize {
15142            8
15143        }
15144
15145        #[inline(always)]
15146        fn inline_size(_context: fidl::encoding::Context) -> usize {
15147            16
15148        }
15149    }
15150
15151    unsafe impl<D: fidl::encoding::ResourceDialect>
15152        fidl::encoding::Encode<DatagramSocketSendMsgPreflightRequest, D>
15153        for &DatagramSocketSendMsgPreflightRequest
15154    {
15155        unsafe fn encode(
15156            self,
15157            encoder: &mut fidl::encoding::Encoder<'_, D>,
15158            offset: usize,
15159            mut depth: fidl::encoding::Depth,
15160        ) -> fidl::Result<()> {
15161            encoder.debug_check_bounds::<DatagramSocketSendMsgPreflightRequest>(offset);
15162            // Vector header
15163            let max_ordinal: u64 = self.max_ordinal_present();
15164            encoder.write_num(max_ordinal, offset);
15165            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15166            // Calling encoder.out_of_line_offset(0) is not allowed.
15167            if max_ordinal == 0 {
15168                return Ok(());
15169            }
15170            depth.increment()?;
15171            let envelope_size = 8;
15172            let bytes_len = max_ordinal as usize * envelope_size;
15173            #[allow(unused_variables)]
15174            let offset = encoder.out_of_line_offset(bytes_len);
15175            let mut _prev_end_offset: usize = 0;
15176            if 1 > max_ordinal {
15177                return Ok(());
15178            }
15179
15180            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15181            // are envelope_size bytes.
15182            let cur_offset: usize = (1 - 1) * envelope_size;
15183
15184            // Zero reserved fields.
15185            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15186
15187            // Safety:
15188            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15189            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15190            //   envelope_size bytes, there is always sufficient room.
15191            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
15192            self.to.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
15193            encoder, offset + cur_offset, depth
15194        )?;
15195
15196            _prev_end_offset = cur_offset + envelope_size;
15197            if 2 > max_ordinal {
15198                return Ok(());
15199            }
15200
15201            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15202            // are envelope_size bytes.
15203            let cur_offset: usize = (2 - 1) * envelope_size;
15204
15205            // Zero reserved fields.
15206            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15207
15208            // Safety:
15209            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15210            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15211            //   envelope_size bytes, there is always sufficient room.
15212            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoSendControlData, D>(
15213                self.ipv6_pktinfo
15214                    .as_ref()
15215                    .map(<Ipv6PktInfoSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
15216                encoder,
15217                offset + cur_offset,
15218                depth,
15219            )?;
15220
15221            _prev_end_offset = cur_offset + envelope_size;
15222
15223            Ok(())
15224        }
15225    }
15226
15227    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15228        for DatagramSocketSendMsgPreflightRequest
15229    {
15230        #[inline(always)]
15231        fn new_empty() -> Self {
15232            Self::default()
15233        }
15234
15235        unsafe fn decode(
15236            &mut self,
15237            decoder: &mut fidl::encoding::Decoder<'_, D>,
15238            offset: usize,
15239            mut depth: fidl::encoding::Depth,
15240        ) -> fidl::Result<()> {
15241            decoder.debug_check_bounds::<Self>(offset);
15242            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15243                None => return Err(fidl::Error::NotNullable),
15244                Some(len) => len,
15245            };
15246            // Calling decoder.out_of_line_offset(0) is not allowed.
15247            if len == 0 {
15248                return Ok(());
15249            };
15250            depth.increment()?;
15251            let envelope_size = 8;
15252            let bytes_len = len * envelope_size;
15253            let offset = decoder.out_of_line_offset(bytes_len)?;
15254            // Decode the envelope for each type.
15255            let mut _next_ordinal_to_read = 0;
15256            let mut next_offset = offset;
15257            let end_offset = offset + bytes_len;
15258            _next_ordinal_to_read += 1;
15259            if next_offset >= end_offset {
15260                return Ok(());
15261            }
15262
15263            // Decode unknown envelopes for gaps in ordinals.
15264            while _next_ordinal_to_read < 1 {
15265                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15266                _next_ordinal_to_read += 1;
15267                next_offset += envelope_size;
15268            }
15269
15270            let next_out_of_line = decoder.next_out_of_line();
15271            let handles_before = decoder.remaining_handles();
15272            if let Some((inlined, num_bytes, num_handles)) =
15273                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15274            {
15275                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15276                if inlined != (member_inline_size <= 4) {
15277                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15278                }
15279                let inner_offset;
15280                let mut inner_depth = depth.clone();
15281                if inlined {
15282                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15283                    inner_offset = next_offset;
15284                } else {
15285                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15286                    inner_depth.increment()?;
15287                }
15288                let val_ref = self.to.get_or_insert_with(|| {
15289                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
15290                });
15291                fidl::decode!(
15292                    fidl_fuchsia_net__common::SocketAddress,
15293                    D,
15294                    val_ref,
15295                    decoder,
15296                    inner_offset,
15297                    inner_depth
15298                )?;
15299                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15300                {
15301                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15302                }
15303                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15304                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15305                }
15306            }
15307
15308            next_offset += envelope_size;
15309            _next_ordinal_to_read += 1;
15310            if next_offset >= end_offset {
15311                return Ok(());
15312            }
15313
15314            // Decode unknown envelopes for gaps in ordinals.
15315            while _next_ordinal_to_read < 2 {
15316                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15317                _next_ordinal_to_read += 1;
15318                next_offset += envelope_size;
15319            }
15320
15321            let next_out_of_line = decoder.next_out_of_line();
15322            let handles_before = decoder.remaining_handles();
15323            if let Some((inlined, num_bytes, num_handles)) =
15324                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15325            {
15326                let member_inline_size =
15327                    <Ipv6PktInfoSendControlData as fidl::encoding::TypeMarker>::inline_size(
15328                        decoder.context,
15329                    );
15330                if inlined != (member_inline_size <= 4) {
15331                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15332                }
15333                let inner_offset;
15334                let mut inner_depth = depth.clone();
15335                if inlined {
15336                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15337                    inner_offset = next_offset;
15338                } else {
15339                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15340                    inner_depth.increment()?;
15341                }
15342                let val_ref = self
15343                    .ipv6_pktinfo
15344                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoSendControlData, D));
15345                fidl::decode!(
15346                    Ipv6PktInfoSendControlData,
15347                    D,
15348                    val_ref,
15349                    decoder,
15350                    inner_offset,
15351                    inner_depth
15352                )?;
15353                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15354                {
15355                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15356                }
15357                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15358                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15359                }
15360            }
15361
15362            next_offset += envelope_size;
15363
15364            // Decode the remaining unknown envelopes.
15365            while next_offset < end_offset {
15366                _next_ordinal_to_read += 1;
15367                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15368                next_offset += envelope_size;
15369            }
15370
15371            Ok(())
15372        }
15373    }
15374
15375    impl InterfaceAddresses {
15376        #[inline(always)]
15377        fn max_ordinal_present(&self) -> u64 {
15378            if let Some(_) = self.interface_flags {
15379                return 5;
15380            }
15381            if let Some(_) = self.addresses {
15382                return 4;
15383            }
15384            if let Some(_) = self.name {
15385                return 2;
15386            }
15387            if let Some(_) = self.id {
15388                return 1;
15389            }
15390            0
15391        }
15392    }
15393
15394    impl fidl::encoding::ValueTypeMarker for InterfaceAddresses {
15395        type Borrowed<'a> = &'a Self;
15396        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15397            value
15398        }
15399    }
15400
15401    unsafe impl fidl::encoding::TypeMarker for InterfaceAddresses {
15402        type Owned = Self;
15403
15404        #[inline(always)]
15405        fn inline_align(_context: fidl::encoding::Context) -> usize {
15406            8
15407        }
15408
15409        #[inline(always)]
15410        fn inline_size(_context: fidl::encoding::Context) -> usize {
15411            16
15412        }
15413    }
15414
15415    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InterfaceAddresses, D>
15416        for &InterfaceAddresses
15417    {
15418        unsafe fn encode(
15419            self,
15420            encoder: &mut fidl::encoding::Encoder<'_, D>,
15421            offset: usize,
15422            mut depth: fidl::encoding::Depth,
15423        ) -> fidl::Result<()> {
15424            encoder.debug_check_bounds::<InterfaceAddresses>(offset);
15425            // Vector header
15426            let max_ordinal: u64 = self.max_ordinal_present();
15427            encoder.write_num(max_ordinal, offset);
15428            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15429            // Calling encoder.out_of_line_offset(0) is not allowed.
15430            if max_ordinal == 0 {
15431                return Ok(());
15432            }
15433            depth.increment()?;
15434            let envelope_size = 8;
15435            let bytes_len = max_ordinal as usize * envelope_size;
15436            #[allow(unused_variables)]
15437            let offset = encoder.out_of_line_offset(bytes_len);
15438            let mut _prev_end_offset: usize = 0;
15439            if 1 > max_ordinal {
15440                return Ok(());
15441            }
15442
15443            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15444            // are envelope_size bytes.
15445            let cur_offset: usize = (1 - 1) * envelope_size;
15446
15447            // Zero reserved fields.
15448            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15449
15450            // Safety:
15451            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15452            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15453            //   envelope_size bytes, there is always sufficient room.
15454            fidl::encoding::encode_in_envelope_optional::<u64, D>(
15455                self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
15456                encoder,
15457                offset + cur_offset,
15458                depth,
15459            )?;
15460
15461            _prev_end_offset = cur_offset + envelope_size;
15462            if 2 > max_ordinal {
15463                return Ok(());
15464            }
15465
15466            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15467            // are envelope_size bytes.
15468            let cur_offset: usize = (2 - 1) * envelope_size;
15469
15470            // Zero reserved fields.
15471            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15472
15473            // Safety:
15474            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15475            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15476            //   envelope_size bytes, there is always sufficient room.
15477            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<15>, D>(
15478                self.name.as_ref().map(
15479                    <fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow,
15480                ),
15481                encoder,
15482                offset + cur_offset,
15483                depth,
15484            )?;
15485
15486            _prev_end_offset = cur_offset + envelope_size;
15487            if 4 > max_ordinal {
15488                return Ok(());
15489            }
15490
15491            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15492            // are envelope_size bytes.
15493            let cur_offset: usize = (4 - 1) * envelope_size;
15494
15495            // Zero reserved fields.
15496            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15497
15498            // Safety:
15499            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15500            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15501            //   envelope_size bytes, there is always sufficient room.
15502            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>, D>(
15503            self.addresses.as_ref().map(<fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet> as fidl::encoding::ValueTypeMarker>::borrow),
15504            encoder, offset + cur_offset, depth
15505        )?;
15506
15507            _prev_end_offset = cur_offset + envelope_size;
15508            if 5 > max_ordinal {
15509                return Ok(());
15510            }
15511
15512            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15513            // are envelope_size bytes.
15514            let cur_offset: usize = (5 - 1) * envelope_size;
15515
15516            // Zero reserved fields.
15517            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15518
15519            // Safety:
15520            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15521            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15522            //   envelope_size bytes, there is always sufficient room.
15523            fidl::encoding::encode_in_envelope_optional::<InterfaceFlags, D>(
15524                self.interface_flags
15525                    .as_ref()
15526                    .map(<InterfaceFlags as fidl::encoding::ValueTypeMarker>::borrow),
15527                encoder,
15528                offset + cur_offset,
15529                depth,
15530            )?;
15531
15532            _prev_end_offset = cur_offset + envelope_size;
15533
15534            Ok(())
15535        }
15536    }
15537
15538    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceAddresses {
15539        #[inline(always)]
15540        fn new_empty() -> Self {
15541            Self::default()
15542        }
15543
15544        unsafe fn decode(
15545            &mut self,
15546            decoder: &mut fidl::encoding::Decoder<'_, D>,
15547            offset: usize,
15548            mut depth: fidl::encoding::Depth,
15549        ) -> fidl::Result<()> {
15550            decoder.debug_check_bounds::<Self>(offset);
15551            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15552                None => return Err(fidl::Error::NotNullable),
15553                Some(len) => len,
15554            };
15555            // Calling decoder.out_of_line_offset(0) is not allowed.
15556            if len == 0 {
15557                return Ok(());
15558            };
15559            depth.increment()?;
15560            let envelope_size = 8;
15561            let bytes_len = len * envelope_size;
15562            let offset = decoder.out_of_line_offset(bytes_len)?;
15563            // Decode the envelope for each type.
15564            let mut _next_ordinal_to_read = 0;
15565            let mut next_offset = offset;
15566            let end_offset = offset + bytes_len;
15567            _next_ordinal_to_read += 1;
15568            if next_offset >= end_offset {
15569                return Ok(());
15570            }
15571
15572            // Decode unknown envelopes for gaps in ordinals.
15573            while _next_ordinal_to_read < 1 {
15574                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15575                _next_ordinal_to_read += 1;
15576                next_offset += envelope_size;
15577            }
15578
15579            let next_out_of_line = decoder.next_out_of_line();
15580            let handles_before = decoder.remaining_handles();
15581            if let Some((inlined, num_bytes, num_handles)) =
15582                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15583            {
15584                let member_inline_size =
15585                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15586                if inlined != (member_inline_size <= 4) {
15587                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15588                }
15589                let inner_offset;
15590                let mut inner_depth = depth.clone();
15591                if inlined {
15592                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15593                    inner_offset = next_offset;
15594                } else {
15595                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15596                    inner_depth.increment()?;
15597                }
15598                let val_ref = self.id.get_or_insert_with(|| fidl::new_empty!(u64, D));
15599                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
15600                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15601                {
15602                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15603                }
15604                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15605                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15606                }
15607            }
15608
15609            next_offset += envelope_size;
15610            _next_ordinal_to_read += 1;
15611            if next_offset >= end_offset {
15612                return Ok(());
15613            }
15614
15615            // Decode unknown envelopes for gaps in ordinals.
15616            while _next_ordinal_to_read < 2 {
15617                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15618                _next_ordinal_to_read += 1;
15619                next_offset += envelope_size;
15620            }
15621
15622            let next_out_of_line = decoder.next_out_of_line();
15623            let handles_before = decoder.remaining_handles();
15624            if let Some((inlined, num_bytes, num_handles)) =
15625                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15626            {
15627                let member_inline_size =
15628                    <fidl::encoding::BoundedString<15> as fidl::encoding::TypeMarker>::inline_size(
15629                        decoder.context,
15630                    );
15631                if inlined != (member_inline_size <= 4) {
15632                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15633                }
15634                let inner_offset;
15635                let mut inner_depth = depth.clone();
15636                if inlined {
15637                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15638                    inner_offset = next_offset;
15639                } else {
15640                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15641                    inner_depth.increment()?;
15642                }
15643                let val_ref = self
15644                    .name
15645                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<15>, D));
15646                fidl::decode!(
15647                    fidl::encoding::BoundedString<15>,
15648                    D,
15649                    val_ref,
15650                    decoder,
15651                    inner_offset,
15652                    inner_depth
15653                )?;
15654                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15655                {
15656                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15657                }
15658                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15659                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15660                }
15661            }
15662
15663            next_offset += envelope_size;
15664            _next_ordinal_to_read += 1;
15665            if next_offset >= end_offset {
15666                return Ok(());
15667            }
15668
15669            // Decode unknown envelopes for gaps in ordinals.
15670            while _next_ordinal_to_read < 4 {
15671                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15672                _next_ordinal_to_read += 1;
15673                next_offset += envelope_size;
15674            }
15675
15676            let next_out_of_line = decoder.next_out_of_line();
15677            let handles_before = decoder.remaining_handles();
15678            if let Some((inlined, num_bytes, num_handles)) =
15679                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15680            {
15681                let member_inline_size = <fidl::encoding::UnboundedVector<
15682                    fidl_fuchsia_net__common::Subnet,
15683                > as fidl::encoding::TypeMarker>::inline_size(
15684                    decoder.context
15685                );
15686                if inlined != (member_inline_size <= 4) {
15687                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15688                }
15689                let inner_offset;
15690                let mut inner_depth = depth.clone();
15691                if inlined {
15692                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15693                    inner_offset = next_offset;
15694                } else {
15695                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15696                    inner_depth.increment()?;
15697                }
15698                let val_ref = self.addresses.get_or_insert_with(|| {
15699                    fidl::new_empty!(
15700                        fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>,
15701                        D
15702                    )
15703                });
15704                fidl::decode!(
15705                    fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>,
15706                    D,
15707                    val_ref,
15708                    decoder,
15709                    inner_offset,
15710                    inner_depth
15711                )?;
15712                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15713                {
15714                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15715                }
15716                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15717                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15718                }
15719            }
15720
15721            next_offset += envelope_size;
15722            _next_ordinal_to_read += 1;
15723            if next_offset >= end_offset {
15724                return Ok(());
15725            }
15726
15727            // Decode unknown envelopes for gaps in ordinals.
15728            while _next_ordinal_to_read < 5 {
15729                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15730                _next_ordinal_to_read += 1;
15731                next_offset += envelope_size;
15732            }
15733
15734            let next_out_of_line = decoder.next_out_of_line();
15735            let handles_before = decoder.remaining_handles();
15736            if let Some((inlined, num_bytes, num_handles)) =
15737                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15738            {
15739                let member_inline_size =
15740                    <InterfaceFlags as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15741                if inlined != (member_inline_size <= 4) {
15742                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15743                }
15744                let inner_offset;
15745                let mut inner_depth = depth.clone();
15746                if inlined {
15747                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15748                    inner_offset = next_offset;
15749                } else {
15750                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15751                    inner_depth.increment()?;
15752                }
15753                let val_ref =
15754                    self.interface_flags.get_or_insert_with(|| fidl::new_empty!(InterfaceFlags, D));
15755                fidl::decode!(InterfaceFlags, D, val_ref, decoder, inner_offset, inner_depth)?;
15756                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15757                {
15758                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15759                }
15760                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15761                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15762                }
15763            }
15764
15765            next_offset += envelope_size;
15766
15767            // Decode the remaining unknown envelopes.
15768            while next_offset < end_offset {
15769                _next_ordinal_to_read += 1;
15770                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15771                next_offset += envelope_size;
15772            }
15773
15774            Ok(())
15775        }
15776    }
15777
15778    impl IpRecvControlData {
15779        #[inline(always)]
15780        fn max_ordinal_present(&self) -> u64 {
15781            if let Some(_) = self.original_destination_address {
15782                return 3;
15783            }
15784            if let Some(_) = self.ttl {
15785                return 2;
15786            }
15787            if let Some(_) = self.tos {
15788                return 1;
15789            }
15790            0
15791        }
15792    }
15793
15794    impl fidl::encoding::ValueTypeMarker for IpRecvControlData {
15795        type Borrowed<'a> = &'a Self;
15796        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15797            value
15798        }
15799    }
15800
15801    unsafe impl fidl::encoding::TypeMarker for IpRecvControlData {
15802        type Owned = Self;
15803
15804        #[inline(always)]
15805        fn inline_align(_context: fidl::encoding::Context) -> usize {
15806            8
15807        }
15808
15809        #[inline(always)]
15810        fn inline_size(_context: fidl::encoding::Context) -> usize {
15811            16
15812        }
15813    }
15814
15815    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpRecvControlData, D>
15816        for &IpRecvControlData
15817    {
15818        unsafe fn encode(
15819            self,
15820            encoder: &mut fidl::encoding::Encoder<'_, D>,
15821            offset: usize,
15822            mut depth: fidl::encoding::Depth,
15823        ) -> fidl::Result<()> {
15824            encoder.debug_check_bounds::<IpRecvControlData>(offset);
15825            // Vector header
15826            let max_ordinal: u64 = self.max_ordinal_present();
15827            encoder.write_num(max_ordinal, offset);
15828            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15829            // Calling encoder.out_of_line_offset(0) is not allowed.
15830            if max_ordinal == 0 {
15831                return Ok(());
15832            }
15833            depth.increment()?;
15834            let envelope_size = 8;
15835            let bytes_len = max_ordinal as usize * envelope_size;
15836            #[allow(unused_variables)]
15837            let offset = encoder.out_of_line_offset(bytes_len);
15838            let mut _prev_end_offset: usize = 0;
15839            if 1 > max_ordinal {
15840                return Ok(());
15841            }
15842
15843            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15844            // are envelope_size bytes.
15845            let cur_offset: usize = (1 - 1) * envelope_size;
15846
15847            // Zero reserved fields.
15848            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15849
15850            // Safety:
15851            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15852            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15853            //   envelope_size bytes, there is always sufficient room.
15854            fidl::encoding::encode_in_envelope_optional::<u8, D>(
15855                self.tos.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
15856                encoder,
15857                offset + cur_offset,
15858                depth,
15859            )?;
15860
15861            _prev_end_offset = cur_offset + envelope_size;
15862            if 2 > max_ordinal {
15863                return Ok(());
15864            }
15865
15866            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15867            // are envelope_size bytes.
15868            let cur_offset: usize = (2 - 1) * envelope_size;
15869
15870            // Zero reserved fields.
15871            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15872
15873            // Safety:
15874            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15875            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15876            //   envelope_size bytes, there is always sufficient room.
15877            fidl::encoding::encode_in_envelope_optional::<u8, D>(
15878                self.ttl.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
15879                encoder,
15880                offset + cur_offset,
15881                depth,
15882            )?;
15883
15884            _prev_end_offset = cur_offset + envelope_size;
15885            if 3 > max_ordinal {
15886                return Ok(());
15887            }
15888
15889            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15890            // are envelope_size bytes.
15891            let cur_offset: usize = (3 - 1) * envelope_size;
15892
15893            // Zero reserved fields.
15894            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15895
15896            // Safety:
15897            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15898            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15899            //   envelope_size bytes, there is always sufficient room.
15900            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
15901            self.original_destination_address.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
15902            encoder, offset + cur_offset, depth
15903        )?;
15904
15905            _prev_end_offset = cur_offset + envelope_size;
15906
15907            Ok(())
15908        }
15909    }
15910
15911    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpRecvControlData {
15912        #[inline(always)]
15913        fn new_empty() -> Self {
15914            Self::default()
15915        }
15916
15917        unsafe fn decode(
15918            &mut self,
15919            decoder: &mut fidl::encoding::Decoder<'_, D>,
15920            offset: usize,
15921            mut depth: fidl::encoding::Depth,
15922        ) -> fidl::Result<()> {
15923            decoder.debug_check_bounds::<Self>(offset);
15924            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15925                None => return Err(fidl::Error::NotNullable),
15926                Some(len) => len,
15927            };
15928            // Calling decoder.out_of_line_offset(0) is not allowed.
15929            if len == 0 {
15930                return Ok(());
15931            };
15932            depth.increment()?;
15933            let envelope_size = 8;
15934            let bytes_len = len * envelope_size;
15935            let offset = decoder.out_of_line_offset(bytes_len)?;
15936            // Decode the envelope for each type.
15937            let mut _next_ordinal_to_read = 0;
15938            let mut next_offset = offset;
15939            let end_offset = offset + bytes_len;
15940            _next_ordinal_to_read += 1;
15941            if next_offset >= end_offset {
15942                return Ok(());
15943            }
15944
15945            // Decode unknown envelopes for gaps in ordinals.
15946            while _next_ordinal_to_read < 1 {
15947                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15948                _next_ordinal_to_read += 1;
15949                next_offset += envelope_size;
15950            }
15951
15952            let next_out_of_line = decoder.next_out_of_line();
15953            let handles_before = decoder.remaining_handles();
15954            if let Some((inlined, num_bytes, num_handles)) =
15955                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15956            {
15957                let member_inline_size =
15958                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15959                if inlined != (member_inline_size <= 4) {
15960                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15961                }
15962                let inner_offset;
15963                let mut inner_depth = depth.clone();
15964                if inlined {
15965                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15966                    inner_offset = next_offset;
15967                } else {
15968                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15969                    inner_depth.increment()?;
15970                }
15971                let val_ref = self.tos.get_or_insert_with(|| fidl::new_empty!(u8, D));
15972                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
15973                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15974                {
15975                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15976                }
15977                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15978                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15979                }
15980            }
15981
15982            next_offset += envelope_size;
15983            _next_ordinal_to_read += 1;
15984            if next_offset >= end_offset {
15985                return Ok(());
15986            }
15987
15988            // Decode unknown envelopes for gaps in ordinals.
15989            while _next_ordinal_to_read < 2 {
15990                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15991                _next_ordinal_to_read += 1;
15992                next_offset += envelope_size;
15993            }
15994
15995            let next_out_of_line = decoder.next_out_of_line();
15996            let handles_before = decoder.remaining_handles();
15997            if let Some((inlined, num_bytes, num_handles)) =
15998                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15999            {
16000                let member_inline_size =
16001                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16002                if inlined != (member_inline_size <= 4) {
16003                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16004                }
16005                let inner_offset;
16006                let mut inner_depth = depth.clone();
16007                if inlined {
16008                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16009                    inner_offset = next_offset;
16010                } else {
16011                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16012                    inner_depth.increment()?;
16013                }
16014                let val_ref = self.ttl.get_or_insert_with(|| fidl::new_empty!(u8, D));
16015                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16016                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16017                {
16018                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16019                }
16020                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16021                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16022                }
16023            }
16024
16025            next_offset += envelope_size;
16026            _next_ordinal_to_read += 1;
16027            if next_offset >= end_offset {
16028                return Ok(());
16029            }
16030
16031            // Decode unknown envelopes for gaps in ordinals.
16032            while _next_ordinal_to_read < 3 {
16033                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16034                _next_ordinal_to_read += 1;
16035                next_offset += envelope_size;
16036            }
16037
16038            let next_out_of_line = decoder.next_out_of_line();
16039            let handles_before = decoder.remaining_handles();
16040            if let Some((inlined, num_bytes, num_handles)) =
16041                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16042            {
16043                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16044                if inlined != (member_inline_size <= 4) {
16045                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16046                }
16047                let inner_offset;
16048                let mut inner_depth = depth.clone();
16049                if inlined {
16050                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16051                    inner_offset = next_offset;
16052                } else {
16053                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16054                    inner_depth.increment()?;
16055                }
16056                let val_ref = self.original_destination_address.get_or_insert_with(|| {
16057                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
16058                });
16059                fidl::decode!(
16060                    fidl_fuchsia_net__common::SocketAddress,
16061                    D,
16062                    val_ref,
16063                    decoder,
16064                    inner_offset,
16065                    inner_depth
16066                )?;
16067                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16068                {
16069                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16070                }
16071                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16072                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16073                }
16074            }
16075
16076            next_offset += envelope_size;
16077
16078            // Decode the remaining unknown envelopes.
16079            while next_offset < end_offset {
16080                _next_ordinal_to_read += 1;
16081                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16082                next_offset += envelope_size;
16083            }
16084
16085            Ok(())
16086        }
16087    }
16088
16089    impl IpSendControlData {
16090        #[inline(always)]
16091        fn max_ordinal_present(&self) -> u64 {
16092            if let Some(_) = self.ttl {
16093                return 2;
16094            }
16095            0
16096        }
16097    }
16098
16099    impl fidl::encoding::ValueTypeMarker for IpSendControlData {
16100        type Borrowed<'a> = &'a Self;
16101        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16102            value
16103        }
16104    }
16105
16106    unsafe impl fidl::encoding::TypeMarker for IpSendControlData {
16107        type Owned = Self;
16108
16109        #[inline(always)]
16110        fn inline_align(_context: fidl::encoding::Context) -> usize {
16111            8
16112        }
16113
16114        #[inline(always)]
16115        fn inline_size(_context: fidl::encoding::Context) -> usize {
16116            16
16117        }
16118    }
16119
16120    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpSendControlData, D>
16121        for &IpSendControlData
16122    {
16123        unsafe fn encode(
16124            self,
16125            encoder: &mut fidl::encoding::Encoder<'_, D>,
16126            offset: usize,
16127            mut depth: fidl::encoding::Depth,
16128        ) -> fidl::Result<()> {
16129            encoder.debug_check_bounds::<IpSendControlData>(offset);
16130            // Vector header
16131            let max_ordinal: u64 = self.max_ordinal_present();
16132            encoder.write_num(max_ordinal, offset);
16133            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16134            // Calling encoder.out_of_line_offset(0) is not allowed.
16135            if max_ordinal == 0 {
16136                return Ok(());
16137            }
16138            depth.increment()?;
16139            let envelope_size = 8;
16140            let bytes_len = max_ordinal as usize * envelope_size;
16141            #[allow(unused_variables)]
16142            let offset = encoder.out_of_line_offset(bytes_len);
16143            let mut _prev_end_offset: usize = 0;
16144            if 2 > max_ordinal {
16145                return Ok(());
16146            }
16147
16148            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16149            // are envelope_size bytes.
16150            let cur_offset: usize = (2 - 1) * envelope_size;
16151
16152            // Zero reserved fields.
16153            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16154
16155            // Safety:
16156            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16157            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16158            //   envelope_size bytes, there is always sufficient room.
16159            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16160                self.ttl.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16161                encoder,
16162                offset + cur_offset,
16163                depth,
16164            )?;
16165
16166            _prev_end_offset = cur_offset + envelope_size;
16167
16168            Ok(())
16169        }
16170    }
16171
16172    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpSendControlData {
16173        #[inline(always)]
16174        fn new_empty() -> Self {
16175            Self::default()
16176        }
16177
16178        unsafe fn decode(
16179            &mut self,
16180            decoder: &mut fidl::encoding::Decoder<'_, D>,
16181            offset: usize,
16182            mut depth: fidl::encoding::Depth,
16183        ) -> fidl::Result<()> {
16184            decoder.debug_check_bounds::<Self>(offset);
16185            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16186                None => return Err(fidl::Error::NotNullable),
16187                Some(len) => len,
16188            };
16189            // Calling decoder.out_of_line_offset(0) is not allowed.
16190            if len == 0 {
16191                return Ok(());
16192            };
16193            depth.increment()?;
16194            let envelope_size = 8;
16195            let bytes_len = len * envelope_size;
16196            let offset = decoder.out_of_line_offset(bytes_len)?;
16197            // Decode the envelope for each type.
16198            let mut _next_ordinal_to_read = 0;
16199            let mut next_offset = offset;
16200            let end_offset = offset + bytes_len;
16201            _next_ordinal_to_read += 1;
16202            if next_offset >= end_offset {
16203                return Ok(());
16204            }
16205
16206            // Decode unknown envelopes for gaps in ordinals.
16207            while _next_ordinal_to_read < 2 {
16208                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16209                _next_ordinal_to_read += 1;
16210                next_offset += envelope_size;
16211            }
16212
16213            let next_out_of_line = decoder.next_out_of_line();
16214            let handles_before = decoder.remaining_handles();
16215            if let Some((inlined, num_bytes, num_handles)) =
16216                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16217            {
16218                let member_inline_size =
16219                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16220                if inlined != (member_inline_size <= 4) {
16221                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16222                }
16223                let inner_offset;
16224                let mut inner_depth = depth.clone();
16225                if inlined {
16226                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16227                    inner_offset = next_offset;
16228                } else {
16229                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16230                    inner_depth.increment()?;
16231                }
16232                let val_ref = self.ttl.get_or_insert_with(|| fidl::new_empty!(u8, D));
16233                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16234                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16235                {
16236                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16237                }
16238                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16239                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16240                }
16241            }
16242
16243            next_offset += envelope_size;
16244
16245            // Decode the remaining unknown envelopes.
16246            while next_offset < end_offset {
16247                _next_ordinal_to_read += 1;
16248                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16249                next_offset += envelope_size;
16250            }
16251
16252            Ok(())
16253        }
16254    }
16255
16256    impl Ipv6RecvControlData {
16257        #[inline(always)]
16258        fn max_ordinal_present(&self) -> u64 {
16259            if let Some(_) = self.pktinfo {
16260                return 3;
16261            }
16262            if let Some(_) = self.hoplimit {
16263                return 2;
16264            }
16265            if let Some(_) = self.tclass {
16266                return 1;
16267            }
16268            0
16269        }
16270    }
16271
16272    impl fidl::encoding::ValueTypeMarker for Ipv6RecvControlData {
16273        type Borrowed<'a> = &'a Self;
16274        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16275            value
16276        }
16277    }
16278
16279    unsafe impl fidl::encoding::TypeMarker for Ipv6RecvControlData {
16280        type Owned = Self;
16281
16282        #[inline(always)]
16283        fn inline_align(_context: fidl::encoding::Context) -> usize {
16284            8
16285        }
16286
16287        #[inline(always)]
16288        fn inline_size(_context: fidl::encoding::Context) -> usize {
16289            16
16290        }
16291    }
16292
16293    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ipv6RecvControlData, D>
16294        for &Ipv6RecvControlData
16295    {
16296        unsafe fn encode(
16297            self,
16298            encoder: &mut fidl::encoding::Encoder<'_, D>,
16299            offset: usize,
16300            mut depth: fidl::encoding::Depth,
16301        ) -> fidl::Result<()> {
16302            encoder.debug_check_bounds::<Ipv6RecvControlData>(offset);
16303            // Vector header
16304            let max_ordinal: u64 = self.max_ordinal_present();
16305            encoder.write_num(max_ordinal, offset);
16306            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16307            // Calling encoder.out_of_line_offset(0) is not allowed.
16308            if max_ordinal == 0 {
16309                return Ok(());
16310            }
16311            depth.increment()?;
16312            let envelope_size = 8;
16313            let bytes_len = max_ordinal as usize * envelope_size;
16314            #[allow(unused_variables)]
16315            let offset = encoder.out_of_line_offset(bytes_len);
16316            let mut _prev_end_offset: usize = 0;
16317            if 1 > max_ordinal {
16318                return Ok(());
16319            }
16320
16321            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16322            // are envelope_size bytes.
16323            let cur_offset: usize = (1 - 1) * envelope_size;
16324
16325            // Zero reserved fields.
16326            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16327
16328            // Safety:
16329            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16330            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16331            //   envelope_size bytes, there is always sufficient room.
16332            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16333                self.tclass.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16334                encoder,
16335                offset + cur_offset,
16336                depth,
16337            )?;
16338
16339            _prev_end_offset = cur_offset + envelope_size;
16340            if 2 > max_ordinal {
16341                return Ok(());
16342            }
16343
16344            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16345            // are envelope_size bytes.
16346            let cur_offset: usize = (2 - 1) * envelope_size;
16347
16348            // Zero reserved fields.
16349            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16350
16351            // Safety:
16352            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16353            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16354            //   envelope_size bytes, there is always sufficient room.
16355            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16356                self.hoplimit.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16357                encoder,
16358                offset + cur_offset,
16359                depth,
16360            )?;
16361
16362            _prev_end_offset = cur_offset + envelope_size;
16363            if 3 > max_ordinal {
16364                return Ok(());
16365            }
16366
16367            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16368            // are envelope_size bytes.
16369            let cur_offset: usize = (3 - 1) * envelope_size;
16370
16371            // Zero reserved fields.
16372            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16373
16374            // Safety:
16375            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16376            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16377            //   envelope_size bytes, there is always sufficient room.
16378            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoRecvControlData, D>(
16379                self.pktinfo
16380                    .as_ref()
16381                    .map(<Ipv6PktInfoRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16382                encoder,
16383                offset + cur_offset,
16384                depth,
16385            )?;
16386
16387            _prev_end_offset = cur_offset + envelope_size;
16388
16389            Ok(())
16390        }
16391    }
16392
16393    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ipv6RecvControlData {
16394        #[inline(always)]
16395        fn new_empty() -> Self {
16396            Self::default()
16397        }
16398
16399        unsafe fn decode(
16400            &mut self,
16401            decoder: &mut fidl::encoding::Decoder<'_, D>,
16402            offset: usize,
16403            mut depth: fidl::encoding::Depth,
16404        ) -> fidl::Result<()> {
16405            decoder.debug_check_bounds::<Self>(offset);
16406            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16407                None => return Err(fidl::Error::NotNullable),
16408                Some(len) => len,
16409            };
16410            // Calling decoder.out_of_line_offset(0) is not allowed.
16411            if len == 0 {
16412                return Ok(());
16413            };
16414            depth.increment()?;
16415            let envelope_size = 8;
16416            let bytes_len = len * envelope_size;
16417            let offset = decoder.out_of_line_offset(bytes_len)?;
16418            // Decode the envelope for each type.
16419            let mut _next_ordinal_to_read = 0;
16420            let mut next_offset = offset;
16421            let end_offset = offset + bytes_len;
16422            _next_ordinal_to_read += 1;
16423            if next_offset >= end_offset {
16424                return Ok(());
16425            }
16426
16427            // Decode unknown envelopes for gaps in ordinals.
16428            while _next_ordinal_to_read < 1 {
16429                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16430                _next_ordinal_to_read += 1;
16431                next_offset += envelope_size;
16432            }
16433
16434            let next_out_of_line = decoder.next_out_of_line();
16435            let handles_before = decoder.remaining_handles();
16436            if let Some((inlined, num_bytes, num_handles)) =
16437                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16438            {
16439                let member_inline_size =
16440                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16441                if inlined != (member_inline_size <= 4) {
16442                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16443                }
16444                let inner_offset;
16445                let mut inner_depth = depth.clone();
16446                if inlined {
16447                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16448                    inner_offset = next_offset;
16449                } else {
16450                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16451                    inner_depth.increment()?;
16452                }
16453                let val_ref = self.tclass.get_or_insert_with(|| fidl::new_empty!(u8, D));
16454                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16455                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16456                {
16457                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16458                }
16459                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16460                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16461                }
16462            }
16463
16464            next_offset += envelope_size;
16465            _next_ordinal_to_read += 1;
16466            if next_offset >= end_offset {
16467                return Ok(());
16468            }
16469
16470            // Decode unknown envelopes for gaps in ordinals.
16471            while _next_ordinal_to_read < 2 {
16472                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16473                _next_ordinal_to_read += 1;
16474                next_offset += envelope_size;
16475            }
16476
16477            let next_out_of_line = decoder.next_out_of_line();
16478            let handles_before = decoder.remaining_handles();
16479            if let Some((inlined, num_bytes, num_handles)) =
16480                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16481            {
16482                let member_inline_size =
16483                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16484                if inlined != (member_inline_size <= 4) {
16485                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16486                }
16487                let inner_offset;
16488                let mut inner_depth = depth.clone();
16489                if inlined {
16490                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16491                    inner_offset = next_offset;
16492                } else {
16493                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16494                    inner_depth.increment()?;
16495                }
16496                let val_ref = self.hoplimit.get_or_insert_with(|| fidl::new_empty!(u8, D));
16497                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16498                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16499                {
16500                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16501                }
16502                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16503                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16504                }
16505            }
16506
16507            next_offset += envelope_size;
16508            _next_ordinal_to_read += 1;
16509            if next_offset >= end_offset {
16510                return Ok(());
16511            }
16512
16513            // Decode unknown envelopes for gaps in ordinals.
16514            while _next_ordinal_to_read < 3 {
16515                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16516                _next_ordinal_to_read += 1;
16517                next_offset += envelope_size;
16518            }
16519
16520            let next_out_of_line = decoder.next_out_of_line();
16521            let handles_before = decoder.remaining_handles();
16522            if let Some((inlined, num_bytes, num_handles)) =
16523                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16524            {
16525                let member_inline_size =
16526                    <Ipv6PktInfoRecvControlData as fidl::encoding::TypeMarker>::inline_size(
16527                        decoder.context,
16528                    );
16529                if inlined != (member_inline_size <= 4) {
16530                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16531                }
16532                let inner_offset;
16533                let mut inner_depth = depth.clone();
16534                if inlined {
16535                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16536                    inner_offset = next_offset;
16537                } else {
16538                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16539                    inner_depth.increment()?;
16540                }
16541                let val_ref = self
16542                    .pktinfo
16543                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoRecvControlData, D));
16544                fidl::decode!(
16545                    Ipv6PktInfoRecvControlData,
16546                    D,
16547                    val_ref,
16548                    decoder,
16549                    inner_offset,
16550                    inner_depth
16551                )?;
16552                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16553                {
16554                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16555                }
16556                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16557                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16558                }
16559            }
16560
16561            next_offset += envelope_size;
16562
16563            // Decode the remaining unknown envelopes.
16564            while next_offset < end_offset {
16565                _next_ordinal_to_read += 1;
16566                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16567                next_offset += envelope_size;
16568            }
16569
16570            Ok(())
16571        }
16572    }
16573
16574    impl Ipv6SendControlData {
16575        #[inline(always)]
16576        fn max_ordinal_present(&self) -> u64 {
16577            if let Some(_) = self.pktinfo {
16578                return 3;
16579            }
16580            if let Some(_) = self.hoplimit {
16581                return 2;
16582            }
16583            0
16584        }
16585    }
16586
16587    impl fidl::encoding::ValueTypeMarker for Ipv6SendControlData {
16588        type Borrowed<'a> = &'a Self;
16589        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16590            value
16591        }
16592    }
16593
16594    unsafe impl fidl::encoding::TypeMarker for Ipv6SendControlData {
16595        type Owned = Self;
16596
16597        #[inline(always)]
16598        fn inline_align(_context: fidl::encoding::Context) -> usize {
16599            8
16600        }
16601
16602        #[inline(always)]
16603        fn inline_size(_context: fidl::encoding::Context) -> usize {
16604            16
16605        }
16606    }
16607
16608    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ipv6SendControlData, D>
16609        for &Ipv6SendControlData
16610    {
16611        unsafe fn encode(
16612            self,
16613            encoder: &mut fidl::encoding::Encoder<'_, D>,
16614            offset: usize,
16615            mut depth: fidl::encoding::Depth,
16616        ) -> fidl::Result<()> {
16617            encoder.debug_check_bounds::<Ipv6SendControlData>(offset);
16618            // Vector header
16619            let max_ordinal: u64 = self.max_ordinal_present();
16620            encoder.write_num(max_ordinal, offset);
16621            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16622            // Calling encoder.out_of_line_offset(0) is not allowed.
16623            if max_ordinal == 0 {
16624                return Ok(());
16625            }
16626            depth.increment()?;
16627            let envelope_size = 8;
16628            let bytes_len = max_ordinal as usize * envelope_size;
16629            #[allow(unused_variables)]
16630            let offset = encoder.out_of_line_offset(bytes_len);
16631            let mut _prev_end_offset: usize = 0;
16632            if 2 > max_ordinal {
16633                return Ok(());
16634            }
16635
16636            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16637            // are envelope_size bytes.
16638            let cur_offset: usize = (2 - 1) * envelope_size;
16639
16640            // Zero reserved fields.
16641            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16642
16643            // Safety:
16644            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16645            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16646            //   envelope_size bytes, there is always sufficient room.
16647            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16648                self.hoplimit.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16649                encoder,
16650                offset + cur_offset,
16651                depth,
16652            )?;
16653
16654            _prev_end_offset = cur_offset + envelope_size;
16655            if 3 > max_ordinal {
16656                return Ok(());
16657            }
16658
16659            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16660            // are envelope_size bytes.
16661            let cur_offset: usize = (3 - 1) * envelope_size;
16662
16663            // Zero reserved fields.
16664            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16665
16666            // Safety:
16667            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16668            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16669            //   envelope_size bytes, there is always sufficient room.
16670            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoSendControlData, D>(
16671                self.pktinfo
16672                    .as_ref()
16673                    .map(<Ipv6PktInfoSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
16674                encoder,
16675                offset + cur_offset,
16676                depth,
16677            )?;
16678
16679            _prev_end_offset = cur_offset + envelope_size;
16680
16681            Ok(())
16682        }
16683    }
16684
16685    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ipv6SendControlData {
16686        #[inline(always)]
16687        fn new_empty() -> Self {
16688            Self::default()
16689        }
16690
16691        unsafe fn decode(
16692            &mut self,
16693            decoder: &mut fidl::encoding::Decoder<'_, D>,
16694            offset: usize,
16695            mut depth: fidl::encoding::Depth,
16696        ) -> fidl::Result<()> {
16697            decoder.debug_check_bounds::<Self>(offset);
16698            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16699                None => return Err(fidl::Error::NotNullable),
16700                Some(len) => len,
16701            };
16702            // Calling decoder.out_of_line_offset(0) is not allowed.
16703            if len == 0 {
16704                return Ok(());
16705            };
16706            depth.increment()?;
16707            let envelope_size = 8;
16708            let bytes_len = len * envelope_size;
16709            let offset = decoder.out_of_line_offset(bytes_len)?;
16710            // Decode the envelope for each type.
16711            let mut _next_ordinal_to_read = 0;
16712            let mut next_offset = offset;
16713            let end_offset = offset + bytes_len;
16714            _next_ordinal_to_read += 1;
16715            if next_offset >= end_offset {
16716                return Ok(());
16717            }
16718
16719            // Decode unknown envelopes for gaps in ordinals.
16720            while _next_ordinal_to_read < 2 {
16721                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16722                _next_ordinal_to_read += 1;
16723                next_offset += envelope_size;
16724            }
16725
16726            let next_out_of_line = decoder.next_out_of_line();
16727            let handles_before = decoder.remaining_handles();
16728            if let Some((inlined, num_bytes, num_handles)) =
16729                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16730            {
16731                let member_inline_size =
16732                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16733                if inlined != (member_inline_size <= 4) {
16734                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16735                }
16736                let inner_offset;
16737                let mut inner_depth = depth.clone();
16738                if inlined {
16739                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16740                    inner_offset = next_offset;
16741                } else {
16742                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16743                    inner_depth.increment()?;
16744                }
16745                let val_ref = self.hoplimit.get_or_insert_with(|| fidl::new_empty!(u8, D));
16746                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16747                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16748                {
16749                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16750                }
16751                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16752                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16753                }
16754            }
16755
16756            next_offset += envelope_size;
16757            _next_ordinal_to_read += 1;
16758            if next_offset >= end_offset {
16759                return Ok(());
16760            }
16761
16762            // Decode unknown envelopes for gaps in ordinals.
16763            while _next_ordinal_to_read < 3 {
16764                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16765                _next_ordinal_to_read += 1;
16766                next_offset += envelope_size;
16767            }
16768
16769            let next_out_of_line = decoder.next_out_of_line();
16770            let handles_before = decoder.remaining_handles();
16771            if let Some((inlined, num_bytes, num_handles)) =
16772                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16773            {
16774                let member_inline_size =
16775                    <Ipv6PktInfoSendControlData as fidl::encoding::TypeMarker>::inline_size(
16776                        decoder.context,
16777                    );
16778                if inlined != (member_inline_size <= 4) {
16779                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16780                }
16781                let inner_offset;
16782                let mut inner_depth = depth.clone();
16783                if inlined {
16784                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16785                    inner_offset = next_offset;
16786                } else {
16787                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16788                    inner_depth.increment()?;
16789                }
16790                let val_ref = self
16791                    .pktinfo
16792                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoSendControlData, D));
16793                fidl::decode!(
16794                    Ipv6PktInfoSendControlData,
16795                    D,
16796                    val_ref,
16797                    decoder,
16798                    inner_offset,
16799                    inner_depth
16800                )?;
16801                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16802                {
16803                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16804                }
16805                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16806                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16807                }
16808            }
16809
16810            next_offset += envelope_size;
16811
16812            // Decode the remaining unknown envelopes.
16813            while next_offset < end_offset {
16814                _next_ordinal_to_read += 1;
16815                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16816                next_offset += envelope_size;
16817            }
16818
16819            Ok(())
16820        }
16821    }
16822
16823    impl NetworkSocketRecvControlData {
16824        #[inline(always)]
16825        fn max_ordinal_present(&self) -> u64 {
16826            if let Some(_) = self.ipv6 {
16827                return 3;
16828            }
16829            if let Some(_) = self.ip {
16830                return 2;
16831            }
16832            if let Some(_) = self.socket {
16833                return 1;
16834            }
16835            0
16836        }
16837    }
16838
16839    impl fidl::encoding::ValueTypeMarker for NetworkSocketRecvControlData {
16840        type Borrowed<'a> = &'a Self;
16841        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16842            value
16843        }
16844    }
16845
16846    unsafe impl fidl::encoding::TypeMarker for NetworkSocketRecvControlData {
16847        type Owned = Self;
16848
16849        #[inline(always)]
16850        fn inline_align(_context: fidl::encoding::Context) -> usize {
16851            8
16852        }
16853
16854        #[inline(always)]
16855        fn inline_size(_context: fidl::encoding::Context) -> usize {
16856            16
16857        }
16858    }
16859
16860    unsafe impl<D: fidl::encoding::ResourceDialect>
16861        fidl::encoding::Encode<NetworkSocketRecvControlData, D> for &NetworkSocketRecvControlData
16862    {
16863        unsafe fn encode(
16864            self,
16865            encoder: &mut fidl::encoding::Encoder<'_, D>,
16866            offset: usize,
16867            mut depth: fidl::encoding::Depth,
16868        ) -> fidl::Result<()> {
16869            encoder.debug_check_bounds::<NetworkSocketRecvControlData>(offset);
16870            // Vector header
16871            let max_ordinal: u64 = self.max_ordinal_present();
16872            encoder.write_num(max_ordinal, offset);
16873            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16874            // Calling encoder.out_of_line_offset(0) is not allowed.
16875            if max_ordinal == 0 {
16876                return Ok(());
16877            }
16878            depth.increment()?;
16879            let envelope_size = 8;
16880            let bytes_len = max_ordinal as usize * envelope_size;
16881            #[allow(unused_variables)]
16882            let offset = encoder.out_of_line_offset(bytes_len);
16883            let mut _prev_end_offset: usize = 0;
16884            if 1 > max_ordinal {
16885                return Ok(());
16886            }
16887
16888            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16889            // are envelope_size bytes.
16890            let cur_offset: usize = (1 - 1) * envelope_size;
16891
16892            // Zero reserved fields.
16893            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16894
16895            // Safety:
16896            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16897            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16898            //   envelope_size bytes, there is always sufficient room.
16899            fidl::encoding::encode_in_envelope_optional::<SocketRecvControlData, D>(
16900                self.socket
16901                    .as_ref()
16902                    .map(<SocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16903                encoder,
16904                offset + cur_offset,
16905                depth,
16906            )?;
16907
16908            _prev_end_offset = cur_offset + envelope_size;
16909            if 2 > max_ordinal {
16910                return Ok(());
16911            }
16912
16913            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16914            // are envelope_size bytes.
16915            let cur_offset: usize = (2 - 1) * envelope_size;
16916
16917            // Zero reserved fields.
16918            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16919
16920            // Safety:
16921            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16922            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16923            //   envelope_size bytes, there is always sufficient room.
16924            fidl::encoding::encode_in_envelope_optional::<IpRecvControlData, D>(
16925                self.ip
16926                    .as_ref()
16927                    .map(<IpRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16928                encoder,
16929                offset + cur_offset,
16930                depth,
16931            )?;
16932
16933            _prev_end_offset = cur_offset + envelope_size;
16934            if 3 > max_ordinal {
16935                return Ok(());
16936            }
16937
16938            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16939            // are envelope_size bytes.
16940            let cur_offset: usize = (3 - 1) * envelope_size;
16941
16942            // Zero reserved fields.
16943            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16944
16945            // Safety:
16946            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16947            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16948            //   envelope_size bytes, there is always sufficient room.
16949            fidl::encoding::encode_in_envelope_optional::<Ipv6RecvControlData, D>(
16950                self.ipv6
16951                    .as_ref()
16952                    .map(<Ipv6RecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16953                encoder,
16954                offset + cur_offset,
16955                depth,
16956            )?;
16957
16958            _prev_end_offset = cur_offset + envelope_size;
16959
16960            Ok(())
16961        }
16962    }
16963
16964    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16965        for NetworkSocketRecvControlData
16966    {
16967        #[inline(always)]
16968        fn new_empty() -> Self {
16969            Self::default()
16970        }
16971
16972        unsafe fn decode(
16973            &mut self,
16974            decoder: &mut fidl::encoding::Decoder<'_, D>,
16975            offset: usize,
16976            mut depth: fidl::encoding::Depth,
16977        ) -> fidl::Result<()> {
16978            decoder.debug_check_bounds::<Self>(offset);
16979            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16980                None => return Err(fidl::Error::NotNullable),
16981                Some(len) => len,
16982            };
16983            // Calling decoder.out_of_line_offset(0) is not allowed.
16984            if len == 0 {
16985                return Ok(());
16986            };
16987            depth.increment()?;
16988            let envelope_size = 8;
16989            let bytes_len = len * envelope_size;
16990            let offset = decoder.out_of_line_offset(bytes_len)?;
16991            // Decode the envelope for each type.
16992            let mut _next_ordinal_to_read = 0;
16993            let mut next_offset = offset;
16994            let end_offset = offset + bytes_len;
16995            _next_ordinal_to_read += 1;
16996            if next_offset >= end_offset {
16997                return Ok(());
16998            }
16999
17000            // Decode unknown envelopes for gaps in ordinals.
17001            while _next_ordinal_to_read < 1 {
17002                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17003                _next_ordinal_to_read += 1;
17004                next_offset += envelope_size;
17005            }
17006
17007            let next_out_of_line = decoder.next_out_of_line();
17008            let handles_before = decoder.remaining_handles();
17009            if let Some((inlined, num_bytes, num_handles)) =
17010                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17011            {
17012                let member_inline_size =
17013                    <SocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
17014                        decoder.context,
17015                    );
17016                if inlined != (member_inline_size <= 4) {
17017                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17018                }
17019                let inner_offset;
17020                let mut inner_depth = depth.clone();
17021                if inlined {
17022                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17023                    inner_offset = next_offset;
17024                } else {
17025                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17026                    inner_depth.increment()?;
17027                }
17028                let val_ref =
17029                    self.socket.get_or_insert_with(|| fidl::new_empty!(SocketRecvControlData, D));
17030                fidl::decode!(
17031                    SocketRecvControlData,
17032                    D,
17033                    val_ref,
17034                    decoder,
17035                    inner_offset,
17036                    inner_depth
17037                )?;
17038                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17039                {
17040                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17041                }
17042                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17043                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17044                }
17045            }
17046
17047            next_offset += envelope_size;
17048            _next_ordinal_to_read += 1;
17049            if next_offset >= end_offset {
17050                return Ok(());
17051            }
17052
17053            // Decode unknown envelopes for gaps in ordinals.
17054            while _next_ordinal_to_read < 2 {
17055                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17056                _next_ordinal_to_read += 1;
17057                next_offset += envelope_size;
17058            }
17059
17060            let next_out_of_line = decoder.next_out_of_line();
17061            let handles_before = decoder.remaining_handles();
17062            if let Some((inlined, num_bytes, num_handles)) =
17063                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17064            {
17065                let member_inline_size =
17066                    <IpRecvControlData as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17067                if inlined != (member_inline_size <= 4) {
17068                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17069                }
17070                let inner_offset;
17071                let mut inner_depth = depth.clone();
17072                if inlined {
17073                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17074                    inner_offset = next_offset;
17075                } else {
17076                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17077                    inner_depth.increment()?;
17078                }
17079                let val_ref = self.ip.get_or_insert_with(|| fidl::new_empty!(IpRecvControlData, D));
17080                fidl::decode!(IpRecvControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17081                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17082                {
17083                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17084                }
17085                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17086                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17087                }
17088            }
17089
17090            next_offset += envelope_size;
17091            _next_ordinal_to_read += 1;
17092            if next_offset >= end_offset {
17093                return Ok(());
17094            }
17095
17096            // Decode unknown envelopes for gaps in ordinals.
17097            while _next_ordinal_to_read < 3 {
17098                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17099                _next_ordinal_to_read += 1;
17100                next_offset += envelope_size;
17101            }
17102
17103            let next_out_of_line = decoder.next_out_of_line();
17104            let handles_before = decoder.remaining_handles();
17105            if let Some((inlined, num_bytes, num_handles)) =
17106                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17107            {
17108                let member_inline_size =
17109                    <Ipv6RecvControlData as fidl::encoding::TypeMarker>::inline_size(
17110                        decoder.context,
17111                    );
17112                if inlined != (member_inline_size <= 4) {
17113                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17114                }
17115                let inner_offset;
17116                let mut inner_depth = depth.clone();
17117                if inlined {
17118                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17119                    inner_offset = next_offset;
17120                } else {
17121                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17122                    inner_depth.increment()?;
17123                }
17124                let val_ref =
17125                    self.ipv6.get_or_insert_with(|| fidl::new_empty!(Ipv6RecvControlData, D));
17126                fidl::decode!(Ipv6RecvControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17127                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17128                {
17129                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17130                }
17131                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17132                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17133                }
17134            }
17135
17136            next_offset += envelope_size;
17137
17138            // Decode the remaining unknown envelopes.
17139            while next_offset < end_offset {
17140                _next_ordinal_to_read += 1;
17141                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17142                next_offset += envelope_size;
17143            }
17144
17145            Ok(())
17146        }
17147    }
17148
17149    impl NetworkSocketSendControlData {
17150        #[inline(always)]
17151        fn max_ordinal_present(&self) -> u64 {
17152            if let Some(_) = self.ipv6 {
17153                return 3;
17154            }
17155            if let Some(_) = self.ip {
17156                return 2;
17157            }
17158            if let Some(_) = self.socket {
17159                return 1;
17160            }
17161            0
17162        }
17163    }
17164
17165    impl fidl::encoding::ValueTypeMarker for NetworkSocketSendControlData {
17166        type Borrowed<'a> = &'a Self;
17167        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17168            value
17169        }
17170    }
17171
17172    unsafe impl fidl::encoding::TypeMarker for NetworkSocketSendControlData {
17173        type Owned = Self;
17174
17175        #[inline(always)]
17176        fn inline_align(_context: fidl::encoding::Context) -> usize {
17177            8
17178        }
17179
17180        #[inline(always)]
17181        fn inline_size(_context: fidl::encoding::Context) -> usize {
17182            16
17183        }
17184    }
17185
17186    unsafe impl<D: fidl::encoding::ResourceDialect>
17187        fidl::encoding::Encode<NetworkSocketSendControlData, D> for &NetworkSocketSendControlData
17188    {
17189        unsafe fn encode(
17190            self,
17191            encoder: &mut fidl::encoding::Encoder<'_, D>,
17192            offset: usize,
17193            mut depth: fidl::encoding::Depth,
17194        ) -> fidl::Result<()> {
17195            encoder.debug_check_bounds::<NetworkSocketSendControlData>(offset);
17196            // Vector header
17197            let max_ordinal: u64 = self.max_ordinal_present();
17198            encoder.write_num(max_ordinal, offset);
17199            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17200            // Calling encoder.out_of_line_offset(0) is not allowed.
17201            if max_ordinal == 0 {
17202                return Ok(());
17203            }
17204            depth.increment()?;
17205            let envelope_size = 8;
17206            let bytes_len = max_ordinal as usize * envelope_size;
17207            #[allow(unused_variables)]
17208            let offset = encoder.out_of_line_offset(bytes_len);
17209            let mut _prev_end_offset: usize = 0;
17210            if 1 > max_ordinal {
17211                return Ok(());
17212            }
17213
17214            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17215            // are envelope_size bytes.
17216            let cur_offset: usize = (1 - 1) * envelope_size;
17217
17218            // Zero reserved fields.
17219            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17220
17221            // Safety:
17222            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17223            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17224            //   envelope_size bytes, there is always sufficient room.
17225            fidl::encoding::encode_in_envelope_optional::<SocketSendControlData, D>(
17226                self.socket
17227                    .as_ref()
17228                    .map(<SocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17229                encoder,
17230                offset + cur_offset,
17231                depth,
17232            )?;
17233
17234            _prev_end_offset = cur_offset + envelope_size;
17235            if 2 > max_ordinal {
17236                return Ok(());
17237            }
17238
17239            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17240            // are envelope_size bytes.
17241            let cur_offset: usize = (2 - 1) * envelope_size;
17242
17243            // Zero reserved fields.
17244            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17245
17246            // Safety:
17247            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17248            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17249            //   envelope_size bytes, there is always sufficient room.
17250            fidl::encoding::encode_in_envelope_optional::<IpSendControlData, D>(
17251                self.ip
17252                    .as_ref()
17253                    .map(<IpSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17254                encoder,
17255                offset + cur_offset,
17256                depth,
17257            )?;
17258
17259            _prev_end_offset = cur_offset + envelope_size;
17260            if 3 > max_ordinal {
17261                return Ok(());
17262            }
17263
17264            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17265            // are envelope_size bytes.
17266            let cur_offset: usize = (3 - 1) * envelope_size;
17267
17268            // Zero reserved fields.
17269            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17270
17271            // Safety:
17272            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17273            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17274            //   envelope_size bytes, there is always sufficient room.
17275            fidl::encoding::encode_in_envelope_optional::<Ipv6SendControlData, D>(
17276                self.ipv6
17277                    .as_ref()
17278                    .map(<Ipv6SendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17279                encoder,
17280                offset + cur_offset,
17281                depth,
17282            )?;
17283
17284            _prev_end_offset = cur_offset + envelope_size;
17285
17286            Ok(())
17287        }
17288    }
17289
17290    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17291        for NetworkSocketSendControlData
17292    {
17293        #[inline(always)]
17294        fn new_empty() -> Self {
17295            Self::default()
17296        }
17297
17298        unsafe fn decode(
17299            &mut self,
17300            decoder: &mut fidl::encoding::Decoder<'_, D>,
17301            offset: usize,
17302            mut depth: fidl::encoding::Depth,
17303        ) -> fidl::Result<()> {
17304            decoder.debug_check_bounds::<Self>(offset);
17305            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17306                None => return Err(fidl::Error::NotNullable),
17307                Some(len) => len,
17308            };
17309            // Calling decoder.out_of_line_offset(0) is not allowed.
17310            if len == 0 {
17311                return Ok(());
17312            };
17313            depth.increment()?;
17314            let envelope_size = 8;
17315            let bytes_len = len * envelope_size;
17316            let offset = decoder.out_of_line_offset(bytes_len)?;
17317            // Decode the envelope for each type.
17318            let mut _next_ordinal_to_read = 0;
17319            let mut next_offset = offset;
17320            let end_offset = offset + bytes_len;
17321            _next_ordinal_to_read += 1;
17322            if next_offset >= end_offset {
17323                return Ok(());
17324            }
17325
17326            // Decode unknown envelopes for gaps in ordinals.
17327            while _next_ordinal_to_read < 1 {
17328                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17329                _next_ordinal_to_read += 1;
17330                next_offset += envelope_size;
17331            }
17332
17333            let next_out_of_line = decoder.next_out_of_line();
17334            let handles_before = decoder.remaining_handles();
17335            if let Some((inlined, num_bytes, num_handles)) =
17336                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17337            {
17338                let member_inline_size =
17339                    <SocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
17340                        decoder.context,
17341                    );
17342                if inlined != (member_inline_size <= 4) {
17343                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17344                }
17345                let inner_offset;
17346                let mut inner_depth = depth.clone();
17347                if inlined {
17348                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17349                    inner_offset = next_offset;
17350                } else {
17351                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17352                    inner_depth.increment()?;
17353                }
17354                let val_ref =
17355                    self.socket.get_or_insert_with(|| fidl::new_empty!(SocketSendControlData, D));
17356                fidl::decode!(
17357                    SocketSendControlData,
17358                    D,
17359                    val_ref,
17360                    decoder,
17361                    inner_offset,
17362                    inner_depth
17363                )?;
17364                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17365                {
17366                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17367                }
17368                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17369                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17370                }
17371            }
17372
17373            next_offset += envelope_size;
17374            _next_ordinal_to_read += 1;
17375            if next_offset >= end_offset {
17376                return Ok(());
17377            }
17378
17379            // Decode unknown envelopes for gaps in ordinals.
17380            while _next_ordinal_to_read < 2 {
17381                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17382                _next_ordinal_to_read += 1;
17383                next_offset += envelope_size;
17384            }
17385
17386            let next_out_of_line = decoder.next_out_of_line();
17387            let handles_before = decoder.remaining_handles();
17388            if let Some((inlined, num_bytes, num_handles)) =
17389                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17390            {
17391                let member_inline_size =
17392                    <IpSendControlData as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17393                if inlined != (member_inline_size <= 4) {
17394                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17395                }
17396                let inner_offset;
17397                let mut inner_depth = depth.clone();
17398                if inlined {
17399                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17400                    inner_offset = next_offset;
17401                } else {
17402                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17403                    inner_depth.increment()?;
17404                }
17405                let val_ref = self.ip.get_or_insert_with(|| fidl::new_empty!(IpSendControlData, D));
17406                fidl::decode!(IpSendControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17407                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17408                {
17409                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17410                }
17411                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17412                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17413                }
17414            }
17415
17416            next_offset += envelope_size;
17417            _next_ordinal_to_read += 1;
17418            if next_offset >= end_offset {
17419                return Ok(());
17420            }
17421
17422            // Decode unknown envelopes for gaps in ordinals.
17423            while _next_ordinal_to_read < 3 {
17424                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17425                _next_ordinal_to_read += 1;
17426                next_offset += envelope_size;
17427            }
17428
17429            let next_out_of_line = decoder.next_out_of_line();
17430            let handles_before = decoder.remaining_handles();
17431            if let Some((inlined, num_bytes, num_handles)) =
17432                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17433            {
17434                let member_inline_size =
17435                    <Ipv6SendControlData as fidl::encoding::TypeMarker>::inline_size(
17436                        decoder.context,
17437                    );
17438                if inlined != (member_inline_size <= 4) {
17439                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17440                }
17441                let inner_offset;
17442                let mut inner_depth = depth.clone();
17443                if inlined {
17444                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17445                    inner_offset = next_offset;
17446                } else {
17447                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17448                    inner_depth.increment()?;
17449                }
17450                let val_ref =
17451                    self.ipv6.get_or_insert_with(|| fidl::new_empty!(Ipv6SendControlData, D));
17452                fidl::decode!(Ipv6SendControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17453                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17454                {
17455                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17456                }
17457                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17458                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17459                }
17460            }
17461
17462            next_offset += envelope_size;
17463
17464            // Decode the remaining unknown envelopes.
17465            while next_offset < end_offset {
17466                _next_ordinal_to_read += 1;
17467                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17468                next_offset += envelope_size;
17469            }
17470
17471            Ok(())
17472        }
17473    }
17474
17475    impl RecvMsgMeta {
17476        #[inline(always)]
17477        fn max_ordinal_present(&self) -> u64 {
17478            if let Some(_) = self.payload_len {
17479                return 3;
17480            }
17481            if let Some(_) = self.control {
17482                return 2;
17483            }
17484            if let Some(_) = self.from {
17485                return 1;
17486            }
17487            0
17488        }
17489    }
17490
17491    impl fidl::encoding::ValueTypeMarker for RecvMsgMeta {
17492        type Borrowed<'a> = &'a Self;
17493        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17494            value
17495        }
17496    }
17497
17498    unsafe impl fidl::encoding::TypeMarker for RecvMsgMeta {
17499        type Owned = Self;
17500
17501        #[inline(always)]
17502        fn inline_align(_context: fidl::encoding::Context) -> usize {
17503            8
17504        }
17505
17506        #[inline(always)]
17507        fn inline_size(_context: fidl::encoding::Context) -> usize {
17508            16
17509        }
17510    }
17511
17512    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecvMsgMeta, D>
17513        for &RecvMsgMeta
17514    {
17515        unsafe fn encode(
17516            self,
17517            encoder: &mut fidl::encoding::Encoder<'_, D>,
17518            offset: usize,
17519            mut depth: fidl::encoding::Depth,
17520        ) -> fidl::Result<()> {
17521            encoder.debug_check_bounds::<RecvMsgMeta>(offset);
17522            // Vector header
17523            let max_ordinal: u64 = self.max_ordinal_present();
17524            encoder.write_num(max_ordinal, offset);
17525            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17526            // Calling encoder.out_of_line_offset(0) is not allowed.
17527            if max_ordinal == 0 {
17528                return Ok(());
17529            }
17530            depth.increment()?;
17531            let envelope_size = 8;
17532            let bytes_len = max_ordinal as usize * envelope_size;
17533            #[allow(unused_variables)]
17534            let offset = encoder.out_of_line_offset(bytes_len);
17535            let mut _prev_end_offset: usize = 0;
17536            if 1 > max_ordinal {
17537                return Ok(());
17538            }
17539
17540            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17541            // are envelope_size bytes.
17542            let cur_offset: usize = (1 - 1) * envelope_size;
17543
17544            // Zero reserved fields.
17545            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17546
17547            // Safety:
17548            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17549            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17550            //   envelope_size bytes, there is always sufficient room.
17551            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
17552            self.from.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
17553            encoder, offset + cur_offset, depth
17554        )?;
17555
17556            _prev_end_offset = cur_offset + envelope_size;
17557            if 2 > max_ordinal {
17558                return Ok(());
17559            }
17560
17561            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17562            // are envelope_size bytes.
17563            let cur_offset: usize = (2 - 1) * envelope_size;
17564
17565            // Zero reserved fields.
17566            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17567
17568            // Safety:
17569            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17570            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17571            //   envelope_size bytes, there is always sufficient room.
17572            fidl::encoding::encode_in_envelope_optional::<DatagramSocketRecvControlData, D>(
17573                self.control.as_ref().map(
17574                    <DatagramSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow,
17575                ),
17576                encoder,
17577                offset + cur_offset,
17578                depth,
17579            )?;
17580
17581            _prev_end_offset = cur_offset + envelope_size;
17582            if 3 > max_ordinal {
17583                return Ok(());
17584            }
17585
17586            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17587            // are envelope_size bytes.
17588            let cur_offset: usize = (3 - 1) * envelope_size;
17589
17590            // Zero reserved fields.
17591            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17592
17593            // Safety:
17594            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17595            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17596            //   envelope_size bytes, there is always sufficient room.
17597            fidl::encoding::encode_in_envelope_optional::<u16, D>(
17598                self.payload_len.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
17599                encoder,
17600                offset + cur_offset,
17601                depth,
17602            )?;
17603
17604            _prev_end_offset = cur_offset + envelope_size;
17605
17606            Ok(())
17607        }
17608    }
17609
17610    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecvMsgMeta {
17611        #[inline(always)]
17612        fn new_empty() -> Self {
17613            Self::default()
17614        }
17615
17616        unsafe fn decode(
17617            &mut self,
17618            decoder: &mut fidl::encoding::Decoder<'_, D>,
17619            offset: usize,
17620            mut depth: fidl::encoding::Depth,
17621        ) -> fidl::Result<()> {
17622            decoder.debug_check_bounds::<Self>(offset);
17623            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17624                None => return Err(fidl::Error::NotNullable),
17625                Some(len) => len,
17626            };
17627            // Calling decoder.out_of_line_offset(0) is not allowed.
17628            if len == 0 {
17629                return Ok(());
17630            };
17631            depth.increment()?;
17632            let envelope_size = 8;
17633            let bytes_len = len * envelope_size;
17634            let offset = decoder.out_of_line_offset(bytes_len)?;
17635            // Decode the envelope for each type.
17636            let mut _next_ordinal_to_read = 0;
17637            let mut next_offset = offset;
17638            let end_offset = offset + bytes_len;
17639            _next_ordinal_to_read += 1;
17640            if next_offset >= end_offset {
17641                return Ok(());
17642            }
17643
17644            // Decode unknown envelopes for gaps in ordinals.
17645            while _next_ordinal_to_read < 1 {
17646                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17647                _next_ordinal_to_read += 1;
17648                next_offset += envelope_size;
17649            }
17650
17651            let next_out_of_line = decoder.next_out_of_line();
17652            let handles_before = decoder.remaining_handles();
17653            if let Some((inlined, num_bytes, num_handles)) =
17654                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17655            {
17656                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17657                if inlined != (member_inline_size <= 4) {
17658                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17659                }
17660                let inner_offset;
17661                let mut inner_depth = depth.clone();
17662                if inlined {
17663                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17664                    inner_offset = next_offset;
17665                } else {
17666                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17667                    inner_depth.increment()?;
17668                }
17669                let val_ref = self.from.get_or_insert_with(|| {
17670                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
17671                });
17672                fidl::decode!(
17673                    fidl_fuchsia_net__common::SocketAddress,
17674                    D,
17675                    val_ref,
17676                    decoder,
17677                    inner_offset,
17678                    inner_depth
17679                )?;
17680                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17681                {
17682                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17683                }
17684                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17685                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17686                }
17687            }
17688
17689            next_offset += envelope_size;
17690            _next_ordinal_to_read += 1;
17691            if next_offset >= end_offset {
17692                return Ok(());
17693            }
17694
17695            // Decode unknown envelopes for gaps in ordinals.
17696            while _next_ordinal_to_read < 2 {
17697                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17698                _next_ordinal_to_read += 1;
17699                next_offset += envelope_size;
17700            }
17701
17702            let next_out_of_line = decoder.next_out_of_line();
17703            let handles_before = decoder.remaining_handles();
17704            if let Some((inlined, num_bytes, num_handles)) =
17705                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17706            {
17707                let member_inline_size =
17708                    <DatagramSocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
17709                        decoder.context,
17710                    );
17711                if inlined != (member_inline_size <= 4) {
17712                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17713                }
17714                let inner_offset;
17715                let mut inner_depth = depth.clone();
17716                if inlined {
17717                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17718                    inner_offset = next_offset;
17719                } else {
17720                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17721                    inner_depth.increment()?;
17722                }
17723                let val_ref = self
17724                    .control
17725                    .get_or_insert_with(|| fidl::new_empty!(DatagramSocketRecvControlData, D));
17726                fidl::decode!(
17727                    DatagramSocketRecvControlData,
17728                    D,
17729                    val_ref,
17730                    decoder,
17731                    inner_offset,
17732                    inner_depth
17733                )?;
17734                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17735                {
17736                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17737                }
17738                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17739                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17740                }
17741            }
17742
17743            next_offset += envelope_size;
17744            _next_ordinal_to_read += 1;
17745            if next_offset >= end_offset {
17746                return Ok(());
17747            }
17748
17749            // Decode unknown envelopes for gaps in ordinals.
17750            while _next_ordinal_to_read < 3 {
17751                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17752                _next_ordinal_to_read += 1;
17753                next_offset += envelope_size;
17754            }
17755
17756            let next_out_of_line = decoder.next_out_of_line();
17757            let handles_before = decoder.remaining_handles();
17758            if let Some((inlined, num_bytes, num_handles)) =
17759                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17760            {
17761                let member_inline_size =
17762                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17763                if inlined != (member_inline_size <= 4) {
17764                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17765                }
17766                let inner_offset;
17767                let mut inner_depth = depth.clone();
17768                if inlined {
17769                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17770                    inner_offset = next_offset;
17771                } else {
17772                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17773                    inner_depth.increment()?;
17774                }
17775                let val_ref = self.payload_len.get_or_insert_with(|| fidl::new_empty!(u16, D));
17776                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
17777                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17778                {
17779                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17780                }
17781                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17782                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17783                }
17784            }
17785
17786            next_offset += envelope_size;
17787
17788            // Decode the remaining unknown envelopes.
17789            while next_offset < end_offset {
17790                _next_ordinal_to_read += 1;
17791                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17792                next_offset += envelope_size;
17793            }
17794
17795            Ok(())
17796        }
17797    }
17798
17799    impl SendMsgMeta {
17800        #[inline(always)]
17801        fn max_ordinal_present(&self) -> u64 {
17802            if let Some(_) = self.control {
17803                return 2;
17804            }
17805            if let Some(_) = self.to {
17806                return 1;
17807            }
17808            0
17809        }
17810    }
17811
17812    impl fidl::encoding::ValueTypeMarker for SendMsgMeta {
17813        type Borrowed<'a> = &'a Self;
17814        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17815            value
17816        }
17817    }
17818
17819    unsafe impl fidl::encoding::TypeMarker for SendMsgMeta {
17820        type Owned = Self;
17821
17822        #[inline(always)]
17823        fn inline_align(_context: fidl::encoding::Context) -> usize {
17824            8
17825        }
17826
17827        #[inline(always)]
17828        fn inline_size(_context: fidl::encoding::Context) -> usize {
17829            16
17830        }
17831    }
17832
17833    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SendMsgMeta, D>
17834        for &SendMsgMeta
17835    {
17836        unsafe fn encode(
17837            self,
17838            encoder: &mut fidl::encoding::Encoder<'_, D>,
17839            offset: usize,
17840            mut depth: fidl::encoding::Depth,
17841        ) -> fidl::Result<()> {
17842            encoder.debug_check_bounds::<SendMsgMeta>(offset);
17843            // Vector header
17844            let max_ordinal: u64 = self.max_ordinal_present();
17845            encoder.write_num(max_ordinal, offset);
17846            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17847            // Calling encoder.out_of_line_offset(0) is not allowed.
17848            if max_ordinal == 0 {
17849                return Ok(());
17850            }
17851            depth.increment()?;
17852            let envelope_size = 8;
17853            let bytes_len = max_ordinal as usize * envelope_size;
17854            #[allow(unused_variables)]
17855            let offset = encoder.out_of_line_offset(bytes_len);
17856            let mut _prev_end_offset: usize = 0;
17857            if 1 > max_ordinal {
17858                return Ok(());
17859            }
17860
17861            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17862            // are envelope_size bytes.
17863            let cur_offset: usize = (1 - 1) * envelope_size;
17864
17865            // Zero reserved fields.
17866            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17867
17868            // Safety:
17869            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17870            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17871            //   envelope_size bytes, there is always sufficient room.
17872            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
17873            self.to.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
17874            encoder, offset + cur_offset, depth
17875        )?;
17876
17877            _prev_end_offset = cur_offset + envelope_size;
17878            if 2 > max_ordinal {
17879                return Ok(());
17880            }
17881
17882            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17883            // are envelope_size bytes.
17884            let cur_offset: usize = (2 - 1) * envelope_size;
17885
17886            // Zero reserved fields.
17887            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17888
17889            // Safety:
17890            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17891            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17892            //   envelope_size bytes, there is always sufficient room.
17893            fidl::encoding::encode_in_envelope_optional::<DatagramSocketSendControlData, D>(
17894                self.control.as_ref().map(
17895                    <DatagramSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow,
17896                ),
17897                encoder,
17898                offset + cur_offset,
17899                depth,
17900            )?;
17901
17902            _prev_end_offset = cur_offset + envelope_size;
17903
17904            Ok(())
17905        }
17906    }
17907
17908    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SendMsgMeta {
17909        #[inline(always)]
17910        fn new_empty() -> Self {
17911            Self::default()
17912        }
17913
17914        unsafe fn decode(
17915            &mut self,
17916            decoder: &mut fidl::encoding::Decoder<'_, D>,
17917            offset: usize,
17918            mut depth: fidl::encoding::Depth,
17919        ) -> fidl::Result<()> {
17920            decoder.debug_check_bounds::<Self>(offset);
17921            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17922                None => return Err(fidl::Error::NotNullable),
17923                Some(len) => len,
17924            };
17925            // Calling decoder.out_of_line_offset(0) is not allowed.
17926            if len == 0 {
17927                return Ok(());
17928            };
17929            depth.increment()?;
17930            let envelope_size = 8;
17931            let bytes_len = len * envelope_size;
17932            let offset = decoder.out_of_line_offset(bytes_len)?;
17933            // Decode the envelope for each type.
17934            let mut _next_ordinal_to_read = 0;
17935            let mut next_offset = offset;
17936            let end_offset = offset + bytes_len;
17937            _next_ordinal_to_read += 1;
17938            if next_offset >= end_offset {
17939                return Ok(());
17940            }
17941
17942            // Decode unknown envelopes for gaps in ordinals.
17943            while _next_ordinal_to_read < 1 {
17944                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17945                _next_ordinal_to_read += 1;
17946                next_offset += envelope_size;
17947            }
17948
17949            let next_out_of_line = decoder.next_out_of_line();
17950            let handles_before = decoder.remaining_handles();
17951            if let Some((inlined, num_bytes, num_handles)) =
17952                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17953            {
17954                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17955                if inlined != (member_inline_size <= 4) {
17956                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17957                }
17958                let inner_offset;
17959                let mut inner_depth = depth.clone();
17960                if inlined {
17961                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17962                    inner_offset = next_offset;
17963                } else {
17964                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17965                    inner_depth.increment()?;
17966                }
17967                let val_ref = self.to.get_or_insert_with(|| {
17968                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
17969                });
17970                fidl::decode!(
17971                    fidl_fuchsia_net__common::SocketAddress,
17972                    D,
17973                    val_ref,
17974                    decoder,
17975                    inner_offset,
17976                    inner_depth
17977                )?;
17978                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17979                {
17980                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17981                }
17982                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17983                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17984                }
17985            }
17986
17987            next_offset += envelope_size;
17988            _next_ordinal_to_read += 1;
17989            if next_offset >= end_offset {
17990                return Ok(());
17991            }
17992
17993            // Decode unknown envelopes for gaps in ordinals.
17994            while _next_ordinal_to_read < 2 {
17995                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17996                _next_ordinal_to_read += 1;
17997                next_offset += envelope_size;
17998            }
17999
18000            let next_out_of_line = decoder.next_out_of_line();
18001            let handles_before = decoder.remaining_handles();
18002            if let Some((inlined, num_bytes, num_handles)) =
18003                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18004            {
18005                let member_inline_size =
18006                    <DatagramSocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
18007                        decoder.context,
18008                    );
18009                if inlined != (member_inline_size <= 4) {
18010                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18011                }
18012                let inner_offset;
18013                let mut inner_depth = depth.clone();
18014                if inlined {
18015                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18016                    inner_offset = next_offset;
18017                } else {
18018                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18019                    inner_depth.increment()?;
18020                }
18021                let val_ref = self
18022                    .control
18023                    .get_or_insert_with(|| fidl::new_empty!(DatagramSocketSendControlData, D));
18024                fidl::decode!(
18025                    DatagramSocketSendControlData,
18026                    D,
18027                    val_ref,
18028                    decoder,
18029                    inner_offset,
18030                    inner_depth
18031                )?;
18032                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18033                {
18034                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18035                }
18036                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18037                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18038                }
18039            }
18040
18041            next_offset += envelope_size;
18042
18043            // Decode the remaining unknown envelopes.
18044            while next_offset < end_offset {
18045                _next_ordinal_to_read += 1;
18046                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18047                next_offset += envelope_size;
18048            }
18049
18050            Ok(())
18051        }
18052    }
18053
18054    impl SocketRecvControlData {
18055        #[inline(always)]
18056        fn max_ordinal_present(&self) -> u64 {
18057            if let Some(_) = self.timestamp {
18058                return 3;
18059            }
18060            0
18061        }
18062    }
18063
18064    impl fidl::encoding::ValueTypeMarker for SocketRecvControlData {
18065        type Borrowed<'a> = &'a Self;
18066        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18067            value
18068        }
18069    }
18070
18071    unsafe impl fidl::encoding::TypeMarker for SocketRecvControlData {
18072        type Owned = Self;
18073
18074        #[inline(always)]
18075        fn inline_align(_context: fidl::encoding::Context) -> usize {
18076            8
18077        }
18078
18079        #[inline(always)]
18080        fn inline_size(_context: fidl::encoding::Context) -> usize {
18081            16
18082        }
18083    }
18084
18085    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketRecvControlData, D>
18086        for &SocketRecvControlData
18087    {
18088        unsafe fn encode(
18089            self,
18090            encoder: &mut fidl::encoding::Encoder<'_, D>,
18091            offset: usize,
18092            mut depth: fidl::encoding::Depth,
18093        ) -> fidl::Result<()> {
18094            encoder.debug_check_bounds::<SocketRecvControlData>(offset);
18095            // Vector header
18096            let max_ordinal: u64 = self.max_ordinal_present();
18097            encoder.write_num(max_ordinal, offset);
18098            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18099            // Calling encoder.out_of_line_offset(0) is not allowed.
18100            if max_ordinal == 0 {
18101                return Ok(());
18102            }
18103            depth.increment()?;
18104            let envelope_size = 8;
18105            let bytes_len = max_ordinal as usize * envelope_size;
18106            #[allow(unused_variables)]
18107            let offset = encoder.out_of_line_offset(bytes_len);
18108            let mut _prev_end_offset: usize = 0;
18109            if 3 > max_ordinal {
18110                return Ok(());
18111            }
18112
18113            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18114            // are envelope_size bytes.
18115            let cur_offset: usize = (3 - 1) * envelope_size;
18116
18117            // Zero reserved fields.
18118            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18119
18120            // Safety:
18121            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18122            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18123            //   envelope_size bytes, there is always sufficient room.
18124            fidl::encoding::encode_in_envelope_optional::<Timestamp, D>(
18125                self.timestamp.as_ref().map(<Timestamp as fidl::encoding::ValueTypeMarker>::borrow),
18126                encoder,
18127                offset + cur_offset,
18128                depth,
18129            )?;
18130
18131            _prev_end_offset = cur_offset + envelope_size;
18132
18133            Ok(())
18134        }
18135    }
18136
18137    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketRecvControlData {
18138        #[inline(always)]
18139        fn new_empty() -> Self {
18140            Self::default()
18141        }
18142
18143        unsafe fn decode(
18144            &mut self,
18145            decoder: &mut fidl::encoding::Decoder<'_, D>,
18146            offset: usize,
18147            mut depth: fidl::encoding::Depth,
18148        ) -> fidl::Result<()> {
18149            decoder.debug_check_bounds::<Self>(offset);
18150            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18151                None => return Err(fidl::Error::NotNullable),
18152                Some(len) => len,
18153            };
18154            // Calling decoder.out_of_line_offset(0) is not allowed.
18155            if len == 0 {
18156                return Ok(());
18157            };
18158            depth.increment()?;
18159            let envelope_size = 8;
18160            let bytes_len = len * envelope_size;
18161            let offset = decoder.out_of_line_offset(bytes_len)?;
18162            // Decode the envelope for each type.
18163            let mut _next_ordinal_to_read = 0;
18164            let mut next_offset = offset;
18165            let end_offset = offset + bytes_len;
18166            _next_ordinal_to_read += 1;
18167            if next_offset >= end_offset {
18168                return Ok(());
18169            }
18170
18171            // Decode unknown envelopes for gaps in ordinals.
18172            while _next_ordinal_to_read < 3 {
18173                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18174                _next_ordinal_to_read += 1;
18175                next_offset += envelope_size;
18176            }
18177
18178            let next_out_of_line = decoder.next_out_of_line();
18179            let handles_before = decoder.remaining_handles();
18180            if let Some((inlined, num_bytes, num_handles)) =
18181                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18182            {
18183                let member_inline_size =
18184                    <Timestamp as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18185                if inlined != (member_inline_size <= 4) {
18186                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18187                }
18188                let inner_offset;
18189                let mut inner_depth = depth.clone();
18190                if inlined {
18191                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18192                    inner_offset = next_offset;
18193                } else {
18194                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18195                    inner_depth.increment()?;
18196                }
18197                let val_ref = self.timestamp.get_or_insert_with(|| fidl::new_empty!(Timestamp, D));
18198                fidl::decode!(Timestamp, D, val_ref, decoder, inner_offset, inner_depth)?;
18199                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18200                {
18201                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18202                }
18203                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18204                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18205                }
18206            }
18207
18208            next_offset += envelope_size;
18209
18210            // Decode the remaining unknown envelopes.
18211            while next_offset < end_offset {
18212                _next_ordinal_to_read += 1;
18213                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18214                next_offset += envelope_size;
18215            }
18216
18217            Ok(())
18218        }
18219    }
18220
18221    impl SocketSendControlData {
18222        #[inline(always)]
18223        fn max_ordinal_present(&self) -> u64 {
18224            0
18225        }
18226    }
18227
18228    impl fidl::encoding::ValueTypeMarker for SocketSendControlData {
18229        type Borrowed<'a> = &'a Self;
18230        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18231            value
18232        }
18233    }
18234
18235    unsafe impl fidl::encoding::TypeMarker for SocketSendControlData {
18236        type Owned = Self;
18237
18238        #[inline(always)]
18239        fn inline_align(_context: fidl::encoding::Context) -> usize {
18240            8
18241        }
18242
18243        #[inline(always)]
18244        fn inline_size(_context: fidl::encoding::Context) -> usize {
18245            16
18246        }
18247    }
18248
18249    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketSendControlData, D>
18250        for &SocketSendControlData
18251    {
18252        unsafe fn encode(
18253            self,
18254            encoder: &mut fidl::encoding::Encoder<'_, D>,
18255            offset: usize,
18256            mut depth: fidl::encoding::Depth,
18257        ) -> fidl::Result<()> {
18258            encoder.debug_check_bounds::<SocketSendControlData>(offset);
18259            // Vector header
18260            let max_ordinal: u64 = self.max_ordinal_present();
18261            encoder.write_num(max_ordinal, offset);
18262            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18263            // Calling encoder.out_of_line_offset(0) is not allowed.
18264            if max_ordinal == 0 {
18265                return Ok(());
18266            }
18267            depth.increment()?;
18268            let envelope_size = 8;
18269            let bytes_len = max_ordinal as usize * envelope_size;
18270            #[allow(unused_variables)]
18271            let offset = encoder.out_of_line_offset(bytes_len);
18272            let mut _prev_end_offset: usize = 0;
18273
18274            Ok(())
18275        }
18276    }
18277
18278    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketSendControlData {
18279        #[inline(always)]
18280        fn new_empty() -> Self {
18281            Self::default()
18282        }
18283
18284        unsafe fn decode(
18285            &mut self,
18286            decoder: &mut fidl::encoding::Decoder<'_, D>,
18287            offset: usize,
18288            mut depth: fidl::encoding::Depth,
18289        ) -> fidl::Result<()> {
18290            decoder.debug_check_bounds::<Self>(offset);
18291            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18292                None => return Err(fidl::Error::NotNullable),
18293                Some(len) => len,
18294            };
18295            // Calling decoder.out_of_line_offset(0) is not allowed.
18296            if len == 0 {
18297                return Ok(());
18298            };
18299            depth.increment()?;
18300            let envelope_size = 8;
18301            let bytes_len = len * envelope_size;
18302            let offset = decoder.out_of_line_offset(bytes_len)?;
18303            // Decode the envelope for each type.
18304            let mut _next_ordinal_to_read = 0;
18305            let mut next_offset = offset;
18306            let end_offset = offset + bytes_len;
18307
18308            // Decode the remaining unknown envelopes.
18309            while next_offset < end_offset {
18310                _next_ordinal_to_read += 1;
18311                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18312                next_offset += envelope_size;
18313            }
18314
18315            Ok(())
18316        }
18317    }
18318
18319    impl TcpInfo {
18320        #[inline(always)]
18321        fn max_ordinal_present(&self) -> u64 {
18322            if let Some(_) = self.reorder_seen {
18323                return 54;
18324            }
18325            if let Some(_) = self.snd_cwnd {
18326                return 29;
18327            }
18328            if let Some(_) = self.snd_ssthresh {
18329                return 28;
18330            }
18331            if let Some(_) = self.rtt_var_usec {
18332                return 27;
18333            }
18334            if let Some(_) = self.rtt_usec {
18335                return 26;
18336            }
18337            if let Some(_) = self.rto_usec {
18338                return 11;
18339            }
18340            if let Some(_) = self.ca_state {
18341                return 2;
18342            }
18343            if let Some(_) = self.state {
18344                return 1;
18345            }
18346            0
18347        }
18348    }
18349
18350    impl fidl::encoding::ValueTypeMarker for TcpInfo {
18351        type Borrowed<'a> = &'a Self;
18352        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18353            value
18354        }
18355    }
18356
18357    unsafe impl fidl::encoding::TypeMarker for TcpInfo {
18358        type Owned = Self;
18359
18360        #[inline(always)]
18361        fn inline_align(_context: fidl::encoding::Context) -> usize {
18362            8
18363        }
18364
18365        #[inline(always)]
18366        fn inline_size(_context: fidl::encoding::Context) -> usize {
18367            16
18368        }
18369    }
18370
18371    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TcpInfo, D> for &TcpInfo {
18372        unsafe fn encode(
18373            self,
18374            encoder: &mut fidl::encoding::Encoder<'_, D>,
18375            offset: usize,
18376            mut depth: fidl::encoding::Depth,
18377        ) -> fidl::Result<()> {
18378            encoder.debug_check_bounds::<TcpInfo>(offset);
18379            // Vector header
18380            let max_ordinal: u64 = self.max_ordinal_present();
18381            encoder.write_num(max_ordinal, offset);
18382            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18383            // Calling encoder.out_of_line_offset(0) is not allowed.
18384            if max_ordinal == 0 {
18385                return Ok(());
18386            }
18387            depth.increment()?;
18388            let envelope_size = 8;
18389            let bytes_len = max_ordinal as usize * envelope_size;
18390            #[allow(unused_variables)]
18391            let offset = encoder.out_of_line_offset(bytes_len);
18392            let mut _prev_end_offset: usize = 0;
18393            if 1 > max_ordinal {
18394                return Ok(());
18395            }
18396
18397            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18398            // are envelope_size bytes.
18399            let cur_offset: usize = (1 - 1) * envelope_size;
18400
18401            // Zero reserved fields.
18402            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18403
18404            // Safety:
18405            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18406            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18407            //   envelope_size bytes, there is always sufficient room.
18408            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net_tcp__common::State, D>(
18409            self.state.as_ref().map(<fidl_fuchsia_net_tcp__common::State as fidl::encoding::ValueTypeMarker>::borrow),
18410            encoder, offset + cur_offset, depth
18411        )?;
18412
18413            _prev_end_offset = cur_offset + envelope_size;
18414            if 2 > max_ordinal {
18415                return Ok(());
18416            }
18417
18418            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18419            // are envelope_size bytes.
18420            let cur_offset: usize = (2 - 1) * envelope_size;
18421
18422            // Zero reserved fields.
18423            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18424
18425            // Safety:
18426            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18427            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18428            //   envelope_size bytes, there is always sufficient room.
18429            fidl::encoding::encode_in_envelope_optional::<TcpCongestionControlState, D>(
18430                self.ca_state
18431                    .as_ref()
18432                    .map(<TcpCongestionControlState as fidl::encoding::ValueTypeMarker>::borrow),
18433                encoder,
18434                offset + cur_offset,
18435                depth,
18436            )?;
18437
18438            _prev_end_offset = cur_offset + envelope_size;
18439            if 11 > max_ordinal {
18440                return Ok(());
18441            }
18442
18443            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18444            // are envelope_size bytes.
18445            let cur_offset: usize = (11 - 1) * envelope_size;
18446
18447            // Zero reserved fields.
18448            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18449
18450            // Safety:
18451            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18452            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18453            //   envelope_size bytes, there is always sufficient room.
18454            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18455                self.rto_usec.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18456                encoder,
18457                offset + cur_offset,
18458                depth,
18459            )?;
18460
18461            _prev_end_offset = cur_offset + envelope_size;
18462            if 26 > max_ordinal {
18463                return Ok(());
18464            }
18465
18466            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18467            // are envelope_size bytes.
18468            let cur_offset: usize = (26 - 1) * envelope_size;
18469
18470            // Zero reserved fields.
18471            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18472
18473            // Safety:
18474            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18475            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18476            //   envelope_size bytes, there is always sufficient room.
18477            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18478                self.rtt_usec.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18479                encoder,
18480                offset + cur_offset,
18481                depth,
18482            )?;
18483
18484            _prev_end_offset = cur_offset + envelope_size;
18485            if 27 > max_ordinal {
18486                return Ok(());
18487            }
18488
18489            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18490            // are envelope_size bytes.
18491            let cur_offset: usize = (27 - 1) * envelope_size;
18492
18493            // Zero reserved fields.
18494            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18495
18496            // Safety:
18497            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18498            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18499            //   envelope_size bytes, there is always sufficient room.
18500            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18501                self.rtt_var_usec.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18502                encoder,
18503                offset + cur_offset,
18504                depth,
18505            )?;
18506
18507            _prev_end_offset = cur_offset + envelope_size;
18508            if 28 > max_ordinal {
18509                return Ok(());
18510            }
18511
18512            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18513            // are envelope_size bytes.
18514            let cur_offset: usize = (28 - 1) * envelope_size;
18515
18516            // Zero reserved fields.
18517            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18518
18519            // Safety:
18520            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18521            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18522            //   envelope_size bytes, there is always sufficient room.
18523            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18524                self.snd_ssthresh.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18525                encoder,
18526                offset + cur_offset,
18527                depth,
18528            )?;
18529
18530            _prev_end_offset = cur_offset + envelope_size;
18531            if 29 > max_ordinal {
18532                return Ok(());
18533            }
18534
18535            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18536            // are envelope_size bytes.
18537            let cur_offset: usize = (29 - 1) * envelope_size;
18538
18539            // Zero reserved fields.
18540            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18541
18542            // Safety:
18543            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18544            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18545            //   envelope_size bytes, there is always sufficient room.
18546            fidl::encoding::encode_in_envelope_optional::<u32, D>(
18547                self.snd_cwnd.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18548                encoder,
18549                offset + cur_offset,
18550                depth,
18551            )?;
18552
18553            _prev_end_offset = cur_offset + envelope_size;
18554            if 54 > max_ordinal {
18555                return Ok(());
18556            }
18557
18558            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18559            // are envelope_size bytes.
18560            let cur_offset: usize = (54 - 1) * envelope_size;
18561
18562            // Zero reserved fields.
18563            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18564
18565            // Safety:
18566            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18567            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18568            //   envelope_size bytes, there is always sufficient room.
18569            fidl::encoding::encode_in_envelope_optional::<bool, D>(
18570                self.reorder_seen.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
18571                encoder,
18572                offset + cur_offset,
18573                depth,
18574            )?;
18575
18576            _prev_end_offset = cur_offset + envelope_size;
18577
18578            Ok(())
18579        }
18580    }
18581
18582    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TcpInfo {
18583        #[inline(always)]
18584        fn new_empty() -> Self {
18585            Self::default()
18586        }
18587
18588        unsafe fn decode(
18589            &mut self,
18590            decoder: &mut fidl::encoding::Decoder<'_, D>,
18591            offset: usize,
18592            mut depth: fidl::encoding::Depth,
18593        ) -> fidl::Result<()> {
18594            decoder.debug_check_bounds::<Self>(offset);
18595            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18596                None => return Err(fidl::Error::NotNullable),
18597                Some(len) => len,
18598            };
18599            // Calling decoder.out_of_line_offset(0) is not allowed.
18600            if len == 0 {
18601                return Ok(());
18602            };
18603            depth.increment()?;
18604            let envelope_size = 8;
18605            let bytes_len = len * envelope_size;
18606            let offset = decoder.out_of_line_offset(bytes_len)?;
18607            // Decode the envelope for each type.
18608            let mut _next_ordinal_to_read = 0;
18609            let mut next_offset = offset;
18610            let end_offset = offset + bytes_len;
18611            _next_ordinal_to_read += 1;
18612            if next_offset >= end_offset {
18613                return Ok(());
18614            }
18615
18616            // Decode unknown envelopes for gaps in ordinals.
18617            while _next_ordinal_to_read < 1 {
18618                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18619                _next_ordinal_to_read += 1;
18620                next_offset += envelope_size;
18621            }
18622
18623            let next_out_of_line = decoder.next_out_of_line();
18624            let handles_before = decoder.remaining_handles();
18625            if let Some((inlined, num_bytes, num_handles)) =
18626                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18627            {
18628                let member_inline_size = <fidl_fuchsia_net_tcp__common::State as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18629                if inlined != (member_inline_size <= 4) {
18630                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18631                }
18632                let inner_offset;
18633                let mut inner_depth = depth.clone();
18634                if inlined {
18635                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18636                    inner_offset = next_offset;
18637                } else {
18638                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18639                    inner_depth.increment()?;
18640                }
18641                let val_ref = self.state.get_or_insert_with(|| {
18642                    fidl::new_empty!(fidl_fuchsia_net_tcp__common::State, D)
18643                });
18644                fidl::decode!(
18645                    fidl_fuchsia_net_tcp__common::State,
18646                    D,
18647                    val_ref,
18648                    decoder,
18649                    inner_offset,
18650                    inner_depth
18651                )?;
18652                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18653                {
18654                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18655                }
18656                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18657                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18658                }
18659            }
18660
18661            next_offset += envelope_size;
18662            _next_ordinal_to_read += 1;
18663            if next_offset >= end_offset {
18664                return Ok(());
18665            }
18666
18667            // Decode unknown envelopes for gaps in ordinals.
18668            while _next_ordinal_to_read < 2 {
18669                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18670                _next_ordinal_to_read += 1;
18671                next_offset += envelope_size;
18672            }
18673
18674            let next_out_of_line = decoder.next_out_of_line();
18675            let handles_before = decoder.remaining_handles();
18676            if let Some((inlined, num_bytes, num_handles)) =
18677                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18678            {
18679                let member_inline_size =
18680                    <TcpCongestionControlState as fidl::encoding::TypeMarker>::inline_size(
18681                        decoder.context,
18682                    );
18683                if inlined != (member_inline_size <= 4) {
18684                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18685                }
18686                let inner_offset;
18687                let mut inner_depth = depth.clone();
18688                if inlined {
18689                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18690                    inner_offset = next_offset;
18691                } else {
18692                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18693                    inner_depth.increment()?;
18694                }
18695                let val_ref = self
18696                    .ca_state
18697                    .get_or_insert_with(|| fidl::new_empty!(TcpCongestionControlState, D));
18698                fidl::decode!(
18699                    TcpCongestionControlState,
18700                    D,
18701                    val_ref,
18702                    decoder,
18703                    inner_offset,
18704                    inner_depth
18705                )?;
18706                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18707                {
18708                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18709                }
18710                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18711                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18712                }
18713            }
18714
18715            next_offset += envelope_size;
18716            _next_ordinal_to_read += 1;
18717            if next_offset >= end_offset {
18718                return Ok(());
18719            }
18720
18721            // Decode unknown envelopes for gaps in ordinals.
18722            while _next_ordinal_to_read < 11 {
18723                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18724                _next_ordinal_to_read += 1;
18725                next_offset += envelope_size;
18726            }
18727
18728            let next_out_of_line = decoder.next_out_of_line();
18729            let handles_before = decoder.remaining_handles();
18730            if let Some((inlined, num_bytes, num_handles)) =
18731                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18732            {
18733                let member_inline_size =
18734                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18735                if inlined != (member_inline_size <= 4) {
18736                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18737                }
18738                let inner_offset;
18739                let mut inner_depth = depth.clone();
18740                if inlined {
18741                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18742                    inner_offset = next_offset;
18743                } else {
18744                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18745                    inner_depth.increment()?;
18746                }
18747                let val_ref = self.rto_usec.get_or_insert_with(|| fidl::new_empty!(u32, D));
18748                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18749                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18750                {
18751                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18752                }
18753                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18754                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18755                }
18756            }
18757
18758            next_offset += envelope_size;
18759            _next_ordinal_to_read += 1;
18760            if next_offset >= end_offset {
18761                return Ok(());
18762            }
18763
18764            // Decode unknown envelopes for gaps in ordinals.
18765            while _next_ordinal_to_read < 26 {
18766                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18767                _next_ordinal_to_read += 1;
18768                next_offset += envelope_size;
18769            }
18770
18771            let next_out_of_line = decoder.next_out_of_line();
18772            let handles_before = decoder.remaining_handles();
18773            if let Some((inlined, num_bytes, num_handles)) =
18774                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18775            {
18776                let member_inline_size =
18777                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18778                if inlined != (member_inline_size <= 4) {
18779                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18780                }
18781                let inner_offset;
18782                let mut inner_depth = depth.clone();
18783                if inlined {
18784                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18785                    inner_offset = next_offset;
18786                } else {
18787                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18788                    inner_depth.increment()?;
18789                }
18790                let val_ref = self.rtt_usec.get_or_insert_with(|| fidl::new_empty!(u32, D));
18791                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18792                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18793                {
18794                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18795                }
18796                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18797                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18798                }
18799            }
18800
18801            next_offset += envelope_size;
18802            _next_ordinal_to_read += 1;
18803            if next_offset >= end_offset {
18804                return Ok(());
18805            }
18806
18807            // Decode unknown envelopes for gaps in ordinals.
18808            while _next_ordinal_to_read < 27 {
18809                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18810                _next_ordinal_to_read += 1;
18811                next_offset += envelope_size;
18812            }
18813
18814            let next_out_of_line = decoder.next_out_of_line();
18815            let handles_before = decoder.remaining_handles();
18816            if let Some((inlined, num_bytes, num_handles)) =
18817                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18818            {
18819                let member_inline_size =
18820                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18821                if inlined != (member_inline_size <= 4) {
18822                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18823                }
18824                let inner_offset;
18825                let mut inner_depth = depth.clone();
18826                if inlined {
18827                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18828                    inner_offset = next_offset;
18829                } else {
18830                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18831                    inner_depth.increment()?;
18832                }
18833                let val_ref = self.rtt_var_usec.get_or_insert_with(|| fidl::new_empty!(u32, D));
18834                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18835                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18836                {
18837                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18838                }
18839                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18840                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18841                }
18842            }
18843
18844            next_offset += envelope_size;
18845            _next_ordinal_to_read += 1;
18846            if next_offset >= end_offset {
18847                return Ok(());
18848            }
18849
18850            // Decode unknown envelopes for gaps in ordinals.
18851            while _next_ordinal_to_read < 28 {
18852                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18853                _next_ordinal_to_read += 1;
18854                next_offset += envelope_size;
18855            }
18856
18857            let next_out_of_line = decoder.next_out_of_line();
18858            let handles_before = decoder.remaining_handles();
18859            if let Some((inlined, num_bytes, num_handles)) =
18860                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18861            {
18862                let member_inline_size =
18863                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18864                if inlined != (member_inline_size <= 4) {
18865                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18866                }
18867                let inner_offset;
18868                let mut inner_depth = depth.clone();
18869                if inlined {
18870                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18871                    inner_offset = next_offset;
18872                } else {
18873                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18874                    inner_depth.increment()?;
18875                }
18876                let val_ref = self.snd_ssthresh.get_or_insert_with(|| fidl::new_empty!(u32, D));
18877                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18878                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18879                {
18880                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18881                }
18882                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18883                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18884                }
18885            }
18886
18887            next_offset += envelope_size;
18888            _next_ordinal_to_read += 1;
18889            if next_offset >= end_offset {
18890                return Ok(());
18891            }
18892
18893            // Decode unknown envelopes for gaps in ordinals.
18894            while _next_ordinal_to_read < 29 {
18895                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18896                _next_ordinal_to_read += 1;
18897                next_offset += envelope_size;
18898            }
18899
18900            let next_out_of_line = decoder.next_out_of_line();
18901            let handles_before = decoder.remaining_handles();
18902            if let Some((inlined, num_bytes, num_handles)) =
18903                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18904            {
18905                let member_inline_size =
18906                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18907                if inlined != (member_inline_size <= 4) {
18908                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18909                }
18910                let inner_offset;
18911                let mut inner_depth = depth.clone();
18912                if inlined {
18913                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18914                    inner_offset = next_offset;
18915                } else {
18916                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18917                    inner_depth.increment()?;
18918                }
18919                let val_ref = self.snd_cwnd.get_or_insert_with(|| fidl::new_empty!(u32, D));
18920                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18921                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18922                {
18923                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18924                }
18925                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18926                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18927                }
18928            }
18929
18930            next_offset += envelope_size;
18931            _next_ordinal_to_read += 1;
18932            if next_offset >= end_offset {
18933                return Ok(());
18934            }
18935
18936            // Decode unknown envelopes for gaps in ordinals.
18937            while _next_ordinal_to_read < 54 {
18938                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18939                _next_ordinal_to_read += 1;
18940                next_offset += envelope_size;
18941            }
18942
18943            let next_out_of_line = decoder.next_out_of_line();
18944            let handles_before = decoder.remaining_handles();
18945            if let Some((inlined, num_bytes, num_handles)) =
18946                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18947            {
18948                let member_inline_size =
18949                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18950                if inlined != (member_inline_size <= 4) {
18951                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18952                }
18953                let inner_offset;
18954                let mut inner_depth = depth.clone();
18955                if inlined {
18956                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18957                    inner_offset = next_offset;
18958                } else {
18959                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18960                    inner_depth.increment()?;
18961                }
18962                let val_ref = self.reorder_seen.get_or_insert_with(|| fidl::new_empty!(bool, D));
18963                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
18964                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18965                {
18966                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18967                }
18968                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18969                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18970                }
18971            }
18972
18973            next_offset += envelope_size;
18974
18975            // Decode the remaining unknown envelopes.
18976            while next_offset < end_offset {
18977                _next_ordinal_to_read += 1;
18978                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18979                next_offset += envelope_size;
18980            }
18981
18982            Ok(())
18983        }
18984    }
18985
18986    impl fidl::encoding::ValueTypeMarker for OptionalUint32 {
18987        type Borrowed<'a> = &'a Self;
18988        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18989            value
18990        }
18991    }
18992
18993    unsafe impl fidl::encoding::TypeMarker for OptionalUint32 {
18994        type Owned = Self;
18995
18996        #[inline(always)]
18997        fn inline_align(_context: fidl::encoding::Context) -> usize {
18998            8
18999        }
19000
19001        #[inline(always)]
19002        fn inline_size(_context: fidl::encoding::Context) -> usize {
19003            16
19004        }
19005    }
19006
19007    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalUint32, D>
19008        for &OptionalUint32
19009    {
19010        #[inline]
19011        unsafe fn encode(
19012            self,
19013            encoder: &mut fidl::encoding::Encoder<'_, D>,
19014            offset: usize,
19015            _depth: fidl::encoding::Depth,
19016        ) -> fidl::Result<()> {
19017            encoder.debug_check_bounds::<OptionalUint32>(offset);
19018            encoder.write_num::<u64>(self.ordinal(), offset);
19019            match self {
19020                OptionalUint32::Value(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
19021                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
19022                    encoder,
19023                    offset + 8,
19024                    _depth,
19025                ),
19026                OptionalUint32::Unset(ref val) => fidl::encoding::encode_in_envelope::<Empty, D>(
19027                    <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
19028                    encoder,
19029                    offset + 8,
19030                    _depth,
19031                ),
19032            }
19033        }
19034    }
19035
19036    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalUint32 {
19037        #[inline(always)]
19038        fn new_empty() -> Self {
19039            Self::Value(fidl::new_empty!(u32, D))
19040        }
19041
19042        #[inline]
19043        unsafe fn decode(
19044            &mut self,
19045            decoder: &mut fidl::encoding::Decoder<'_, D>,
19046            offset: usize,
19047            mut depth: fidl::encoding::Depth,
19048        ) -> fidl::Result<()> {
19049            decoder.debug_check_bounds::<Self>(offset);
19050            #[allow(unused_variables)]
19051            let next_out_of_line = decoder.next_out_of_line();
19052            let handles_before = decoder.remaining_handles();
19053            let (ordinal, inlined, num_bytes, num_handles) =
19054                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
19055
19056            let member_inline_size = match ordinal {
19057                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19058                2 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19059                _ => return Err(fidl::Error::UnknownUnionTag),
19060            };
19061
19062            if inlined != (member_inline_size <= 4) {
19063                return Err(fidl::Error::InvalidInlineBitInEnvelope);
19064            }
19065            let _inner_offset;
19066            if inlined {
19067                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
19068                _inner_offset = offset + 8;
19069            } else {
19070                depth.increment()?;
19071                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19072            }
19073            match ordinal {
19074                1 => {
19075                    #[allow(irrefutable_let_patterns)]
19076                    if let OptionalUint32::Value(_) = self {
19077                        // Do nothing, read the value into the object
19078                    } else {
19079                        // Initialize `self` to the right variant
19080                        *self = OptionalUint32::Value(fidl::new_empty!(u32, D));
19081                    }
19082                    #[allow(irrefutable_let_patterns)]
19083                    if let OptionalUint32::Value(ref mut val) = self {
19084                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
19085                    } else {
19086                        unreachable!()
19087                    }
19088                }
19089                2 => {
19090                    #[allow(irrefutable_let_patterns)]
19091                    if let OptionalUint32::Unset(_) = self {
19092                        // Do nothing, read the value into the object
19093                    } else {
19094                        // Initialize `self` to the right variant
19095                        *self = OptionalUint32::Unset(fidl::new_empty!(Empty, D));
19096                    }
19097                    #[allow(irrefutable_let_patterns)]
19098                    if let OptionalUint32::Unset(ref mut val) = self {
19099                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
19100                    } else {
19101                        unreachable!()
19102                    }
19103                }
19104                ordinal => panic!("unexpected ordinal {:?}", ordinal),
19105            }
19106            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
19107                return Err(fidl::Error::InvalidNumBytesInEnvelope);
19108            }
19109            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19110                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19111            }
19112            Ok(())
19113        }
19114    }
19115
19116    impl fidl::encoding::ValueTypeMarker for OptionalUint8 {
19117        type Borrowed<'a> = &'a Self;
19118        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19119            value
19120        }
19121    }
19122
19123    unsafe impl fidl::encoding::TypeMarker for OptionalUint8 {
19124        type Owned = Self;
19125
19126        #[inline(always)]
19127        fn inline_align(_context: fidl::encoding::Context) -> usize {
19128            8
19129        }
19130
19131        #[inline(always)]
19132        fn inline_size(_context: fidl::encoding::Context) -> usize {
19133            16
19134        }
19135    }
19136
19137    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalUint8, D>
19138        for &OptionalUint8
19139    {
19140        #[inline]
19141        unsafe fn encode(
19142            self,
19143            encoder: &mut fidl::encoding::Encoder<'_, D>,
19144            offset: usize,
19145            _depth: fidl::encoding::Depth,
19146        ) -> fidl::Result<()> {
19147            encoder.debug_check_bounds::<OptionalUint8>(offset);
19148            encoder.write_num::<u64>(self.ordinal(), offset);
19149            match self {
19150                OptionalUint8::Value(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
19151                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
19152                    encoder,
19153                    offset + 8,
19154                    _depth,
19155                ),
19156                OptionalUint8::Unset(ref val) => fidl::encoding::encode_in_envelope::<Empty, D>(
19157                    <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
19158                    encoder,
19159                    offset + 8,
19160                    _depth,
19161                ),
19162            }
19163        }
19164    }
19165
19166    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalUint8 {
19167        #[inline(always)]
19168        fn new_empty() -> Self {
19169            Self::Value(fidl::new_empty!(u8, D))
19170        }
19171
19172        #[inline]
19173        unsafe fn decode(
19174            &mut self,
19175            decoder: &mut fidl::encoding::Decoder<'_, D>,
19176            offset: usize,
19177            mut depth: fidl::encoding::Depth,
19178        ) -> fidl::Result<()> {
19179            decoder.debug_check_bounds::<Self>(offset);
19180            #[allow(unused_variables)]
19181            let next_out_of_line = decoder.next_out_of_line();
19182            let handles_before = decoder.remaining_handles();
19183            let (ordinal, inlined, num_bytes, num_handles) =
19184                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
19185
19186            let member_inline_size = match ordinal {
19187                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19188                2 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19189                _ => return Err(fidl::Error::UnknownUnionTag),
19190            };
19191
19192            if inlined != (member_inline_size <= 4) {
19193                return Err(fidl::Error::InvalidInlineBitInEnvelope);
19194            }
19195            let _inner_offset;
19196            if inlined {
19197                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
19198                _inner_offset = offset + 8;
19199            } else {
19200                depth.increment()?;
19201                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19202            }
19203            match ordinal {
19204                1 => {
19205                    #[allow(irrefutable_let_patterns)]
19206                    if let OptionalUint8::Value(_) = self {
19207                        // Do nothing, read the value into the object
19208                    } else {
19209                        // Initialize `self` to the right variant
19210                        *self = OptionalUint8::Value(fidl::new_empty!(u8, D));
19211                    }
19212                    #[allow(irrefutable_let_patterns)]
19213                    if let OptionalUint8::Value(ref mut val) = self {
19214                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
19215                    } else {
19216                        unreachable!()
19217                    }
19218                }
19219                2 => {
19220                    #[allow(irrefutable_let_patterns)]
19221                    if let OptionalUint8::Unset(_) = self {
19222                        // Do nothing, read the value into the object
19223                    } else {
19224                        // Initialize `self` to the right variant
19225                        *self = OptionalUint8::Unset(fidl::new_empty!(Empty, D));
19226                    }
19227                    #[allow(irrefutable_let_patterns)]
19228                    if let OptionalUint8::Unset(ref mut val) = self {
19229                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
19230                    } else {
19231                        unreachable!()
19232                    }
19233                }
19234                ordinal => panic!("unexpected ordinal {:?}", ordinal),
19235            }
19236            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
19237                return Err(fidl::Error::InvalidNumBytesInEnvelope);
19238            }
19239            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19240                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19241            }
19242            Ok(())
19243        }
19244    }
19245}