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
11/// TCP congestion control state machine state.
12pub type TcpCongestionControlState = fidl_fuchsia_net_tcp__common::CongestionControlState;
13
14/// TCP protocol state.
15pub type TcpInfo = fidl_fuchsia_net_tcp__common::Info;
16
17/// TCP state machine state.
18pub type TcpState = fidl_fuchsia_net_tcp__common::State;
19
20/// Legacy protocol name. Use the generated discoverable protocol name instead.
21pub const DATAGRAM_SOCKET_PROTOCOL_NAME: &str = "fuchsia.posix.socket/DatagramSocket";
22
23/// Constant bounding the number of eventpairs returned by Netstack to clients
24/// of the fast protocol.
25///
26/// Set equal to `ZX_WAIT_MANY_MAXIMUM_ITEMS` - 1, where `ZX_WAIT_MANY_MAXIMUM_ITEMS`
27/// is defined in `//zircon/system/public/zircon/types.h` and bounds the number of eventpairs
28/// in a single call to `zx_object_wait_many`. The bias leaves room to allow clients to wait
29/// for errors on the zircon socket in the same call.
30pub const FAST_UDP_WAIT_MANY_MAXIMUM_ITEMS: u32 = 63;
31
32pub const SIGNAL_DATAGRAM_ERROR: u32 = USER_SIGNAL_2 as u32;
33
34pub const SIGNAL_DATAGRAM_INCOMING: u32 = USER_SIGNAL_0 as u32;
35
36pub const SIGNAL_DATAGRAM_OUTGOING: u32 = USER_SIGNAL_1 as u32;
37
38pub const SIGNAL_DATAGRAM_SHUTDOWN_READ: u32 = USER_SIGNAL_4 as u32;
39
40pub const SIGNAL_DATAGRAM_SHUTDOWN_WRITE: u32 = USER_SIGNAL_5 as u32;
41
42pub const SIGNAL_STREAM_CONNECTED: u32 = USER_SIGNAL_3 as u32;
43
44pub const SIGNAL_STREAM_INCOMING: u32 = USER_SIGNAL_0 as u32;
45
46/// Legacy protocol name. Use the generated discoverable protocol name instead.
47pub const STREAM_SOCKET_PROTOCOL_NAME: &str = "fuchsia.posix.socket/StreamSocket";
48
49/// Legacy protocol name. Use the generated discoverable protocol name instead.
50pub const SYNCHRONOUS_DATAGRAM_SOCKET_PROTOCOL_NAME: &str =
51    "fuchsia.posix.socket/SynchronousDatagramSocket";
52
53pub const USER_SIGNAL_0: u32 = 16777216;
54
55pub const USER_SIGNAL_1: u32 = 33554432;
56
57pub const USER_SIGNAL_2: u32 = 67108864;
58
59pub const USER_SIGNAL_3: u32 = 134217728;
60
61pub const USER_SIGNAL_4: u32 = 268435456;
62
63pub const USER_SIGNAL_5: u32 = 536870912;
64
65bitflags! {
66    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
67    pub struct CmsgRequests: u32 {
68        /// Identifies whether the `IP_RECVTOS` control message is requested.
69        const IP_TOS = 1;
70        /// Identifies whether the `IP_RECVTTL` control message is requested.
71        const IP_TTL = 2;
72        /// Identifies whether the `IPV6_RECVTCLASS` control message is requested.
73        const IPV6_TCLASS = 4;
74        /// Identifies whether the `IPV6_RECVHOPLIMIT` control message is requested.
75        const IPV6_HOPLIMIT = 8;
76        /// Identifies whether the `IPV6_RECVPKTINFO` control message is requested.
77        const IPV6_PKTINFO = 16;
78        /// Identifies whether the `IP_RECVORIGDSTADDR` control message is requested.
79        const IP_RECVORIGDSTADDR = 32;
80    }
81}
82
83impl CmsgRequests {
84    #[inline(always)]
85    pub fn from_bits_allow_unknown(bits: u32) -> Self {
86        Self::from_bits_retain(bits)
87    }
88
89    #[inline(always)]
90    pub fn has_unknown_bits(&self) -> bool {
91        self.get_unknown_bits() != 0
92    }
93
94    #[inline(always)]
95    pub fn get_unknown_bits(&self) -> u32 {
96        self.bits() & !Self::all().bits()
97    }
98}
99
100bitflags! {
101    /// Bits representing the interface flags as returned by the SIOCGIFFLAGS ioctl
102    /// operation. These bitmasks are intended to track the C API definition. For
103    /// example, `InterfaceFlags.UP` corresponds to `IFF_UP`, etc.
104    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
105    pub struct InterfaceFlags: u16 {
106        const UP = 1;
107        const BROADCAST = 2;
108        const DEBUG = 4;
109        const LOOPBACK = 8;
110        const POINTTOPOINT = 16;
111        const NOTRAILERS = 32;
112        const RUNNING = 64;
113        const NOARP = 128;
114        const PROMISC = 256;
115        const ALLMULTI = 512;
116        const LEADER = 1024;
117        const FOLLOWER = 2048;
118        const MULTICAST = 4096;
119        const PORTSEL = 8192;
120        const AUTOMEDIA = 16384;
121        const DYNAMIC = 32768;
122    }
123}
124
125impl InterfaceFlags {}
126
127bitflags! {
128    /// Flags controlling RecvMsg behavior.
129    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
130    pub struct RecvMsgFlags: u16 {
131        /// Returns data from the receive queue without removing from it.
132        ///
133        /// Equivalent to `MSG_PEEK`.
134        const PEEK = 2;
135    }
136}
137
138impl RecvMsgFlags {}
139
140bitflags! {
141    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
142    pub struct SendMsgFlags: u16 {
143        const RESERVED = 32768;
144    }
145}
146
147impl SendMsgFlags {}
148
149bitflags! {
150    /// Socket shutdown mode.
151    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
152    pub struct ShutdownMode: u16 {
153        /// Shutdown socket read endpoint.
154        const READ = 1;
155        /// Shutdown socket write endpoint.
156        const WRITE = 2;
157    }
158}
159
160impl ShutdownMode {}
161
162/// Protocols supported by [`fuchsia.posix.socket/DatagramSocket`].
163///
164/// `DatagramSocketProtocol` enumerates the protocols supported by the network
165/// stack over datagram sockets.
166#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
167#[repr(u32)]
168pub enum DatagramSocketProtocol {
169    /// UDP (User Datagram Protocol).
170    ///
171    /// A UDP socket is equivalent to the POSIX API of `SOCK_DGRAM` with a
172    /// protocol of 0 or `IPPROTO_UDP`.
173    Udp = 1,
174    /// ICMP (Internet Control Message Protocol) echo.
175    ///
176    /// An ICMP echo socket is equivalent to the POSIX API of `SOCK_DGRAM` with
177    /// a protocol of `IPPROTO_ICMP` `IPPROTO_ICMPV6` (depending on provided
178    /// domain).
179    ///
180    /// Datagrams sent over an ICMP echo socket *must* have a valid ICMP or
181    /// ICMPv6 echo header.
182    IcmpEcho = 2,
183}
184
185impl DatagramSocketProtocol {
186    #[inline]
187    pub fn from_primitive(prim: u32) -> Option<Self> {
188        match prim {
189            1 => Some(Self::Udp),
190            2 => Some(Self::IcmpEcho),
191            _ => None,
192        }
193    }
194
195    #[inline]
196    pub const fn into_primitive(self) -> u32 {
197        self as u32
198    }
199}
200
201/// A socket's domain.
202///
203/// Determines the addressing domain for a socket.
204#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
205#[repr(i16)]
206pub enum Domain {
207    /// An IPv4 socket. Equivalent to `AF_INET`.
208    Ipv4 = 0,
209    /// An IPv6 socket. Equivalent to `AF_INET6`.
210    Ipv6 = 1,
211}
212
213impl Domain {
214    #[inline]
215    pub fn from_primitive(prim: i16) -> Option<Self> {
216        match prim {
217            0 => Some(Self::Ipv4),
218            1 => Some(Self::Ipv6),
219            _ => None,
220        }
221    }
222
223    #[inline]
224    pub const fn into_primitive(self) -> i16 {
225        self as i16
226    }
227}
228
229/// Protocols supported by [`fuchsia.posix.socket/StreamSocket`].
230///
231/// `StreamSocketProtocol` enumerates the protocols supported by the network
232/// stack over stream sockets.
233#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
234#[repr(u32)]
235pub enum StreamSocketProtocol {
236    /// TCP (Transmission Control Protocol).
237    ///
238    /// A TCP socket is equivalent to the POSIX API of `SOCK_STREAM` with a
239    /// protocol of 0 or `IPPROTO_TCP`.
240    Tcp = 0,
241}
242
243impl StreamSocketProtocol {
244    #[inline]
245    pub fn from_primitive(prim: u32) -> Option<Self> {
246        match prim {
247            0 => Some(Self::Tcp),
248            _ => None,
249        }
250    }
251
252    #[inline]
253    pub const fn into_primitive(self) -> u32 {
254        self as u32
255    }
256}
257
258/// TCP congestion control modes.
259#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
260#[repr(u32)]
261pub enum TcpCongestionControl {
262    Reno = 1,
263    Cubic = 2,
264}
265
266impl TcpCongestionControl {
267    #[inline]
268    pub fn from_primitive(prim: u32) -> Option<Self> {
269        match prim {
270            1 => Some(Self::Reno),
271            2 => Some(Self::Cubic),
272            _ => None,
273        }
274    }
275
276    #[inline]
277    pub const fn into_primitive(self) -> u32 {
278        self as u32
279    }
280}
281
282/// Packet timestamp reporting precision options.
283#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
284#[repr(u32)]
285pub enum TimestampOption {
286    /// Do not report timestamp.
287    Disabled = 0,
288    /// Report timestamp with nanosecond precision.
289    Nanosecond = 1,
290    /// Report timestamp with microsecond precision.
291    Microsecond = 2,
292}
293
294impl TimestampOption {
295    #[inline]
296    pub fn from_primitive(prim: u32) -> Option<Self> {
297        match prim {
298            0 => Some(Self::Disabled),
299            1 => Some(Self::Nanosecond),
300            2 => Some(Self::Microsecond),
301            _ => None,
302        }
303    }
304
305    #[inline]
306    pub const fn into_primitive(self) -> u32 {
307        self as u32
308    }
309}
310
311#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
312pub enum UdpMetadataEncodingProtocolVersion {
313    Zero,
314    #[doc(hidden)]
315    __SourceBreaking {
316        unknown_ordinal: u16,
317    },
318}
319
320/// Pattern that matches an unknown `UdpMetadataEncodingProtocolVersion` member.
321#[macro_export]
322macro_rules! UdpMetadataEncodingProtocolVersionUnknown {
323    () => {
324        _
325    };
326}
327
328impl UdpMetadataEncodingProtocolVersion {
329    #[inline]
330    pub fn from_primitive(prim: u16) -> Option<Self> {
331        match prim {
332            0 => Some(Self::Zero),
333            _ => None,
334        }
335    }
336
337    #[inline]
338    pub fn from_primitive_allow_unknown(prim: u16) -> Self {
339        match prim {
340            0 => Self::Zero,
341            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
342        }
343    }
344
345    #[inline]
346    pub fn unknown() -> Self {
347        Self::__SourceBreaking { unknown_ordinal: 0xffff }
348    }
349
350    #[inline]
351    pub const fn into_primitive(self) -> u16 {
352        match self {
353            Self::Zero => 0,
354            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
355        }
356    }
357
358    #[inline]
359    pub fn is_unknown(&self) -> bool {
360        match self {
361            Self::__SourceBreaking { unknown_ordinal: _ } => true,
362            _ => false,
363        }
364    }
365}
366
367#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
368pub struct BaseDatagramSocketGetInfoResponse {
369    pub domain: Domain,
370    pub proto: DatagramSocketProtocol,
371}
372
373impl fidl::Persistable for BaseDatagramSocketGetInfoResponse {}
374
375#[derive(Clone, Debug, PartialEq)]
376pub struct BaseNetworkSocketAddIpMembershipRequest {
377    pub membership: IpMulticastMembership,
378}
379
380impl fidl::Persistable for BaseNetworkSocketAddIpMembershipRequest {}
381
382#[derive(Clone, Debug, PartialEq)]
383pub struct BaseNetworkSocketAddIpv6MembershipRequest {
384    pub membership: Ipv6MulticastMembership,
385}
386
387impl fidl::Persistable for BaseNetworkSocketAddIpv6MembershipRequest {}
388
389#[derive(Clone, Debug, PartialEq)]
390pub struct BaseNetworkSocketBindRequest {
391    pub addr: fidl_fuchsia_net__common::SocketAddress,
392}
393
394impl fidl::Persistable for BaseNetworkSocketBindRequest {}
395
396#[derive(Clone, Debug, PartialEq)]
397pub struct BaseNetworkSocketConnectRequest {
398    pub addr: fidl_fuchsia_net__common::SocketAddress,
399}
400
401impl fidl::Persistable for BaseNetworkSocketConnectRequest {}
402
403#[derive(Clone, Debug, PartialEq)]
404pub struct BaseNetworkSocketDropIpMembershipRequest {
405    pub membership: IpMulticastMembership,
406}
407
408impl fidl::Persistable for BaseNetworkSocketDropIpMembershipRequest {}
409
410#[derive(Clone, Debug, PartialEq)]
411pub struct BaseNetworkSocketDropIpv6MembershipRequest {
412    pub membership: Ipv6MulticastMembership,
413}
414
415impl fidl::Persistable for BaseNetworkSocketDropIpv6MembershipRequest {}
416
417#[derive(Clone, Debug, PartialEq)]
418pub struct BaseNetworkSocketSetIpMulticastInterfaceRequest {
419    pub iface: u64,
420    pub address: fidl_fuchsia_net__common::Ipv4Address,
421}
422
423impl fidl::Persistable for BaseNetworkSocketSetIpMulticastInterfaceRequest {}
424
425#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
426pub struct BaseNetworkSocketSetIpMulticastLoopbackRequest {
427    pub value: bool,
428}
429
430impl fidl::Persistable for BaseNetworkSocketSetIpMulticastLoopbackRequest {}
431
432#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
433pub struct BaseNetworkSocketSetIpMulticastTtlRequest {
434    pub value: OptionalUint8,
435}
436
437impl fidl::Persistable for BaseNetworkSocketSetIpMulticastTtlRequest {}
438
439#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
440pub struct BaseNetworkSocketSetIpPacketInfoRequest {
441    pub value: bool,
442}
443
444impl fidl::Persistable for BaseNetworkSocketSetIpPacketInfoRequest {}
445
446#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
447pub struct BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest {
448    pub value: bool,
449}
450
451impl fidl::Persistable for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest {}
452
453#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
454pub struct BaseNetworkSocketSetIpReceiveTtlRequest {
455    pub value: bool,
456}
457
458impl fidl::Persistable for BaseNetworkSocketSetIpReceiveTtlRequest {}
459
460#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
461pub struct BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
462    pub value: bool,
463}
464
465impl fidl::Persistable for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {}
466
467#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
468pub struct BaseNetworkSocketSetIpTransparentRequest {
469    pub value: bool,
470}
471
472impl fidl::Persistable for BaseNetworkSocketSetIpTransparentRequest {}
473
474#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
475pub struct BaseNetworkSocketSetIpTtlRequest {
476    pub value: OptionalUint8,
477}
478
479impl fidl::Persistable for BaseNetworkSocketSetIpTtlRequest {}
480
481#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
482#[repr(C)]
483pub struct BaseNetworkSocketSetIpTypeOfServiceRequest {
484    pub value: u8,
485}
486
487impl fidl::Persistable for BaseNetworkSocketSetIpTypeOfServiceRequest {}
488
489#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
490pub struct BaseNetworkSocketSetIpv6MulticastHopsRequest {
491    pub value: OptionalUint8,
492}
493
494impl fidl::Persistable for BaseNetworkSocketSetIpv6MulticastHopsRequest {}
495
496#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
497#[repr(C)]
498pub struct BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
499    pub value: u64,
500}
501
502impl fidl::Persistable for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {}
503
504#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
505pub struct BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
506    pub value: bool,
507}
508
509impl fidl::Persistable for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {}
510
511#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
512pub struct BaseNetworkSocketSetIpv6OnlyRequest {
513    pub value: bool,
514}
515
516impl fidl::Persistable for BaseNetworkSocketSetIpv6OnlyRequest {}
517
518#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
519pub struct BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
520    pub value: bool,
521}
522
523impl fidl::Persistable for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {}
524
525#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
526pub struct BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
527    pub value: bool,
528}
529
530impl fidl::Persistable for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {}
531
532#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
533pub struct BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
534    pub value: bool,
535}
536
537impl fidl::Persistable for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {}
538
539#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
540pub struct BaseNetworkSocketSetIpv6TrafficClassRequest {
541    pub value: OptionalUint8,
542}
543
544impl fidl::Persistable for BaseNetworkSocketSetIpv6TrafficClassRequest {}
545
546#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
547pub struct BaseNetworkSocketSetIpv6UnicastHopsRequest {
548    pub value: OptionalUint8,
549}
550
551impl fidl::Persistable for BaseNetworkSocketSetIpv6UnicastHopsRequest {}
552
553#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
554pub struct BaseNetworkSocketShutdownRequest {
555    pub mode: ShutdownMode,
556}
557
558impl fidl::Persistable for BaseNetworkSocketShutdownRequest {}
559
560#[derive(Clone, Debug, PartialEq)]
561pub struct BaseNetworkSocketGetIpMulticastInterfaceResponse {
562    pub value: fidl_fuchsia_net__common::Ipv4Address,
563}
564
565impl fidl::Persistable for BaseNetworkSocketGetIpMulticastInterfaceResponse {}
566
567#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
568pub struct BaseNetworkSocketGetIpMulticastLoopbackResponse {
569    pub value: bool,
570}
571
572impl fidl::Persistable for BaseNetworkSocketGetIpMulticastLoopbackResponse {}
573
574#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
575#[repr(C)]
576pub struct BaseNetworkSocketGetIpMulticastTtlResponse {
577    pub value: u8,
578}
579
580impl fidl::Persistable for BaseNetworkSocketGetIpMulticastTtlResponse {}
581
582#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
583pub struct BaseNetworkSocketGetIpPacketInfoResponse {
584    pub value: bool,
585}
586
587impl fidl::Persistable for BaseNetworkSocketGetIpPacketInfoResponse {}
588
589#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
590pub struct BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse {
591    pub value: bool,
592}
593
594impl fidl::Persistable for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse {}
595
596#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
597pub struct BaseNetworkSocketGetIpReceiveTtlResponse {
598    pub value: bool,
599}
600
601impl fidl::Persistable for BaseNetworkSocketGetIpReceiveTtlResponse {}
602
603#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
604pub struct BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
605    pub value: bool,
606}
607
608impl fidl::Persistable for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {}
609
610#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
611pub struct BaseNetworkSocketGetIpTransparentResponse {
612    pub value: bool,
613}
614
615impl fidl::Persistable for BaseNetworkSocketGetIpTransparentResponse {}
616
617#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
618#[repr(C)]
619pub struct BaseNetworkSocketGetIpTtlResponse {
620    pub value: u8,
621}
622
623impl fidl::Persistable for BaseNetworkSocketGetIpTtlResponse {}
624
625#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
626#[repr(C)]
627pub struct BaseNetworkSocketGetIpTypeOfServiceResponse {
628    pub value: u8,
629}
630
631impl fidl::Persistable for BaseNetworkSocketGetIpTypeOfServiceResponse {}
632
633#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
634#[repr(C)]
635pub struct BaseNetworkSocketGetIpv6MulticastHopsResponse {
636    pub value: u8,
637}
638
639impl fidl::Persistable for BaseNetworkSocketGetIpv6MulticastHopsResponse {}
640
641#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
642#[repr(C)]
643pub struct BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
644    pub value: u64,
645}
646
647impl fidl::Persistable for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {}
648
649#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
650pub struct BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
651    pub value: bool,
652}
653
654impl fidl::Persistable for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {}
655
656#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
657pub struct BaseNetworkSocketGetIpv6OnlyResponse {
658    pub value: bool,
659}
660
661impl fidl::Persistable for BaseNetworkSocketGetIpv6OnlyResponse {}
662
663#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
664pub struct BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
665    pub value: bool,
666}
667
668impl fidl::Persistable for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {}
669
670#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
671pub struct BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
672    pub value: bool,
673}
674
675impl fidl::Persistable for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {}
676
677#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
678pub struct BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
679    pub value: bool,
680}
681
682impl fidl::Persistable for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {}
683
684#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
685#[repr(C)]
686pub struct BaseNetworkSocketGetIpv6TrafficClassResponse {
687    pub value: u8,
688}
689
690impl fidl::Persistable for BaseNetworkSocketGetIpv6TrafficClassResponse {}
691
692#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
693#[repr(C)]
694pub struct BaseNetworkSocketGetIpv6UnicastHopsResponse {
695    pub value: u8,
696}
697
698impl fidl::Persistable for BaseNetworkSocketGetIpv6UnicastHopsResponse {}
699
700#[derive(Clone, Debug, PartialEq)]
701pub struct BaseNetworkSocketGetOriginalDestinationResponse {
702    pub value: fidl_fuchsia_net__common::SocketAddress,
703}
704
705impl fidl::Persistable for BaseNetworkSocketGetOriginalDestinationResponse {}
706
707#[derive(Clone, Debug, PartialEq)]
708pub struct BaseNetworkSocketGetPeerNameResponse {
709    pub addr: fidl_fuchsia_net__common::SocketAddress,
710}
711
712impl fidl::Persistable for BaseNetworkSocketGetPeerNameResponse {}
713
714#[derive(Clone, Debug, PartialEq)]
715pub struct BaseNetworkSocketGetSockNameResponse {
716    pub addr: fidl_fuchsia_net__common::SocketAddress,
717}
718
719impl fidl::Persistable for BaseNetworkSocketGetSockNameResponse {}
720
721#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
722pub struct BaseSocketGetMarkRequest {
723    pub domain: fidl_fuchsia_net__common::MarkDomain,
724}
725
726impl fidl::Persistable for BaseSocketGetMarkRequest {}
727
728#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
729pub struct BaseSocketSetBindToDeviceRequest {
730    pub value: String,
731}
732
733impl fidl::Persistable for BaseSocketSetBindToDeviceRequest {}
734
735#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
736#[repr(C)]
737pub struct BaseSocketSetBindToInterfaceIndexRequest {
738    pub value: u64,
739}
740
741impl fidl::Persistable for BaseSocketSetBindToInterfaceIndexRequest {}
742
743#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
744pub struct BaseSocketSetBroadcastRequest {
745    pub value: bool,
746}
747
748impl fidl::Persistable for BaseSocketSetBroadcastRequest {}
749
750#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
751pub struct BaseSocketSetKeepAliveRequest {
752    pub value: bool,
753}
754
755impl fidl::Persistable for BaseSocketSetKeepAliveRequest {}
756
757#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
758pub struct BaseSocketSetLingerRequest {
759    pub linger: bool,
760    pub length_secs: u32,
761}
762
763impl fidl::Persistable for BaseSocketSetLingerRequest {}
764
765#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
766pub struct BaseSocketSetMarkRequest {
767    pub domain: fidl_fuchsia_net__common::MarkDomain,
768    pub mark: OptionalUint32,
769}
770
771impl fidl::Persistable for BaseSocketSetMarkRequest {}
772
773#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
774pub struct BaseSocketSetNoCheckRequest {
775    pub value: bool,
776}
777
778impl fidl::Persistable for BaseSocketSetNoCheckRequest {}
779
780#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
781pub struct BaseSocketSetOutOfBandInlineRequest {
782    pub value: bool,
783}
784
785impl fidl::Persistable for BaseSocketSetOutOfBandInlineRequest {}
786
787#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
788#[repr(C)]
789pub struct BaseSocketSetReceiveBufferRequest {
790    pub value_bytes: u64,
791}
792
793impl fidl::Persistable for BaseSocketSetReceiveBufferRequest {}
794
795#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
796pub struct BaseSocketSetReuseAddressRequest {
797    pub value: bool,
798}
799
800impl fidl::Persistable for BaseSocketSetReuseAddressRequest {}
801
802#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
803pub struct BaseSocketSetReusePortDeprecatedRequest {
804    pub value: bool,
805}
806
807impl fidl::Persistable for BaseSocketSetReusePortDeprecatedRequest {}
808
809#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
810#[repr(C)]
811pub struct BaseSocketSetSendBufferRequest {
812    pub value_bytes: u64,
813}
814
815impl fidl::Persistable for BaseSocketSetSendBufferRequest {}
816
817#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
818pub struct BaseSocketSetTimestampRequest {
819    pub value: TimestampOption,
820}
821
822impl fidl::Persistable for BaseSocketSetTimestampRequest {}
823
824#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
825pub struct BaseSocketGetAcceptConnResponse {
826    pub value: bool,
827}
828
829impl fidl::Persistable for BaseSocketGetAcceptConnResponse {}
830
831#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
832pub struct BaseSocketGetBindToDeviceResponse {
833    pub value: String,
834}
835
836impl fidl::Persistable for BaseSocketGetBindToDeviceResponse {}
837
838#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
839#[repr(C)]
840pub struct BaseSocketGetBindToInterfaceIndexResponse {
841    pub value: u64,
842}
843
844impl fidl::Persistable for BaseSocketGetBindToInterfaceIndexResponse {}
845
846#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
847pub struct BaseSocketGetBroadcastResponse {
848    pub value: bool,
849}
850
851impl fidl::Persistable for BaseSocketGetBroadcastResponse {}
852
853#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
854#[repr(C)]
855pub struct BaseSocketGetCookieResponse {
856    pub value: u64,
857}
858
859impl fidl::Persistable for BaseSocketGetCookieResponse {}
860
861#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
862pub struct BaseSocketGetKeepAliveResponse {
863    pub value: bool,
864}
865
866impl fidl::Persistable for BaseSocketGetKeepAliveResponse {}
867
868#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
869pub struct BaseSocketGetLingerResponse {
870    pub linger: bool,
871    pub length_secs: u32,
872}
873
874impl fidl::Persistable for BaseSocketGetLingerResponse {}
875
876#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
877pub struct BaseSocketGetMarkResponse {
878    pub mark: OptionalUint32,
879}
880
881impl fidl::Persistable for BaseSocketGetMarkResponse {}
882
883#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
884pub struct BaseSocketGetNoCheckResponse {
885    pub value: bool,
886}
887
888impl fidl::Persistable for BaseSocketGetNoCheckResponse {}
889
890#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
891pub struct BaseSocketGetOutOfBandInlineResponse {
892    pub value: bool,
893}
894
895impl fidl::Persistable for BaseSocketGetOutOfBandInlineResponse {}
896
897#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
898#[repr(C)]
899pub struct BaseSocketGetReceiveBufferResponse {
900    pub value_bytes: u64,
901}
902
903impl fidl::Persistable for BaseSocketGetReceiveBufferResponse {}
904
905#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
906pub struct BaseSocketGetReuseAddressResponse {
907    pub value: bool,
908}
909
910impl fidl::Persistable for BaseSocketGetReuseAddressResponse {}
911
912#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
913pub struct BaseSocketGetReusePortResponse {
914    pub value: bool,
915}
916
917impl fidl::Persistable for BaseSocketGetReusePortResponse {}
918
919#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
920#[repr(C)]
921pub struct BaseSocketGetSendBufferResponse {
922    pub value_bytes: u64,
923}
924
925impl fidl::Persistable for BaseSocketGetSendBufferResponse {}
926
927#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
928pub struct BaseSocketGetTimestampResponse {
929    pub value: TimestampOption,
930}
931
932impl fidl::Persistable for BaseSocketGetTimestampResponse {}
933
934#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
935pub struct Empty;
936
937impl fidl::Persistable for Empty {}
938
939/// IPv4 multicast membership options.
940#[derive(Clone, Debug, PartialEq)]
941pub struct IpMulticastMembership {
942    /// Interface index for membership.
943    pub iface: u64,
944    /// Local interface address requesting or relinquishing ownership.
945    pub local_addr: fidl_fuchsia_net__common::Ipv4Address,
946    /// Address of the multicast group the membership refers to.
947    pub mcast_addr: fidl_fuchsia_net__common::Ipv4Address,
948}
949
950impl fidl::Persistable for IpMulticastMembership {}
951
952/// IPv6 multicast membership options.
953#[derive(Clone, Debug, PartialEq)]
954pub struct Ipv6MulticastMembership {
955    /// Interface index for membership.
956    pub iface: u64,
957    /// Address of the multicast group the membership refers to.
958    pub mcast_addr: fidl_fuchsia_net__common::Ipv6Address,
959}
960
961impl fidl::Persistable for Ipv6MulticastMembership {}
962
963#[derive(Clone, Debug, PartialEq)]
964pub struct Ipv6PktInfoRecvControlData {
965    /// The index of the interface on which the IP packet was received.
966    pub iface: u64,
967    /// The destination address specified in the received packet's IP
968    /// header.
969    pub header_destination_addr: fidl_fuchsia_net__common::Ipv6Address,
970}
971
972impl fidl::Persistable for Ipv6PktInfoRecvControlData {}
973
974/// IPv6-specific disposition of sent data.
975///
976/// This is currently a struct instead of a table as it is meant to match
977/// `in6_pktinfo` which is not expected to grow.
978#[derive(Clone, Debug, PartialEq)]
979pub struct Ipv6PktInfoSendControlData {
980    /// The interface index from which the IPv6 packet should be sent.
981    ///
982    /// 0 indicates that the local interface is unspecified and the
983    /// stack may choose an appropriate interface.
984    pub iface: u64,
985    /// The source address from which the IPv6 packet should be sent.
986    ///
987    /// All zeroes indicates that the local address is unspecified and
988    /// the stack may choose an appropriate address (i.e. the local
989    /// address to which the socket is bound).
990    pub local_addr: fidl_fuchsia_net__common::Ipv6Address,
991}
992
993impl fidl::Persistable for Ipv6PktInfoSendControlData {}
994
995#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
996pub struct ProviderDatagramSocketDeprecatedRequest {
997    pub domain: Domain,
998    pub proto: DatagramSocketProtocol,
999}
1000
1001impl fidl::Persistable for ProviderDatagramSocketDeprecatedRequest {}
1002
1003#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1004pub struct ProviderDatagramSocketRequest {
1005    pub domain: Domain,
1006    pub proto: DatagramSocketProtocol,
1007}
1008
1009impl fidl::Persistable for ProviderDatagramSocketRequest {}
1010
1011#[derive(Clone, Debug, PartialEq)]
1012pub struct ProviderGetInterfaceAddressesResponse {
1013    pub interfaces: Vec<InterfaceAddresses>,
1014}
1015
1016impl fidl::Persistable for ProviderGetInterfaceAddressesResponse {}
1017
1018#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1019#[repr(C)]
1020pub struct ProviderInterfaceIndexToNameRequest {
1021    pub index: u64,
1022}
1023
1024impl fidl::Persistable for ProviderInterfaceIndexToNameRequest {}
1025
1026#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1027pub struct ProviderInterfaceNameToFlagsRequest {
1028    pub name: String,
1029}
1030
1031impl fidl::Persistable for ProviderInterfaceNameToFlagsRequest {}
1032
1033#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1034pub struct ProviderInterfaceNameToIndexRequest {
1035    pub name: String,
1036}
1037
1038impl fidl::Persistable for ProviderInterfaceNameToIndexRequest {}
1039
1040#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1041pub struct ProviderStreamSocketRequest {
1042    pub domain: Domain,
1043    pub proto: StreamSocketProtocol,
1044}
1045
1046impl fidl::Persistable for ProviderStreamSocketRequest {}
1047
1048#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1049pub struct ProviderInterfaceIndexToNameResponse {
1050    pub name: String,
1051}
1052
1053impl fidl::Persistable for ProviderInterfaceIndexToNameResponse {}
1054
1055#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1056pub struct ProviderInterfaceNameToFlagsResponse {
1057    pub flags: InterfaceFlags,
1058}
1059
1060impl fidl::Persistable for ProviderInterfaceNameToFlagsResponse {}
1061
1062#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1063#[repr(C)]
1064pub struct ProviderInterfaceNameToIndexResponse {
1065    pub index: u64,
1066}
1067
1068impl fidl::Persistable for ProviderInterfaceNameToIndexResponse {}
1069
1070#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1071pub struct StreamSocketAcceptRequest {
1072    pub want_addr: bool,
1073}
1074
1075impl fidl::Persistable for StreamSocketAcceptRequest {}
1076
1077#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1078#[repr(C)]
1079pub struct StreamSocketListenRequest {
1080    pub backlog: i16,
1081}
1082
1083impl fidl::Persistable for StreamSocketListenRequest {}
1084
1085#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1086pub struct StreamSocketSetTcpCongestionRequest {
1087    pub value: TcpCongestionControl,
1088}
1089
1090impl fidl::Persistable for StreamSocketSetTcpCongestionRequest {}
1091
1092#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1093pub struct StreamSocketSetTcpCorkRequest {
1094    pub value: bool,
1095}
1096
1097impl fidl::Persistable for StreamSocketSetTcpCorkRequest {}
1098
1099#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1100#[repr(C)]
1101pub struct StreamSocketSetTcpDeferAcceptRequest {
1102    pub value_secs: u32,
1103}
1104
1105impl fidl::Persistable for StreamSocketSetTcpDeferAcceptRequest {}
1106
1107#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1108#[repr(C)]
1109pub struct StreamSocketSetTcpKeepAliveCountRequest {
1110    pub value: u32,
1111}
1112
1113impl fidl::Persistable for StreamSocketSetTcpKeepAliveCountRequest {}
1114
1115#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1116#[repr(C)]
1117pub struct StreamSocketSetTcpKeepAliveIdleRequest {
1118    pub value_secs: u32,
1119}
1120
1121impl fidl::Persistable for StreamSocketSetTcpKeepAliveIdleRequest {}
1122
1123#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1124#[repr(C)]
1125pub struct StreamSocketSetTcpKeepAliveIntervalRequest {
1126    pub value_secs: u32,
1127}
1128
1129impl fidl::Persistable for StreamSocketSetTcpKeepAliveIntervalRequest {}
1130
1131#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1132pub struct StreamSocketSetTcpLingerRequest {
1133    pub value_secs: OptionalUint32,
1134}
1135
1136impl fidl::Persistable for StreamSocketSetTcpLingerRequest {}
1137
1138#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1139#[repr(C)]
1140pub struct StreamSocketSetTcpMaxSegmentRequest {
1141    pub value_bytes: u32,
1142}
1143
1144impl fidl::Persistable for StreamSocketSetTcpMaxSegmentRequest {}
1145
1146#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1147pub struct StreamSocketSetTcpNoDelayRequest {
1148    pub value: bool,
1149}
1150
1151impl fidl::Persistable for StreamSocketSetTcpNoDelayRequest {}
1152
1153#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1154pub struct StreamSocketSetTcpQuickAckRequest {
1155    pub value: bool,
1156}
1157
1158impl fidl::Persistable for StreamSocketSetTcpQuickAckRequest {}
1159
1160#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1161#[repr(C)]
1162pub struct StreamSocketSetTcpSynCountRequest {
1163    pub value: u32,
1164}
1165
1166impl fidl::Persistable for StreamSocketSetTcpSynCountRequest {}
1167
1168#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1169#[repr(C)]
1170pub struct StreamSocketSetTcpUserTimeoutRequest {
1171    pub value_millis: u32,
1172}
1173
1174impl fidl::Persistable for StreamSocketSetTcpUserTimeoutRequest {}
1175
1176#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1177#[repr(C)]
1178pub struct StreamSocketSetTcpWindowClampRequest {
1179    pub value: u32,
1180}
1181
1182impl fidl::Persistable for StreamSocketSetTcpWindowClampRequest {}
1183
1184#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1185pub struct StreamSocketGetInfoResponse {
1186    pub domain: Domain,
1187    pub proto: StreamSocketProtocol,
1188}
1189
1190impl fidl::Persistable for StreamSocketGetInfoResponse {}
1191
1192#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1193pub struct StreamSocketGetTcpCongestionResponse {
1194    pub value: TcpCongestionControl,
1195}
1196
1197impl fidl::Persistable for StreamSocketGetTcpCongestionResponse {}
1198
1199#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1200pub struct StreamSocketGetTcpCorkResponse {
1201    pub value: bool,
1202}
1203
1204impl fidl::Persistable for StreamSocketGetTcpCorkResponse {}
1205
1206#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1207#[repr(C)]
1208pub struct StreamSocketGetTcpDeferAcceptResponse {
1209    pub value_secs: u32,
1210}
1211
1212impl fidl::Persistable for StreamSocketGetTcpDeferAcceptResponse {}
1213
1214#[derive(Clone, Debug, PartialEq)]
1215pub struct StreamSocketGetTcpInfoResponse {
1216    pub info: fidl_fuchsia_net_tcp__common::Info,
1217}
1218
1219impl fidl::Persistable for StreamSocketGetTcpInfoResponse {}
1220
1221#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1222#[repr(C)]
1223pub struct StreamSocketGetTcpKeepAliveCountResponse {
1224    pub value: u32,
1225}
1226
1227impl fidl::Persistable for StreamSocketGetTcpKeepAliveCountResponse {}
1228
1229#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1230#[repr(C)]
1231pub struct StreamSocketGetTcpKeepAliveIdleResponse {
1232    pub value_secs: u32,
1233}
1234
1235impl fidl::Persistable for StreamSocketGetTcpKeepAliveIdleResponse {}
1236
1237#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1238#[repr(C)]
1239pub struct StreamSocketGetTcpKeepAliveIntervalResponse {
1240    pub value_secs: u32,
1241}
1242
1243impl fidl::Persistable for StreamSocketGetTcpKeepAliveIntervalResponse {}
1244
1245#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1246pub struct StreamSocketGetTcpLingerResponse {
1247    pub value_secs: OptionalUint32,
1248}
1249
1250impl fidl::Persistable for StreamSocketGetTcpLingerResponse {}
1251
1252#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1253#[repr(C)]
1254pub struct StreamSocketGetTcpMaxSegmentResponse {
1255    pub value_bytes: u32,
1256}
1257
1258impl fidl::Persistable for StreamSocketGetTcpMaxSegmentResponse {}
1259
1260#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1261pub struct StreamSocketGetTcpNoDelayResponse {
1262    pub value: bool,
1263}
1264
1265impl fidl::Persistable for StreamSocketGetTcpNoDelayResponse {}
1266
1267#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1268pub struct StreamSocketGetTcpQuickAckResponse {
1269    pub value: bool,
1270}
1271
1272impl fidl::Persistable for StreamSocketGetTcpQuickAckResponse {}
1273
1274#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1275#[repr(C)]
1276pub struct StreamSocketGetTcpSynCountResponse {
1277    pub value: u32,
1278}
1279
1280impl fidl::Persistable for StreamSocketGetTcpSynCountResponse {}
1281
1282#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1283#[repr(C)]
1284pub struct StreamSocketGetTcpUserTimeoutResponse {
1285    pub value_millis: u32,
1286}
1287
1288impl fidl::Persistable for StreamSocketGetTcpUserTimeoutResponse {}
1289
1290#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1291#[repr(C)]
1292pub struct StreamSocketGetTcpWindowClampResponse {
1293    pub value: u32,
1294}
1295
1296impl fidl::Persistable for StreamSocketGetTcpWindowClampResponse {}
1297
1298#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1299pub struct SynchronousDatagramSocketRecvMsgRequest {
1300    pub want_addr: bool,
1301    pub data_len: u32,
1302    pub want_control: bool,
1303    pub flags: RecvMsgFlags,
1304}
1305
1306impl fidl::Persistable for SynchronousDatagramSocketRecvMsgRequest {}
1307
1308#[derive(Clone, Debug, PartialEq)]
1309pub struct SynchronousDatagramSocketSendMsgRequest {
1310    pub addr: Option<Box<fidl_fuchsia_net__common::SocketAddress>>,
1311    pub data: Vec<u8>,
1312    pub control: DatagramSocketSendControlData,
1313    pub flags: SendMsgFlags,
1314}
1315
1316impl fidl::Persistable for SynchronousDatagramSocketSendMsgRequest {}
1317
1318#[derive(Clone, Debug, PartialEq)]
1319pub struct SynchronousDatagramSocketRecvMsgResponse {
1320    pub addr: Option<Box<fidl_fuchsia_net__common::SocketAddress>>,
1321    pub data: Vec<u8>,
1322    pub control: DatagramSocketRecvControlData,
1323    pub truncated: u32,
1324}
1325
1326impl fidl::Persistable for SynchronousDatagramSocketRecvMsgResponse {}
1327
1328#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1329#[repr(C)]
1330pub struct SynchronousDatagramSocketSendMsgResponse {
1331    pub len: i64,
1332}
1333
1334impl fidl::Persistable for SynchronousDatagramSocketSendMsgResponse {}
1335
1336#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1337pub struct Timestamp {
1338    /// Time in nanoseconds since epoch (January 1 1970 GMT).
1339    pub nanoseconds: i64,
1340    /// Identifies whether/how the timestamp should be returned to the user.
1341    /// Ignored in the DatagramSocket protocol.
1342    pub requested: TimestampOption,
1343}
1344
1345impl fidl::Persistable for Timestamp {}
1346
1347#[derive(Clone, Debug, Default, PartialEq)]
1348pub struct DatagramSocketRecvControlData {
1349    /// Network socket ancillary data.
1350    pub network: Option<NetworkSocketRecvControlData>,
1351    #[doc(hidden)]
1352    pub __source_breaking: fidl::marker::SourceBreaking,
1353}
1354
1355impl fidl::Persistable for DatagramSocketRecvControlData {}
1356
1357#[derive(Clone, Debug, Default, PartialEq)]
1358pub struct DatagramSocketSendControlData {
1359    /// Network socket ancillary data.
1360    pub network: Option<NetworkSocketSendControlData>,
1361    #[doc(hidden)]
1362    pub __source_breaking: fidl::marker::SourceBreaking,
1363}
1364
1365impl fidl::Persistable for DatagramSocketSendControlData {}
1366
1367#[derive(Clone, Debug, Default, PartialEq)]
1368pub struct DatagramSocketSendMsgPreflightRequest {
1369    /// The destination address.
1370    ///
1371    /// If absent, interpreted as the method receiver's connected address and
1372    /// causes the connected address to be returned.
1373    ///
1374    /// Required if the method receiver is not connected.
1375    pub to: Option<fidl_fuchsia_net__common::SocketAddress>,
1376    /// Information controlling the local interface and/or address used when
1377    /// sending an IPv6 packet.
1378    ///
1379    /// If absent, indicates that the stack is free to choose an appropriate
1380    /// outgoing route.
1381    pub ipv6_pktinfo: Option<Ipv6PktInfoSendControlData>,
1382    #[doc(hidden)]
1383    pub __source_breaking: fidl::marker::SourceBreaking,
1384}
1385
1386impl fidl::Persistable for DatagramSocketSendMsgPreflightRequest {}
1387
1388/// Holds information about an interface and its addresses.
1389#[derive(Clone, Debug, Default, PartialEq)]
1390pub struct InterfaceAddresses {
1391    /// ID of the interface.
1392    pub id: Option<u64>,
1393    /// Name of the interface.
1394    pub name: Option<String>,
1395    /// All addresses currently assigned to the interface.
1396    pub addresses: Option<Vec<fidl_fuchsia_net__common::Subnet>>,
1397    /// Contains the interface flags, as returned by the SIOCGIFFLAGS ioctl
1398    /// operation.
1399    pub interface_flags: Option<InterfaceFlags>,
1400    #[doc(hidden)]
1401    pub __source_breaking: fidl::marker::SourceBreaking,
1402}
1403
1404impl fidl::Persistable for InterfaceAddresses {}
1405
1406#[derive(Clone, Debug, Default, PartialEq)]
1407pub struct IpRecvControlData {
1408    /// The Type of Service value found in a received packet's IPv4 header.
1409    ///
1410    /// Present if the `SOL_IP` -> `IP_RECVTOS` option is enabled.
1411    pub tos: Option<u8>,
1412    /// The Time to Live value found in a received packet's IPv4 header.
1413    ///
1414    /// Present if the `SOL_IP` -> `IP_RECVTTL` option is enabled.
1415    pub ttl: Option<u8>,
1416    /// The original destination address.
1417    ///
1418    /// Present if the `SOL_IP` -> `IP_RECVORIGDSTADDR` option is enabled.
1419    pub original_destination_address: Option<fidl_fuchsia_net__common::SocketAddress>,
1420    #[doc(hidden)]
1421    pub __source_breaking: fidl::marker::SourceBreaking,
1422}
1423
1424impl fidl::Persistable for IpRecvControlData {}
1425
1426#[derive(Clone, Debug, Default, PartialEq)]
1427pub struct IpSendControlData {
1428    /// The Time to Live value to set in the IPv4 header of an outgoing
1429    /// packet.
1430    pub ttl: Option<u8>,
1431    #[doc(hidden)]
1432    pub __source_breaking: fidl::marker::SourceBreaking,
1433}
1434
1435impl fidl::Persistable for IpSendControlData {}
1436
1437#[derive(Clone, Debug, Default, PartialEq)]
1438pub struct Ipv6RecvControlData {
1439    /// The Traffic Class of a packet that was received.
1440    ///
1441    /// Present if the `SOL_IPV6` -> `IPV6_RECVTCLASS` option is enabled.
1442    pub tclass: Option<u8>,
1443    /// The Hop Limit of a packet that was received.
1444    ///
1445    /// Present if the `SOL_IPV6` -> `IPV6_RECVHOPLIMIT` option is enabled.
1446    pub hoplimit: Option<u8>,
1447    /// The packet information of a packet that was received.
1448    ///
1449    /// Present if the `SOL_IPV6` -> `IPV6_RECVPKTINFO` option is enabled.
1450    pub pktinfo: Option<Ipv6PktInfoRecvControlData>,
1451    #[doc(hidden)]
1452    pub __source_breaking: fidl::marker::SourceBreaking,
1453}
1454
1455impl fidl::Persistable for Ipv6RecvControlData {}
1456
1457#[derive(Clone, Debug, Default, PartialEq)]
1458pub struct Ipv6SendControlData {
1459    /// The Hop Limit value to set in the IPv6 header of an outgoing
1460    /// packet.
1461    pub hoplimit: Option<u8>,
1462    /// Information controlling the local interface and/or address used when
1463    /// sending an IPv6 packet.
1464    pub pktinfo: Option<Ipv6PktInfoSendControlData>,
1465    #[doc(hidden)]
1466    pub __source_breaking: fidl::marker::SourceBreaking,
1467}
1468
1469impl fidl::Persistable for Ipv6SendControlData {}
1470
1471/// Network socket (L3) ancillary data that can be received.
1472#[derive(Clone, Debug, Default, PartialEq)]
1473pub struct NetworkSocketRecvControlData {
1474    /// Socket level ancillary data.
1475    pub socket: Option<SocketRecvControlData>,
1476    /// IPv4 level ancillary data.
1477    ///
1478    /// These match POSIX `SOL_IP` control messages.
1479    pub ip: Option<IpRecvControlData>,
1480    /// IPv6 level ancillary data.
1481    ///
1482    /// These match POSIX `SOL_IPV6` control messages.
1483    pub ipv6: Option<Ipv6RecvControlData>,
1484    #[doc(hidden)]
1485    pub __source_breaking: fidl::marker::SourceBreaking,
1486}
1487
1488impl fidl::Persistable for NetworkSocketRecvControlData {}
1489
1490/// Network socket (L3) ancillary data that can be sent.
1491#[derive(Clone, Debug, Default, PartialEq)]
1492pub struct NetworkSocketSendControlData {
1493    /// Socket level ancillary data.
1494    pub socket: Option<SocketSendControlData>,
1495    /// IPv4 level ancillary data.
1496    ///
1497    /// These match POSIX `SOL_IP` control messages.
1498    pub ip: Option<IpSendControlData>,
1499    /// IPv6 level ancillary data.
1500    ///
1501    /// These match POSIX `SOL_IPV6` control messages.
1502    pub ipv6: Option<Ipv6SendControlData>,
1503    #[doc(hidden)]
1504    pub __source_breaking: fidl::marker::SourceBreaking,
1505}
1506
1507impl fidl::Persistable for NetworkSocketSendControlData {}
1508
1509/// Metadata of a received datagram.
1510#[derive(Clone, Debug, Default, PartialEq)]
1511pub struct RecvMsgMeta {
1512    /// The from address of the datagram.
1513    pub from: Option<fidl_fuchsia_net__common::SocketAddress>,
1514    /// Ancillary control message data describing the datagram.
1515    pub control: Option<DatagramSocketRecvControlData>,
1516    /// The length of the payload, in bytes.
1517    pub payload_len: Option<u16>,
1518    #[doc(hidden)]
1519    pub __source_breaking: fidl::marker::SourceBreaking,
1520}
1521
1522impl fidl::Persistable for RecvMsgMeta {}
1523
1524/// Metadata of a sent datagram.
1525#[derive(Clone, Debug, Default, PartialEq)]
1526pub struct SendMsgMeta {
1527    /// The destination address, if specified.
1528    pub to: Option<fidl_fuchsia_net__common::SocketAddress>,
1529    /// Ancillary control message data used for sending the payload.
1530    pub control: Option<DatagramSocketSendControlData>,
1531    #[doc(hidden)]
1532    pub __source_breaking: fidl::marker::SourceBreaking,
1533}
1534
1535impl fidl::Persistable for SendMsgMeta {}
1536
1537/// Socket level ancillary data that can be received.
1538///
1539/// These match control messages with a `SOL_SOCKET` level.
1540#[derive(Clone, Debug, Default, PartialEq)]
1541pub struct SocketRecvControlData {
1542    /// Data about the time at which the packet was received.
1543    pub timestamp: Option<Timestamp>,
1544    #[doc(hidden)]
1545    pub __source_breaking: fidl::marker::SourceBreaking,
1546}
1547
1548impl fidl::Persistable for SocketRecvControlData {}
1549
1550/// Socket level ancillary data that can be sent.
1551///
1552/// These match the POSIX `SOL_SOCKET` control messages.
1553#[derive(Clone, Debug, Default, PartialEq)]
1554pub struct SocketSendControlData {
1555    #[doc(hidden)]
1556    pub __source_breaking: fidl::marker::SourceBreaking,
1557}
1558
1559impl fidl::Persistable for SocketSendControlData {}
1560
1561/// An optional uint32 value.
1562#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1563pub enum OptionalUint32 {
1564    Value(u32),
1565    Unset(Empty),
1566}
1567
1568impl OptionalUint32 {
1569    #[inline]
1570    pub fn ordinal(&self) -> u64 {
1571        match *self {
1572            Self::Value(_) => 1,
1573            Self::Unset(_) => 2,
1574        }
1575    }
1576}
1577
1578impl fidl::Persistable for OptionalUint32 {}
1579
1580/// An optional byte value.
1581#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1582pub enum OptionalUint8 {
1583    Value(u8),
1584    Unset(Empty),
1585}
1586
1587impl OptionalUint8 {
1588    #[inline]
1589    pub fn ordinal(&self) -> u64 {
1590        match *self {
1591            Self::Value(_) => 1,
1592            Self::Unset(_) => 2,
1593        }
1594    }
1595}
1596
1597impl fidl::Persistable for OptionalUint8 {}
1598
1599pub mod base_datagram_socket_ordinals {
1600    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1601    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1602    pub const QUERY: u64 = 0x2658edee9decfc06;
1603    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1604    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1605    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1606    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1607    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1608    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1609    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1610    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1611    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1612    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1613    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1614    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1615    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1616    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1617    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1618    pub const SET_LINGER: u64 = 0x45386351246e998e;
1619    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1620    pub const SET_REUSE_PORT: u64 = 0x547dc9cc0455189e;
1621    pub const SET_REUSE_PORT_DEPRECATED: u64 = 0x24dd3e5cb36d9ccb;
1622    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1623    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1624    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1625    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1626    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1627    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1628    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1629    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1630    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1631    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1632    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1633    pub const BIND: u64 = 0x4bc6400ae92125d;
1634    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1635    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1636    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1637    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1638    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1639    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1640    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1641    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1642    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1643    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1644    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1645    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1646    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1647    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1648    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1649    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1650    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1651    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1652    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1653    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1654    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1655    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1656    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1657    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1658    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1659    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1660    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1661    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1662    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1663    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1664    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1665    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1666    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1667    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1668    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1669    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1670    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1671    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1672    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1673    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1674    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1675    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1676    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1677    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1678    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1679    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1680    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1681    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1682    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
1683}
1684
1685pub mod base_network_socket_ordinals {
1686    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1687    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1688    pub const QUERY: u64 = 0x2658edee9decfc06;
1689    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1690    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1691    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1692    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1693    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1694    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1695    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1696    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1697    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1698    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1699    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1700    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1701    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1702    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1703    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1704    pub const SET_LINGER: u64 = 0x45386351246e998e;
1705    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1706    pub const SET_REUSE_PORT: u64 = 0x547dc9cc0455189e;
1707    pub const SET_REUSE_PORT_DEPRECATED: u64 = 0x24dd3e5cb36d9ccb;
1708    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1709    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1710    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1711    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1712    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1713    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1714    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1715    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1716    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1717    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1718    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1719    pub const BIND: u64 = 0x4bc6400ae92125d;
1720    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1721    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1722    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1723    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1724    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1725    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1726    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1727    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1728    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1729    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1730    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1731    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1732    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1733    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1734    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1735    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1736    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1737    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1738    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1739    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1740    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1741    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1742    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1743    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1744    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1745    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1746    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1747    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1748    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1749    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1750    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1751    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1752    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1753    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1754    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1755    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1756    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1757    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1758    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1759    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1760    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1761    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1762    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1763    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1764    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1765    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1766    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1767    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1768}
1769
1770pub mod base_socket_ordinals {
1771    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1772    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1773    pub const QUERY: u64 = 0x2658edee9decfc06;
1774    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1775    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1776    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1777    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1778    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1779    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1780    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1781    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1782    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1783    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1784    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1785    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1786    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1787    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1788    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1789    pub const SET_LINGER: u64 = 0x45386351246e998e;
1790    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1791    pub const SET_REUSE_PORT: u64 = 0x547dc9cc0455189e;
1792    pub const SET_REUSE_PORT_DEPRECATED: u64 = 0x24dd3e5cb36d9ccb;
1793    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1794    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1795    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1796    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1797    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1798    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1799    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1800    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1801    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1802    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1803    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1804}
1805
1806pub mod datagram_socket_ordinals {
1807    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1808    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1809    pub const QUERY: u64 = 0x2658edee9decfc06;
1810    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1811    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1812    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1813    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1814    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1815    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1816    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1817    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1818    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1819    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1820    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1821    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1822    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1823    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1824    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1825    pub const SET_LINGER: u64 = 0x45386351246e998e;
1826    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1827    pub const SET_REUSE_PORT: u64 = 0x547dc9cc0455189e;
1828    pub const SET_REUSE_PORT_DEPRECATED: u64 = 0x24dd3e5cb36d9ccb;
1829    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1830    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1831    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1832    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1833    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1834    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1835    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1836    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1837    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1838    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1839    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1840    pub const BIND: u64 = 0x4bc6400ae92125d;
1841    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1842    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1843    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1844    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1845    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1846    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1847    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1848    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1849    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1850    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1851    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1852    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1853    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1854    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1855    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1856    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1857    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1858    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1859    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1860    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1861    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1862    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1863    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1864    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1865    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1866    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1867    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1868    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1869    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1870    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1871    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1872    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1873    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1874    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1875    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1876    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1877    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1878    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1879    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1880    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1881    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1882    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1883    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1884    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1885    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1886    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1887    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1888    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1889    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
1890    pub const DESCRIBE: u64 = 0xbf1e2f0a86601f3;
1891    pub const SEND_MSG_PREFLIGHT: u64 = 0x5362e668e777248a;
1892    pub const RECV_MSG_POSTFLIGHT: u64 = 0x1a7cdeca5f3eb8e2;
1893}
1894
1895pub mod provider_ordinals {
1896    pub const STREAM_SOCKET_WITH_OPTIONS: u64 = 0x3969bf7eb78386e0;
1897    pub const STREAM_SOCKET: u64 = 0x27c3581da2155545;
1898    pub const DATAGRAM_SOCKET_DEPRECATED: u64 = 0x38876c87cf031cb1;
1899    pub const DATAGRAM_SOCKET: u64 = 0x4021b4fa1b6452f2;
1900    pub const DATAGRAM_SOCKET_WITH_OPTIONS: u64 = 0x4cd0cffbffa39eb1;
1901    pub const INTERFACE_INDEX_TO_NAME: u64 = 0x4d59a64fce98272f;
1902    pub const INTERFACE_NAME_TO_INDEX: u64 = 0x690cd8d2f2d650f8;
1903    pub const INTERFACE_NAME_TO_FLAGS: u64 = 0x25d0efcdb6671a0b;
1904    pub const GET_INTERFACE_ADDRESSES: u64 = 0x2e7b9aaf327c870;
1905}
1906
1907pub mod stream_socket_ordinals {
1908    pub const CLONE: u64 = 0x20d8a7aba2168a79;
1909    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
1910    pub const QUERY: u64 = 0x2658edee9decfc06;
1911    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
1912    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
1913    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
1914    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
1915    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
1916    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
1917    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
1918    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
1919    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
1920    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
1921    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
1922    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
1923    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
1924    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
1925    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
1926    pub const SET_LINGER: u64 = 0x45386351246e998e;
1927    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
1928    pub const SET_REUSE_PORT: u64 = 0x547dc9cc0455189e;
1929    pub const SET_REUSE_PORT_DEPRECATED: u64 = 0x24dd3e5cb36d9ccb;
1930    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
1931    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
1932    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
1933    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
1934    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
1935    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
1936    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
1937    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
1938    pub const SET_MARK: u64 = 0x6ead6de09f653236;
1939    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
1940    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
1941    pub const BIND: u64 = 0x4bc6400ae92125d;
1942    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
1943    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
1944    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
1945    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
1946    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
1947    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
1948    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
1949    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
1950    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
1951    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
1952    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
1953    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
1954    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
1955    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
1956    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
1957    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
1958    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
1959    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
1960    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
1961    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
1962    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
1963    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
1964    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
1965    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
1966    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
1967    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
1968    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
1969    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
1970    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
1971    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
1972    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
1973    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
1974    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
1975    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
1976    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
1977    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
1978    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
1979    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
1980    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
1981    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
1982    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
1983    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
1984    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
1985    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
1986    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
1987    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
1988    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
1989    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
1990    pub const DESCRIBE: u64 = 0x29e22969a7dadc32;
1991    pub const LISTEN: u64 = 0x3d0a65ced3d10108;
1992    pub const ACCEPT: u64 = 0x5ab7ad620424c163;
1993    pub const GET_INFO: u64 = 0x87cfa55d19f878f;
1994    pub const SET_TCP_NO_DELAY: u64 = 0x5a59b778f7333ada;
1995    pub const GET_TCP_NO_DELAY: u64 = 0xac219a3218b0799;
1996    pub const SET_TCP_MAX_SEGMENT: u64 = 0xb3d30c498266d18;
1997    pub const GET_TCP_MAX_SEGMENT: u64 = 0x637404d1b4b9982c;
1998    pub const SET_TCP_CORK: u64 = 0x62e26891541143a0;
1999    pub const GET_TCP_CORK: u64 = 0x435bb232e0e74f32;
2000    pub const SET_TCP_KEEP_ALIVE_IDLE: u64 = 0x196d053d8363c42;
2001    pub const GET_TCP_KEEP_ALIVE_IDLE: u64 = 0x35ec58564879dac;
2002    pub const SET_TCP_KEEP_ALIVE_INTERVAL: u64 = 0x485ffbc2da1243f2;
2003    pub const GET_TCP_KEEP_ALIVE_INTERVAL: u64 = 0x264eaf46306b284;
2004    pub const SET_TCP_KEEP_ALIVE_COUNT: u64 = 0x2ab2e8c111708421;
2005    pub const GET_TCP_KEEP_ALIVE_COUNT: u64 = 0x2f176ae271fe7a09;
2006    pub const SET_TCP_SYN_COUNT: u64 = 0x4dcd6ab5573c1eb3;
2007    pub const GET_TCP_SYN_COUNT: u64 = 0x7d457cba8f5f3ee6;
2008    pub const SET_TCP_LINGER: u64 = 0xd5cc1e8654d36e4;
2009    pub const GET_TCP_LINGER: u64 = 0xad870d311cf30eb;
2010    pub const SET_TCP_DEFER_ACCEPT: u64 = 0x15092f181e57c404;
2011    pub const GET_TCP_DEFER_ACCEPT: u64 = 0x64589790842cb7c6;
2012    pub const SET_TCP_WINDOW_CLAMP: u64 = 0x4a26ce07d847f1c6;
2013    pub const GET_TCP_WINDOW_CLAMP: u64 = 0x2df6b636bf0a6a4e;
2014    pub const GET_TCP_INFO: u64 = 0x1ffb123d9f03ead2;
2015    pub const SET_TCP_QUICK_ACK: u64 = 0x6fa811be8fde7457;
2016    pub const GET_TCP_QUICK_ACK: u64 = 0x7356a949bef2df32;
2017    pub const SET_TCP_CONGESTION: u64 = 0x7924c6eabde7819e;
2018    pub const GET_TCP_CONGESTION: u64 = 0x11e16397e1b72a47;
2019    pub const SET_TCP_USER_TIMEOUT: u64 = 0x6b459e81c3741a60;
2020    pub const GET_TCP_USER_TIMEOUT: u64 = 0x24bbd5858ad8c380;
2021}
2022
2023pub mod synchronous_datagram_socket_ordinals {
2024    pub const CLONE: u64 = 0x20d8a7aba2168a79;
2025    pub const CLOSE: u64 = 0x5ac5d459ad7f657e;
2026    pub const QUERY: u64 = 0x2658edee9decfc06;
2027    pub const SET_REUSE_ADDRESS: u64 = 0x1fd74ee8b9a4a876;
2028    pub const GET_REUSE_ADDRESS: u64 = 0x67b7206b8d1bc0a5;
2029    pub const GET_ERROR: u64 = 0x5aad39b33e5f6ebb;
2030    pub const SET_BROADCAST: u64 = 0x6023e081ce3cd947;
2031    pub const GET_BROADCAST: u64 = 0x68796fc556f9780d;
2032    pub const SET_SEND_BUFFER: u64 = 0x756eac32d73a7a70;
2033    pub const GET_SEND_BUFFER: u64 = 0x78a52fd9c7b2410b;
2034    pub const SET_RECEIVE_BUFFER: u64 = 0x6b0cf2f1919c7001;
2035    pub const GET_RECEIVE_BUFFER: u64 = 0x14c1a4b64f709e5c;
2036    pub const SET_KEEP_ALIVE: u64 = 0x572df8f0b920d2c7;
2037    pub const GET_KEEP_ALIVE: u64 = 0x2dd29d3215f2c9d2;
2038    pub const SET_OUT_OF_BAND_INLINE: u64 = 0x3ecb49968bee439;
2039    pub const GET_OUT_OF_BAND_INLINE: u64 = 0x348c1ab3aeca1745;
2040    pub const SET_NO_CHECK: u64 = 0x6bbf00c53a4c78c2;
2041    pub const GET_NO_CHECK: u64 = 0x2cd4249286417694;
2042    pub const SET_LINGER: u64 = 0x45386351246e998e;
2043    pub const GET_LINGER: u64 = 0x48eb20fc5ccb0e45;
2044    pub const SET_REUSE_PORT: u64 = 0x547dc9cc0455189e;
2045    pub const SET_REUSE_PORT_DEPRECATED: u64 = 0x24dd3e5cb36d9ccb;
2046    pub const GET_REUSE_PORT: u64 = 0x7a112c1ab54ff828;
2047    pub const GET_ACCEPT_CONN: u64 = 0x67ce6db6c2ec8966;
2048    pub const SET_BIND_TO_DEVICE: u64 = 0x2118b483f28aafc4;
2049    pub const GET_BIND_TO_DEVICE: u64 = 0x1ab1fbf0ef7906c8;
2050    pub const SET_BIND_TO_INTERFACE_INDEX: u64 = 0x6e387a0def00821;
2051    pub const GET_BIND_TO_INTERFACE_INDEX: u64 = 0x59c31dd3e3078295;
2052    pub const SET_TIMESTAMP: u64 = 0x285d6516c263d839;
2053    pub const GET_TIMESTAMP: u64 = 0x49f2fffbbcc2bd27;
2054    pub const SET_MARK: u64 = 0x6ead6de09f653236;
2055    pub const GET_MARK: u64 = 0x57a2752c61d93d47;
2056    pub const GET_COOKIE: u64 = 0x2c2f47fd8f924e52;
2057    pub const BIND: u64 = 0x4bc6400ae92125d;
2058    pub const CONNECT: u64 = 0x5f05f19bfdd38871;
2059    pub const DISCONNECT: u64 = 0x74e63b91f7b29b2;
2060    pub const GET_SOCK_NAME: u64 = 0x475f23f84a1a4f85;
2061    pub const GET_PEER_NAME: u64 = 0x1ffecf4bd5b6432e;
2062    pub const SHUTDOWN: u64 = 0x247f38b6db68c336;
2063    pub const SET_IP_TYPE_OF_SERVICE: u64 = 0x995c600475b6d46;
2064    pub const GET_IP_TYPE_OF_SERVICE: u64 = 0x3814a04259f75fcb;
2065    pub const SET_IP_TTL: u64 = 0x29e2424b433ae1ef;
2066    pub const GET_IP_TTL: u64 = 0x47e47fa1f24da471;
2067    pub const SET_IP_PACKET_INFO: u64 = 0x392d16bee20c0e16;
2068    pub const GET_IP_PACKET_INFO: u64 = 0x54b505f242280740;
2069    pub const SET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x6c4f6714995f84ef;
2070    pub const GET_IP_RECEIVE_TYPE_OF_SERVICE: u64 = 0x4158ba7dc2795960;
2071    pub const SET_IP_RECEIVE_TTL: u64 = 0x46f15be0ce0ab82b;
2072    pub const GET_IP_RECEIVE_TTL: u64 = 0x678ddd5a5dfa2eb5;
2073    pub const SET_IP_MULTICAST_INTERFACE: u64 = 0x752fbfa9b12befe;
2074    pub const GET_IP_MULTICAST_INTERFACE: u64 = 0x320bd14c4df046c4;
2075    pub const SET_IP_MULTICAST_TTL: u64 = 0x63134d53772916a1;
2076    pub const GET_IP_MULTICAST_TTL: u64 = 0x4665cd378f39e1a;
2077    pub const SET_IP_MULTICAST_LOOPBACK: u64 = 0x20c55c11f00943ea;
2078    pub const GET_IP_MULTICAST_LOOPBACK: u64 = 0x3b6b26ff558298f2;
2079    pub const ADD_IP_MEMBERSHIP: u64 = 0x76bc7df115a3b4d0;
2080    pub const DROP_IP_MEMBERSHIP: u64 = 0x2888f3099188d03;
2081    pub const SET_IP_TRANSPARENT: u64 = 0x1ae532b0c066e3a0;
2082    pub const GET_IP_TRANSPARENT: u64 = 0x51d43695962ebfb5;
2083    pub const SET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x4722b4ce52f7840;
2084    pub const GET_IP_RECEIVE_ORIGINAL_DESTINATION_ADDRESS: u64 = 0x2a0e7dc5d6bfdfe9;
2085    pub const ADD_IPV6_MEMBERSHIP: u64 = 0x7c94727acb4ea4b3;
2086    pub const DROP_IPV6_MEMBERSHIP: u64 = 0x42104c70ccaba304;
2087    pub const SET_IPV6_MULTICAST_INTERFACE: u64 = 0x135f76db3774ab3b;
2088    pub const GET_IPV6_MULTICAST_INTERFACE: u64 = 0x1f26fcdd348f1882;
2089    pub const SET_IPV6_UNICAST_HOPS: u64 = 0x157d51e98f462859;
2090    pub const GET_IPV6_UNICAST_HOPS: u64 = 0x21f4641cad8bd8d2;
2091    pub const SET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x5c24808ed2e84a1e;
2092    pub const GET_IPV6_RECEIVE_HOP_LIMIT: u64 = 0x341e06689885b4c0;
2093    pub const SET_IPV6_MULTICAST_HOPS: u64 = 0x25b9cd4d181f82c1;
2094    pub const GET_IPV6_MULTICAST_HOPS: u64 = 0x52916948a365012a;
2095    pub const SET_IPV6_MULTICAST_LOOPBACK: u64 = 0x55701c409ff41b40;
2096    pub const GET_IPV6_MULTICAST_LOOPBACK: u64 = 0x4415b701fde319c3;
2097    pub const SET_IPV6_ONLY: u64 = 0x4873f1364758cbba;
2098    pub const GET_IPV6_ONLY: u64 = 0x4aa3340a1a26b89c;
2099    pub const SET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x58f07c8788d099a0;
2100    pub const GET_IPV6_RECEIVE_TRAFFIC_CLASS: u64 = 0x2e334df1da553ffa;
2101    pub const SET_IPV6_TRAFFIC_CLASS: u64 = 0x6af077800c5a0b4f;
2102    pub const GET_IPV6_TRAFFIC_CLASS: u64 = 0x6baf6eed8fc2f04;
2103    pub const SET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x19259775b1a92768;
2104    pub const GET_IPV6_RECEIVE_PACKET_INFO: u64 = 0x7acd4a2775baec75;
2105    pub const GET_ORIGINAL_DESTINATION: u64 = 0x38bf28f0dafdbac0;
2106    pub const GET_INFO: u64 = 0x48aa0a1f6a32d2ed;
2107    pub const DESCRIBE: u64 = 0x585f20b73631070d;
2108    pub const RECV_MSG: u64 = 0x28e494e48fb5dbf3;
2109    pub const SEND_MSG: u64 = 0x12dc2fceab6cefaa;
2110}
2111
2112mod internal {
2113    use super::*;
2114    unsafe impl fidl::encoding::TypeMarker for CmsgRequests {
2115        type Owned = Self;
2116
2117        #[inline(always)]
2118        fn inline_align(_context: fidl::encoding::Context) -> usize {
2119            4
2120        }
2121
2122        #[inline(always)]
2123        fn inline_size(_context: fidl::encoding::Context) -> usize {
2124            4
2125        }
2126    }
2127
2128    impl fidl::encoding::ValueTypeMarker for CmsgRequests {
2129        type Borrowed<'a> = Self;
2130        #[inline(always)]
2131        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2132            *value
2133        }
2134    }
2135
2136    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CmsgRequests {
2137        #[inline]
2138        unsafe fn encode(
2139            self,
2140            encoder: &mut fidl::encoding::Encoder<'_, D>,
2141            offset: usize,
2142            _depth: fidl::encoding::Depth,
2143        ) -> fidl::Result<()> {
2144            encoder.debug_check_bounds::<Self>(offset);
2145            encoder.write_num(self.bits(), offset);
2146            Ok(())
2147        }
2148    }
2149
2150    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CmsgRequests {
2151        #[inline(always)]
2152        fn new_empty() -> Self {
2153            Self::empty()
2154        }
2155
2156        #[inline]
2157        unsafe fn decode(
2158            &mut self,
2159            decoder: &mut fidl::encoding::Decoder<'_, D>,
2160            offset: usize,
2161            _depth: fidl::encoding::Depth,
2162        ) -> fidl::Result<()> {
2163            decoder.debug_check_bounds::<Self>(offset);
2164            let prim = decoder.read_num::<u32>(offset);
2165            *self = Self::from_bits_allow_unknown(prim);
2166            Ok(())
2167        }
2168    }
2169    unsafe impl fidl::encoding::TypeMarker for InterfaceFlags {
2170        type Owned = Self;
2171
2172        #[inline(always)]
2173        fn inline_align(_context: fidl::encoding::Context) -> usize {
2174            2
2175        }
2176
2177        #[inline(always)]
2178        fn inline_size(_context: fidl::encoding::Context) -> usize {
2179            2
2180        }
2181    }
2182
2183    impl fidl::encoding::ValueTypeMarker for InterfaceFlags {
2184        type Borrowed<'a> = Self;
2185        #[inline(always)]
2186        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2187            *value
2188        }
2189    }
2190
2191    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for InterfaceFlags {
2192        #[inline]
2193        unsafe fn encode(
2194            self,
2195            encoder: &mut fidl::encoding::Encoder<'_, D>,
2196            offset: usize,
2197            _depth: fidl::encoding::Depth,
2198        ) -> fidl::Result<()> {
2199            encoder.debug_check_bounds::<Self>(offset);
2200            if self.bits() & Self::all().bits() != self.bits() {
2201                return Err(fidl::Error::InvalidBitsValue);
2202            }
2203            encoder.write_num(self.bits(), offset);
2204            Ok(())
2205        }
2206    }
2207
2208    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceFlags {
2209        #[inline(always)]
2210        fn new_empty() -> Self {
2211            Self::empty()
2212        }
2213
2214        #[inline]
2215        unsafe fn decode(
2216            &mut self,
2217            decoder: &mut fidl::encoding::Decoder<'_, D>,
2218            offset: usize,
2219            _depth: fidl::encoding::Depth,
2220        ) -> fidl::Result<()> {
2221            decoder.debug_check_bounds::<Self>(offset);
2222            let prim = decoder.read_num::<u16>(offset);
2223            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2224            Ok(())
2225        }
2226    }
2227    unsafe impl fidl::encoding::TypeMarker for RecvMsgFlags {
2228        type Owned = Self;
2229
2230        #[inline(always)]
2231        fn inline_align(_context: fidl::encoding::Context) -> usize {
2232            2
2233        }
2234
2235        #[inline(always)]
2236        fn inline_size(_context: fidl::encoding::Context) -> usize {
2237            2
2238        }
2239    }
2240
2241    impl fidl::encoding::ValueTypeMarker for RecvMsgFlags {
2242        type Borrowed<'a> = Self;
2243        #[inline(always)]
2244        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2245            *value
2246        }
2247    }
2248
2249    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RecvMsgFlags {
2250        #[inline]
2251        unsafe fn encode(
2252            self,
2253            encoder: &mut fidl::encoding::Encoder<'_, D>,
2254            offset: usize,
2255            _depth: fidl::encoding::Depth,
2256        ) -> fidl::Result<()> {
2257            encoder.debug_check_bounds::<Self>(offset);
2258            if self.bits() & Self::all().bits() != self.bits() {
2259                return Err(fidl::Error::InvalidBitsValue);
2260            }
2261            encoder.write_num(self.bits(), offset);
2262            Ok(())
2263        }
2264    }
2265
2266    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecvMsgFlags {
2267        #[inline(always)]
2268        fn new_empty() -> Self {
2269            Self::empty()
2270        }
2271
2272        #[inline]
2273        unsafe fn decode(
2274            &mut self,
2275            decoder: &mut fidl::encoding::Decoder<'_, D>,
2276            offset: usize,
2277            _depth: fidl::encoding::Depth,
2278        ) -> fidl::Result<()> {
2279            decoder.debug_check_bounds::<Self>(offset);
2280            let prim = decoder.read_num::<u16>(offset);
2281            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2282            Ok(())
2283        }
2284    }
2285    unsafe impl fidl::encoding::TypeMarker for SendMsgFlags {
2286        type Owned = Self;
2287
2288        #[inline(always)]
2289        fn inline_align(_context: fidl::encoding::Context) -> usize {
2290            2
2291        }
2292
2293        #[inline(always)]
2294        fn inline_size(_context: fidl::encoding::Context) -> usize {
2295            2
2296        }
2297    }
2298
2299    impl fidl::encoding::ValueTypeMarker for SendMsgFlags {
2300        type Borrowed<'a> = Self;
2301        #[inline(always)]
2302        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2303            *value
2304        }
2305    }
2306
2307    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SendMsgFlags {
2308        #[inline]
2309        unsafe fn encode(
2310            self,
2311            encoder: &mut fidl::encoding::Encoder<'_, D>,
2312            offset: usize,
2313            _depth: fidl::encoding::Depth,
2314        ) -> fidl::Result<()> {
2315            encoder.debug_check_bounds::<Self>(offset);
2316            if self.bits() & Self::all().bits() != self.bits() {
2317                return Err(fidl::Error::InvalidBitsValue);
2318            }
2319            encoder.write_num(self.bits(), offset);
2320            Ok(())
2321        }
2322    }
2323
2324    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SendMsgFlags {
2325        #[inline(always)]
2326        fn new_empty() -> Self {
2327            Self::empty()
2328        }
2329
2330        #[inline]
2331        unsafe fn decode(
2332            &mut self,
2333            decoder: &mut fidl::encoding::Decoder<'_, D>,
2334            offset: usize,
2335            _depth: fidl::encoding::Depth,
2336        ) -> fidl::Result<()> {
2337            decoder.debug_check_bounds::<Self>(offset);
2338            let prim = decoder.read_num::<u16>(offset);
2339            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2340            Ok(())
2341        }
2342    }
2343    unsafe impl fidl::encoding::TypeMarker for ShutdownMode {
2344        type Owned = Self;
2345
2346        #[inline(always)]
2347        fn inline_align(_context: fidl::encoding::Context) -> usize {
2348            2
2349        }
2350
2351        #[inline(always)]
2352        fn inline_size(_context: fidl::encoding::Context) -> usize {
2353            2
2354        }
2355    }
2356
2357    impl fidl::encoding::ValueTypeMarker for ShutdownMode {
2358        type Borrowed<'a> = Self;
2359        #[inline(always)]
2360        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2361            *value
2362        }
2363    }
2364
2365    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ShutdownMode {
2366        #[inline]
2367        unsafe fn encode(
2368            self,
2369            encoder: &mut fidl::encoding::Encoder<'_, D>,
2370            offset: usize,
2371            _depth: fidl::encoding::Depth,
2372        ) -> fidl::Result<()> {
2373            encoder.debug_check_bounds::<Self>(offset);
2374            if self.bits() & Self::all().bits() != self.bits() {
2375                return Err(fidl::Error::InvalidBitsValue);
2376            }
2377            encoder.write_num(self.bits(), offset);
2378            Ok(())
2379        }
2380    }
2381
2382    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ShutdownMode {
2383        #[inline(always)]
2384        fn new_empty() -> Self {
2385            Self::empty()
2386        }
2387
2388        #[inline]
2389        unsafe fn decode(
2390            &mut self,
2391            decoder: &mut fidl::encoding::Decoder<'_, D>,
2392            offset: usize,
2393            _depth: fidl::encoding::Depth,
2394        ) -> fidl::Result<()> {
2395            decoder.debug_check_bounds::<Self>(offset);
2396            let prim = decoder.read_num::<u16>(offset);
2397            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
2398            Ok(())
2399        }
2400    }
2401    unsafe impl fidl::encoding::TypeMarker for DatagramSocketProtocol {
2402        type Owned = Self;
2403
2404        #[inline(always)]
2405        fn inline_align(_context: fidl::encoding::Context) -> usize {
2406            std::mem::align_of::<u32>()
2407        }
2408
2409        #[inline(always)]
2410        fn inline_size(_context: fidl::encoding::Context) -> usize {
2411            std::mem::size_of::<u32>()
2412        }
2413
2414        #[inline(always)]
2415        fn encode_is_copy() -> bool {
2416            true
2417        }
2418
2419        #[inline(always)]
2420        fn decode_is_copy() -> bool {
2421            false
2422        }
2423    }
2424
2425    impl fidl::encoding::ValueTypeMarker for DatagramSocketProtocol {
2426        type Borrowed<'a> = Self;
2427        #[inline(always)]
2428        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2429            *value
2430        }
2431    }
2432
2433    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2434        for DatagramSocketProtocol
2435    {
2436        #[inline]
2437        unsafe fn encode(
2438            self,
2439            encoder: &mut fidl::encoding::Encoder<'_, D>,
2440            offset: usize,
2441            _depth: fidl::encoding::Depth,
2442        ) -> fidl::Result<()> {
2443            encoder.debug_check_bounds::<Self>(offset);
2444            encoder.write_num(self.into_primitive(), offset);
2445            Ok(())
2446        }
2447    }
2448
2449    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2450        for DatagramSocketProtocol
2451    {
2452        #[inline(always)]
2453        fn new_empty() -> Self {
2454            Self::Udp
2455        }
2456
2457        #[inline]
2458        unsafe fn decode(
2459            &mut self,
2460            decoder: &mut fidl::encoding::Decoder<'_, D>,
2461            offset: usize,
2462            _depth: fidl::encoding::Depth,
2463        ) -> fidl::Result<()> {
2464            decoder.debug_check_bounds::<Self>(offset);
2465            let prim = decoder.read_num::<u32>(offset);
2466
2467            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2468            Ok(())
2469        }
2470    }
2471    unsafe impl fidl::encoding::TypeMarker for Domain {
2472        type Owned = Self;
2473
2474        #[inline(always)]
2475        fn inline_align(_context: fidl::encoding::Context) -> usize {
2476            std::mem::align_of::<i16>()
2477        }
2478
2479        #[inline(always)]
2480        fn inline_size(_context: fidl::encoding::Context) -> usize {
2481            std::mem::size_of::<i16>()
2482        }
2483
2484        #[inline(always)]
2485        fn encode_is_copy() -> bool {
2486            true
2487        }
2488
2489        #[inline(always)]
2490        fn decode_is_copy() -> bool {
2491            false
2492        }
2493    }
2494
2495    impl fidl::encoding::ValueTypeMarker for Domain {
2496        type Borrowed<'a> = Self;
2497        #[inline(always)]
2498        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2499            *value
2500        }
2501    }
2502
2503    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Domain {
2504        #[inline]
2505        unsafe fn encode(
2506            self,
2507            encoder: &mut fidl::encoding::Encoder<'_, D>,
2508            offset: usize,
2509            _depth: fidl::encoding::Depth,
2510        ) -> fidl::Result<()> {
2511            encoder.debug_check_bounds::<Self>(offset);
2512            encoder.write_num(self.into_primitive(), offset);
2513            Ok(())
2514        }
2515    }
2516
2517    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Domain {
2518        #[inline(always)]
2519        fn new_empty() -> Self {
2520            Self::Ipv4
2521        }
2522
2523        #[inline]
2524        unsafe fn decode(
2525            &mut self,
2526            decoder: &mut fidl::encoding::Decoder<'_, D>,
2527            offset: usize,
2528            _depth: fidl::encoding::Depth,
2529        ) -> fidl::Result<()> {
2530            decoder.debug_check_bounds::<Self>(offset);
2531            let prim = decoder.read_num::<i16>(offset);
2532
2533            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2534            Ok(())
2535        }
2536    }
2537    unsafe impl fidl::encoding::TypeMarker for StreamSocketProtocol {
2538        type Owned = Self;
2539
2540        #[inline(always)]
2541        fn inline_align(_context: fidl::encoding::Context) -> usize {
2542            std::mem::align_of::<u32>()
2543        }
2544
2545        #[inline(always)]
2546        fn inline_size(_context: fidl::encoding::Context) -> usize {
2547            std::mem::size_of::<u32>()
2548        }
2549
2550        #[inline(always)]
2551        fn encode_is_copy() -> bool {
2552            true
2553        }
2554
2555        #[inline(always)]
2556        fn decode_is_copy() -> bool {
2557            false
2558        }
2559    }
2560
2561    impl fidl::encoding::ValueTypeMarker for StreamSocketProtocol {
2562        type Borrowed<'a> = Self;
2563        #[inline(always)]
2564        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2565            *value
2566        }
2567    }
2568
2569    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2570        for StreamSocketProtocol
2571    {
2572        #[inline]
2573        unsafe fn encode(
2574            self,
2575            encoder: &mut fidl::encoding::Encoder<'_, D>,
2576            offset: usize,
2577            _depth: fidl::encoding::Depth,
2578        ) -> fidl::Result<()> {
2579            encoder.debug_check_bounds::<Self>(offset);
2580            encoder.write_num(self.into_primitive(), offset);
2581            Ok(())
2582        }
2583    }
2584
2585    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StreamSocketProtocol {
2586        #[inline(always)]
2587        fn new_empty() -> Self {
2588            Self::Tcp
2589        }
2590
2591        #[inline]
2592        unsafe fn decode(
2593            &mut self,
2594            decoder: &mut fidl::encoding::Decoder<'_, D>,
2595            offset: usize,
2596            _depth: fidl::encoding::Depth,
2597        ) -> fidl::Result<()> {
2598            decoder.debug_check_bounds::<Self>(offset);
2599            let prim = decoder.read_num::<u32>(offset);
2600
2601            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2602            Ok(())
2603        }
2604    }
2605    unsafe impl fidl::encoding::TypeMarker for TcpCongestionControl {
2606        type Owned = Self;
2607
2608        #[inline(always)]
2609        fn inline_align(_context: fidl::encoding::Context) -> usize {
2610            std::mem::align_of::<u32>()
2611        }
2612
2613        #[inline(always)]
2614        fn inline_size(_context: fidl::encoding::Context) -> usize {
2615            std::mem::size_of::<u32>()
2616        }
2617
2618        #[inline(always)]
2619        fn encode_is_copy() -> bool {
2620            true
2621        }
2622
2623        #[inline(always)]
2624        fn decode_is_copy() -> bool {
2625            false
2626        }
2627    }
2628
2629    impl fidl::encoding::ValueTypeMarker for TcpCongestionControl {
2630        type Borrowed<'a> = Self;
2631        #[inline(always)]
2632        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2633            *value
2634        }
2635    }
2636
2637    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2638        for TcpCongestionControl
2639    {
2640        #[inline]
2641        unsafe fn encode(
2642            self,
2643            encoder: &mut fidl::encoding::Encoder<'_, D>,
2644            offset: usize,
2645            _depth: fidl::encoding::Depth,
2646        ) -> fidl::Result<()> {
2647            encoder.debug_check_bounds::<Self>(offset);
2648            encoder.write_num(self.into_primitive(), offset);
2649            Ok(())
2650        }
2651    }
2652
2653    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TcpCongestionControl {
2654        #[inline(always)]
2655        fn new_empty() -> Self {
2656            Self::Reno
2657        }
2658
2659        #[inline]
2660        unsafe fn decode(
2661            &mut self,
2662            decoder: &mut fidl::encoding::Decoder<'_, D>,
2663            offset: usize,
2664            _depth: fidl::encoding::Depth,
2665        ) -> fidl::Result<()> {
2666            decoder.debug_check_bounds::<Self>(offset);
2667            let prim = decoder.read_num::<u32>(offset);
2668
2669            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2670            Ok(())
2671        }
2672    }
2673    unsafe impl fidl::encoding::TypeMarker for TimestampOption {
2674        type Owned = Self;
2675
2676        #[inline(always)]
2677        fn inline_align(_context: fidl::encoding::Context) -> usize {
2678            std::mem::align_of::<u32>()
2679        }
2680
2681        #[inline(always)]
2682        fn inline_size(_context: fidl::encoding::Context) -> usize {
2683            std::mem::size_of::<u32>()
2684        }
2685
2686        #[inline(always)]
2687        fn encode_is_copy() -> bool {
2688            true
2689        }
2690
2691        #[inline(always)]
2692        fn decode_is_copy() -> bool {
2693            false
2694        }
2695    }
2696
2697    impl fidl::encoding::ValueTypeMarker for TimestampOption {
2698        type Borrowed<'a> = Self;
2699        #[inline(always)]
2700        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2701            *value
2702        }
2703    }
2704
2705    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2706        for TimestampOption
2707    {
2708        #[inline]
2709        unsafe fn encode(
2710            self,
2711            encoder: &mut fidl::encoding::Encoder<'_, D>,
2712            offset: usize,
2713            _depth: fidl::encoding::Depth,
2714        ) -> fidl::Result<()> {
2715            encoder.debug_check_bounds::<Self>(offset);
2716            encoder.write_num(self.into_primitive(), offset);
2717            Ok(())
2718        }
2719    }
2720
2721    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TimestampOption {
2722        #[inline(always)]
2723        fn new_empty() -> Self {
2724            Self::Disabled
2725        }
2726
2727        #[inline]
2728        unsafe fn decode(
2729            &mut self,
2730            decoder: &mut fidl::encoding::Decoder<'_, D>,
2731            offset: usize,
2732            _depth: fidl::encoding::Depth,
2733        ) -> fidl::Result<()> {
2734            decoder.debug_check_bounds::<Self>(offset);
2735            let prim = decoder.read_num::<u32>(offset);
2736
2737            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2738            Ok(())
2739        }
2740    }
2741    unsafe impl fidl::encoding::TypeMarker for UdpMetadataEncodingProtocolVersion {
2742        type Owned = Self;
2743
2744        #[inline(always)]
2745        fn inline_align(_context: fidl::encoding::Context) -> usize {
2746            std::mem::align_of::<u16>()
2747        }
2748
2749        #[inline(always)]
2750        fn inline_size(_context: fidl::encoding::Context) -> usize {
2751            std::mem::size_of::<u16>()
2752        }
2753
2754        #[inline(always)]
2755        fn encode_is_copy() -> bool {
2756            false
2757        }
2758
2759        #[inline(always)]
2760        fn decode_is_copy() -> bool {
2761            false
2762        }
2763    }
2764
2765    impl fidl::encoding::ValueTypeMarker for UdpMetadataEncodingProtocolVersion {
2766        type Borrowed<'a> = Self;
2767        #[inline(always)]
2768        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2769            *value
2770        }
2771    }
2772
2773    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2774        for UdpMetadataEncodingProtocolVersion
2775    {
2776        #[inline]
2777        unsafe fn encode(
2778            self,
2779            encoder: &mut fidl::encoding::Encoder<'_, D>,
2780            offset: usize,
2781            _depth: fidl::encoding::Depth,
2782        ) -> fidl::Result<()> {
2783            encoder.debug_check_bounds::<Self>(offset);
2784            encoder.write_num(self.into_primitive(), offset);
2785            Ok(())
2786        }
2787    }
2788
2789    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2790        for UdpMetadataEncodingProtocolVersion
2791    {
2792        #[inline(always)]
2793        fn new_empty() -> Self {
2794            Self::unknown()
2795        }
2796
2797        #[inline]
2798        unsafe fn decode(
2799            &mut self,
2800            decoder: &mut fidl::encoding::Decoder<'_, D>,
2801            offset: usize,
2802            _depth: fidl::encoding::Depth,
2803        ) -> fidl::Result<()> {
2804            decoder.debug_check_bounds::<Self>(offset);
2805            let prim = decoder.read_num::<u16>(offset);
2806
2807            *self = Self::from_primitive_allow_unknown(prim);
2808            Ok(())
2809        }
2810    }
2811
2812    impl fidl::encoding::ValueTypeMarker for BaseDatagramSocketGetInfoResponse {
2813        type Borrowed<'a> = &'a Self;
2814        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2815            value
2816        }
2817    }
2818
2819    unsafe impl fidl::encoding::TypeMarker for BaseDatagramSocketGetInfoResponse {
2820        type Owned = Self;
2821
2822        #[inline(always)]
2823        fn inline_align(_context: fidl::encoding::Context) -> usize {
2824            4
2825        }
2826
2827        #[inline(always)]
2828        fn inline_size(_context: fidl::encoding::Context) -> usize {
2829            8
2830        }
2831    }
2832
2833    unsafe impl<D: fidl::encoding::ResourceDialect>
2834        fidl::encoding::Encode<BaseDatagramSocketGetInfoResponse, D>
2835        for &BaseDatagramSocketGetInfoResponse
2836    {
2837        #[inline]
2838        unsafe fn encode(
2839            self,
2840            encoder: &mut fidl::encoding::Encoder<'_, D>,
2841            offset: usize,
2842            _depth: fidl::encoding::Depth,
2843        ) -> fidl::Result<()> {
2844            encoder.debug_check_bounds::<BaseDatagramSocketGetInfoResponse>(offset);
2845            // Delegate to tuple encoding.
2846            fidl::encoding::Encode::<BaseDatagramSocketGetInfoResponse, D>::encode(
2847                (
2848                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
2849                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
2850                        &self.proto,
2851                    ),
2852                ),
2853                encoder,
2854                offset,
2855                _depth,
2856            )
2857        }
2858    }
2859    unsafe impl<
2860        D: fidl::encoding::ResourceDialect,
2861        T0: fidl::encoding::Encode<Domain, D>,
2862        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
2863    > fidl::encoding::Encode<BaseDatagramSocketGetInfoResponse, D> for (T0, T1)
2864    {
2865        #[inline]
2866        unsafe fn encode(
2867            self,
2868            encoder: &mut fidl::encoding::Encoder<'_, D>,
2869            offset: usize,
2870            depth: fidl::encoding::Depth,
2871        ) -> fidl::Result<()> {
2872            encoder.debug_check_bounds::<BaseDatagramSocketGetInfoResponse>(offset);
2873            // Zero out padding regions. There's no need to apply masks
2874            // because the unmasked parts will be overwritten by fields.
2875            unsafe {
2876                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2877                (ptr as *mut u32).write_unaligned(0);
2878            }
2879            // Write the fields.
2880            self.0.encode(encoder, offset + 0, depth)?;
2881            self.1.encode(encoder, offset + 4, depth)?;
2882            Ok(())
2883        }
2884    }
2885
2886    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2887        for BaseDatagramSocketGetInfoResponse
2888    {
2889        #[inline(always)]
2890        fn new_empty() -> Self {
2891            Self {
2892                domain: fidl::new_empty!(Domain, D),
2893                proto: fidl::new_empty!(DatagramSocketProtocol, D),
2894            }
2895        }
2896
2897        #[inline]
2898        unsafe fn decode(
2899            &mut self,
2900            decoder: &mut fidl::encoding::Decoder<'_, D>,
2901            offset: usize,
2902            _depth: fidl::encoding::Depth,
2903        ) -> fidl::Result<()> {
2904            decoder.debug_check_bounds::<Self>(offset);
2905            // Verify that padding bytes are zero.
2906            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2907            let padval = unsafe { (ptr as *const u32).read_unaligned() };
2908            let mask = 0xffff0000u32;
2909            let maskedval = padval & mask;
2910            if maskedval != 0 {
2911                return Err(fidl::Error::NonZeroPadding {
2912                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2913                });
2914            }
2915            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
2916            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
2917            Ok(())
2918        }
2919    }
2920
2921    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketAddIpMembershipRequest {
2922        type Borrowed<'a> = &'a Self;
2923        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2924            value
2925        }
2926    }
2927
2928    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketAddIpMembershipRequest {
2929        type Owned = Self;
2930
2931        #[inline(always)]
2932        fn inline_align(_context: fidl::encoding::Context) -> usize {
2933            8
2934        }
2935
2936        #[inline(always)]
2937        fn inline_size(_context: fidl::encoding::Context) -> usize {
2938            16
2939        }
2940    }
2941
2942    unsafe impl<D: fidl::encoding::ResourceDialect>
2943        fidl::encoding::Encode<BaseNetworkSocketAddIpMembershipRequest, D>
2944        for &BaseNetworkSocketAddIpMembershipRequest
2945    {
2946        #[inline]
2947        unsafe fn encode(
2948            self,
2949            encoder: &mut fidl::encoding::Encoder<'_, D>,
2950            offset: usize,
2951            _depth: fidl::encoding::Depth,
2952        ) -> fidl::Result<()> {
2953            encoder.debug_check_bounds::<BaseNetworkSocketAddIpMembershipRequest>(offset);
2954            // Delegate to tuple encoding.
2955            fidl::encoding::Encode::<BaseNetworkSocketAddIpMembershipRequest, D>::encode(
2956                (<IpMulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
2957                    &self.membership,
2958                ),),
2959                encoder,
2960                offset,
2961                _depth,
2962            )
2963        }
2964    }
2965    unsafe impl<
2966        D: fidl::encoding::ResourceDialect,
2967        T0: fidl::encoding::Encode<IpMulticastMembership, D>,
2968    > fidl::encoding::Encode<BaseNetworkSocketAddIpMembershipRequest, D> for (T0,)
2969    {
2970        #[inline]
2971        unsafe fn encode(
2972            self,
2973            encoder: &mut fidl::encoding::Encoder<'_, D>,
2974            offset: usize,
2975            depth: fidl::encoding::Depth,
2976        ) -> fidl::Result<()> {
2977            encoder.debug_check_bounds::<BaseNetworkSocketAddIpMembershipRequest>(offset);
2978            // Zero out padding regions. There's no need to apply masks
2979            // because the unmasked parts will be overwritten by fields.
2980            // Write the fields.
2981            self.0.encode(encoder, offset + 0, depth)?;
2982            Ok(())
2983        }
2984    }
2985
2986    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2987        for BaseNetworkSocketAddIpMembershipRequest
2988    {
2989        #[inline(always)]
2990        fn new_empty() -> Self {
2991            Self { membership: fidl::new_empty!(IpMulticastMembership, D) }
2992        }
2993
2994        #[inline]
2995        unsafe fn decode(
2996            &mut self,
2997            decoder: &mut fidl::encoding::Decoder<'_, D>,
2998            offset: usize,
2999            _depth: fidl::encoding::Depth,
3000        ) -> fidl::Result<()> {
3001            decoder.debug_check_bounds::<Self>(offset);
3002            // Verify that padding bytes are zero.
3003            fidl::decode!(
3004                IpMulticastMembership,
3005                D,
3006                &mut self.membership,
3007                decoder,
3008                offset + 0,
3009                _depth
3010            )?;
3011            Ok(())
3012        }
3013    }
3014
3015    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketAddIpv6MembershipRequest {
3016        type Borrowed<'a> = &'a Self;
3017        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3018            value
3019        }
3020    }
3021
3022    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketAddIpv6MembershipRequest {
3023        type Owned = Self;
3024
3025        #[inline(always)]
3026        fn inline_align(_context: fidl::encoding::Context) -> usize {
3027            8
3028        }
3029
3030        #[inline(always)]
3031        fn inline_size(_context: fidl::encoding::Context) -> usize {
3032            24
3033        }
3034    }
3035
3036    unsafe impl<D: fidl::encoding::ResourceDialect>
3037        fidl::encoding::Encode<BaseNetworkSocketAddIpv6MembershipRequest, D>
3038        for &BaseNetworkSocketAddIpv6MembershipRequest
3039    {
3040        #[inline]
3041        unsafe fn encode(
3042            self,
3043            encoder: &mut fidl::encoding::Encoder<'_, D>,
3044            offset: usize,
3045            _depth: fidl::encoding::Depth,
3046        ) -> fidl::Result<()> {
3047            encoder.debug_check_bounds::<BaseNetworkSocketAddIpv6MembershipRequest>(offset);
3048            // Delegate to tuple encoding.
3049            fidl::encoding::Encode::<BaseNetworkSocketAddIpv6MembershipRequest, D>::encode(
3050                (<Ipv6MulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3051                    &self.membership,
3052                ),),
3053                encoder,
3054                offset,
3055                _depth,
3056            )
3057        }
3058    }
3059    unsafe impl<
3060        D: fidl::encoding::ResourceDialect,
3061        T0: fidl::encoding::Encode<Ipv6MulticastMembership, D>,
3062    > fidl::encoding::Encode<BaseNetworkSocketAddIpv6MembershipRequest, D> for (T0,)
3063    {
3064        #[inline]
3065        unsafe fn encode(
3066            self,
3067            encoder: &mut fidl::encoding::Encoder<'_, D>,
3068            offset: usize,
3069            depth: fidl::encoding::Depth,
3070        ) -> fidl::Result<()> {
3071            encoder.debug_check_bounds::<BaseNetworkSocketAddIpv6MembershipRequest>(offset);
3072            // Zero out padding regions. There's no need to apply masks
3073            // because the unmasked parts will be overwritten by fields.
3074            // Write the fields.
3075            self.0.encode(encoder, offset + 0, depth)?;
3076            Ok(())
3077        }
3078    }
3079
3080    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3081        for BaseNetworkSocketAddIpv6MembershipRequest
3082    {
3083        #[inline(always)]
3084        fn new_empty() -> Self {
3085            Self { membership: fidl::new_empty!(Ipv6MulticastMembership, D) }
3086        }
3087
3088        #[inline]
3089        unsafe fn decode(
3090            &mut self,
3091            decoder: &mut fidl::encoding::Decoder<'_, D>,
3092            offset: usize,
3093            _depth: fidl::encoding::Depth,
3094        ) -> fidl::Result<()> {
3095            decoder.debug_check_bounds::<Self>(offset);
3096            // Verify that padding bytes are zero.
3097            fidl::decode!(
3098                Ipv6MulticastMembership,
3099                D,
3100                &mut self.membership,
3101                decoder,
3102                offset + 0,
3103                _depth
3104            )?;
3105            Ok(())
3106        }
3107    }
3108
3109    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketBindRequest {
3110        type Borrowed<'a> = &'a Self;
3111        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3112            value
3113        }
3114    }
3115
3116    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketBindRequest {
3117        type Owned = Self;
3118
3119        #[inline(always)]
3120        fn inline_align(_context: fidl::encoding::Context) -> usize {
3121            8
3122        }
3123
3124        #[inline(always)]
3125        fn inline_size(_context: fidl::encoding::Context) -> usize {
3126            16
3127        }
3128    }
3129
3130    unsafe impl<D: fidl::encoding::ResourceDialect>
3131        fidl::encoding::Encode<BaseNetworkSocketBindRequest, D> for &BaseNetworkSocketBindRequest
3132    {
3133        #[inline]
3134        unsafe fn encode(
3135            self,
3136            encoder: &mut fidl::encoding::Encoder<'_, D>,
3137            offset: usize,
3138            _depth: fidl::encoding::Depth,
3139        ) -> fidl::Result<()> {
3140            encoder.debug_check_bounds::<BaseNetworkSocketBindRequest>(offset);
3141            // Delegate to tuple encoding.
3142            fidl::encoding::Encode::<BaseNetworkSocketBindRequest, D>::encode(
3143                (
3144                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
3145                ),
3146                encoder, offset, _depth
3147            )
3148        }
3149    }
3150    unsafe impl<
3151        D: fidl::encoding::ResourceDialect,
3152        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
3153    > fidl::encoding::Encode<BaseNetworkSocketBindRequest, D> for (T0,)
3154    {
3155        #[inline]
3156        unsafe fn encode(
3157            self,
3158            encoder: &mut fidl::encoding::Encoder<'_, D>,
3159            offset: usize,
3160            depth: fidl::encoding::Depth,
3161        ) -> fidl::Result<()> {
3162            encoder.debug_check_bounds::<BaseNetworkSocketBindRequest>(offset);
3163            // Zero out padding regions. There's no need to apply masks
3164            // because the unmasked parts will be overwritten by fields.
3165            // Write the fields.
3166            self.0.encode(encoder, offset + 0, depth)?;
3167            Ok(())
3168        }
3169    }
3170
3171    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3172        for BaseNetworkSocketBindRequest
3173    {
3174        #[inline(always)]
3175        fn new_empty() -> Self {
3176            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
3177        }
3178
3179        #[inline]
3180        unsafe fn decode(
3181            &mut self,
3182            decoder: &mut fidl::encoding::Decoder<'_, D>,
3183            offset: usize,
3184            _depth: fidl::encoding::Depth,
3185        ) -> fidl::Result<()> {
3186            decoder.debug_check_bounds::<Self>(offset);
3187            // Verify that padding bytes are zero.
3188            fidl::decode!(
3189                fidl_fuchsia_net__common::SocketAddress,
3190                D,
3191                &mut self.addr,
3192                decoder,
3193                offset + 0,
3194                _depth
3195            )?;
3196            Ok(())
3197        }
3198    }
3199
3200    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketConnectRequest {
3201        type Borrowed<'a> = &'a Self;
3202        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3203            value
3204        }
3205    }
3206
3207    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketConnectRequest {
3208        type Owned = Self;
3209
3210        #[inline(always)]
3211        fn inline_align(_context: fidl::encoding::Context) -> usize {
3212            8
3213        }
3214
3215        #[inline(always)]
3216        fn inline_size(_context: fidl::encoding::Context) -> usize {
3217            16
3218        }
3219    }
3220
3221    unsafe impl<D: fidl::encoding::ResourceDialect>
3222        fidl::encoding::Encode<BaseNetworkSocketConnectRequest, D>
3223        for &BaseNetworkSocketConnectRequest
3224    {
3225        #[inline]
3226        unsafe fn encode(
3227            self,
3228            encoder: &mut fidl::encoding::Encoder<'_, D>,
3229            offset: usize,
3230            _depth: fidl::encoding::Depth,
3231        ) -> fidl::Result<()> {
3232            encoder.debug_check_bounds::<BaseNetworkSocketConnectRequest>(offset);
3233            // Delegate to tuple encoding.
3234            fidl::encoding::Encode::<BaseNetworkSocketConnectRequest, D>::encode(
3235                (
3236                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
3237                ),
3238                encoder, offset, _depth
3239            )
3240        }
3241    }
3242    unsafe impl<
3243        D: fidl::encoding::ResourceDialect,
3244        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
3245    > fidl::encoding::Encode<BaseNetworkSocketConnectRequest, D> for (T0,)
3246    {
3247        #[inline]
3248        unsafe fn encode(
3249            self,
3250            encoder: &mut fidl::encoding::Encoder<'_, D>,
3251            offset: usize,
3252            depth: fidl::encoding::Depth,
3253        ) -> fidl::Result<()> {
3254            encoder.debug_check_bounds::<BaseNetworkSocketConnectRequest>(offset);
3255            // Zero out padding regions. There's no need to apply masks
3256            // because the unmasked parts will be overwritten by fields.
3257            // Write the fields.
3258            self.0.encode(encoder, offset + 0, depth)?;
3259            Ok(())
3260        }
3261    }
3262
3263    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3264        for BaseNetworkSocketConnectRequest
3265    {
3266        #[inline(always)]
3267        fn new_empty() -> Self {
3268            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
3269        }
3270
3271        #[inline]
3272        unsafe fn decode(
3273            &mut self,
3274            decoder: &mut fidl::encoding::Decoder<'_, D>,
3275            offset: usize,
3276            _depth: fidl::encoding::Depth,
3277        ) -> fidl::Result<()> {
3278            decoder.debug_check_bounds::<Self>(offset);
3279            // Verify that padding bytes are zero.
3280            fidl::decode!(
3281                fidl_fuchsia_net__common::SocketAddress,
3282                D,
3283                &mut self.addr,
3284                decoder,
3285                offset + 0,
3286                _depth
3287            )?;
3288            Ok(())
3289        }
3290    }
3291
3292    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketDropIpMembershipRequest {
3293        type Borrowed<'a> = &'a Self;
3294        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3295            value
3296        }
3297    }
3298
3299    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketDropIpMembershipRequest {
3300        type Owned = Self;
3301
3302        #[inline(always)]
3303        fn inline_align(_context: fidl::encoding::Context) -> usize {
3304            8
3305        }
3306
3307        #[inline(always)]
3308        fn inline_size(_context: fidl::encoding::Context) -> usize {
3309            16
3310        }
3311    }
3312
3313    unsafe impl<D: fidl::encoding::ResourceDialect>
3314        fidl::encoding::Encode<BaseNetworkSocketDropIpMembershipRequest, D>
3315        for &BaseNetworkSocketDropIpMembershipRequest
3316    {
3317        #[inline]
3318        unsafe fn encode(
3319            self,
3320            encoder: &mut fidl::encoding::Encoder<'_, D>,
3321            offset: usize,
3322            _depth: fidl::encoding::Depth,
3323        ) -> fidl::Result<()> {
3324            encoder.debug_check_bounds::<BaseNetworkSocketDropIpMembershipRequest>(offset);
3325            // Delegate to tuple encoding.
3326            fidl::encoding::Encode::<BaseNetworkSocketDropIpMembershipRequest, D>::encode(
3327                (<IpMulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3328                    &self.membership,
3329                ),),
3330                encoder,
3331                offset,
3332                _depth,
3333            )
3334        }
3335    }
3336    unsafe impl<
3337        D: fidl::encoding::ResourceDialect,
3338        T0: fidl::encoding::Encode<IpMulticastMembership, D>,
3339    > fidl::encoding::Encode<BaseNetworkSocketDropIpMembershipRequest, D> for (T0,)
3340    {
3341        #[inline]
3342        unsafe fn encode(
3343            self,
3344            encoder: &mut fidl::encoding::Encoder<'_, D>,
3345            offset: usize,
3346            depth: fidl::encoding::Depth,
3347        ) -> fidl::Result<()> {
3348            encoder.debug_check_bounds::<BaseNetworkSocketDropIpMembershipRequest>(offset);
3349            // Zero out padding regions. There's no need to apply masks
3350            // because the unmasked parts will be overwritten by fields.
3351            // Write the fields.
3352            self.0.encode(encoder, offset + 0, depth)?;
3353            Ok(())
3354        }
3355    }
3356
3357    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3358        for BaseNetworkSocketDropIpMembershipRequest
3359    {
3360        #[inline(always)]
3361        fn new_empty() -> Self {
3362            Self { membership: fidl::new_empty!(IpMulticastMembership, D) }
3363        }
3364
3365        #[inline]
3366        unsafe fn decode(
3367            &mut self,
3368            decoder: &mut fidl::encoding::Decoder<'_, D>,
3369            offset: usize,
3370            _depth: fidl::encoding::Depth,
3371        ) -> fidl::Result<()> {
3372            decoder.debug_check_bounds::<Self>(offset);
3373            // Verify that padding bytes are zero.
3374            fidl::decode!(
3375                IpMulticastMembership,
3376                D,
3377                &mut self.membership,
3378                decoder,
3379                offset + 0,
3380                _depth
3381            )?;
3382            Ok(())
3383        }
3384    }
3385
3386    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketDropIpv6MembershipRequest {
3387        type Borrowed<'a> = &'a Self;
3388        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3389            value
3390        }
3391    }
3392
3393    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketDropIpv6MembershipRequest {
3394        type Owned = Self;
3395
3396        #[inline(always)]
3397        fn inline_align(_context: fidl::encoding::Context) -> usize {
3398            8
3399        }
3400
3401        #[inline(always)]
3402        fn inline_size(_context: fidl::encoding::Context) -> usize {
3403            24
3404        }
3405    }
3406
3407    unsafe impl<D: fidl::encoding::ResourceDialect>
3408        fidl::encoding::Encode<BaseNetworkSocketDropIpv6MembershipRequest, D>
3409        for &BaseNetworkSocketDropIpv6MembershipRequest
3410    {
3411        #[inline]
3412        unsafe fn encode(
3413            self,
3414            encoder: &mut fidl::encoding::Encoder<'_, D>,
3415            offset: usize,
3416            _depth: fidl::encoding::Depth,
3417        ) -> fidl::Result<()> {
3418            encoder.debug_check_bounds::<BaseNetworkSocketDropIpv6MembershipRequest>(offset);
3419            // Delegate to tuple encoding.
3420            fidl::encoding::Encode::<BaseNetworkSocketDropIpv6MembershipRequest, D>::encode(
3421                (<Ipv6MulticastMembership as fidl::encoding::ValueTypeMarker>::borrow(
3422                    &self.membership,
3423                ),),
3424                encoder,
3425                offset,
3426                _depth,
3427            )
3428        }
3429    }
3430    unsafe impl<
3431        D: fidl::encoding::ResourceDialect,
3432        T0: fidl::encoding::Encode<Ipv6MulticastMembership, D>,
3433    > fidl::encoding::Encode<BaseNetworkSocketDropIpv6MembershipRequest, D> for (T0,)
3434    {
3435        #[inline]
3436        unsafe fn encode(
3437            self,
3438            encoder: &mut fidl::encoding::Encoder<'_, D>,
3439            offset: usize,
3440            depth: fidl::encoding::Depth,
3441        ) -> fidl::Result<()> {
3442            encoder.debug_check_bounds::<BaseNetworkSocketDropIpv6MembershipRequest>(offset);
3443            // Zero out padding regions. There's no need to apply masks
3444            // because the unmasked parts will be overwritten by fields.
3445            // Write the fields.
3446            self.0.encode(encoder, offset + 0, depth)?;
3447            Ok(())
3448        }
3449    }
3450
3451    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3452        for BaseNetworkSocketDropIpv6MembershipRequest
3453    {
3454        #[inline(always)]
3455        fn new_empty() -> Self {
3456            Self { membership: fidl::new_empty!(Ipv6MulticastMembership, D) }
3457        }
3458
3459        #[inline]
3460        unsafe fn decode(
3461            &mut self,
3462            decoder: &mut fidl::encoding::Decoder<'_, D>,
3463            offset: usize,
3464            _depth: fidl::encoding::Depth,
3465        ) -> fidl::Result<()> {
3466            decoder.debug_check_bounds::<Self>(offset);
3467            // Verify that padding bytes are zero.
3468            fidl::decode!(
3469                Ipv6MulticastMembership,
3470                D,
3471                &mut self.membership,
3472                decoder,
3473                offset + 0,
3474                _depth
3475            )?;
3476            Ok(())
3477        }
3478    }
3479
3480    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastInterfaceRequest {
3481        type Borrowed<'a> = &'a Self;
3482        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3483            value
3484        }
3485    }
3486
3487    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastInterfaceRequest {
3488        type Owned = Self;
3489
3490        #[inline(always)]
3491        fn inline_align(_context: fidl::encoding::Context) -> usize {
3492            8
3493        }
3494
3495        #[inline(always)]
3496        fn inline_size(_context: fidl::encoding::Context) -> usize {
3497            16
3498        }
3499    }
3500
3501    unsafe impl<D: fidl::encoding::ResourceDialect>
3502        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastInterfaceRequest, D>
3503        for &BaseNetworkSocketSetIpMulticastInterfaceRequest
3504    {
3505        #[inline]
3506        unsafe fn encode(
3507            self,
3508            encoder: &mut fidl::encoding::Encoder<'_, D>,
3509            offset: usize,
3510            _depth: fidl::encoding::Depth,
3511        ) -> fidl::Result<()> {
3512            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastInterfaceRequest>(offset);
3513            // Delegate to tuple encoding.
3514            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastInterfaceRequest, D>::encode(
3515                (
3516                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
3517                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.address),
3518                ),
3519                encoder, offset, _depth
3520            )
3521        }
3522    }
3523    unsafe impl<
3524        D: fidl::encoding::ResourceDialect,
3525        T0: fidl::encoding::Encode<u64, D>,
3526        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
3527    > fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastInterfaceRequest, D> for (T0, T1)
3528    {
3529        #[inline]
3530        unsafe fn encode(
3531            self,
3532            encoder: &mut fidl::encoding::Encoder<'_, D>,
3533            offset: usize,
3534            depth: fidl::encoding::Depth,
3535        ) -> fidl::Result<()> {
3536            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastInterfaceRequest>(offset);
3537            // Zero out padding regions. There's no need to apply masks
3538            // because the unmasked parts will be overwritten by fields.
3539            unsafe {
3540                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3541                (ptr as *mut u64).write_unaligned(0);
3542            }
3543            // Write the fields.
3544            self.0.encode(encoder, offset + 0, depth)?;
3545            self.1.encode(encoder, offset + 8, depth)?;
3546            Ok(())
3547        }
3548    }
3549
3550    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3551        for BaseNetworkSocketSetIpMulticastInterfaceRequest
3552    {
3553        #[inline(always)]
3554        fn new_empty() -> Self {
3555            Self {
3556                iface: fidl::new_empty!(u64, D),
3557                address: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
3558            }
3559        }
3560
3561        #[inline]
3562        unsafe fn decode(
3563            &mut self,
3564            decoder: &mut fidl::encoding::Decoder<'_, D>,
3565            offset: usize,
3566            _depth: fidl::encoding::Depth,
3567        ) -> fidl::Result<()> {
3568            decoder.debug_check_bounds::<Self>(offset);
3569            // Verify that padding bytes are zero.
3570            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3571            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3572            let mask = 0xffffffff00000000u64;
3573            let maskedval = padval & mask;
3574            if maskedval != 0 {
3575                return Err(fidl::Error::NonZeroPadding {
3576                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3577                });
3578            }
3579            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
3580            fidl::decode!(
3581                fidl_fuchsia_net__common::Ipv4Address,
3582                D,
3583                &mut self.address,
3584                decoder,
3585                offset + 8,
3586                _depth
3587            )?;
3588            Ok(())
3589        }
3590    }
3591
3592    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastLoopbackRequest {
3593        type Borrowed<'a> = &'a Self;
3594        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3595            value
3596        }
3597    }
3598
3599    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastLoopbackRequest {
3600        type Owned = Self;
3601
3602        #[inline(always)]
3603        fn inline_align(_context: fidl::encoding::Context) -> usize {
3604            1
3605        }
3606
3607        #[inline(always)]
3608        fn inline_size(_context: fidl::encoding::Context) -> usize {
3609            1
3610        }
3611    }
3612
3613    unsafe impl<D: fidl::encoding::ResourceDialect>
3614        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastLoopbackRequest, D>
3615        for &BaseNetworkSocketSetIpMulticastLoopbackRequest
3616    {
3617        #[inline]
3618        unsafe fn encode(
3619            self,
3620            encoder: &mut fidl::encoding::Encoder<'_, D>,
3621            offset: usize,
3622            _depth: fidl::encoding::Depth,
3623        ) -> fidl::Result<()> {
3624            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastLoopbackRequest>(offset);
3625            // Delegate to tuple encoding.
3626            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastLoopbackRequest, D>::encode(
3627                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3628                encoder,
3629                offset,
3630                _depth,
3631            )
3632        }
3633    }
3634    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3635        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastLoopbackRequest, D> for (T0,)
3636    {
3637        #[inline]
3638        unsafe fn encode(
3639            self,
3640            encoder: &mut fidl::encoding::Encoder<'_, D>,
3641            offset: usize,
3642            depth: fidl::encoding::Depth,
3643        ) -> fidl::Result<()> {
3644            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastLoopbackRequest>(offset);
3645            // Zero out padding regions. There's no need to apply masks
3646            // because the unmasked parts will be overwritten by fields.
3647            // Write the fields.
3648            self.0.encode(encoder, offset + 0, depth)?;
3649            Ok(())
3650        }
3651    }
3652
3653    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3654        for BaseNetworkSocketSetIpMulticastLoopbackRequest
3655    {
3656        #[inline(always)]
3657        fn new_empty() -> Self {
3658            Self { value: fidl::new_empty!(bool, D) }
3659        }
3660
3661        #[inline]
3662        unsafe fn decode(
3663            &mut self,
3664            decoder: &mut fidl::encoding::Decoder<'_, D>,
3665            offset: usize,
3666            _depth: fidl::encoding::Depth,
3667        ) -> fidl::Result<()> {
3668            decoder.debug_check_bounds::<Self>(offset);
3669            // Verify that padding bytes are zero.
3670            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
3671            Ok(())
3672        }
3673    }
3674
3675    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpMulticastTtlRequest {
3676        type Borrowed<'a> = &'a Self;
3677        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3678            value
3679        }
3680    }
3681
3682    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpMulticastTtlRequest {
3683        type Owned = Self;
3684
3685        #[inline(always)]
3686        fn inline_align(_context: fidl::encoding::Context) -> usize {
3687            8
3688        }
3689
3690        #[inline(always)]
3691        fn inline_size(_context: fidl::encoding::Context) -> usize {
3692            16
3693        }
3694    }
3695
3696    unsafe impl<D: fidl::encoding::ResourceDialect>
3697        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastTtlRequest, D>
3698        for &BaseNetworkSocketSetIpMulticastTtlRequest
3699    {
3700        #[inline]
3701        unsafe fn encode(
3702            self,
3703            encoder: &mut fidl::encoding::Encoder<'_, D>,
3704            offset: usize,
3705            _depth: fidl::encoding::Depth,
3706        ) -> fidl::Result<()> {
3707            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastTtlRequest>(offset);
3708            // Delegate to tuple encoding.
3709            fidl::encoding::Encode::<BaseNetworkSocketSetIpMulticastTtlRequest, D>::encode(
3710                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3711                encoder,
3712                offset,
3713                _depth,
3714            )
3715        }
3716    }
3717    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
3718        fidl::encoding::Encode<BaseNetworkSocketSetIpMulticastTtlRequest, D> for (T0,)
3719    {
3720        #[inline]
3721        unsafe fn encode(
3722            self,
3723            encoder: &mut fidl::encoding::Encoder<'_, D>,
3724            offset: usize,
3725            depth: fidl::encoding::Depth,
3726        ) -> fidl::Result<()> {
3727            encoder.debug_check_bounds::<BaseNetworkSocketSetIpMulticastTtlRequest>(offset);
3728            // Zero out padding regions. There's no need to apply masks
3729            // because the unmasked parts will be overwritten by fields.
3730            // Write the fields.
3731            self.0.encode(encoder, offset + 0, depth)?;
3732            Ok(())
3733        }
3734    }
3735
3736    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3737        for BaseNetworkSocketSetIpMulticastTtlRequest
3738    {
3739        #[inline(always)]
3740        fn new_empty() -> Self {
3741            Self { value: fidl::new_empty!(OptionalUint8, D) }
3742        }
3743
3744        #[inline]
3745        unsafe fn decode(
3746            &mut self,
3747            decoder: &mut fidl::encoding::Decoder<'_, D>,
3748            offset: usize,
3749            _depth: fidl::encoding::Depth,
3750        ) -> fidl::Result<()> {
3751            decoder.debug_check_bounds::<Self>(offset);
3752            // Verify that padding bytes are zero.
3753            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
3754            Ok(())
3755        }
3756    }
3757
3758    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpPacketInfoRequest {
3759        type Borrowed<'a> = &'a Self;
3760        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3761            value
3762        }
3763    }
3764
3765    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpPacketInfoRequest {
3766        type Owned = Self;
3767
3768        #[inline(always)]
3769        fn inline_align(_context: fidl::encoding::Context) -> usize {
3770            1
3771        }
3772
3773        #[inline(always)]
3774        fn inline_size(_context: fidl::encoding::Context) -> usize {
3775            1
3776        }
3777    }
3778
3779    unsafe impl<D: fidl::encoding::ResourceDialect>
3780        fidl::encoding::Encode<BaseNetworkSocketSetIpPacketInfoRequest, D>
3781        for &BaseNetworkSocketSetIpPacketInfoRequest
3782    {
3783        #[inline]
3784        unsafe fn encode(
3785            self,
3786            encoder: &mut fidl::encoding::Encoder<'_, D>,
3787            offset: usize,
3788            _depth: fidl::encoding::Depth,
3789        ) -> fidl::Result<()> {
3790            encoder.debug_check_bounds::<BaseNetworkSocketSetIpPacketInfoRequest>(offset);
3791            // Delegate to tuple encoding.
3792            fidl::encoding::Encode::<BaseNetworkSocketSetIpPacketInfoRequest, D>::encode(
3793                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3794                encoder,
3795                offset,
3796                _depth,
3797            )
3798        }
3799    }
3800    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3801        fidl::encoding::Encode<BaseNetworkSocketSetIpPacketInfoRequest, D> for (T0,)
3802    {
3803        #[inline]
3804        unsafe fn encode(
3805            self,
3806            encoder: &mut fidl::encoding::Encoder<'_, D>,
3807            offset: usize,
3808            depth: fidl::encoding::Depth,
3809        ) -> fidl::Result<()> {
3810            encoder.debug_check_bounds::<BaseNetworkSocketSetIpPacketInfoRequest>(offset);
3811            // Zero out padding regions. There's no need to apply masks
3812            // because the unmasked parts will be overwritten by fields.
3813            // Write the fields.
3814            self.0.encode(encoder, offset + 0, depth)?;
3815            Ok(())
3816        }
3817    }
3818
3819    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3820        for BaseNetworkSocketSetIpPacketInfoRequest
3821    {
3822        #[inline(always)]
3823        fn new_empty() -> Self {
3824            Self { value: fidl::new_empty!(bool, D) }
3825        }
3826
3827        #[inline]
3828        unsafe fn decode(
3829            &mut self,
3830            decoder: &mut fidl::encoding::Decoder<'_, D>,
3831            offset: usize,
3832            _depth: fidl::encoding::Depth,
3833        ) -> fidl::Result<()> {
3834            decoder.debug_check_bounds::<Self>(offset);
3835            // Verify that padding bytes are zero.
3836            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
3837            Ok(())
3838        }
3839    }
3840
3841    impl fidl::encoding::ValueTypeMarker
3842        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
3843    {
3844        type Borrowed<'a> = &'a Self;
3845        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3846            value
3847        }
3848    }
3849
3850    unsafe impl fidl::encoding::TypeMarker
3851        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
3852    {
3853        type Owned = Self;
3854
3855        #[inline(always)]
3856        fn inline_align(_context: fidl::encoding::Context) -> usize {
3857            1
3858        }
3859
3860        #[inline(always)]
3861        fn inline_size(_context: fidl::encoding::Context) -> usize {
3862            1
3863        }
3864    }
3865
3866    unsafe impl<D: fidl::encoding::ResourceDialect>
3867        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest, D>
3868        for &BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
3869    {
3870        #[inline]
3871        unsafe fn encode(
3872            self,
3873            encoder: &mut fidl::encoding::Encoder<'_, D>,
3874            offset: usize,
3875            _depth: fidl::encoding::Depth,
3876        ) -> fidl::Result<()> {
3877            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest>(offset);
3878            // Delegate to tuple encoding.
3879            fidl::encoding::Encode::<
3880                BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest,
3881                D,
3882            >::encode(
3883                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3884                encoder,
3885                offset,
3886                _depth,
3887            )
3888        }
3889    }
3890    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3891        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest, D>
3892        for (T0,)
3893    {
3894        #[inline]
3895        unsafe fn encode(
3896            self,
3897            encoder: &mut fidl::encoding::Encoder<'_, D>,
3898            offset: usize,
3899            depth: fidl::encoding::Depth,
3900        ) -> fidl::Result<()> {
3901            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest>(offset);
3902            // Zero out padding regions. There's no need to apply masks
3903            // because the unmasked parts will be overwritten by fields.
3904            // Write the fields.
3905            self.0.encode(encoder, offset + 0, depth)?;
3906            Ok(())
3907        }
3908    }
3909
3910    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3911        for BaseNetworkSocketSetIpReceiveOriginalDestinationAddressRequest
3912    {
3913        #[inline(always)]
3914        fn new_empty() -> Self {
3915            Self { value: fidl::new_empty!(bool, D) }
3916        }
3917
3918        #[inline]
3919        unsafe fn decode(
3920            &mut self,
3921            decoder: &mut fidl::encoding::Decoder<'_, D>,
3922            offset: usize,
3923            _depth: fidl::encoding::Depth,
3924        ) -> fidl::Result<()> {
3925            decoder.debug_check_bounds::<Self>(offset);
3926            // Verify that padding bytes are zero.
3927            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
3928            Ok(())
3929        }
3930    }
3931
3932    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpReceiveTtlRequest {
3933        type Borrowed<'a> = &'a Self;
3934        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3935            value
3936        }
3937    }
3938
3939    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpReceiveTtlRequest {
3940        type Owned = Self;
3941
3942        #[inline(always)]
3943        fn inline_align(_context: fidl::encoding::Context) -> usize {
3944            1
3945        }
3946
3947        #[inline(always)]
3948        fn inline_size(_context: fidl::encoding::Context) -> usize {
3949            1
3950        }
3951    }
3952
3953    unsafe impl<D: fidl::encoding::ResourceDialect>
3954        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTtlRequest, D>
3955        for &BaseNetworkSocketSetIpReceiveTtlRequest
3956    {
3957        #[inline]
3958        unsafe fn encode(
3959            self,
3960            encoder: &mut fidl::encoding::Encoder<'_, D>,
3961            offset: usize,
3962            _depth: fidl::encoding::Depth,
3963        ) -> fidl::Result<()> {
3964            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTtlRequest>(offset);
3965            // Delegate to tuple encoding.
3966            fidl::encoding::Encode::<BaseNetworkSocketSetIpReceiveTtlRequest, D>::encode(
3967                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
3968                encoder,
3969                offset,
3970                _depth,
3971            )
3972        }
3973    }
3974    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3975        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTtlRequest, D> for (T0,)
3976    {
3977        #[inline]
3978        unsafe fn encode(
3979            self,
3980            encoder: &mut fidl::encoding::Encoder<'_, D>,
3981            offset: usize,
3982            depth: fidl::encoding::Depth,
3983        ) -> fidl::Result<()> {
3984            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTtlRequest>(offset);
3985            // Zero out padding regions. There's no need to apply masks
3986            // because the unmasked parts will be overwritten by fields.
3987            // Write the fields.
3988            self.0.encode(encoder, offset + 0, depth)?;
3989            Ok(())
3990        }
3991    }
3992
3993    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3994        for BaseNetworkSocketSetIpReceiveTtlRequest
3995    {
3996        #[inline(always)]
3997        fn new_empty() -> Self {
3998            Self { value: fidl::new_empty!(bool, D) }
3999        }
4000
4001        #[inline]
4002        unsafe fn decode(
4003            &mut self,
4004            decoder: &mut fidl::encoding::Decoder<'_, D>,
4005            offset: usize,
4006            _depth: fidl::encoding::Depth,
4007        ) -> fidl::Result<()> {
4008            decoder.debug_check_bounds::<Self>(offset);
4009            // Verify that padding bytes are zero.
4010            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4011            Ok(())
4012        }
4013    }
4014
4015    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
4016        type Borrowed<'a> = &'a Self;
4017        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4018            value
4019        }
4020    }
4021
4022    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest {
4023        type Owned = Self;
4024
4025        #[inline(always)]
4026        fn inline_align(_context: fidl::encoding::Context) -> usize {
4027            1
4028        }
4029
4030        #[inline(always)]
4031        fn inline_size(_context: fidl::encoding::Context) -> usize {
4032            1
4033        }
4034    }
4035
4036    unsafe impl<D: fidl::encoding::ResourceDialect>
4037        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D>
4038        for &BaseNetworkSocketSetIpReceiveTypeOfServiceRequest
4039    {
4040        #[inline]
4041        unsafe fn encode(
4042            self,
4043            encoder: &mut fidl::encoding::Encoder<'_, D>,
4044            offset: usize,
4045            _depth: fidl::encoding::Depth,
4046        ) -> fidl::Result<()> {
4047            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest>(offset);
4048            // Delegate to tuple encoding.
4049            fidl::encoding::Encode::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D>::encode(
4050                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4051                encoder,
4052                offset,
4053                _depth,
4054            )
4055        }
4056    }
4057    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4058        fidl::encoding::Encode<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest, D> for (T0,)
4059    {
4060        #[inline]
4061        unsafe fn encode(
4062            self,
4063            encoder: &mut fidl::encoding::Encoder<'_, D>,
4064            offset: usize,
4065            depth: fidl::encoding::Depth,
4066        ) -> fidl::Result<()> {
4067            encoder.debug_check_bounds::<BaseNetworkSocketSetIpReceiveTypeOfServiceRequest>(offset);
4068            // Zero out padding regions. There's no need to apply masks
4069            // because the unmasked parts will be overwritten by fields.
4070            // Write the fields.
4071            self.0.encode(encoder, offset + 0, depth)?;
4072            Ok(())
4073        }
4074    }
4075
4076    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4077        for BaseNetworkSocketSetIpReceiveTypeOfServiceRequest
4078    {
4079        #[inline(always)]
4080        fn new_empty() -> Self {
4081            Self { value: fidl::new_empty!(bool, D) }
4082        }
4083
4084        #[inline]
4085        unsafe fn decode(
4086            &mut self,
4087            decoder: &mut fidl::encoding::Decoder<'_, D>,
4088            offset: usize,
4089            _depth: fidl::encoding::Depth,
4090        ) -> fidl::Result<()> {
4091            decoder.debug_check_bounds::<Self>(offset);
4092            // Verify that padding bytes are zero.
4093            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4094            Ok(())
4095        }
4096    }
4097
4098    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTransparentRequest {
4099        type Borrowed<'a> = &'a Self;
4100        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4101            value
4102        }
4103    }
4104
4105    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTransparentRequest {
4106        type Owned = Self;
4107
4108        #[inline(always)]
4109        fn inline_align(_context: fidl::encoding::Context) -> usize {
4110            1
4111        }
4112
4113        #[inline(always)]
4114        fn inline_size(_context: fidl::encoding::Context) -> usize {
4115            1
4116        }
4117    }
4118
4119    unsafe impl<D: fidl::encoding::ResourceDialect>
4120        fidl::encoding::Encode<BaseNetworkSocketSetIpTransparentRequest, D>
4121        for &BaseNetworkSocketSetIpTransparentRequest
4122    {
4123        #[inline]
4124        unsafe fn encode(
4125            self,
4126            encoder: &mut fidl::encoding::Encoder<'_, D>,
4127            offset: usize,
4128            _depth: fidl::encoding::Depth,
4129        ) -> fidl::Result<()> {
4130            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTransparentRequest>(offset);
4131            // Delegate to tuple encoding.
4132            fidl::encoding::Encode::<BaseNetworkSocketSetIpTransparentRequest, D>::encode(
4133                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4134                encoder,
4135                offset,
4136                _depth,
4137            )
4138        }
4139    }
4140    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4141        fidl::encoding::Encode<BaseNetworkSocketSetIpTransparentRequest, D> for (T0,)
4142    {
4143        #[inline]
4144        unsafe fn encode(
4145            self,
4146            encoder: &mut fidl::encoding::Encoder<'_, D>,
4147            offset: usize,
4148            depth: fidl::encoding::Depth,
4149        ) -> fidl::Result<()> {
4150            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTransparentRequest>(offset);
4151            // Zero out padding regions. There's no need to apply masks
4152            // because the unmasked parts will be overwritten by fields.
4153            // Write the fields.
4154            self.0.encode(encoder, offset + 0, depth)?;
4155            Ok(())
4156        }
4157    }
4158
4159    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4160        for BaseNetworkSocketSetIpTransparentRequest
4161    {
4162        #[inline(always)]
4163        fn new_empty() -> Self {
4164            Self { value: fidl::new_empty!(bool, D) }
4165        }
4166
4167        #[inline]
4168        unsafe fn decode(
4169            &mut self,
4170            decoder: &mut fidl::encoding::Decoder<'_, D>,
4171            offset: usize,
4172            _depth: fidl::encoding::Depth,
4173        ) -> fidl::Result<()> {
4174            decoder.debug_check_bounds::<Self>(offset);
4175            // Verify that padding bytes are zero.
4176            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4177            Ok(())
4178        }
4179    }
4180
4181    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTtlRequest {
4182        type Borrowed<'a> = &'a Self;
4183        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4184            value
4185        }
4186    }
4187
4188    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTtlRequest {
4189        type Owned = Self;
4190
4191        #[inline(always)]
4192        fn inline_align(_context: fidl::encoding::Context) -> usize {
4193            8
4194        }
4195
4196        #[inline(always)]
4197        fn inline_size(_context: fidl::encoding::Context) -> usize {
4198            16
4199        }
4200    }
4201
4202    unsafe impl<D: fidl::encoding::ResourceDialect>
4203        fidl::encoding::Encode<BaseNetworkSocketSetIpTtlRequest, D>
4204        for &BaseNetworkSocketSetIpTtlRequest
4205    {
4206        #[inline]
4207        unsafe fn encode(
4208            self,
4209            encoder: &mut fidl::encoding::Encoder<'_, D>,
4210            offset: usize,
4211            _depth: fidl::encoding::Depth,
4212        ) -> fidl::Result<()> {
4213            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTtlRequest>(offset);
4214            // Delegate to tuple encoding.
4215            fidl::encoding::Encode::<BaseNetworkSocketSetIpTtlRequest, D>::encode(
4216                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4217                encoder,
4218                offset,
4219                _depth,
4220            )
4221        }
4222    }
4223    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
4224        fidl::encoding::Encode<BaseNetworkSocketSetIpTtlRequest, D> for (T0,)
4225    {
4226        #[inline]
4227        unsafe fn encode(
4228            self,
4229            encoder: &mut fidl::encoding::Encoder<'_, D>,
4230            offset: usize,
4231            depth: fidl::encoding::Depth,
4232        ) -> fidl::Result<()> {
4233            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTtlRequest>(offset);
4234            // Zero out padding regions. There's no need to apply masks
4235            // because the unmasked parts will be overwritten by fields.
4236            // Write the fields.
4237            self.0.encode(encoder, offset + 0, depth)?;
4238            Ok(())
4239        }
4240    }
4241
4242    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4243        for BaseNetworkSocketSetIpTtlRequest
4244    {
4245        #[inline(always)]
4246        fn new_empty() -> Self {
4247            Self { value: fidl::new_empty!(OptionalUint8, D) }
4248        }
4249
4250        #[inline]
4251        unsafe fn decode(
4252            &mut self,
4253            decoder: &mut fidl::encoding::Decoder<'_, D>,
4254            offset: usize,
4255            _depth: fidl::encoding::Depth,
4256        ) -> fidl::Result<()> {
4257            decoder.debug_check_bounds::<Self>(offset);
4258            // Verify that padding bytes are zero.
4259            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
4260            Ok(())
4261        }
4262    }
4263
4264    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpTypeOfServiceRequest {
4265        type Borrowed<'a> = &'a Self;
4266        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4267            value
4268        }
4269    }
4270
4271    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpTypeOfServiceRequest {
4272        type Owned = Self;
4273
4274        #[inline(always)]
4275        fn inline_align(_context: fidl::encoding::Context) -> usize {
4276            1
4277        }
4278
4279        #[inline(always)]
4280        fn inline_size(_context: fidl::encoding::Context) -> usize {
4281            1
4282        }
4283        #[inline(always)]
4284        fn encode_is_copy() -> bool {
4285            true
4286        }
4287
4288        #[inline(always)]
4289        fn decode_is_copy() -> bool {
4290            true
4291        }
4292    }
4293
4294    unsafe impl<D: fidl::encoding::ResourceDialect>
4295        fidl::encoding::Encode<BaseNetworkSocketSetIpTypeOfServiceRequest, D>
4296        for &BaseNetworkSocketSetIpTypeOfServiceRequest
4297    {
4298        #[inline]
4299        unsafe fn encode(
4300            self,
4301            encoder: &mut fidl::encoding::Encoder<'_, D>,
4302            offset: usize,
4303            _depth: fidl::encoding::Depth,
4304        ) -> fidl::Result<()> {
4305            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTypeOfServiceRequest>(offset);
4306            unsafe {
4307                // Copy the object into the buffer.
4308                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4309                (buf_ptr as *mut BaseNetworkSocketSetIpTypeOfServiceRequest).write_unaligned(
4310                    (self as *const BaseNetworkSocketSetIpTypeOfServiceRequest).read(),
4311                );
4312                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4313                // done second because the memcpy will write garbage to these bytes.
4314            }
4315            Ok(())
4316        }
4317    }
4318    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
4319        fidl::encoding::Encode<BaseNetworkSocketSetIpTypeOfServiceRequest, D> for (T0,)
4320    {
4321        #[inline]
4322        unsafe fn encode(
4323            self,
4324            encoder: &mut fidl::encoding::Encoder<'_, D>,
4325            offset: usize,
4326            depth: fidl::encoding::Depth,
4327        ) -> fidl::Result<()> {
4328            encoder.debug_check_bounds::<BaseNetworkSocketSetIpTypeOfServiceRequest>(offset);
4329            // Zero out padding regions. There's no need to apply masks
4330            // because the unmasked parts will be overwritten by fields.
4331            // Write the fields.
4332            self.0.encode(encoder, offset + 0, depth)?;
4333            Ok(())
4334        }
4335    }
4336
4337    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4338        for BaseNetworkSocketSetIpTypeOfServiceRequest
4339    {
4340        #[inline(always)]
4341        fn new_empty() -> Self {
4342            Self { value: fidl::new_empty!(u8, D) }
4343        }
4344
4345        #[inline]
4346        unsafe fn decode(
4347            &mut self,
4348            decoder: &mut fidl::encoding::Decoder<'_, D>,
4349            offset: usize,
4350            _depth: fidl::encoding::Depth,
4351        ) -> fidl::Result<()> {
4352            decoder.debug_check_bounds::<Self>(offset);
4353            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4354            // Verify that padding bytes are zero.
4355            // Copy from the buffer into the object.
4356            unsafe {
4357                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
4358            }
4359            Ok(())
4360        }
4361    }
4362
4363    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastHopsRequest {
4364        type Borrowed<'a> = &'a Self;
4365        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4366            value
4367        }
4368    }
4369
4370    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastHopsRequest {
4371        type Owned = Self;
4372
4373        #[inline(always)]
4374        fn inline_align(_context: fidl::encoding::Context) -> usize {
4375            8
4376        }
4377
4378        #[inline(always)]
4379        fn inline_size(_context: fidl::encoding::Context) -> usize {
4380            16
4381        }
4382    }
4383
4384    unsafe impl<D: fidl::encoding::ResourceDialect>
4385        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastHopsRequest, D>
4386        for &BaseNetworkSocketSetIpv6MulticastHopsRequest
4387    {
4388        #[inline]
4389        unsafe fn encode(
4390            self,
4391            encoder: &mut fidl::encoding::Encoder<'_, D>,
4392            offset: usize,
4393            _depth: fidl::encoding::Depth,
4394        ) -> fidl::Result<()> {
4395            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastHopsRequest>(offset);
4396            // Delegate to tuple encoding.
4397            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6MulticastHopsRequest, D>::encode(
4398                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4399                encoder,
4400                offset,
4401                _depth,
4402            )
4403        }
4404    }
4405    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
4406        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastHopsRequest, D> for (T0,)
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::<BaseNetworkSocketSetIpv6MulticastHopsRequest>(offset);
4416            // Zero out padding regions. There's no need to apply masks
4417            // because the unmasked parts will be overwritten by fields.
4418            // Write the fields.
4419            self.0.encode(encoder, offset + 0, depth)?;
4420            Ok(())
4421        }
4422    }
4423
4424    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4425        for BaseNetworkSocketSetIpv6MulticastHopsRequest
4426    {
4427        #[inline(always)]
4428        fn new_empty() -> Self {
4429            Self { value: fidl::new_empty!(OptionalUint8, D) }
4430        }
4431
4432        #[inline]
4433        unsafe fn decode(
4434            &mut self,
4435            decoder: &mut fidl::encoding::Decoder<'_, D>,
4436            offset: usize,
4437            _depth: fidl::encoding::Depth,
4438        ) -> fidl::Result<()> {
4439            decoder.debug_check_bounds::<Self>(offset);
4440            // Verify that padding bytes are zero.
4441            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
4442            Ok(())
4443        }
4444    }
4445
4446    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
4447        type Borrowed<'a> = &'a Self;
4448        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4449            value
4450        }
4451    }
4452
4453    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastInterfaceRequest {
4454        type Owned = Self;
4455
4456        #[inline(always)]
4457        fn inline_align(_context: fidl::encoding::Context) -> usize {
4458            8
4459        }
4460
4461        #[inline(always)]
4462        fn inline_size(_context: fidl::encoding::Context) -> usize {
4463            8
4464        }
4465        #[inline(always)]
4466        fn encode_is_copy() -> bool {
4467            true
4468        }
4469
4470        #[inline(always)]
4471        fn decode_is_copy() -> bool {
4472            true
4473        }
4474    }
4475
4476    unsafe impl<D: fidl::encoding::ResourceDialect>
4477        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastInterfaceRequest, D>
4478        for &BaseNetworkSocketSetIpv6MulticastInterfaceRequest
4479    {
4480        #[inline]
4481        unsafe fn encode(
4482            self,
4483            encoder: &mut fidl::encoding::Encoder<'_, D>,
4484            offset: usize,
4485            _depth: fidl::encoding::Depth,
4486        ) -> fidl::Result<()> {
4487            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastInterfaceRequest>(offset);
4488            unsafe {
4489                // Copy the object into the buffer.
4490                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4491                (buf_ptr as *mut BaseNetworkSocketSetIpv6MulticastInterfaceRequest)
4492                    .write_unaligned(
4493                        (self as *const BaseNetworkSocketSetIpv6MulticastInterfaceRequest).read(),
4494                    );
4495                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4496                // done second because the memcpy will write garbage to these bytes.
4497            }
4498            Ok(())
4499        }
4500    }
4501    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
4502        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastInterfaceRequest, D> for (T0,)
4503    {
4504        #[inline]
4505        unsafe fn encode(
4506            self,
4507            encoder: &mut fidl::encoding::Encoder<'_, D>,
4508            offset: usize,
4509            depth: fidl::encoding::Depth,
4510        ) -> fidl::Result<()> {
4511            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastInterfaceRequest>(offset);
4512            // Zero out padding regions. There's no need to apply masks
4513            // because the unmasked parts will be overwritten by fields.
4514            // Write the fields.
4515            self.0.encode(encoder, offset + 0, depth)?;
4516            Ok(())
4517        }
4518    }
4519
4520    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4521        for BaseNetworkSocketSetIpv6MulticastInterfaceRequest
4522    {
4523        #[inline(always)]
4524        fn new_empty() -> Self {
4525            Self { value: fidl::new_empty!(u64, D) }
4526        }
4527
4528        #[inline]
4529        unsafe fn decode(
4530            &mut self,
4531            decoder: &mut fidl::encoding::Decoder<'_, D>,
4532            offset: usize,
4533            _depth: fidl::encoding::Depth,
4534        ) -> fidl::Result<()> {
4535            decoder.debug_check_bounds::<Self>(offset);
4536            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4537            // Verify that padding bytes are zero.
4538            // Copy from the buffer into the object.
4539            unsafe {
4540                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4541            }
4542            Ok(())
4543        }
4544    }
4545
4546    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
4547        type Borrowed<'a> = &'a Self;
4548        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4549            value
4550        }
4551    }
4552
4553    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6MulticastLoopbackRequest {
4554        type Owned = Self;
4555
4556        #[inline(always)]
4557        fn inline_align(_context: fidl::encoding::Context) -> usize {
4558            1
4559        }
4560
4561        #[inline(always)]
4562        fn inline_size(_context: fidl::encoding::Context) -> usize {
4563            1
4564        }
4565    }
4566
4567    unsafe impl<D: fidl::encoding::ResourceDialect>
4568        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D>
4569        for &BaseNetworkSocketSetIpv6MulticastLoopbackRequest
4570    {
4571        #[inline]
4572        unsafe fn encode(
4573            self,
4574            encoder: &mut fidl::encoding::Encoder<'_, D>,
4575            offset: usize,
4576            _depth: fidl::encoding::Depth,
4577        ) -> fidl::Result<()> {
4578            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest>(offset);
4579            // Delegate to tuple encoding.
4580            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D>::encode(
4581                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4582                encoder,
4583                offset,
4584                _depth,
4585            )
4586        }
4587    }
4588    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4589        fidl::encoding::Encode<BaseNetworkSocketSetIpv6MulticastLoopbackRequest, D> for (T0,)
4590    {
4591        #[inline]
4592        unsafe fn encode(
4593            self,
4594            encoder: &mut fidl::encoding::Encoder<'_, D>,
4595            offset: usize,
4596            depth: fidl::encoding::Depth,
4597        ) -> fidl::Result<()> {
4598            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6MulticastLoopbackRequest>(offset);
4599            // Zero out padding regions. There's no need to apply masks
4600            // because the unmasked parts will be overwritten by fields.
4601            // Write the fields.
4602            self.0.encode(encoder, offset + 0, depth)?;
4603            Ok(())
4604        }
4605    }
4606
4607    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4608        for BaseNetworkSocketSetIpv6MulticastLoopbackRequest
4609    {
4610        #[inline(always)]
4611        fn new_empty() -> Self {
4612            Self { value: fidl::new_empty!(bool, D) }
4613        }
4614
4615        #[inline]
4616        unsafe fn decode(
4617            &mut self,
4618            decoder: &mut fidl::encoding::Decoder<'_, D>,
4619            offset: usize,
4620            _depth: fidl::encoding::Depth,
4621        ) -> fidl::Result<()> {
4622            decoder.debug_check_bounds::<Self>(offset);
4623            // Verify that padding bytes are zero.
4624            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4625            Ok(())
4626        }
4627    }
4628
4629    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6OnlyRequest {
4630        type Borrowed<'a> = &'a Self;
4631        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4632            value
4633        }
4634    }
4635
4636    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6OnlyRequest {
4637        type Owned = Self;
4638
4639        #[inline(always)]
4640        fn inline_align(_context: fidl::encoding::Context) -> usize {
4641            1
4642        }
4643
4644        #[inline(always)]
4645        fn inline_size(_context: fidl::encoding::Context) -> usize {
4646            1
4647        }
4648    }
4649
4650    unsafe impl<D: fidl::encoding::ResourceDialect>
4651        fidl::encoding::Encode<BaseNetworkSocketSetIpv6OnlyRequest, D>
4652        for &BaseNetworkSocketSetIpv6OnlyRequest
4653    {
4654        #[inline]
4655        unsafe fn encode(
4656            self,
4657            encoder: &mut fidl::encoding::Encoder<'_, D>,
4658            offset: usize,
4659            _depth: fidl::encoding::Depth,
4660        ) -> fidl::Result<()> {
4661            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6OnlyRequest>(offset);
4662            // Delegate to tuple encoding.
4663            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6OnlyRequest, D>::encode(
4664                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4665                encoder,
4666                offset,
4667                _depth,
4668            )
4669        }
4670    }
4671    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4672        fidl::encoding::Encode<BaseNetworkSocketSetIpv6OnlyRequest, D> for (T0,)
4673    {
4674        #[inline]
4675        unsafe fn encode(
4676            self,
4677            encoder: &mut fidl::encoding::Encoder<'_, D>,
4678            offset: usize,
4679            depth: fidl::encoding::Depth,
4680        ) -> fidl::Result<()> {
4681            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6OnlyRequest>(offset);
4682            // Zero out padding regions. There's no need to apply masks
4683            // because the unmasked parts will be overwritten by fields.
4684            // Write the fields.
4685            self.0.encode(encoder, offset + 0, depth)?;
4686            Ok(())
4687        }
4688    }
4689
4690    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4691        for BaseNetworkSocketSetIpv6OnlyRequest
4692    {
4693        #[inline(always)]
4694        fn new_empty() -> Self {
4695            Self { value: fidl::new_empty!(bool, D) }
4696        }
4697
4698        #[inline]
4699        unsafe fn decode(
4700            &mut self,
4701            decoder: &mut fidl::encoding::Decoder<'_, D>,
4702            offset: usize,
4703            _depth: fidl::encoding::Depth,
4704        ) -> fidl::Result<()> {
4705            decoder.debug_check_bounds::<Self>(offset);
4706            // Verify that padding bytes are zero.
4707            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4708            Ok(())
4709        }
4710    }
4711
4712    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
4713        type Borrowed<'a> = &'a Self;
4714        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4715            value
4716        }
4717    }
4718
4719    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest {
4720        type Owned = Self;
4721
4722        #[inline(always)]
4723        fn inline_align(_context: fidl::encoding::Context) -> usize {
4724            1
4725        }
4726
4727        #[inline(always)]
4728        fn inline_size(_context: fidl::encoding::Context) -> usize {
4729            1
4730        }
4731    }
4732
4733    unsafe impl<D: fidl::encoding::ResourceDialect>
4734        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D>
4735        for &BaseNetworkSocketSetIpv6ReceiveHopLimitRequest
4736    {
4737        #[inline]
4738        unsafe fn encode(
4739            self,
4740            encoder: &mut fidl::encoding::Encoder<'_, D>,
4741            offset: usize,
4742            _depth: fidl::encoding::Depth,
4743        ) -> fidl::Result<()> {
4744            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest>(offset);
4745            // Delegate to tuple encoding.
4746            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D>::encode(
4747                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4748                encoder,
4749                offset,
4750                _depth,
4751            )
4752        }
4753    }
4754    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4755        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest, D> for (T0,)
4756    {
4757        #[inline]
4758        unsafe fn encode(
4759            self,
4760            encoder: &mut fidl::encoding::Encoder<'_, D>,
4761            offset: usize,
4762            depth: fidl::encoding::Depth,
4763        ) -> fidl::Result<()> {
4764            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveHopLimitRequest>(offset);
4765            // Zero out padding regions. There's no need to apply masks
4766            // because the unmasked parts will be overwritten by fields.
4767            // Write the fields.
4768            self.0.encode(encoder, offset + 0, depth)?;
4769            Ok(())
4770        }
4771    }
4772
4773    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4774        for BaseNetworkSocketSetIpv6ReceiveHopLimitRequest
4775    {
4776        #[inline(always)]
4777        fn new_empty() -> Self {
4778            Self { value: fidl::new_empty!(bool, D) }
4779        }
4780
4781        #[inline]
4782        unsafe fn decode(
4783            &mut self,
4784            decoder: &mut fidl::encoding::Decoder<'_, D>,
4785            offset: usize,
4786            _depth: fidl::encoding::Depth,
4787        ) -> fidl::Result<()> {
4788            decoder.debug_check_bounds::<Self>(offset);
4789            // Verify that padding bytes are zero.
4790            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4791            Ok(())
4792        }
4793    }
4794
4795    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
4796        type Borrowed<'a> = &'a Self;
4797        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4798            value
4799        }
4800    }
4801
4802    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest {
4803        type Owned = Self;
4804
4805        #[inline(always)]
4806        fn inline_align(_context: fidl::encoding::Context) -> usize {
4807            1
4808        }
4809
4810        #[inline(always)]
4811        fn inline_size(_context: fidl::encoding::Context) -> usize {
4812            1
4813        }
4814    }
4815
4816    unsafe impl<D: fidl::encoding::ResourceDialect>
4817        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D>
4818        for &BaseNetworkSocketSetIpv6ReceivePacketInfoRequest
4819    {
4820        #[inline]
4821        unsafe fn encode(
4822            self,
4823            encoder: &mut fidl::encoding::Encoder<'_, D>,
4824            offset: usize,
4825            _depth: fidl::encoding::Depth,
4826        ) -> fidl::Result<()> {
4827            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest>(offset);
4828            // Delegate to tuple encoding.
4829            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D>::encode(
4830                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4831                encoder,
4832                offset,
4833                _depth,
4834            )
4835        }
4836    }
4837    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4838        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest, D> for (T0,)
4839    {
4840        #[inline]
4841        unsafe fn encode(
4842            self,
4843            encoder: &mut fidl::encoding::Encoder<'_, D>,
4844            offset: usize,
4845            depth: fidl::encoding::Depth,
4846        ) -> fidl::Result<()> {
4847            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6ReceivePacketInfoRequest>(offset);
4848            // Zero out padding regions. There's no need to apply masks
4849            // because the unmasked parts will be overwritten by fields.
4850            // Write the fields.
4851            self.0.encode(encoder, offset + 0, depth)?;
4852            Ok(())
4853        }
4854    }
4855
4856    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4857        for BaseNetworkSocketSetIpv6ReceivePacketInfoRequest
4858    {
4859        #[inline(always)]
4860        fn new_empty() -> Self {
4861            Self { value: fidl::new_empty!(bool, D) }
4862        }
4863
4864        #[inline]
4865        unsafe fn decode(
4866            &mut self,
4867            decoder: &mut fidl::encoding::Decoder<'_, D>,
4868            offset: usize,
4869            _depth: fidl::encoding::Depth,
4870        ) -> fidl::Result<()> {
4871            decoder.debug_check_bounds::<Self>(offset);
4872            // Verify that padding bytes are zero.
4873            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4874            Ok(())
4875        }
4876    }
4877
4878    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
4879        type Borrowed<'a> = &'a Self;
4880        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4881            value
4882        }
4883    }
4884
4885    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest {
4886        type Owned = Self;
4887
4888        #[inline(always)]
4889        fn inline_align(_context: fidl::encoding::Context) -> usize {
4890            1
4891        }
4892
4893        #[inline(always)]
4894        fn inline_size(_context: fidl::encoding::Context) -> usize {
4895            1
4896        }
4897    }
4898
4899    unsafe impl<D: fidl::encoding::ResourceDialect>
4900        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D>
4901        for &BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest
4902    {
4903        #[inline]
4904        unsafe fn encode(
4905            self,
4906            encoder: &mut fidl::encoding::Encoder<'_, D>,
4907            offset: usize,
4908            _depth: fidl::encoding::Depth,
4909        ) -> fidl::Result<()> {
4910            encoder
4911                .debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest>(offset);
4912            // Delegate to tuple encoding.
4913            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D>::encode(
4914                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4915                encoder,
4916                offset,
4917                _depth,
4918            )
4919        }
4920    }
4921    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4922        fidl::encoding::Encode<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest, D> for (T0,)
4923    {
4924        #[inline]
4925        unsafe fn encode(
4926            self,
4927            encoder: &mut fidl::encoding::Encoder<'_, D>,
4928            offset: usize,
4929            depth: fidl::encoding::Depth,
4930        ) -> fidl::Result<()> {
4931            encoder
4932                .debug_check_bounds::<BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest>(offset);
4933            // Zero out padding regions. There's no need to apply masks
4934            // because the unmasked parts will be overwritten by fields.
4935            // Write the fields.
4936            self.0.encode(encoder, offset + 0, depth)?;
4937            Ok(())
4938        }
4939    }
4940
4941    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4942        for BaseNetworkSocketSetIpv6ReceiveTrafficClassRequest
4943    {
4944        #[inline(always)]
4945        fn new_empty() -> Self {
4946            Self { value: fidl::new_empty!(bool, D) }
4947        }
4948
4949        #[inline]
4950        unsafe fn decode(
4951            &mut self,
4952            decoder: &mut fidl::encoding::Decoder<'_, D>,
4953            offset: usize,
4954            _depth: fidl::encoding::Depth,
4955        ) -> fidl::Result<()> {
4956            decoder.debug_check_bounds::<Self>(offset);
4957            // Verify that padding bytes are zero.
4958            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4959            Ok(())
4960        }
4961    }
4962
4963    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6TrafficClassRequest {
4964        type Borrowed<'a> = &'a Self;
4965        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4966            value
4967        }
4968    }
4969
4970    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6TrafficClassRequest {
4971        type Owned = Self;
4972
4973        #[inline(always)]
4974        fn inline_align(_context: fidl::encoding::Context) -> usize {
4975            8
4976        }
4977
4978        #[inline(always)]
4979        fn inline_size(_context: fidl::encoding::Context) -> usize {
4980            16
4981        }
4982    }
4983
4984    unsafe impl<D: fidl::encoding::ResourceDialect>
4985        fidl::encoding::Encode<BaseNetworkSocketSetIpv6TrafficClassRequest, D>
4986        for &BaseNetworkSocketSetIpv6TrafficClassRequest
4987    {
4988        #[inline]
4989        unsafe fn encode(
4990            self,
4991            encoder: &mut fidl::encoding::Encoder<'_, D>,
4992            offset: usize,
4993            _depth: fidl::encoding::Depth,
4994        ) -> fidl::Result<()> {
4995            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6TrafficClassRequest>(offset);
4996            // Delegate to tuple encoding.
4997            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6TrafficClassRequest, D>::encode(
4998                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4999                encoder,
5000                offset,
5001                _depth,
5002            )
5003        }
5004    }
5005    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
5006        fidl::encoding::Encode<BaseNetworkSocketSetIpv6TrafficClassRequest, D> for (T0,)
5007    {
5008        #[inline]
5009        unsafe fn encode(
5010            self,
5011            encoder: &mut fidl::encoding::Encoder<'_, D>,
5012            offset: usize,
5013            depth: fidl::encoding::Depth,
5014        ) -> fidl::Result<()> {
5015            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6TrafficClassRequest>(offset);
5016            // Zero out padding regions. There's no need to apply masks
5017            // because the unmasked parts will be overwritten by fields.
5018            // Write the fields.
5019            self.0.encode(encoder, offset + 0, depth)?;
5020            Ok(())
5021        }
5022    }
5023
5024    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5025        for BaseNetworkSocketSetIpv6TrafficClassRequest
5026    {
5027        #[inline(always)]
5028        fn new_empty() -> Self {
5029            Self { value: fidl::new_empty!(OptionalUint8, D) }
5030        }
5031
5032        #[inline]
5033        unsafe fn decode(
5034            &mut self,
5035            decoder: &mut fidl::encoding::Decoder<'_, D>,
5036            offset: usize,
5037            _depth: fidl::encoding::Depth,
5038        ) -> fidl::Result<()> {
5039            decoder.debug_check_bounds::<Self>(offset);
5040            // Verify that padding bytes are zero.
5041            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
5042            Ok(())
5043        }
5044    }
5045
5046    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketSetIpv6UnicastHopsRequest {
5047        type Borrowed<'a> = &'a Self;
5048        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5049            value
5050        }
5051    }
5052
5053    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketSetIpv6UnicastHopsRequest {
5054        type Owned = Self;
5055
5056        #[inline(always)]
5057        fn inline_align(_context: fidl::encoding::Context) -> usize {
5058            8
5059        }
5060
5061        #[inline(always)]
5062        fn inline_size(_context: fidl::encoding::Context) -> usize {
5063            16
5064        }
5065    }
5066
5067    unsafe impl<D: fidl::encoding::ResourceDialect>
5068        fidl::encoding::Encode<BaseNetworkSocketSetIpv6UnicastHopsRequest, D>
5069        for &BaseNetworkSocketSetIpv6UnicastHopsRequest
5070    {
5071        #[inline]
5072        unsafe fn encode(
5073            self,
5074            encoder: &mut fidl::encoding::Encoder<'_, D>,
5075            offset: usize,
5076            _depth: fidl::encoding::Depth,
5077        ) -> fidl::Result<()> {
5078            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6UnicastHopsRequest>(offset);
5079            // Delegate to tuple encoding.
5080            fidl::encoding::Encode::<BaseNetworkSocketSetIpv6UnicastHopsRequest, D>::encode(
5081                (<OptionalUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5082                encoder,
5083                offset,
5084                _depth,
5085            )
5086        }
5087    }
5088    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint8, D>>
5089        fidl::encoding::Encode<BaseNetworkSocketSetIpv6UnicastHopsRequest, D> for (T0,)
5090    {
5091        #[inline]
5092        unsafe fn encode(
5093            self,
5094            encoder: &mut fidl::encoding::Encoder<'_, D>,
5095            offset: usize,
5096            depth: fidl::encoding::Depth,
5097        ) -> fidl::Result<()> {
5098            encoder.debug_check_bounds::<BaseNetworkSocketSetIpv6UnicastHopsRequest>(offset);
5099            // Zero out padding regions. There's no need to apply masks
5100            // because the unmasked parts will be overwritten by fields.
5101            // Write the fields.
5102            self.0.encode(encoder, offset + 0, depth)?;
5103            Ok(())
5104        }
5105    }
5106
5107    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5108        for BaseNetworkSocketSetIpv6UnicastHopsRequest
5109    {
5110        #[inline(always)]
5111        fn new_empty() -> Self {
5112            Self { value: fidl::new_empty!(OptionalUint8, D) }
5113        }
5114
5115        #[inline]
5116        unsafe fn decode(
5117            &mut self,
5118            decoder: &mut fidl::encoding::Decoder<'_, D>,
5119            offset: usize,
5120            _depth: fidl::encoding::Depth,
5121        ) -> fidl::Result<()> {
5122            decoder.debug_check_bounds::<Self>(offset);
5123            // Verify that padding bytes are zero.
5124            fidl::decode!(OptionalUint8, D, &mut self.value, decoder, offset + 0, _depth)?;
5125            Ok(())
5126        }
5127    }
5128
5129    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketShutdownRequest {
5130        type Borrowed<'a> = &'a Self;
5131        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5132            value
5133        }
5134    }
5135
5136    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketShutdownRequest {
5137        type Owned = Self;
5138
5139        #[inline(always)]
5140        fn inline_align(_context: fidl::encoding::Context) -> usize {
5141            2
5142        }
5143
5144        #[inline(always)]
5145        fn inline_size(_context: fidl::encoding::Context) -> usize {
5146            2
5147        }
5148    }
5149
5150    unsafe impl<D: fidl::encoding::ResourceDialect>
5151        fidl::encoding::Encode<BaseNetworkSocketShutdownRequest, D>
5152        for &BaseNetworkSocketShutdownRequest
5153    {
5154        #[inline]
5155        unsafe fn encode(
5156            self,
5157            encoder: &mut fidl::encoding::Encoder<'_, D>,
5158            offset: usize,
5159            _depth: fidl::encoding::Depth,
5160        ) -> fidl::Result<()> {
5161            encoder.debug_check_bounds::<BaseNetworkSocketShutdownRequest>(offset);
5162            // Delegate to tuple encoding.
5163            fidl::encoding::Encode::<BaseNetworkSocketShutdownRequest, D>::encode(
5164                (<ShutdownMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),),
5165                encoder,
5166                offset,
5167                _depth,
5168            )
5169        }
5170    }
5171    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ShutdownMode, D>>
5172        fidl::encoding::Encode<BaseNetworkSocketShutdownRequest, D> for (T0,)
5173    {
5174        #[inline]
5175        unsafe fn encode(
5176            self,
5177            encoder: &mut fidl::encoding::Encoder<'_, D>,
5178            offset: usize,
5179            depth: fidl::encoding::Depth,
5180        ) -> fidl::Result<()> {
5181            encoder.debug_check_bounds::<BaseNetworkSocketShutdownRequest>(offset);
5182            // Zero out padding regions. There's no need to apply masks
5183            // because the unmasked parts will be overwritten by fields.
5184            // Write the fields.
5185            self.0.encode(encoder, offset + 0, depth)?;
5186            Ok(())
5187        }
5188    }
5189
5190    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5191        for BaseNetworkSocketShutdownRequest
5192    {
5193        #[inline(always)]
5194        fn new_empty() -> Self {
5195            Self { mode: fidl::new_empty!(ShutdownMode, D) }
5196        }
5197
5198        #[inline]
5199        unsafe fn decode(
5200            &mut self,
5201            decoder: &mut fidl::encoding::Decoder<'_, D>,
5202            offset: usize,
5203            _depth: fidl::encoding::Depth,
5204        ) -> fidl::Result<()> {
5205            decoder.debug_check_bounds::<Self>(offset);
5206            // Verify that padding bytes are zero.
5207            fidl::decode!(ShutdownMode, D, &mut self.mode, decoder, offset + 0, _depth)?;
5208            Ok(())
5209        }
5210    }
5211
5212    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastInterfaceResponse {
5213        type Borrowed<'a> = &'a Self;
5214        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5215            value
5216        }
5217    }
5218
5219    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastInterfaceResponse {
5220        type Owned = Self;
5221
5222        #[inline(always)]
5223        fn inline_align(_context: fidl::encoding::Context) -> usize {
5224            1
5225        }
5226
5227        #[inline(always)]
5228        fn inline_size(_context: fidl::encoding::Context) -> usize {
5229            4
5230        }
5231    }
5232
5233    unsafe impl<D: fidl::encoding::ResourceDialect>
5234        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastInterfaceResponse, D>
5235        for &BaseNetworkSocketGetIpMulticastInterfaceResponse
5236    {
5237        #[inline]
5238        unsafe fn encode(
5239            self,
5240            encoder: &mut fidl::encoding::Encoder<'_, D>,
5241            offset: usize,
5242            _depth: fidl::encoding::Depth,
5243        ) -> fidl::Result<()> {
5244            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastInterfaceResponse>(offset);
5245            // Delegate to tuple encoding.
5246            fidl::encoding::Encode::<BaseNetworkSocketGetIpMulticastInterfaceResponse, D>::encode(
5247                (
5248                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
5249                ),
5250                encoder, offset, _depth
5251            )
5252        }
5253    }
5254    unsafe impl<
5255        D: fidl::encoding::ResourceDialect,
5256        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
5257    > fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastInterfaceResponse, D> for (T0,)
5258    {
5259        #[inline]
5260        unsafe fn encode(
5261            self,
5262            encoder: &mut fidl::encoding::Encoder<'_, D>,
5263            offset: usize,
5264            depth: fidl::encoding::Depth,
5265        ) -> fidl::Result<()> {
5266            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastInterfaceResponse>(offset);
5267            // Zero out padding regions. There's no need to apply masks
5268            // because the unmasked parts will be overwritten by fields.
5269            // Write the fields.
5270            self.0.encode(encoder, offset + 0, depth)?;
5271            Ok(())
5272        }
5273    }
5274
5275    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5276        for BaseNetworkSocketGetIpMulticastInterfaceResponse
5277    {
5278        #[inline(always)]
5279        fn new_empty() -> Self {
5280            Self { value: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D) }
5281        }
5282
5283        #[inline]
5284        unsafe fn decode(
5285            &mut self,
5286            decoder: &mut fidl::encoding::Decoder<'_, D>,
5287            offset: usize,
5288            _depth: fidl::encoding::Depth,
5289        ) -> fidl::Result<()> {
5290            decoder.debug_check_bounds::<Self>(offset);
5291            // Verify that padding bytes are zero.
5292            fidl::decode!(
5293                fidl_fuchsia_net__common::Ipv4Address,
5294                D,
5295                &mut self.value,
5296                decoder,
5297                offset + 0,
5298                _depth
5299            )?;
5300            Ok(())
5301        }
5302    }
5303
5304    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastLoopbackResponse {
5305        type Borrowed<'a> = &'a Self;
5306        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5307            value
5308        }
5309    }
5310
5311    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastLoopbackResponse {
5312        type Owned = Self;
5313
5314        #[inline(always)]
5315        fn inline_align(_context: fidl::encoding::Context) -> usize {
5316            1
5317        }
5318
5319        #[inline(always)]
5320        fn inline_size(_context: fidl::encoding::Context) -> usize {
5321            1
5322        }
5323    }
5324
5325    unsafe impl<D: fidl::encoding::ResourceDialect>
5326        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastLoopbackResponse, D>
5327        for &BaseNetworkSocketGetIpMulticastLoopbackResponse
5328    {
5329        #[inline]
5330        unsafe fn encode(
5331            self,
5332            encoder: &mut fidl::encoding::Encoder<'_, D>,
5333            offset: usize,
5334            _depth: fidl::encoding::Depth,
5335        ) -> fidl::Result<()> {
5336            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastLoopbackResponse>(offset);
5337            // Delegate to tuple encoding.
5338            fidl::encoding::Encode::<BaseNetworkSocketGetIpMulticastLoopbackResponse, D>::encode(
5339                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5340                encoder,
5341                offset,
5342                _depth,
5343            )
5344        }
5345    }
5346    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5347        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastLoopbackResponse, D> for (T0,)
5348    {
5349        #[inline]
5350        unsafe fn encode(
5351            self,
5352            encoder: &mut fidl::encoding::Encoder<'_, D>,
5353            offset: usize,
5354            depth: fidl::encoding::Depth,
5355        ) -> fidl::Result<()> {
5356            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastLoopbackResponse>(offset);
5357            // Zero out padding regions. There's no need to apply masks
5358            // because the unmasked parts will be overwritten by fields.
5359            // Write the fields.
5360            self.0.encode(encoder, offset + 0, depth)?;
5361            Ok(())
5362        }
5363    }
5364
5365    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5366        for BaseNetworkSocketGetIpMulticastLoopbackResponse
5367    {
5368        #[inline(always)]
5369        fn new_empty() -> Self {
5370            Self { value: fidl::new_empty!(bool, D) }
5371        }
5372
5373        #[inline]
5374        unsafe fn decode(
5375            &mut self,
5376            decoder: &mut fidl::encoding::Decoder<'_, D>,
5377            offset: usize,
5378            _depth: fidl::encoding::Depth,
5379        ) -> fidl::Result<()> {
5380            decoder.debug_check_bounds::<Self>(offset);
5381            // Verify that padding bytes are zero.
5382            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5383            Ok(())
5384        }
5385    }
5386
5387    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpMulticastTtlResponse {
5388        type Borrowed<'a> = &'a Self;
5389        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5390            value
5391        }
5392    }
5393
5394    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpMulticastTtlResponse {
5395        type Owned = Self;
5396
5397        #[inline(always)]
5398        fn inline_align(_context: fidl::encoding::Context) -> usize {
5399            1
5400        }
5401
5402        #[inline(always)]
5403        fn inline_size(_context: fidl::encoding::Context) -> usize {
5404            1
5405        }
5406        #[inline(always)]
5407        fn encode_is_copy() -> bool {
5408            true
5409        }
5410
5411        #[inline(always)]
5412        fn decode_is_copy() -> bool {
5413            true
5414        }
5415    }
5416
5417    unsafe impl<D: fidl::encoding::ResourceDialect>
5418        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastTtlResponse, D>
5419        for &BaseNetworkSocketGetIpMulticastTtlResponse
5420    {
5421        #[inline]
5422        unsafe fn encode(
5423            self,
5424            encoder: &mut fidl::encoding::Encoder<'_, D>,
5425            offset: usize,
5426            _depth: fidl::encoding::Depth,
5427        ) -> fidl::Result<()> {
5428            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastTtlResponse>(offset);
5429            unsafe {
5430                // Copy the object into the buffer.
5431                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5432                (buf_ptr as *mut BaseNetworkSocketGetIpMulticastTtlResponse).write_unaligned(
5433                    (self as *const BaseNetworkSocketGetIpMulticastTtlResponse).read(),
5434                );
5435                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5436                // done second because the memcpy will write garbage to these bytes.
5437            }
5438            Ok(())
5439        }
5440    }
5441    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
5442        fidl::encoding::Encode<BaseNetworkSocketGetIpMulticastTtlResponse, D> for (T0,)
5443    {
5444        #[inline]
5445        unsafe fn encode(
5446            self,
5447            encoder: &mut fidl::encoding::Encoder<'_, D>,
5448            offset: usize,
5449            depth: fidl::encoding::Depth,
5450        ) -> fidl::Result<()> {
5451            encoder.debug_check_bounds::<BaseNetworkSocketGetIpMulticastTtlResponse>(offset);
5452            // Zero out padding regions. There's no need to apply masks
5453            // because the unmasked parts will be overwritten by fields.
5454            // Write the fields.
5455            self.0.encode(encoder, offset + 0, depth)?;
5456            Ok(())
5457        }
5458    }
5459
5460    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5461        for BaseNetworkSocketGetIpMulticastTtlResponse
5462    {
5463        #[inline(always)]
5464        fn new_empty() -> Self {
5465            Self { value: fidl::new_empty!(u8, D) }
5466        }
5467
5468        #[inline]
5469        unsafe fn decode(
5470            &mut self,
5471            decoder: &mut fidl::encoding::Decoder<'_, D>,
5472            offset: usize,
5473            _depth: fidl::encoding::Depth,
5474        ) -> fidl::Result<()> {
5475            decoder.debug_check_bounds::<Self>(offset);
5476            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5477            // Verify that padding bytes are zero.
5478            // Copy from the buffer into the object.
5479            unsafe {
5480                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
5481            }
5482            Ok(())
5483        }
5484    }
5485
5486    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpPacketInfoResponse {
5487        type Borrowed<'a> = &'a Self;
5488        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5489            value
5490        }
5491    }
5492
5493    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpPacketInfoResponse {
5494        type Owned = Self;
5495
5496        #[inline(always)]
5497        fn inline_align(_context: fidl::encoding::Context) -> usize {
5498            1
5499        }
5500
5501        #[inline(always)]
5502        fn inline_size(_context: fidl::encoding::Context) -> usize {
5503            1
5504        }
5505    }
5506
5507    unsafe impl<D: fidl::encoding::ResourceDialect>
5508        fidl::encoding::Encode<BaseNetworkSocketGetIpPacketInfoResponse, D>
5509        for &BaseNetworkSocketGetIpPacketInfoResponse
5510    {
5511        #[inline]
5512        unsafe fn encode(
5513            self,
5514            encoder: &mut fidl::encoding::Encoder<'_, D>,
5515            offset: usize,
5516            _depth: fidl::encoding::Depth,
5517        ) -> fidl::Result<()> {
5518            encoder.debug_check_bounds::<BaseNetworkSocketGetIpPacketInfoResponse>(offset);
5519            // Delegate to tuple encoding.
5520            fidl::encoding::Encode::<BaseNetworkSocketGetIpPacketInfoResponse, D>::encode(
5521                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5522                encoder,
5523                offset,
5524                _depth,
5525            )
5526        }
5527    }
5528    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5529        fidl::encoding::Encode<BaseNetworkSocketGetIpPacketInfoResponse, D> for (T0,)
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::<BaseNetworkSocketGetIpPacketInfoResponse>(offset);
5539            // Zero out padding regions. There's no need to apply masks
5540            // because the unmasked parts will be overwritten by fields.
5541            // Write the fields.
5542            self.0.encode(encoder, offset + 0, depth)?;
5543            Ok(())
5544        }
5545    }
5546
5547    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5548        for BaseNetworkSocketGetIpPacketInfoResponse
5549    {
5550        #[inline(always)]
5551        fn new_empty() -> Self {
5552            Self { value: fidl::new_empty!(bool, D) }
5553        }
5554
5555        #[inline]
5556        unsafe fn decode(
5557            &mut self,
5558            decoder: &mut fidl::encoding::Decoder<'_, D>,
5559            offset: usize,
5560            _depth: fidl::encoding::Depth,
5561        ) -> fidl::Result<()> {
5562            decoder.debug_check_bounds::<Self>(offset);
5563            // Verify that padding bytes are zero.
5564            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5565            Ok(())
5566        }
5567    }
5568
5569    impl fidl::encoding::ValueTypeMarker
5570        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5571    {
5572        type Borrowed<'a> = &'a Self;
5573        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5574            value
5575        }
5576    }
5577
5578    unsafe impl fidl::encoding::TypeMarker
5579        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5580    {
5581        type Owned = Self;
5582
5583        #[inline(always)]
5584        fn inline_align(_context: fidl::encoding::Context) -> usize {
5585            1
5586        }
5587
5588        #[inline(always)]
5589        fn inline_size(_context: fidl::encoding::Context) -> usize {
5590            1
5591        }
5592    }
5593
5594    unsafe impl<D: fidl::encoding::ResourceDialect>
5595        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse, D>
5596        for &BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5597    {
5598        #[inline]
5599        unsafe fn encode(
5600            self,
5601            encoder: &mut fidl::encoding::Encoder<'_, D>,
5602            offset: usize,
5603            _depth: fidl::encoding::Depth,
5604        ) -> fidl::Result<()> {
5605            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse>(offset);
5606            // Delegate to tuple encoding.
5607            fidl::encoding::Encode::<
5608                BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse,
5609                D,
5610            >::encode(
5611                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5612                encoder,
5613                offset,
5614                _depth,
5615            )
5616        }
5617    }
5618    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5619        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse, D>
5620        for (T0,)
5621    {
5622        #[inline]
5623        unsafe fn encode(
5624            self,
5625            encoder: &mut fidl::encoding::Encoder<'_, D>,
5626            offset: usize,
5627            depth: fidl::encoding::Depth,
5628        ) -> fidl::Result<()> {
5629            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse>(offset);
5630            // Zero out padding regions. There's no need to apply masks
5631            // because the unmasked parts will be overwritten by fields.
5632            // Write the fields.
5633            self.0.encode(encoder, offset + 0, depth)?;
5634            Ok(())
5635        }
5636    }
5637
5638    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5639        for BaseNetworkSocketGetIpReceiveOriginalDestinationAddressResponse
5640    {
5641        #[inline(always)]
5642        fn new_empty() -> Self {
5643            Self { value: fidl::new_empty!(bool, D) }
5644        }
5645
5646        #[inline]
5647        unsafe fn decode(
5648            &mut self,
5649            decoder: &mut fidl::encoding::Decoder<'_, D>,
5650            offset: usize,
5651            _depth: fidl::encoding::Depth,
5652        ) -> fidl::Result<()> {
5653            decoder.debug_check_bounds::<Self>(offset);
5654            // Verify that padding bytes are zero.
5655            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5656            Ok(())
5657        }
5658    }
5659
5660    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpReceiveTtlResponse {
5661        type Borrowed<'a> = &'a Self;
5662        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5663            value
5664        }
5665    }
5666
5667    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpReceiveTtlResponse {
5668        type Owned = Self;
5669
5670        #[inline(always)]
5671        fn inline_align(_context: fidl::encoding::Context) -> usize {
5672            1
5673        }
5674
5675        #[inline(always)]
5676        fn inline_size(_context: fidl::encoding::Context) -> usize {
5677            1
5678        }
5679    }
5680
5681    unsafe impl<D: fidl::encoding::ResourceDialect>
5682        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTtlResponse, D>
5683        for &BaseNetworkSocketGetIpReceiveTtlResponse
5684    {
5685        #[inline]
5686        unsafe fn encode(
5687            self,
5688            encoder: &mut fidl::encoding::Encoder<'_, D>,
5689            offset: usize,
5690            _depth: fidl::encoding::Depth,
5691        ) -> fidl::Result<()> {
5692            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveTtlResponse>(offset);
5693            // Delegate to tuple encoding.
5694            fidl::encoding::Encode::<BaseNetworkSocketGetIpReceiveTtlResponse, D>::encode(
5695                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5696                encoder,
5697                offset,
5698                _depth,
5699            )
5700        }
5701    }
5702    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5703        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTtlResponse, D> for (T0,)
5704    {
5705        #[inline]
5706        unsafe fn encode(
5707            self,
5708            encoder: &mut fidl::encoding::Encoder<'_, D>,
5709            offset: usize,
5710            depth: fidl::encoding::Depth,
5711        ) -> fidl::Result<()> {
5712            encoder.debug_check_bounds::<BaseNetworkSocketGetIpReceiveTtlResponse>(offset);
5713            // Zero out padding regions. There's no need to apply masks
5714            // because the unmasked parts will be overwritten by fields.
5715            // Write the fields.
5716            self.0.encode(encoder, offset + 0, depth)?;
5717            Ok(())
5718        }
5719    }
5720
5721    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5722        for BaseNetworkSocketGetIpReceiveTtlResponse
5723    {
5724        #[inline(always)]
5725        fn new_empty() -> Self {
5726            Self { value: fidl::new_empty!(bool, D) }
5727        }
5728
5729        #[inline]
5730        unsafe fn decode(
5731            &mut self,
5732            decoder: &mut fidl::encoding::Decoder<'_, D>,
5733            offset: usize,
5734            _depth: fidl::encoding::Depth,
5735        ) -> fidl::Result<()> {
5736            decoder.debug_check_bounds::<Self>(offset);
5737            // Verify that padding bytes are zero.
5738            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5739            Ok(())
5740        }
5741    }
5742
5743    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
5744        type Borrowed<'a> = &'a Self;
5745        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5746            value
5747        }
5748    }
5749
5750    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse {
5751        type Owned = Self;
5752
5753        #[inline(always)]
5754        fn inline_align(_context: fidl::encoding::Context) -> usize {
5755            1
5756        }
5757
5758        #[inline(always)]
5759        fn inline_size(_context: fidl::encoding::Context) -> usize {
5760            1
5761        }
5762    }
5763
5764    unsafe impl<D: fidl::encoding::ResourceDialect>
5765        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D>
5766        for &BaseNetworkSocketGetIpReceiveTypeOfServiceResponse
5767    {
5768        #[inline]
5769        unsafe fn encode(
5770            self,
5771            encoder: &mut fidl::encoding::Encoder<'_, D>,
5772            offset: usize,
5773            _depth: fidl::encoding::Depth,
5774        ) -> fidl::Result<()> {
5775            encoder
5776                .debug_check_bounds::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse>(offset);
5777            // Delegate to tuple encoding.
5778            fidl::encoding::Encode::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D>::encode(
5779                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5780                encoder,
5781                offset,
5782                _depth,
5783            )
5784        }
5785    }
5786    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5787        fidl::encoding::Encode<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse, D> for (T0,)
5788    {
5789        #[inline]
5790        unsafe fn encode(
5791            self,
5792            encoder: &mut fidl::encoding::Encoder<'_, D>,
5793            offset: usize,
5794            depth: fidl::encoding::Depth,
5795        ) -> fidl::Result<()> {
5796            encoder
5797                .debug_check_bounds::<BaseNetworkSocketGetIpReceiveTypeOfServiceResponse>(offset);
5798            // Zero out padding regions. There's no need to apply masks
5799            // because the unmasked parts will be overwritten by fields.
5800            // Write the fields.
5801            self.0.encode(encoder, offset + 0, depth)?;
5802            Ok(())
5803        }
5804    }
5805
5806    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5807        for BaseNetworkSocketGetIpReceiveTypeOfServiceResponse
5808    {
5809        #[inline(always)]
5810        fn new_empty() -> Self {
5811            Self { value: fidl::new_empty!(bool, D) }
5812        }
5813
5814        #[inline]
5815        unsafe fn decode(
5816            &mut self,
5817            decoder: &mut fidl::encoding::Decoder<'_, D>,
5818            offset: usize,
5819            _depth: fidl::encoding::Depth,
5820        ) -> fidl::Result<()> {
5821            decoder.debug_check_bounds::<Self>(offset);
5822            // Verify that padding bytes are zero.
5823            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5824            Ok(())
5825        }
5826    }
5827
5828    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTransparentResponse {
5829        type Borrowed<'a> = &'a Self;
5830        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5831            value
5832        }
5833    }
5834
5835    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTransparentResponse {
5836        type Owned = Self;
5837
5838        #[inline(always)]
5839        fn inline_align(_context: fidl::encoding::Context) -> usize {
5840            1
5841        }
5842
5843        #[inline(always)]
5844        fn inline_size(_context: fidl::encoding::Context) -> usize {
5845            1
5846        }
5847    }
5848
5849    unsafe impl<D: fidl::encoding::ResourceDialect>
5850        fidl::encoding::Encode<BaseNetworkSocketGetIpTransparentResponse, D>
5851        for &BaseNetworkSocketGetIpTransparentResponse
5852    {
5853        #[inline]
5854        unsafe fn encode(
5855            self,
5856            encoder: &mut fidl::encoding::Encoder<'_, D>,
5857            offset: usize,
5858            _depth: fidl::encoding::Depth,
5859        ) -> fidl::Result<()> {
5860            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTransparentResponse>(offset);
5861            // Delegate to tuple encoding.
5862            fidl::encoding::Encode::<BaseNetworkSocketGetIpTransparentResponse, D>::encode(
5863                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
5864                encoder,
5865                offset,
5866                _depth,
5867            )
5868        }
5869    }
5870    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
5871        fidl::encoding::Encode<BaseNetworkSocketGetIpTransparentResponse, D> for (T0,)
5872    {
5873        #[inline]
5874        unsafe fn encode(
5875            self,
5876            encoder: &mut fidl::encoding::Encoder<'_, D>,
5877            offset: usize,
5878            depth: fidl::encoding::Depth,
5879        ) -> fidl::Result<()> {
5880            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTransparentResponse>(offset);
5881            // Zero out padding regions. There's no need to apply masks
5882            // because the unmasked parts will be overwritten by fields.
5883            // Write the fields.
5884            self.0.encode(encoder, offset + 0, depth)?;
5885            Ok(())
5886        }
5887    }
5888
5889    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5890        for BaseNetworkSocketGetIpTransparentResponse
5891    {
5892        #[inline(always)]
5893        fn new_empty() -> Self {
5894            Self { value: fidl::new_empty!(bool, D) }
5895        }
5896
5897        #[inline]
5898        unsafe fn decode(
5899            &mut self,
5900            decoder: &mut fidl::encoding::Decoder<'_, D>,
5901            offset: usize,
5902            _depth: fidl::encoding::Depth,
5903        ) -> fidl::Result<()> {
5904            decoder.debug_check_bounds::<Self>(offset);
5905            // Verify that padding bytes are zero.
5906            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
5907            Ok(())
5908        }
5909    }
5910
5911    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTtlResponse {
5912        type Borrowed<'a> = &'a Self;
5913        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5914            value
5915        }
5916    }
5917
5918    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTtlResponse {
5919        type Owned = Self;
5920
5921        #[inline(always)]
5922        fn inline_align(_context: fidl::encoding::Context) -> usize {
5923            1
5924        }
5925
5926        #[inline(always)]
5927        fn inline_size(_context: fidl::encoding::Context) -> usize {
5928            1
5929        }
5930        #[inline(always)]
5931        fn encode_is_copy() -> bool {
5932            true
5933        }
5934
5935        #[inline(always)]
5936        fn decode_is_copy() -> bool {
5937            true
5938        }
5939    }
5940
5941    unsafe impl<D: fidl::encoding::ResourceDialect>
5942        fidl::encoding::Encode<BaseNetworkSocketGetIpTtlResponse, D>
5943        for &BaseNetworkSocketGetIpTtlResponse
5944    {
5945        #[inline]
5946        unsafe fn encode(
5947            self,
5948            encoder: &mut fidl::encoding::Encoder<'_, D>,
5949            offset: usize,
5950            _depth: fidl::encoding::Depth,
5951        ) -> fidl::Result<()> {
5952            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTtlResponse>(offset);
5953            unsafe {
5954                // Copy the object into the buffer.
5955                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5956                (buf_ptr as *mut BaseNetworkSocketGetIpTtlResponse)
5957                    .write_unaligned((self as *const BaseNetworkSocketGetIpTtlResponse).read());
5958                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5959                // done second because the memcpy will write garbage to these bytes.
5960            }
5961            Ok(())
5962        }
5963    }
5964    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
5965        fidl::encoding::Encode<BaseNetworkSocketGetIpTtlResponse, D> for (T0,)
5966    {
5967        #[inline]
5968        unsafe fn encode(
5969            self,
5970            encoder: &mut fidl::encoding::Encoder<'_, D>,
5971            offset: usize,
5972            depth: fidl::encoding::Depth,
5973        ) -> fidl::Result<()> {
5974            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTtlResponse>(offset);
5975            // Zero out padding regions. There's no need to apply masks
5976            // because the unmasked parts will be overwritten by fields.
5977            // Write the fields.
5978            self.0.encode(encoder, offset + 0, depth)?;
5979            Ok(())
5980        }
5981    }
5982
5983    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5984        for BaseNetworkSocketGetIpTtlResponse
5985    {
5986        #[inline(always)]
5987        fn new_empty() -> Self {
5988            Self { value: fidl::new_empty!(u8, D) }
5989        }
5990
5991        #[inline]
5992        unsafe fn decode(
5993            &mut self,
5994            decoder: &mut fidl::encoding::Decoder<'_, D>,
5995            offset: usize,
5996            _depth: fidl::encoding::Depth,
5997        ) -> fidl::Result<()> {
5998            decoder.debug_check_bounds::<Self>(offset);
5999            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6000            // Verify that padding bytes are zero.
6001            // Copy from the buffer into the object.
6002            unsafe {
6003                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6004            }
6005            Ok(())
6006        }
6007    }
6008
6009    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpTypeOfServiceResponse {
6010        type Borrowed<'a> = &'a Self;
6011        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6012            value
6013        }
6014    }
6015
6016    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpTypeOfServiceResponse {
6017        type Owned = Self;
6018
6019        #[inline(always)]
6020        fn inline_align(_context: fidl::encoding::Context) -> usize {
6021            1
6022        }
6023
6024        #[inline(always)]
6025        fn inline_size(_context: fidl::encoding::Context) -> usize {
6026            1
6027        }
6028        #[inline(always)]
6029        fn encode_is_copy() -> bool {
6030            true
6031        }
6032
6033        #[inline(always)]
6034        fn decode_is_copy() -> bool {
6035            true
6036        }
6037    }
6038
6039    unsafe impl<D: fidl::encoding::ResourceDialect>
6040        fidl::encoding::Encode<BaseNetworkSocketGetIpTypeOfServiceResponse, D>
6041        for &BaseNetworkSocketGetIpTypeOfServiceResponse
6042    {
6043        #[inline]
6044        unsafe fn encode(
6045            self,
6046            encoder: &mut fidl::encoding::Encoder<'_, D>,
6047            offset: usize,
6048            _depth: fidl::encoding::Depth,
6049        ) -> fidl::Result<()> {
6050            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTypeOfServiceResponse>(offset);
6051            unsafe {
6052                // Copy the object into the buffer.
6053                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6054                (buf_ptr as *mut BaseNetworkSocketGetIpTypeOfServiceResponse).write_unaligned(
6055                    (self as *const BaseNetworkSocketGetIpTypeOfServiceResponse).read(),
6056                );
6057                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6058                // done second because the memcpy will write garbage to these bytes.
6059            }
6060            Ok(())
6061        }
6062    }
6063    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6064        fidl::encoding::Encode<BaseNetworkSocketGetIpTypeOfServiceResponse, D> for (T0,)
6065    {
6066        #[inline]
6067        unsafe fn encode(
6068            self,
6069            encoder: &mut fidl::encoding::Encoder<'_, D>,
6070            offset: usize,
6071            depth: fidl::encoding::Depth,
6072        ) -> fidl::Result<()> {
6073            encoder.debug_check_bounds::<BaseNetworkSocketGetIpTypeOfServiceResponse>(offset);
6074            // Zero out padding regions. There's no need to apply masks
6075            // because the unmasked parts will be overwritten by fields.
6076            // Write the fields.
6077            self.0.encode(encoder, offset + 0, depth)?;
6078            Ok(())
6079        }
6080    }
6081
6082    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6083        for BaseNetworkSocketGetIpTypeOfServiceResponse
6084    {
6085        #[inline(always)]
6086        fn new_empty() -> Self {
6087            Self { value: fidl::new_empty!(u8, D) }
6088        }
6089
6090        #[inline]
6091        unsafe fn decode(
6092            &mut self,
6093            decoder: &mut fidl::encoding::Decoder<'_, D>,
6094            offset: usize,
6095            _depth: fidl::encoding::Depth,
6096        ) -> fidl::Result<()> {
6097            decoder.debug_check_bounds::<Self>(offset);
6098            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6099            // Verify that padding bytes are zero.
6100            // Copy from the buffer into the object.
6101            unsafe {
6102                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6103            }
6104            Ok(())
6105        }
6106    }
6107
6108    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastHopsResponse {
6109        type Borrowed<'a> = &'a Self;
6110        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6111            value
6112        }
6113    }
6114
6115    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastHopsResponse {
6116        type Owned = Self;
6117
6118        #[inline(always)]
6119        fn inline_align(_context: fidl::encoding::Context) -> usize {
6120            1
6121        }
6122
6123        #[inline(always)]
6124        fn inline_size(_context: fidl::encoding::Context) -> usize {
6125            1
6126        }
6127        #[inline(always)]
6128        fn encode_is_copy() -> bool {
6129            true
6130        }
6131
6132        #[inline(always)]
6133        fn decode_is_copy() -> bool {
6134            true
6135        }
6136    }
6137
6138    unsafe impl<D: fidl::encoding::ResourceDialect>
6139        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastHopsResponse, D>
6140        for &BaseNetworkSocketGetIpv6MulticastHopsResponse
6141    {
6142        #[inline]
6143        unsafe fn encode(
6144            self,
6145            encoder: &mut fidl::encoding::Encoder<'_, D>,
6146            offset: usize,
6147            _depth: fidl::encoding::Depth,
6148        ) -> fidl::Result<()> {
6149            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastHopsResponse>(offset);
6150            unsafe {
6151                // Copy the object into the buffer.
6152                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6153                (buf_ptr as *mut BaseNetworkSocketGetIpv6MulticastHopsResponse).write_unaligned(
6154                    (self as *const BaseNetworkSocketGetIpv6MulticastHopsResponse).read(),
6155                );
6156                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6157                // done second because the memcpy will write garbage to these bytes.
6158            }
6159            Ok(())
6160        }
6161    }
6162    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6163        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastHopsResponse, D> for (T0,)
6164    {
6165        #[inline]
6166        unsafe fn encode(
6167            self,
6168            encoder: &mut fidl::encoding::Encoder<'_, D>,
6169            offset: usize,
6170            depth: fidl::encoding::Depth,
6171        ) -> fidl::Result<()> {
6172            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastHopsResponse>(offset);
6173            // Zero out padding regions. There's no need to apply masks
6174            // because the unmasked parts will be overwritten by fields.
6175            // Write the fields.
6176            self.0.encode(encoder, offset + 0, depth)?;
6177            Ok(())
6178        }
6179    }
6180
6181    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6182        for BaseNetworkSocketGetIpv6MulticastHopsResponse
6183    {
6184        #[inline(always)]
6185        fn new_empty() -> Self {
6186            Self { value: fidl::new_empty!(u8, D) }
6187        }
6188
6189        #[inline]
6190        unsafe fn decode(
6191            &mut self,
6192            decoder: &mut fidl::encoding::Decoder<'_, D>,
6193            offset: usize,
6194            _depth: fidl::encoding::Depth,
6195        ) -> fidl::Result<()> {
6196            decoder.debug_check_bounds::<Self>(offset);
6197            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6198            // Verify that padding bytes are zero.
6199            // Copy from the buffer into the object.
6200            unsafe {
6201                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6202            }
6203            Ok(())
6204        }
6205    }
6206
6207    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
6208        type Borrowed<'a> = &'a Self;
6209        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6210            value
6211        }
6212    }
6213
6214    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastInterfaceResponse {
6215        type Owned = Self;
6216
6217        #[inline(always)]
6218        fn inline_align(_context: fidl::encoding::Context) -> usize {
6219            8
6220        }
6221
6222        #[inline(always)]
6223        fn inline_size(_context: fidl::encoding::Context) -> usize {
6224            8
6225        }
6226        #[inline(always)]
6227        fn encode_is_copy() -> bool {
6228            true
6229        }
6230
6231        #[inline(always)]
6232        fn decode_is_copy() -> bool {
6233            true
6234        }
6235    }
6236
6237    unsafe impl<D: fidl::encoding::ResourceDialect>
6238        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastInterfaceResponse, D>
6239        for &BaseNetworkSocketGetIpv6MulticastInterfaceResponse
6240    {
6241        #[inline]
6242        unsafe fn encode(
6243            self,
6244            encoder: &mut fidl::encoding::Encoder<'_, D>,
6245            offset: usize,
6246            _depth: fidl::encoding::Depth,
6247        ) -> fidl::Result<()> {
6248            encoder
6249                .debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastInterfaceResponse>(offset);
6250            unsafe {
6251                // Copy the object into the buffer.
6252                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6253                (buf_ptr as *mut BaseNetworkSocketGetIpv6MulticastInterfaceResponse)
6254                    .write_unaligned(
6255                        (self as *const BaseNetworkSocketGetIpv6MulticastInterfaceResponse).read(),
6256                    );
6257                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6258                // done second because the memcpy will write garbage to these bytes.
6259            }
6260            Ok(())
6261        }
6262    }
6263    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
6264        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastInterfaceResponse, D> for (T0,)
6265    {
6266        #[inline]
6267        unsafe fn encode(
6268            self,
6269            encoder: &mut fidl::encoding::Encoder<'_, D>,
6270            offset: usize,
6271            depth: fidl::encoding::Depth,
6272        ) -> fidl::Result<()> {
6273            encoder
6274                .debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastInterfaceResponse>(offset);
6275            // Zero out padding regions. There's no need to apply masks
6276            // because the unmasked parts will be overwritten by fields.
6277            // Write the fields.
6278            self.0.encode(encoder, offset + 0, depth)?;
6279            Ok(())
6280        }
6281    }
6282
6283    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6284        for BaseNetworkSocketGetIpv6MulticastInterfaceResponse
6285    {
6286        #[inline(always)]
6287        fn new_empty() -> Self {
6288            Self { value: fidl::new_empty!(u64, D) }
6289        }
6290
6291        #[inline]
6292        unsafe fn decode(
6293            &mut self,
6294            decoder: &mut fidl::encoding::Decoder<'_, D>,
6295            offset: usize,
6296            _depth: fidl::encoding::Depth,
6297        ) -> fidl::Result<()> {
6298            decoder.debug_check_bounds::<Self>(offset);
6299            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6300            // Verify that padding bytes are zero.
6301            // Copy from the buffer into the object.
6302            unsafe {
6303                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
6304            }
6305            Ok(())
6306        }
6307    }
6308
6309    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
6310        type Borrowed<'a> = &'a Self;
6311        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6312            value
6313        }
6314    }
6315
6316    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6MulticastLoopbackResponse {
6317        type Owned = Self;
6318
6319        #[inline(always)]
6320        fn inline_align(_context: fidl::encoding::Context) -> usize {
6321            1
6322        }
6323
6324        #[inline(always)]
6325        fn inline_size(_context: fidl::encoding::Context) -> usize {
6326            1
6327        }
6328    }
6329
6330    unsafe impl<D: fidl::encoding::ResourceDialect>
6331        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D>
6332        for &BaseNetworkSocketGetIpv6MulticastLoopbackResponse
6333    {
6334        #[inline]
6335        unsafe fn encode(
6336            self,
6337            encoder: &mut fidl::encoding::Encoder<'_, D>,
6338            offset: usize,
6339            _depth: fidl::encoding::Depth,
6340        ) -> fidl::Result<()> {
6341            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse>(offset);
6342            // Delegate to tuple encoding.
6343            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D>::encode(
6344                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6345                encoder,
6346                offset,
6347                _depth,
6348            )
6349        }
6350    }
6351    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6352        fidl::encoding::Encode<BaseNetworkSocketGetIpv6MulticastLoopbackResponse, D> for (T0,)
6353    {
6354        #[inline]
6355        unsafe fn encode(
6356            self,
6357            encoder: &mut fidl::encoding::Encoder<'_, D>,
6358            offset: usize,
6359            depth: fidl::encoding::Depth,
6360        ) -> fidl::Result<()> {
6361            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6MulticastLoopbackResponse>(offset);
6362            // Zero out padding regions. There's no need to apply masks
6363            // because the unmasked parts will be overwritten by fields.
6364            // Write the fields.
6365            self.0.encode(encoder, offset + 0, depth)?;
6366            Ok(())
6367        }
6368    }
6369
6370    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6371        for BaseNetworkSocketGetIpv6MulticastLoopbackResponse
6372    {
6373        #[inline(always)]
6374        fn new_empty() -> Self {
6375            Self { value: fidl::new_empty!(bool, D) }
6376        }
6377
6378        #[inline]
6379        unsafe fn decode(
6380            &mut self,
6381            decoder: &mut fidl::encoding::Decoder<'_, D>,
6382            offset: usize,
6383            _depth: fidl::encoding::Depth,
6384        ) -> fidl::Result<()> {
6385            decoder.debug_check_bounds::<Self>(offset);
6386            // Verify that padding bytes are zero.
6387            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6388            Ok(())
6389        }
6390    }
6391
6392    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6OnlyResponse {
6393        type Borrowed<'a> = &'a Self;
6394        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6395            value
6396        }
6397    }
6398
6399    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6OnlyResponse {
6400        type Owned = Self;
6401
6402        #[inline(always)]
6403        fn inline_align(_context: fidl::encoding::Context) -> usize {
6404            1
6405        }
6406
6407        #[inline(always)]
6408        fn inline_size(_context: fidl::encoding::Context) -> usize {
6409            1
6410        }
6411    }
6412
6413    unsafe impl<D: fidl::encoding::ResourceDialect>
6414        fidl::encoding::Encode<BaseNetworkSocketGetIpv6OnlyResponse, D>
6415        for &BaseNetworkSocketGetIpv6OnlyResponse
6416    {
6417        #[inline]
6418        unsafe fn encode(
6419            self,
6420            encoder: &mut fidl::encoding::Encoder<'_, D>,
6421            offset: usize,
6422            _depth: fidl::encoding::Depth,
6423        ) -> fidl::Result<()> {
6424            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6OnlyResponse>(offset);
6425            // Delegate to tuple encoding.
6426            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6OnlyResponse, D>::encode(
6427                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6428                encoder,
6429                offset,
6430                _depth,
6431            )
6432        }
6433    }
6434    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6435        fidl::encoding::Encode<BaseNetworkSocketGetIpv6OnlyResponse, D> for (T0,)
6436    {
6437        #[inline]
6438        unsafe fn encode(
6439            self,
6440            encoder: &mut fidl::encoding::Encoder<'_, D>,
6441            offset: usize,
6442            depth: fidl::encoding::Depth,
6443        ) -> fidl::Result<()> {
6444            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6OnlyResponse>(offset);
6445            // Zero out padding regions. There's no need to apply masks
6446            // because the unmasked parts will be overwritten by fields.
6447            // Write the fields.
6448            self.0.encode(encoder, offset + 0, depth)?;
6449            Ok(())
6450        }
6451    }
6452
6453    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6454        for BaseNetworkSocketGetIpv6OnlyResponse
6455    {
6456        #[inline(always)]
6457        fn new_empty() -> Self {
6458            Self { value: fidl::new_empty!(bool, D) }
6459        }
6460
6461        #[inline]
6462        unsafe fn decode(
6463            &mut self,
6464            decoder: &mut fidl::encoding::Decoder<'_, D>,
6465            offset: usize,
6466            _depth: fidl::encoding::Depth,
6467        ) -> fidl::Result<()> {
6468            decoder.debug_check_bounds::<Self>(offset);
6469            // Verify that padding bytes are zero.
6470            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6471            Ok(())
6472        }
6473    }
6474
6475    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
6476        type Borrowed<'a> = &'a Self;
6477        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6478            value
6479        }
6480    }
6481
6482    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse {
6483        type Owned = Self;
6484
6485        #[inline(always)]
6486        fn inline_align(_context: fidl::encoding::Context) -> usize {
6487            1
6488        }
6489
6490        #[inline(always)]
6491        fn inline_size(_context: fidl::encoding::Context) -> usize {
6492            1
6493        }
6494    }
6495
6496    unsafe impl<D: fidl::encoding::ResourceDialect>
6497        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D>
6498        for &BaseNetworkSocketGetIpv6ReceiveHopLimitResponse
6499    {
6500        #[inline]
6501        unsafe fn encode(
6502            self,
6503            encoder: &mut fidl::encoding::Encoder<'_, D>,
6504            offset: usize,
6505            _depth: fidl::encoding::Depth,
6506        ) -> fidl::Result<()> {
6507            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse>(offset);
6508            // Delegate to tuple encoding.
6509            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D>::encode(
6510                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6511                encoder,
6512                offset,
6513                _depth,
6514            )
6515        }
6516    }
6517    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6518        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse, D> for (T0,)
6519    {
6520        #[inline]
6521        unsafe fn encode(
6522            self,
6523            encoder: &mut fidl::encoding::Encoder<'_, D>,
6524            offset: usize,
6525            depth: fidl::encoding::Depth,
6526        ) -> fidl::Result<()> {
6527            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveHopLimitResponse>(offset);
6528            // Zero out padding regions. There's no need to apply masks
6529            // because the unmasked parts will be overwritten by fields.
6530            // Write the fields.
6531            self.0.encode(encoder, offset + 0, depth)?;
6532            Ok(())
6533        }
6534    }
6535
6536    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6537        for BaseNetworkSocketGetIpv6ReceiveHopLimitResponse
6538    {
6539        #[inline(always)]
6540        fn new_empty() -> Self {
6541            Self { value: fidl::new_empty!(bool, D) }
6542        }
6543
6544        #[inline]
6545        unsafe fn decode(
6546            &mut self,
6547            decoder: &mut fidl::encoding::Decoder<'_, D>,
6548            offset: usize,
6549            _depth: fidl::encoding::Depth,
6550        ) -> fidl::Result<()> {
6551            decoder.debug_check_bounds::<Self>(offset);
6552            // Verify that padding bytes are zero.
6553            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6554            Ok(())
6555        }
6556    }
6557
6558    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
6559        type Borrowed<'a> = &'a Self;
6560        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6561            value
6562        }
6563    }
6564
6565    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse {
6566        type Owned = Self;
6567
6568        #[inline(always)]
6569        fn inline_align(_context: fidl::encoding::Context) -> usize {
6570            1
6571        }
6572
6573        #[inline(always)]
6574        fn inline_size(_context: fidl::encoding::Context) -> usize {
6575            1
6576        }
6577    }
6578
6579    unsafe impl<D: fidl::encoding::ResourceDialect>
6580        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D>
6581        for &BaseNetworkSocketGetIpv6ReceivePacketInfoResponse
6582    {
6583        #[inline]
6584        unsafe fn encode(
6585            self,
6586            encoder: &mut fidl::encoding::Encoder<'_, D>,
6587            offset: usize,
6588            _depth: fidl::encoding::Depth,
6589        ) -> fidl::Result<()> {
6590            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse>(offset);
6591            // Delegate to tuple encoding.
6592            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D>::encode(
6593                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6594                encoder,
6595                offset,
6596                _depth,
6597            )
6598        }
6599    }
6600    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6601        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse, D> for (T0,)
6602    {
6603        #[inline]
6604        unsafe fn encode(
6605            self,
6606            encoder: &mut fidl::encoding::Encoder<'_, D>,
6607            offset: usize,
6608            depth: fidl::encoding::Depth,
6609        ) -> fidl::Result<()> {
6610            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6ReceivePacketInfoResponse>(offset);
6611            // Zero out padding regions. There's no need to apply masks
6612            // because the unmasked parts will be overwritten by fields.
6613            // Write the fields.
6614            self.0.encode(encoder, offset + 0, depth)?;
6615            Ok(())
6616        }
6617    }
6618
6619    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6620        for BaseNetworkSocketGetIpv6ReceivePacketInfoResponse
6621    {
6622        #[inline(always)]
6623        fn new_empty() -> Self {
6624            Self { value: fidl::new_empty!(bool, D) }
6625        }
6626
6627        #[inline]
6628        unsafe fn decode(
6629            &mut self,
6630            decoder: &mut fidl::encoding::Decoder<'_, D>,
6631            offset: usize,
6632            _depth: fidl::encoding::Depth,
6633        ) -> fidl::Result<()> {
6634            decoder.debug_check_bounds::<Self>(offset);
6635            // Verify that padding bytes are zero.
6636            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6637            Ok(())
6638        }
6639    }
6640
6641    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
6642        type Borrowed<'a> = &'a Self;
6643        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6644            value
6645        }
6646    }
6647
6648    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse {
6649        type Owned = Self;
6650
6651        #[inline(always)]
6652        fn inline_align(_context: fidl::encoding::Context) -> usize {
6653            1
6654        }
6655
6656        #[inline(always)]
6657        fn inline_size(_context: fidl::encoding::Context) -> usize {
6658            1
6659        }
6660    }
6661
6662    unsafe impl<D: fidl::encoding::ResourceDialect>
6663        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D>
6664        for &BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse
6665    {
6666        #[inline]
6667        unsafe fn encode(
6668            self,
6669            encoder: &mut fidl::encoding::Encoder<'_, D>,
6670            offset: usize,
6671            _depth: fidl::encoding::Depth,
6672        ) -> fidl::Result<()> {
6673            encoder
6674                .debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse>(offset);
6675            // Delegate to tuple encoding.
6676            fidl::encoding::Encode::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D>::encode(
6677                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
6678                encoder,
6679                offset,
6680                _depth,
6681            )
6682        }
6683    }
6684    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
6685        fidl::encoding::Encode<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse, D> for (T0,)
6686    {
6687        #[inline]
6688        unsafe fn encode(
6689            self,
6690            encoder: &mut fidl::encoding::Encoder<'_, D>,
6691            offset: usize,
6692            depth: fidl::encoding::Depth,
6693        ) -> fidl::Result<()> {
6694            encoder
6695                .debug_check_bounds::<BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse>(offset);
6696            // Zero out padding regions. There's no need to apply masks
6697            // because the unmasked parts will be overwritten by fields.
6698            // Write the fields.
6699            self.0.encode(encoder, offset + 0, depth)?;
6700            Ok(())
6701        }
6702    }
6703
6704    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6705        for BaseNetworkSocketGetIpv6ReceiveTrafficClassResponse
6706    {
6707        #[inline(always)]
6708        fn new_empty() -> Self {
6709            Self { value: fidl::new_empty!(bool, D) }
6710        }
6711
6712        #[inline]
6713        unsafe fn decode(
6714            &mut self,
6715            decoder: &mut fidl::encoding::Decoder<'_, D>,
6716            offset: usize,
6717            _depth: fidl::encoding::Depth,
6718        ) -> fidl::Result<()> {
6719            decoder.debug_check_bounds::<Self>(offset);
6720            // Verify that padding bytes are zero.
6721            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
6722            Ok(())
6723        }
6724    }
6725
6726    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6TrafficClassResponse {
6727        type Borrowed<'a> = &'a Self;
6728        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6729            value
6730        }
6731    }
6732
6733    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6TrafficClassResponse {
6734        type Owned = Self;
6735
6736        #[inline(always)]
6737        fn inline_align(_context: fidl::encoding::Context) -> usize {
6738            1
6739        }
6740
6741        #[inline(always)]
6742        fn inline_size(_context: fidl::encoding::Context) -> usize {
6743            1
6744        }
6745        #[inline(always)]
6746        fn encode_is_copy() -> bool {
6747            true
6748        }
6749
6750        #[inline(always)]
6751        fn decode_is_copy() -> bool {
6752            true
6753        }
6754    }
6755
6756    unsafe impl<D: fidl::encoding::ResourceDialect>
6757        fidl::encoding::Encode<BaseNetworkSocketGetIpv6TrafficClassResponse, D>
6758        for &BaseNetworkSocketGetIpv6TrafficClassResponse
6759    {
6760        #[inline]
6761        unsafe fn encode(
6762            self,
6763            encoder: &mut fidl::encoding::Encoder<'_, D>,
6764            offset: usize,
6765            _depth: fidl::encoding::Depth,
6766        ) -> fidl::Result<()> {
6767            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6TrafficClassResponse>(offset);
6768            unsafe {
6769                // Copy the object into the buffer.
6770                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6771                (buf_ptr as *mut BaseNetworkSocketGetIpv6TrafficClassResponse).write_unaligned(
6772                    (self as *const BaseNetworkSocketGetIpv6TrafficClassResponse).read(),
6773                );
6774                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6775                // done second because the memcpy will write garbage to these bytes.
6776            }
6777            Ok(())
6778        }
6779    }
6780    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6781        fidl::encoding::Encode<BaseNetworkSocketGetIpv6TrafficClassResponse, D> for (T0,)
6782    {
6783        #[inline]
6784        unsafe fn encode(
6785            self,
6786            encoder: &mut fidl::encoding::Encoder<'_, D>,
6787            offset: usize,
6788            depth: fidl::encoding::Depth,
6789        ) -> fidl::Result<()> {
6790            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6TrafficClassResponse>(offset);
6791            // Zero out padding regions. There's no need to apply masks
6792            // because the unmasked parts will be overwritten by fields.
6793            // Write the fields.
6794            self.0.encode(encoder, offset + 0, depth)?;
6795            Ok(())
6796        }
6797    }
6798
6799    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6800        for BaseNetworkSocketGetIpv6TrafficClassResponse
6801    {
6802        #[inline(always)]
6803        fn new_empty() -> Self {
6804            Self { value: fidl::new_empty!(u8, D) }
6805        }
6806
6807        #[inline]
6808        unsafe fn decode(
6809            &mut self,
6810            decoder: &mut fidl::encoding::Decoder<'_, D>,
6811            offset: usize,
6812            _depth: fidl::encoding::Depth,
6813        ) -> fidl::Result<()> {
6814            decoder.debug_check_bounds::<Self>(offset);
6815            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6816            // Verify that padding bytes are zero.
6817            // Copy from the buffer into the object.
6818            unsafe {
6819                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6820            }
6821            Ok(())
6822        }
6823    }
6824
6825    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetIpv6UnicastHopsResponse {
6826        type Borrowed<'a> = &'a Self;
6827        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6828            value
6829        }
6830    }
6831
6832    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetIpv6UnicastHopsResponse {
6833        type Owned = Self;
6834
6835        #[inline(always)]
6836        fn inline_align(_context: fidl::encoding::Context) -> usize {
6837            1
6838        }
6839
6840        #[inline(always)]
6841        fn inline_size(_context: fidl::encoding::Context) -> usize {
6842            1
6843        }
6844        #[inline(always)]
6845        fn encode_is_copy() -> bool {
6846            true
6847        }
6848
6849        #[inline(always)]
6850        fn decode_is_copy() -> bool {
6851            true
6852        }
6853    }
6854
6855    unsafe impl<D: fidl::encoding::ResourceDialect>
6856        fidl::encoding::Encode<BaseNetworkSocketGetIpv6UnicastHopsResponse, D>
6857        for &BaseNetworkSocketGetIpv6UnicastHopsResponse
6858    {
6859        #[inline]
6860        unsafe fn encode(
6861            self,
6862            encoder: &mut fidl::encoding::Encoder<'_, D>,
6863            offset: usize,
6864            _depth: fidl::encoding::Depth,
6865        ) -> fidl::Result<()> {
6866            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6UnicastHopsResponse>(offset);
6867            unsafe {
6868                // Copy the object into the buffer.
6869                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6870                (buf_ptr as *mut BaseNetworkSocketGetIpv6UnicastHopsResponse).write_unaligned(
6871                    (self as *const BaseNetworkSocketGetIpv6UnicastHopsResponse).read(),
6872                );
6873                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6874                // done second because the memcpy will write garbage to these bytes.
6875            }
6876            Ok(())
6877        }
6878    }
6879    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
6880        fidl::encoding::Encode<BaseNetworkSocketGetIpv6UnicastHopsResponse, D> for (T0,)
6881    {
6882        #[inline]
6883        unsafe fn encode(
6884            self,
6885            encoder: &mut fidl::encoding::Encoder<'_, D>,
6886            offset: usize,
6887            depth: fidl::encoding::Depth,
6888        ) -> fidl::Result<()> {
6889            encoder.debug_check_bounds::<BaseNetworkSocketGetIpv6UnicastHopsResponse>(offset);
6890            // Zero out padding regions. There's no need to apply masks
6891            // because the unmasked parts will be overwritten by fields.
6892            // Write the fields.
6893            self.0.encode(encoder, offset + 0, depth)?;
6894            Ok(())
6895        }
6896    }
6897
6898    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6899        for BaseNetworkSocketGetIpv6UnicastHopsResponse
6900    {
6901        #[inline(always)]
6902        fn new_empty() -> Self {
6903            Self { value: fidl::new_empty!(u8, D) }
6904        }
6905
6906        #[inline]
6907        unsafe fn decode(
6908            &mut self,
6909            decoder: &mut fidl::encoding::Decoder<'_, D>,
6910            offset: usize,
6911            _depth: fidl::encoding::Depth,
6912        ) -> fidl::Result<()> {
6913            decoder.debug_check_bounds::<Self>(offset);
6914            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6915            // Verify that padding bytes are zero.
6916            // Copy from the buffer into the object.
6917            unsafe {
6918                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
6919            }
6920            Ok(())
6921        }
6922    }
6923
6924    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetOriginalDestinationResponse {
6925        type Borrowed<'a> = &'a Self;
6926        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6927            value
6928        }
6929    }
6930
6931    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetOriginalDestinationResponse {
6932        type Owned = Self;
6933
6934        #[inline(always)]
6935        fn inline_align(_context: fidl::encoding::Context) -> usize {
6936            8
6937        }
6938
6939        #[inline(always)]
6940        fn inline_size(_context: fidl::encoding::Context) -> usize {
6941            16
6942        }
6943    }
6944
6945    unsafe impl<D: fidl::encoding::ResourceDialect>
6946        fidl::encoding::Encode<BaseNetworkSocketGetOriginalDestinationResponse, D>
6947        for &BaseNetworkSocketGetOriginalDestinationResponse
6948    {
6949        #[inline]
6950        unsafe fn encode(
6951            self,
6952            encoder: &mut fidl::encoding::Encoder<'_, D>,
6953            offset: usize,
6954            _depth: fidl::encoding::Depth,
6955        ) -> fidl::Result<()> {
6956            encoder.debug_check_bounds::<BaseNetworkSocketGetOriginalDestinationResponse>(offset);
6957            // Delegate to tuple encoding.
6958            fidl::encoding::Encode::<BaseNetworkSocketGetOriginalDestinationResponse, D>::encode(
6959                (
6960                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
6961                ),
6962                encoder, offset, _depth
6963            )
6964        }
6965    }
6966    unsafe impl<
6967        D: fidl::encoding::ResourceDialect,
6968        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
6969    > fidl::encoding::Encode<BaseNetworkSocketGetOriginalDestinationResponse, D> for (T0,)
6970    {
6971        #[inline]
6972        unsafe fn encode(
6973            self,
6974            encoder: &mut fidl::encoding::Encoder<'_, D>,
6975            offset: usize,
6976            depth: fidl::encoding::Depth,
6977        ) -> fidl::Result<()> {
6978            encoder.debug_check_bounds::<BaseNetworkSocketGetOriginalDestinationResponse>(offset);
6979            // Zero out padding regions. There's no need to apply masks
6980            // because the unmasked parts will be overwritten by fields.
6981            // Write the fields.
6982            self.0.encode(encoder, offset + 0, depth)?;
6983            Ok(())
6984        }
6985    }
6986
6987    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6988        for BaseNetworkSocketGetOriginalDestinationResponse
6989    {
6990        #[inline(always)]
6991        fn new_empty() -> Self {
6992            Self { value: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
6993        }
6994
6995        #[inline]
6996        unsafe fn decode(
6997            &mut self,
6998            decoder: &mut fidl::encoding::Decoder<'_, D>,
6999            offset: usize,
7000            _depth: fidl::encoding::Depth,
7001        ) -> fidl::Result<()> {
7002            decoder.debug_check_bounds::<Self>(offset);
7003            // Verify that padding bytes are zero.
7004            fidl::decode!(
7005                fidl_fuchsia_net__common::SocketAddress,
7006                D,
7007                &mut self.value,
7008                decoder,
7009                offset + 0,
7010                _depth
7011            )?;
7012            Ok(())
7013        }
7014    }
7015
7016    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetPeerNameResponse {
7017        type Borrowed<'a> = &'a Self;
7018        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7019            value
7020        }
7021    }
7022
7023    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetPeerNameResponse {
7024        type Owned = Self;
7025
7026        #[inline(always)]
7027        fn inline_align(_context: fidl::encoding::Context) -> usize {
7028            8
7029        }
7030
7031        #[inline(always)]
7032        fn inline_size(_context: fidl::encoding::Context) -> usize {
7033            16
7034        }
7035    }
7036
7037    unsafe impl<D: fidl::encoding::ResourceDialect>
7038        fidl::encoding::Encode<BaseNetworkSocketGetPeerNameResponse, D>
7039        for &BaseNetworkSocketGetPeerNameResponse
7040    {
7041        #[inline]
7042        unsafe fn encode(
7043            self,
7044            encoder: &mut fidl::encoding::Encoder<'_, D>,
7045            offset: usize,
7046            _depth: fidl::encoding::Depth,
7047        ) -> fidl::Result<()> {
7048            encoder.debug_check_bounds::<BaseNetworkSocketGetPeerNameResponse>(offset);
7049            // Delegate to tuple encoding.
7050            fidl::encoding::Encode::<BaseNetworkSocketGetPeerNameResponse, D>::encode(
7051                (
7052                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
7053                ),
7054                encoder, offset, _depth
7055            )
7056        }
7057    }
7058    unsafe impl<
7059        D: fidl::encoding::ResourceDialect,
7060        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7061    > fidl::encoding::Encode<BaseNetworkSocketGetPeerNameResponse, D> for (T0,)
7062    {
7063        #[inline]
7064        unsafe fn encode(
7065            self,
7066            encoder: &mut fidl::encoding::Encoder<'_, D>,
7067            offset: usize,
7068            depth: fidl::encoding::Depth,
7069        ) -> fidl::Result<()> {
7070            encoder.debug_check_bounds::<BaseNetworkSocketGetPeerNameResponse>(offset);
7071            // Zero out padding regions. There's no need to apply masks
7072            // because the unmasked parts will be overwritten by fields.
7073            // Write the fields.
7074            self.0.encode(encoder, offset + 0, depth)?;
7075            Ok(())
7076        }
7077    }
7078
7079    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7080        for BaseNetworkSocketGetPeerNameResponse
7081    {
7082        #[inline(always)]
7083        fn new_empty() -> Self {
7084            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7085        }
7086
7087        #[inline]
7088        unsafe fn decode(
7089            &mut self,
7090            decoder: &mut fidl::encoding::Decoder<'_, D>,
7091            offset: usize,
7092            _depth: fidl::encoding::Depth,
7093        ) -> fidl::Result<()> {
7094            decoder.debug_check_bounds::<Self>(offset);
7095            // Verify that padding bytes are zero.
7096            fidl::decode!(
7097                fidl_fuchsia_net__common::SocketAddress,
7098                D,
7099                &mut self.addr,
7100                decoder,
7101                offset + 0,
7102                _depth
7103            )?;
7104            Ok(())
7105        }
7106    }
7107
7108    impl fidl::encoding::ValueTypeMarker for BaseNetworkSocketGetSockNameResponse {
7109        type Borrowed<'a> = &'a Self;
7110        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7111            value
7112        }
7113    }
7114
7115    unsafe impl fidl::encoding::TypeMarker for BaseNetworkSocketGetSockNameResponse {
7116        type Owned = Self;
7117
7118        #[inline(always)]
7119        fn inline_align(_context: fidl::encoding::Context) -> usize {
7120            8
7121        }
7122
7123        #[inline(always)]
7124        fn inline_size(_context: fidl::encoding::Context) -> usize {
7125            16
7126        }
7127    }
7128
7129    unsafe impl<D: fidl::encoding::ResourceDialect>
7130        fidl::encoding::Encode<BaseNetworkSocketGetSockNameResponse, D>
7131        for &BaseNetworkSocketGetSockNameResponse
7132    {
7133        #[inline]
7134        unsafe fn encode(
7135            self,
7136            encoder: &mut fidl::encoding::Encoder<'_, D>,
7137            offset: usize,
7138            _depth: fidl::encoding::Depth,
7139        ) -> fidl::Result<()> {
7140            encoder.debug_check_bounds::<BaseNetworkSocketGetSockNameResponse>(offset);
7141            // Delegate to tuple encoding.
7142            fidl::encoding::Encode::<BaseNetworkSocketGetSockNameResponse, D>::encode(
7143                (
7144                    <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
7145                ),
7146                encoder, offset, _depth
7147            )
7148        }
7149    }
7150    unsafe impl<
7151        D: fidl::encoding::ResourceDialect,
7152        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::SocketAddress, D>,
7153    > fidl::encoding::Encode<BaseNetworkSocketGetSockNameResponse, D> for (T0,)
7154    {
7155        #[inline]
7156        unsafe fn encode(
7157            self,
7158            encoder: &mut fidl::encoding::Encoder<'_, D>,
7159            offset: usize,
7160            depth: fidl::encoding::Depth,
7161        ) -> fidl::Result<()> {
7162            encoder.debug_check_bounds::<BaseNetworkSocketGetSockNameResponse>(offset);
7163            // Zero out padding regions. There's no need to apply masks
7164            // because the unmasked parts will be overwritten by fields.
7165            // Write the fields.
7166            self.0.encode(encoder, offset + 0, depth)?;
7167            Ok(())
7168        }
7169    }
7170
7171    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7172        for BaseNetworkSocketGetSockNameResponse
7173    {
7174        #[inline(always)]
7175        fn new_empty() -> Self {
7176            Self { addr: fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D) }
7177        }
7178
7179        #[inline]
7180        unsafe fn decode(
7181            &mut self,
7182            decoder: &mut fidl::encoding::Decoder<'_, D>,
7183            offset: usize,
7184            _depth: fidl::encoding::Depth,
7185        ) -> fidl::Result<()> {
7186            decoder.debug_check_bounds::<Self>(offset);
7187            // Verify that padding bytes are zero.
7188            fidl::decode!(
7189                fidl_fuchsia_net__common::SocketAddress,
7190                D,
7191                &mut self.addr,
7192                decoder,
7193                offset + 0,
7194                _depth
7195            )?;
7196            Ok(())
7197        }
7198    }
7199
7200    impl fidl::encoding::ValueTypeMarker for BaseSocketGetMarkRequest {
7201        type Borrowed<'a> = &'a Self;
7202        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7203            value
7204        }
7205    }
7206
7207    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetMarkRequest {
7208        type Owned = Self;
7209
7210        #[inline(always)]
7211        fn inline_align(_context: fidl::encoding::Context) -> usize {
7212            1
7213        }
7214
7215        #[inline(always)]
7216        fn inline_size(_context: fidl::encoding::Context) -> usize {
7217            1
7218        }
7219    }
7220
7221    unsafe impl<D: fidl::encoding::ResourceDialect>
7222        fidl::encoding::Encode<BaseSocketGetMarkRequest, D> for &BaseSocketGetMarkRequest
7223    {
7224        #[inline]
7225        unsafe fn encode(
7226            self,
7227            encoder: &mut fidl::encoding::Encoder<'_, D>,
7228            offset: usize,
7229            _depth: fidl::encoding::Depth,
7230        ) -> fidl::Result<()> {
7231            encoder.debug_check_bounds::<BaseSocketGetMarkRequest>(offset);
7232            // Delegate to tuple encoding.
7233            fidl::encoding::Encode::<BaseSocketGetMarkRequest, D>::encode(
7234                (
7235                    <fidl_fuchsia_net__common::MarkDomain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
7236                ),
7237                encoder, offset, _depth
7238            )
7239        }
7240    }
7241    unsafe impl<
7242        D: fidl::encoding::ResourceDialect,
7243        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::MarkDomain, D>,
7244    > fidl::encoding::Encode<BaseSocketGetMarkRequest, D> for (T0,)
7245    {
7246        #[inline]
7247        unsafe fn encode(
7248            self,
7249            encoder: &mut fidl::encoding::Encoder<'_, D>,
7250            offset: usize,
7251            depth: fidl::encoding::Depth,
7252        ) -> fidl::Result<()> {
7253            encoder.debug_check_bounds::<BaseSocketGetMarkRequest>(offset);
7254            // Zero out padding regions. There's no need to apply masks
7255            // because the unmasked parts will be overwritten by fields.
7256            // Write the fields.
7257            self.0.encode(encoder, offset + 0, depth)?;
7258            Ok(())
7259        }
7260    }
7261
7262    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7263        for BaseSocketGetMarkRequest
7264    {
7265        #[inline(always)]
7266        fn new_empty() -> Self {
7267            Self { domain: fidl::new_empty!(fidl_fuchsia_net__common::MarkDomain, D) }
7268        }
7269
7270        #[inline]
7271        unsafe fn decode(
7272            &mut self,
7273            decoder: &mut fidl::encoding::Decoder<'_, D>,
7274            offset: usize,
7275            _depth: fidl::encoding::Depth,
7276        ) -> fidl::Result<()> {
7277            decoder.debug_check_bounds::<Self>(offset);
7278            // Verify that padding bytes are zero.
7279            fidl::decode!(
7280                fidl_fuchsia_net__common::MarkDomain,
7281                D,
7282                &mut self.domain,
7283                decoder,
7284                offset + 0,
7285                _depth
7286            )?;
7287            Ok(())
7288        }
7289    }
7290
7291    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBindToDeviceRequest {
7292        type Borrowed<'a> = &'a Self;
7293        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7294            value
7295        }
7296    }
7297
7298    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBindToDeviceRequest {
7299        type Owned = Self;
7300
7301        #[inline(always)]
7302        fn inline_align(_context: fidl::encoding::Context) -> usize {
7303            8
7304        }
7305
7306        #[inline(always)]
7307        fn inline_size(_context: fidl::encoding::Context) -> usize {
7308            16
7309        }
7310    }
7311
7312    unsafe impl<D: fidl::encoding::ResourceDialect>
7313        fidl::encoding::Encode<BaseSocketSetBindToDeviceRequest, D>
7314        for &BaseSocketSetBindToDeviceRequest
7315    {
7316        #[inline]
7317        unsafe fn encode(
7318            self,
7319            encoder: &mut fidl::encoding::Encoder<'_, D>,
7320            offset: usize,
7321            _depth: fidl::encoding::Depth,
7322        ) -> fidl::Result<()> {
7323            encoder.debug_check_bounds::<BaseSocketSetBindToDeviceRequest>(offset);
7324            // Delegate to tuple encoding.
7325            fidl::encoding::Encode::<BaseSocketSetBindToDeviceRequest, D>::encode(
7326                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
7327                    &self.value,
7328                ),),
7329                encoder,
7330                offset,
7331                _depth,
7332            )
7333        }
7334    }
7335    unsafe impl<
7336        D: fidl::encoding::ResourceDialect,
7337        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
7338    > fidl::encoding::Encode<BaseSocketSetBindToDeviceRequest, D> for (T0,)
7339    {
7340        #[inline]
7341        unsafe fn encode(
7342            self,
7343            encoder: &mut fidl::encoding::Encoder<'_, D>,
7344            offset: usize,
7345            depth: fidl::encoding::Depth,
7346        ) -> fidl::Result<()> {
7347            encoder.debug_check_bounds::<BaseSocketSetBindToDeviceRequest>(offset);
7348            // Zero out padding regions. There's no need to apply masks
7349            // because the unmasked parts will be overwritten by fields.
7350            // Write the fields.
7351            self.0.encode(encoder, offset + 0, depth)?;
7352            Ok(())
7353        }
7354    }
7355
7356    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7357        for BaseSocketSetBindToDeviceRequest
7358    {
7359        #[inline(always)]
7360        fn new_empty() -> Self {
7361            Self { value: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
7362        }
7363
7364        #[inline]
7365        unsafe fn decode(
7366            &mut self,
7367            decoder: &mut fidl::encoding::Decoder<'_, D>,
7368            offset: usize,
7369            _depth: fidl::encoding::Depth,
7370        ) -> fidl::Result<()> {
7371            decoder.debug_check_bounds::<Self>(offset);
7372            // Verify that padding bytes are zero.
7373            fidl::decode!(
7374                fidl::encoding::BoundedString<15>,
7375                D,
7376                &mut self.value,
7377                decoder,
7378                offset + 0,
7379                _depth
7380            )?;
7381            Ok(())
7382        }
7383    }
7384
7385    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBindToInterfaceIndexRequest {
7386        type Borrowed<'a> = &'a Self;
7387        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7388            value
7389        }
7390    }
7391
7392    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBindToInterfaceIndexRequest {
7393        type Owned = Self;
7394
7395        #[inline(always)]
7396        fn inline_align(_context: fidl::encoding::Context) -> usize {
7397            8
7398        }
7399
7400        #[inline(always)]
7401        fn inline_size(_context: fidl::encoding::Context) -> usize {
7402            8
7403        }
7404        #[inline(always)]
7405        fn encode_is_copy() -> bool {
7406            true
7407        }
7408
7409        #[inline(always)]
7410        fn decode_is_copy() -> bool {
7411            true
7412        }
7413    }
7414
7415    unsafe impl<D: fidl::encoding::ResourceDialect>
7416        fidl::encoding::Encode<BaseSocketSetBindToInterfaceIndexRequest, D>
7417        for &BaseSocketSetBindToInterfaceIndexRequest
7418    {
7419        #[inline]
7420        unsafe fn encode(
7421            self,
7422            encoder: &mut fidl::encoding::Encoder<'_, D>,
7423            offset: usize,
7424            _depth: fidl::encoding::Depth,
7425        ) -> fidl::Result<()> {
7426            encoder.debug_check_bounds::<BaseSocketSetBindToInterfaceIndexRequest>(offset);
7427            unsafe {
7428                // Copy the object into the buffer.
7429                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7430                (buf_ptr as *mut BaseSocketSetBindToInterfaceIndexRequest).write_unaligned(
7431                    (self as *const BaseSocketSetBindToInterfaceIndexRequest).read(),
7432                );
7433                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7434                // done second because the memcpy will write garbage to these bytes.
7435            }
7436            Ok(())
7437        }
7438    }
7439    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
7440        fidl::encoding::Encode<BaseSocketSetBindToInterfaceIndexRequest, D> for (T0,)
7441    {
7442        #[inline]
7443        unsafe fn encode(
7444            self,
7445            encoder: &mut fidl::encoding::Encoder<'_, D>,
7446            offset: usize,
7447            depth: fidl::encoding::Depth,
7448        ) -> fidl::Result<()> {
7449            encoder.debug_check_bounds::<BaseSocketSetBindToInterfaceIndexRequest>(offset);
7450            // Zero out padding regions. There's no need to apply masks
7451            // because the unmasked parts will be overwritten by fields.
7452            // Write the fields.
7453            self.0.encode(encoder, offset + 0, depth)?;
7454            Ok(())
7455        }
7456    }
7457
7458    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7459        for BaseSocketSetBindToInterfaceIndexRequest
7460    {
7461        #[inline(always)]
7462        fn new_empty() -> Self {
7463            Self { value: fidl::new_empty!(u64, D) }
7464        }
7465
7466        #[inline]
7467        unsafe fn decode(
7468            &mut self,
7469            decoder: &mut fidl::encoding::Decoder<'_, D>,
7470            offset: usize,
7471            _depth: fidl::encoding::Depth,
7472        ) -> fidl::Result<()> {
7473            decoder.debug_check_bounds::<Self>(offset);
7474            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7475            // Verify that padding bytes are zero.
7476            // Copy from the buffer into the object.
7477            unsafe {
7478                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7479            }
7480            Ok(())
7481        }
7482    }
7483
7484    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBroadcastRequest {
7485        type Borrowed<'a> = &'a Self;
7486        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7487            value
7488        }
7489    }
7490
7491    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBroadcastRequest {
7492        type Owned = Self;
7493
7494        #[inline(always)]
7495        fn inline_align(_context: fidl::encoding::Context) -> usize {
7496            1
7497        }
7498
7499        #[inline(always)]
7500        fn inline_size(_context: fidl::encoding::Context) -> usize {
7501            1
7502        }
7503    }
7504
7505    unsafe impl<D: fidl::encoding::ResourceDialect>
7506        fidl::encoding::Encode<BaseSocketSetBroadcastRequest, D>
7507        for &BaseSocketSetBroadcastRequest
7508    {
7509        #[inline]
7510        unsafe fn encode(
7511            self,
7512            encoder: &mut fidl::encoding::Encoder<'_, D>,
7513            offset: usize,
7514            _depth: fidl::encoding::Depth,
7515        ) -> fidl::Result<()> {
7516            encoder.debug_check_bounds::<BaseSocketSetBroadcastRequest>(offset);
7517            // Delegate to tuple encoding.
7518            fidl::encoding::Encode::<BaseSocketSetBroadcastRequest, D>::encode(
7519                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7520                encoder,
7521                offset,
7522                _depth,
7523            )
7524        }
7525    }
7526    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7527        fidl::encoding::Encode<BaseSocketSetBroadcastRequest, D> for (T0,)
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::<BaseSocketSetBroadcastRequest>(offset);
7537            // Zero out padding regions. There's no need to apply masks
7538            // because the unmasked parts will be overwritten by fields.
7539            // Write the fields.
7540            self.0.encode(encoder, offset + 0, depth)?;
7541            Ok(())
7542        }
7543    }
7544
7545    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7546        for BaseSocketSetBroadcastRequest
7547    {
7548        #[inline(always)]
7549        fn new_empty() -> Self {
7550            Self { value: fidl::new_empty!(bool, D) }
7551        }
7552
7553        #[inline]
7554        unsafe fn decode(
7555            &mut self,
7556            decoder: &mut fidl::encoding::Decoder<'_, D>,
7557            offset: usize,
7558            _depth: fidl::encoding::Depth,
7559        ) -> fidl::Result<()> {
7560            decoder.debug_check_bounds::<Self>(offset);
7561            // Verify that padding bytes are zero.
7562            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7563            Ok(())
7564        }
7565    }
7566
7567    impl fidl::encoding::ValueTypeMarker for BaseSocketSetKeepAliveRequest {
7568        type Borrowed<'a> = &'a Self;
7569        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7570            value
7571        }
7572    }
7573
7574    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetKeepAliveRequest {
7575        type Owned = Self;
7576
7577        #[inline(always)]
7578        fn inline_align(_context: fidl::encoding::Context) -> usize {
7579            1
7580        }
7581
7582        #[inline(always)]
7583        fn inline_size(_context: fidl::encoding::Context) -> usize {
7584            1
7585        }
7586    }
7587
7588    unsafe impl<D: fidl::encoding::ResourceDialect>
7589        fidl::encoding::Encode<BaseSocketSetKeepAliveRequest, D>
7590        for &BaseSocketSetKeepAliveRequest
7591    {
7592        #[inline]
7593        unsafe fn encode(
7594            self,
7595            encoder: &mut fidl::encoding::Encoder<'_, D>,
7596            offset: usize,
7597            _depth: fidl::encoding::Depth,
7598        ) -> fidl::Result<()> {
7599            encoder.debug_check_bounds::<BaseSocketSetKeepAliveRequest>(offset);
7600            // Delegate to tuple encoding.
7601            fidl::encoding::Encode::<BaseSocketSetKeepAliveRequest, D>::encode(
7602                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7603                encoder,
7604                offset,
7605                _depth,
7606            )
7607        }
7608    }
7609    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7610        fidl::encoding::Encode<BaseSocketSetKeepAliveRequest, D> for (T0,)
7611    {
7612        #[inline]
7613        unsafe fn encode(
7614            self,
7615            encoder: &mut fidl::encoding::Encoder<'_, D>,
7616            offset: usize,
7617            depth: fidl::encoding::Depth,
7618        ) -> fidl::Result<()> {
7619            encoder.debug_check_bounds::<BaseSocketSetKeepAliveRequest>(offset);
7620            // Zero out padding regions. There's no need to apply masks
7621            // because the unmasked parts will be overwritten by fields.
7622            // Write the fields.
7623            self.0.encode(encoder, offset + 0, depth)?;
7624            Ok(())
7625        }
7626    }
7627
7628    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7629        for BaseSocketSetKeepAliveRequest
7630    {
7631        #[inline(always)]
7632        fn new_empty() -> Self {
7633            Self { value: fidl::new_empty!(bool, D) }
7634        }
7635
7636        #[inline]
7637        unsafe fn decode(
7638            &mut self,
7639            decoder: &mut fidl::encoding::Decoder<'_, D>,
7640            offset: usize,
7641            _depth: fidl::encoding::Depth,
7642        ) -> fidl::Result<()> {
7643            decoder.debug_check_bounds::<Self>(offset);
7644            // Verify that padding bytes are zero.
7645            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7646            Ok(())
7647        }
7648    }
7649
7650    impl fidl::encoding::ValueTypeMarker for BaseSocketSetLingerRequest {
7651        type Borrowed<'a> = &'a Self;
7652        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7653            value
7654        }
7655    }
7656
7657    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetLingerRequest {
7658        type Owned = Self;
7659
7660        #[inline(always)]
7661        fn inline_align(_context: fidl::encoding::Context) -> usize {
7662            4
7663        }
7664
7665        #[inline(always)]
7666        fn inline_size(_context: fidl::encoding::Context) -> usize {
7667            8
7668        }
7669    }
7670
7671    unsafe impl<D: fidl::encoding::ResourceDialect>
7672        fidl::encoding::Encode<BaseSocketSetLingerRequest, D> for &BaseSocketSetLingerRequest
7673    {
7674        #[inline]
7675        unsafe fn encode(
7676            self,
7677            encoder: &mut fidl::encoding::Encoder<'_, D>,
7678            offset: usize,
7679            _depth: fidl::encoding::Depth,
7680        ) -> fidl::Result<()> {
7681            encoder.debug_check_bounds::<BaseSocketSetLingerRequest>(offset);
7682            // Delegate to tuple encoding.
7683            fidl::encoding::Encode::<BaseSocketSetLingerRequest, D>::encode(
7684                (
7685                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.linger),
7686                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length_secs),
7687                ),
7688                encoder,
7689                offset,
7690                _depth,
7691            )
7692        }
7693    }
7694    unsafe impl<
7695        D: fidl::encoding::ResourceDialect,
7696        T0: fidl::encoding::Encode<bool, D>,
7697        T1: fidl::encoding::Encode<u32, D>,
7698    > fidl::encoding::Encode<BaseSocketSetLingerRequest, D> for (T0, T1)
7699    {
7700        #[inline]
7701        unsafe fn encode(
7702            self,
7703            encoder: &mut fidl::encoding::Encoder<'_, D>,
7704            offset: usize,
7705            depth: fidl::encoding::Depth,
7706        ) -> fidl::Result<()> {
7707            encoder.debug_check_bounds::<BaseSocketSetLingerRequest>(offset);
7708            // Zero out padding regions. There's no need to apply masks
7709            // because the unmasked parts will be overwritten by fields.
7710            unsafe {
7711                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7712                (ptr as *mut u32).write_unaligned(0);
7713            }
7714            // Write the fields.
7715            self.0.encode(encoder, offset + 0, depth)?;
7716            self.1.encode(encoder, offset + 4, depth)?;
7717            Ok(())
7718        }
7719    }
7720
7721    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7722        for BaseSocketSetLingerRequest
7723    {
7724        #[inline(always)]
7725        fn new_empty() -> Self {
7726            Self { linger: fidl::new_empty!(bool, D), length_secs: fidl::new_empty!(u32, D) }
7727        }
7728
7729        #[inline]
7730        unsafe fn decode(
7731            &mut self,
7732            decoder: &mut fidl::encoding::Decoder<'_, D>,
7733            offset: usize,
7734            _depth: fidl::encoding::Depth,
7735        ) -> fidl::Result<()> {
7736            decoder.debug_check_bounds::<Self>(offset);
7737            // Verify that padding bytes are zero.
7738            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7739            let padval = unsafe { (ptr as *const u32).read_unaligned() };
7740            let mask = 0xffffff00u32;
7741            let maskedval = padval & mask;
7742            if maskedval != 0 {
7743                return Err(fidl::Error::NonZeroPadding {
7744                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7745                });
7746            }
7747            fidl::decode!(bool, D, &mut self.linger, decoder, offset + 0, _depth)?;
7748            fidl::decode!(u32, D, &mut self.length_secs, decoder, offset + 4, _depth)?;
7749            Ok(())
7750        }
7751    }
7752
7753    impl fidl::encoding::ValueTypeMarker for BaseSocketSetMarkRequest {
7754        type Borrowed<'a> = &'a Self;
7755        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7756            value
7757        }
7758    }
7759
7760    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetMarkRequest {
7761        type Owned = Self;
7762
7763        #[inline(always)]
7764        fn inline_align(_context: fidl::encoding::Context) -> usize {
7765            8
7766        }
7767
7768        #[inline(always)]
7769        fn inline_size(_context: fidl::encoding::Context) -> usize {
7770            24
7771        }
7772    }
7773
7774    unsafe impl<D: fidl::encoding::ResourceDialect>
7775        fidl::encoding::Encode<BaseSocketSetMarkRequest, D> for &BaseSocketSetMarkRequest
7776    {
7777        #[inline]
7778        unsafe fn encode(
7779            self,
7780            encoder: &mut fidl::encoding::Encoder<'_, D>,
7781            offset: usize,
7782            _depth: fidl::encoding::Depth,
7783        ) -> fidl::Result<()> {
7784            encoder.debug_check_bounds::<BaseSocketSetMarkRequest>(offset);
7785            // Delegate to tuple encoding.
7786            fidl::encoding::Encode::<BaseSocketSetMarkRequest, D>::encode(
7787                (
7788                    <fidl_fuchsia_net__common::MarkDomain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
7789                    <OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mark),
7790                ),
7791                encoder, offset, _depth
7792            )
7793        }
7794    }
7795    unsafe impl<
7796        D: fidl::encoding::ResourceDialect,
7797        T0: fidl::encoding::Encode<fidl_fuchsia_net__common::MarkDomain, D>,
7798        T1: fidl::encoding::Encode<OptionalUint32, D>,
7799    > fidl::encoding::Encode<BaseSocketSetMarkRequest, D> for (T0, T1)
7800    {
7801        #[inline]
7802        unsafe fn encode(
7803            self,
7804            encoder: &mut fidl::encoding::Encoder<'_, D>,
7805            offset: usize,
7806            depth: fidl::encoding::Depth,
7807        ) -> fidl::Result<()> {
7808            encoder.debug_check_bounds::<BaseSocketSetMarkRequest>(offset);
7809            // Zero out padding regions. There's no need to apply masks
7810            // because the unmasked parts will be overwritten by fields.
7811            unsafe {
7812                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7813                (ptr as *mut u64).write_unaligned(0);
7814            }
7815            // Write the fields.
7816            self.0.encode(encoder, offset + 0, depth)?;
7817            self.1.encode(encoder, offset + 8, depth)?;
7818            Ok(())
7819        }
7820    }
7821
7822    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7823        for BaseSocketSetMarkRequest
7824    {
7825        #[inline(always)]
7826        fn new_empty() -> Self {
7827            Self {
7828                domain: fidl::new_empty!(fidl_fuchsia_net__common::MarkDomain, D),
7829                mark: fidl::new_empty!(OptionalUint32, D),
7830            }
7831        }
7832
7833        #[inline]
7834        unsafe fn decode(
7835            &mut self,
7836            decoder: &mut fidl::encoding::Decoder<'_, D>,
7837            offset: usize,
7838            _depth: fidl::encoding::Depth,
7839        ) -> fidl::Result<()> {
7840            decoder.debug_check_bounds::<Self>(offset);
7841            // Verify that padding bytes are zero.
7842            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7843            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7844            let mask = 0xffffffffffffff00u64;
7845            let maskedval = padval & mask;
7846            if maskedval != 0 {
7847                return Err(fidl::Error::NonZeroPadding {
7848                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7849                });
7850            }
7851            fidl::decode!(
7852                fidl_fuchsia_net__common::MarkDomain,
7853                D,
7854                &mut self.domain,
7855                decoder,
7856                offset + 0,
7857                _depth
7858            )?;
7859            fidl::decode!(OptionalUint32, D, &mut self.mark, decoder, offset + 8, _depth)?;
7860            Ok(())
7861        }
7862    }
7863
7864    impl fidl::encoding::ValueTypeMarker for BaseSocketSetNoCheckRequest {
7865        type Borrowed<'a> = &'a Self;
7866        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7867            value
7868        }
7869    }
7870
7871    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetNoCheckRequest {
7872        type Owned = Self;
7873
7874        #[inline(always)]
7875        fn inline_align(_context: fidl::encoding::Context) -> usize {
7876            1
7877        }
7878
7879        #[inline(always)]
7880        fn inline_size(_context: fidl::encoding::Context) -> usize {
7881            1
7882        }
7883    }
7884
7885    unsafe impl<D: fidl::encoding::ResourceDialect>
7886        fidl::encoding::Encode<BaseSocketSetNoCheckRequest, D> for &BaseSocketSetNoCheckRequest
7887    {
7888        #[inline]
7889        unsafe fn encode(
7890            self,
7891            encoder: &mut fidl::encoding::Encoder<'_, D>,
7892            offset: usize,
7893            _depth: fidl::encoding::Depth,
7894        ) -> fidl::Result<()> {
7895            encoder.debug_check_bounds::<BaseSocketSetNoCheckRequest>(offset);
7896            // Delegate to tuple encoding.
7897            fidl::encoding::Encode::<BaseSocketSetNoCheckRequest, D>::encode(
7898                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7899                encoder,
7900                offset,
7901                _depth,
7902            )
7903        }
7904    }
7905    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7906        fidl::encoding::Encode<BaseSocketSetNoCheckRequest, D> for (T0,)
7907    {
7908        #[inline]
7909        unsafe fn encode(
7910            self,
7911            encoder: &mut fidl::encoding::Encoder<'_, D>,
7912            offset: usize,
7913            depth: fidl::encoding::Depth,
7914        ) -> fidl::Result<()> {
7915            encoder.debug_check_bounds::<BaseSocketSetNoCheckRequest>(offset);
7916            // Zero out padding regions. There's no need to apply masks
7917            // because the unmasked parts will be overwritten by fields.
7918            // Write the fields.
7919            self.0.encode(encoder, offset + 0, depth)?;
7920            Ok(())
7921        }
7922    }
7923
7924    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7925        for BaseSocketSetNoCheckRequest
7926    {
7927        #[inline(always)]
7928        fn new_empty() -> Self {
7929            Self { value: fidl::new_empty!(bool, D) }
7930        }
7931
7932        #[inline]
7933        unsafe fn decode(
7934            &mut self,
7935            decoder: &mut fidl::encoding::Decoder<'_, D>,
7936            offset: usize,
7937            _depth: fidl::encoding::Depth,
7938        ) -> fidl::Result<()> {
7939            decoder.debug_check_bounds::<Self>(offset);
7940            // Verify that padding bytes are zero.
7941            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7942            Ok(())
7943        }
7944    }
7945
7946    impl fidl::encoding::ValueTypeMarker for BaseSocketSetOutOfBandInlineRequest {
7947        type Borrowed<'a> = &'a Self;
7948        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7949            value
7950        }
7951    }
7952
7953    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetOutOfBandInlineRequest {
7954        type Owned = Self;
7955
7956        #[inline(always)]
7957        fn inline_align(_context: fidl::encoding::Context) -> usize {
7958            1
7959        }
7960
7961        #[inline(always)]
7962        fn inline_size(_context: fidl::encoding::Context) -> usize {
7963            1
7964        }
7965    }
7966
7967    unsafe impl<D: fidl::encoding::ResourceDialect>
7968        fidl::encoding::Encode<BaseSocketSetOutOfBandInlineRequest, D>
7969        for &BaseSocketSetOutOfBandInlineRequest
7970    {
7971        #[inline]
7972        unsafe fn encode(
7973            self,
7974            encoder: &mut fidl::encoding::Encoder<'_, D>,
7975            offset: usize,
7976            _depth: fidl::encoding::Depth,
7977        ) -> fidl::Result<()> {
7978            encoder.debug_check_bounds::<BaseSocketSetOutOfBandInlineRequest>(offset);
7979            // Delegate to tuple encoding.
7980            fidl::encoding::Encode::<BaseSocketSetOutOfBandInlineRequest, D>::encode(
7981                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7982                encoder,
7983                offset,
7984                _depth,
7985            )
7986        }
7987    }
7988    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7989        fidl::encoding::Encode<BaseSocketSetOutOfBandInlineRequest, D> for (T0,)
7990    {
7991        #[inline]
7992        unsafe fn encode(
7993            self,
7994            encoder: &mut fidl::encoding::Encoder<'_, D>,
7995            offset: usize,
7996            depth: fidl::encoding::Depth,
7997        ) -> fidl::Result<()> {
7998            encoder.debug_check_bounds::<BaseSocketSetOutOfBandInlineRequest>(offset);
7999            // Zero out padding regions. There's no need to apply masks
8000            // because the unmasked parts will be overwritten by fields.
8001            // Write the fields.
8002            self.0.encode(encoder, offset + 0, depth)?;
8003            Ok(())
8004        }
8005    }
8006
8007    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8008        for BaseSocketSetOutOfBandInlineRequest
8009    {
8010        #[inline(always)]
8011        fn new_empty() -> Self {
8012            Self { value: fidl::new_empty!(bool, D) }
8013        }
8014
8015        #[inline]
8016        unsafe fn decode(
8017            &mut self,
8018            decoder: &mut fidl::encoding::Decoder<'_, D>,
8019            offset: usize,
8020            _depth: fidl::encoding::Depth,
8021        ) -> fidl::Result<()> {
8022            decoder.debug_check_bounds::<Self>(offset);
8023            // Verify that padding bytes are zero.
8024            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8025            Ok(())
8026        }
8027    }
8028
8029    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReceiveBufferRequest {
8030        type Borrowed<'a> = &'a Self;
8031        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8032            value
8033        }
8034    }
8035
8036    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReceiveBufferRequest {
8037        type Owned = Self;
8038
8039        #[inline(always)]
8040        fn inline_align(_context: fidl::encoding::Context) -> usize {
8041            8
8042        }
8043
8044        #[inline(always)]
8045        fn inline_size(_context: fidl::encoding::Context) -> usize {
8046            8
8047        }
8048        #[inline(always)]
8049        fn encode_is_copy() -> bool {
8050            true
8051        }
8052
8053        #[inline(always)]
8054        fn decode_is_copy() -> bool {
8055            true
8056        }
8057    }
8058
8059    unsafe impl<D: fidl::encoding::ResourceDialect>
8060        fidl::encoding::Encode<BaseSocketSetReceiveBufferRequest, D>
8061        for &BaseSocketSetReceiveBufferRequest
8062    {
8063        #[inline]
8064        unsafe fn encode(
8065            self,
8066            encoder: &mut fidl::encoding::Encoder<'_, D>,
8067            offset: usize,
8068            _depth: fidl::encoding::Depth,
8069        ) -> fidl::Result<()> {
8070            encoder.debug_check_bounds::<BaseSocketSetReceiveBufferRequest>(offset);
8071            unsafe {
8072                // Copy the object into the buffer.
8073                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8074                (buf_ptr as *mut BaseSocketSetReceiveBufferRequest)
8075                    .write_unaligned((self as *const BaseSocketSetReceiveBufferRequest).read());
8076                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8077                // done second because the memcpy will write garbage to these bytes.
8078            }
8079            Ok(())
8080        }
8081    }
8082    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8083        fidl::encoding::Encode<BaseSocketSetReceiveBufferRequest, D> for (T0,)
8084    {
8085        #[inline]
8086        unsafe fn encode(
8087            self,
8088            encoder: &mut fidl::encoding::Encoder<'_, D>,
8089            offset: usize,
8090            depth: fidl::encoding::Depth,
8091        ) -> fidl::Result<()> {
8092            encoder.debug_check_bounds::<BaseSocketSetReceiveBufferRequest>(offset);
8093            // Zero out padding regions. There's no need to apply masks
8094            // because the unmasked parts will be overwritten by fields.
8095            // Write the fields.
8096            self.0.encode(encoder, offset + 0, depth)?;
8097            Ok(())
8098        }
8099    }
8100
8101    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8102        for BaseSocketSetReceiveBufferRequest
8103    {
8104        #[inline(always)]
8105        fn new_empty() -> Self {
8106            Self { value_bytes: fidl::new_empty!(u64, D) }
8107        }
8108
8109        #[inline]
8110        unsafe fn decode(
8111            &mut self,
8112            decoder: &mut fidl::encoding::Decoder<'_, D>,
8113            offset: usize,
8114            _depth: fidl::encoding::Depth,
8115        ) -> fidl::Result<()> {
8116            decoder.debug_check_bounds::<Self>(offset);
8117            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8118            // Verify that padding bytes are zero.
8119            // Copy from the buffer into the object.
8120            unsafe {
8121                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8122            }
8123            Ok(())
8124        }
8125    }
8126
8127    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReuseAddressRequest {
8128        type Borrowed<'a> = &'a Self;
8129        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8130            value
8131        }
8132    }
8133
8134    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReuseAddressRequest {
8135        type Owned = Self;
8136
8137        #[inline(always)]
8138        fn inline_align(_context: fidl::encoding::Context) -> usize {
8139            1
8140        }
8141
8142        #[inline(always)]
8143        fn inline_size(_context: fidl::encoding::Context) -> usize {
8144            1
8145        }
8146    }
8147
8148    unsafe impl<D: fidl::encoding::ResourceDialect>
8149        fidl::encoding::Encode<BaseSocketSetReuseAddressRequest, D>
8150        for &BaseSocketSetReuseAddressRequest
8151    {
8152        #[inline]
8153        unsafe fn encode(
8154            self,
8155            encoder: &mut fidl::encoding::Encoder<'_, D>,
8156            offset: usize,
8157            _depth: fidl::encoding::Depth,
8158        ) -> fidl::Result<()> {
8159            encoder.debug_check_bounds::<BaseSocketSetReuseAddressRequest>(offset);
8160            // Delegate to tuple encoding.
8161            fidl::encoding::Encode::<BaseSocketSetReuseAddressRequest, D>::encode(
8162                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8163                encoder,
8164                offset,
8165                _depth,
8166            )
8167        }
8168    }
8169    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8170        fidl::encoding::Encode<BaseSocketSetReuseAddressRequest, D> for (T0,)
8171    {
8172        #[inline]
8173        unsafe fn encode(
8174            self,
8175            encoder: &mut fidl::encoding::Encoder<'_, D>,
8176            offset: usize,
8177            depth: fidl::encoding::Depth,
8178        ) -> fidl::Result<()> {
8179            encoder.debug_check_bounds::<BaseSocketSetReuseAddressRequest>(offset);
8180            // Zero out padding regions. There's no need to apply masks
8181            // because the unmasked parts will be overwritten by fields.
8182            // Write the fields.
8183            self.0.encode(encoder, offset + 0, depth)?;
8184            Ok(())
8185        }
8186    }
8187
8188    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8189        for BaseSocketSetReuseAddressRequest
8190    {
8191        #[inline(always)]
8192        fn new_empty() -> Self {
8193            Self { value: fidl::new_empty!(bool, D) }
8194        }
8195
8196        #[inline]
8197        unsafe fn decode(
8198            &mut self,
8199            decoder: &mut fidl::encoding::Decoder<'_, D>,
8200            offset: usize,
8201            _depth: fidl::encoding::Depth,
8202        ) -> fidl::Result<()> {
8203            decoder.debug_check_bounds::<Self>(offset);
8204            // Verify that padding bytes are zero.
8205            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8206            Ok(())
8207        }
8208    }
8209
8210    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReusePortDeprecatedRequest {
8211        type Borrowed<'a> = &'a Self;
8212        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8213            value
8214        }
8215    }
8216
8217    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReusePortDeprecatedRequest {
8218        type Owned = Self;
8219
8220        #[inline(always)]
8221        fn inline_align(_context: fidl::encoding::Context) -> usize {
8222            1
8223        }
8224
8225        #[inline(always)]
8226        fn inline_size(_context: fidl::encoding::Context) -> usize {
8227            1
8228        }
8229    }
8230
8231    unsafe impl<D: fidl::encoding::ResourceDialect>
8232        fidl::encoding::Encode<BaseSocketSetReusePortDeprecatedRequest, D>
8233        for &BaseSocketSetReusePortDeprecatedRequest
8234    {
8235        #[inline]
8236        unsafe fn encode(
8237            self,
8238            encoder: &mut fidl::encoding::Encoder<'_, D>,
8239            offset: usize,
8240            _depth: fidl::encoding::Depth,
8241        ) -> fidl::Result<()> {
8242            encoder.debug_check_bounds::<BaseSocketSetReusePortDeprecatedRequest>(offset);
8243            // Delegate to tuple encoding.
8244            fidl::encoding::Encode::<BaseSocketSetReusePortDeprecatedRequest, D>::encode(
8245                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8246                encoder,
8247                offset,
8248                _depth,
8249            )
8250        }
8251    }
8252    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8253        fidl::encoding::Encode<BaseSocketSetReusePortDeprecatedRequest, D> for (T0,)
8254    {
8255        #[inline]
8256        unsafe fn encode(
8257            self,
8258            encoder: &mut fidl::encoding::Encoder<'_, D>,
8259            offset: usize,
8260            depth: fidl::encoding::Depth,
8261        ) -> fidl::Result<()> {
8262            encoder.debug_check_bounds::<BaseSocketSetReusePortDeprecatedRequest>(offset);
8263            // Zero out padding regions. There's no need to apply masks
8264            // because the unmasked parts will be overwritten by fields.
8265            // Write the fields.
8266            self.0.encode(encoder, offset + 0, depth)?;
8267            Ok(())
8268        }
8269    }
8270
8271    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8272        for BaseSocketSetReusePortDeprecatedRequest
8273    {
8274        #[inline(always)]
8275        fn new_empty() -> Self {
8276            Self { value: fidl::new_empty!(bool, D) }
8277        }
8278
8279        #[inline]
8280        unsafe fn decode(
8281            &mut self,
8282            decoder: &mut fidl::encoding::Decoder<'_, D>,
8283            offset: usize,
8284            _depth: fidl::encoding::Depth,
8285        ) -> fidl::Result<()> {
8286            decoder.debug_check_bounds::<Self>(offset);
8287            // Verify that padding bytes are zero.
8288            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8289            Ok(())
8290        }
8291    }
8292
8293    impl fidl::encoding::ValueTypeMarker for BaseSocketSetSendBufferRequest {
8294        type Borrowed<'a> = &'a Self;
8295        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8296            value
8297        }
8298    }
8299
8300    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetSendBufferRequest {
8301        type Owned = Self;
8302
8303        #[inline(always)]
8304        fn inline_align(_context: fidl::encoding::Context) -> usize {
8305            8
8306        }
8307
8308        #[inline(always)]
8309        fn inline_size(_context: fidl::encoding::Context) -> usize {
8310            8
8311        }
8312        #[inline(always)]
8313        fn encode_is_copy() -> bool {
8314            true
8315        }
8316
8317        #[inline(always)]
8318        fn decode_is_copy() -> bool {
8319            true
8320        }
8321    }
8322
8323    unsafe impl<D: fidl::encoding::ResourceDialect>
8324        fidl::encoding::Encode<BaseSocketSetSendBufferRequest, D>
8325        for &BaseSocketSetSendBufferRequest
8326    {
8327        #[inline]
8328        unsafe fn encode(
8329            self,
8330            encoder: &mut fidl::encoding::Encoder<'_, D>,
8331            offset: usize,
8332            _depth: fidl::encoding::Depth,
8333        ) -> fidl::Result<()> {
8334            encoder.debug_check_bounds::<BaseSocketSetSendBufferRequest>(offset);
8335            unsafe {
8336                // Copy the object into the buffer.
8337                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8338                (buf_ptr as *mut BaseSocketSetSendBufferRequest)
8339                    .write_unaligned((self as *const BaseSocketSetSendBufferRequest).read());
8340                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8341                // done second because the memcpy will write garbage to these bytes.
8342            }
8343            Ok(())
8344        }
8345    }
8346    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8347        fidl::encoding::Encode<BaseSocketSetSendBufferRequest, D> for (T0,)
8348    {
8349        #[inline]
8350        unsafe fn encode(
8351            self,
8352            encoder: &mut fidl::encoding::Encoder<'_, D>,
8353            offset: usize,
8354            depth: fidl::encoding::Depth,
8355        ) -> fidl::Result<()> {
8356            encoder.debug_check_bounds::<BaseSocketSetSendBufferRequest>(offset);
8357            // Zero out padding regions. There's no need to apply masks
8358            // because the unmasked parts will be overwritten by fields.
8359            // Write the fields.
8360            self.0.encode(encoder, offset + 0, depth)?;
8361            Ok(())
8362        }
8363    }
8364
8365    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8366        for BaseSocketSetSendBufferRequest
8367    {
8368        #[inline(always)]
8369        fn new_empty() -> Self {
8370            Self { value_bytes: fidl::new_empty!(u64, D) }
8371        }
8372
8373        #[inline]
8374        unsafe fn decode(
8375            &mut self,
8376            decoder: &mut fidl::encoding::Decoder<'_, D>,
8377            offset: usize,
8378            _depth: fidl::encoding::Depth,
8379        ) -> fidl::Result<()> {
8380            decoder.debug_check_bounds::<Self>(offset);
8381            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8382            // Verify that padding bytes are zero.
8383            // Copy from the buffer into the object.
8384            unsafe {
8385                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8386            }
8387            Ok(())
8388        }
8389    }
8390
8391    impl fidl::encoding::ValueTypeMarker for BaseSocketSetTimestampRequest {
8392        type Borrowed<'a> = &'a Self;
8393        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8394            value
8395        }
8396    }
8397
8398    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetTimestampRequest {
8399        type Owned = Self;
8400
8401        #[inline(always)]
8402        fn inline_align(_context: fidl::encoding::Context) -> usize {
8403            4
8404        }
8405
8406        #[inline(always)]
8407        fn inline_size(_context: fidl::encoding::Context) -> usize {
8408            4
8409        }
8410    }
8411
8412    unsafe impl<D: fidl::encoding::ResourceDialect>
8413        fidl::encoding::Encode<BaseSocketSetTimestampRequest, D>
8414        for &BaseSocketSetTimestampRequest
8415    {
8416        #[inline]
8417        unsafe fn encode(
8418            self,
8419            encoder: &mut fidl::encoding::Encoder<'_, D>,
8420            offset: usize,
8421            _depth: fidl::encoding::Depth,
8422        ) -> fidl::Result<()> {
8423            encoder.debug_check_bounds::<BaseSocketSetTimestampRequest>(offset);
8424            // Delegate to tuple encoding.
8425            fidl::encoding::Encode::<BaseSocketSetTimestampRequest, D>::encode(
8426                (<TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8427                encoder,
8428                offset,
8429                _depth,
8430            )
8431        }
8432    }
8433    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TimestampOption, D>>
8434        fidl::encoding::Encode<BaseSocketSetTimestampRequest, D> for (T0,)
8435    {
8436        #[inline]
8437        unsafe fn encode(
8438            self,
8439            encoder: &mut fidl::encoding::Encoder<'_, D>,
8440            offset: usize,
8441            depth: fidl::encoding::Depth,
8442        ) -> fidl::Result<()> {
8443            encoder.debug_check_bounds::<BaseSocketSetTimestampRequest>(offset);
8444            // Zero out padding regions. There's no need to apply masks
8445            // because the unmasked parts will be overwritten by fields.
8446            // Write the fields.
8447            self.0.encode(encoder, offset + 0, depth)?;
8448            Ok(())
8449        }
8450    }
8451
8452    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8453        for BaseSocketSetTimestampRequest
8454    {
8455        #[inline(always)]
8456        fn new_empty() -> Self {
8457            Self { value: fidl::new_empty!(TimestampOption, D) }
8458        }
8459
8460        #[inline]
8461        unsafe fn decode(
8462            &mut self,
8463            decoder: &mut fidl::encoding::Decoder<'_, D>,
8464            offset: usize,
8465            _depth: fidl::encoding::Depth,
8466        ) -> fidl::Result<()> {
8467            decoder.debug_check_bounds::<Self>(offset);
8468            // Verify that padding bytes are zero.
8469            fidl::decode!(TimestampOption, D, &mut self.value, decoder, offset + 0, _depth)?;
8470            Ok(())
8471        }
8472    }
8473
8474    impl fidl::encoding::ValueTypeMarker for BaseSocketGetAcceptConnResponse {
8475        type Borrowed<'a> = &'a Self;
8476        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8477            value
8478        }
8479    }
8480
8481    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetAcceptConnResponse {
8482        type Owned = Self;
8483
8484        #[inline(always)]
8485        fn inline_align(_context: fidl::encoding::Context) -> usize {
8486            1
8487        }
8488
8489        #[inline(always)]
8490        fn inline_size(_context: fidl::encoding::Context) -> usize {
8491            1
8492        }
8493    }
8494
8495    unsafe impl<D: fidl::encoding::ResourceDialect>
8496        fidl::encoding::Encode<BaseSocketGetAcceptConnResponse, D>
8497        for &BaseSocketGetAcceptConnResponse
8498    {
8499        #[inline]
8500        unsafe fn encode(
8501            self,
8502            encoder: &mut fidl::encoding::Encoder<'_, D>,
8503            offset: usize,
8504            _depth: fidl::encoding::Depth,
8505        ) -> fidl::Result<()> {
8506            encoder.debug_check_bounds::<BaseSocketGetAcceptConnResponse>(offset);
8507            // Delegate to tuple encoding.
8508            fidl::encoding::Encode::<BaseSocketGetAcceptConnResponse, D>::encode(
8509                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8510                encoder,
8511                offset,
8512                _depth,
8513            )
8514        }
8515    }
8516    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8517        fidl::encoding::Encode<BaseSocketGetAcceptConnResponse, D> for (T0,)
8518    {
8519        #[inline]
8520        unsafe fn encode(
8521            self,
8522            encoder: &mut fidl::encoding::Encoder<'_, D>,
8523            offset: usize,
8524            depth: fidl::encoding::Depth,
8525        ) -> fidl::Result<()> {
8526            encoder.debug_check_bounds::<BaseSocketGetAcceptConnResponse>(offset);
8527            // Zero out padding regions. There's no need to apply masks
8528            // because the unmasked parts will be overwritten by fields.
8529            // Write the fields.
8530            self.0.encode(encoder, offset + 0, depth)?;
8531            Ok(())
8532        }
8533    }
8534
8535    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8536        for BaseSocketGetAcceptConnResponse
8537    {
8538        #[inline(always)]
8539        fn new_empty() -> Self {
8540            Self { value: fidl::new_empty!(bool, D) }
8541        }
8542
8543        #[inline]
8544        unsafe fn decode(
8545            &mut self,
8546            decoder: &mut fidl::encoding::Decoder<'_, D>,
8547            offset: usize,
8548            _depth: fidl::encoding::Depth,
8549        ) -> fidl::Result<()> {
8550            decoder.debug_check_bounds::<Self>(offset);
8551            // Verify that padding bytes are zero.
8552            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8553            Ok(())
8554        }
8555    }
8556
8557    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBindToDeviceResponse {
8558        type Borrowed<'a> = &'a Self;
8559        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8560            value
8561        }
8562    }
8563
8564    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBindToDeviceResponse {
8565        type Owned = Self;
8566
8567        #[inline(always)]
8568        fn inline_align(_context: fidl::encoding::Context) -> usize {
8569            8
8570        }
8571
8572        #[inline(always)]
8573        fn inline_size(_context: fidl::encoding::Context) -> usize {
8574            16
8575        }
8576    }
8577
8578    unsafe impl<D: fidl::encoding::ResourceDialect>
8579        fidl::encoding::Encode<BaseSocketGetBindToDeviceResponse, D>
8580        for &BaseSocketGetBindToDeviceResponse
8581    {
8582        #[inline]
8583        unsafe fn encode(
8584            self,
8585            encoder: &mut fidl::encoding::Encoder<'_, D>,
8586            offset: usize,
8587            _depth: fidl::encoding::Depth,
8588        ) -> fidl::Result<()> {
8589            encoder.debug_check_bounds::<BaseSocketGetBindToDeviceResponse>(offset);
8590            // Delegate to tuple encoding.
8591            fidl::encoding::Encode::<BaseSocketGetBindToDeviceResponse, D>::encode(
8592                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
8593                    &self.value,
8594                ),),
8595                encoder,
8596                offset,
8597                _depth,
8598            )
8599        }
8600    }
8601    unsafe impl<
8602        D: fidl::encoding::ResourceDialect,
8603        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
8604    > fidl::encoding::Encode<BaseSocketGetBindToDeviceResponse, D> for (T0,)
8605    {
8606        #[inline]
8607        unsafe fn encode(
8608            self,
8609            encoder: &mut fidl::encoding::Encoder<'_, D>,
8610            offset: usize,
8611            depth: fidl::encoding::Depth,
8612        ) -> fidl::Result<()> {
8613            encoder.debug_check_bounds::<BaseSocketGetBindToDeviceResponse>(offset);
8614            // Zero out padding regions. There's no need to apply masks
8615            // because the unmasked parts will be overwritten by fields.
8616            // Write the fields.
8617            self.0.encode(encoder, offset + 0, depth)?;
8618            Ok(())
8619        }
8620    }
8621
8622    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8623        for BaseSocketGetBindToDeviceResponse
8624    {
8625        #[inline(always)]
8626        fn new_empty() -> Self {
8627            Self { value: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
8628        }
8629
8630        #[inline]
8631        unsafe fn decode(
8632            &mut self,
8633            decoder: &mut fidl::encoding::Decoder<'_, D>,
8634            offset: usize,
8635            _depth: fidl::encoding::Depth,
8636        ) -> fidl::Result<()> {
8637            decoder.debug_check_bounds::<Self>(offset);
8638            // Verify that padding bytes are zero.
8639            fidl::decode!(
8640                fidl::encoding::BoundedString<15>,
8641                D,
8642                &mut self.value,
8643                decoder,
8644                offset + 0,
8645                _depth
8646            )?;
8647            Ok(())
8648        }
8649    }
8650
8651    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBindToInterfaceIndexResponse {
8652        type Borrowed<'a> = &'a Self;
8653        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8654            value
8655        }
8656    }
8657
8658    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBindToInterfaceIndexResponse {
8659        type Owned = Self;
8660
8661        #[inline(always)]
8662        fn inline_align(_context: fidl::encoding::Context) -> usize {
8663            8
8664        }
8665
8666        #[inline(always)]
8667        fn inline_size(_context: fidl::encoding::Context) -> usize {
8668            8
8669        }
8670        #[inline(always)]
8671        fn encode_is_copy() -> bool {
8672            true
8673        }
8674
8675        #[inline(always)]
8676        fn decode_is_copy() -> bool {
8677            true
8678        }
8679    }
8680
8681    unsafe impl<D: fidl::encoding::ResourceDialect>
8682        fidl::encoding::Encode<BaseSocketGetBindToInterfaceIndexResponse, D>
8683        for &BaseSocketGetBindToInterfaceIndexResponse
8684    {
8685        #[inline]
8686        unsafe fn encode(
8687            self,
8688            encoder: &mut fidl::encoding::Encoder<'_, D>,
8689            offset: usize,
8690            _depth: fidl::encoding::Depth,
8691        ) -> fidl::Result<()> {
8692            encoder.debug_check_bounds::<BaseSocketGetBindToInterfaceIndexResponse>(offset);
8693            unsafe {
8694                // Copy the object into the buffer.
8695                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8696                (buf_ptr as *mut BaseSocketGetBindToInterfaceIndexResponse).write_unaligned(
8697                    (self as *const BaseSocketGetBindToInterfaceIndexResponse).read(),
8698                );
8699                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8700                // done second because the memcpy will write garbage to these bytes.
8701            }
8702            Ok(())
8703        }
8704    }
8705    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8706        fidl::encoding::Encode<BaseSocketGetBindToInterfaceIndexResponse, D> for (T0,)
8707    {
8708        #[inline]
8709        unsafe fn encode(
8710            self,
8711            encoder: &mut fidl::encoding::Encoder<'_, D>,
8712            offset: usize,
8713            depth: fidl::encoding::Depth,
8714        ) -> fidl::Result<()> {
8715            encoder.debug_check_bounds::<BaseSocketGetBindToInterfaceIndexResponse>(offset);
8716            // Zero out padding regions. There's no need to apply masks
8717            // because the unmasked parts will be overwritten by fields.
8718            // Write the fields.
8719            self.0.encode(encoder, offset + 0, depth)?;
8720            Ok(())
8721        }
8722    }
8723
8724    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8725        for BaseSocketGetBindToInterfaceIndexResponse
8726    {
8727        #[inline(always)]
8728        fn new_empty() -> Self {
8729            Self { value: fidl::new_empty!(u64, D) }
8730        }
8731
8732        #[inline]
8733        unsafe fn decode(
8734            &mut self,
8735            decoder: &mut fidl::encoding::Decoder<'_, D>,
8736            offset: usize,
8737            _depth: fidl::encoding::Depth,
8738        ) -> fidl::Result<()> {
8739            decoder.debug_check_bounds::<Self>(offset);
8740            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8741            // Verify that padding bytes are zero.
8742            // Copy from the buffer into the object.
8743            unsafe {
8744                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8745            }
8746            Ok(())
8747        }
8748    }
8749
8750    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBroadcastResponse {
8751        type Borrowed<'a> = &'a Self;
8752        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8753            value
8754        }
8755    }
8756
8757    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBroadcastResponse {
8758        type Owned = Self;
8759
8760        #[inline(always)]
8761        fn inline_align(_context: fidl::encoding::Context) -> usize {
8762            1
8763        }
8764
8765        #[inline(always)]
8766        fn inline_size(_context: fidl::encoding::Context) -> usize {
8767            1
8768        }
8769    }
8770
8771    unsafe impl<D: fidl::encoding::ResourceDialect>
8772        fidl::encoding::Encode<BaseSocketGetBroadcastResponse, D>
8773        for &BaseSocketGetBroadcastResponse
8774    {
8775        #[inline]
8776        unsafe fn encode(
8777            self,
8778            encoder: &mut fidl::encoding::Encoder<'_, D>,
8779            offset: usize,
8780            _depth: fidl::encoding::Depth,
8781        ) -> fidl::Result<()> {
8782            encoder.debug_check_bounds::<BaseSocketGetBroadcastResponse>(offset);
8783            // Delegate to tuple encoding.
8784            fidl::encoding::Encode::<BaseSocketGetBroadcastResponse, D>::encode(
8785                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8786                encoder,
8787                offset,
8788                _depth,
8789            )
8790        }
8791    }
8792    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8793        fidl::encoding::Encode<BaseSocketGetBroadcastResponse, D> for (T0,)
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::<BaseSocketGetBroadcastResponse>(offset);
8803            // Zero out padding regions. There's no need to apply masks
8804            // because the unmasked parts will be overwritten by fields.
8805            // Write the fields.
8806            self.0.encode(encoder, offset + 0, depth)?;
8807            Ok(())
8808        }
8809    }
8810
8811    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8812        for BaseSocketGetBroadcastResponse
8813    {
8814        #[inline(always)]
8815        fn new_empty() -> Self {
8816            Self { value: fidl::new_empty!(bool, D) }
8817        }
8818
8819        #[inline]
8820        unsafe fn decode(
8821            &mut self,
8822            decoder: &mut fidl::encoding::Decoder<'_, D>,
8823            offset: usize,
8824            _depth: fidl::encoding::Depth,
8825        ) -> fidl::Result<()> {
8826            decoder.debug_check_bounds::<Self>(offset);
8827            // Verify that padding bytes are zero.
8828            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8829            Ok(())
8830        }
8831    }
8832
8833    impl fidl::encoding::ValueTypeMarker for BaseSocketGetCookieResponse {
8834        type Borrowed<'a> = &'a Self;
8835        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8836            value
8837        }
8838    }
8839
8840    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetCookieResponse {
8841        type Owned = Self;
8842
8843        #[inline(always)]
8844        fn inline_align(_context: fidl::encoding::Context) -> usize {
8845            8
8846        }
8847
8848        #[inline(always)]
8849        fn inline_size(_context: fidl::encoding::Context) -> usize {
8850            8
8851        }
8852        #[inline(always)]
8853        fn encode_is_copy() -> bool {
8854            true
8855        }
8856
8857        #[inline(always)]
8858        fn decode_is_copy() -> bool {
8859            true
8860        }
8861    }
8862
8863    unsafe impl<D: fidl::encoding::ResourceDialect>
8864        fidl::encoding::Encode<BaseSocketGetCookieResponse, D> for &BaseSocketGetCookieResponse
8865    {
8866        #[inline]
8867        unsafe fn encode(
8868            self,
8869            encoder: &mut fidl::encoding::Encoder<'_, D>,
8870            offset: usize,
8871            _depth: fidl::encoding::Depth,
8872        ) -> fidl::Result<()> {
8873            encoder.debug_check_bounds::<BaseSocketGetCookieResponse>(offset);
8874            unsafe {
8875                // Copy the object into the buffer.
8876                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8877                (buf_ptr as *mut BaseSocketGetCookieResponse)
8878                    .write_unaligned((self as *const BaseSocketGetCookieResponse).read());
8879                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8880                // done second because the memcpy will write garbage to these bytes.
8881            }
8882            Ok(())
8883        }
8884    }
8885    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8886        fidl::encoding::Encode<BaseSocketGetCookieResponse, D> for (T0,)
8887    {
8888        #[inline]
8889        unsafe fn encode(
8890            self,
8891            encoder: &mut fidl::encoding::Encoder<'_, D>,
8892            offset: usize,
8893            depth: fidl::encoding::Depth,
8894        ) -> fidl::Result<()> {
8895            encoder.debug_check_bounds::<BaseSocketGetCookieResponse>(offset);
8896            // Zero out padding regions. There's no need to apply masks
8897            // because the unmasked parts will be overwritten by fields.
8898            // Write the fields.
8899            self.0.encode(encoder, offset + 0, depth)?;
8900            Ok(())
8901        }
8902    }
8903
8904    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8905        for BaseSocketGetCookieResponse
8906    {
8907        #[inline(always)]
8908        fn new_empty() -> Self {
8909            Self { value: fidl::new_empty!(u64, D) }
8910        }
8911
8912        #[inline]
8913        unsafe fn decode(
8914            &mut self,
8915            decoder: &mut fidl::encoding::Decoder<'_, D>,
8916            offset: usize,
8917            _depth: fidl::encoding::Depth,
8918        ) -> fidl::Result<()> {
8919            decoder.debug_check_bounds::<Self>(offset);
8920            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8921            // Verify that padding bytes are zero.
8922            // Copy from the buffer into the object.
8923            unsafe {
8924                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8925            }
8926            Ok(())
8927        }
8928    }
8929
8930    impl fidl::encoding::ValueTypeMarker for BaseSocketGetKeepAliveResponse {
8931        type Borrowed<'a> = &'a Self;
8932        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8933            value
8934        }
8935    }
8936
8937    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetKeepAliveResponse {
8938        type Owned = Self;
8939
8940        #[inline(always)]
8941        fn inline_align(_context: fidl::encoding::Context) -> usize {
8942            1
8943        }
8944
8945        #[inline(always)]
8946        fn inline_size(_context: fidl::encoding::Context) -> usize {
8947            1
8948        }
8949    }
8950
8951    unsafe impl<D: fidl::encoding::ResourceDialect>
8952        fidl::encoding::Encode<BaseSocketGetKeepAliveResponse, D>
8953        for &BaseSocketGetKeepAliveResponse
8954    {
8955        #[inline]
8956        unsafe fn encode(
8957            self,
8958            encoder: &mut fidl::encoding::Encoder<'_, D>,
8959            offset: usize,
8960            _depth: fidl::encoding::Depth,
8961        ) -> fidl::Result<()> {
8962            encoder.debug_check_bounds::<BaseSocketGetKeepAliveResponse>(offset);
8963            // Delegate to tuple encoding.
8964            fidl::encoding::Encode::<BaseSocketGetKeepAliveResponse, D>::encode(
8965                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8966                encoder,
8967                offset,
8968                _depth,
8969            )
8970        }
8971    }
8972    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8973        fidl::encoding::Encode<BaseSocketGetKeepAliveResponse, D> for (T0,)
8974    {
8975        #[inline]
8976        unsafe fn encode(
8977            self,
8978            encoder: &mut fidl::encoding::Encoder<'_, D>,
8979            offset: usize,
8980            depth: fidl::encoding::Depth,
8981        ) -> fidl::Result<()> {
8982            encoder.debug_check_bounds::<BaseSocketGetKeepAliveResponse>(offset);
8983            // Zero out padding regions. There's no need to apply masks
8984            // because the unmasked parts will be overwritten by fields.
8985            // Write the fields.
8986            self.0.encode(encoder, offset + 0, depth)?;
8987            Ok(())
8988        }
8989    }
8990
8991    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8992        for BaseSocketGetKeepAliveResponse
8993    {
8994        #[inline(always)]
8995        fn new_empty() -> Self {
8996            Self { value: fidl::new_empty!(bool, D) }
8997        }
8998
8999        #[inline]
9000        unsafe fn decode(
9001            &mut self,
9002            decoder: &mut fidl::encoding::Decoder<'_, D>,
9003            offset: usize,
9004            _depth: fidl::encoding::Depth,
9005        ) -> fidl::Result<()> {
9006            decoder.debug_check_bounds::<Self>(offset);
9007            // Verify that padding bytes are zero.
9008            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9009            Ok(())
9010        }
9011    }
9012
9013    impl fidl::encoding::ValueTypeMarker for BaseSocketGetLingerResponse {
9014        type Borrowed<'a> = &'a Self;
9015        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9016            value
9017        }
9018    }
9019
9020    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetLingerResponse {
9021        type Owned = Self;
9022
9023        #[inline(always)]
9024        fn inline_align(_context: fidl::encoding::Context) -> usize {
9025            4
9026        }
9027
9028        #[inline(always)]
9029        fn inline_size(_context: fidl::encoding::Context) -> usize {
9030            8
9031        }
9032    }
9033
9034    unsafe impl<D: fidl::encoding::ResourceDialect>
9035        fidl::encoding::Encode<BaseSocketGetLingerResponse, D> for &BaseSocketGetLingerResponse
9036    {
9037        #[inline]
9038        unsafe fn encode(
9039            self,
9040            encoder: &mut fidl::encoding::Encoder<'_, D>,
9041            offset: usize,
9042            _depth: fidl::encoding::Depth,
9043        ) -> fidl::Result<()> {
9044            encoder.debug_check_bounds::<BaseSocketGetLingerResponse>(offset);
9045            // Delegate to tuple encoding.
9046            fidl::encoding::Encode::<BaseSocketGetLingerResponse, D>::encode(
9047                (
9048                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.linger),
9049                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length_secs),
9050                ),
9051                encoder,
9052                offset,
9053                _depth,
9054            )
9055        }
9056    }
9057    unsafe impl<
9058        D: fidl::encoding::ResourceDialect,
9059        T0: fidl::encoding::Encode<bool, D>,
9060        T1: fidl::encoding::Encode<u32, D>,
9061    > fidl::encoding::Encode<BaseSocketGetLingerResponse, D> for (T0, T1)
9062    {
9063        #[inline]
9064        unsafe fn encode(
9065            self,
9066            encoder: &mut fidl::encoding::Encoder<'_, D>,
9067            offset: usize,
9068            depth: fidl::encoding::Depth,
9069        ) -> fidl::Result<()> {
9070            encoder.debug_check_bounds::<BaseSocketGetLingerResponse>(offset);
9071            // Zero out padding regions. There's no need to apply masks
9072            // because the unmasked parts will be overwritten by fields.
9073            unsafe {
9074                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9075                (ptr as *mut u32).write_unaligned(0);
9076            }
9077            // Write the fields.
9078            self.0.encode(encoder, offset + 0, depth)?;
9079            self.1.encode(encoder, offset + 4, depth)?;
9080            Ok(())
9081        }
9082    }
9083
9084    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9085        for BaseSocketGetLingerResponse
9086    {
9087        #[inline(always)]
9088        fn new_empty() -> Self {
9089            Self { linger: fidl::new_empty!(bool, D), length_secs: fidl::new_empty!(u32, D) }
9090        }
9091
9092        #[inline]
9093        unsafe fn decode(
9094            &mut self,
9095            decoder: &mut fidl::encoding::Decoder<'_, D>,
9096            offset: usize,
9097            _depth: fidl::encoding::Depth,
9098        ) -> fidl::Result<()> {
9099            decoder.debug_check_bounds::<Self>(offset);
9100            // Verify that padding bytes are zero.
9101            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9102            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9103            let mask = 0xffffff00u32;
9104            let maskedval = padval & mask;
9105            if maskedval != 0 {
9106                return Err(fidl::Error::NonZeroPadding {
9107                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9108                });
9109            }
9110            fidl::decode!(bool, D, &mut self.linger, decoder, offset + 0, _depth)?;
9111            fidl::decode!(u32, D, &mut self.length_secs, decoder, offset + 4, _depth)?;
9112            Ok(())
9113        }
9114    }
9115
9116    impl fidl::encoding::ValueTypeMarker for BaseSocketGetMarkResponse {
9117        type Borrowed<'a> = &'a Self;
9118        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9119            value
9120        }
9121    }
9122
9123    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetMarkResponse {
9124        type Owned = Self;
9125
9126        #[inline(always)]
9127        fn inline_align(_context: fidl::encoding::Context) -> usize {
9128            8
9129        }
9130
9131        #[inline(always)]
9132        fn inline_size(_context: fidl::encoding::Context) -> usize {
9133            16
9134        }
9135    }
9136
9137    unsafe impl<D: fidl::encoding::ResourceDialect>
9138        fidl::encoding::Encode<BaseSocketGetMarkResponse, D> for &BaseSocketGetMarkResponse
9139    {
9140        #[inline]
9141        unsafe fn encode(
9142            self,
9143            encoder: &mut fidl::encoding::Encoder<'_, D>,
9144            offset: usize,
9145            _depth: fidl::encoding::Depth,
9146        ) -> fidl::Result<()> {
9147            encoder.debug_check_bounds::<BaseSocketGetMarkResponse>(offset);
9148            // Delegate to tuple encoding.
9149            fidl::encoding::Encode::<BaseSocketGetMarkResponse, D>::encode(
9150                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mark),),
9151                encoder,
9152                offset,
9153                _depth,
9154            )
9155        }
9156    }
9157    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
9158        fidl::encoding::Encode<BaseSocketGetMarkResponse, D> for (T0,)
9159    {
9160        #[inline]
9161        unsafe fn encode(
9162            self,
9163            encoder: &mut fidl::encoding::Encoder<'_, D>,
9164            offset: usize,
9165            depth: fidl::encoding::Depth,
9166        ) -> fidl::Result<()> {
9167            encoder.debug_check_bounds::<BaseSocketGetMarkResponse>(offset);
9168            // Zero out padding regions. There's no need to apply masks
9169            // because the unmasked parts will be overwritten by fields.
9170            // Write the fields.
9171            self.0.encode(encoder, offset + 0, depth)?;
9172            Ok(())
9173        }
9174    }
9175
9176    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9177        for BaseSocketGetMarkResponse
9178    {
9179        #[inline(always)]
9180        fn new_empty() -> Self {
9181            Self { mark: fidl::new_empty!(OptionalUint32, D) }
9182        }
9183
9184        #[inline]
9185        unsafe fn decode(
9186            &mut self,
9187            decoder: &mut fidl::encoding::Decoder<'_, D>,
9188            offset: usize,
9189            _depth: fidl::encoding::Depth,
9190        ) -> fidl::Result<()> {
9191            decoder.debug_check_bounds::<Self>(offset);
9192            // Verify that padding bytes are zero.
9193            fidl::decode!(OptionalUint32, D, &mut self.mark, decoder, offset + 0, _depth)?;
9194            Ok(())
9195        }
9196    }
9197
9198    impl fidl::encoding::ValueTypeMarker for BaseSocketGetNoCheckResponse {
9199        type Borrowed<'a> = &'a Self;
9200        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9201            value
9202        }
9203    }
9204
9205    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetNoCheckResponse {
9206        type Owned = Self;
9207
9208        #[inline(always)]
9209        fn inline_align(_context: fidl::encoding::Context) -> usize {
9210            1
9211        }
9212
9213        #[inline(always)]
9214        fn inline_size(_context: fidl::encoding::Context) -> usize {
9215            1
9216        }
9217    }
9218
9219    unsafe impl<D: fidl::encoding::ResourceDialect>
9220        fidl::encoding::Encode<BaseSocketGetNoCheckResponse, D> for &BaseSocketGetNoCheckResponse
9221    {
9222        #[inline]
9223        unsafe fn encode(
9224            self,
9225            encoder: &mut fidl::encoding::Encoder<'_, D>,
9226            offset: usize,
9227            _depth: fidl::encoding::Depth,
9228        ) -> fidl::Result<()> {
9229            encoder.debug_check_bounds::<BaseSocketGetNoCheckResponse>(offset);
9230            // Delegate to tuple encoding.
9231            fidl::encoding::Encode::<BaseSocketGetNoCheckResponse, D>::encode(
9232                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9233                encoder,
9234                offset,
9235                _depth,
9236            )
9237        }
9238    }
9239    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9240        fidl::encoding::Encode<BaseSocketGetNoCheckResponse, D> for (T0,)
9241    {
9242        #[inline]
9243        unsafe fn encode(
9244            self,
9245            encoder: &mut fidl::encoding::Encoder<'_, D>,
9246            offset: usize,
9247            depth: fidl::encoding::Depth,
9248        ) -> fidl::Result<()> {
9249            encoder.debug_check_bounds::<BaseSocketGetNoCheckResponse>(offset);
9250            // Zero out padding regions. There's no need to apply masks
9251            // because the unmasked parts will be overwritten by fields.
9252            // Write the fields.
9253            self.0.encode(encoder, offset + 0, depth)?;
9254            Ok(())
9255        }
9256    }
9257
9258    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9259        for BaseSocketGetNoCheckResponse
9260    {
9261        #[inline(always)]
9262        fn new_empty() -> Self {
9263            Self { value: fidl::new_empty!(bool, D) }
9264        }
9265
9266        #[inline]
9267        unsafe fn decode(
9268            &mut self,
9269            decoder: &mut fidl::encoding::Decoder<'_, D>,
9270            offset: usize,
9271            _depth: fidl::encoding::Depth,
9272        ) -> fidl::Result<()> {
9273            decoder.debug_check_bounds::<Self>(offset);
9274            // Verify that padding bytes are zero.
9275            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9276            Ok(())
9277        }
9278    }
9279
9280    impl fidl::encoding::ValueTypeMarker for BaseSocketGetOutOfBandInlineResponse {
9281        type Borrowed<'a> = &'a Self;
9282        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9283            value
9284        }
9285    }
9286
9287    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetOutOfBandInlineResponse {
9288        type Owned = Self;
9289
9290        #[inline(always)]
9291        fn inline_align(_context: fidl::encoding::Context) -> usize {
9292            1
9293        }
9294
9295        #[inline(always)]
9296        fn inline_size(_context: fidl::encoding::Context) -> usize {
9297            1
9298        }
9299    }
9300
9301    unsafe impl<D: fidl::encoding::ResourceDialect>
9302        fidl::encoding::Encode<BaseSocketGetOutOfBandInlineResponse, D>
9303        for &BaseSocketGetOutOfBandInlineResponse
9304    {
9305        #[inline]
9306        unsafe fn encode(
9307            self,
9308            encoder: &mut fidl::encoding::Encoder<'_, D>,
9309            offset: usize,
9310            _depth: fidl::encoding::Depth,
9311        ) -> fidl::Result<()> {
9312            encoder.debug_check_bounds::<BaseSocketGetOutOfBandInlineResponse>(offset);
9313            // Delegate to tuple encoding.
9314            fidl::encoding::Encode::<BaseSocketGetOutOfBandInlineResponse, D>::encode(
9315                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9316                encoder,
9317                offset,
9318                _depth,
9319            )
9320        }
9321    }
9322    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9323        fidl::encoding::Encode<BaseSocketGetOutOfBandInlineResponse, D> for (T0,)
9324    {
9325        #[inline]
9326        unsafe fn encode(
9327            self,
9328            encoder: &mut fidl::encoding::Encoder<'_, D>,
9329            offset: usize,
9330            depth: fidl::encoding::Depth,
9331        ) -> fidl::Result<()> {
9332            encoder.debug_check_bounds::<BaseSocketGetOutOfBandInlineResponse>(offset);
9333            // Zero out padding regions. There's no need to apply masks
9334            // because the unmasked parts will be overwritten by fields.
9335            // Write the fields.
9336            self.0.encode(encoder, offset + 0, depth)?;
9337            Ok(())
9338        }
9339    }
9340
9341    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9342        for BaseSocketGetOutOfBandInlineResponse
9343    {
9344        #[inline(always)]
9345        fn new_empty() -> Self {
9346            Self { value: fidl::new_empty!(bool, D) }
9347        }
9348
9349        #[inline]
9350        unsafe fn decode(
9351            &mut self,
9352            decoder: &mut fidl::encoding::Decoder<'_, D>,
9353            offset: usize,
9354            _depth: fidl::encoding::Depth,
9355        ) -> fidl::Result<()> {
9356            decoder.debug_check_bounds::<Self>(offset);
9357            // Verify that padding bytes are zero.
9358            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9359            Ok(())
9360        }
9361    }
9362
9363    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReceiveBufferResponse {
9364        type Borrowed<'a> = &'a Self;
9365        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9366            value
9367        }
9368    }
9369
9370    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReceiveBufferResponse {
9371        type Owned = Self;
9372
9373        #[inline(always)]
9374        fn inline_align(_context: fidl::encoding::Context) -> usize {
9375            8
9376        }
9377
9378        #[inline(always)]
9379        fn inline_size(_context: fidl::encoding::Context) -> usize {
9380            8
9381        }
9382        #[inline(always)]
9383        fn encode_is_copy() -> bool {
9384            true
9385        }
9386
9387        #[inline(always)]
9388        fn decode_is_copy() -> bool {
9389            true
9390        }
9391    }
9392
9393    unsafe impl<D: fidl::encoding::ResourceDialect>
9394        fidl::encoding::Encode<BaseSocketGetReceiveBufferResponse, D>
9395        for &BaseSocketGetReceiveBufferResponse
9396    {
9397        #[inline]
9398        unsafe fn encode(
9399            self,
9400            encoder: &mut fidl::encoding::Encoder<'_, D>,
9401            offset: usize,
9402            _depth: fidl::encoding::Depth,
9403        ) -> fidl::Result<()> {
9404            encoder.debug_check_bounds::<BaseSocketGetReceiveBufferResponse>(offset);
9405            unsafe {
9406                // Copy the object into the buffer.
9407                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9408                (buf_ptr as *mut BaseSocketGetReceiveBufferResponse)
9409                    .write_unaligned((self as *const BaseSocketGetReceiveBufferResponse).read());
9410                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9411                // done second because the memcpy will write garbage to these bytes.
9412            }
9413            Ok(())
9414        }
9415    }
9416    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9417        fidl::encoding::Encode<BaseSocketGetReceiveBufferResponse, D> for (T0,)
9418    {
9419        #[inline]
9420        unsafe fn encode(
9421            self,
9422            encoder: &mut fidl::encoding::Encoder<'_, D>,
9423            offset: usize,
9424            depth: fidl::encoding::Depth,
9425        ) -> fidl::Result<()> {
9426            encoder.debug_check_bounds::<BaseSocketGetReceiveBufferResponse>(offset);
9427            // Zero out padding regions. There's no need to apply masks
9428            // because the unmasked parts will be overwritten by fields.
9429            // Write the fields.
9430            self.0.encode(encoder, offset + 0, depth)?;
9431            Ok(())
9432        }
9433    }
9434
9435    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9436        for BaseSocketGetReceiveBufferResponse
9437    {
9438        #[inline(always)]
9439        fn new_empty() -> Self {
9440            Self { value_bytes: fidl::new_empty!(u64, D) }
9441        }
9442
9443        #[inline]
9444        unsafe fn decode(
9445            &mut self,
9446            decoder: &mut fidl::encoding::Decoder<'_, D>,
9447            offset: usize,
9448            _depth: fidl::encoding::Depth,
9449        ) -> fidl::Result<()> {
9450            decoder.debug_check_bounds::<Self>(offset);
9451            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9452            // Verify that padding bytes are zero.
9453            // Copy from the buffer into the object.
9454            unsafe {
9455                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9456            }
9457            Ok(())
9458        }
9459    }
9460
9461    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReuseAddressResponse {
9462        type Borrowed<'a> = &'a Self;
9463        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9464            value
9465        }
9466    }
9467
9468    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReuseAddressResponse {
9469        type Owned = Self;
9470
9471        #[inline(always)]
9472        fn inline_align(_context: fidl::encoding::Context) -> usize {
9473            1
9474        }
9475
9476        #[inline(always)]
9477        fn inline_size(_context: fidl::encoding::Context) -> usize {
9478            1
9479        }
9480    }
9481
9482    unsafe impl<D: fidl::encoding::ResourceDialect>
9483        fidl::encoding::Encode<BaseSocketGetReuseAddressResponse, D>
9484        for &BaseSocketGetReuseAddressResponse
9485    {
9486        #[inline]
9487        unsafe fn encode(
9488            self,
9489            encoder: &mut fidl::encoding::Encoder<'_, D>,
9490            offset: usize,
9491            _depth: fidl::encoding::Depth,
9492        ) -> fidl::Result<()> {
9493            encoder.debug_check_bounds::<BaseSocketGetReuseAddressResponse>(offset);
9494            // Delegate to tuple encoding.
9495            fidl::encoding::Encode::<BaseSocketGetReuseAddressResponse, D>::encode(
9496                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9497                encoder,
9498                offset,
9499                _depth,
9500            )
9501        }
9502    }
9503    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9504        fidl::encoding::Encode<BaseSocketGetReuseAddressResponse, D> for (T0,)
9505    {
9506        #[inline]
9507        unsafe fn encode(
9508            self,
9509            encoder: &mut fidl::encoding::Encoder<'_, D>,
9510            offset: usize,
9511            depth: fidl::encoding::Depth,
9512        ) -> fidl::Result<()> {
9513            encoder.debug_check_bounds::<BaseSocketGetReuseAddressResponse>(offset);
9514            // Zero out padding regions. There's no need to apply masks
9515            // because the unmasked parts will be overwritten by fields.
9516            // Write the fields.
9517            self.0.encode(encoder, offset + 0, depth)?;
9518            Ok(())
9519        }
9520    }
9521
9522    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9523        for BaseSocketGetReuseAddressResponse
9524    {
9525        #[inline(always)]
9526        fn new_empty() -> Self {
9527            Self { value: fidl::new_empty!(bool, D) }
9528        }
9529
9530        #[inline]
9531        unsafe fn decode(
9532            &mut self,
9533            decoder: &mut fidl::encoding::Decoder<'_, D>,
9534            offset: usize,
9535            _depth: fidl::encoding::Depth,
9536        ) -> fidl::Result<()> {
9537            decoder.debug_check_bounds::<Self>(offset);
9538            // Verify that padding bytes are zero.
9539            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9540            Ok(())
9541        }
9542    }
9543
9544    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReusePortResponse {
9545        type Borrowed<'a> = &'a Self;
9546        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9547            value
9548        }
9549    }
9550
9551    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReusePortResponse {
9552        type Owned = Self;
9553
9554        #[inline(always)]
9555        fn inline_align(_context: fidl::encoding::Context) -> usize {
9556            1
9557        }
9558
9559        #[inline(always)]
9560        fn inline_size(_context: fidl::encoding::Context) -> usize {
9561            1
9562        }
9563    }
9564
9565    unsafe impl<D: fidl::encoding::ResourceDialect>
9566        fidl::encoding::Encode<BaseSocketGetReusePortResponse, D>
9567        for &BaseSocketGetReusePortResponse
9568    {
9569        #[inline]
9570        unsafe fn encode(
9571            self,
9572            encoder: &mut fidl::encoding::Encoder<'_, D>,
9573            offset: usize,
9574            _depth: fidl::encoding::Depth,
9575        ) -> fidl::Result<()> {
9576            encoder.debug_check_bounds::<BaseSocketGetReusePortResponse>(offset);
9577            // Delegate to tuple encoding.
9578            fidl::encoding::Encode::<BaseSocketGetReusePortResponse, D>::encode(
9579                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9580                encoder,
9581                offset,
9582                _depth,
9583            )
9584        }
9585    }
9586    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9587        fidl::encoding::Encode<BaseSocketGetReusePortResponse, D> for (T0,)
9588    {
9589        #[inline]
9590        unsafe fn encode(
9591            self,
9592            encoder: &mut fidl::encoding::Encoder<'_, D>,
9593            offset: usize,
9594            depth: fidl::encoding::Depth,
9595        ) -> fidl::Result<()> {
9596            encoder.debug_check_bounds::<BaseSocketGetReusePortResponse>(offset);
9597            // Zero out padding regions. There's no need to apply masks
9598            // because the unmasked parts will be overwritten by fields.
9599            // Write the fields.
9600            self.0.encode(encoder, offset + 0, depth)?;
9601            Ok(())
9602        }
9603    }
9604
9605    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9606        for BaseSocketGetReusePortResponse
9607    {
9608        #[inline(always)]
9609        fn new_empty() -> Self {
9610            Self { value: fidl::new_empty!(bool, D) }
9611        }
9612
9613        #[inline]
9614        unsafe fn decode(
9615            &mut self,
9616            decoder: &mut fidl::encoding::Decoder<'_, D>,
9617            offset: usize,
9618            _depth: fidl::encoding::Depth,
9619        ) -> fidl::Result<()> {
9620            decoder.debug_check_bounds::<Self>(offset);
9621            // Verify that padding bytes are zero.
9622            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9623            Ok(())
9624        }
9625    }
9626
9627    impl fidl::encoding::ValueTypeMarker for BaseSocketGetSendBufferResponse {
9628        type Borrowed<'a> = &'a Self;
9629        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9630            value
9631        }
9632    }
9633
9634    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetSendBufferResponse {
9635        type Owned = Self;
9636
9637        #[inline(always)]
9638        fn inline_align(_context: fidl::encoding::Context) -> usize {
9639            8
9640        }
9641
9642        #[inline(always)]
9643        fn inline_size(_context: fidl::encoding::Context) -> usize {
9644            8
9645        }
9646        #[inline(always)]
9647        fn encode_is_copy() -> bool {
9648            true
9649        }
9650
9651        #[inline(always)]
9652        fn decode_is_copy() -> bool {
9653            true
9654        }
9655    }
9656
9657    unsafe impl<D: fidl::encoding::ResourceDialect>
9658        fidl::encoding::Encode<BaseSocketGetSendBufferResponse, D>
9659        for &BaseSocketGetSendBufferResponse
9660    {
9661        #[inline]
9662        unsafe fn encode(
9663            self,
9664            encoder: &mut fidl::encoding::Encoder<'_, D>,
9665            offset: usize,
9666            _depth: fidl::encoding::Depth,
9667        ) -> fidl::Result<()> {
9668            encoder.debug_check_bounds::<BaseSocketGetSendBufferResponse>(offset);
9669            unsafe {
9670                // Copy the object into the buffer.
9671                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9672                (buf_ptr as *mut BaseSocketGetSendBufferResponse)
9673                    .write_unaligned((self as *const BaseSocketGetSendBufferResponse).read());
9674                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9675                // done second because the memcpy will write garbage to these bytes.
9676            }
9677            Ok(())
9678        }
9679    }
9680    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9681        fidl::encoding::Encode<BaseSocketGetSendBufferResponse, D> for (T0,)
9682    {
9683        #[inline]
9684        unsafe fn encode(
9685            self,
9686            encoder: &mut fidl::encoding::Encoder<'_, D>,
9687            offset: usize,
9688            depth: fidl::encoding::Depth,
9689        ) -> fidl::Result<()> {
9690            encoder.debug_check_bounds::<BaseSocketGetSendBufferResponse>(offset);
9691            // Zero out padding regions. There's no need to apply masks
9692            // because the unmasked parts will be overwritten by fields.
9693            // Write the fields.
9694            self.0.encode(encoder, offset + 0, depth)?;
9695            Ok(())
9696        }
9697    }
9698
9699    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9700        for BaseSocketGetSendBufferResponse
9701    {
9702        #[inline(always)]
9703        fn new_empty() -> Self {
9704            Self { value_bytes: fidl::new_empty!(u64, D) }
9705        }
9706
9707        #[inline]
9708        unsafe fn decode(
9709            &mut self,
9710            decoder: &mut fidl::encoding::Decoder<'_, D>,
9711            offset: usize,
9712            _depth: fidl::encoding::Depth,
9713        ) -> fidl::Result<()> {
9714            decoder.debug_check_bounds::<Self>(offset);
9715            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9716            // Verify that padding bytes are zero.
9717            // Copy from the buffer into the object.
9718            unsafe {
9719                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9720            }
9721            Ok(())
9722        }
9723    }
9724
9725    impl fidl::encoding::ValueTypeMarker for BaseSocketGetTimestampResponse {
9726        type Borrowed<'a> = &'a Self;
9727        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9728            value
9729        }
9730    }
9731
9732    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetTimestampResponse {
9733        type Owned = Self;
9734
9735        #[inline(always)]
9736        fn inline_align(_context: fidl::encoding::Context) -> usize {
9737            4
9738        }
9739
9740        #[inline(always)]
9741        fn inline_size(_context: fidl::encoding::Context) -> usize {
9742            4
9743        }
9744    }
9745
9746    unsafe impl<D: fidl::encoding::ResourceDialect>
9747        fidl::encoding::Encode<BaseSocketGetTimestampResponse, D>
9748        for &BaseSocketGetTimestampResponse
9749    {
9750        #[inline]
9751        unsafe fn encode(
9752            self,
9753            encoder: &mut fidl::encoding::Encoder<'_, D>,
9754            offset: usize,
9755            _depth: fidl::encoding::Depth,
9756        ) -> fidl::Result<()> {
9757            encoder.debug_check_bounds::<BaseSocketGetTimestampResponse>(offset);
9758            // Delegate to tuple encoding.
9759            fidl::encoding::Encode::<BaseSocketGetTimestampResponse, D>::encode(
9760                (<TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9761                encoder,
9762                offset,
9763                _depth,
9764            )
9765        }
9766    }
9767    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TimestampOption, D>>
9768        fidl::encoding::Encode<BaseSocketGetTimestampResponse, D> for (T0,)
9769    {
9770        #[inline]
9771        unsafe fn encode(
9772            self,
9773            encoder: &mut fidl::encoding::Encoder<'_, D>,
9774            offset: usize,
9775            depth: fidl::encoding::Depth,
9776        ) -> fidl::Result<()> {
9777            encoder.debug_check_bounds::<BaseSocketGetTimestampResponse>(offset);
9778            // Zero out padding regions. There's no need to apply masks
9779            // because the unmasked parts will be overwritten by fields.
9780            // Write the fields.
9781            self.0.encode(encoder, offset + 0, depth)?;
9782            Ok(())
9783        }
9784    }
9785
9786    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9787        for BaseSocketGetTimestampResponse
9788    {
9789        #[inline(always)]
9790        fn new_empty() -> Self {
9791            Self { value: fidl::new_empty!(TimestampOption, D) }
9792        }
9793
9794        #[inline]
9795        unsafe fn decode(
9796            &mut self,
9797            decoder: &mut fidl::encoding::Decoder<'_, D>,
9798            offset: usize,
9799            _depth: fidl::encoding::Depth,
9800        ) -> fidl::Result<()> {
9801            decoder.debug_check_bounds::<Self>(offset);
9802            // Verify that padding bytes are zero.
9803            fidl::decode!(TimestampOption, D, &mut self.value, decoder, offset + 0, _depth)?;
9804            Ok(())
9805        }
9806    }
9807
9808    impl fidl::encoding::ValueTypeMarker for Empty {
9809        type Borrowed<'a> = &'a Self;
9810        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9811            value
9812        }
9813    }
9814
9815    unsafe impl fidl::encoding::TypeMarker for Empty {
9816        type Owned = Self;
9817
9818        #[inline(always)]
9819        fn inline_align(_context: fidl::encoding::Context) -> usize {
9820            1
9821        }
9822
9823        #[inline(always)]
9824        fn inline_size(_context: fidl::encoding::Context) -> usize {
9825            1
9826        }
9827    }
9828
9829    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
9830        #[inline]
9831        unsafe fn encode(
9832            self,
9833            encoder: &mut fidl::encoding::Encoder<'_, D>,
9834            offset: usize,
9835            _depth: fidl::encoding::Depth,
9836        ) -> fidl::Result<()> {
9837            encoder.debug_check_bounds::<Empty>(offset);
9838            encoder.write_num(0u8, offset);
9839            Ok(())
9840        }
9841    }
9842
9843    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
9844        #[inline(always)]
9845        fn new_empty() -> Self {
9846            Self
9847        }
9848
9849        #[inline]
9850        unsafe fn decode(
9851            &mut self,
9852            decoder: &mut fidl::encoding::Decoder<'_, D>,
9853            offset: usize,
9854            _depth: fidl::encoding::Depth,
9855        ) -> fidl::Result<()> {
9856            decoder.debug_check_bounds::<Self>(offset);
9857            match decoder.read_num::<u8>(offset) {
9858                0 => Ok(()),
9859                _ => Err(fidl::Error::Invalid),
9860            }
9861        }
9862    }
9863
9864    impl fidl::encoding::ValueTypeMarker for IpMulticastMembership {
9865        type Borrowed<'a> = &'a Self;
9866        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9867            value
9868        }
9869    }
9870
9871    unsafe impl fidl::encoding::TypeMarker for IpMulticastMembership {
9872        type Owned = Self;
9873
9874        #[inline(always)]
9875        fn inline_align(_context: fidl::encoding::Context) -> usize {
9876            8
9877        }
9878
9879        #[inline(always)]
9880        fn inline_size(_context: fidl::encoding::Context) -> usize {
9881            16
9882        }
9883    }
9884
9885    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpMulticastMembership, D>
9886        for &IpMulticastMembership
9887    {
9888        #[inline]
9889        unsafe fn encode(
9890            self,
9891            encoder: &mut fidl::encoding::Encoder<'_, D>,
9892            offset: usize,
9893            _depth: fidl::encoding::Depth,
9894        ) -> fidl::Result<()> {
9895            encoder.debug_check_bounds::<IpMulticastMembership>(offset);
9896            // Delegate to tuple encoding.
9897            fidl::encoding::Encode::<IpMulticastMembership, D>::encode(
9898                (
9899                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
9900                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.local_addr),
9901                    <fidl_fuchsia_net__common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.mcast_addr),
9902                ),
9903                encoder, offset, _depth
9904            )
9905        }
9906    }
9907    unsafe impl<
9908        D: fidl::encoding::ResourceDialect,
9909        T0: fidl::encoding::Encode<u64, D>,
9910        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
9911        T2: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv4Address, D>,
9912    > fidl::encoding::Encode<IpMulticastMembership, D> for (T0, T1, T2)
9913    {
9914        #[inline]
9915        unsafe fn encode(
9916            self,
9917            encoder: &mut fidl::encoding::Encoder<'_, D>,
9918            offset: usize,
9919            depth: fidl::encoding::Depth,
9920        ) -> fidl::Result<()> {
9921            encoder.debug_check_bounds::<IpMulticastMembership>(offset);
9922            // Zero out padding regions. There's no need to apply masks
9923            // because the unmasked parts will be overwritten by fields.
9924            // Write the fields.
9925            self.0.encode(encoder, offset + 0, depth)?;
9926            self.1.encode(encoder, offset + 8, depth)?;
9927            self.2.encode(encoder, offset + 12, depth)?;
9928            Ok(())
9929        }
9930    }
9931
9932    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpMulticastMembership {
9933        #[inline(always)]
9934        fn new_empty() -> Self {
9935            Self {
9936                iface: fidl::new_empty!(u64, D),
9937                local_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
9938                mcast_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv4Address, D),
9939            }
9940        }
9941
9942        #[inline]
9943        unsafe fn decode(
9944            &mut self,
9945            decoder: &mut fidl::encoding::Decoder<'_, D>,
9946            offset: usize,
9947            _depth: fidl::encoding::Depth,
9948        ) -> fidl::Result<()> {
9949            decoder.debug_check_bounds::<Self>(offset);
9950            // Verify that padding bytes are zero.
9951            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
9952            fidl::decode!(
9953                fidl_fuchsia_net__common::Ipv4Address,
9954                D,
9955                &mut self.local_addr,
9956                decoder,
9957                offset + 8,
9958                _depth
9959            )?;
9960            fidl::decode!(
9961                fidl_fuchsia_net__common::Ipv4Address,
9962                D,
9963                &mut self.mcast_addr,
9964                decoder,
9965                offset + 12,
9966                _depth
9967            )?;
9968            Ok(())
9969        }
9970    }
9971
9972    impl fidl::encoding::ValueTypeMarker for Ipv6MulticastMembership {
9973        type Borrowed<'a> = &'a Self;
9974        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9975            value
9976        }
9977    }
9978
9979    unsafe impl fidl::encoding::TypeMarker for Ipv6MulticastMembership {
9980        type Owned = Self;
9981
9982        #[inline(always)]
9983        fn inline_align(_context: fidl::encoding::Context) -> usize {
9984            8
9985        }
9986
9987        #[inline(always)]
9988        fn inline_size(_context: fidl::encoding::Context) -> usize {
9989            24
9990        }
9991    }
9992
9993    unsafe impl<D: fidl::encoding::ResourceDialect>
9994        fidl::encoding::Encode<Ipv6MulticastMembership, D> for &Ipv6MulticastMembership
9995    {
9996        #[inline]
9997        unsafe fn encode(
9998            self,
9999            encoder: &mut fidl::encoding::Encoder<'_, D>,
10000            offset: usize,
10001            _depth: fidl::encoding::Depth,
10002        ) -> fidl::Result<()> {
10003            encoder.debug_check_bounds::<Ipv6MulticastMembership>(offset);
10004            // Delegate to tuple encoding.
10005            fidl::encoding::Encode::<Ipv6MulticastMembership, D>::encode(
10006                (
10007                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10008                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.mcast_addr),
10009                ),
10010                encoder, offset, _depth
10011            )
10012        }
10013    }
10014    unsafe impl<
10015        D: fidl::encoding::ResourceDialect,
10016        T0: fidl::encoding::Encode<u64, D>,
10017        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10018    > fidl::encoding::Encode<Ipv6MulticastMembership, D> for (T0, T1)
10019    {
10020        #[inline]
10021        unsafe fn encode(
10022            self,
10023            encoder: &mut fidl::encoding::Encoder<'_, D>,
10024            offset: usize,
10025            depth: fidl::encoding::Depth,
10026        ) -> fidl::Result<()> {
10027            encoder.debug_check_bounds::<Ipv6MulticastMembership>(offset);
10028            // Zero out padding regions. There's no need to apply masks
10029            // because the unmasked parts will be overwritten by fields.
10030            // Write the fields.
10031            self.0.encode(encoder, offset + 0, depth)?;
10032            self.1.encode(encoder, offset + 8, depth)?;
10033            Ok(())
10034        }
10035    }
10036
10037    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10038        for Ipv6MulticastMembership
10039    {
10040        #[inline(always)]
10041        fn new_empty() -> Self {
10042            Self {
10043                iface: fidl::new_empty!(u64, D),
10044                mcast_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10045            }
10046        }
10047
10048        #[inline]
10049        unsafe fn decode(
10050            &mut self,
10051            decoder: &mut fidl::encoding::Decoder<'_, D>,
10052            offset: usize,
10053            _depth: fidl::encoding::Depth,
10054        ) -> fidl::Result<()> {
10055            decoder.debug_check_bounds::<Self>(offset);
10056            // Verify that padding bytes are zero.
10057            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10058            fidl::decode!(
10059                fidl_fuchsia_net__common::Ipv6Address,
10060                D,
10061                &mut self.mcast_addr,
10062                decoder,
10063                offset + 8,
10064                _depth
10065            )?;
10066            Ok(())
10067        }
10068    }
10069
10070    impl fidl::encoding::ValueTypeMarker for Ipv6PktInfoRecvControlData {
10071        type Borrowed<'a> = &'a Self;
10072        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10073            value
10074        }
10075    }
10076
10077    unsafe impl fidl::encoding::TypeMarker for Ipv6PktInfoRecvControlData {
10078        type Owned = Self;
10079
10080        #[inline(always)]
10081        fn inline_align(_context: fidl::encoding::Context) -> usize {
10082            8
10083        }
10084
10085        #[inline(always)]
10086        fn inline_size(_context: fidl::encoding::Context) -> usize {
10087            24
10088        }
10089    }
10090
10091    unsafe impl<D: fidl::encoding::ResourceDialect>
10092        fidl::encoding::Encode<Ipv6PktInfoRecvControlData, D> for &Ipv6PktInfoRecvControlData
10093    {
10094        #[inline]
10095        unsafe fn encode(
10096            self,
10097            encoder: &mut fidl::encoding::Encoder<'_, D>,
10098            offset: usize,
10099            _depth: fidl::encoding::Depth,
10100        ) -> fidl::Result<()> {
10101            encoder.debug_check_bounds::<Ipv6PktInfoRecvControlData>(offset);
10102            // Delegate to tuple encoding.
10103            fidl::encoding::Encode::<Ipv6PktInfoRecvControlData, D>::encode(
10104                (
10105                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10106                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.header_destination_addr),
10107                ),
10108                encoder, offset, _depth
10109            )
10110        }
10111    }
10112    unsafe impl<
10113        D: fidl::encoding::ResourceDialect,
10114        T0: fidl::encoding::Encode<u64, D>,
10115        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10116    > fidl::encoding::Encode<Ipv6PktInfoRecvControlData, D> for (T0, T1)
10117    {
10118        #[inline]
10119        unsafe fn encode(
10120            self,
10121            encoder: &mut fidl::encoding::Encoder<'_, D>,
10122            offset: usize,
10123            depth: fidl::encoding::Depth,
10124        ) -> fidl::Result<()> {
10125            encoder.debug_check_bounds::<Ipv6PktInfoRecvControlData>(offset);
10126            // Zero out padding regions. There's no need to apply masks
10127            // because the unmasked parts will be overwritten by fields.
10128            // Write the fields.
10129            self.0.encode(encoder, offset + 0, depth)?;
10130            self.1.encode(encoder, offset + 8, depth)?;
10131            Ok(())
10132        }
10133    }
10134
10135    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10136        for Ipv6PktInfoRecvControlData
10137    {
10138        #[inline(always)]
10139        fn new_empty() -> Self {
10140            Self {
10141                iface: fidl::new_empty!(u64, D),
10142                header_destination_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10143            }
10144        }
10145
10146        #[inline]
10147        unsafe fn decode(
10148            &mut self,
10149            decoder: &mut fidl::encoding::Decoder<'_, D>,
10150            offset: usize,
10151            _depth: fidl::encoding::Depth,
10152        ) -> fidl::Result<()> {
10153            decoder.debug_check_bounds::<Self>(offset);
10154            // Verify that padding bytes are zero.
10155            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10156            fidl::decode!(
10157                fidl_fuchsia_net__common::Ipv6Address,
10158                D,
10159                &mut self.header_destination_addr,
10160                decoder,
10161                offset + 8,
10162                _depth
10163            )?;
10164            Ok(())
10165        }
10166    }
10167
10168    impl fidl::encoding::ValueTypeMarker for Ipv6PktInfoSendControlData {
10169        type Borrowed<'a> = &'a Self;
10170        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10171            value
10172        }
10173    }
10174
10175    unsafe impl fidl::encoding::TypeMarker for Ipv6PktInfoSendControlData {
10176        type Owned = Self;
10177
10178        #[inline(always)]
10179        fn inline_align(_context: fidl::encoding::Context) -> usize {
10180            8
10181        }
10182
10183        #[inline(always)]
10184        fn inline_size(_context: fidl::encoding::Context) -> usize {
10185            24
10186        }
10187    }
10188
10189    unsafe impl<D: fidl::encoding::ResourceDialect>
10190        fidl::encoding::Encode<Ipv6PktInfoSendControlData, D> for &Ipv6PktInfoSendControlData
10191    {
10192        #[inline]
10193        unsafe fn encode(
10194            self,
10195            encoder: &mut fidl::encoding::Encoder<'_, D>,
10196            offset: usize,
10197            _depth: fidl::encoding::Depth,
10198        ) -> fidl::Result<()> {
10199            encoder.debug_check_bounds::<Ipv6PktInfoSendControlData>(offset);
10200            // Delegate to tuple encoding.
10201            fidl::encoding::Encode::<Ipv6PktInfoSendControlData, D>::encode(
10202                (
10203                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10204                    <fidl_fuchsia_net__common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.local_addr),
10205                ),
10206                encoder, offset, _depth
10207            )
10208        }
10209    }
10210    unsafe impl<
10211        D: fidl::encoding::ResourceDialect,
10212        T0: fidl::encoding::Encode<u64, D>,
10213        T1: fidl::encoding::Encode<fidl_fuchsia_net__common::Ipv6Address, D>,
10214    > fidl::encoding::Encode<Ipv6PktInfoSendControlData, D> for (T0, T1)
10215    {
10216        #[inline]
10217        unsafe fn encode(
10218            self,
10219            encoder: &mut fidl::encoding::Encoder<'_, D>,
10220            offset: usize,
10221            depth: fidl::encoding::Depth,
10222        ) -> fidl::Result<()> {
10223            encoder.debug_check_bounds::<Ipv6PktInfoSendControlData>(offset);
10224            // Zero out padding regions. There's no need to apply masks
10225            // because the unmasked parts will be overwritten by fields.
10226            // Write the fields.
10227            self.0.encode(encoder, offset + 0, depth)?;
10228            self.1.encode(encoder, offset + 8, depth)?;
10229            Ok(())
10230        }
10231    }
10232
10233    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10234        for Ipv6PktInfoSendControlData
10235    {
10236        #[inline(always)]
10237        fn new_empty() -> Self {
10238            Self {
10239                iface: fidl::new_empty!(u64, D),
10240                local_addr: fidl::new_empty!(fidl_fuchsia_net__common::Ipv6Address, D),
10241            }
10242        }
10243
10244        #[inline]
10245        unsafe fn decode(
10246            &mut self,
10247            decoder: &mut fidl::encoding::Decoder<'_, D>,
10248            offset: usize,
10249            _depth: fidl::encoding::Depth,
10250        ) -> fidl::Result<()> {
10251            decoder.debug_check_bounds::<Self>(offset);
10252            // Verify that padding bytes are zero.
10253            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10254            fidl::decode!(
10255                fidl_fuchsia_net__common::Ipv6Address,
10256                D,
10257                &mut self.local_addr,
10258                decoder,
10259                offset + 8,
10260                _depth
10261            )?;
10262            Ok(())
10263        }
10264    }
10265
10266    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketDeprecatedRequest {
10267        type Borrowed<'a> = &'a Self;
10268        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10269            value
10270        }
10271    }
10272
10273    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketDeprecatedRequest {
10274        type Owned = Self;
10275
10276        #[inline(always)]
10277        fn inline_align(_context: fidl::encoding::Context) -> usize {
10278            4
10279        }
10280
10281        #[inline(always)]
10282        fn inline_size(_context: fidl::encoding::Context) -> usize {
10283            8
10284        }
10285    }
10286
10287    unsafe impl<D: fidl::encoding::ResourceDialect>
10288        fidl::encoding::Encode<ProviderDatagramSocketDeprecatedRequest, D>
10289        for &ProviderDatagramSocketDeprecatedRequest
10290    {
10291        #[inline]
10292        unsafe fn encode(
10293            self,
10294            encoder: &mut fidl::encoding::Encoder<'_, D>,
10295            offset: usize,
10296            _depth: fidl::encoding::Depth,
10297        ) -> fidl::Result<()> {
10298            encoder.debug_check_bounds::<ProviderDatagramSocketDeprecatedRequest>(offset);
10299            // Delegate to tuple encoding.
10300            fidl::encoding::Encode::<ProviderDatagramSocketDeprecatedRequest, D>::encode(
10301                (
10302                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10303                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10304                        &self.proto,
10305                    ),
10306                ),
10307                encoder,
10308                offset,
10309                _depth,
10310            )
10311        }
10312    }
10313    unsafe impl<
10314        D: fidl::encoding::ResourceDialect,
10315        T0: fidl::encoding::Encode<Domain, D>,
10316        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10317    > fidl::encoding::Encode<ProviderDatagramSocketDeprecatedRequest, D> for (T0, T1)
10318    {
10319        #[inline]
10320        unsafe fn encode(
10321            self,
10322            encoder: &mut fidl::encoding::Encoder<'_, D>,
10323            offset: usize,
10324            depth: fidl::encoding::Depth,
10325        ) -> fidl::Result<()> {
10326            encoder.debug_check_bounds::<ProviderDatagramSocketDeprecatedRequest>(offset);
10327            // Zero out padding regions. There's no need to apply masks
10328            // because the unmasked parts will be overwritten by fields.
10329            unsafe {
10330                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10331                (ptr as *mut u32).write_unaligned(0);
10332            }
10333            // Write the fields.
10334            self.0.encode(encoder, offset + 0, depth)?;
10335            self.1.encode(encoder, offset + 4, depth)?;
10336            Ok(())
10337        }
10338    }
10339
10340    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10341        for ProviderDatagramSocketDeprecatedRequest
10342    {
10343        #[inline(always)]
10344        fn new_empty() -> Self {
10345            Self {
10346                domain: fidl::new_empty!(Domain, D),
10347                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10348            }
10349        }
10350
10351        #[inline]
10352        unsafe fn decode(
10353            &mut self,
10354            decoder: &mut fidl::encoding::Decoder<'_, D>,
10355            offset: usize,
10356            _depth: fidl::encoding::Depth,
10357        ) -> fidl::Result<()> {
10358            decoder.debug_check_bounds::<Self>(offset);
10359            // Verify that padding bytes are zero.
10360            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10361            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10362            let mask = 0xffff0000u32;
10363            let maskedval = padval & mask;
10364            if maskedval != 0 {
10365                return Err(fidl::Error::NonZeroPadding {
10366                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10367                });
10368            }
10369            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10370            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10371            Ok(())
10372        }
10373    }
10374
10375    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketRequest {
10376        type Borrowed<'a> = &'a Self;
10377        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10378            value
10379        }
10380    }
10381
10382    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketRequest {
10383        type Owned = Self;
10384
10385        #[inline(always)]
10386        fn inline_align(_context: fidl::encoding::Context) -> usize {
10387            4
10388        }
10389
10390        #[inline(always)]
10391        fn inline_size(_context: fidl::encoding::Context) -> usize {
10392            8
10393        }
10394    }
10395
10396    unsafe impl<D: fidl::encoding::ResourceDialect>
10397        fidl::encoding::Encode<ProviderDatagramSocketRequest, D>
10398        for &ProviderDatagramSocketRequest
10399    {
10400        #[inline]
10401        unsafe fn encode(
10402            self,
10403            encoder: &mut fidl::encoding::Encoder<'_, D>,
10404            offset: usize,
10405            _depth: fidl::encoding::Depth,
10406        ) -> fidl::Result<()> {
10407            encoder.debug_check_bounds::<ProviderDatagramSocketRequest>(offset);
10408            // Delegate to tuple encoding.
10409            fidl::encoding::Encode::<ProviderDatagramSocketRequest, D>::encode(
10410                (
10411                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10412                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10413                        &self.proto,
10414                    ),
10415                ),
10416                encoder,
10417                offset,
10418                _depth,
10419            )
10420        }
10421    }
10422    unsafe impl<
10423        D: fidl::encoding::ResourceDialect,
10424        T0: fidl::encoding::Encode<Domain, D>,
10425        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10426    > fidl::encoding::Encode<ProviderDatagramSocketRequest, D> for (T0, T1)
10427    {
10428        #[inline]
10429        unsafe fn encode(
10430            self,
10431            encoder: &mut fidl::encoding::Encoder<'_, D>,
10432            offset: usize,
10433            depth: fidl::encoding::Depth,
10434        ) -> fidl::Result<()> {
10435            encoder.debug_check_bounds::<ProviderDatagramSocketRequest>(offset);
10436            // Zero out padding regions. There's no need to apply masks
10437            // because the unmasked parts will be overwritten by fields.
10438            unsafe {
10439                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10440                (ptr as *mut u32).write_unaligned(0);
10441            }
10442            // Write the fields.
10443            self.0.encode(encoder, offset + 0, depth)?;
10444            self.1.encode(encoder, offset + 4, depth)?;
10445            Ok(())
10446        }
10447    }
10448
10449    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10450        for ProviderDatagramSocketRequest
10451    {
10452        #[inline(always)]
10453        fn new_empty() -> Self {
10454            Self {
10455                domain: fidl::new_empty!(Domain, D),
10456                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10457            }
10458        }
10459
10460        #[inline]
10461        unsafe fn decode(
10462            &mut self,
10463            decoder: &mut fidl::encoding::Decoder<'_, D>,
10464            offset: usize,
10465            _depth: fidl::encoding::Depth,
10466        ) -> fidl::Result<()> {
10467            decoder.debug_check_bounds::<Self>(offset);
10468            // Verify that padding bytes are zero.
10469            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10470            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10471            let mask = 0xffff0000u32;
10472            let maskedval = padval & mask;
10473            if maskedval != 0 {
10474                return Err(fidl::Error::NonZeroPadding {
10475                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10476                });
10477            }
10478            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10479            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10480            Ok(())
10481        }
10482    }
10483
10484    impl fidl::encoding::ValueTypeMarker for ProviderGetInterfaceAddressesResponse {
10485        type Borrowed<'a> = &'a Self;
10486        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10487            value
10488        }
10489    }
10490
10491    unsafe impl fidl::encoding::TypeMarker for ProviderGetInterfaceAddressesResponse {
10492        type Owned = Self;
10493
10494        #[inline(always)]
10495        fn inline_align(_context: fidl::encoding::Context) -> usize {
10496            8
10497        }
10498
10499        #[inline(always)]
10500        fn inline_size(_context: fidl::encoding::Context) -> usize {
10501            16
10502        }
10503    }
10504
10505    unsafe impl<D: fidl::encoding::ResourceDialect>
10506        fidl::encoding::Encode<ProviderGetInterfaceAddressesResponse, D>
10507        for &ProviderGetInterfaceAddressesResponse
10508    {
10509        #[inline]
10510        unsafe fn encode(
10511            self,
10512            encoder: &mut fidl::encoding::Encoder<'_, D>,
10513            offset: usize,
10514            _depth: fidl::encoding::Depth,
10515        ) -> fidl::Result<()> {
10516            encoder.debug_check_bounds::<ProviderGetInterfaceAddressesResponse>(offset);
10517            // Delegate to tuple encoding.
10518            fidl::encoding::Encode::<ProviderGetInterfaceAddressesResponse, D>::encode(
10519                (
10520                    <fidl::encoding::UnboundedVector<InterfaceAddresses> as fidl::encoding::ValueTypeMarker>::borrow(&self.interfaces),
10521                ),
10522                encoder, offset, _depth
10523            )
10524        }
10525    }
10526    unsafe impl<
10527        D: fidl::encoding::ResourceDialect,
10528        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<InterfaceAddresses>, D>,
10529    > fidl::encoding::Encode<ProviderGetInterfaceAddressesResponse, D> for (T0,)
10530    {
10531        #[inline]
10532        unsafe fn encode(
10533            self,
10534            encoder: &mut fidl::encoding::Encoder<'_, D>,
10535            offset: usize,
10536            depth: fidl::encoding::Depth,
10537        ) -> fidl::Result<()> {
10538            encoder.debug_check_bounds::<ProviderGetInterfaceAddressesResponse>(offset);
10539            // Zero out padding regions. There's no need to apply masks
10540            // because the unmasked parts will be overwritten by fields.
10541            // Write the fields.
10542            self.0.encode(encoder, offset + 0, depth)?;
10543            Ok(())
10544        }
10545    }
10546
10547    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10548        for ProviderGetInterfaceAddressesResponse
10549    {
10550        #[inline(always)]
10551        fn new_empty() -> Self {
10552            Self {
10553                interfaces: fidl::new_empty!(
10554                    fidl::encoding::UnboundedVector<InterfaceAddresses>,
10555                    D
10556                ),
10557            }
10558        }
10559
10560        #[inline]
10561        unsafe fn decode(
10562            &mut self,
10563            decoder: &mut fidl::encoding::Decoder<'_, D>,
10564            offset: usize,
10565            _depth: fidl::encoding::Depth,
10566        ) -> fidl::Result<()> {
10567            decoder.debug_check_bounds::<Self>(offset);
10568            // Verify that padding bytes are zero.
10569            fidl::decode!(
10570                fidl::encoding::UnboundedVector<InterfaceAddresses>,
10571                D,
10572                &mut self.interfaces,
10573                decoder,
10574                offset + 0,
10575                _depth
10576            )?;
10577            Ok(())
10578        }
10579    }
10580
10581    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceIndexToNameRequest {
10582        type Borrowed<'a> = &'a Self;
10583        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10584            value
10585        }
10586    }
10587
10588    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceIndexToNameRequest {
10589        type Owned = Self;
10590
10591        #[inline(always)]
10592        fn inline_align(_context: fidl::encoding::Context) -> usize {
10593            8
10594        }
10595
10596        #[inline(always)]
10597        fn inline_size(_context: fidl::encoding::Context) -> usize {
10598            8
10599        }
10600        #[inline(always)]
10601        fn encode_is_copy() -> bool {
10602            true
10603        }
10604
10605        #[inline(always)]
10606        fn decode_is_copy() -> bool {
10607            true
10608        }
10609    }
10610
10611    unsafe impl<D: fidl::encoding::ResourceDialect>
10612        fidl::encoding::Encode<ProviderInterfaceIndexToNameRequest, D>
10613        for &ProviderInterfaceIndexToNameRequest
10614    {
10615        #[inline]
10616        unsafe fn encode(
10617            self,
10618            encoder: &mut fidl::encoding::Encoder<'_, D>,
10619            offset: usize,
10620            _depth: fidl::encoding::Depth,
10621        ) -> fidl::Result<()> {
10622            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameRequest>(offset);
10623            unsafe {
10624                // Copy the object into the buffer.
10625                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10626                (buf_ptr as *mut ProviderInterfaceIndexToNameRequest)
10627                    .write_unaligned((self as *const ProviderInterfaceIndexToNameRequest).read());
10628                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10629                // done second because the memcpy will write garbage to these bytes.
10630            }
10631            Ok(())
10632        }
10633    }
10634    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
10635        fidl::encoding::Encode<ProviderInterfaceIndexToNameRequest, D> for (T0,)
10636    {
10637        #[inline]
10638        unsafe fn encode(
10639            self,
10640            encoder: &mut fidl::encoding::Encoder<'_, D>,
10641            offset: usize,
10642            depth: fidl::encoding::Depth,
10643        ) -> fidl::Result<()> {
10644            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameRequest>(offset);
10645            // Zero out padding regions. There's no need to apply masks
10646            // because the unmasked parts will be overwritten by fields.
10647            // Write the fields.
10648            self.0.encode(encoder, offset + 0, depth)?;
10649            Ok(())
10650        }
10651    }
10652
10653    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10654        for ProviderInterfaceIndexToNameRequest
10655    {
10656        #[inline(always)]
10657        fn new_empty() -> Self {
10658            Self { index: fidl::new_empty!(u64, D) }
10659        }
10660
10661        #[inline]
10662        unsafe fn decode(
10663            &mut self,
10664            decoder: &mut fidl::encoding::Decoder<'_, D>,
10665            offset: usize,
10666            _depth: fidl::encoding::Depth,
10667        ) -> fidl::Result<()> {
10668            decoder.debug_check_bounds::<Self>(offset);
10669            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10670            // Verify that padding bytes are zero.
10671            // Copy from the buffer into the object.
10672            unsafe {
10673                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
10674            }
10675            Ok(())
10676        }
10677    }
10678
10679    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToFlagsRequest {
10680        type Borrowed<'a> = &'a Self;
10681        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10682            value
10683        }
10684    }
10685
10686    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToFlagsRequest {
10687        type Owned = Self;
10688
10689        #[inline(always)]
10690        fn inline_align(_context: fidl::encoding::Context) -> usize {
10691            8
10692        }
10693
10694        #[inline(always)]
10695        fn inline_size(_context: fidl::encoding::Context) -> usize {
10696            16
10697        }
10698    }
10699
10700    unsafe impl<D: fidl::encoding::ResourceDialect>
10701        fidl::encoding::Encode<ProviderInterfaceNameToFlagsRequest, D>
10702        for &ProviderInterfaceNameToFlagsRequest
10703    {
10704        #[inline]
10705        unsafe fn encode(
10706            self,
10707            encoder: &mut fidl::encoding::Encoder<'_, D>,
10708            offset: usize,
10709            _depth: fidl::encoding::Depth,
10710        ) -> fidl::Result<()> {
10711            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsRequest>(offset);
10712            // Delegate to tuple encoding.
10713            fidl::encoding::Encode::<ProviderInterfaceNameToFlagsRequest, D>::encode(
10714                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
10715                    &self.name,
10716                ),),
10717                encoder,
10718                offset,
10719                _depth,
10720            )
10721        }
10722    }
10723    unsafe impl<
10724        D: fidl::encoding::ResourceDialect,
10725        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
10726    > fidl::encoding::Encode<ProviderInterfaceNameToFlagsRequest, D> for (T0,)
10727    {
10728        #[inline]
10729        unsafe fn encode(
10730            self,
10731            encoder: &mut fidl::encoding::Encoder<'_, D>,
10732            offset: usize,
10733            depth: fidl::encoding::Depth,
10734        ) -> fidl::Result<()> {
10735            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsRequest>(offset);
10736            // Zero out padding regions. There's no need to apply masks
10737            // because the unmasked parts will be overwritten by fields.
10738            // Write the fields.
10739            self.0.encode(encoder, offset + 0, depth)?;
10740            Ok(())
10741        }
10742    }
10743
10744    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10745        for ProviderInterfaceNameToFlagsRequest
10746    {
10747        #[inline(always)]
10748        fn new_empty() -> Self {
10749            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
10750        }
10751
10752        #[inline]
10753        unsafe fn decode(
10754            &mut self,
10755            decoder: &mut fidl::encoding::Decoder<'_, D>,
10756            offset: usize,
10757            _depth: fidl::encoding::Depth,
10758        ) -> fidl::Result<()> {
10759            decoder.debug_check_bounds::<Self>(offset);
10760            // Verify that padding bytes are zero.
10761            fidl::decode!(
10762                fidl::encoding::BoundedString<15>,
10763                D,
10764                &mut self.name,
10765                decoder,
10766                offset + 0,
10767                _depth
10768            )?;
10769            Ok(())
10770        }
10771    }
10772
10773    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToIndexRequest {
10774        type Borrowed<'a> = &'a Self;
10775        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10776            value
10777        }
10778    }
10779
10780    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToIndexRequest {
10781        type Owned = Self;
10782
10783        #[inline(always)]
10784        fn inline_align(_context: fidl::encoding::Context) -> usize {
10785            8
10786        }
10787
10788        #[inline(always)]
10789        fn inline_size(_context: fidl::encoding::Context) -> usize {
10790            16
10791        }
10792    }
10793
10794    unsafe impl<D: fidl::encoding::ResourceDialect>
10795        fidl::encoding::Encode<ProviderInterfaceNameToIndexRequest, D>
10796        for &ProviderInterfaceNameToIndexRequest
10797    {
10798        #[inline]
10799        unsafe fn encode(
10800            self,
10801            encoder: &mut fidl::encoding::Encoder<'_, D>,
10802            offset: usize,
10803            _depth: fidl::encoding::Depth,
10804        ) -> fidl::Result<()> {
10805            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexRequest>(offset);
10806            // Delegate to tuple encoding.
10807            fidl::encoding::Encode::<ProviderInterfaceNameToIndexRequest, D>::encode(
10808                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
10809                    &self.name,
10810                ),),
10811                encoder,
10812                offset,
10813                _depth,
10814            )
10815        }
10816    }
10817    unsafe impl<
10818        D: fidl::encoding::ResourceDialect,
10819        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
10820    > fidl::encoding::Encode<ProviderInterfaceNameToIndexRequest, D> for (T0,)
10821    {
10822        #[inline]
10823        unsafe fn encode(
10824            self,
10825            encoder: &mut fidl::encoding::Encoder<'_, D>,
10826            offset: usize,
10827            depth: fidl::encoding::Depth,
10828        ) -> fidl::Result<()> {
10829            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexRequest>(offset);
10830            // Zero out padding regions. There's no need to apply masks
10831            // because the unmasked parts will be overwritten by fields.
10832            // Write the fields.
10833            self.0.encode(encoder, offset + 0, depth)?;
10834            Ok(())
10835        }
10836    }
10837
10838    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10839        for ProviderInterfaceNameToIndexRequest
10840    {
10841        #[inline(always)]
10842        fn new_empty() -> Self {
10843            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
10844        }
10845
10846        #[inline]
10847        unsafe fn decode(
10848            &mut self,
10849            decoder: &mut fidl::encoding::Decoder<'_, D>,
10850            offset: usize,
10851            _depth: fidl::encoding::Depth,
10852        ) -> fidl::Result<()> {
10853            decoder.debug_check_bounds::<Self>(offset);
10854            // Verify that padding bytes are zero.
10855            fidl::decode!(
10856                fidl::encoding::BoundedString<15>,
10857                D,
10858                &mut self.name,
10859                decoder,
10860                offset + 0,
10861                _depth
10862            )?;
10863            Ok(())
10864        }
10865    }
10866
10867    impl fidl::encoding::ValueTypeMarker for ProviderStreamSocketRequest {
10868        type Borrowed<'a> = &'a Self;
10869        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10870            value
10871        }
10872    }
10873
10874    unsafe impl fidl::encoding::TypeMarker for ProviderStreamSocketRequest {
10875        type Owned = Self;
10876
10877        #[inline(always)]
10878        fn inline_align(_context: fidl::encoding::Context) -> usize {
10879            4
10880        }
10881
10882        #[inline(always)]
10883        fn inline_size(_context: fidl::encoding::Context) -> usize {
10884            8
10885        }
10886    }
10887
10888    unsafe impl<D: fidl::encoding::ResourceDialect>
10889        fidl::encoding::Encode<ProviderStreamSocketRequest, D> for &ProviderStreamSocketRequest
10890    {
10891        #[inline]
10892        unsafe fn encode(
10893            self,
10894            encoder: &mut fidl::encoding::Encoder<'_, D>,
10895            offset: usize,
10896            _depth: fidl::encoding::Depth,
10897        ) -> fidl::Result<()> {
10898            encoder.debug_check_bounds::<ProviderStreamSocketRequest>(offset);
10899            // Delegate to tuple encoding.
10900            fidl::encoding::Encode::<ProviderStreamSocketRequest, D>::encode(
10901                (
10902                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10903                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
10904                ),
10905                encoder,
10906                offset,
10907                _depth,
10908            )
10909        }
10910    }
10911    unsafe impl<
10912        D: fidl::encoding::ResourceDialect,
10913        T0: fidl::encoding::Encode<Domain, D>,
10914        T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
10915    > fidl::encoding::Encode<ProviderStreamSocketRequest, D> for (T0, T1)
10916    {
10917        #[inline]
10918        unsafe fn encode(
10919            self,
10920            encoder: &mut fidl::encoding::Encoder<'_, D>,
10921            offset: usize,
10922            depth: fidl::encoding::Depth,
10923        ) -> fidl::Result<()> {
10924            encoder.debug_check_bounds::<ProviderStreamSocketRequest>(offset);
10925            // Zero out padding regions. There's no need to apply masks
10926            // because the unmasked parts will be overwritten by fields.
10927            unsafe {
10928                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10929                (ptr as *mut u32).write_unaligned(0);
10930            }
10931            // Write the fields.
10932            self.0.encode(encoder, offset + 0, depth)?;
10933            self.1.encode(encoder, offset + 4, depth)?;
10934            Ok(())
10935        }
10936    }
10937
10938    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10939        for ProviderStreamSocketRequest
10940    {
10941        #[inline(always)]
10942        fn new_empty() -> Self {
10943            Self {
10944                domain: fidl::new_empty!(Domain, D),
10945                proto: fidl::new_empty!(StreamSocketProtocol, D),
10946            }
10947        }
10948
10949        #[inline]
10950        unsafe fn decode(
10951            &mut self,
10952            decoder: &mut fidl::encoding::Decoder<'_, D>,
10953            offset: usize,
10954            _depth: fidl::encoding::Depth,
10955        ) -> fidl::Result<()> {
10956            decoder.debug_check_bounds::<Self>(offset);
10957            // Verify that padding bytes are zero.
10958            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10959            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10960            let mask = 0xffff0000u32;
10961            let maskedval = padval & mask;
10962            if maskedval != 0 {
10963                return Err(fidl::Error::NonZeroPadding {
10964                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10965                });
10966            }
10967            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10968            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10969            Ok(())
10970        }
10971    }
10972
10973    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceIndexToNameResponse {
10974        type Borrowed<'a> = &'a Self;
10975        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10976            value
10977        }
10978    }
10979
10980    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceIndexToNameResponse {
10981        type Owned = Self;
10982
10983        #[inline(always)]
10984        fn inline_align(_context: fidl::encoding::Context) -> usize {
10985            8
10986        }
10987
10988        #[inline(always)]
10989        fn inline_size(_context: fidl::encoding::Context) -> usize {
10990            16
10991        }
10992    }
10993
10994    unsafe impl<D: fidl::encoding::ResourceDialect>
10995        fidl::encoding::Encode<ProviderInterfaceIndexToNameResponse, D>
10996        for &ProviderInterfaceIndexToNameResponse
10997    {
10998        #[inline]
10999        unsafe fn encode(
11000            self,
11001            encoder: &mut fidl::encoding::Encoder<'_, D>,
11002            offset: usize,
11003            _depth: fidl::encoding::Depth,
11004        ) -> fidl::Result<()> {
11005            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameResponse>(offset);
11006            // Delegate to tuple encoding.
11007            fidl::encoding::Encode::<ProviderInterfaceIndexToNameResponse, D>::encode(
11008                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
11009                    &self.name,
11010                ),),
11011                encoder,
11012                offset,
11013                _depth,
11014            )
11015        }
11016    }
11017    unsafe impl<
11018        D: fidl::encoding::ResourceDialect,
11019        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
11020    > fidl::encoding::Encode<ProviderInterfaceIndexToNameResponse, D> for (T0,)
11021    {
11022        #[inline]
11023        unsafe fn encode(
11024            self,
11025            encoder: &mut fidl::encoding::Encoder<'_, D>,
11026            offset: usize,
11027            depth: fidl::encoding::Depth,
11028        ) -> fidl::Result<()> {
11029            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameResponse>(offset);
11030            // Zero out padding regions. There's no need to apply masks
11031            // because the unmasked parts will be overwritten by fields.
11032            // Write the fields.
11033            self.0.encode(encoder, offset + 0, depth)?;
11034            Ok(())
11035        }
11036    }
11037
11038    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11039        for ProviderInterfaceIndexToNameResponse
11040    {
11041        #[inline(always)]
11042        fn new_empty() -> Self {
11043            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
11044        }
11045
11046        #[inline]
11047        unsafe fn decode(
11048            &mut self,
11049            decoder: &mut fidl::encoding::Decoder<'_, D>,
11050            offset: usize,
11051            _depth: fidl::encoding::Depth,
11052        ) -> fidl::Result<()> {
11053            decoder.debug_check_bounds::<Self>(offset);
11054            // Verify that padding bytes are zero.
11055            fidl::decode!(
11056                fidl::encoding::BoundedString<15>,
11057                D,
11058                &mut self.name,
11059                decoder,
11060                offset + 0,
11061                _depth
11062            )?;
11063            Ok(())
11064        }
11065    }
11066
11067    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToFlagsResponse {
11068        type Borrowed<'a> = &'a Self;
11069        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11070            value
11071        }
11072    }
11073
11074    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToFlagsResponse {
11075        type Owned = Self;
11076
11077        #[inline(always)]
11078        fn inline_align(_context: fidl::encoding::Context) -> usize {
11079            2
11080        }
11081
11082        #[inline(always)]
11083        fn inline_size(_context: fidl::encoding::Context) -> usize {
11084            2
11085        }
11086    }
11087
11088    unsafe impl<D: fidl::encoding::ResourceDialect>
11089        fidl::encoding::Encode<ProviderInterfaceNameToFlagsResponse, D>
11090        for &ProviderInterfaceNameToFlagsResponse
11091    {
11092        #[inline]
11093        unsafe fn encode(
11094            self,
11095            encoder: &mut fidl::encoding::Encoder<'_, D>,
11096            offset: usize,
11097            _depth: fidl::encoding::Depth,
11098        ) -> fidl::Result<()> {
11099            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsResponse>(offset);
11100            // Delegate to tuple encoding.
11101            fidl::encoding::Encode::<ProviderInterfaceNameToFlagsResponse, D>::encode(
11102                (<InterfaceFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),),
11103                encoder,
11104                offset,
11105                _depth,
11106            )
11107        }
11108    }
11109    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<InterfaceFlags, D>>
11110        fidl::encoding::Encode<ProviderInterfaceNameToFlagsResponse, D> for (T0,)
11111    {
11112        #[inline]
11113        unsafe fn encode(
11114            self,
11115            encoder: &mut fidl::encoding::Encoder<'_, D>,
11116            offset: usize,
11117            depth: fidl::encoding::Depth,
11118        ) -> fidl::Result<()> {
11119            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsResponse>(offset);
11120            // Zero out padding regions. There's no need to apply masks
11121            // because the unmasked parts will be overwritten by fields.
11122            // Write the fields.
11123            self.0.encode(encoder, offset + 0, depth)?;
11124            Ok(())
11125        }
11126    }
11127
11128    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11129        for ProviderInterfaceNameToFlagsResponse
11130    {
11131        #[inline(always)]
11132        fn new_empty() -> Self {
11133            Self { flags: fidl::new_empty!(InterfaceFlags, D) }
11134        }
11135
11136        #[inline]
11137        unsafe fn decode(
11138            &mut self,
11139            decoder: &mut fidl::encoding::Decoder<'_, D>,
11140            offset: usize,
11141            _depth: fidl::encoding::Depth,
11142        ) -> fidl::Result<()> {
11143            decoder.debug_check_bounds::<Self>(offset);
11144            // Verify that padding bytes are zero.
11145            fidl::decode!(InterfaceFlags, D, &mut self.flags, decoder, offset + 0, _depth)?;
11146            Ok(())
11147        }
11148    }
11149
11150    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToIndexResponse {
11151        type Borrowed<'a> = &'a Self;
11152        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11153            value
11154        }
11155    }
11156
11157    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToIndexResponse {
11158        type Owned = Self;
11159
11160        #[inline(always)]
11161        fn inline_align(_context: fidl::encoding::Context) -> usize {
11162            8
11163        }
11164
11165        #[inline(always)]
11166        fn inline_size(_context: fidl::encoding::Context) -> usize {
11167            8
11168        }
11169        #[inline(always)]
11170        fn encode_is_copy() -> bool {
11171            true
11172        }
11173
11174        #[inline(always)]
11175        fn decode_is_copy() -> bool {
11176            true
11177        }
11178    }
11179
11180    unsafe impl<D: fidl::encoding::ResourceDialect>
11181        fidl::encoding::Encode<ProviderInterfaceNameToIndexResponse, D>
11182        for &ProviderInterfaceNameToIndexResponse
11183    {
11184        #[inline]
11185        unsafe fn encode(
11186            self,
11187            encoder: &mut fidl::encoding::Encoder<'_, D>,
11188            offset: usize,
11189            _depth: fidl::encoding::Depth,
11190        ) -> fidl::Result<()> {
11191            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexResponse>(offset);
11192            unsafe {
11193                // Copy the object into the buffer.
11194                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11195                (buf_ptr as *mut ProviderInterfaceNameToIndexResponse)
11196                    .write_unaligned((self as *const ProviderInterfaceNameToIndexResponse).read());
11197                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11198                // done second because the memcpy will write garbage to these bytes.
11199            }
11200            Ok(())
11201        }
11202    }
11203    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
11204        fidl::encoding::Encode<ProviderInterfaceNameToIndexResponse, D> for (T0,)
11205    {
11206        #[inline]
11207        unsafe fn encode(
11208            self,
11209            encoder: &mut fidl::encoding::Encoder<'_, D>,
11210            offset: usize,
11211            depth: fidl::encoding::Depth,
11212        ) -> fidl::Result<()> {
11213            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexResponse>(offset);
11214            // Zero out padding regions. There's no need to apply masks
11215            // because the unmasked parts will be overwritten by fields.
11216            // Write the fields.
11217            self.0.encode(encoder, offset + 0, depth)?;
11218            Ok(())
11219        }
11220    }
11221
11222    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11223        for ProviderInterfaceNameToIndexResponse
11224    {
11225        #[inline(always)]
11226        fn new_empty() -> Self {
11227            Self { index: fidl::new_empty!(u64, D) }
11228        }
11229
11230        #[inline]
11231        unsafe fn decode(
11232            &mut self,
11233            decoder: &mut fidl::encoding::Decoder<'_, D>,
11234            offset: usize,
11235            _depth: fidl::encoding::Depth,
11236        ) -> fidl::Result<()> {
11237            decoder.debug_check_bounds::<Self>(offset);
11238            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11239            // Verify that padding bytes are zero.
11240            // Copy from the buffer into the object.
11241            unsafe {
11242                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11243            }
11244            Ok(())
11245        }
11246    }
11247
11248    impl fidl::encoding::ValueTypeMarker for StreamSocketAcceptRequest {
11249        type Borrowed<'a> = &'a Self;
11250        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11251            value
11252        }
11253    }
11254
11255    unsafe impl fidl::encoding::TypeMarker for StreamSocketAcceptRequest {
11256        type Owned = Self;
11257
11258        #[inline(always)]
11259        fn inline_align(_context: fidl::encoding::Context) -> usize {
11260            1
11261        }
11262
11263        #[inline(always)]
11264        fn inline_size(_context: fidl::encoding::Context) -> usize {
11265            1
11266        }
11267    }
11268
11269    unsafe impl<D: fidl::encoding::ResourceDialect>
11270        fidl::encoding::Encode<StreamSocketAcceptRequest, D> for &StreamSocketAcceptRequest
11271    {
11272        #[inline]
11273        unsafe fn encode(
11274            self,
11275            encoder: &mut fidl::encoding::Encoder<'_, D>,
11276            offset: usize,
11277            _depth: fidl::encoding::Depth,
11278        ) -> fidl::Result<()> {
11279            encoder.debug_check_bounds::<StreamSocketAcceptRequest>(offset);
11280            // Delegate to tuple encoding.
11281            fidl::encoding::Encode::<StreamSocketAcceptRequest, D>::encode(
11282                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_addr),),
11283                encoder,
11284                offset,
11285                _depth,
11286            )
11287        }
11288    }
11289    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11290        fidl::encoding::Encode<StreamSocketAcceptRequest, D> for (T0,)
11291    {
11292        #[inline]
11293        unsafe fn encode(
11294            self,
11295            encoder: &mut fidl::encoding::Encoder<'_, D>,
11296            offset: usize,
11297            depth: fidl::encoding::Depth,
11298        ) -> fidl::Result<()> {
11299            encoder.debug_check_bounds::<StreamSocketAcceptRequest>(offset);
11300            // Zero out padding regions. There's no need to apply masks
11301            // because the unmasked parts will be overwritten by fields.
11302            // Write the fields.
11303            self.0.encode(encoder, offset + 0, depth)?;
11304            Ok(())
11305        }
11306    }
11307
11308    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11309        for StreamSocketAcceptRequest
11310    {
11311        #[inline(always)]
11312        fn new_empty() -> Self {
11313            Self { want_addr: fidl::new_empty!(bool, D) }
11314        }
11315
11316        #[inline]
11317        unsafe fn decode(
11318            &mut self,
11319            decoder: &mut fidl::encoding::Decoder<'_, D>,
11320            offset: usize,
11321            _depth: fidl::encoding::Depth,
11322        ) -> fidl::Result<()> {
11323            decoder.debug_check_bounds::<Self>(offset);
11324            // Verify that padding bytes are zero.
11325            fidl::decode!(bool, D, &mut self.want_addr, decoder, offset + 0, _depth)?;
11326            Ok(())
11327        }
11328    }
11329
11330    impl fidl::encoding::ValueTypeMarker for StreamSocketListenRequest {
11331        type Borrowed<'a> = &'a Self;
11332        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11333            value
11334        }
11335    }
11336
11337    unsafe impl fidl::encoding::TypeMarker for StreamSocketListenRequest {
11338        type Owned = Self;
11339
11340        #[inline(always)]
11341        fn inline_align(_context: fidl::encoding::Context) -> usize {
11342            2
11343        }
11344
11345        #[inline(always)]
11346        fn inline_size(_context: fidl::encoding::Context) -> usize {
11347            2
11348        }
11349        #[inline(always)]
11350        fn encode_is_copy() -> bool {
11351            true
11352        }
11353
11354        #[inline(always)]
11355        fn decode_is_copy() -> bool {
11356            true
11357        }
11358    }
11359
11360    unsafe impl<D: fidl::encoding::ResourceDialect>
11361        fidl::encoding::Encode<StreamSocketListenRequest, D> for &StreamSocketListenRequest
11362    {
11363        #[inline]
11364        unsafe fn encode(
11365            self,
11366            encoder: &mut fidl::encoding::Encoder<'_, D>,
11367            offset: usize,
11368            _depth: fidl::encoding::Depth,
11369        ) -> fidl::Result<()> {
11370            encoder.debug_check_bounds::<StreamSocketListenRequest>(offset);
11371            unsafe {
11372                // Copy the object into the buffer.
11373                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11374                (buf_ptr as *mut StreamSocketListenRequest)
11375                    .write_unaligned((self as *const StreamSocketListenRequest).read());
11376                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11377                // done second because the memcpy will write garbage to these bytes.
11378            }
11379            Ok(())
11380        }
11381    }
11382    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
11383        fidl::encoding::Encode<StreamSocketListenRequest, D> for (T0,)
11384    {
11385        #[inline]
11386        unsafe fn encode(
11387            self,
11388            encoder: &mut fidl::encoding::Encoder<'_, D>,
11389            offset: usize,
11390            depth: fidl::encoding::Depth,
11391        ) -> fidl::Result<()> {
11392            encoder.debug_check_bounds::<StreamSocketListenRequest>(offset);
11393            // Zero out padding regions. There's no need to apply masks
11394            // because the unmasked parts will be overwritten by fields.
11395            // Write the fields.
11396            self.0.encode(encoder, offset + 0, depth)?;
11397            Ok(())
11398        }
11399    }
11400
11401    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11402        for StreamSocketListenRequest
11403    {
11404        #[inline(always)]
11405        fn new_empty() -> Self {
11406            Self { backlog: fidl::new_empty!(i16, D) }
11407        }
11408
11409        #[inline]
11410        unsafe fn decode(
11411            &mut self,
11412            decoder: &mut fidl::encoding::Decoder<'_, D>,
11413            offset: usize,
11414            _depth: fidl::encoding::Depth,
11415        ) -> fidl::Result<()> {
11416            decoder.debug_check_bounds::<Self>(offset);
11417            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11418            // Verify that padding bytes are zero.
11419            // Copy from the buffer into the object.
11420            unsafe {
11421                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
11422            }
11423            Ok(())
11424        }
11425    }
11426
11427    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpCongestionRequest {
11428        type Borrowed<'a> = &'a Self;
11429        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11430            value
11431        }
11432    }
11433
11434    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpCongestionRequest {
11435        type Owned = Self;
11436
11437        #[inline(always)]
11438        fn inline_align(_context: fidl::encoding::Context) -> usize {
11439            4
11440        }
11441
11442        #[inline(always)]
11443        fn inline_size(_context: fidl::encoding::Context) -> usize {
11444            4
11445        }
11446    }
11447
11448    unsafe impl<D: fidl::encoding::ResourceDialect>
11449        fidl::encoding::Encode<StreamSocketSetTcpCongestionRequest, D>
11450        for &StreamSocketSetTcpCongestionRequest
11451    {
11452        #[inline]
11453        unsafe fn encode(
11454            self,
11455            encoder: &mut fidl::encoding::Encoder<'_, D>,
11456            offset: usize,
11457            _depth: fidl::encoding::Depth,
11458        ) -> fidl::Result<()> {
11459            encoder.debug_check_bounds::<StreamSocketSetTcpCongestionRequest>(offset);
11460            // Delegate to tuple encoding.
11461            fidl::encoding::Encode::<StreamSocketSetTcpCongestionRequest, D>::encode(
11462                (<TcpCongestionControl as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
11463                encoder,
11464                offset,
11465                _depth,
11466            )
11467        }
11468    }
11469    unsafe impl<
11470        D: fidl::encoding::ResourceDialect,
11471        T0: fidl::encoding::Encode<TcpCongestionControl, D>,
11472    > fidl::encoding::Encode<StreamSocketSetTcpCongestionRequest, D> for (T0,)
11473    {
11474        #[inline]
11475        unsafe fn encode(
11476            self,
11477            encoder: &mut fidl::encoding::Encoder<'_, D>,
11478            offset: usize,
11479            depth: fidl::encoding::Depth,
11480        ) -> fidl::Result<()> {
11481            encoder.debug_check_bounds::<StreamSocketSetTcpCongestionRequest>(offset);
11482            // Zero out padding regions. There's no need to apply masks
11483            // because the unmasked parts will be overwritten by fields.
11484            // Write the fields.
11485            self.0.encode(encoder, offset + 0, depth)?;
11486            Ok(())
11487        }
11488    }
11489
11490    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11491        for StreamSocketSetTcpCongestionRequest
11492    {
11493        #[inline(always)]
11494        fn new_empty() -> Self {
11495            Self { value: fidl::new_empty!(TcpCongestionControl, D) }
11496        }
11497
11498        #[inline]
11499        unsafe fn decode(
11500            &mut self,
11501            decoder: &mut fidl::encoding::Decoder<'_, D>,
11502            offset: usize,
11503            _depth: fidl::encoding::Depth,
11504        ) -> fidl::Result<()> {
11505            decoder.debug_check_bounds::<Self>(offset);
11506            // Verify that padding bytes are zero.
11507            fidl::decode!(TcpCongestionControl, D, &mut self.value, decoder, offset + 0, _depth)?;
11508            Ok(())
11509        }
11510    }
11511
11512    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpCorkRequest {
11513        type Borrowed<'a> = &'a Self;
11514        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11515            value
11516        }
11517    }
11518
11519    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpCorkRequest {
11520        type Owned = Self;
11521
11522        #[inline(always)]
11523        fn inline_align(_context: fidl::encoding::Context) -> usize {
11524            1
11525        }
11526
11527        #[inline(always)]
11528        fn inline_size(_context: fidl::encoding::Context) -> usize {
11529            1
11530        }
11531    }
11532
11533    unsafe impl<D: fidl::encoding::ResourceDialect>
11534        fidl::encoding::Encode<StreamSocketSetTcpCorkRequest, D>
11535        for &StreamSocketSetTcpCorkRequest
11536    {
11537        #[inline]
11538        unsafe fn encode(
11539            self,
11540            encoder: &mut fidl::encoding::Encoder<'_, D>,
11541            offset: usize,
11542            _depth: fidl::encoding::Depth,
11543        ) -> fidl::Result<()> {
11544            encoder.debug_check_bounds::<StreamSocketSetTcpCorkRequest>(offset);
11545            // Delegate to tuple encoding.
11546            fidl::encoding::Encode::<StreamSocketSetTcpCorkRequest, D>::encode(
11547                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
11548                encoder,
11549                offset,
11550                _depth,
11551            )
11552        }
11553    }
11554    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11555        fidl::encoding::Encode<StreamSocketSetTcpCorkRequest, D> for (T0,)
11556    {
11557        #[inline]
11558        unsafe fn encode(
11559            self,
11560            encoder: &mut fidl::encoding::Encoder<'_, D>,
11561            offset: usize,
11562            depth: fidl::encoding::Depth,
11563        ) -> fidl::Result<()> {
11564            encoder.debug_check_bounds::<StreamSocketSetTcpCorkRequest>(offset);
11565            // Zero out padding regions. There's no need to apply masks
11566            // because the unmasked parts will be overwritten by fields.
11567            // Write the fields.
11568            self.0.encode(encoder, offset + 0, depth)?;
11569            Ok(())
11570        }
11571    }
11572
11573    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11574        for StreamSocketSetTcpCorkRequest
11575    {
11576        #[inline(always)]
11577        fn new_empty() -> Self {
11578            Self { value: fidl::new_empty!(bool, D) }
11579        }
11580
11581        #[inline]
11582        unsafe fn decode(
11583            &mut self,
11584            decoder: &mut fidl::encoding::Decoder<'_, D>,
11585            offset: usize,
11586            _depth: fidl::encoding::Depth,
11587        ) -> fidl::Result<()> {
11588            decoder.debug_check_bounds::<Self>(offset);
11589            // Verify that padding bytes are zero.
11590            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
11591            Ok(())
11592        }
11593    }
11594
11595    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpDeferAcceptRequest {
11596        type Borrowed<'a> = &'a Self;
11597        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11598            value
11599        }
11600    }
11601
11602    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpDeferAcceptRequest {
11603        type Owned = Self;
11604
11605        #[inline(always)]
11606        fn inline_align(_context: fidl::encoding::Context) -> usize {
11607            4
11608        }
11609
11610        #[inline(always)]
11611        fn inline_size(_context: fidl::encoding::Context) -> usize {
11612            4
11613        }
11614        #[inline(always)]
11615        fn encode_is_copy() -> bool {
11616            true
11617        }
11618
11619        #[inline(always)]
11620        fn decode_is_copy() -> bool {
11621            true
11622        }
11623    }
11624
11625    unsafe impl<D: fidl::encoding::ResourceDialect>
11626        fidl::encoding::Encode<StreamSocketSetTcpDeferAcceptRequest, D>
11627        for &StreamSocketSetTcpDeferAcceptRequest
11628    {
11629        #[inline]
11630        unsafe fn encode(
11631            self,
11632            encoder: &mut fidl::encoding::Encoder<'_, D>,
11633            offset: usize,
11634            _depth: fidl::encoding::Depth,
11635        ) -> fidl::Result<()> {
11636            encoder.debug_check_bounds::<StreamSocketSetTcpDeferAcceptRequest>(offset);
11637            unsafe {
11638                // Copy the object into the buffer.
11639                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11640                (buf_ptr as *mut StreamSocketSetTcpDeferAcceptRequest)
11641                    .write_unaligned((self as *const StreamSocketSetTcpDeferAcceptRequest).read());
11642                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11643                // done second because the memcpy will write garbage to these bytes.
11644            }
11645            Ok(())
11646        }
11647    }
11648    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11649        fidl::encoding::Encode<StreamSocketSetTcpDeferAcceptRequest, D> for (T0,)
11650    {
11651        #[inline]
11652        unsafe fn encode(
11653            self,
11654            encoder: &mut fidl::encoding::Encoder<'_, D>,
11655            offset: usize,
11656            depth: fidl::encoding::Depth,
11657        ) -> fidl::Result<()> {
11658            encoder.debug_check_bounds::<StreamSocketSetTcpDeferAcceptRequest>(offset);
11659            // Zero out padding regions. There's no need to apply masks
11660            // because the unmasked parts will be overwritten by fields.
11661            // Write the fields.
11662            self.0.encode(encoder, offset + 0, depth)?;
11663            Ok(())
11664        }
11665    }
11666
11667    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11668        for StreamSocketSetTcpDeferAcceptRequest
11669    {
11670        #[inline(always)]
11671        fn new_empty() -> Self {
11672            Self { value_secs: fidl::new_empty!(u32, D) }
11673        }
11674
11675        #[inline]
11676        unsafe fn decode(
11677            &mut self,
11678            decoder: &mut fidl::encoding::Decoder<'_, D>,
11679            offset: usize,
11680            _depth: fidl::encoding::Depth,
11681        ) -> fidl::Result<()> {
11682            decoder.debug_check_bounds::<Self>(offset);
11683            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11684            // Verify that padding bytes are zero.
11685            // Copy from the buffer into the object.
11686            unsafe {
11687                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11688            }
11689            Ok(())
11690        }
11691    }
11692
11693    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveCountRequest {
11694        type Borrowed<'a> = &'a Self;
11695        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11696            value
11697        }
11698    }
11699
11700    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveCountRequest {
11701        type Owned = Self;
11702
11703        #[inline(always)]
11704        fn inline_align(_context: fidl::encoding::Context) -> usize {
11705            4
11706        }
11707
11708        #[inline(always)]
11709        fn inline_size(_context: fidl::encoding::Context) -> usize {
11710            4
11711        }
11712        #[inline(always)]
11713        fn encode_is_copy() -> bool {
11714            true
11715        }
11716
11717        #[inline(always)]
11718        fn decode_is_copy() -> bool {
11719            true
11720        }
11721    }
11722
11723    unsafe impl<D: fidl::encoding::ResourceDialect>
11724        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveCountRequest, D>
11725        for &StreamSocketSetTcpKeepAliveCountRequest
11726    {
11727        #[inline]
11728        unsafe fn encode(
11729            self,
11730            encoder: &mut fidl::encoding::Encoder<'_, D>,
11731            offset: usize,
11732            _depth: fidl::encoding::Depth,
11733        ) -> fidl::Result<()> {
11734            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveCountRequest>(offset);
11735            unsafe {
11736                // Copy the object into the buffer.
11737                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11738                (buf_ptr as *mut StreamSocketSetTcpKeepAliveCountRequest).write_unaligned(
11739                    (self as *const StreamSocketSetTcpKeepAliveCountRequest).read(),
11740                );
11741                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11742                // done second because the memcpy will write garbage to these bytes.
11743            }
11744            Ok(())
11745        }
11746    }
11747    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11748        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveCountRequest, D> for (T0,)
11749    {
11750        #[inline]
11751        unsafe fn encode(
11752            self,
11753            encoder: &mut fidl::encoding::Encoder<'_, D>,
11754            offset: usize,
11755            depth: fidl::encoding::Depth,
11756        ) -> fidl::Result<()> {
11757            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveCountRequest>(offset);
11758            // Zero out padding regions. There's no need to apply masks
11759            // because the unmasked parts will be overwritten by fields.
11760            // Write the fields.
11761            self.0.encode(encoder, offset + 0, depth)?;
11762            Ok(())
11763        }
11764    }
11765
11766    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11767        for StreamSocketSetTcpKeepAliveCountRequest
11768    {
11769        #[inline(always)]
11770        fn new_empty() -> Self {
11771            Self { value: fidl::new_empty!(u32, D) }
11772        }
11773
11774        #[inline]
11775        unsafe fn decode(
11776            &mut self,
11777            decoder: &mut fidl::encoding::Decoder<'_, D>,
11778            offset: usize,
11779            _depth: fidl::encoding::Depth,
11780        ) -> fidl::Result<()> {
11781            decoder.debug_check_bounds::<Self>(offset);
11782            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11783            // Verify that padding bytes are zero.
11784            // Copy from the buffer into the object.
11785            unsafe {
11786                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11787            }
11788            Ok(())
11789        }
11790    }
11791
11792    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveIdleRequest {
11793        type Borrowed<'a> = &'a Self;
11794        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11795            value
11796        }
11797    }
11798
11799    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveIdleRequest {
11800        type Owned = Self;
11801
11802        #[inline(always)]
11803        fn inline_align(_context: fidl::encoding::Context) -> usize {
11804            4
11805        }
11806
11807        #[inline(always)]
11808        fn inline_size(_context: fidl::encoding::Context) -> usize {
11809            4
11810        }
11811        #[inline(always)]
11812        fn encode_is_copy() -> bool {
11813            true
11814        }
11815
11816        #[inline(always)]
11817        fn decode_is_copy() -> bool {
11818            true
11819        }
11820    }
11821
11822    unsafe impl<D: fidl::encoding::ResourceDialect>
11823        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIdleRequest, D>
11824        for &StreamSocketSetTcpKeepAliveIdleRequest
11825    {
11826        #[inline]
11827        unsafe fn encode(
11828            self,
11829            encoder: &mut fidl::encoding::Encoder<'_, D>,
11830            offset: usize,
11831            _depth: fidl::encoding::Depth,
11832        ) -> fidl::Result<()> {
11833            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIdleRequest>(offset);
11834            unsafe {
11835                // Copy the object into the buffer.
11836                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11837                (buf_ptr as *mut StreamSocketSetTcpKeepAliveIdleRequest).write_unaligned(
11838                    (self as *const StreamSocketSetTcpKeepAliveIdleRequest).read(),
11839                );
11840                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11841                // done second because the memcpy will write garbage to these bytes.
11842            }
11843            Ok(())
11844        }
11845    }
11846    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11847        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIdleRequest, D> for (T0,)
11848    {
11849        #[inline]
11850        unsafe fn encode(
11851            self,
11852            encoder: &mut fidl::encoding::Encoder<'_, D>,
11853            offset: usize,
11854            depth: fidl::encoding::Depth,
11855        ) -> fidl::Result<()> {
11856            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIdleRequest>(offset);
11857            // Zero out padding regions. There's no need to apply masks
11858            // because the unmasked parts will be overwritten by fields.
11859            // Write the fields.
11860            self.0.encode(encoder, offset + 0, depth)?;
11861            Ok(())
11862        }
11863    }
11864
11865    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11866        for StreamSocketSetTcpKeepAliveIdleRequest
11867    {
11868        #[inline(always)]
11869        fn new_empty() -> Self {
11870            Self { value_secs: fidl::new_empty!(u32, D) }
11871        }
11872
11873        #[inline]
11874        unsafe fn decode(
11875            &mut self,
11876            decoder: &mut fidl::encoding::Decoder<'_, D>,
11877            offset: usize,
11878            _depth: fidl::encoding::Depth,
11879        ) -> fidl::Result<()> {
11880            decoder.debug_check_bounds::<Self>(offset);
11881            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11882            // Verify that padding bytes are zero.
11883            // Copy from the buffer into the object.
11884            unsafe {
11885                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11886            }
11887            Ok(())
11888        }
11889    }
11890
11891    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveIntervalRequest {
11892        type Borrowed<'a> = &'a Self;
11893        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11894            value
11895        }
11896    }
11897
11898    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveIntervalRequest {
11899        type Owned = Self;
11900
11901        #[inline(always)]
11902        fn inline_align(_context: fidl::encoding::Context) -> usize {
11903            4
11904        }
11905
11906        #[inline(always)]
11907        fn inline_size(_context: fidl::encoding::Context) -> usize {
11908            4
11909        }
11910        #[inline(always)]
11911        fn encode_is_copy() -> bool {
11912            true
11913        }
11914
11915        #[inline(always)]
11916        fn decode_is_copy() -> bool {
11917            true
11918        }
11919    }
11920
11921    unsafe impl<D: fidl::encoding::ResourceDialect>
11922        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIntervalRequest, D>
11923        for &StreamSocketSetTcpKeepAliveIntervalRequest
11924    {
11925        #[inline]
11926        unsafe fn encode(
11927            self,
11928            encoder: &mut fidl::encoding::Encoder<'_, D>,
11929            offset: usize,
11930            _depth: fidl::encoding::Depth,
11931        ) -> fidl::Result<()> {
11932            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIntervalRequest>(offset);
11933            unsafe {
11934                // Copy the object into the buffer.
11935                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11936                (buf_ptr as *mut StreamSocketSetTcpKeepAliveIntervalRequest).write_unaligned(
11937                    (self as *const StreamSocketSetTcpKeepAliveIntervalRequest).read(),
11938                );
11939                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11940                // done second because the memcpy will write garbage to these bytes.
11941            }
11942            Ok(())
11943        }
11944    }
11945    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11946        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIntervalRequest, D> for (T0,)
11947    {
11948        #[inline]
11949        unsafe fn encode(
11950            self,
11951            encoder: &mut fidl::encoding::Encoder<'_, D>,
11952            offset: usize,
11953            depth: fidl::encoding::Depth,
11954        ) -> fidl::Result<()> {
11955            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIntervalRequest>(offset);
11956            // Zero out padding regions. There's no need to apply masks
11957            // because the unmasked parts will be overwritten by fields.
11958            // Write the fields.
11959            self.0.encode(encoder, offset + 0, depth)?;
11960            Ok(())
11961        }
11962    }
11963
11964    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11965        for StreamSocketSetTcpKeepAliveIntervalRequest
11966    {
11967        #[inline(always)]
11968        fn new_empty() -> Self {
11969            Self { value_secs: fidl::new_empty!(u32, D) }
11970        }
11971
11972        #[inline]
11973        unsafe fn decode(
11974            &mut self,
11975            decoder: &mut fidl::encoding::Decoder<'_, D>,
11976            offset: usize,
11977            _depth: fidl::encoding::Depth,
11978        ) -> fidl::Result<()> {
11979            decoder.debug_check_bounds::<Self>(offset);
11980            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11981            // Verify that padding bytes are zero.
11982            // Copy from the buffer into the object.
11983            unsafe {
11984                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11985            }
11986            Ok(())
11987        }
11988    }
11989
11990    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpLingerRequest {
11991        type Borrowed<'a> = &'a Self;
11992        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11993            value
11994        }
11995    }
11996
11997    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpLingerRequest {
11998        type Owned = Self;
11999
12000        #[inline(always)]
12001        fn inline_align(_context: fidl::encoding::Context) -> usize {
12002            8
12003        }
12004
12005        #[inline(always)]
12006        fn inline_size(_context: fidl::encoding::Context) -> usize {
12007            16
12008        }
12009    }
12010
12011    unsafe impl<D: fidl::encoding::ResourceDialect>
12012        fidl::encoding::Encode<StreamSocketSetTcpLingerRequest, D>
12013        for &StreamSocketSetTcpLingerRequest
12014    {
12015        #[inline]
12016        unsafe fn encode(
12017            self,
12018            encoder: &mut fidl::encoding::Encoder<'_, D>,
12019            offset: usize,
12020            _depth: fidl::encoding::Depth,
12021        ) -> fidl::Result<()> {
12022            encoder.debug_check_bounds::<StreamSocketSetTcpLingerRequest>(offset);
12023            // Delegate to tuple encoding.
12024            fidl::encoding::Encode::<StreamSocketSetTcpLingerRequest, D>::encode(
12025                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value_secs),),
12026                encoder,
12027                offset,
12028                _depth,
12029            )
12030        }
12031    }
12032    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
12033        fidl::encoding::Encode<StreamSocketSetTcpLingerRequest, D> for (T0,)
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::<StreamSocketSetTcpLingerRequest>(offset);
12043            // Zero out padding regions. There's no need to apply masks
12044            // because the unmasked parts will be overwritten by fields.
12045            // Write the fields.
12046            self.0.encode(encoder, offset + 0, depth)?;
12047            Ok(())
12048        }
12049    }
12050
12051    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12052        for StreamSocketSetTcpLingerRequest
12053    {
12054        #[inline(always)]
12055        fn new_empty() -> Self {
12056            Self { value_secs: fidl::new_empty!(OptionalUint32, D) }
12057        }
12058
12059        #[inline]
12060        unsafe fn decode(
12061            &mut self,
12062            decoder: &mut fidl::encoding::Decoder<'_, D>,
12063            offset: usize,
12064            _depth: fidl::encoding::Depth,
12065        ) -> fidl::Result<()> {
12066            decoder.debug_check_bounds::<Self>(offset);
12067            // Verify that padding bytes are zero.
12068            fidl::decode!(OptionalUint32, D, &mut self.value_secs, decoder, offset + 0, _depth)?;
12069            Ok(())
12070        }
12071    }
12072
12073    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpMaxSegmentRequest {
12074        type Borrowed<'a> = &'a Self;
12075        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12076            value
12077        }
12078    }
12079
12080    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpMaxSegmentRequest {
12081        type Owned = Self;
12082
12083        #[inline(always)]
12084        fn inline_align(_context: fidl::encoding::Context) -> usize {
12085            4
12086        }
12087
12088        #[inline(always)]
12089        fn inline_size(_context: fidl::encoding::Context) -> usize {
12090            4
12091        }
12092        #[inline(always)]
12093        fn encode_is_copy() -> bool {
12094            true
12095        }
12096
12097        #[inline(always)]
12098        fn decode_is_copy() -> bool {
12099            true
12100        }
12101    }
12102
12103    unsafe impl<D: fidl::encoding::ResourceDialect>
12104        fidl::encoding::Encode<StreamSocketSetTcpMaxSegmentRequest, D>
12105        for &StreamSocketSetTcpMaxSegmentRequest
12106    {
12107        #[inline]
12108        unsafe fn encode(
12109            self,
12110            encoder: &mut fidl::encoding::Encoder<'_, D>,
12111            offset: usize,
12112            _depth: fidl::encoding::Depth,
12113        ) -> fidl::Result<()> {
12114            encoder.debug_check_bounds::<StreamSocketSetTcpMaxSegmentRequest>(offset);
12115            unsafe {
12116                // Copy the object into the buffer.
12117                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12118                (buf_ptr as *mut StreamSocketSetTcpMaxSegmentRequest)
12119                    .write_unaligned((self as *const StreamSocketSetTcpMaxSegmentRequest).read());
12120                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12121                // done second because the memcpy will write garbage to these bytes.
12122            }
12123            Ok(())
12124        }
12125    }
12126    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12127        fidl::encoding::Encode<StreamSocketSetTcpMaxSegmentRequest, D> for (T0,)
12128    {
12129        #[inline]
12130        unsafe fn encode(
12131            self,
12132            encoder: &mut fidl::encoding::Encoder<'_, D>,
12133            offset: usize,
12134            depth: fidl::encoding::Depth,
12135        ) -> fidl::Result<()> {
12136            encoder.debug_check_bounds::<StreamSocketSetTcpMaxSegmentRequest>(offset);
12137            // Zero out padding regions. There's no need to apply masks
12138            // because the unmasked parts will be overwritten by fields.
12139            // Write the fields.
12140            self.0.encode(encoder, offset + 0, depth)?;
12141            Ok(())
12142        }
12143    }
12144
12145    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12146        for StreamSocketSetTcpMaxSegmentRequest
12147    {
12148        #[inline(always)]
12149        fn new_empty() -> Self {
12150            Self { value_bytes: fidl::new_empty!(u32, D) }
12151        }
12152
12153        #[inline]
12154        unsafe fn decode(
12155            &mut self,
12156            decoder: &mut fidl::encoding::Decoder<'_, D>,
12157            offset: usize,
12158            _depth: fidl::encoding::Depth,
12159        ) -> fidl::Result<()> {
12160            decoder.debug_check_bounds::<Self>(offset);
12161            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12162            // Verify that padding bytes are zero.
12163            // Copy from the buffer into the object.
12164            unsafe {
12165                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12166            }
12167            Ok(())
12168        }
12169    }
12170
12171    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpNoDelayRequest {
12172        type Borrowed<'a> = &'a Self;
12173        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12174            value
12175        }
12176    }
12177
12178    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpNoDelayRequest {
12179        type Owned = Self;
12180
12181        #[inline(always)]
12182        fn inline_align(_context: fidl::encoding::Context) -> usize {
12183            1
12184        }
12185
12186        #[inline(always)]
12187        fn inline_size(_context: fidl::encoding::Context) -> usize {
12188            1
12189        }
12190    }
12191
12192    unsafe impl<D: fidl::encoding::ResourceDialect>
12193        fidl::encoding::Encode<StreamSocketSetTcpNoDelayRequest, D>
12194        for &StreamSocketSetTcpNoDelayRequest
12195    {
12196        #[inline]
12197        unsafe fn encode(
12198            self,
12199            encoder: &mut fidl::encoding::Encoder<'_, D>,
12200            offset: usize,
12201            _depth: fidl::encoding::Depth,
12202        ) -> fidl::Result<()> {
12203            encoder.debug_check_bounds::<StreamSocketSetTcpNoDelayRequest>(offset);
12204            // Delegate to tuple encoding.
12205            fidl::encoding::Encode::<StreamSocketSetTcpNoDelayRequest, D>::encode(
12206                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12207                encoder,
12208                offset,
12209                _depth,
12210            )
12211        }
12212    }
12213    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12214        fidl::encoding::Encode<StreamSocketSetTcpNoDelayRequest, D> for (T0,)
12215    {
12216        #[inline]
12217        unsafe fn encode(
12218            self,
12219            encoder: &mut fidl::encoding::Encoder<'_, D>,
12220            offset: usize,
12221            depth: fidl::encoding::Depth,
12222        ) -> fidl::Result<()> {
12223            encoder.debug_check_bounds::<StreamSocketSetTcpNoDelayRequest>(offset);
12224            // Zero out padding regions. There's no need to apply masks
12225            // because the unmasked parts will be overwritten by fields.
12226            // Write the fields.
12227            self.0.encode(encoder, offset + 0, depth)?;
12228            Ok(())
12229        }
12230    }
12231
12232    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12233        for StreamSocketSetTcpNoDelayRequest
12234    {
12235        #[inline(always)]
12236        fn new_empty() -> Self {
12237            Self { value: fidl::new_empty!(bool, D) }
12238        }
12239
12240        #[inline]
12241        unsafe fn decode(
12242            &mut self,
12243            decoder: &mut fidl::encoding::Decoder<'_, D>,
12244            offset: usize,
12245            _depth: fidl::encoding::Depth,
12246        ) -> fidl::Result<()> {
12247            decoder.debug_check_bounds::<Self>(offset);
12248            // Verify that padding bytes are zero.
12249            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12250            Ok(())
12251        }
12252    }
12253
12254    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpQuickAckRequest {
12255        type Borrowed<'a> = &'a Self;
12256        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12257            value
12258        }
12259    }
12260
12261    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpQuickAckRequest {
12262        type Owned = Self;
12263
12264        #[inline(always)]
12265        fn inline_align(_context: fidl::encoding::Context) -> usize {
12266            1
12267        }
12268
12269        #[inline(always)]
12270        fn inline_size(_context: fidl::encoding::Context) -> usize {
12271            1
12272        }
12273    }
12274
12275    unsafe impl<D: fidl::encoding::ResourceDialect>
12276        fidl::encoding::Encode<StreamSocketSetTcpQuickAckRequest, D>
12277        for &StreamSocketSetTcpQuickAckRequest
12278    {
12279        #[inline]
12280        unsafe fn encode(
12281            self,
12282            encoder: &mut fidl::encoding::Encoder<'_, D>,
12283            offset: usize,
12284            _depth: fidl::encoding::Depth,
12285        ) -> fidl::Result<()> {
12286            encoder.debug_check_bounds::<StreamSocketSetTcpQuickAckRequest>(offset);
12287            // Delegate to tuple encoding.
12288            fidl::encoding::Encode::<StreamSocketSetTcpQuickAckRequest, D>::encode(
12289                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12290                encoder,
12291                offset,
12292                _depth,
12293            )
12294        }
12295    }
12296    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12297        fidl::encoding::Encode<StreamSocketSetTcpQuickAckRequest, D> for (T0,)
12298    {
12299        #[inline]
12300        unsafe fn encode(
12301            self,
12302            encoder: &mut fidl::encoding::Encoder<'_, D>,
12303            offset: usize,
12304            depth: fidl::encoding::Depth,
12305        ) -> fidl::Result<()> {
12306            encoder.debug_check_bounds::<StreamSocketSetTcpQuickAckRequest>(offset);
12307            // Zero out padding regions. There's no need to apply masks
12308            // because the unmasked parts will be overwritten by fields.
12309            // Write the fields.
12310            self.0.encode(encoder, offset + 0, depth)?;
12311            Ok(())
12312        }
12313    }
12314
12315    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12316        for StreamSocketSetTcpQuickAckRequest
12317    {
12318        #[inline(always)]
12319        fn new_empty() -> Self {
12320            Self { value: fidl::new_empty!(bool, D) }
12321        }
12322
12323        #[inline]
12324        unsafe fn decode(
12325            &mut self,
12326            decoder: &mut fidl::encoding::Decoder<'_, D>,
12327            offset: usize,
12328            _depth: fidl::encoding::Depth,
12329        ) -> fidl::Result<()> {
12330            decoder.debug_check_bounds::<Self>(offset);
12331            // Verify that padding bytes are zero.
12332            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12333            Ok(())
12334        }
12335    }
12336
12337    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpSynCountRequest {
12338        type Borrowed<'a> = &'a Self;
12339        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12340            value
12341        }
12342    }
12343
12344    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpSynCountRequest {
12345        type Owned = Self;
12346
12347        #[inline(always)]
12348        fn inline_align(_context: fidl::encoding::Context) -> usize {
12349            4
12350        }
12351
12352        #[inline(always)]
12353        fn inline_size(_context: fidl::encoding::Context) -> usize {
12354            4
12355        }
12356        #[inline(always)]
12357        fn encode_is_copy() -> bool {
12358            true
12359        }
12360
12361        #[inline(always)]
12362        fn decode_is_copy() -> bool {
12363            true
12364        }
12365    }
12366
12367    unsafe impl<D: fidl::encoding::ResourceDialect>
12368        fidl::encoding::Encode<StreamSocketSetTcpSynCountRequest, D>
12369        for &StreamSocketSetTcpSynCountRequest
12370    {
12371        #[inline]
12372        unsafe fn encode(
12373            self,
12374            encoder: &mut fidl::encoding::Encoder<'_, D>,
12375            offset: usize,
12376            _depth: fidl::encoding::Depth,
12377        ) -> fidl::Result<()> {
12378            encoder.debug_check_bounds::<StreamSocketSetTcpSynCountRequest>(offset);
12379            unsafe {
12380                // Copy the object into the buffer.
12381                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12382                (buf_ptr as *mut StreamSocketSetTcpSynCountRequest)
12383                    .write_unaligned((self as *const StreamSocketSetTcpSynCountRequest).read());
12384                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12385                // done second because the memcpy will write garbage to these bytes.
12386            }
12387            Ok(())
12388        }
12389    }
12390    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12391        fidl::encoding::Encode<StreamSocketSetTcpSynCountRequest, D> for (T0,)
12392    {
12393        #[inline]
12394        unsafe fn encode(
12395            self,
12396            encoder: &mut fidl::encoding::Encoder<'_, D>,
12397            offset: usize,
12398            depth: fidl::encoding::Depth,
12399        ) -> fidl::Result<()> {
12400            encoder.debug_check_bounds::<StreamSocketSetTcpSynCountRequest>(offset);
12401            // Zero out padding regions. There's no need to apply masks
12402            // because the unmasked parts will be overwritten by fields.
12403            // Write the fields.
12404            self.0.encode(encoder, offset + 0, depth)?;
12405            Ok(())
12406        }
12407    }
12408
12409    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12410        for StreamSocketSetTcpSynCountRequest
12411    {
12412        #[inline(always)]
12413        fn new_empty() -> Self {
12414            Self { value: fidl::new_empty!(u32, D) }
12415        }
12416
12417        #[inline]
12418        unsafe fn decode(
12419            &mut self,
12420            decoder: &mut fidl::encoding::Decoder<'_, D>,
12421            offset: usize,
12422            _depth: fidl::encoding::Depth,
12423        ) -> fidl::Result<()> {
12424            decoder.debug_check_bounds::<Self>(offset);
12425            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12426            // Verify that padding bytes are zero.
12427            // Copy from the buffer into the object.
12428            unsafe {
12429                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12430            }
12431            Ok(())
12432        }
12433    }
12434
12435    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpUserTimeoutRequest {
12436        type Borrowed<'a> = &'a Self;
12437        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12438            value
12439        }
12440    }
12441
12442    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpUserTimeoutRequest {
12443        type Owned = Self;
12444
12445        #[inline(always)]
12446        fn inline_align(_context: fidl::encoding::Context) -> usize {
12447            4
12448        }
12449
12450        #[inline(always)]
12451        fn inline_size(_context: fidl::encoding::Context) -> usize {
12452            4
12453        }
12454        #[inline(always)]
12455        fn encode_is_copy() -> bool {
12456            true
12457        }
12458
12459        #[inline(always)]
12460        fn decode_is_copy() -> bool {
12461            true
12462        }
12463    }
12464
12465    unsafe impl<D: fidl::encoding::ResourceDialect>
12466        fidl::encoding::Encode<StreamSocketSetTcpUserTimeoutRequest, D>
12467        for &StreamSocketSetTcpUserTimeoutRequest
12468    {
12469        #[inline]
12470        unsafe fn encode(
12471            self,
12472            encoder: &mut fidl::encoding::Encoder<'_, D>,
12473            offset: usize,
12474            _depth: fidl::encoding::Depth,
12475        ) -> fidl::Result<()> {
12476            encoder.debug_check_bounds::<StreamSocketSetTcpUserTimeoutRequest>(offset);
12477            unsafe {
12478                // Copy the object into the buffer.
12479                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12480                (buf_ptr as *mut StreamSocketSetTcpUserTimeoutRequest)
12481                    .write_unaligned((self as *const StreamSocketSetTcpUserTimeoutRequest).read());
12482                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12483                // done second because the memcpy will write garbage to these bytes.
12484            }
12485            Ok(())
12486        }
12487    }
12488    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12489        fidl::encoding::Encode<StreamSocketSetTcpUserTimeoutRequest, D> for (T0,)
12490    {
12491        #[inline]
12492        unsafe fn encode(
12493            self,
12494            encoder: &mut fidl::encoding::Encoder<'_, D>,
12495            offset: usize,
12496            depth: fidl::encoding::Depth,
12497        ) -> fidl::Result<()> {
12498            encoder.debug_check_bounds::<StreamSocketSetTcpUserTimeoutRequest>(offset);
12499            // Zero out padding regions. There's no need to apply masks
12500            // because the unmasked parts will be overwritten by fields.
12501            // Write the fields.
12502            self.0.encode(encoder, offset + 0, depth)?;
12503            Ok(())
12504        }
12505    }
12506
12507    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12508        for StreamSocketSetTcpUserTimeoutRequest
12509    {
12510        #[inline(always)]
12511        fn new_empty() -> Self {
12512            Self { value_millis: fidl::new_empty!(u32, D) }
12513        }
12514
12515        #[inline]
12516        unsafe fn decode(
12517            &mut self,
12518            decoder: &mut fidl::encoding::Decoder<'_, D>,
12519            offset: usize,
12520            _depth: fidl::encoding::Depth,
12521        ) -> fidl::Result<()> {
12522            decoder.debug_check_bounds::<Self>(offset);
12523            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12524            // Verify that padding bytes are zero.
12525            // Copy from the buffer into the object.
12526            unsafe {
12527                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12528            }
12529            Ok(())
12530        }
12531    }
12532
12533    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpWindowClampRequest {
12534        type Borrowed<'a> = &'a Self;
12535        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12536            value
12537        }
12538    }
12539
12540    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpWindowClampRequest {
12541        type Owned = Self;
12542
12543        #[inline(always)]
12544        fn inline_align(_context: fidl::encoding::Context) -> usize {
12545            4
12546        }
12547
12548        #[inline(always)]
12549        fn inline_size(_context: fidl::encoding::Context) -> usize {
12550            4
12551        }
12552        #[inline(always)]
12553        fn encode_is_copy() -> bool {
12554            true
12555        }
12556
12557        #[inline(always)]
12558        fn decode_is_copy() -> bool {
12559            true
12560        }
12561    }
12562
12563    unsafe impl<D: fidl::encoding::ResourceDialect>
12564        fidl::encoding::Encode<StreamSocketSetTcpWindowClampRequest, D>
12565        for &StreamSocketSetTcpWindowClampRequest
12566    {
12567        #[inline]
12568        unsafe fn encode(
12569            self,
12570            encoder: &mut fidl::encoding::Encoder<'_, D>,
12571            offset: usize,
12572            _depth: fidl::encoding::Depth,
12573        ) -> fidl::Result<()> {
12574            encoder.debug_check_bounds::<StreamSocketSetTcpWindowClampRequest>(offset);
12575            unsafe {
12576                // Copy the object into the buffer.
12577                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12578                (buf_ptr as *mut StreamSocketSetTcpWindowClampRequest)
12579                    .write_unaligned((self as *const StreamSocketSetTcpWindowClampRequest).read());
12580                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12581                // done second because the memcpy will write garbage to these bytes.
12582            }
12583            Ok(())
12584        }
12585    }
12586    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12587        fidl::encoding::Encode<StreamSocketSetTcpWindowClampRequest, D> for (T0,)
12588    {
12589        #[inline]
12590        unsafe fn encode(
12591            self,
12592            encoder: &mut fidl::encoding::Encoder<'_, D>,
12593            offset: usize,
12594            depth: fidl::encoding::Depth,
12595        ) -> fidl::Result<()> {
12596            encoder.debug_check_bounds::<StreamSocketSetTcpWindowClampRequest>(offset);
12597            // Zero out padding regions. There's no need to apply masks
12598            // because the unmasked parts will be overwritten by fields.
12599            // Write the fields.
12600            self.0.encode(encoder, offset + 0, depth)?;
12601            Ok(())
12602        }
12603    }
12604
12605    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12606        for StreamSocketSetTcpWindowClampRequest
12607    {
12608        #[inline(always)]
12609        fn new_empty() -> Self {
12610            Self { value: fidl::new_empty!(u32, D) }
12611        }
12612
12613        #[inline]
12614        unsafe fn decode(
12615            &mut self,
12616            decoder: &mut fidl::encoding::Decoder<'_, D>,
12617            offset: usize,
12618            _depth: fidl::encoding::Depth,
12619        ) -> fidl::Result<()> {
12620            decoder.debug_check_bounds::<Self>(offset);
12621            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12622            // Verify that padding bytes are zero.
12623            // Copy from the buffer into the object.
12624            unsafe {
12625                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12626            }
12627            Ok(())
12628        }
12629    }
12630
12631    impl fidl::encoding::ValueTypeMarker for StreamSocketGetInfoResponse {
12632        type Borrowed<'a> = &'a Self;
12633        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12634            value
12635        }
12636    }
12637
12638    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetInfoResponse {
12639        type Owned = Self;
12640
12641        #[inline(always)]
12642        fn inline_align(_context: fidl::encoding::Context) -> usize {
12643            4
12644        }
12645
12646        #[inline(always)]
12647        fn inline_size(_context: fidl::encoding::Context) -> usize {
12648            8
12649        }
12650    }
12651
12652    unsafe impl<D: fidl::encoding::ResourceDialect>
12653        fidl::encoding::Encode<StreamSocketGetInfoResponse, D> for &StreamSocketGetInfoResponse
12654    {
12655        #[inline]
12656        unsafe fn encode(
12657            self,
12658            encoder: &mut fidl::encoding::Encoder<'_, D>,
12659            offset: usize,
12660            _depth: fidl::encoding::Depth,
12661        ) -> fidl::Result<()> {
12662            encoder.debug_check_bounds::<StreamSocketGetInfoResponse>(offset);
12663            // Delegate to tuple encoding.
12664            fidl::encoding::Encode::<StreamSocketGetInfoResponse, D>::encode(
12665                (
12666                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
12667                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
12668                ),
12669                encoder,
12670                offset,
12671                _depth,
12672            )
12673        }
12674    }
12675    unsafe impl<
12676        D: fidl::encoding::ResourceDialect,
12677        T0: fidl::encoding::Encode<Domain, D>,
12678        T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
12679    > fidl::encoding::Encode<StreamSocketGetInfoResponse, D> for (T0, T1)
12680    {
12681        #[inline]
12682        unsafe fn encode(
12683            self,
12684            encoder: &mut fidl::encoding::Encoder<'_, D>,
12685            offset: usize,
12686            depth: fidl::encoding::Depth,
12687        ) -> fidl::Result<()> {
12688            encoder.debug_check_bounds::<StreamSocketGetInfoResponse>(offset);
12689            // Zero out padding regions. There's no need to apply masks
12690            // because the unmasked parts will be overwritten by fields.
12691            unsafe {
12692                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
12693                (ptr as *mut u32).write_unaligned(0);
12694            }
12695            // Write the fields.
12696            self.0.encode(encoder, offset + 0, depth)?;
12697            self.1.encode(encoder, offset + 4, depth)?;
12698            Ok(())
12699        }
12700    }
12701
12702    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12703        for StreamSocketGetInfoResponse
12704    {
12705        #[inline(always)]
12706        fn new_empty() -> Self {
12707            Self {
12708                domain: fidl::new_empty!(Domain, D),
12709                proto: fidl::new_empty!(StreamSocketProtocol, D),
12710            }
12711        }
12712
12713        #[inline]
12714        unsafe fn decode(
12715            &mut self,
12716            decoder: &mut fidl::encoding::Decoder<'_, D>,
12717            offset: usize,
12718            _depth: fidl::encoding::Depth,
12719        ) -> fidl::Result<()> {
12720            decoder.debug_check_bounds::<Self>(offset);
12721            // Verify that padding bytes are zero.
12722            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
12723            let padval = unsafe { (ptr as *const u32).read_unaligned() };
12724            let mask = 0xffff0000u32;
12725            let maskedval = padval & mask;
12726            if maskedval != 0 {
12727                return Err(fidl::Error::NonZeroPadding {
12728                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
12729                });
12730            }
12731            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
12732            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
12733            Ok(())
12734        }
12735    }
12736
12737    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpCongestionResponse {
12738        type Borrowed<'a> = &'a Self;
12739        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12740            value
12741        }
12742    }
12743
12744    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpCongestionResponse {
12745        type Owned = Self;
12746
12747        #[inline(always)]
12748        fn inline_align(_context: fidl::encoding::Context) -> usize {
12749            4
12750        }
12751
12752        #[inline(always)]
12753        fn inline_size(_context: fidl::encoding::Context) -> usize {
12754            4
12755        }
12756    }
12757
12758    unsafe impl<D: fidl::encoding::ResourceDialect>
12759        fidl::encoding::Encode<StreamSocketGetTcpCongestionResponse, D>
12760        for &StreamSocketGetTcpCongestionResponse
12761    {
12762        #[inline]
12763        unsafe fn encode(
12764            self,
12765            encoder: &mut fidl::encoding::Encoder<'_, D>,
12766            offset: usize,
12767            _depth: fidl::encoding::Depth,
12768        ) -> fidl::Result<()> {
12769            encoder.debug_check_bounds::<StreamSocketGetTcpCongestionResponse>(offset);
12770            // Delegate to tuple encoding.
12771            fidl::encoding::Encode::<StreamSocketGetTcpCongestionResponse, D>::encode(
12772                (<TcpCongestionControl as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12773                encoder,
12774                offset,
12775                _depth,
12776            )
12777        }
12778    }
12779    unsafe impl<
12780        D: fidl::encoding::ResourceDialect,
12781        T0: fidl::encoding::Encode<TcpCongestionControl, D>,
12782    > fidl::encoding::Encode<StreamSocketGetTcpCongestionResponse, D> for (T0,)
12783    {
12784        #[inline]
12785        unsafe fn encode(
12786            self,
12787            encoder: &mut fidl::encoding::Encoder<'_, D>,
12788            offset: usize,
12789            depth: fidl::encoding::Depth,
12790        ) -> fidl::Result<()> {
12791            encoder.debug_check_bounds::<StreamSocketGetTcpCongestionResponse>(offset);
12792            // Zero out padding regions. There's no need to apply masks
12793            // because the unmasked parts will be overwritten by fields.
12794            // Write the fields.
12795            self.0.encode(encoder, offset + 0, depth)?;
12796            Ok(())
12797        }
12798    }
12799
12800    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12801        for StreamSocketGetTcpCongestionResponse
12802    {
12803        #[inline(always)]
12804        fn new_empty() -> Self {
12805            Self { value: fidl::new_empty!(TcpCongestionControl, D) }
12806        }
12807
12808        #[inline]
12809        unsafe fn decode(
12810            &mut self,
12811            decoder: &mut fidl::encoding::Decoder<'_, D>,
12812            offset: usize,
12813            _depth: fidl::encoding::Depth,
12814        ) -> fidl::Result<()> {
12815            decoder.debug_check_bounds::<Self>(offset);
12816            // Verify that padding bytes are zero.
12817            fidl::decode!(TcpCongestionControl, D, &mut self.value, decoder, offset + 0, _depth)?;
12818            Ok(())
12819        }
12820    }
12821
12822    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpCorkResponse {
12823        type Borrowed<'a> = &'a Self;
12824        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12825            value
12826        }
12827    }
12828
12829    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpCorkResponse {
12830        type Owned = Self;
12831
12832        #[inline(always)]
12833        fn inline_align(_context: fidl::encoding::Context) -> usize {
12834            1
12835        }
12836
12837        #[inline(always)]
12838        fn inline_size(_context: fidl::encoding::Context) -> usize {
12839            1
12840        }
12841    }
12842
12843    unsafe impl<D: fidl::encoding::ResourceDialect>
12844        fidl::encoding::Encode<StreamSocketGetTcpCorkResponse, D>
12845        for &StreamSocketGetTcpCorkResponse
12846    {
12847        #[inline]
12848        unsafe fn encode(
12849            self,
12850            encoder: &mut fidl::encoding::Encoder<'_, D>,
12851            offset: usize,
12852            _depth: fidl::encoding::Depth,
12853        ) -> fidl::Result<()> {
12854            encoder.debug_check_bounds::<StreamSocketGetTcpCorkResponse>(offset);
12855            // Delegate to tuple encoding.
12856            fidl::encoding::Encode::<StreamSocketGetTcpCorkResponse, D>::encode(
12857                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12858                encoder,
12859                offset,
12860                _depth,
12861            )
12862        }
12863    }
12864    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12865        fidl::encoding::Encode<StreamSocketGetTcpCorkResponse, D> for (T0,)
12866    {
12867        #[inline]
12868        unsafe fn encode(
12869            self,
12870            encoder: &mut fidl::encoding::Encoder<'_, D>,
12871            offset: usize,
12872            depth: fidl::encoding::Depth,
12873        ) -> fidl::Result<()> {
12874            encoder.debug_check_bounds::<StreamSocketGetTcpCorkResponse>(offset);
12875            // Zero out padding regions. There's no need to apply masks
12876            // because the unmasked parts will be overwritten by fields.
12877            // Write the fields.
12878            self.0.encode(encoder, offset + 0, depth)?;
12879            Ok(())
12880        }
12881    }
12882
12883    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12884        for StreamSocketGetTcpCorkResponse
12885    {
12886        #[inline(always)]
12887        fn new_empty() -> Self {
12888            Self { value: fidl::new_empty!(bool, D) }
12889        }
12890
12891        #[inline]
12892        unsafe fn decode(
12893            &mut self,
12894            decoder: &mut fidl::encoding::Decoder<'_, D>,
12895            offset: usize,
12896            _depth: fidl::encoding::Depth,
12897        ) -> fidl::Result<()> {
12898            decoder.debug_check_bounds::<Self>(offset);
12899            // Verify that padding bytes are zero.
12900            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12901            Ok(())
12902        }
12903    }
12904
12905    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpDeferAcceptResponse {
12906        type Borrowed<'a> = &'a Self;
12907        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12908            value
12909        }
12910    }
12911
12912    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpDeferAcceptResponse {
12913        type Owned = Self;
12914
12915        #[inline(always)]
12916        fn inline_align(_context: fidl::encoding::Context) -> usize {
12917            4
12918        }
12919
12920        #[inline(always)]
12921        fn inline_size(_context: fidl::encoding::Context) -> usize {
12922            4
12923        }
12924        #[inline(always)]
12925        fn encode_is_copy() -> bool {
12926            true
12927        }
12928
12929        #[inline(always)]
12930        fn decode_is_copy() -> bool {
12931            true
12932        }
12933    }
12934
12935    unsafe impl<D: fidl::encoding::ResourceDialect>
12936        fidl::encoding::Encode<StreamSocketGetTcpDeferAcceptResponse, D>
12937        for &StreamSocketGetTcpDeferAcceptResponse
12938    {
12939        #[inline]
12940        unsafe fn encode(
12941            self,
12942            encoder: &mut fidl::encoding::Encoder<'_, D>,
12943            offset: usize,
12944            _depth: fidl::encoding::Depth,
12945        ) -> fidl::Result<()> {
12946            encoder.debug_check_bounds::<StreamSocketGetTcpDeferAcceptResponse>(offset);
12947            unsafe {
12948                // Copy the object into the buffer.
12949                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12950                (buf_ptr as *mut StreamSocketGetTcpDeferAcceptResponse)
12951                    .write_unaligned((self as *const StreamSocketGetTcpDeferAcceptResponse).read());
12952                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12953                // done second because the memcpy will write garbage to these bytes.
12954            }
12955            Ok(())
12956        }
12957    }
12958    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12959        fidl::encoding::Encode<StreamSocketGetTcpDeferAcceptResponse, D> for (T0,)
12960    {
12961        #[inline]
12962        unsafe fn encode(
12963            self,
12964            encoder: &mut fidl::encoding::Encoder<'_, D>,
12965            offset: usize,
12966            depth: fidl::encoding::Depth,
12967        ) -> fidl::Result<()> {
12968            encoder.debug_check_bounds::<StreamSocketGetTcpDeferAcceptResponse>(offset);
12969            // Zero out padding regions. There's no need to apply masks
12970            // because the unmasked parts will be overwritten by fields.
12971            // Write the fields.
12972            self.0.encode(encoder, offset + 0, depth)?;
12973            Ok(())
12974        }
12975    }
12976
12977    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12978        for StreamSocketGetTcpDeferAcceptResponse
12979    {
12980        #[inline(always)]
12981        fn new_empty() -> Self {
12982            Self { value_secs: fidl::new_empty!(u32, D) }
12983        }
12984
12985        #[inline]
12986        unsafe fn decode(
12987            &mut self,
12988            decoder: &mut fidl::encoding::Decoder<'_, D>,
12989            offset: usize,
12990            _depth: fidl::encoding::Depth,
12991        ) -> fidl::Result<()> {
12992            decoder.debug_check_bounds::<Self>(offset);
12993            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12994            // Verify that padding bytes are zero.
12995            // Copy from the buffer into the object.
12996            unsafe {
12997                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12998            }
12999            Ok(())
13000        }
13001    }
13002
13003    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpInfoResponse {
13004        type Borrowed<'a> = &'a Self;
13005        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13006            value
13007        }
13008    }
13009
13010    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpInfoResponse {
13011        type Owned = Self;
13012
13013        #[inline(always)]
13014        fn inline_align(_context: fidl::encoding::Context) -> usize {
13015            8
13016        }
13017
13018        #[inline(always)]
13019        fn inline_size(_context: fidl::encoding::Context) -> usize {
13020            16
13021        }
13022    }
13023
13024    unsafe impl<D: fidl::encoding::ResourceDialect>
13025        fidl::encoding::Encode<StreamSocketGetTcpInfoResponse, D>
13026        for &StreamSocketGetTcpInfoResponse
13027    {
13028        #[inline]
13029        unsafe fn encode(
13030            self,
13031            encoder: &mut fidl::encoding::Encoder<'_, D>,
13032            offset: usize,
13033            _depth: fidl::encoding::Depth,
13034        ) -> fidl::Result<()> {
13035            encoder.debug_check_bounds::<StreamSocketGetTcpInfoResponse>(offset);
13036            // Delegate to tuple encoding.
13037            fidl::encoding::Encode::<StreamSocketGetTcpInfoResponse, D>::encode(
13038                (<fidl_fuchsia_net_tcp__common::Info as fidl::encoding::ValueTypeMarker>::borrow(
13039                    &self.info,
13040                ),),
13041                encoder,
13042                offset,
13043                _depth,
13044            )
13045        }
13046    }
13047    unsafe impl<
13048        D: fidl::encoding::ResourceDialect,
13049        T0: fidl::encoding::Encode<fidl_fuchsia_net_tcp__common::Info, D>,
13050    > fidl::encoding::Encode<StreamSocketGetTcpInfoResponse, D> for (T0,)
13051    {
13052        #[inline]
13053        unsafe fn encode(
13054            self,
13055            encoder: &mut fidl::encoding::Encoder<'_, D>,
13056            offset: usize,
13057            depth: fidl::encoding::Depth,
13058        ) -> fidl::Result<()> {
13059            encoder.debug_check_bounds::<StreamSocketGetTcpInfoResponse>(offset);
13060            // Zero out padding regions. There's no need to apply masks
13061            // because the unmasked parts will be overwritten by fields.
13062            // Write the fields.
13063            self.0.encode(encoder, offset + 0, depth)?;
13064            Ok(())
13065        }
13066    }
13067
13068    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13069        for StreamSocketGetTcpInfoResponse
13070    {
13071        #[inline(always)]
13072        fn new_empty() -> Self {
13073            Self { info: fidl::new_empty!(fidl_fuchsia_net_tcp__common::Info, D) }
13074        }
13075
13076        #[inline]
13077        unsafe fn decode(
13078            &mut self,
13079            decoder: &mut fidl::encoding::Decoder<'_, D>,
13080            offset: usize,
13081            _depth: fidl::encoding::Depth,
13082        ) -> fidl::Result<()> {
13083            decoder.debug_check_bounds::<Self>(offset);
13084            // Verify that padding bytes are zero.
13085            fidl::decode!(
13086                fidl_fuchsia_net_tcp__common::Info,
13087                D,
13088                &mut self.info,
13089                decoder,
13090                offset + 0,
13091                _depth
13092            )?;
13093            Ok(())
13094        }
13095    }
13096
13097    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveCountResponse {
13098        type Borrowed<'a> = &'a Self;
13099        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13100            value
13101        }
13102    }
13103
13104    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveCountResponse {
13105        type Owned = Self;
13106
13107        #[inline(always)]
13108        fn inline_align(_context: fidl::encoding::Context) -> usize {
13109            4
13110        }
13111
13112        #[inline(always)]
13113        fn inline_size(_context: fidl::encoding::Context) -> usize {
13114            4
13115        }
13116        #[inline(always)]
13117        fn encode_is_copy() -> bool {
13118            true
13119        }
13120
13121        #[inline(always)]
13122        fn decode_is_copy() -> bool {
13123            true
13124        }
13125    }
13126
13127    unsafe impl<D: fidl::encoding::ResourceDialect>
13128        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveCountResponse, D>
13129        for &StreamSocketGetTcpKeepAliveCountResponse
13130    {
13131        #[inline]
13132        unsafe fn encode(
13133            self,
13134            encoder: &mut fidl::encoding::Encoder<'_, D>,
13135            offset: usize,
13136            _depth: fidl::encoding::Depth,
13137        ) -> fidl::Result<()> {
13138            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveCountResponse>(offset);
13139            unsafe {
13140                // Copy the object into the buffer.
13141                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13142                (buf_ptr as *mut StreamSocketGetTcpKeepAliveCountResponse).write_unaligned(
13143                    (self as *const StreamSocketGetTcpKeepAliveCountResponse).read(),
13144                );
13145                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13146                // done second because the memcpy will write garbage to these bytes.
13147            }
13148            Ok(())
13149        }
13150    }
13151    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13152        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveCountResponse, D> for (T0,)
13153    {
13154        #[inline]
13155        unsafe fn encode(
13156            self,
13157            encoder: &mut fidl::encoding::Encoder<'_, D>,
13158            offset: usize,
13159            depth: fidl::encoding::Depth,
13160        ) -> fidl::Result<()> {
13161            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveCountResponse>(offset);
13162            // Zero out padding regions. There's no need to apply masks
13163            // because the unmasked parts will be overwritten by fields.
13164            // Write the fields.
13165            self.0.encode(encoder, offset + 0, depth)?;
13166            Ok(())
13167        }
13168    }
13169
13170    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13171        for StreamSocketGetTcpKeepAliveCountResponse
13172    {
13173        #[inline(always)]
13174        fn new_empty() -> Self {
13175            Self { value: fidl::new_empty!(u32, D) }
13176        }
13177
13178        #[inline]
13179        unsafe fn decode(
13180            &mut self,
13181            decoder: &mut fidl::encoding::Decoder<'_, D>,
13182            offset: usize,
13183            _depth: fidl::encoding::Depth,
13184        ) -> fidl::Result<()> {
13185            decoder.debug_check_bounds::<Self>(offset);
13186            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13187            // Verify that padding bytes are zero.
13188            // Copy from the buffer into the object.
13189            unsafe {
13190                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13191            }
13192            Ok(())
13193        }
13194    }
13195
13196    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveIdleResponse {
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 StreamSocketGetTcpKeepAliveIdleResponse {
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<StreamSocketGetTcpKeepAliveIdleResponse, D>
13228        for &StreamSocketGetTcpKeepAliveIdleResponse
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::<StreamSocketGetTcpKeepAliveIdleResponse>(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 StreamSocketGetTcpKeepAliveIdleResponse).write_unaligned(
13242                    (self as *const StreamSocketGetTcpKeepAliveIdleResponse).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<StreamSocketGetTcpKeepAliveIdleResponse, 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::<StreamSocketGetTcpKeepAliveIdleResponse>(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 StreamSocketGetTcpKeepAliveIdleResponse
13271    {
13272        #[inline(always)]
13273        fn new_empty() -> Self {
13274            Self { value_secs: 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 StreamSocketGetTcpKeepAliveIntervalResponse {
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 StreamSocketGetTcpKeepAliveIntervalResponse {
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<StreamSocketGetTcpKeepAliveIntervalResponse, D>
13327        for &StreamSocketGetTcpKeepAliveIntervalResponse
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::<StreamSocketGetTcpKeepAliveIntervalResponse>(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 StreamSocketGetTcpKeepAliveIntervalResponse).write_unaligned(
13341                    (self as *const StreamSocketGetTcpKeepAliveIntervalResponse).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<StreamSocketGetTcpKeepAliveIntervalResponse, 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::<StreamSocketGetTcpKeepAliveIntervalResponse>(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 StreamSocketGetTcpKeepAliveIntervalResponse
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 StreamSocketGetTcpLingerResponse {
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 StreamSocketGetTcpLingerResponse {
13402        type Owned = Self;
13403
13404        #[inline(always)]
13405        fn inline_align(_context: fidl::encoding::Context) -> usize {
13406            8
13407        }
13408
13409        #[inline(always)]
13410        fn inline_size(_context: fidl::encoding::Context) -> usize {
13411            16
13412        }
13413    }
13414
13415    unsafe impl<D: fidl::encoding::ResourceDialect>
13416        fidl::encoding::Encode<StreamSocketGetTcpLingerResponse, D>
13417        for &StreamSocketGetTcpLingerResponse
13418    {
13419        #[inline]
13420        unsafe fn encode(
13421            self,
13422            encoder: &mut fidl::encoding::Encoder<'_, D>,
13423            offset: usize,
13424            _depth: fidl::encoding::Depth,
13425        ) -> fidl::Result<()> {
13426            encoder.debug_check_bounds::<StreamSocketGetTcpLingerResponse>(offset);
13427            // Delegate to tuple encoding.
13428            fidl::encoding::Encode::<StreamSocketGetTcpLingerResponse, D>::encode(
13429                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value_secs),),
13430                encoder,
13431                offset,
13432                _depth,
13433            )
13434        }
13435    }
13436    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
13437        fidl::encoding::Encode<StreamSocketGetTcpLingerResponse, D> for (T0,)
13438    {
13439        #[inline]
13440        unsafe fn encode(
13441            self,
13442            encoder: &mut fidl::encoding::Encoder<'_, D>,
13443            offset: usize,
13444            depth: fidl::encoding::Depth,
13445        ) -> fidl::Result<()> {
13446            encoder.debug_check_bounds::<StreamSocketGetTcpLingerResponse>(offset);
13447            // Zero out padding regions. There's no need to apply masks
13448            // because the unmasked parts will be overwritten by fields.
13449            // Write the fields.
13450            self.0.encode(encoder, offset + 0, depth)?;
13451            Ok(())
13452        }
13453    }
13454
13455    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13456        for StreamSocketGetTcpLingerResponse
13457    {
13458        #[inline(always)]
13459        fn new_empty() -> Self {
13460            Self { value_secs: fidl::new_empty!(OptionalUint32, D) }
13461        }
13462
13463        #[inline]
13464        unsafe fn decode(
13465            &mut self,
13466            decoder: &mut fidl::encoding::Decoder<'_, D>,
13467            offset: usize,
13468            _depth: fidl::encoding::Depth,
13469        ) -> fidl::Result<()> {
13470            decoder.debug_check_bounds::<Self>(offset);
13471            // Verify that padding bytes are zero.
13472            fidl::decode!(OptionalUint32, D, &mut self.value_secs, decoder, offset + 0, _depth)?;
13473            Ok(())
13474        }
13475    }
13476
13477    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpMaxSegmentResponse {
13478        type Borrowed<'a> = &'a Self;
13479        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13480            value
13481        }
13482    }
13483
13484    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpMaxSegmentResponse {
13485        type Owned = Self;
13486
13487        #[inline(always)]
13488        fn inline_align(_context: fidl::encoding::Context) -> usize {
13489            4
13490        }
13491
13492        #[inline(always)]
13493        fn inline_size(_context: fidl::encoding::Context) -> usize {
13494            4
13495        }
13496        #[inline(always)]
13497        fn encode_is_copy() -> bool {
13498            true
13499        }
13500
13501        #[inline(always)]
13502        fn decode_is_copy() -> bool {
13503            true
13504        }
13505    }
13506
13507    unsafe impl<D: fidl::encoding::ResourceDialect>
13508        fidl::encoding::Encode<StreamSocketGetTcpMaxSegmentResponse, D>
13509        for &StreamSocketGetTcpMaxSegmentResponse
13510    {
13511        #[inline]
13512        unsafe fn encode(
13513            self,
13514            encoder: &mut fidl::encoding::Encoder<'_, D>,
13515            offset: usize,
13516            _depth: fidl::encoding::Depth,
13517        ) -> fidl::Result<()> {
13518            encoder.debug_check_bounds::<StreamSocketGetTcpMaxSegmentResponse>(offset);
13519            unsafe {
13520                // Copy the object into the buffer.
13521                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13522                (buf_ptr as *mut StreamSocketGetTcpMaxSegmentResponse)
13523                    .write_unaligned((self as *const StreamSocketGetTcpMaxSegmentResponse).read());
13524                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13525                // done second because the memcpy will write garbage to these bytes.
13526            }
13527            Ok(())
13528        }
13529    }
13530    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13531        fidl::encoding::Encode<StreamSocketGetTcpMaxSegmentResponse, D> for (T0,)
13532    {
13533        #[inline]
13534        unsafe fn encode(
13535            self,
13536            encoder: &mut fidl::encoding::Encoder<'_, D>,
13537            offset: usize,
13538            depth: fidl::encoding::Depth,
13539        ) -> fidl::Result<()> {
13540            encoder.debug_check_bounds::<StreamSocketGetTcpMaxSegmentResponse>(offset);
13541            // Zero out padding regions. There's no need to apply masks
13542            // because the unmasked parts will be overwritten by fields.
13543            // Write the fields.
13544            self.0.encode(encoder, offset + 0, depth)?;
13545            Ok(())
13546        }
13547    }
13548
13549    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13550        for StreamSocketGetTcpMaxSegmentResponse
13551    {
13552        #[inline(always)]
13553        fn new_empty() -> Self {
13554            Self { value_bytes: fidl::new_empty!(u32, D) }
13555        }
13556
13557        #[inline]
13558        unsafe fn decode(
13559            &mut self,
13560            decoder: &mut fidl::encoding::Decoder<'_, D>,
13561            offset: usize,
13562            _depth: fidl::encoding::Depth,
13563        ) -> fidl::Result<()> {
13564            decoder.debug_check_bounds::<Self>(offset);
13565            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13566            // Verify that padding bytes are zero.
13567            // Copy from the buffer into the object.
13568            unsafe {
13569                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13570            }
13571            Ok(())
13572        }
13573    }
13574
13575    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpNoDelayResponse {
13576        type Borrowed<'a> = &'a Self;
13577        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13578            value
13579        }
13580    }
13581
13582    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpNoDelayResponse {
13583        type Owned = Self;
13584
13585        #[inline(always)]
13586        fn inline_align(_context: fidl::encoding::Context) -> usize {
13587            1
13588        }
13589
13590        #[inline(always)]
13591        fn inline_size(_context: fidl::encoding::Context) -> usize {
13592            1
13593        }
13594    }
13595
13596    unsafe impl<D: fidl::encoding::ResourceDialect>
13597        fidl::encoding::Encode<StreamSocketGetTcpNoDelayResponse, D>
13598        for &StreamSocketGetTcpNoDelayResponse
13599    {
13600        #[inline]
13601        unsafe fn encode(
13602            self,
13603            encoder: &mut fidl::encoding::Encoder<'_, D>,
13604            offset: usize,
13605            _depth: fidl::encoding::Depth,
13606        ) -> fidl::Result<()> {
13607            encoder.debug_check_bounds::<StreamSocketGetTcpNoDelayResponse>(offset);
13608            // Delegate to tuple encoding.
13609            fidl::encoding::Encode::<StreamSocketGetTcpNoDelayResponse, D>::encode(
13610                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
13611                encoder,
13612                offset,
13613                _depth,
13614            )
13615        }
13616    }
13617    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
13618        fidl::encoding::Encode<StreamSocketGetTcpNoDelayResponse, D> for (T0,)
13619    {
13620        #[inline]
13621        unsafe fn encode(
13622            self,
13623            encoder: &mut fidl::encoding::Encoder<'_, D>,
13624            offset: usize,
13625            depth: fidl::encoding::Depth,
13626        ) -> fidl::Result<()> {
13627            encoder.debug_check_bounds::<StreamSocketGetTcpNoDelayResponse>(offset);
13628            // Zero out padding regions. There's no need to apply masks
13629            // because the unmasked parts will be overwritten by fields.
13630            // Write the fields.
13631            self.0.encode(encoder, offset + 0, depth)?;
13632            Ok(())
13633        }
13634    }
13635
13636    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13637        for StreamSocketGetTcpNoDelayResponse
13638    {
13639        #[inline(always)]
13640        fn new_empty() -> Self {
13641            Self { value: fidl::new_empty!(bool, D) }
13642        }
13643
13644        #[inline]
13645        unsafe fn decode(
13646            &mut self,
13647            decoder: &mut fidl::encoding::Decoder<'_, D>,
13648            offset: usize,
13649            _depth: fidl::encoding::Depth,
13650        ) -> fidl::Result<()> {
13651            decoder.debug_check_bounds::<Self>(offset);
13652            // Verify that padding bytes are zero.
13653            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13654            Ok(())
13655        }
13656    }
13657
13658    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpQuickAckResponse {
13659        type Borrowed<'a> = &'a Self;
13660        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13661            value
13662        }
13663    }
13664
13665    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpQuickAckResponse {
13666        type Owned = Self;
13667
13668        #[inline(always)]
13669        fn inline_align(_context: fidl::encoding::Context) -> usize {
13670            1
13671        }
13672
13673        #[inline(always)]
13674        fn inline_size(_context: fidl::encoding::Context) -> usize {
13675            1
13676        }
13677    }
13678
13679    unsafe impl<D: fidl::encoding::ResourceDialect>
13680        fidl::encoding::Encode<StreamSocketGetTcpQuickAckResponse, D>
13681        for &StreamSocketGetTcpQuickAckResponse
13682    {
13683        #[inline]
13684        unsafe fn encode(
13685            self,
13686            encoder: &mut fidl::encoding::Encoder<'_, D>,
13687            offset: usize,
13688            _depth: fidl::encoding::Depth,
13689        ) -> fidl::Result<()> {
13690            encoder.debug_check_bounds::<StreamSocketGetTcpQuickAckResponse>(offset);
13691            // Delegate to tuple encoding.
13692            fidl::encoding::Encode::<StreamSocketGetTcpQuickAckResponse, D>::encode(
13693                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
13694                encoder,
13695                offset,
13696                _depth,
13697            )
13698        }
13699    }
13700    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
13701        fidl::encoding::Encode<StreamSocketGetTcpQuickAckResponse, D> for (T0,)
13702    {
13703        #[inline]
13704        unsafe fn encode(
13705            self,
13706            encoder: &mut fidl::encoding::Encoder<'_, D>,
13707            offset: usize,
13708            depth: fidl::encoding::Depth,
13709        ) -> fidl::Result<()> {
13710            encoder.debug_check_bounds::<StreamSocketGetTcpQuickAckResponse>(offset);
13711            // Zero out padding regions. There's no need to apply masks
13712            // because the unmasked parts will be overwritten by fields.
13713            // Write the fields.
13714            self.0.encode(encoder, offset + 0, depth)?;
13715            Ok(())
13716        }
13717    }
13718
13719    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13720        for StreamSocketGetTcpQuickAckResponse
13721    {
13722        #[inline(always)]
13723        fn new_empty() -> Self {
13724            Self { value: fidl::new_empty!(bool, D) }
13725        }
13726
13727        #[inline]
13728        unsafe fn decode(
13729            &mut self,
13730            decoder: &mut fidl::encoding::Decoder<'_, D>,
13731            offset: usize,
13732            _depth: fidl::encoding::Depth,
13733        ) -> fidl::Result<()> {
13734            decoder.debug_check_bounds::<Self>(offset);
13735            // Verify that padding bytes are zero.
13736            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13737            Ok(())
13738        }
13739    }
13740
13741    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpSynCountResponse {
13742        type Borrowed<'a> = &'a Self;
13743        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13744            value
13745        }
13746    }
13747
13748    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpSynCountResponse {
13749        type Owned = Self;
13750
13751        #[inline(always)]
13752        fn inline_align(_context: fidl::encoding::Context) -> usize {
13753            4
13754        }
13755
13756        #[inline(always)]
13757        fn inline_size(_context: fidl::encoding::Context) -> usize {
13758            4
13759        }
13760        #[inline(always)]
13761        fn encode_is_copy() -> bool {
13762            true
13763        }
13764
13765        #[inline(always)]
13766        fn decode_is_copy() -> bool {
13767            true
13768        }
13769    }
13770
13771    unsafe impl<D: fidl::encoding::ResourceDialect>
13772        fidl::encoding::Encode<StreamSocketGetTcpSynCountResponse, D>
13773        for &StreamSocketGetTcpSynCountResponse
13774    {
13775        #[inline]
13776        unsafe fn encode(
13777            self,
13778            encoder: &mut fidl::encoding::Encoder<'_, D>,
13779            offset: usize,
13780            _depth: fidl::encoding::Depth,
13781        ) -> fidl::Result<()> {
13782            encoder.debug_check_bounds::<StreamSocketGetTcpSynCountResponse>(offset);
13783            unsafe {
13784                // Copy the object into the buffer.
13785                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13786                (buf_ptr as *mut StreamSocketGetTcpSynCountResponse)
13787                    .write_unaligned((self as *const StreamSocketGetTcpSynCountResponse).read());
13788                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13789                // done second because the memcpy will write garbage to these bytes.
13790            }
13791            Ok(())
13792        }
13793    }
13794    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13795        fidl::encoding::Encode<StreamSocketGetTcpSynCountResponse, D> for (T0,)
13796    {
13797        #[inline]
13798        unsafe fn encode(
13799            self,
13800            encoder: &mut fidl::encoding::Encoder<'_, D>,
13801            offset: usize,
13802            depth: fidl::encoding::Depth,
13803        ) -> fidl::Result<()> {
13804            encoder.debug_check_bounds::<StreamSocketGetTcpSynCountResponse>(offset);
13805            // Zero out padding regions. There's no need to apply masks
13806            // because the unmasked parts will be overwritten by fields.
13807            // Write the fields.
13808            self.0.encode(encoder, offset + 0, depth)?;
13809            Ok(())
13810        }
13811    }
13812
13813    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13814        for StreamSocketGetTcpSynCountResponse
13815    {
13816        #[inline(always)]
13817        fn new_empty() -> Self {
13818            Self { value: fidl::new_empty!(u32, D) }
13819        }
13820
13821        #[inline]
13822        unsafe fn decode(
13823            &mut self,
13824            decoder: &mut fidl::encoding::Decoder<'_, D>,
13825            offset: usize,
13826            _depth: fidl::encoding::Depth,
13827        ) -> fidl::Result<()> {
13828            decoder.debug_check_bounds::<Self>(offset);
13829            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13830            // Verify that padding bytes are zero.
13831            // Copy from the buffer into the object.
13832            unsafe {
13833                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13834            }
13835            Ok(())
13836        }
13837    }
13838
13839    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpUserTimeoutResponse {
13840        type Borrowed<'a> = &'a Self;
13841        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13842            value
13843        }
13844    }
13845
13846    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpUserTimeoutResponse {
13847        type Owned = Self;
13848
13849        #[inline(always)]
13850        fn inline_align(_context: fidl::encoding::Context) -> usize {
13851            4
13852        }
13853
13854        #[inline(always)]
13855        fn inline_size(_context: fidl::encoding::Context) -> usize {
13856            4
13857        }
13858        #[inline(always)]
13859        fn encode_is_copy() -> bool {
13860            true
13861        }
13862
13863        #[inline(always)]
13864        fn decode_is_copy() -> bool {
13865            true
13866        }
13867    }
13868
13869    unsafe impl<D: fidl::encoding::ResourceDialect>
13870        fidl::encoding::Encode<StreamSocketGetTcpUserTimeoutResponse, D>
13871        for &StreamSocketGetTcpUserTimeoutResponse
13872    {
13873        #[inline]
13874        unsafe fn encode(
13875            self,
13876            encoder: &mut fidl::encoding::Encoder<'_, D>,
13877            offset: usize,
13878            _depth: fidl::encoding::Depth,
13879        ) -> fidl::Result<()> {
13880            encoder.debug_check_bounds::<StreamSocketGetTcpUserTimeoutResponse>(offset);
13881            unsafe {
13882                // Copy the object into the buffer.
13883                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13884                (buf_ptr as *mut StreamSocketGetTcpUserTimeoutResponse)
13885                    .write_unaligned((self as *const StreamSocketGetTcpUserTimeoutResponse).read());
13886                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13887                // done second because the memcpy will write garbage to these bytes.
13888            }
13889            Ok(())
13890        }
13891    }
13892    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13893        fidl::encoding::Encode<StreamSocketGetTcpUserTimeoutResponse, D> for (T0,)
13894    {
13895        #[inline]
13896        unsafe fn encode(
13897            self,
13898            encoder: &mut fidl::encoding::Encoder<'_, D>,
13899            offset: usize,
13900            depth: fidl::encoding::Depth,
13901        ) -> fidl::Result<()> {
13902            encoder.debug_check_bounds::<StreamSocketGetTcpUserTimeoutResponse>(offset);
13903            // Zero out padding regions. There's no need to apply masks
13904            // because the unmasked parts will be overwritten by fields.
13905            // Write the fields.
13906            self.0.encode(encoder, offset + 0, depth)?;
13907            Ok(())
13908        }
13909    }
13910
13911    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13912        for StreamSocketGetTcpUserTimeoutResponse
13913    {
13914        #[inline(always)]
13915        fn new_empty() -> Self {
13916            Self { value_millis: fidl::new_empty!(u32, D) }
13917        }
13918
13919        #[inline]
13920        unsafe fn decode(
13921            &mut self,
13922            decoder: &mut fidl::encoding::Decoder<'_, D>,
13923            offset: usize,
13924            _depth: fidl::encoding::Depth,
13925        ) -> fidl::Result<()> {
13926            decoder.debug_check_bounds::<Self>(offset);
13927            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13928            // Verify that padding bytes are zero.
13929            // Copy from the buffer into the object.
13930            unsafe {
13931                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13932            }
13933            Ok(())
13934        }
13935    }
13936
13937    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpWindowClampResponse {
13938        type Borrowed<'a> = &'a Self;
13939        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13940            value
13941        }
13942    }
13943
13944    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpWindowClampResponse {
13945        type Owned = Self;
13946
13947        #[inline(always)]
13948        fn inline_align(_context: fidl::encoding::Context) -> usize {
13949            4
13950        }
13951
13952        #[inline(always)]
13953        fn inline_size(_context: fidl::encoding::Context) -> usize {
13954            4
13955        }
13956        #[inline(always)]
13957        fn encode_is_copy() -> bool {
13958            true
13959        }
13960
13961        #[inline(always)]
13962        fn decode_is_copy() -> bool {
13963            true
13964        }
13965    }
13966
13967    unsafe impl<D: fidl::encoding::ResourceDialect>
13968        fidl::encoding::Encode<StreamSocketGetTcpWindowClampResponse, D>
13969        for &StreamSocketGetTcpWindowClampResponse
13970    {
13971        #[inline]
13972        unsafe fn encode(
13973            self,
13974            encoder: &mut fidl::encoding::Encoder<'_, D>,
13975            offset: usize,
13976            _depth: fidl::encoding::Depth,
13977        ) -> fidl::Result<()> {
13978            encoder.debug_check_bounds::<StreamSocketGetTcpWindowClampResponse>(offset);
13979            unsafe {
13980                // Copy the object into the buffer.
13981                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13982                (buf_ptr as *mut StreamSocketGetTcpWindowClampResponse)
13983                    .write_unaligned((self as *const StreamSocketGetTcpWindowClampResponse).read());
13984                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13985                // done second because the memcpy will write garbage to these bytes.
13986            }
13987            Ok(())
13988        }
13989    }
13990    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13991        fidl::encoding::Encode<StreamSocketGetTcpWindowClampResponse, D> for (T0,)
13992    {
13993        #[inline]
13994        unsafe fn encode(
13995            self,
13996            encoder: &mut fidl::encoding::Encoder<'_, D>,
13997            offset: usize,
13998            depth: fidl::encoding::Depth,
13999        ) -> fidl::Result<()> {
14000            encoder.debug_check_bounds::<StreamSocketGetTcpWindowClampResponse>(offset);
14001            // Zero out padding regions. There's no need to apply masks
14002            // because the unmasked parts will be overwritten by fields.
14003            // Write the fields.
14004            self.0.encode(encoder, offset + 0, depth)?;
14005            Ok(())
14006        }
14007    }
14008
14009    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14010        for StreamSocketGetTcpWindowClampResponse
14011    {
14012        #[inline(always)]
14013        fn new_empty() -> Self {
14014            Self { value: fidl::new_empty!(u32, D) }
14015        }
14016
14017        #[inline]
14018        unsafe fn decode(
14019            &mut self,
14020            decoder: &mut fidl::encoding::Decoder<'_, D>,
14021            offset: usize,
14022            _depth: fidl::encoding::Depth,
14023        ) -> fidl::Result<()> {
14024            decoder.debug_check_bounds::<Self>(offset);
14025            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14026            // Verify that padding bytes are zero.
14027            // Copy from the buffer into the object.
14028            unsafe {
14029                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14030            }
14031            Ok(())
14032        }
14033    }
14034
14035    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketRecvMsgRequest {
14036        type Borrowed<'a> = &'a Self;
14037        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14038            value
14039        }
14040    }
14041
14042    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketRecvMsgRequest {
14043        type Owned = Self;
14044
14045        #[inline(always)]
14046        fn inline_align(_context: fidl::encoding::Context) -> usize {
14047            4
14048        }
14049
14050        #[inline(always)]
14051        fn inline_size(_context: fidl::encoding::Context) -> usize {
14052            12
14053        }
14054    }
14055
14056    unsafe impl<D: fidl::encoding::ResourceDialect>
14057        fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgRequest, D>
14058        for &SynchronousDatagramSocketRecvMsgRequest
14059    {
14060        #[inline]
14061        unsafe fn encode(
14062            self,
14063            encoder: &mut fidl::encoding::Encoder<'_, D>,
14064            offset: usize,
14065            _depth: fidl::encoding::Depth,
14066        ) -> fidl::Result<()> {
14067            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgRequest>(offset);
14068            // Delegate to tuple encoding.
14069            fidl::encoding::Encode::<SynchronousDatagramSocketRecvMsgRequest, D>::encode(
14070                (
14071                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_addr),
14072                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data_len),
14073                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_control),
14074                    <RecvMsgFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
14075                ),
14076                encoder,
14077                offset,
14078                _depth,
14079            )
14080        }
14081    }
14082    unsafe impl<
14083        D: fidl::encoding::ResourceDialect,
14084        T0: fidl::encoding::Encode<bool, D>,
14085        T1: fidl::encoding::Encode<u32, D>,
14086        T2: fidl::encoding::Encode<bool, D>,
14087        T3: fidl::encoding::Encode<RecvMsgFlags, D>,
14088    > fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgRequest, D> for (T0, T1, T2, T3)
14089    {
14090        #[inline]
14091        unsafe fn encode(
14092            self,
14093            encoder: &mut fidl::encoding::Encoder<'_, D>,
14094            offset: usize,
14095            depth: fidl::encoding::Depth,
14096        ) -> fidl::Result<()> {
14097            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgRequest>(offset);
14098            // Zero out padding regions. There's no need to apply masks
14099            // because the unmasked parts will be overwritten by fields.
14100            unsafe {
14101                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
14102                (ptr as *mut u32).write_unaligned(0);
14103            }
14104            unsafe {
14105                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
14106                (ptr as *mut u32).write_unaligned(0);
14107            }
14108            // Write the fields.
14109            self.0.encode(encoder, offset + 0, depth)?;
14110            self.1.encode(encoder, offset + 4, depth)?;
14111            self.2.encode(encoder, offset + 8, depth)?;
14112            self.3.encode(encoder, offset + 10, depth)?;
14113            Ok(())
14114        }
14115    }
14116
14117    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14118        for SynchronousDatagramSocketRecvMsgRequest
14119    {
14120        #[inline(always)]
14121        fn new_empty() -> Self {
14122            Self {
14123                want_addr: fidl::new_empty!(bool, D),
14124                data_len: fidl::new_empty!(u32, D),
14125                want_control: fidl::new_empty!(bool, D),
14126                flags: fidl::new_empty!(RecvMsgFlags, D),
14127            }
14128        }
14129
14130        #[inline]
14131        unsafe fn decode(
14132            &mut self,
14133            decoder: &mut fidl::encoding::Decoder<'_, D>,
14134            offset: usize,
14135            _depth: fidl::encoding::Depth,
14136        ) -> fidl::Result<()> {
14137            decoder.debug_check_bounds::<Self>(offset);
14138            // Verify that padding bytes are zero.
14139            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
14140            let padval = unsafe { (ptr as *const u32).read_unaligned() };
14141            let mask = 0xffffff00u32;
14142            let maskedval = padval & mask;
14143            if maskedval != 0 {
14144                return Err(fidl::Error::NonZeroPadding {
14145                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
14146                });
14147            }
14148            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
14149            let padval = unsafe { (ptr as *const u32).read_unaligned() };
14150            let mask = 0xff00u32;
14151            let maskedval = padval & mask;
14152            if maskedval != 0 {
14153                return Err(fidl::Error::NonZeroPadding {
14154                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
14155                });
14156            }
14157            fidl::decode!(bool, D, &mut self.want_addr, decoder, offset + 0, _depth)?;
14158            fidl::decode!(u32, D, &mut self.data_len, decoder, offset + 4, _depth)?;
14159            fidl::decode!(bool, D, &mut self.want_control, decoder, offset + 8, _depth)?;
14160            fidl::decode!(RecvMsgFlags, D, &mut self.flags, decoder, offset + 10, _depth)?;
14161            Ok(())
14162        }
14163    }
14164
14165    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketSendMsgRequest {
14166        type Borrowed<'a> = &'a Self;
14167        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14168            value
14169        }
14170    }
14171
14172    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketSendMsgRequest {
14173        type Owned = Self;
14174
14175        #[inline(always)]
14176        fn inline_align(_context: fidl::encoding::Context) -> usize {
14177            8
14178        }
14179
14180        #[inline(always)]
14181        fn inline_size(_context: fidl::encoding::Context) -> usize {
14182            56
14183        }
14184    }
14185
14186    unsafe impl<D: fidl::encoding::ResourceDialect>
14187        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgRequest, D>
14188        for &SynchronousDatagramSocketSendMsgRequest
14189    {
14190        #[inline]
14191        unsafe fn encode(
14192            self,
14193            encoder: &mut fidl::encoding::Encoder<'_, D>,
14194            offset: usize,
14195            _depth: fidl::encoding::Depth,
14196        ) -> fidl::Result<()> {
14197            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgRequest>(offset);
14198            // Delegate to tuple encoding.
14199            fidl::encoding::Encode::<SynchronousDatagramSocketSendMsgRequest, D>::encode(
14200                (
14201                    <fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress> as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
14202                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
14203                    <DatagramSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow(&self.control),
14204                    <SendMsgFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
14205                ),
14206                encoder, offset, _depth
14207            )
14208        }
14209    }
14210    unsafe impl<
14211        D: fidl::encoding::ResourceDialect,
14212        T0: fidl::encoding::Encode<
14213                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14214                D,
14215            >,
14216        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
14217        T2: fidl::encoding::Encode<DatagramSocketSendControlData, D>,
14218        T3: fidl::encoding::Encode<SendMsgFlags, D>,
14219    > fidl::encoding::Encode<SynchronousDatagramSocketSendMsgRequest, D> for (T0, T1, T2, T3)
14220    {
14221        #[inline]
14222        unsafe fn encode(
14223            self,
14224            encoder: &mut fidl::encoding::Encoder<'_, D>,
14225            offset: usize,
14226            depth: fidl::encoding::Depth,
14227        ) -> fidl::Result<()> {
14228            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgRequest>(offset);
14229            // Zero out padding regions. There's no need to apply masks
14230            // because the unmasked parts will be overwritten by fields.
14231            unsafe {
14232                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
14233                (ptr as *mut u64).write_unaligned(0);
14234            }
14235            // Write the fields.
14236            self.0.encode(encoder, offset + 0, depth)?;
14237            self.1.encode(encoder, offset + 16, depth)?;
14238            self.2.encode(encoder, offset + 32, depth)?;
14239            self.3.encode(encoder, offset + 48, depth)?;
14240            Ok(())
14241        }
14242    }
14243
14244    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14245        for SynchronousDatagramSocketSendMsgRequest
14246    {
14247        #[inline(always)]
14248        fn new_empty() -> Self {
14249            Self {
14250                addr: fidl::new_empty!(
14251                    fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14252                    D
14253                ),
14254                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
14255                control: fidl::new_empty!(DatagramSocketSendControlData, D),
14256                flags: fidl::new_empty!(SendMsgFlags, D),
14257            }
14258        }
14259
14260        #[inline]
14261        unsafe fn decode(
14262            &mut self,
14263            decoder: &mut fidl::encoding::Decoder<'_, D>,
14264            offset: usize,
14265            _depth: fidl::encoding::Depth,
14266        ) -> fidl::Result<()> {
14267            decoder.debug_check_bounds::<Self>(offset);
14268            // Verify that padding bytes are zero.
14269            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
14270            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14271            let mask = 0xffffffffffff0000u64;
14272            let maskedval = padval & mask;
14273            if maskedval != 0 {
14274                return Err(fidl::Error::NonZeroPadding {
14275                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
14276                });
14277            }
14278            fidl::decode!(
14279                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14280                D,
14281                &mut self.addr,
14282                decoder,
14283                offset + 0,
14284                _depth
14285            )?;
14286            fidl::decode!(
14287                fidl::encoding::UnboundedVector<u8>,
14288                D,
14289                &mut self.data,
14290                decoder,
14291                offset + 16,
14292                _depth
14293            )?;
14294            fidl::decode!(
14295                DatagramSocketSendControlData,
14296                D,
14297                &mut self.control,
14298                decoder,
14299                offset + 32,
14300                _depth
14301            )?;
14302            fidl::decode!(SendMsgFlags, D, &mut self.flags, decoder, offset + 48, _depth)?;
14303            Ok(())
14304        }
14305    }
14306
14307    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketRecvMsgResponse {
14308        type Borrowed<'a> = &'a Self;
14309        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14310            value
14311        }
14312    }
14313
14314    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketRecvMsgResponse {
14315        type Owned = Self;
14316
14317        #[inline(always)]
14318        fn inline_align(_context: fidl::encoding::Context) -> usize {
14319            8
14320        }
14321
14322        #[inline(always)]
14323        fn inline_size(_context: fidl::encoding::Context) -> usize {
14324            56
14325        }
14326    }
14327
14328    unsafe impl<D: fidl::encoding::ResourceDialect>
14329        fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgResponse, D>
14330        for &SynchronousDatagramSocketRecvMsgResponse
14331    {
14332        #[inline]
14333        unsafe fn encode(
14334            self,
14335            encoder: &mut fidl::encoding::Encoder<'_, D>,
14336            offset: usize,
14337            _depth: fidl::encoding::Depth,
14338        ) -> fidl::Result<()> {
14339            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgResponse>(offset);
14340            // Delegate to tuple encoding.
14341            fidl::encoding::Encode::<SynchronousDatagramSocketRecvMsgResponse, D>::encode(
14342                (
14343                    <fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress> as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
14344                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
14345                    <DatagramSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow(&self.control),
14346                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.truncated),
14347                ),
14348                encoder, offset, _depth
14349            )
14350        }
14351    }
14352    unsafe impl<
14353        D: fidl::encoding::ResourceDialect,
14354        T0: fidl::encoding::Encode<
14355                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14356                D,
14357            >,
14358        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
14359        T2: fidl::encoding::Encode<DatagramSocketRecvControlData, D>,
14360        T3: fidl::encoding::Encode<u32, D>,
14361    > fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgResponse, D> for (T0, T1, T2, T3)
14362    {
14363        #[inline]
14364        unsafe fn encode(
14365            self,
14366            encoder: &mut fidl::encoding::Encoder<'_, D>,
14367            offset: usize,
14368            depth: fidl::encoding::Depth,
14369        ) -> fidl::Result<()> {
14370            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgResponse>(offset);
14371            // Zero out padding regions. There's no need to apply masks
14372            // because the unmasked parts will be overwritten by fields.
14373            unsafe {
14374                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
14375                (ptr as *mut u64).write_unaligned(0);
14376            }
14377            // Write the fields.
14378            self.0.encode(encoder, offset + 0, depth)?;
14379            self.1.encode(encoder, offset + 16, depth)?;
14380            self.2.encode(encoder, offset + 32, depth)?;
14381            self.3.encode(encoder, offset + 48, depth)?;
14382            Ok(())
14383        }
14384    }
14385
14386    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14387        for SynchronousDatagramSocketRecvMsgResponse
14388    {
14389        #[inline(always)]
14390        fn new_empty() -> Self {
14391            Self {
14392                addr: fidl::new_empty!(
14393                    fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14394                    D
14395                ),
14396                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
14397                control: fidl::new_empty!(DatagramSocketRecvControlData, D),
14398                truncated: fidl::new_empty!(u32, D),
14399            }
14400        }
14401
14402        #[inline]
14403        unsafe fn decode(
14404            &mut self,
14405            decoder: &mut fidl::encoding::Decoder<'_, D>,
14406            offset: usize,
14407            _depth: fidl::encoding::Depth,
14408        ) -> fidl::Result<()> {
14409            decoder.debug_check_bounds::<Self>(offset);
14410            // Verify that padding bytes are zero.
14411            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
14412            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14413            let mask = 0xffffffff00000000u64;
14414            let maskedval = padval & mask;
14415            if maskedval != 0 {
14416                return Err(fidl::Error::NonZeroPadding {
14417                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
14418                });
14419            }
14420            fidl::decode!(
14421                fidl::encoding::OptionalUnion<fidl_fuchsia_net__common::SocketAddress>,
14422                D,
14423                &mut self.addr,
14424                decoder,
14425                offset + 0,
14426                _depth
14427            )?;
14428            fidl::decode!(
14429                fidl::encoding::UnboundedVector<u8>,
14430                D,
14431                &mut self.data,
14432                decoder,
14433                offset + 16,
14434                _depth
14435            )?;
14436            fidl::decode!(
14437                DatagramSocketRecvControlData,
14438                D,
14439                &mut self.control,
14440                decoder,
14441                offset + 32,
14442                _depth
14443            )?;
14444            fidl::decode!(u32, D, &mut self.truncated, decoder, offset + 48, _depth)?;
14445            Ok(())
14446        }
14447    }
14448
14449    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketSendMsgResponse {
14450        type Borrowed<'a> = &'a Self;
14451        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14452            value
14453        }
14454    }
14455
14456    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketSendMsgResponse {
14457        type Owned = Self;
14458
14459        #[inline(always)]
14460        fn inline_align(_context: fidl::encoding::Context) -> usize {
14461            8
14462        }
14463
14464        #[inline(always)]
14465        fn inline_size(_context: fidl::encoding::Context) -> usize {
14466            8
14467        }
14468        #[inline(always)]
14469        fn encode_is_copy() -> bool {
14470            true
14471        }
14472
14473        #[inline(always)]
14474        fn decode_is_copy() -> bool {
14475            true
14476        }
14477    }
14478
14479    unsafe impl<D: fidl::encoding::ResourceDialect>
14480        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgResponse, D>
14481        for &SynchronousDatagramSocketSendMsgResponse
14482    {
14483        #[inline]
14484        unsafe fn encode(
14485            self,
14486            encoder: &mut fidl::encoding::Encoder<'_, D>,
14487            offset: usize,
14488            _depth: fidl::encoding::Depth,
14489        ) -> fidl::Result<()> {
14490            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgResponse>(offset);
14491            unsafe {
14492                // Copy the object into the buffer.
14493                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14494                (buf_ptr as *mut SynchronousDatagramSocketSendMsgResponse).write_unaligned(
14495                    (self as *const SynchronousDatagramSocketSendMsgResponse).read(),
14496                );
14497                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14498                // done second because the memcpy will write garbage to these bytes.
14499            }
14500            Ok(())
14501        }
14502    }
14503    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
14504        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgResponse, D> for (T0,)
14505    {
14506        #[inline]
14507        unsafe fn encode(
14508            self,
14509            encoder: &mut fidl::encoding::Encoder<'_, D>,
14510            offset: usize,
14511            depth: fidl::encoding::Depth,
14512        ) -> fidl::Result<()> {
14513            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgResponse>(offset);
14514            // Zero out padding regions. There's no need to apply masks
14515            // because the unmasked parts will be overwritten by fields.
14516            // Write the fields.
14517            self.0.encode(encoder, offset + 0, depth)?;
14518            Ok(())
14519        }
14520    }
14521
14522    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14523        for SynchronousDatagramSocketSendMsgResponse
14524    {
14525        #[inline(always)]
14526        fn new_empty() -> Self {
14527            Self { len: fidl::new_empty!(i64, D) }
14528        }
14529
14530        #[inline]
14531        unsafe fn decode(
14532            &mut self,
14533            decoder: &mut fidl::encoding::Decoder<'_, D>,
14534            offset: usize,
14535            _depth: fidl::encoding::Depth,
14536        ) -> fidl::Result<()> {
14537            decoder.debug_check_bounds::<Self>(offset);
14538            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14539            // Verify that padding bytes are zero.
14540            // Copy from the buffer into the object.
14541            unsafe {
14542                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
14543            }
14544            Ok(())
14545        }
14546    }
14547
14548    impl fidl::encoding::ValueTypeMarker for Timestamp {
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 Timestamp {
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            16
14566        }
14567    }
14568
14569    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Timestamp, D>
14570        for &Timestamp
14571    {
14572        #[inline]
14573        unsafe fn encode(
14574            self,
14575            encoder: &mut fidl::encoding::Encoder<'_, D>,
14576            offset: usize,
14577            _depth: fidl::encoding::Depth,
14578        ) -> fidl::Result<()> {
14579            encoder.debug_check_bounds::<Timestamp>(offset);
14580            // Delegate to tuple encoding.
14581            fidl::encoding::Encode::<Timestamp, D>::encode(
14582                (
14583                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.nanoseconds),
14584                    <TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.requested),
14585                ),
14586                encoder,
14587                offset,
14588                _depth,
14589            )
14590        }
14591    }
14592    unsafe impl<
14593        D: fidl::encoding::ResourceDialect,
14594        T0: fidl::encoding::Encode<i64, D>,
14595        T1: fidl::encoding::Encode<TimestampOption, D>,
14596    > fidl::encoding::Encode<Timestamp, D> for (T0, T1)
14597    {
14598        #[inline]
14599        unsafe fn encode(
14600            self,
14601            encoder: &mut fidl::encoding::Encoder<'_, D>,
14602            offset: usize,
14603            depth: fidl::encoding::Depth,
14604        ) -> fidl::Result<()> {
14605            encoder.debug_check_bounds::<Timestamp>(offset);
14606            // Zero out padding regions. There's no need to apply masks
14607            // because the unmasked parts will be overwritten by fields.
14608            unsafe {
14609                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
14610                (ptr as *mut u64).write_unaligned(0);
14611            }
14612            // Write the fields.
14613            self.0.encode(encoder, offset + 0, depth)?;
14614            self.1.encode(encoder, offset + 8, depth)?;
14615            Ok(())
14616        }
14617    }
14618
14619    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Timestamp {
14620        #[inline(always)]
14621        fn new_empty() -> Self {
14622            Self {
14623                nanoseconds: fidl::new_empty!(i64, D),
14624                requested: fidl::new_empty!(TimestampOption, D),
14625            }
14626        }
14627
14628        #[inline]
14629        unsafe fn decode(
14630            &mut self,
14631            decoder: &mut fidl::encoding::Decoder<'_, D>,
14632            offset: usize,
14633            _depth: fidl::encoding::Depth,
14634        ) -> fidl::Result<()> {
14635            decoder.debug_check_bounds::<Self>(offset);
14636            // Verify that padding bytes are zero.
14637            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
14638            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14639            let mask = 0xffffffff00000000u64;
14640            let maskedval = padval & mask;
14641            if maskedval != 0 {
14642                return Err(fidl::Error::NonZeroPadding {
14643                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
14644                });
14645            }
14646            fidl::decode!(i64, D, &mut self.nanoseconds, decoder, offset + 0, _depth)?;
14647            fidl::decode!(TimestampOption, D, &mut self.requested, decoder, offset + 8, _depth)?;
14648            Ok(())
14649        }
14650    }
14651
14652    impl DatagramSocketRecvControlData {
14653        #[inline(always)]
14654        fn max_ordinal_present(&self) -> u64 {
14655            if let Some(_) = self.network {
14656                return 1;
14657            }
14658            0
14659        }
14660    }
14661
14662    impl fidl::encoding::ValueTypeMarker for DatagramSocketRecvControlData {
14663        type Borrowed<'a> = &'a Self;
14664        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14665            value
14666        }
14667    }
14668
14669    unsafe impl fidl::encoding::TypeMarker for DatagramSocketRecvControlData {
14670        type Owned = Self;
14671
14672        #[inline(always)]
14673        fn inline_align(_context: fidl::encoding::Context) -> usize {
14674            8
14675        }
14676
14677        #[inline(always)]
14678        fn inline_size(_context: fidl::encoding::Context) -> usize {
14679            16
14680        }
14681    }
14682
14683    unsafe impl<D: fidl::encoding::ResourceDialect>
14684        fidl::encoding::Encode<DatagramSocketRecvControlData, D>
14685        for &DatagramSocketRecvControlData
14686    {
14687        unsafe fn encode(
14688            self,
14689            encoder: &mut fidl::encoding::Encoder<'_, D>,
14690            offset: usize,
14691            mut depth: fidl::encoding::Depth,
14692        ) -> fidl::Result<()> {
14693            encoder.debug_check_bounds::<DatagramSocketRecvControlData>(offset);
14694            // Vector header
14695            let max_ordinal: u64 = self.max_ordinal_present();
14696            encoder.write_num(max_ordinal, offset);
14697            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14698            // Calling encoder.out_of_line_offset(0) is not allowed.
14699            if max_ordinal == 0 {
14700                return Ok(());
14701            }
14702            depth.increment()?;
14703            let envelope_size = 8;
14704            let bytes_len = max_ordinal as usize * envelope_size;
14705            #[allow(unused_variables)]
14706            let offset = encoder.out_of_line_offset(bytes_len);
14707            let mut _prev_end_offset: usize = 0;
14708            if 1 > max_ordinal {
14709                return Ok(());
14710            }
14711
14712            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14713            // are envelope_size bytes.
14714            let cur_offset: usize = (1 - 1) * envelope_size;
14715
14716            // Zero reserved fields.
14717            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14718
14719            // Safety:
14720            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
14721            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
14722            //   envelope_size bytes, there is always sufficient room.
14723            fidl::encoding::encode_in_envelope_optional::<NetworkSocketRecvControlData, D>(
14724                self.network
14725                    .as_ref()
14726                    .map(<NetworkSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
14727                encoder,
14728                offset + cur_offset,
14729                depth,
14730            )?;
14731
14732            _prev_end_offset = cur_offset + envelope_size;
14733
14734            Ok(())
14735        }
14736    }
14737
14738    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14739        for DatagramSocketRecvControlData
14740    {
14741        #[inline(always)]
14742        fn new_empty() -> Self {
14743            Self::default()
14744        }
14745
14746        unsafe fn decode(
14747            &mut self,
14748            decoder: &mut fidl::encoding::Decoder<'_, D>,
14749            offset: usize,
14750            mut depth: fidl::encoding::Depth,
14751        ) -> fidl::Result<()> {
14752            decoder.debug_check_bounds::<Self>(offset);
14753            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14754                None => return Err(fidl::Error::NotNullable),
14755                Some(len) => len,
14756            };
14757            // Calling decoder.out_of_line_offset(0) is not allowed.
14758            if len == 0 {
14759                return Ok(());
14760            };
14761            depth.increment()?;
14762            let envelope_size = 8;
14763            let bytes_len = len * envelope_size;
14764            let offset = decoder.out_of_line_offset(bytes_len)?;
14765            // Decode the envelope for each type.
14766            let mut _next_ordinal_to_read = 0;
14767            let mut next_offset = offset;
14768            let end_offset = offset + bytes_len;
14769            _next_ordinal_to_read += 1;
14770            if next_offset >= end_offset {
14771                return Ok(());
14772            }
14773
14774            // Decode unknown envelopes for gaps in ordinals.
14775            while _next_ordinal_to_read < 1 {
14776                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14777                _next_ordinal_to_read += 1;
14778                next_offset += envelope_size;
14779            }
14780
14781            let next_out_of_line = decoder.next_out_of_line();
14782            let handles_before = decoder.remaining_handles();
14783            if let Some((inlined, num_bytes, num_handles)) =
14784                fidl::encoding::decode_envelope_header(decoder, next_offset)?
14785            {
14786                let member_inline_size =
14787                    <NetworkSocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
14788                        decoder.context,
14789                    );
14790                if inlined != (member_inline_size <= 4) {
14791                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
14792                }
14793                let inner_offset;
14794                let mut inner_depth = depth.clone();
14795                if inlined {
14796                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14797                    inner_offset = next_offset;
14798                } else {
14799                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14800                    inner_depth.increment()?;
14801                }
14802                let val_ref = self
14803                    .network
14804                    .get_or_insert_with(|| fidl::new_empty!(NetworkSocketRecvControlData, D));
14805                fidl::decode!(
14806                    NetworkSocketRecvControlData,
14807                    D,
14808                    val_ref,
14809                    decoder,
14810                    inner_offset,
14811                    inner_depth
14812                )?;
14813                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14814                {
14815                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
14816                }
14817                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14818                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14819                }
14820            }
14821
14822            next_offset += envelope_size;
14823
14824            // Decode the remaining unknown envelopes.
14825            while next_offset < end_offset {
14826                _next_ordinal_to_read += 1;
14827                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14828                next_offset += envelope_size;
14829            }
14830
14831            Ok(())
14832        }
14833    }
14834
14835    impl DatagramSocketSendControlData {
14836        #[inline(always)]
14837        fn max_ordinal_present(&self) -> u64 {
14838            if let Some(_) = self.network {
14839                return 1;
14840            }
14841            0
14842        }
14843    }
14844
14845    impl fidl::encoding::ValueTypeMarker for DatagramSocketSendControlData {
14846        type Borrowed<'a> = &'a Self;
14847        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14848            value
14849        }
14850    }
14851
14852    unsafe impl fidl::encoding::TypeMarker for DatagramSocketSendControlData {
14853        type Owned = Self;
14854
14855        #[inline(always)]
14856        fn inline_align(_context: fidl::encoding::Context) -> usize {
14857            8
14858        }
14859
14860        #[inline(always)]
14861        fn inline_size(_context: fidl::encoding::Context) -> usize {
14862            16
14863        }
14864    }
14865
14866    unsafe impl<D: fidl::encoding::ResourceDialect>
14867        fidl::encoding::Encode<DatagramSocketSendControlData, D>
14868        for &DatagramSocketSendControlData
14869    {
14870        unsafe fn encode(
14871            self,
14872            encoder: &mut fidl::encoding::Encoder<'_, D>,
14873            offset: usize,
14874            mut depth: fidl::encoding::Depth,
14875        ) -> fidl::Result<()> {
14876            encoder.debug_check_bounds::<DatagramSocketSendControlData>(offset);
14877            // Vector header
14878            let max_ordinal: u64 = self.max_ordinal_present();
14879            encoder.write_num(max_ordinal, offset);
14880            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14881            // Calling encoder.out_of_line_offset(0) is not allowed.
14882            if max_ordinal == 0 {
14883                return Ok(());
14884            }
14885            depth.increment()?;
14886            let envelope_size = 8;
14887            let bytes_len = max_ordinal as usize * envelope_size;
14888            #[allow(unused_variables)]
14889            let offset = encoder.out_of_line_offset(bytes_len);
14890            let mut _prev_end_offset: usize = 0;
14891            if 1 > max_ordinal {
14892                return Ok(());
14893            }
14894
14895            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14896            // are envelope_size bytes.
14897            let cur_offset: usize = (1 - 1) * envelope_size;
14898
14899            // Zero reserved fields.
14900            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14901
14902            // Safety:
14903            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
14904            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
14905            //   envelope_size bytes, there is always sufficient room.
14906            fidl::encoding::encode_in_envelope_optional::<NetworkSocketSendControlData, D>(
14907                self.network
14908                    .as_ref()
14909                    .map(<NetworkSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
14910                encoder,
14911                offset + cur_offset,
14912                depth,
14913            )?;
14914
14915            _prev_end_offset = cur_offset + envelope_size;
14916
14917            Ok(())
14918        }
14919    }
14920
14921    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14922        for DatagramSocketSendControlData
14923    {
14924        #[inline(always)]
14925        fn new_empty() -> Self {
14926            Self::default()
14927        }
14928
14929        unsafe fn decode(
14930            &mut self,
14931            decoder: &mut fidl::encoding::Decoder<'_, D>,
14932            offset: usize,
14933            mut depth: fidl::encoding::Depth,
14934        ) -> fidl::Result<()> {
14935            decoder.debug_check_bounds::<Self>(offset);
14936            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14937                None => return Err(fidl::Error::NotNullable),
14938                Some(len) => len,
14939            };
14940            // Calling decoder.out_of_line_offset(0) is not allowed.
14941            if len == 0 {
14942                return Ok(());
14943            };
14944            depth.increment()?;
14945            let envelope_size = 8;
14946            let bytes_len = len * envelope_size;
14947            let offset = decoder.out_of_line_offset(bytes_len)?;
14948            // Decode the envelope for each type.
14949            let mut _next_ordinal_to_read = 0;
14950            let mut next_offset = offset;
14951            let end_offset = offset + bytes_len;
14952            _next_ordinal_to_read += 1;
14953            if next_offset >= end_offset {
14954                return Ok(());
14955            }
14956
14957            // Decode unknown envelopes for gaps in ordinals.
14958            while _next_ordinal_to_read < 1 {
14959                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14960                _next_ordinal_to_read += 1;
14961                next_offset += envelope_size;
14962            }
14963
14964            let next_out_of_line = decoder.next_out_of_line();
14965            let handles_before = decoder.remaining_handles();
14966            if let Some((inlined, num_bytes, num_handles)) =
14967                fidl::encoding::decode_envelope_header(decoder, next_offset)?
14968            {
14969                let member_inline_size =
14970                    <NetworkSocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
14971                        decoder.context,
14972                    );
14973                if inlined != (member_inline_size <= 4) {
14974                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
14975                }
14976                let inner_offset;
14977                let mut inner_depth = depth.clone();
14978                if inlined {
14979                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14980                    inner_offset = next_offset;
14981                } else {
14982                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14983                    inner_depth.increment()?;
14984                }
14985                let val_ref = self
14986                    .network
14987                    .get_or_insert_with(|| fidl::new_empty!(NetworkSocketSendControlData, D));
14988                fidl::decode!(
14989                    NetworkSocketSendControlData,
14990                    D,
14991                    val_ref,
14992                    decoder,
14993                    inner_offset,
14994                    inner_depth
14995                )?;
14996                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14997                {
14998                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
14999                }
15000                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15001                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15002                }
15003            }
15004
15005            next_offset += envelope_size;
15006
15007            // Decode the remaining unknown envelopes.
15008            while next_offset < end_offset {
15009                _next_ordinal_to_read += 1;
15010                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15011                next_offset += envelope_size;
15012            }
15013
15014            Ok(())
15015        }
15016    }
15017
15018    impl DatagramSocketSendMsgPreflightRequest {
15019        #[inline(always)]
15020        fn max_ordinal_present(&self) -> u64 {
15021            if let Some(_) = self.ipv6_pktinfo {
15022                return 2;
15023            }
15024            if let Some(_) = self.to {
15025                return 1;
15026            }
15027            0
15028        }
15029    }
15030
15031    impl fidl::encoding::ValueTypeMarker for DatagramSocketSendMsgPreflightRequest {
15032        type Borrowed<'a> = &'a Self;
15033        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15034            value
15035        }
15036    }
15037
15038    unsafe impl fidl::encoding::TypeMarker for DatagramSocketSendMsgPreflightRequest {
15039        type Owned = Self;
15040
15041        #[inline(always)]
15042        fn inline_align(_context: fidl::encoding::Context) -> usize {
15043            8
15044        }
15045
15046        #[inline(always)]
15047        fn inline_size(_context: fidl::encoding::Context) -> usize {
15048            16
15049        }
15050    }
15051
15052    unsafe impl<D: fidl::encoding::ResourceDialect>
15053        fidl::encoding::Encode<DatagramSocketSendMsgPreflightRequest, D>
15054        for &DatagramSocketSendMsgPreflightRequest
15055    {
15056        unsafe fn encode(
15057            self,
15058            encoder: &mut fidl::encoding::Encoder<'_, D>,
15059            offset: usize,
15060            mut depth: fidl::encoding::Depth,
15061        ) -> fidl::Result<()> {
15062            encoder.debug_check_bounds::<DatagramSocketSendMsgPreflightRequest>(offset);
15063            // Vector header
15064            let max_ordinal: u64 = self.max_ordinal_present();
15065            encoder.write_num(max_ordinal, offset);
15066            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15067            // Calling encoder.out_of_line_offset(0) is not allowed.
15068            if max_ordinal == 0 {
15069                return Ok(());
15070            }
15071            depth.increment()?;
15072            let envelope_size = 8;
15073            let bytes_len = max_ordinal as usize * envelope_size;
15074            #[allow(unused_variables)]
15075            let offset = encoder.out_of_line_offset(bytes_len);
15076            let mut _prev_end_offset: usize = 0;
15077            if 1 > max_ordinal {
15078                return Ok(());
15079            }
15080
15081            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15082            // are envelope_size bytes.
15083            let cur_offset: usize = (1 - 1) * envelope_size;
15084
15085            // Zero reserved fields.
15086            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15087
15088            // Safety:
15089            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15090            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15091            //   envelope_size bytes, there is always sufficient room.
15092            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
15093            self.to.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
15094            encoder, offset + cur_offset, depth
15095        )?;
15096
15097            _prev_end_offset = cur_offset + envelope_size;
15098            if 2 > max_ordinal {
15099                return Ok(());
15100            }
15101
15102            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15103            // are envelope_size bytes.
15104            let cur_offset: usize = (2 - 1) * envelope_size;
15105
15106            // Zero reserved fields.
15107            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15108
15109            // Safety:
15110            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15111            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15112            //   envelope_size bytes, there is always sufficient room.
15113            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoSendControlData, D>(
15114                self.ipv6_pktinfo
15115                    .as_ref()
15116                    .map(<Ipv6PktInfoSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
15117                encoder,
15118                offset + cur_offset,
15119                depth,
15120            )?;
15121
15122            _prev_end_offset = cur_offset + envelope_size;
15123
15124            Ok(())
15125        }
15126    }
15127
15128    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15129        for DatagramSocketSendMsgPreflightRequest
15130    {
15131        #[inline(always)]
15132        fn new_empty() -> Self {
15133            Self::default()
15134        }
15135
15136        unsafe fn decode(
15137            &mut self,
15138            decoder: &mut fidl::encoding::Decoder<'_, D>,
15139            offset: usize,
15140            mut depth: fidl::encoding::Depth,
15141        ) -> fidl::Result<()> {
15142            decoder.debug_check_bounds::<Self>(offset);
15143            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15144                None => return Err(fidl::Error::NotNullable),
15145                Some(len) => len,
15146            };
15147            // Calling decoder.out_of_line_offset(0) is not allowed.
15148            if len == 0 {
15149                return Ok(());
15150            };
15151            depth.increment()?;
15152            let envelope_size = 8;
15153            let bytes_len = len * envelope_size;
15154            let offset = decoder.out_of_line_offset(bytes_len)?;
15155            // Decode the envelope for each type.
15156            let mut _next_ordinal_to_read = 0;
15157            let mut next_offset = offset;
15158            let end_offset = offset + bytes_len;
15159            _next_ordinal_to_read += 1;
15160            if next_offset >= end_offset {
15161                return Ok(());
15162            }
15163
15164            // Decode unknown envelopes for gaps in ordinals.
15165            while _next_ordinal_to_read < 1 {
15166                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15167                _next_ordinal_to_read += 1;
15168                next_offset += envelope_size;
15169            }
15170
15171            let next_out_of_line = decoder.next_out_of_line();
15172            let handles_before = decoder.remaining_handles();
15173            if let Some((inlined, num_bytes, num_handles)) =
15174                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15175            {
15176                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15177                if inlined != (member_inline_size <= 4) {
15178                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15179                }
15180                let inner_offset;
15181                let mut inner_depth = depth.clone();
15182                if inlined {
15183                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15184                    inner_offset = next_offset;
15185                } else {
15186                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15187                    inner_depth.increment()?;
15188                }
15189                let val_ref = self.to.get_or_insert_with(|| {
15190                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
15191                });
15192                fidl::decode!(
15193                    fidl_fuchsia_net__common::SocketAddress,
15194                    D,
15195                    val_ref,
15196                    decoder,
15197                    inner_offset,
15198                    inner_depth
15199                )?;
15200                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15201                {
15202                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15203                }
15204                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15205                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15206                }
15207            }
15208
15209            next_offset += envelope_size;
15210            _next_ordinal_to_read += 1;
15211            if next_offset >= end_offset {
15212                return Ok(());
15213            }
15214
15215            // Decode unknown envelopes for gaps in ordinals.
15216            while _next_ordinal_to_read < 2 {
15217                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15218                _next_ordinal_to_read += 1;
15219                next_offset += envelope_size;
15220            }
15221
15222            let next_out_of_line = decoder.next_out_of_line();
15223            let handles_before = decoder.remaining_handles();
15224            if let Some((inlined, num_bytes, num_handles)) =
15225                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15226            {
15227                let member_inline_size =
15228                    <Ipv6PktInfoSendControlData as fidl::encoding::TypeMarker>::inline_size(
15229                        decoder.context,
15230                    );
15231                if inlined != (member_inline_size <= 4) {
15232                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15233                }
15234                let inner_offset;
15235                let mut inner_depth = depth.clone();
15236                if inlined {
15237                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15238                    inner_offset = next_offset;
15239                } else {
15240                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15241                    inner_depth.increment()?;
15242                }
15243                let val_ref = self
15244                    .ipv6_pktinfo
15245                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoSendControlData, D));
15246                fidl::decode!(
15247                    Ipv6PktInfoSendControlData,
15248                    D,
15249                    val_ref,
15250                    decoder,
15251                    inner_offset,
15252                    inner_depth
15253                )?;
15254                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15255                {
15256                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15257                }
15258                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15259                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15260                }
15261            }
15262
15263            next_offset += envelope_size;
15264
15265            // Decode the remaining unknown envelopes.
15266            while next_offset < end_offset {
15267                _next_ordinal_to_read += 1;
15268                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15269                next_offset += envelope_size;
15270            }
15271
15272            Ok(())
15273        }
15274    }
15275
15276    impl InterfaceAddresses {
15277        #[inline(always)]
15278        fn max_ordinal_present(&self) -> u64 {
15279            if let Some(_) = self.interface_flags {
15280                return 5;
15281            }
15282            if let Some(_) = self.addresses {
15283                return 4;
15284            }
15285            if let Some(_) = self.name {
15286                return 2;
15287            }
15288            if let Some(_) = self.id {
15289                return 1;
15290            }
15291            0
15292        }
15293    }
15294
15295    impl fidl::encoding::ValueTypeMarker for InterfaceAddresses {
15296        type Borrowed<'a> = &'a Self;
15297        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15298            value
15299        }
15300    }
15301
15302    unsafe impl fidl::encoding::TypeMarker for InterfaceAddresses {
15303        type Owned = Self;
15304
15305        #[inline(always)]
15306        fn inline_align(_context: fidl::encoding::Context) -> usize {
15307            8
15308        }
15309
15310        #[inline(always)]
15311        fn inline_size(_context: fidl::encoding::Context) -> usize {
15312            16
15313        }
15314    }
15315
15316    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InterfaceAddresses, D>
15317        for &InterfaceAddresses
15318    {
15319        unsafe fn encode(
15320            self,
15321            encoder: &mut fidl::encoding::Encoder<'_, D>,
15322            offset: usize,
15323            mut depth: fidl::encoding::Depth,
15324        ) -> fidl::Result<()> {
15325            encoder.debug_check_bounds::<InterfaceAddresses>(offset);
15326            // Vector header
15327            let max_ordinal: u64 = self.max_ordinal_present();
15328            encoder.write_num(max_ordinal, offset);
15329            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15330            // Calling encoder.out_of_line_offset(0) is not allowed.
15331            if max_ordinal == 0 {
15332                return Ok(());
15333            }
15334            depth.increment()?;
15335            let envelope_size = 8;
15336            let bytes_len = max_ordinal as usize * envelope_size;
15337            #[allow(unused_variables)]
15338            let offset = encoder.out_of_line_offset(bytes_len);
15339            let mut _prev_end_offset: usize = 0;
15340            if 1 > max_ordinal {
15341                return Ok(());
15342            }
15343
15344            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15345            // are envelope_size bytes.
15346            let cur_offset: usize = (1 - 1) * envelope_size;
15347
15348            // Zero reserved fields.
15349            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15350
15351            // Safety:
15352            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15353            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15354            //   envelope_size bytes, there is always sufficient room.
15355            fidl::encoding::encode_in_envelope_optional::<u64, D>(
15356                self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
15357                encoder,
15358                offset + cur_offset,
15359                depth,
15360            )?;
15361
15362            _prev_end_offset = cur_offset + envelope_size;
15363            if 2 > max_ordinal {
15364                return Ok(());
15365            }
15366
15367            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15368            // are envelope_size bytes.
15369            let cur_offset: usize = (2 - 1) * envelope_size;
15370
15371            // Zero reserved fields.
15372            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15373
15374            // Safety:
15375            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15376            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15377            //   envelope_size bytes, there is always sufficient room.
15378            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<15>, D>(
15379                self.name.as_ref().map(
15380                    <fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow,
15381                ),
15382                encoder,
15383                offset + cur_offset,
15384                depth,
15385            )?;
15386
15387            _prev_end_offset = cur_offset + envelope_size;
15388            if 4 > max_ordinal {
15389                return Ok(());
15390            }
15391
15392            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15393            // are envelope_size bytes.
15394            let cur_offset: usize = (4 - 1) * envelope_size;
15395
15396            // Zero reserved fields.
15397            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15398
15399            // Safety:
15400            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15401            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15402            //   envelope_size bytes, there is always sufficient room.
15403            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>, D>(
15404            self.addresses.as_ref().map(<fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet> as fidl::encoding::ValueTypeMarker>::borrow),
15405            encoder, offset + cur_offset, depth
15406        )?;
15407
15408            _prev_end_offset = cur_offset + envelope_size;
15409            if 5 > max_ordinal {
15410                return Ok(());
15411            }
15412
15413            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15414            // are envelope_size bytes.
15415            let cur_offset: usize = (5 - 1) * envelope_size;
15416
15417            // Zero reserved fields.
15418            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15419
15420            // Safety:
15421            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15422            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15423            //   envelope_size bytes, there is always sufficient room.
15424            fidl::encoding::encode_in_envelope_optional::<InterfaceFlags, D>(
15425                self.interface_flags
15426                    .as_ref()
15427                    .map(<InterfaceFlags as fidl::encoding::ValueTypeMarker>::borrow),
15428                encoder,
15429                offset + cur_offset,
15430                depth,
15431            )?;
15432
15433            _prev_end_offset = cur_offset + envelope_size;
15434
15435            Ok(())
15436        }
15437    }
15438
15439    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceAddresses {
15440        #[inline(always)]
15441        fn new_empty() -> Self {
15442            Self::default()
15443        }
15444
15445        unsafe fn decode(
15446            &mut self,
15447            decoder: &mut fidl::encoding::Decoder<'_, D>,
15448            offset: usize,
15449            mut depth: fidl::encoding::Depth,
15450        ) -> fidl::Result<()> {
15451            decoder.debug_check_bounds::<Self>(offset);
15452            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15453                None => return Err(fidl::Error::NotNullable),
15454                Some(len) => len,
15455            };
15456            // Calling decoder.out_of_line_offset(0) is not allowed.
15457            if len == 0 {
15458                return Ok(());
15459            };
15460            depth.increment()?;
15461            let envelope_size = 8;
15462            let bytes_len = len * envelope_size;
15463            let offset = decoder.out_of_line_offset(bytes_len)?;
15464            // Decode the envelope for each type.
15465            let mut _next_ordinal_to_read = 0;
15466            let mut next_offset = offset;
15467            let end_offset = offset + bytes_len;
15468            _next_ordinal_to_read += 1;
15469            if next_offset >= end_offset {
15470                return Ok(());
15471            }
15472
15473            // Decode unknown envelopes for gaps in ordinals.
15474            while _next_ordinal_to_read < 1 {
15475                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15476                _next_ordinal_to_read += 1;
15477                next_offset += envelope_size;
15478            }
15479
15480            let next_out_of_line = decoder.next_out_of_line();
15481            let handles_before = decoder.remaining_handles();
15482            if let Some((inlined, num_bytes, num_handles)) =
15483                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15484            {
15485                let member_inline_size =
15486                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15487                if inlined != (member_inline_size <= 4) {
15488                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15489                }
15490                let inner_offset;
15491                let mut inner_depth = depth.clone();
15492                if inlined {
15493                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15494                    inner_offset = next_offset;
15495                } else {
15496                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15497                    inner_depth.increment()?;
15498                }
15499                let val_ref = self.id.get_or_insert_with(|| fidl::new_empty!(u64, D));
15500                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
15501                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15502                {
15503                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15504                }
15505                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15506                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15507                }
15508            }
15509
15510            next_offset += envelope_size;
15511            _next_ordinal_to_read += 1;
15512            if next_offset >= end_offset {
15513                return Ok(());
15514            }
15515
15516            // Decode unknown envelopes for gaps in ordinals.
15517            while _next_ordinal_to_read < 2 {
15518                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15519                _next_ordinal_to_read += 1;
15520                next_offset += envelope_size;
15521            }
15522
15523            let next_out_of_line = decoder.next_out_of_line();
15524            let handles_before = decoder.remaining_handles();
15525            if let Some((inlined, num_bytes, num_handles)) =
15526                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15527            {
15528                let member_inline_size =
15529                    <fidl::encoding::BoundedString<15> as fidl::encoding::TypeMarker>::inline_size(
15530                        decoder.context,
15531                    );
15532                if inlined != (member_inline_size <= 4) {
15533                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15534                }
15535                let inner_offset;
15536                let mut inner_depth = depth.clone();
15537                if inlined {
15538                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15539                    inner_offset = next_offset;
15540                } else {
15541                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15542                    inner_depth.increment()?;
15543                }
15544                let val_ref = self
15545                    .name
15546                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<15>, D));
15547                fidl::decode!(
15548                    fidl::encoding::BoundedString<15>,
15549                    D,
15550                    val_ref,
15551                    decoder,
15552                    inner_offset,
15553                    inner_depth
15554                )?;
15555                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15556                {
15557                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15558                }
15559                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15560                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15561                }
15562            }
15563
15564            next_offset += envelope_size;
15565            _next_ordinal_to_read += 1;
15566            if next_offset >= end_offset {
15567                return Ok(());
15568            }
15569
15570            // Decode unknown envelopes for gaps in ordinals.
15571            while _next_ordinal_to_read < 4 {
15572                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15573                _next_ordinal_to_read += 1;
15574                next_offset += envelope_size;
15575            }
15576
15577            let next_out_of_line = decoder.next_out_of_line();
15578            let handles_before = decoder.remaining_handles();
15579            if let Some((inlined, num_bytes, num_handles)) =
15580                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15581            {
15582                let member_inline_size = <fidl::encoding::UnboundedVector<
15583                    fidl_fuchsia_net__common::Subnet,
15584                > as fidl::encoding::TypeMarker>::inline_size(
15585                    decoder.context
15586                );
15587                if inlined != (member_inline_size <= 4) {
15588                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15589                }
15590                let inner_offset;
15591                let mut inner_depth = depth.clone();
15592                if inlined {
15593                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15594                    inner_offset = next_offset;
15595                } else {
15596                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15597                    inner_depth.increment()?;
15598                }
15599                let val_ref = self.addresses.get_or_insert_with(|| {
15600                    fidl::new_empty!(
15601                        fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>,
15602                        D
15603                    )
15604                });
15605                fidl::decode!(
15606                    fidl::encoding::UnboundedVector<fidl_fuchsia_net__common::Subnet>,
15607                    D,
15608                    val_ref,
15609                    decoder,
15610                    inner_offset,
15611                    inner_depth
15612                )?;
15613                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15614                {
15615                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15616                }
15617                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15618                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15619                }
15620            }
15621
15622            next_offset += envelope_size;
15623            _next_ordinal_to_read += 1;
15624            if next_offset >= end_offset {
15625                return Ok(());
15626            }
15627
15628            // Decode unknown envelopes for gaps in ordinals.
15629            while _next_ordinal_to_read < 5 {
15630                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15631                _next_ordinal_to_read += 1;
15632                next_offset += envelope_size;
15633            }
15634
15635            let next_out_of_line = decoder.next_out_of_line();
15636            let handles_before = decoder.remaining_handles();
15637            if let Some((inlined, num_bytes, num_handles)) =
15638                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15639            {
15640                let member_inline_size =
15641                    <InterfaceFlags as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15642                if inlined != (member_inline_size <= 4) {
15643                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15644                }
15645                let inner_offset;
15646                let mut inner_depth = depth.clone();
15647                if inlined {
15648                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15649                    inner_offset = next_offset;
15650                } else {
15651                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15652                    inner_depth.increment()?;
15653                }
15654                let val_ref =
15655                    self.interface_flags.get_or_insert_with(|| fidl::new_empty!(InterfaceFlags, D));
15656                fidl::decode!(InterfaceFlags, D, val_ref, decoder, inner_offset, inner_depth)?;
15657                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15658                {
15659                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15660                }
15661                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15662                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15663                }
15664            }
15665
15666            next_offset += envelope_size;
15667
15668            // Decode the remaining unknown envelopes.
15669            while next_offset < end_offset {
15670                _next_ordinal_to_read += 1;
15671                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15672                next_offset += envelope_size;
15673            }
15674
15675            Ok(())
15676        }
15677    }
15678
15679    impl IpRecvControlData {
15680        #[inline(always)]
15681        fn max_ordinal_present(&self) -> u64 {
15682            if let Some(_) = self.original_destination_address {
15683                return 3;
15684            }
15685            if let Some(_) = self.ttl {
15686                return 2;
15687            }
15688            if let Some(_) = self.tos {
15689                return 1;
15690            }
15691            0
15692        }
15693    }
15694
15695    impl fidl::encoding::ValueTypeMarker for IpRecvControlData {
15696        type Borrowed<'a> = &'a Self;
15697        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15698            value
15699        }
15700    }
15701
15702    unsafe impl fidl::encoding::TypeMarker for IpRecvControlData {
15703        type Owned = Self;
15704
15705        #[inline(always)]
15706        fn inline_align(_context: fidl::encoding::Context) -> usize {
15707            8
15708        }
15709
15710        #[inline(always)]
15711        fn inline_size(_context: fidl::encoding::Context) -> usize {
15712            16
15713        }
15714    }
15715
15716    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpRecvControlData, D>
15717        for &IpRecvControlData
15718    {
15719        unsafe fn encode(
15720            self,
15721            encoder: &mut fidl::encoding::Encoder<'_, D>,
15722            offset: usize,
15723            mut depth: fidl::encoding::Depth,
15724        ) -> fidl::Result<()> {
15725            encoder.debug_check_bounds::<IpRecvControlData>(offset);
15726            // Vector header
15727            let max_ordinal: u64 = self.max_ordinal_present();
15728            encoder.write_num(max_ordinal, offset);
15729            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15730            // Calling encoder.out_of_line_offset(0) is not allowed.
15731            if max_ordinal == 0 {
15732                return Ok(());
15733            }
15734            depth.increment()?;
15735            let envelope_size = 8;
15736            let bytes_len = max_ordinal as usize * envelope_size;
15737            #[allow(unused_variables)]
15738            let offset = encoder.out_of_line_offset(bytes_len);
15739            let mut _prev_end_offset: usize = 0;
15740            if 1 > max_ordinal {
15741                return Ok(());
15742            }
15743
15744            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15745            // are envelope_size bytes.
15746            let cur_offset: usize = (1 - 1) * envelope_size;
15747
15748            // Zero reserved fields.
15749            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15750
15751            // Safety:
15752            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15753            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15754            //   envelope_size bytes, there is always sufficient room.
15755            fidl::encoding::encode_in_envelope_optional::<u8, D>(
15756                self.tos.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
15757                encoder,
15758                offset + cur_offset,
15759                depth,
15760            )?;
15761
15762            _prev_end_offset = cur_offset + envelope_size;
15763            if 2 > max_ordinal {
15764                return Ok(());
15765            }
15766
15767            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15768            // are envelope_size bytes.
15769            let cur_offset: usize = (2 - 1) * envelope_size;
15770
15771            // Zero reserved fields.
15772            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15773
15774            // Safety:
15775            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15776            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15777            //   envelope_size bytes, there is always sufficient room.
15778            fidl::encoding::encode_in_envelope_optional::<u8, D>(
15779                self.ttl.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
15780                encoder,
15781                offset + cur_offset,
15782                depth,
15783            )?;
15784
15785            _prev_end_offset = cur_offset + envelope_size;
15786            if 3 > max_ordinal {
15787                return Ok(());
15788            }
15789
15790            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15791            // are envelope_size bytes.
15792            let cur_offset: usize = (3 - 1) * envelope_size;
15793
15794            // Zero reserved fields.
15795            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15796
15797            // Safety:
15798            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15799            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15800            //   envelope_size bytes, there is always sufficient room.
15801            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
15802            self.original_destination_address.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
15803            encoder, offset + cur_offset, depth
15804        )?;
15805
15806            _prev_end_offset = cur_offset + envelope_size;
15807
15808            Ok(())
15809        }
15810    }
15811
15812    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpRecvControlData {
15813        #[inline(always)]
15814        fn new_empty() -> Self {
15815            Self::default()
15816        }
15817
15818        unsafe fn decode(
15819            &mut self,
15820            decoder: &mut fidl::encoding::Decoder<'_, D>,
15821            offset: usize,
15822            mut depth: fidl::encoding::Depth,
15823        ) -> fidl::Result<()> {
15824            decoder.debug_check_bounds::<Self>(offset);
15825            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15826                None => return Err(fidl::Error::NotNullable),
15827                Some(len) => len,
15828            };
15829            // Calling decoder.out_of_line_offset(0) is not allowed.
15830            if len == 0 {
15831                return Ok(());
15832            };
15833            depth.increment()?;
15834            let envelope_size = 8;
15835            let bytes_len = len * envelope_size;
15836            let offset = decoder.out_of_line_offset(bytes_len)?;
15837            // Decode the envelope for each type.
15838            let mut _next_ordinal_to_read = 0;
15839            let mut next_offset = offset;
15840            let end_offset = offset + bytes_len;
15841            _next_ordinal_to_read += 1;
15842            if next_offset >= end_offset {
15843                return Ok(());
15844            }
15845
15846            // Decode unknown envelopes for gaps in ordinals.
15847            while _next_ordinal_to_read < 1 {
15848                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15849                _next_ordinal_to_read += 1;
15850                next_offset += envelope_size;
15851            }
15852
15853            let next_out_of_line = decoder.next_out_of_line();
15854            let handles_before = decoder.remaining_handles();
15855            if let Some((inlined, num_bytes, num_handles)) =
15856                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15857            {
15858                let member_inline_size =
15859                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15860                if inlined != (member_inline_size <= 4) {
15861                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15862                }
15863                let inner_offset;
15864                let mut inner_depth = depth.clone();
15865                if inlined {
15866                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15867                    inner_offset = next_offset;
15868                } else {
15869                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15870                    inner_depth.increment()?;
15871                }
15872                let val_ref = self.tos.get_or_insert_with(|| fidl::new_empty!(u8, D));
15873                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
15874                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15875                {
15876                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15877                }
15878                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15879                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15880                }
15881            }
15882
15883            next_offset += envelope_size;
15884            _next_ordinal_to_read += 1;
15885            if next_offset >= end_offset {
15886                return Ok(());
15887            }
15888
15889            // Decode unknown envelopes for gaps in ordinals.
15890            while _next_ordinal_to_read < 2 {
15891                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15892                _next_ordinal_to_read += 1;
15893                next_offset += envelope_size;
15894            }
15895
15896            let next_out_of_line = decoder.next_out_of_line();
15897            let handles_before = decoder.remaining_handles();
15898            if let Some((inlined, num_bytes, num_handles)) =
15899                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15900            {
15901                let member_inline_size =
15902                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15903                if inlined != (member_inline_size <= 4) {
15904                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15905                }
15906                let inner_offset;
15907                let mut inner_depth = depth.clone();
15908                if inlined {
15909                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15910                    inner_offset = next_offset;
15911                } else {
15912                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15913                    inner_depth.increment()?;
15914                }
15915                let val_ref = self.ttl.get_or_insert_with(|| fidl::new_empty!(u8, D));
15916                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
15917                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15918                {
15919                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15920                }
15921                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15922                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15923                }
15924            }
15925
15926            next_offset += envelope_size;
15927            _next_ordinal_to_read += 1;
15928            if next_offset >= end_offset {
15929                return Ok(());
15930            }
15931
15932            // Decode unknown envelopes for gaps in ordinals.
15933            while _next_ordinal_to_read < 3 {
15934                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15935                _next_ordinal_to_read += 1;
15936                next_offset += envelope_size;
15937            }
15938
15939            let next_out_of_line = decoder.next_out_of_line();
15940            let handles_before = decoder.remaining_handles();
15941            if let Some((inlined, num_bytes, num_handles)) =
15942                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15943            {
15944                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15945                if inlined != (member_inline_size <= 4) {
15946                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15947                }
15948                let inner_offset;
15949                let mut inner_depth = depth.clone();
15950                if inlined {
15951                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15952                    inner_offset = next_offset;
15953                } else {
15954                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15955                    inner_depth.increment()?;
15956                }
15957                let val_ref = self.original_destination_address.get_or_insert_with(|| {
15958                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
15959                });
15960                fidl::decode!(
15961                    fidl_fuchsia_net__common::SocketAddress,
15962                    D,
15963                    val_ref,
15964                    decoder,
15965                    inner_offset,
15966                    inner_depth
15967                )?;
15968                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15969                {
15970                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15971                }
15972                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15973                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15974                }
15975            }
15976
15977            next_offset += envelope_size;
15978
15979            // Decode the remaining unknown envelopes.
15980            while next_offset < end_offset {
15981                _next_ordinal_to_read += 1;
15982                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15983                next_offset += envelope_size;
15984            }
15985
15986            Ok(())
15987        }
15988    }
15989
15990    impl IpSendControlData {
15991        #[inline(always)]
15992        fn max_ordinal_present(&self) -> u64 {
15993            if let Some(_) = self.ttl {
15994                return 2;
15995            }
15996            0
15997        }
15998    }
15999
16000    impl fidl::encoding::ValueTypeMarker for IpSendControlData {
16001        type Borrowed<'a> = &'a Self;
16002        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16003            value
16004        }
16005    }
16006
16007    unsafe impl fidl::encoding::TypeMarker for IpSendControlData {
16008        type Owned = Self;
16009
16010        #[inline(always)]
16011        fn inline_align(_context: fidl::encoding::Context) -> usize {
16012            8
16013        }
16014
16015        #[inline(always)]
16016        fn inline_size(_context: fidl::encoding::Context) -> usize {
16017            16
16018        }
16019    }
16020
16021    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpSendControlData, D>
16022        for &IpSendControlData
16023    {
16024        unsafe fn encode(
16025            self,
16026            encoder: &mut fidl::encoding::Encoder<'_, D>,
16027            offset: usize,
16028            mut depth: fidl::encoding::Depth,
16029        ) -> fidl::Result<()> {
16030            encoder.debug_check_bounds::<IpSendControlData>(offset);
16031            // Vector header
16032            let max_ordinal: u64 = self.max_ordinal_present();
16033            encoder.write_num(max_ordinal, offset);
16034            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16035            // Calling encoder.out_of_line_offset(0) is not allowed.
16036            if max_ordinal == 0 {
16037                return Ok(());
16038            }
16039            depth.increment()?;
16040            let envelope_size = 8;
16041            let bytes_len = max_ordinal as usize * envelope_size;
16042            #[allow(unused_variables)]
16043            let offset = encoder.out_of_line_offset(bytes_len);
16044            let mut _prev_end_offset: usize = 0;
16045            if 2 > max_ordinal {
16046                return Ok(());
16047            }
16048
16049            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16050            // are envelope_size bytes.
16051            let cur_offset: usize = (2 - 1) * envelope_size;
16052
16053            // Zero reserved fields.
16054            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16055
16056            // Safety:
16057            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16058            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16059            //   envelope_size bytes, there is always sufficient room.
16060            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16061                self.ttl.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16062                encoder,
16063                offset + cur_offset,
16064                depth,
16065            )?;
16066
16067            _prev_end_offset = cur_offset + envelope_size;
16068
16069            Ok(())
16070        }
16071    }
16072
16073    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpSendControlData {
16074        #[inline(always)]
16075        fn new_empty() -> Self {
16076            Self::default()
16077        }
16078
16079        unsafe fn decode(
16080            &mut self,
16081            decoder: &mut fidl::encoding::Decoder<'_, D>,
16082            offset: usize,
16083            mut depth: fidl::encoding::Depth,
16084        ) -> fidl::Result<()> {
16085            decoder.debug_check_bounds::<Self>(offset);
16086            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16087                None => return Err(fidl::Error::NotNullable),
16088                Some(len) => len,
16089            };
16090            // Calling decoder.out_of_line_offset(0) is not allowed.
16091            if len == 0 {
16092                return Ok(());
16093            };
16094            depth.increment()?;
16095            let envelope_size = 8;
16096            let bytes_len = len * envelope_size;
16097            let offset = decoder.out_of_line_offset(bytes_len)?;
16098            // Decode the envelope for each type.
16099            let mut _next_ordinal_to_read = 0;
16100            let mut next_offset = offset;
16101            let end_offset = offset + bytes_len;
16102            _next_ordinal_to_read += 1;
16103            if next_offset >= end_offset {
16104                return Ok(());
16105            }
16106
16107            // Decode unknown envelopes for gaps in ordinals.
16108            while _next_ordinal_to_read < 2 {
16109                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16110                _next_ordinal_to_read += 1;
16111                next_offset += envelope_size;
16112            }
16113
16114            let next_out_of_line = decoder.next_out_of_line();
16115            let handles_before = decoder.remaining_handles();
16116            if let Some((inlined, num_bytes, num_handles)) =
16117                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16118            {
16119                let member_inline_size =
16120                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16121                if inlined != (member_inline_size <= 4) {
16122                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16123                }
16124                let inner_offset;
16125                let mut inner_depth = depth.clone();
16126                if inlined {
16127                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16128                    inner_offset = next_offset;
16129                } else {
16130                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16131                    inner_depth.increment()?;
16132                }
16133                let val_ref = self.ttl.get_or_insert_with(|| fidl::new_empty!(u8, D));
16134                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16135                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16136                {
16137                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16138                }
16139                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16140                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16141                }
16142            }
16143
16144            next_offset += envelope_size;
16145
16146            // Decode the remaining unknown envelopes.
16147            while next_offset < end_offset {
16148                _next_ordinal_to_read += 1;
16149                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16150                next_offset += envelope_size;
16151            }
16152
16153            Ok(())
16154        }
16155    }
16156
16157    impl Ipv6RecvControlData {
16158        #[inline(always)]
16159        fn max_ordinal_present(&self) -> u64 {
16160            if let Some(_) = self.pktinfo {
16161                return 3;
16162            }
16163            if let Some(_) = self.hoplimit {
16164                return 2;
16165            }
16166            if let Some(_) = self.tclass {
16167                return 1;
16168            }
16169            0
16170        }
16171    }
16172
16173    impl fidl::encoding::ValueTypeMarker for Ipv6RecvControlData {
16174        type Borrowed<'a> = &'a Self;
16175        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16176            value
16177        }
16178    }
16179
16180    unsafe impl fidl::encoding::TypeMarker for Ipv6RecvControlData {
16181        type Owned = Self;
16182
16183        #[inline(always)]
16184        fn inline_align(_context: fidl::encoding::Context) -> usize {
16185            8
16186        }
16187
16188        #[inline(always)]
16189        fn inline_size(_context: fidl::encoding::Context) -> usize {
16190            16
16191        }
16192    }
16193
16194    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ipv6RecvControlData, D>
16195        for &Ipv6RecvControlData
16196    {
16197        unsafe fn encode(
16198            self,
16199            encoder: &mut fidl::encoding::Encoder<'_, D>,
16200            offset: usize,
16201            mut depth: fidl::encoding::Depth,
16202        ) -> fidl::Result<()> {
16203            encoder.debug_check_bounds::<Ipv6RecvControlData>(offset);
16204            // Vector header
16205            let max_ordinal: u64 = self.max_ordinal_present();
16206            encoder.write_num(max_ordinal, offset);
16207            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16208            // Calling encoder.out_of_line_offset(0) is not allowed.
16209            if max_ordinal == 0 {
16210                return Ok(());
16211            }
16212            depth.increment()?;
16213            let envelope_size = 8;
16214            let bytes_len = max_ordinal as usize * envelope_size;
16215            #[allow(unused_variables)]
16216            let offset = encoder.out_of_line_offset(bytes_len);
16217            let mut _prev_end_offset: usize = 0;
16218            if 1 > max_ordinal {
16219                return Ok(());
16220            }
16221
16222            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16223            // are envelope_size bytes.
16224            let cur_offset: usize = (1 - 1) * envelope_size;
16225
16226            // Zero reserved fields.
16227            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16228
16229            // Safety:
16230            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16231            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16232            //   envelope_size bytes, there is always sufficient room.
16233            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16234                self.tclass.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16235                encoder,
16236                offset + cur_offset,
16237                depth,
16238            )?;
16239
16240            _prev_end_offset = cur_offset + envelope_size;
16241            if 2 > max_ordinal {
16242                return Ok(());
16243            }
16244
16245            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16246            // are envelope_size bytes.
16247            let cur_offset: usize = (2 - 1) * envelope_size;
16248
16249            // Zero reserved fields.
16250            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16251
16252            // Safety:
16253            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16254            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16255            //   envelope_size bytes, there is always sufficient room.
16256            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16257                self.hoplimit.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16258                encoder,
16259                offset + cur_offset,
16260                depth,
16261            )?;
16262
16263            _prev_end_offset = cur_offset + envelope_size;
16264            if 3 > max_ordinal {
16265                return Ok(());
16266            }
16267
16268            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16269            // are envelope_size bytes.
16270            let cur_offset: usize = (3 - 1) * envelope_size;
16271
16272            // Zero reserved fields.
16273            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16274
16275            // Safety:
16276            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16277            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16278            //   envelope_size bytes, there is always sufficient room.
16279            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoRecvControlData, D>(
16280                self.pktinfo
16281                    .as_ref()
16282                    .map(<Ipv6PktInfoRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16283                encoder,
16284                offset + cur_offset,
16285                depth,
16286            )?;
16287
16288            _prev_end_offset = cur_offset + envelope_size;
16289
16290            Ok(())
16291        }
16292    }
16293
16294    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ipv6RecvControlData {
16295        #[inline(always)]
16296        fn new_empty() -> Self {
16297            Self::default()
16298        }
16299
16300        unsafe fn decode(
16301            &mut self,
16302            decoder: &mut fidl::encoding::Decoder<'_, D>,
16303            offset: usize,
16304            mut depth: fidl::encoding::Depth,
16305        ) -> fidl::Result<()> {
16306            decoder.debug_check_bounds::<Self>(offset);
16307            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16308                None => return Err(fidl::Error::NotNullable),
16309                Some(len) => len,
16310            };
16311            // Calling decoder.out_of_line_offset(0) is not allowed.
16312            if len == 0 {
16313                return Ok(());
16314            };
16315            depth.increment()?;
16316            let envelope_size = 8;
16317            let bytes_len = len * envelope_size;
16318            let offset = decoder.out_of_line_offset(bytes_len)?;
16319            // Decode the envelope for each type.
16320            let mut _next_ordinal_to_read = 0;
16321            let mut next_offset = offset;
16322            let end_offset = offset + bytes_len;
16323            _next_ordinal_to_read += 1;
16324            if next_offset >= end_offset {
16325                return Ok(());
16326            }
16327
16328            // Decode unknown envelopes for gaps in ordinals.
16329            while _next_ordinal_to_read < 1 {
16330                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16331                _next_ordinal_to_read += 1;
16332                next_offset += envelope_size;
16333            }
16334
16335            let next_out_of_line = decoder.next_out_of_line();
16336            let handles_before = decoder.remaining_handles();
16337            if let Some((inlined, num_bytes, num_handles)) =
16338                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16339            {
16340                let member_inline_size =
16341                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16342                if inlined != (member_inline_size <= 4) {
16343                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16344                }
16345                let inner_offset;
16346                let mut inner_depth = depth.clone();
16347                if inlined {
16348                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16349                    inner_offset = next_offset;
16350                } else {
16351                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16352                    inner_depth.increment()?;
16353                }
16354                let val_ref = self.tclass.get_or_insert_with(|| fidl::new_empty!(u8, D));
16355                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16356                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16357                {
16358                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16359                }
16360                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16361                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16362                }
16363            }
16364
16365            next_offset += envelope_size;
16366            _next_ordinal_to_read += 1;
16367            if next_offset >= end_offset {
16368                return Ok(());
16369            }
16370
16371            // Decode unknown envelopes for gaps in ordinals.
16372            while _next_ordinal_to_read < 2 {
16373                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16374                _next_ordinal_to_read += 1;
16375                next_offset += envelope_size;
16376            }
16377
16378            let next_out_of_line = decoder.next_out_of_line();
16379            let handles_before = decoder.remaining_handles();
16380            if let Some((inlined, num_bytes, num_handles)) =
16381                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16382            {
16383                let member_inline_size =
16384                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16385                if inlined != (member_inline_size <= 4) {
16386                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16387                }
16388                let inner_offset;
16389                let mut inner_depth = depth.clone();
16390                if inlined {
16391                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16392                    inner_offset = next_offset;
16393                } else {
16394                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16395                    inner_depth.increment()?;
16396                }
16397                let val_ref = self.hoplimit.get_or_insert_with(|| fidl::new_empty!(u8, D));
16398                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16399                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16400                {
16401                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16402                }
16403                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16404                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16405                }
16406            }
16407
16408            next_offset += envelope_size;
16409            _next_ordinal_to_read += 1;
16410            if next_offset >= end_offset {
16411                return Ok(());
16412            }
16413
16414            // Decode unknown envelopes for gaps in ordinals.
16415            while _next_ordinal_to_read < 3 {
16416                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16417                _next_ordinal_to_read += 1;
16418                next_offset += envelope_size;
16419            }
16420
16421            let next_out_of_line = decoder.next_out_of_line();
16422            let handles_before = decoder.remaining_handles();
16423            if let Some((inlined, num_bytes, num_handles)) =
16424                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16425            {
16426                let member_inline_size =
16427                    <Ipv6PktInfoRecvControlData as fidl::encoding::TypeMarker>::inline_size(
16428                        decoder.context,
16429                    );
16430                if inlined != (member_inline_size <= 4) {
16431                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16432                }
16433                let inner_offset;
16434                let mut inner_depth = depth.clone();
16435                if inlined {
16436                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16437                    inner_offset = next_offset;
16438                } else {
16439                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16440                    inner_depth.increment()?;
16441                }
16442                let val_ref = self
16443                    .pktinfo
16444                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoRecvControlData, D));
16445                fidl::decode!(
16446                    Ipv6PktInfoRecvControlData,
16447                    D,
16448                    val_ref,
16449                    decoder,
16450                    inner_offset,
16451                    inner_depth
16452                )?;
16453                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16454                {
16455                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16456                }
16457                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16458                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16459                }
16460            }
16461
16462            next_offset += envelope_size;
16463
16464            // Decode the remaining unknown envelopes.
16465            while next_offset < end_offset {
16466                _next_ordinal_to_read += 1;
16467                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16468                next_offset += envelope_size;
16469            }
16470
16471            Ok(())
16472        }
16473    }
16474
16475    impl Ipv6SendControlData {
16476        #[inline(always)]
16477        fn max_ordinal_present(&self) -> u64 {
16478            if let Some(_) = self.pktinfo {
16479                return 3;
16480            }
16481            if let Some(_) = self.hoplimit {
16482                return 2;
16483            }
16484            0
16485        }
16486    }
16487
16488    impl fidl::encoding::ValueTypeMarker for Ipv6SendControlData {
16489        type Borrowed<'a> = &'a Self;
16490        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16491            value
16492        }
16493    }
16494
16495    unsafe impl fidl::encoding::TypeMarker for Ipv6SendControlData {
16496        type Owned = Self;
16497
16498        #[inline(always)]
16499        fn inline_align(_context: fidl::encoding::Context) -> usize {
16500            8
16501        }
16502
16503        #[inline(always)]
16504        fn inline_size(_context: fidl::encoding::Context) -> usize {
16505            16
16506        }
16507    }
16508
16509    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ipv6SendControlData, D>
16510        for &Ipv6SendControlData
16511    {
16512        unsafe fn encode(
16513            self,
16514            encoder: &mut fidl::encoding::Encoder<'_, D>,
16515            offset: usize,
16516            mut depth: fidl::encoding::Depth,
16517        ) -> fidl::Result<()> {
16518            encoder.debug_check_bounds::<Ipv6SendControlData>(offset);
16519            // Vector header
16520            let max_ordinal: u64 = self.max_ordinal_present();
16521            encoder.write_num(max_ordinal, offset);
16522            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16523            // Calling encoder.out_of_line_offset(0) is not allowed.
16524            if max_ordinal == 0 {
16525                return Ok(());
16526            }
16527            depth.increment()?;
16528            let envelope_size = 8;
16529            let bytes_len = max_ordinal as usize * envelope_size;
16530            #[allow(unused_variables)]
16531            let offset = encoder.out_of_line_offset(bytes_len);
16532            let mut _prev_end_offset: usize = 0;
16533            if 2 > max_ordinal {
16534                return Ok(());
16535            }
16536
16537            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16538            // are envelope_size bytes.
16539            let cur_offset: usize = (2 - 1) * envelope_size;
16540
16541            // Zero reserved fields.
16542            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16543
16544            // Safety:
16545            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16546            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16547            //   envelope_size bytes, there is always sufficient room.
16548            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16549                self.hoplimit.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16550                encoder,
16551                offset + cur_offset,
16552                depth,
16553            )?;
16554
16555            _prev_end_offset = cur_offset + envelope_size;
16556            if 3 > max_ordinal {
16557                return Ok(());
16558            }
16559
16560            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16561            // are envelope_size bytes.
16562            let cur_offset: usize = (3 - 1) * envelope_size;
16563
16564            // Zero reserved fields.
16565            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16566
16567            // Safety:
16568            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16569            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16570            //   envelope_size bytes, there is always sufficient room.
16571            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoSendControlData, D>(
16572                self.pktinfo
16573                    .as_ref()
16574                    .map(<Ipv6PktInfoSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
16575                encoder,
16576                offset + cur_offset,
16577                depth,
16578            )?;
16579
16580            _prev_end_offset = cur_offset + envelope_size;
16581
16582            Ok(())
16583        }
16584    }
16585
16586    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ipv6SendControlData {
16587        #[inline(always)]
16588        fn new_empty() -> Self {
16589            Self::default()
16590        }
16591
16592        unsafe fn decode(
16593            &mut self,
16594            decoder: &mut fidl::encoding::Decoder<'_, D>,
16595            offset: usize,
16596            mut depth: fidl::encoding::Depth,
16597        ) -> fidl::Result<()> {
16598            decoder.debug_check_bounds::<Self>(offset);
16599            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16600                None => return Err(fidl::Error::NotNullable),
16601                Some(len) => len,
16602            };
16603            // Calling decoder.out_of_line_offset(0) is not allowed.
16604            if len == 0 {
16605                return Ok(());
16606            };
16607            depth.increment()?;
16608            let envelope_size = 8;
16609            let bytes_len = len * envelope_size;
16610            let offset = decoder.out_of_line_offset(bytes_len)?;
16611            // Decode the envelope for each type.
16612            let mut _next_ordinal_to_read = 0;
16613            let mut next_offset = offset;
16614            let end_offset = offset + bytes_len;
16615            _next_ordinal_to_read += 1;
16616            if next_offset >= end_offset {
16617                return Ok(());
16618            }
16619
16620            // Decode unknown envelopes for gaps in ordinals.
16621            while _next_ordinal_to_read < 2 {
16622                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16623                _next_ordinal_to_read += 1;
16624                next_offset += envelope_size;
16625            }
16626
16627            let next_out_of_line = decoder.next_out_of_line();
16628            let handles_before = decoder.remaining_handles();
16629            if let Some((inlined, num_bytes, num_handles)) =
16630                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16631            {
16632                let member_inline_size =
16633                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16634                if inlined != (member_inline_size <= 4) {
16635                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16636                }
16637                let inner_offset;
16638                let mut inner_depth = depth.clone();
16639                if inlined {
16640                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16641                    inner_offset = next_offset;
16642                } else {
16643                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16644                    inner_depth.increment()?;
16645                }
16646                let val_ref = self.hoplimit.get_or_insert_with(|| fidl::new_empty!(u8, D));
16647                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16648                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16649                {
16650                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16651                }
16652                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16653                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16654                }
16655            }
16656
16657            next_offset += envelope_size;
16658            _next_ordinal_to_read += 1;
16659            if next_offset >= end_offset {
16660                return Ok(());
16661            }
16662
16663            // Decode unknown envelopes for gaps in ordinals.
16664            while _next_ordinal_to_read < 3 {
16665                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16666                _next_ordinal_to_read += 1;
16667                next_offset += envelope_size;
16668            }
16669
16670            let next_out_of_line = decoder.next_out_of_line();
16671            let handles_before = decoder.remaining_handles();
16672            if let Some((inlined, num_bytes, num_handles)) =
16673                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16674            {
16675                let member_inline_size =
16676                    <Ipv6PktInfoSendControlData as fidl::encoding::TypeMarker>::inline_size(
16677                        decoder.context,
16678                    );
16679                if inlined != (member_inline_size <= 4) {
16680                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16681                }
16682                let inner_offset;
16683                let mut inner_depth = depth.clone();
16684                if inlined {
16685                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16686                    inner_offset = next_offset;
16687                } else {
16688                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16689                    inner_depth.increment()?;
16690                }
16691                let val_ref = self
16692                    .pktinfo
16693                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoSendControlData, D));
16694                fidl::decode!(
16695                    Ipv6PktInfoSendControlData,
16696                    D,
16697                    val_ref,
16698                    decoder,
16699                    inner_offset,
16700                    inner_depth
16701                )?;
16702                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16703                {
16704                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16705                }
16706                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16707                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16708                }
16709            }
16710
16711            next_offset += envelope_size;
16712
16713            // Decode the remaining unknown envelopes.
16714            while next_offset < end_offset {
16715                _next_ordinal_to_read += 1;
16716                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16717                next_offset += envelope_size;
16718            }
16719
16720            Ok(())
16721        }
16722    }
16723
16724    impl NetworkSocketRecvControlData {
16725        #[inline(always)]
16726        fn max_ordinal_present(&self) -> u64 {
16727            if let Some(_) = self.ipv6 {
16728                return 3;
16729            }
16730            if let Some(_) = self.ip {
16731                return 2;
16732            }
16733            if let Some(_) = self.socket {
16734                return 1;
16735            }
16736            0
16737        }
16738    }
16739
16740    impl fidl::encoding::ValueTypeMarker for NetworkSocketRecvControlData {
16741        type Borrowed<'a> = &'a Self;
16742        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16743            value
16744        }
16745    }
16746
16747    unsafe impl fidl::encoding::TypeMarker for NetworkSocketRecvControlData {
16748        type Owned = Self;
16749
16750        #[inline(always)]
16751        fn inline_align(_context: fidl::encoding::Context) -> usize {
16752            8
16753        }
16754
16755        #[inline(always)]
16756        fn inline_size(_context: fidl::encoding::Context) -> usize {
16757            16
16758        }
16759    }
16760
16761    unsafe impl<D: fidl::encoding::ResourceDialect>
16762        fidl::encoding::Encode<NetworkSocketRecvControlData, D> for &NetworkSocketRecvControlData
16763    {
16764        unsafe fn encode(
16765            self,
16766            encoder: &mut fidl::encoding::Encoder<'_, D>,
16767            offset: usize,
16768            mut depth: fidl::encoding::Depth,
16769        ) -> fidl::Result<()> {
16770            encoder.debug_check_bounds::<NetworkSocketRecvControlData>(offset);
16771            // Vector header
16772            let max_ordinal: u64 = self.max_ordinal_present();
16773            encoder.write_num(max_ordinal, offset);
16774            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16775            // Calling encoder.out_of_line_offset(0) is not allowed.
16776            if max_ordinal == 0 {
16777                return Ok(());
16778            }
16779            depth.increment()?;
16780            let envelope_size = 8;
16781            let bytes_len = max_ordinal as usize * envelope_size;
16782            #[allow(unused_variables)]
16783            let offset = encoder.out_of_line_offset(bytes_len);
16784            let mut _prev_end_offset: usize = 0;
16785            if 1 > max_ordinal {
16786                return Ok(());
16787            }
16788
16789            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16790            // are envelope_size bytes.
16791            let cur_offset: usize = (1 - 1) * envelope_size;
16792
16793            // Zero reserved fields.
16794            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16795
16796            // Safety:
16797            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16798            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16799            //   envelope_size bytes, there is always sufficient room.
16800            fidl::encoding::encode_in_envelope_optional::<SocketRecvControlData, D>(
16801                self.socket
16802                    .as_ref()
16803                    .map(<SocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16804                encoder,
16805                offset + cur_offset,
16806                depth,
16807            )?;
16808
16809            _prev_end_offset = cur_offset + envelope_size;
16810            if 2 > max_ordinal {
16811                return Ok(());
16812            }
16813
16814            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16815            // are envelope_size bytes.
16816            let cur_offset: usize = (2 - 1) * envelope_size;
16817
16818            // Zero reserved fields.
16819            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16820
16821            // Safety:
16822            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16823            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16824            //   envelope_size bytes, there is always sufficient room.
16825            fidl::encoding::encode_in_envelope_optional::<IpRecvControlData, D>(
16826                self.ip
16827                    .as_ref()
16828                    .map(<IpRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16829                encoder,
16830                offset + cur_offset,
16831                depth,
16832            )?;
16833
16834            _prev_end_offset = cur_offset + envelope_size;
16835            if 3 > max_ordinal {
16836                return Ok(());
16837            }
16838
16839            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16840            // are envelope_size bytes.
16841            let cur_offset: usize = (3 - 1) * envelope_size;
16842
16843            // Zero reserved fields.
16844            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16845
16846            // Safety:
16847            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16848            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16849            //   envelope_size bytes, there is always sufficient room.
16850            fidl::encoding::encode_in_envelope_optional::<Ipv6RecvControlData, D>(
16851                self.ipv6
16852                    .as_ref()
16853                    .map(<Ipv6RecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16854                encoder,
16855                offset + cur_offset,
16856                depth,
16857            )?;
16858
16859            _prev_end_offset = cur_offset + envelope_size;
16860
16861            Ok(())
16862        }
16863    }
16864
16865    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16866        for NetworkSocketRecvControlData
16867    {
16868        #[inline(always)]
16869        fn new_empty() -> Self {
16870            Self::default()
16871        }
16872
16873        unsafe fn decode(
16874            &mut self,
16875            decoder: &mut fidl::encoding::Decoder<'_, D>,
16876            offset: usize,
16877            mut depth: fidl::encoding::Depth,
16878        ) -> fidl::Result<()> {
16879            decoder.debug_check_bounds::<Self>(offset);
16880            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16881                None => return Err(fidl::Error::NotNullable),
16882                Some(len) => len,
16883            };
16884            // Calling decoder.out_of_line_offset(0) is not allowed.
16885            if len == 0 {
16886                return Ok(());
16887            };
16888            depth.increment()?;
16889            let envelope_size = 8;
16890            let bytes_len = len * envelope_size;
16891            let offset = decoder.out_of_line_offset(bytes_len)?;
16892            // Decode the envelope for each type.
16893            let mut _next_ordinal_to_read = 0;
16894            let mut next_offset = offset;
16895            let end_offset = offset + bytes_len;
16896            _next_ordinal_to_read += 1;
16897            if next_offset >= end_offset {
16898                return Ok(());
16899            }
16900
16901            // Decode unknown envelopes for gaps in ordinals.
16902            while _next_ordinal_to_read < 1 {
16903                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16904                _next_ordinal_to_read += 1;
16905                next_offset += envelope_size;
16906            }
16907
16908            let next_out_of_line = decoder.next_out_of_line();
16909            let handles_before = decoder.remaining_handles();
16910            if let Some((inlined, num_bytes, num_handles)) =
16911                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16912            {
16913                let member_inline_size =
16914                    <SocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
16915                        decoder.context,
16916                    );
16917                if inlined != (member_inline_size <= 4) {
16918                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16919                }
16920                let inner_offset;
16921                let mut inner_depth = depth.clone();
16922                if inlined {
16923                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16924                    inner_offset = next_offset;
16925                } else {
16926                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16927                    inner_depth.increment()?;
16928                }
16929                let val_ref =
16930                    self.socket.get_or_insert_with(|| fidl::new_empty!(SocketRecvControlData, D));
16931                fidl::decode!(
16932                    SocketRecvControlData,
16933                    D,
16934                    val_ref,
16935                    decoder,
16936                    inner_offset,
16937                    inner_depth
16938                )?;
16939                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16940                {
16941                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16942                }
16943                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16944                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16945                }
16946            }
16947
16948            next_offset += envelope_size;
16949            _next_ordinal_to_read += 1;
16950            if next_offset >= end_offset {
16951                return Ok(());
16952            }
16953
16954            // Decode unknown envelopes for gaps in ordinals.
16955            while _next_ordinal_to_read < 2 {
16956                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16957                _next_ordinal_to_read += 1;
16958                next_offset += envelope_size;
16959            }
16960
16961            let next_out_of_line = decoder.next_out_of_line();
16962            let handles_before = decoder.remaining_handles();
16963            if let Some((inlined, num_bytes, num_handles)) =
16964                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16965            {
16966                let member_inline_size =
16967                    <IpRecvControlData as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16968                if inlined != (member_inline_size <= 4) {
16969                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16970                }
16971                let inner_offset;
16972                let mut inner_depth = depth.clone();
16973                if inlined {
16974                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16975                    inner_offset = next_offset;
16976                } else {
16977                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16978                    inner_depth.increment()?;
16979                }
16980                let val_ref = self.ip.get_or_insert_with(|| fidl::new_empty!(IpRecvControlData, D));
16981                fidl::decode!(IpRecvControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
16982                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16983                {
16984                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16985                }
16986                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16987                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16988                }
16989            }
16990
16991            next_offset += envelope_size;
16992            _next_ordinal_to_read += 1;
16993            if next_offset >= end_offset {
16994                return Ok(());
16995            }
16996
16997            // Decode unknown envelopes for gaps in ordinals.
16998            while _next_ordinal_to_read < 3 {
16999                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17000                _next_ordinal_to_read += 1;
17001                next_offset += envelope_size;
17002            }
17003
17004            let next_out_of_line = decoder.next_out_of_line();
17005            let handles_before = decoder.remaining_handles();
17006            if let Some((inlined, num_bytes, num_handles)) =
17007                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17008            {
17009                let member_inline_size =
17010                    <Ipv6RecvControlData as fidl::encoding::TypeMarker>::inline_size(
17011                        decoder.context,
17012                    );
17013                if inlined != (member_inline_size <= 4) {
17014                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17015                }
17016                let inner_offset;
17017                let mut inner_depth = depth.clone();
17018                if inlined {
17019                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17020                    inner_offset = next_offset;
17021                } else {
17022                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17023                    inner_depth.increment()?;
17024                }
17025                let val_ref =
17026                    self.ipv6.get_or_insert_with(|| fidl::new_empty!(Ipv6RecvControlData, D));
17027                fidl::decode!(Ipv6RecvControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17028                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17029                {
17030                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17031                }
17032                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17033                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17034                }
17035            }
17036
17037            next_offset += envelope_size;
17038
17039            // Decode the remaining unknown envelopes.
17040            while next_offset < end_offset {
17041                _next_ordinal_to_read += 1;
17042                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17043                next_offset += envelope_size;
17044            }
17045
17046            Ok(())
17047        }
17048    }
17049
17050    impl NetworkSocketSendControlData {
17051        #[inline(always)]
17052        fn max_ordinal_present(&self) -> u64 {
17053            if let Some(_) = self.ipv6 {
17054                return 3;
17055            }
17056            if let Some(_) = self.ip {
17057                return 2;
17058            }
17059            if let Some(_) = self.socket {
17060                return 1;
17061            }
17062            0
17063        }
17064    }
17065
17066    impl fidl::encoding::ValueTypeMarker for NetworkSocketSendControlData {
17067        type Borrowed<'a> = &'a Self;
17068        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17069            value
17070        }
17071    }
17072
17073    unsafe impl fidl::encoding::TypeMarker for NetworkSocketSendControlData {
17074        type Owned = Self;
17075
17076        #[inline(always)]
17077        fn inline_align(_context: fidl::encoding::Context) -> usize {
17078            8
17079        }
17080
17081        #[inline(always)]
17082        fn inline_size(_context: fidl::encoding::Context) -> usize {
17083            16
17084        }
17085    }
17086
17087    unsafe impl<D: fidl::encoding::ResourceDialect>
17088        fidl::encoding::Encode<NetworkSocketSendControlData, D> for &NetworkSocketSendControlData
17089    {
17090        unsafe fn encode(
17091            self,
17092            encoder: &mut fidl::encoding::Encoder<'_, D>,
17093            offset: usize,
17094            mut depth: fidl::encoding::Depth,
17095        ) -> fidl::Result<()> {
17096            encoder.debug_check_bounds::<NetworkSocketSendControlData>(offset);
17097            // Vector header
17098            let max_ordinal: u64 = self.max_ordinal_present();
17099            encoder.write_num(max_ordinal, offset);
17100            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17101            // Calling encoder.out_of_line_offset(0) is not allowed.
17102            if max_ordinal == 0 {
17103                return Ok(());
17104            }
17105            depth.increment()?;
17106            let envelope_size = 8;
17107            let bytes_len = max_ordinal as usize * envelope_size;
17108            #[allow(unused_variables)]
17109            let offset = encoder.out_of_line_offset(bytes_len);
17110            let mut _prev_end_offset: usize = 0;
17111            if 1 > max_ordinal {
17112                return Ok(());
17113            }
17114
17115            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17116            // are envelope_size bytes.
17117            let cur_offset: usize = (1 - 1) * envelope_size;
17118
17119            // Zero reserved fields.
17120            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17121
17122            // Safety:
17123            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17124            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17125            //   envelope_size bytes, there is always sufficient room.
17126            fidl::encoding::encode_in_envelope_optional::<SocketSendControlData, D>(
17127                self.socket
17128                    .as_ref()
17129                    .map(<SocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17130                encoder,
17131                offset + cur_offset,
17132                depth,
17133            )?;
17134
17135            _prev_end_offset = cur_offset + envelope_size;
17136            if 2 > max_ordinal {
17137                return Ok(());
17138            }
17139
17140            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17141            // are envelope_size bytes.
17142            let cur_offset: usize = (2 - 1) * envelope_size;
17143
17144            // Zero reserved fields.
17145            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17146
17147            // Safety:
17148            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17149            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17150            //   envelope_size bytes, there is always sufficient room.
17151            fidl::encoding::encode_in_envelope_optional::<IpSendControlData, D>(
17152                self.ip
17153                    .as_ref()
17154                    .map(<IpSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17155                encoder,
17156                offset + cur_offset,
17157                depth,
17158            )?;
17159
17160            _prev_end_offset = cur_offset + envelope_size;
17161            if 3 > max_ordinal {
17162                return Ok(());
17163            }
17164
17165            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17166            // are envelope_size bytes.
17167            let cur_offset: usize = (3 - 1) * envelope_size;
17168
17169            // Zero reserved fields.
17170            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17171
17172            // Safety:
17173            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17174            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17175            //   envelope_size bytes, there is always sufficient room.
17176            fidl::encoding::encode_in_envelope_optional::<Ipv6SendControlData, D>(
17177                self.ipv6
17178                    .as_ref()
17179                    .map(<Ipv6SendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17180                encoder,
17181                offset + cur_offset,
17182                depth,
17183            )?;
17184
17185            _prev_end_offset = cur_offset + envelope_size;
17186
17187            Ok(())
17188        }
17189    }
17190
17191    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17192        for NetworkSocketSendControlData
17193    {
17194        #[inline(always)]
17195        fn new_empty() -> Self {
17196            Self::default()
17197        }
17198
17199        unsafe fn decode(
17200            &mut self,
17201            decoder: &mut fidl::encoding::Decoder<'_, D>,
17202            offset: usize,
17203            mut depth: fidl::encoding::Depth,
17204        ) -> fidl::Result<()> {
17205            decoder.debug_check_bounds::<Self>(offset);
17206            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17207                None => return Err(fidl::Error::NotNullable),
17208                Some(len) => len,
17209            };
17210            // Calling decoder.out_of_line_offset(0) is not allowed.
17211            if len == 0 {
17212                return Ok(());
17213            };
17214            depth.increment()?;
17215            let envelope_size = 8;
17216            let bytes_len = len * envelope_size;
17217            let offset = decoder.out_of_line_offset(bytes_len)?;
17218            // Decode the envelope for each type.
17219            let mut _next_ordinal_to_read = 0;
17220            let mut next_offset = offset;
17221            let end_offset = offset + bytes_len;
17222            _next_ordinal_to_read += 1;
17223            if next_offset >= end_offset {
17224                return Ok(());
17225            }
17226
17227            // Decode unknown envelopes for gaps in ordinals.
17228            while _next_ordinal_to_read < 1 {
17229                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17230                _next_ordinal_to_read += 1;
17231                next_offset += envelope_size;
17232            }
17233
17234            let next_out_of_line = decoder.next_out_of_line();
17235            let handles_before = decoder.remaining_handles();
17236            if let Some((inlined, num_bytes, num_handles)) =
17237                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17238            {
17239                let member_inline_size =
17240                    <SocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
17241                        decoder.context,
17242                    );
17243                if inlined != (member_inline_size <= 4) {
17244                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17245                }
17246                let inner_offset;
17247                let mut inner_depth = depth.clone();
17248                if inlined {
17249                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17250                    inner_offset = next_offset;
17251                } else {
17252                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17253                    inner_depth.increment()?;
17254                }
17255                let val_ref =
17256                    self.socket.get_or_insert_with(|| fidl::new_empty!(SocketSendControlData, D));
17257                fidl::decode!(
17258                    SocketSendControlData,
17259                    D,
17260                    val_ref,
17261                    decoder,
17262                    inner_offset,
17263                    inner_depth
17264                )?;
17265                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17266                {
17267                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17268                }
17269                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17270                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17271                }
17272            }
17273
17274            next_offset += envelope_size;
17275            _next_ordinal_to_read += 1;
17276            if next_offset >= end_offset {
17277                return Ok(());
17278            }
17279
17280            // Decode unknown envelopes for gaps in ordinals.
17281            while _next_ordinal_to_read < 2 {
17282                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17283                _next_ordinal_to_read += 1;
17284                next_offset += envelope_size;
17285            }
17286
17287            let next_out_of_line = decoder.next_out_of_line();
17288            let handles_before = decoder.remaining_handles();
17289            if let Some((inlined, num_bytes, num_handles)) =
17290                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17291            {
17292                let member_inline_size =
17293                    <IpSendControlData as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17294                if inlined != (member_inline_size <= 4) {
17295                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17296                }
17297                let inner_offset;
17298                let mut inner_depth = depth.clone();
17299                if inlined {
17300                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17301                    inner_offset = next_offset;
17302                } else {
17303                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17304                    inner_depth.increment()?;
17305                }
17306                let val_ref = self.ip.get_or_insert_with(|| fidl::new_empty!(IpSendControlData, D));
17307                fidl::decode!(IpSendControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17308                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17309                {
17310                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17311                }
17312                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17313                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17314                }
17315            }
17316
17317            next_offset += envelope_size;
17318            _next_ordinal_to_read += 1;
17319            if next_offset >= end_offset {
17320                return Ok(());
17321            }
17322
17323            // Decode unknown envelopes for gaps in ordinals.
17324            while _next_ordinal_to_read < 3 {
17325                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17326                _next_ordinal_to_read += 1;
17327                next_offset += envelope_size;
17328            }
17329
17330            let next_out_of_line = decoder.next_out_of_line();
17331            let handles_before = decoder.remaining_handles();
17332            if let Some((inlined, num_bytes, num_handles)) =
17333                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17334            {
17335                let member_inline_size =
17336                    <Ipv6SendControlData as fidl::encoding::TypeMarker>::inline_size(
17337                        decoder.context,
17338                    );
17339                if inlined != (member_inline_size <= 4) {
17340                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17341                }
17342                let inner_offset;
17343                let mut inner_depth = depth.clone();
17344                if inlined {
17345                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17346                    inner_offset = next_offset;
17347                } else {
17348                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17349                    inner_depth.increment()?;
17350                }
17351                let val_ref =
17352                    self.ipv6.get_or_insert_with(|| fidl::new_empty!(Ipv6SendControlData, D));
17353                fidl::decode!(Ipv6SendControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17354                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17355                {
17356                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17357                }
17358                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17359                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17360                }
17361            }
17362
17363            next_offset += envelope_size;
17364
17365            // Decode the remaining unknown envelopes.
17366            while next_offset < end_offset {
17367                _next_ordinal_to_read += 1;
17368                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17369                next_offset += envelope_size;
17370            }
17371
17372            Ok(())
17373        }
17374    }
17375
17376    impl RecvMsgMeta {
17377        #[inline(always)]
17378        fn max_ordinal_present(&self) -> u64 {
17379            if let Some(_) = self.payload_len {
17380                return 3;
17381            }
17382            if let Some(_) = self.control {
17383                return 2;
17384            }
17385            if let Some(_) = self.from {
17386                return 1;
17387            }
17388            0
17389        }
17390    }
17391
17392    impl fidl::encoding::ValueTypeMarker for RecvMsgMeta {
17393        type Borrowed<'a> = &'a Self;
17394        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17395            value
17396        }
17397    }
17398
17399    unsafe impl fidl::encoding::TypeMarker for RecvMsgMeta {
17400        type Owned = Self;
17401
17402        #[inline(always)]
17403        fn inline_align(_context: fidl::encoding::Context) -> usize {
17404            8
17405        }
17406
17407        #[inline(always)]
17408        fn inline_size(_context: fidl::encoding::Context) -> usize {
17409            16
17410        }
17411    }
17412
17413    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecvMsgMeta, D>
17414        for &RecvMsgMeta
17415    {
17416        unsafe fn encode(
17417            self,
17418            encoder: &mut fidl::encoding::Encoder<'_, D>,
17419            offset: usize,
17420            mut depth: fidl::encoding::Depth,
17421        ) -> fidl::Result<()> {
17422            encoder.debug_check_bounds::<RecvMsgMeta>(offset);
17423            // Vector header
17424            let max_ordinal: u64 = self.max_ordinal_present();
17425            encoder.write_num(max_ordinal, offset);
17426            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17427            // Calling encoder.out_of_line_offset(0) is not allowed.
17428            if max_ordinal == 0 {
17429                return Ok(());
17430            }
17431            depth.increment()?;
17432            let envelope_size = 8;
17433            let bytes_len = max_ordinal as usize * envelope_size;
17434            #[allow(unused_variables)]
17435            let offset = encoder.out_of_line_offset(bytes_len);
17436            let mut _prev_end_offset: usize = 0;
17437            if 1 > max_ordinal {
17438                return Ok(());
17439            }
17440
17441            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17442            // are envelope_size bytes.
17443            let cur_offset: usize = (1 - 1) * envelope_size;
17444
17445            // Zero reserved fields.
17446            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17447
17448            // Safety:
17449            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17450            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17451            //   envelope_size bytes, there is always sufficient room.
17452            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
17453            self.from.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
17454            encoder, offset + cur_offset, depth
17455        )?;
17456
17457            _prev_end_offset = cur_offset + envelope_size;
17458            if 2 > max_ordinal {
17459                return Ok(());
17460            }
17461
17462            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17463            // are envelope_size bytes.
17464            let cur_offset: usize = (2 - 1) * envelope_size;
17465
17466            // Zero reserved fields.
17467            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17468
17469            // Safety:
17470            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17471            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17472            //   envelope_size bytes, there is always sufficient room.
17473            fidl::encoding::encode_in_envelope_optional::<DatagramSocketRecvControlData, D>(
17474                self.control.as_ref().map(
17475                    <DatagramSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow,
17476                ),
17477                encoder,
17478                offset + cur_offset,
17479                depth,
17480            )?;
17481
17482            _prev_end_offset = cur_offset + envelope_size;
17483            if 3 > max_ordinal {
17484                return Ok(());
17485            }
17486
17487            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17488            // are envelope_size bytes.
17489            let cur_offset: usize = (3 - 1) * envelope_size;
17490
17491            // Zero reserved fields.
17492            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17493
17494            // Safety:
17495            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17496            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17497            //   envelope_size bytes, there is always sufficient room.
17498            fidl::encoding::encode_in_envelope_optional::<u16, D>(
17499                self.payload_len.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
17500                encoder,
17501                offset + cur_offset,
17502                depth,
17503            )?;
17504
17505            _prev_end_offset = cur_offset + envelope_size;
17506
17507            Ok(())
17508        }
17509    }
17510
17511    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecvMsgMeta {
17512        #[inline(always)]
17513        fn new_empty() -> Self {
17514            Self::default()
17515        }
17516
17517        unsafe fn decode(
17518            &mut self,
17519            decoder: &mut fidl::encoding::Decoder<'_, D>,
17520            offset: usize,
17521            mut depth: fidl::encoding::Depth,
17522        ) -> fidl::Result<()> {
17523            decoder.debug_check_bounds::<Self>(offset);
17524            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17525                None => return Err(fidl::Error::NotNullable),
17526                Some(len) => len,
17527            };
17528            // Calling decoder.out_of_line_offset(0) is not allowed.
17529            if len == 0 {
17530                return Ok(());
17531            };
17532            depth.increment()?;
17533            let envelope_size = 8;
17534            let bytes_len = len * envelope_size;
17535            let offset = decoder.out_of_line_offset(bytes_len)?;
17536            // Decode the envelope for each type.
17537            let mut _next_ordinal_to_read = 0;
17538            let mut next_offset = offset;
17539            let end_offset = offset + bytes_len;
17540            _next_ordinal_to_read += 1;
17541            if next_offset >= end_offset {
17542                return Ok(());
17543            }
17544
17545            // Decode unknown envelopes for gaps in ordinals.
17546            while _next_ordinal_to_read < 1 {
17547                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17548                _next_ordinal_to_read += 1;
17549                next_offset += envelope_size;
17550            }
17551
17552            let next_out_of_line = decoder.next_out_of_line();
17553            let handles_before = decoder.remaining_handles();
17554            if let Some((inlined, num_bytes, num_handles)) =
17555                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17556            {
17557                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17558                if inlined != (member_inline_size <= 4) {
17559                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17560                }
17561                let inner_offset;
17562                let mut inner_depth = depth.clone();
17563                if inlined {
17564                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17565                    inner_offset = next_offset;
17566                } else {
17567                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17568                    inner_depth.increment()?;
17569                }
17570                let val_ref = self.from.get_or_insert_with(|| {
17571                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
17572                });
17573                fidl::decode!(
17574                    fidl_fuchsia_net__common::SocketAddress,
17575                    D,
17576                    val_ref,
17577                    decoder,
17578                    inner_offset,
17579                    inner_depth
17580                )?;
17581                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17582                {
17583                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17584                }
17585                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17586                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17587                }
17588            }
17589
17590            next_offset += envelope_size;
17591            _next_ordinal_to_read += 1;
17592            if next_offset >= end_offset {
17593                return Ok(());
17594            }
17595
17596            // Decode unknown envelopes for gaps in ordinals.
17597            while _next_ordinal_to_read < 2 {
17598                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17599                _next_ordinal_to_read += 1;
17600                next_offset += envelope_size;
17601            }
17602
17603            let next_out_of_line = decoder.next_out_of_line();
17604            let handles_before = decoder.remaining_handles();
17605            if let Some((inlined, num_bytes, num_handles)) =
17606                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17607            {
17608                let member_inline_size =
17609                    <DatagramSocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
17610                        decoder.context,
17611                    );
17612                if inlined != (member_inline_size <= 4) {
17613                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17614                }
17615                let inner_offset;
17616                let mut inner_depth = depth.clone();
17617                if inlined {
17618                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17619                    inner_offset = next_offset;
17620                } else {
17621                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17622                    inner_depth.increment()?;
17623                }
17624                let val_ref = self
17625                    .control
17626                    .get_or_insert_with(|| fidl::new_empty!(DatagramSocketRecvControlData, D));
17627                fidl::decode!(
17628                    DatagramSocketRecvControlData,
17629                    D,
17630                    val_ref,
17631                    decoder,
17632                    inner_offset,
17633                    inner_depth
17634                )?;
17635                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17636                {
17637                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17638                }
17639                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17640                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17641                }
17642            }
17643
17644            next_offset += envelope_size;
17645            _next_ordinal_to_read += 1;
17646            if next_offset >= end_offset {
17647                return Ok(());
17648            }
17649
17650            // Decode unknown envelopes for gaps in ordinals.
17651            while _next_ordinal_to_read < 3 {
17652                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17653                _next_ordinal_to_read += 1;
17654                next_offset += envelope_size;
17655            }
17656
17657            let next_out_of_line = decoder.next_out_of_line();
17658            let handles_before = decoder.remaining_handles();
17659            if let Some((inlined, num_bytes, num_handles)) =
17660                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17661            {
17662                let member_inline_size =
17663                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17664                if inlined != (member_inline_size <= 4) {
17665                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17666                }
17667                let inner_offset;
17668                let mut inner_depth = depth.clone();
17669                if inlined {
17670                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17671                    inner_offset = next_offset;
17672                } else {
17673                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17674                    inner_depth.increment()?;
17675                }
17676                let val_ref = self.payload_len.get_or_insert_with(|| fidl::new_empty!(u16, D));
17677                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
17678                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17679                {
17680                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17681                }
17682                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17683                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17684                }
17685            }
17686
17687            next_offset += envelope_size;
17688
17689            // Decode the remaining unknown envelopes.
17690            while next_offset < end_offset {
17691                _next_ordinal_to_read += 1;
17692                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17693                next_offset += envelope_size;
17694            }
17695
17696            Ok(())
17697        }
17698    }
17699
17700    impl SendMsgMeta {
17701        #[inline(always)]
17702        fn max_ordinal_present(&self) -> u64 {
17703            if let Some(_) = self.control {
17704                return 2;
17705            }
17706            if let Some(_) = self.to {
17707                return 1;
17708            }
17709            0
17710        }
17711    }
17712
17713    impl fidl::encoding::ValueTypeMarker for SendMsgMeta {
17714        type Borrowed<'a> = &'a Self;
17715        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17716            value
17717        }
17718    }
17719
17720    unsafe impl fidl::encoding::TypeMarker for SendMsgMeta {
17721        type Owned = Self;
17722
17723        #[inline(always)]
17724        fn inline_align(_context: fidl::encoding::Context) -> usize {
17725            8
17726        }
17727
17728        #[inline(always)]
17729        fn inline_size(_context: fidl::encoding::Context) -> usize {
17730            16
17731        }
17732    }
17733
17734    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SendMsgMeta, D>
17735        for &SendMsgMeta
17736    {
17737        unsafe fn encode(
17738            self,
17739            encoder: &mut fidl::encoding::Encoder<'_, D>,
17740            offset: usize,
17741            mut depth: fidl::encoding::Depth,
17742        ) -> fidl::Result<()> {
17743            encoder.debug_check_bounds::<SendMsgMeta>(offset);
17744            // Vector header
17745            let max_ordinal: u64 = self.max_ordinal_present();
17746            encoder.write_num(max_ordinal, offset);
17747            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17748            // Calling encoder.out_of_line_offset(0) is not allowed.
17749            if max_ordinal == 0 {
17750                return Ok(());
17751            }
17752            depth.increment()?;
17753            let envelope_size = 8;
17754            let bytes_len = max_ordinal as usize * envelope_size;
17755            #[allow(unused_variables)]
17756            let offset = encoder.out_of_line_offset(bytes_len);
17757            let mut _prev_end_offset: usize = 0;
17758            if 1 > max_ordinal {
17759                return Ok(());
17760            }
17761
17762            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17763            // are envelope_size bytes.
17764            let cur_offset: usize = (1 - 1) * envelope_size;
17765
17766            // Zero reserved fields.
17767            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17768
17769            // Safety:
17770            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17771            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17772            //   envelope_size bytes, there is always sufficient room.
17773            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net__common::SocketAddress, D>(
17774            self.to.as_ref().map(<fidl_fuchsia_net__common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
17775            encoder, offset + cur_offset, depth
17776        )?;
17777
17778            _prev_end_offset = cur_offset + envelope_size;
17779            if 2 > max_ordinal {
17780                return Ok(());
17781            }
17782
17783            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17784            // are envelope_size bytes.
17785            let cur_offset: usize = (2 - 1) * envelope_size;
17786
17787            // Zero reserved fields.
17788            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17789
17790            // Safety:
17791            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17792            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17793            //   envelope_size bytes, there is always sufficient room.
17794            fidl::encoding::encode_in_envelope_optional::<DatagramSocketSendControlData, D>(
17795                self.control.as_ref().map(
17796                    <DatagramSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow,
17797                ),
17798                encoder,
17799                offset + cur_offset,
17800                depth,
17801            )?;
17802
17803            _prev_end_offset = cur_offset + envelope_size;
17804
17805            Ok(())
17806        }
17807    }
17808
17809    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SendMsgMeta {
17810        #[inline(always)]
17811        fn new_empty() -> Self {
17812            Self::default()
17813        }
17814
17815        unsafe fn decode(
17816            &mut self,
17817            decoder: &mut fidl::encoding::Decoder<'_, D>,
17818            offset: usize,
17819            mut depth: fidl::encoding::Depth,
17820        ) -> fidl::Result<()> {
17821            decoder.debug_check_bounds::<Self>(offset);
17822            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17823                None => return Err(fidl::Error::NotNullable),
17824                Some(len) => len,
17825            };
17826            // Calling decoder.out_of_line_offset(0) is not allowed.
17827            if len == 0 {
17828                return Ok(());
17829            };
17830            depth.increment()?;
17831            let envelope_size = 8;
17832            let bytes_len = len * envelope_size;
17833            let offset = decoder.out_of_line_offset(bytes_len)?;
17834            // Decode the envelope for each type.
17835            let mut _next_ordinal_to_read = 0;
17836            let mut next_offset = offset;
17837            let end_offset = offset + bytes_len;
17838            _next_ordinal_to_read += 1;
17839            if next_offset >= end_offset {
17840                return Ok(());
17841            }
17842
17843            // Decode unknown envelopes for gaps in ordinals.
17844            while _next_ordinal_to_read < 1 {
17845                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17846                _next_ordinal_to_read += 1;
17847                next_offset += envelope_size;
17848            }
17849
17850            let next_out_of_line = decoder.next_out_of_line();
17851            let handles_before = decoder.remaining_handles();
17852            if let Some((inlined, num_bytes, num_handles)) =
17853                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17854            {
17855                let member_inline_size = <fidl_fuchsia_net__common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17856                if inlined != (member_inline_size <= 4) {
17857                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17858                }
17859                let inner_offset;
17860                let mut inner_depth = depth.clone();
17861                if inlined {
17862                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17863                    inner_offset = next_offset;
17864                } else {
17865                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17866                    inner_depth.increment()?;
17867                }
17868                let val_ref = self.to.get_or_insert_with(|| {
17869                    fidl::new_empty!(fidl_fuchsia_net__common::SocketAddress, D)
17870                });
17871                fidl::decode!(
17872                    fidl_fuchsia_net__common::SocketAddress,
17873                    D,
17874                    val_ref,
17875                    decoder,
17876                    inner_offset,
17877                    inner_depth
17878                )?;
17879                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17880                {
17881                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17882                }
17883                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17884                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17885                }
17886            }
17887
17888            next_offset += envelope_size;
17889            _next_ordinal_to_read += 1;
17890            if next_offset >= end_offset {
17891                return Ok(());
17892            }
17893
17894            // Decode unknown envelopes for gaps in ordinals.
17895            while _next_ordinal_to_read < 2 {
17896                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17897                _next_ordinal_to_read += 1;
17898                next_offset += envelope_size;
17899            }
17900
17901            let next_out_of_line = decoder.next_out_of_line();
17902            let handles_before = decoder.remaining_handles();
17903            if let Some((inlined, num_bytes, num_handles)) =
17904                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17905            {
17906                let member_inline_size =
17907                    <DatagramSocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
17908                        decoder.context,
17909                    );
17910                if inlined != (member_inline_size <= 4) {
17911                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17912                }
17913                let inner_offset;
17914                let mut inner_depth = depth.clone();
17915                if inlined {
17916                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17917                    inner_offset = next_offset;
17918                } else {
17919                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17920                    inner_depth.increment()?;
17921                }
17922                let val_ref = self
17923                    .control
17924                    .get_or_insert_with(|| fidl::new_empty!(DatagramSocketSendControlData, D));
17925                fidl::decode!(
17926                    DatagramSocketSendControlData,
17927                    D,
17928                    val_ref,
17929                    decoder,
17930                    inner_offset,
17931                    inner_depth
17932                )?;
17933                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17934                {
17935                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17936                }
17937                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17938                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17939                }
17940            }
17941
17942            next_offset += envelope_size;
17943
17944            // Decode the remaining unknown envelopes.
17945            while next_offset < end_offset {
17946                _next_ordinal_to_read += 1;
17947                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17948                next_offset += envelope_size;
17949            }
17950
17951            Ok(())
17952        }
17953    }
17954
17955    impl SocketRecvControlData {
17956        #[inline(always)]
17957        fn max_ordinal_present(&self) -> u64 {
17958            if let Some(_) = self.timestamp {
17959                return 3;
17960            }
17961            0
17962        }
17963    }
17964
17965    impl fidl::encoding::ValueTypeMarker for SocketRecvControlData {
17966        type Borrowed<'a> = &'a Self;
17967        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17968            value
17969        }
17970    }
17971
17972    unsafe impl fidl::encoding::TypeMarker for SocketRecvControlData {
17973        type Owned = Self;
17974
17975        #[inline(always)]
17976        fn inline_align(_context: fidl::encoding::Context) -> usize {
17977            8
17978        }
17979
17980        #[inline(always)]
17981        fn inline_size(_context: fidl::encoding::Context) -> usize {
17982            16
17983        }
17984    }
17985
17986    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketRecvControlData, D>
17987        for &SocketRecvControlData
17988    {
17989        unsafe fn encode(
17990            self,
17991            encoder: &mut fidl::encoding::Encoder<'_, D>,
17992            offset: usize,
17993            mut depth: fidl::encoding::Depth,
17994        ) -> fidl::Result<()> {
17995            encoder.debug_check_bounds::<SocketRecvControlData>(offset);
17996            // Vector header
17997            let max_ordinal: u64 = self.max_ordinal_present();
17998            encoder.write_num(max_ordinal, offset);
17999            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18000            // Calling encoder.out_of_line_offset(0) is not allowed.
18001            if max_ordinal == 0 {
18002                return Ok(());
18003            }
18004            depth.increment()?;
18005            let envelope_size = 8;
18006            let bytes_len = max_ordinal as usize * envelope_size;
18007            #[allow(unused_variables)]
18008            let offset = encoder.out_of_line_offset(bytes_len);
18009            let mut _prev_end_offset: usize = 0;
18010            if 3 > max_ordinal {
18011                return Ok(());
18012            }
18013
18014            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18015            // are envelope_size bytes.
18016            let cur_offset: usize = (3 - 1) * envelope_size;
18017
18018            // Zero reserved fields.
18019            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18020
18021            // Safety:
18022            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18023            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18024            //   envelope_size bytes, there is always sufficient room.
18025            fidl::encoding::encode_in_envelope_optional::<Timestamp, D>(
18026                self.timestamp.as_ref().map(<Timestamp as fidl::encoding::ValueTypeMarker>::borrow),
18027                encoder,
18028                offset + cur_offset,
18029                depth,
18030            )?;
18031
18032            _prev_end_offset = cur_offset + envelope_size;
18033
18034            Ok(())
18035        }
18036    }
18037
18038    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketRecvControlData {
18039        #[inline(always)]
18040        fn new_empty() -> Self {
18041            Self::default()
18042        }
18043
18044        unsafe fn decode(
18045            &mut self,
18046            decoder: &mut fidl::encoding::Decoder<'_, D>,
18047            offset: usize,
18048            mut depth: fidl::encoding::Depth,
18049        ) -> fidl::Result<()> {
18050            decoder.debug_check_bounds::<Self>(offset);
18051            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18052                None => return Err(fidl::Error::NotNullable),
18053                Some(len) => len,
18054            };
18055            // Calling decoder.out_of_line_offset(0) is not allowed.
18056            if len == 0 {
18057                return Ok(());
18058            };
18059            depth.increment()?;
18060            let envelope_size = 8;
18061            let bytes_len = len * envelope_size;
18062            let offset = decoder.out_of_line_offset(bytes_len)?;
18063            // Decode the envelope for each type.
18064            let mut _next_ordinal_to_read = 0;
18065            let mut next_offset = offset;
18066            let end_offset = offset + bytes_len;
18067            _next_ordinal_to_read += 1;
18068            if next_offset >= end_offset {
18069                return Ok(());
18070            }
18071
18072            // Decode unknown envelopes for gaps in ordinals.
18073            while _next_ordinal_to_read < 3 {
18074                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18075                _next_ordinal_to_read += 1;
18076                next_offset += envelope_size;
18077            }
18078
18079            let next_out_of_line = decoder.next_out_of_line();
18080            let handles_before = decoder.remaining_handles();
18081            if let Some((inlined, num_bytes, num_handles)) =
18082                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18083            {
18084                let member_inline_size =
18085                    <Timestamp as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18086                if inlined != (member_inline_size <= 4) {
18087                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18088                }
18089                let inner_offset;
18090                let mut inner_depth = depth.clone();
18091                if inlined {
18092                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18093                    inner_offset = next_offset;
18094                } else {
18095                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18096                    inner_depth.increment()?;
18097                }
18098                let val_ref = self.timestamp.get_or_insert_with(|| fidl::new_empty!(Timestamp, D));
18099                fidl::decode!(Timestamp, D, val_ref, decoder, inner_offset, inner_depth)?;
18100                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18101                {
18102                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18103                }
18104                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18105                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18106                }
18107            }
18108
18109            next_offset += envelope_size;
18110
18111            // Decode the remaining unknown envelopes.
18112            while next_offset < end_offset {
18113                _next_ordinal_to_read += 1;
18114                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18115                next_offset += envelope_size;
18116            }
18117
18118            Ok(())
18119        }
18120    }
18121
18122    impl SocketSendControlData {
18123        #[inline(always)]
18124        fn max_ordinal_present(&self) -> u64 {
18125            0
18126        }
18127    }
18128
18129    impl fidl::encoding::ValueTypeMarker for SocketSendControlData {
18130        type Borrowed<'a> = &'a Self;
18131        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18132            value
18133        }
18134    }
18135
18136    unsafe impl fidl::encoding::TypeMarker for SocketSendControlData {
18137        type Owned = Self;
18138
18139        #[inline(always)]
18140        fn inline_align(_context: fidl::encoding::Context) -> usize {
18141            8
18142        }
18143
18144        #[inline(always)]
18145        fn inline_size(_context: fidl::encoding::Context) -> usize {
18146            16
18147        }
18148    }
18149
18150    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketSendControlData, D>
18151        for &SocketSendControlData
18152    {
18153        unsafe fn encode(
18154            self,
18155            encoder: &mut fidl::encoding::Encoder<'_, D>,
18156            offset: usize,
18157            mut depth: fidl::encoding::Depth,
18158        ) -> fidl::Result<()> {
18159            encoder.debug_check_bounds::<SocketSendControlData>(offset);
18160            // Vector header
18161            let max_ordinal: u64 = self.max_ordinal_present();
18162            encoder.write_num(max_ordinal, offset);
18163            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18164            // Calling encoder.out_of_line_offset(0) is not allowed.
18165            if max_ordinal == 0 {
18166                return Ok(());
18167            }
18168            depth.increment()?;
18169            let envelope_size = 8;
18170            let bytes_len = max_ordinal as usize * envelope_size;
18171            #[allow(unused_variables)]
18172            let offset = encoder.out_of_line_offset(bytes_len);
18173            let mut _prev_end_offset: usize = 0;
18174
18175            Ok(())
18176        }
18177    }
18178
18179    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketSendControlData {
18180        #[inline(always)]
18181        fn new_empty() -> Self {
18182            Self::default()
18183        }
18184
18185        unsafe fn decode(
18186            &mut self,
18187            decoder: &mut fidl::encoding::Decoder<'_, D>,
18188            offset: usize,
18189            mut depth: fidl::encoding::Depth,
18190        ) -> fidl::Result<()> {
18191            decoder.debug_check_bounds::<Self>(offset);
18192            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18193                None => return Err(fidl::Error::NotNullable),
18194                Some(len) => len,
18195            };
18196            // Calling decoder.out_of_line_offset(0) is not allowed.
18197            if len == 0 {
18198                return Ok(());
18199            };
18200            depth.increment()?;
18201            let envelope_size = 8;
18202            let bytes_len = len * envelope_size;
18203            let offset = decoder.out_of_line_offset(bytes_len)?;
18204            // Decode the envelope for each type.
18205            let mut _next_ordinal_to_read = 0;
18206            let mut next_offset = offset;
18207            let end_offset = offset + bytes_len;
18208
18209            // Decode the remaining unknown envelopes.
18210            while next_offset < end_offset {
18211                _next_ordinal_to_read += 1;
18212                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18213                next_offset += envelope_size;
18214            }
18215
18216            Ok(())
18217        }
18218    }
18219
18220    impl fidl::encoding::ValueTypeMarker for OptionalUint32 {
18221        type Borrowed<'a> = &'a Self;
18222        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18223            value
18224        }
18225    }
18226
18227    unsafe impl fidl::encoding::TypeMarker for OptionalUint32 {
18228        type Owned = Self;
18229
18230        #[inline(always)]
18231        fn inline_align(_context: fidl::encoding::Context) -> usize {
18232            8
18233        }
18234
18235        #[inline(always)]
18236        fn inline_size(_context: fidl::encoding::Context) -> usize {
18237            16
18238        }
18239    }
18240
18241    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalUint32, D>
18242        for &OptionalUint32
18243    {
18244        #[inline]
18245        unsafe fn encode(
18246            self,
18247            encoder: &mut fidl::encoding::Encoder<'_, D>,
18248            offset: usize,
18249            _depth: fidl::encoding::Depth,
18250        ) -> fidl::Result<()> {
18251            encoder.debug_check_bounds::<OptionalUint32>(offset);
18252            encoder.write_num::<u64>(self.ordinal(), offset);
18253            match self {
18254                OptionalUint32::Value(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
18255                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
18256                    encoder,
18257                    offset + 8,
18258                    _depth,
18259                ),
18260                OptionalUint32::Unset(ref val) => fidl::encoding::encode_in_envelope::<Empty, D>(
18261                    <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
18262                    encoder,
18263                    offset + 8,
18264                    _depth,
18265                ),
18266            }
18267        }
18268    }
18269
18270    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalUint32 {
18271        #[inline(always)]
18272        fn new_empty() -> Self {
18273            Self::Value(fidl::new_empty!(u32, D))
18274        }
18275
18276        #[inline]
18277        unsafe fn decode(
18278            &mut self,
18279            decoder: &mut fidl::encoding::Decoder<'_, D>,
18280            offset: usize,
18281            mut depth: fidl::encoding::Depth,
18282        ) -> fidl::Result<()> {
18283            decoder.debug_check_bounds::<Self>(offset);
18284            #[allow(unused_variables)]
18285            let next_out_of_line = decoder.next_out_of_line();
18286            let handles_before = decoder.remaining_handles();
18287            let (ordinal, inlined, num_bytes, num_handles) =
18288                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
18289
18290            let member_inline_size = match ordinal {
18291                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18292                2 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18293                _ => return Err(fidl::Error::UnknownUnionTag),
18294            };
18295
18296            if inlined != (member_inline_size <= 4) {
18297                return Err(fidl::Error::InvalidInlineBitInEnvelope);
18298            }
18299            let _inner_offset;
18300            if inlined {
18301                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
18302                _inner_offset = offset + 8;
18303            } else {
18304                depth.increment()?;
18305                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18306            }
18307            match ordinal {
18308                1 => {
18309                    #[allow(irrefutable_let_patterns)]
18310                    if let OptionalUint32::Value(_) = self {
18311                        // Do nothing, read the value into the object
18312                    } else {
18313                        // Initialize `self` to the right variant
18314                        *self = OptionalUint32::Value(fidl::new_empty!(u32, D));
18315                    }
18316                    #[allow(irrefutable_let_patterns)]
18317                    if let OptionalUint32::Value(ref mut val) = self {
18318                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
18319                    } else {
18320                        unreachable!()
18321                    }
18322                }
18323                2 => {
18324                    #[allow(irrefutable_let_patterns)]
18325                    if let OptionalUint32::Unset(_) = self {
18326                        // Do nothing, read the value into the object
18327                    } else {
18328                        // Initialize `self` to the right variant
18329                        *self = OptionalUint32::Unset(fidl::new_empty!(Empty, D));
18330                    }
18331                    #[allow(irrefutable_let_patterns)]
18332                    if let OptionalUint32::Unset(ref mut val) = self {
18333                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
18334                    } else {
18335                        unreachable!()
18336                    }
18337                }
18338                ordinal => panic!("unexpected ordinal {:?}", ordinal),
18339            }
18340            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
18341                return Err(fidl::Error::InvalidNumBytesInEnvelope);
18342            }
18343            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18344                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18345            }
18346            Ok(())
18347        }
18348    }
18349
18350    impl fidl::encoding::ValueTypeMarker for OptionalUint8 {
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 OptionalUint8 {
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<OptionalUint8, D>
18372        for &OptionalUint8
18373    {
18374        #[inline]
18375        unsafe fn encode(
18376            self,
18377            encoder: &mut fidl::encoding::Encoder<'_, D>,
18378            offset: usize,
18379            _depth: fidl::encoding::Depth,
18380        ) -> fidl::Result<()> {
18381            encoder.debug_check_bounds::<OptionalUint8>(offset);
18382            encoder.write_num::<u64>(self.ordinal(), offset);
18383            match self {
18384                OptionalUint8::Value(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
18385                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
18386                    encoder,
18387                    offset + 8,
18388                    _depth,
18389                ),
18390                OptionalUint8::Unset(ref val) => fidl::encoding::encode_in_envelope::<Empty, D>(
18391                    <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
18392                    encoder,
18393                    offset + 8,
18394                    _depth,
18395                ),
18396            }
18397        }
18398    }
18399
18400    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalUint8 {
18401        #[inline(always)]
18402        fn new_empty() -> Self {
18403            Self::Value(fidl::new_empty!(u8, D))
18404        }
18405
18406        #[inline]
18407        unsafe fn decode(
18408            &mut self,
18409            decoder: &mut fidl::encoding::Decoder<'_, D>,
18410            offset: usize,
18411            mut depth: fidl::encoding::Depth,
18412        ) -> fidl::Result<()> {
18413            decoder.debug_check_bounds::<Self>(offset);
18414            #[allow(unused_variables)]
18415            let next_out_of_line = decoder.next_out_of_line();
18416            let handles_before = decoder.remaining_handles();
18417            let (ordinal, inlined, num_bytes, num_handles) =
18418                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
18419
18420            let member_inline_size = match ordinal {
18421                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18422                2 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18423                _ => return Err(fidl::Error::UnknownUnionTag),
18424            };
18425
18426            if inlined != (member_inline_size <= 4) {
18427                return Err(fidl::Error::InvalidInlineBitInEnvelope);
18428            }
18429            let _inner_offset;
18430            if inlined {
18431                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
18432                _inner_offset = offset + 8;
18433            } else {
18434                depth.increment()?;
18435                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18436            }
18437            match ordinal {
18438                1 => {
18439                    #[allow(irrefutable_let_patterns)]
18440                    if let OptionalUint8::Value(_) = self {
18441                        // Do nothing, read the value into the object
18442                    } else {
18443                        // Initialize `self` to the right variant
18444                        *self = OptionalUint8::Value(fidl::new_empty!(u8, D));
18445                    }
18446                    #[allow(irrefutable_let_patterns)]
18447                    if let OptionalUint8::Value(ref mut val) = self {
18448                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
18449                    } else {
18450                        unreachable!()
18451                    }
18452                }
18453                2 => {
18454                    #[allow(irrefutable_let_patterns)]
18455                    if let OptionalUint8::Unset(_) = self {
18456                        // Do nothing, read the value into the object
18457                    } else {
18458                        // Initialize `self` to the right variant
18459                        *self = OptionalUint8::Unset(fidl::new_empty!(Empty, D));
18460                    }
18461                    #[allow(irrefutable_let_patterns)]
18462                    if let OptionalUint8::Unset(ref mut val) = self {
18463                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
18464                    } else {
18465                        unreachable!()
18466                    }
18467                }
18468                ordinal => panic!("unexpected ordinal {:?}", ordinal),
18469            }
18470            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
18471                return Err(fidl::Error::InvalidNumBytesInEnvelope);
18472            }
18473            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18474                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18475            }
18476            Ok(())
18477        }
18478    }
18479}