Skip to main content

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                (<fidl_fuchsia_net_common::MarkDomain as fidl::encoding::ValueTypeMarker>::borrow(
7235                    &self.domain,
7236                ),),
7237                encoder,
7238                offset,
7239                _depth,
7240            )
7241        }
7242    }
7243    unsafe impl<
7244        D: fidl::encoding::ResourceDialect,
7245        T0: fidl::encoding::Encode<fidl_fuchsia_net_common::MarkDomain, D>,
7246    > fidl::encoding::Encode<BaseSocketGetMarkRequest, D> for (T0,)
7247    {
7248        #[inline]
7249        unsafe fn encode(
7250            self,
7251            encoder: &mut fidl::encoding::Encoder<'_, D>,
7252            offset: usize,
7253            depth: fidl::encoding::Depth,
7254        ) -> fidl::Result<()> {
7255            encoder.debug_check_bounds::<BaseSocketGetMarkRequest>(offset);
7256            // Zero out padding regions. There's no need to apply masks
7257            // because the unmasked parts will be overwritten by fields.
7258            // Write the fields.
7259            self.0.encode(encoder, offset + 0, depth)?;
7260            Ok(())
7261        }
7262    }
7263
7264    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7265        for BaseSocketGetMarkRequest
7266    {
7267        #[inline(always)]
7268        fn new_empty() -> Self {
7269            Self { domain: fidl::new_empty!(fidl_fuchsia_net_common::MarkDomain, D) }
7270        }
7271
7272        #[inline]
7273        unsafe fn decode(
7274            &mut self,
7275            decoder: &mut fidl::encoding::Decoder<'_, D>,
7276            offset: usize,
7277            _depth: fidl::encoding::Depth,
7278        ) -> fidl::Result<()> {
7279            decoder.debug_check_bounds::<Self>(offset);
7280            // Verify that padding bytes are zero.
7281            fidl::decode!(
7282                fidl_fuchsia_net_common::MarkDomain,
7283                D,
7284                &mut self.domain,
7285                decoder,
7286                offset + 0,
7287                _depth
7288            )?;
7289            Ok(())
7290        }
7291    }
7292
7293    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBindToDeviceRequest {
7294        type Borrowed<'a> = &'a Self;
7295        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7296            value
7297        }
7298    }
7299
7300    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBindToDeviceRequest {
7301        type Owned = Self;
7302
7303        #[inline(always)]
7304        fn inline_align(_context: fidl::encoding::Context) -> usize {
7305            8
7306        }
7307
7308        #[inline(always)]
7309        fn inline_size(_context: fidl::encoding::Context) -> usize {
7310            16
7311        }
7312    }
7313
7314    unsafe impl<D: fidl::encoding::ResourceDialect>
7315        fidl::encoding::Encode<BaseSocketSetBindToDeviceRequest, D>
7316        for &BaseSocketSetBindToDeviceRequest
7317    {
7318        #[inline]
7319        unsafe fn encode(
7320            self,
7321            encoder: &mut fidl::encoding::Encoder<'_, D>,
7322            offset: usize,
7323            _depth: fidl::encoding::Depth,
7324        ) -> fidl::Result<()> {
7325            encoder.debug_check_bounds::<BaseSocketSetBindToDeviceRequest>(offset);
7326            // Delegate to tuple encoding.
7327            fidl::encoding::Encode::<BaseSocketSetBindToDeviceRequest, D>::encode(
7328                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
7329                    &self.value,
7330                ),),
7331                encoder,
7332                offset,
7333                _depth,
7334            )
7335        }
7336    }
7337    unsafe impl<
7338        D: fidl::encoding::ResourceDialect,
7339        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
7340    > fidl::encoding::Encode<BaseSocketSetBindToDeviceRequest, D> for (T0,)
7341    {
7342        #[inline]
7343        unsafe fn encode(
7344            self,
7345            encoder: &mut fidl::encoding::Encoder<'_, D>,
7346            offset: usize,
7347            depth: fidl::encoding::Depth,
7348        ) -> fidl::Result<()> {
7349            encoder.debug_check_bounds::<BaseSocketSetBindToDeviceRequest>(offset);
7350            // Zero out padding regions. There's no need to apply masks
7351            // because the unmasked parts will be overwritten by fields.
7352            // Write the fields.
7353            self.0.encode(encoder, offset + 0, depth)?;
7354            Ok(())
7355        }
7356    }
7357
7358    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7359        for BaseSocketSetBindToDeviceRequest
7360    {
7361        #[inline(always)]
7362        fn new_empty() -> Self {
7363            Self { value: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
7364        }
7365
7366        #[inline]
7367        unsafe fn decode(
7368            &mut self,
7369            decoder: &mut fidl::encoding::Decoder<'_, D>,
7370            offset: usize,
7371            _depth: fidl::encoding::Depth,
7372        ) -> fidl::Result<()> {
7373            decoder.debug_check_bounds::<Self>(offset);
7374            // Verify that padding bytes are zero.
7375            fidl::decode!(
7376                fidl::encoding::BoundedString<15>,
7377                D,
7378                &mut self.value,
7379                decoder,
7380                offset + 0,
7381                _depth
7382            )?;
7383            Ok(())
7384        }
7385    }
7386
7387    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBindToInterfaceIndexRequest {
7388        type Borrowed<'a> = &'a Self;
7389        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7390            value
7391        }
7392    }
7393
7394    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBindToInterfaceIndexRequest {
7395        type Owned = Self;
7396
7397        #[inline(always)]
7398        fn inline_align(_context: fidl::encoding::Context) -> usize {
7399            8
7400        }
7401
7402        #[inline(always)]
7403        fn inline_size(_context: fidl::encoding::Context) -> usize {
7404            8
7405        }
7406        #[inline(always)]
7407        fn encode_is_copy() -> bool {
7408            true
7409        }
7410
7411        #[inline(always)]
7412        fn decode_is_copy() -> bool {
7413            true
7414        }
7415    }
7416
7417    unsafe impl<D: fidl::encoding::ResourceDialect>
7418        fidl::encoding::Encode<BaseSocketSetBindToInterfaceIndexRequest, D>
7419        for &BaseSocketSetBindToInterfaceIndexRequest
7420    {
7421        #[inline]
7422        unsafe fn encode(
7423            self,
7424            encoder: &mut fidl::encoding::Encoder<'_, D>,
7425            offset: usize,
7426            _depth: fidl::encoding::Depth,
7427        ) -> fidl::Result<()> {
7428            encoder.debug_check_bounds::<BaseSocketSetBindToInterfaceIndexRequest>(offset);
7429            unsafe {
7430                // Copy the object into the buffer.
7431                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7432                (buf_ptr as *mut BaseSocketSetBindToInterfaceIndexRequest).write_unaligned(
7433                    (self as *const BaseSocketSetBindToInterfaceIndexRequest).read(),
7434                );
7435                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7436                // done second because the memcpy will write garbage to these bytes.
7437            }
7438            Ok(())
7439        }
7440    }
7441    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
7442        fidl::encoding::Encode<BaseSocketSetBindToInterfaceIndexRequest, D> for (T0,)
7443    {
7444        #[inline]
7445        unsafe fn encode(
7446            self,
7447            encoder: &mut fidl::encoding::Encoder<'_, D>,
7448            offset: usize,
7449            depth: fidl::encoding::Depth,
7450        ) -> fidl::Result<()> {
7451            encoder.debug_check_bounds::<BaseSocketSetBindToInterfaceIndexRequest>(offset);
7452            // Zero out padding regions. There's no need to apply masks
7453            // because the unmasked parts will be overwritten by fields.
7454            // Write the fields.
7455            self.0.encode(encoder, offset + 0, depth)?;
7456            Ok(())
7457        }
7458    }
7459
7460    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7461        for BaseSocketSetBindToInterfaceIndexRequest
7462    {
7463        #[inline(always)]
7464        fn new_empty() -> Self {
7465            Self { value: fidl::new_empty!(u64, D) }
7466        }
7467
7468        #[inline]
7469        unsafe fn decode(
7470            &mut self,
7471            decoder: &mut fidl::encoding::Decoder<'_, D>,
7472            offset: usize,
7473            _depth: fidl::encoding::Depth,
7474        ) -> fidl::Result<()> {
7475            decoder.debug_check_bounds::<Self>(offset);
7476            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7477            // Verify that padding bytes are zero.
7478            // Copy from the buffer into the object.
7479            unsafe {
7480                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7481            }
7482            Ok(())
7483        }
7484    }
7485
7486    impl fidl::encoding::ValueTypeMarker for BaseSocketSetBroadcastRequest {
7487        type Borrowed<'a> = &'a Self;
7488        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7489            value
7490        }
7491    }
7492
7493    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetBroadcastRequest {
7494        type Owned = Self;
7495
7496        #[inline(always)]
7497        fn inline_align(_context: fidl::encoding::Context) -> usize {
7498            1
7499        }
7500
7501        #[inline(always)]
7502        fn inline_size(_context: fidl::encoding::Context) -> usize {
7503            1
7504        }
7505    }
7506
7507    unsafe impl<D: fidl::encoding::ResourceDialect>
7508        fidl::encoding::Encode<BaseSocketSetBroadcastRequest, D>
7509        for &BaseSocketSetBroadcastRequest
7510    {
7511        #[inline]
7512        unsafe fn encode(
7513            self,
7514            encoder: &mut fidl::encoding::Encoder<'_, D>,
7515            offset: usize,
7516            _depth: fidl::encoding::Depth,
7517        ) -> fidl::Result<()> {
7518            encoder.debug_check_bounds::<BaseSocketSetBroadcastRequest>(offset);
7519            // Delegate to tuple encoding.
7520            fidl::encoding::Encode::<BaseSocketSetBroadcastRequest, D>::encode(
7521                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7522                encoder,
7523                offset,
7524                _depth,
7525            )
7526        }
7527    }
7528    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7529        fidl::encoding::Encode<BaseSocketSetBroadcastRequest, D> for (T0,)
7530    {
7531        #[inline]
7532        unsafe fn encode(
7533            self,
7534            encoder: &mut fidl::encoding::Encoder<'_, D>,
7535            offset: usize,
7536            depth: fidl::encoding::Depth,
7537        ) -> fidl::Result<()> {
7538            encoder.debug_check_bounds::<BaseSocketSetBroadcastRequest>(offset);
7539            // Zero out padding regions. There's no need to apply masks
7540            // because the unmasked parts will be overwritten by fields.
7541            // Write the fields.
7542            self.0.encode(encoder, offset + 0, depth)?;
7543            Ok(())
7544        }
7545    }
7546
7547    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7548        for BaseSocketSetBroadcastRequest
7549    {
7550        #[inline(always)]
7551        fn new_empty() -> Self {
7552            Self { value: fidl::new_empty!(bool, D) }
7553        }
7554
7555        #[inline]
7556        unsafe fn decode(
7557            &mut self,
7558            decoder: &mut fidl::encoding::Decoder<'_, D>,
7559            offset: usize,
7560            _depth: fidl::encoding::Depth,
7561        ) -> fidl::Result<()> {
7562            decoder.debug_check_bounds::<Self>(offset);
7563            // Verify that padding bytes are zero.
7564            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7565            Ok(())
7566        }
7567    }
7568
7569    impl fidl::encoding::ValueTypeMarker for BaseSocketSetKeepAliveRequest {
7570        type Borrowed<'a> = &'a Self;
7571        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7572            value
7573        }
7574    }
7575
7576    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetKeepAliveRequest {
7577        type Owned = Self;
7578
7579        #[inline(always)]
7580        fn inline_align(_context: fidl::encoding::Context) -> usize {
7581            1
7582        }
7583
7584        #[inline(always)]
7585        fn inline_size(_context: fidl::encoding::Context) -> usize {
7586            1
7587        }
7588    }
7589
7590    unsafe impl<D: fidl::encoding::ResourceDialect>
7591        fidl::encoding::Encode<BaseSocketSetKeepAliveRequest, D>
7592        for &BaseSocketSetKeepAliveRequest
7593    {
7594        #[inline]
7595        unsafe fn encode(
7596            self,
7597            encoder: &mut fidl::encoding::Encoder<'_, D>,
7598            offset: usize,
7599            _depth: fidl::encoding::Depth,
7600        ) -> fidl::Result<()> {
7601            encoder.debug_check_bounds::<BaseSocketSetKeepAliveRequest>(offset);
7602            // Delegate to tuple encoding.
7603            fidl::encoding::Encode::<BaseSocketSetKeepAliveRequest, D>::encode(
7604                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7605                encoder,
7606                offset,
7607                _depth,
7608            )
7609        }
7610    }
7611    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7612        fidl::encoding::Encode<BaseSocketSetKeepAliveRequest, D> for (T0,)
7613    {
7614        #[inline]
7615        unsafe fn encode(
7616            self,
7617            encoder: &mut fidl::encoding::Encoder<'_, D>,
7618            offset: usize,
7619            depth: fidl::encoding::Depth,
7620        ) -> fidl::Result<()> {
7621            encoder.debug_check_bounds::<BaseSocketSetKeepAliveRequest>(offset);
7622            // Zero out padding regions. There's no need to apply masks
7623            // because the unmasked parts will be overwritten by fields.
7624            // Write the fields.
7625            self.0.encode(encoder, offset + 0, depth)?;
7626            Ok(())
7627        }
7628    }
7629
7630    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7631        for BaseSocketSetKeepAliveRequest
7632    {
7633        #[inline(always)]
7634        fn new_empty() -> Self {
7635            Self { value: fidl::new_empty!(bool, D) }
7636        }
7637
7638        #[inline]
7639        unsafe fn decode(
7640            &mut self,
7641            decoder: &mut fidl::encoding::Decoder<'_, D>,
7642            offset: usize,
7643            _depth: fidl::encoding::Depth,
7644        ) -> fidl::Result<()> {
7645            decoder.debug_check_bounds::<Self>(offset);
7646            // Verify that padding bytes are zero.
7647            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7648            Ok(())
7649        }
7650    }
7651
7652    impl fidl::encoding::ValueTypeMarker for BaseSocketSetLingerRequest {
7653        type Borrowed<'a> = &'a Self;
7654        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7655            value
7656        }
7657    }
7658
7659    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetLingerRequest {
7660        type Owned = Self;
7661
7662        #[inline(always)]
7663        fn inline_align(_context: fidl::encoding::Context) -> usize {
7664            4
7665        }
7666
7667        #[inline(always)]
7668        fn inline_size(_context: fidl::encoding::Context) -> usize {
7669            8
7670        }
7671    }
7672
7673    unsafe impl<D: fidl::encoding::ResourceDialect>
7674        fidl::encoding::Encode<BaseSocketSetLingerRequest, D> for &BaseSocketSetLingerRequest
7675    {
7676        #[inline]
7677        unsafe fn encode(
7678            self,
7679            encoder: &mut fidl::encoding::Encoder<'_, D>,
7680            offset: usize,
7681            _depth: fidl::encoding::Depth,
7682        ) -> fidl::Result<()> {
7683            encoder.debug_check_bounds::<BaseSocketSetLingerRequest>(offset);
7684            // Delegate to tuple encoding.
7685            fidl::encoding::Encode::<BaseSocketSetLingerRequest, D>::encode(
7686                (
7687                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.linger),
7688                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length_secs),
7689                ),
7690                encoder,
7691                offset,
7692                _depth,
7693            )
7694        }
7695    }
7696    unsafe impl<
7697        D: fidl::encoding::ResourceDialect,
7698        T0: fidl::encoding::Encode<bool, D>,
7699        T1: fidl::encoding::Encode<u32, D>,
7700    > fidl::encoding::Encode<BaseSocketSetLingerRequest, D> for (T0, T1)
7701    {
7702        #[inline]
7703        unsafe fn encode(
7704            self,
7705            encoder: &mut fidl::encoding::Encoder<'_, D>,
7706            offset: usize,
7707            depth: fidl::encoding::Depth,
7708        ) -> fidl::Result<()> {
7709            encoder.debug_check_bounds::<BaseSocketSetLingerRequest>(offset);
7710            // Zero out padding regions. There's no need to apply masks
7711            // because the unmasked parts will be overwritten by fields.
7712            unsafe {
7713                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7714                (ptr as *mut u32).write_unaligned(0);
7715            }
7716            // Write the fields.
7717            self.0.encode(encoder, offset + 0, depth)?;
7718            self.1.encode(encoder, offset + 4, depth)?;
7719            Ok(())
7720        }
7721    }
7722
7723    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7724        for BaseSocketSetLingerRequest
7725    {
7726        #[inline(always)]
7727        fn new_empty() -> Self {
7728            Self { linger: fidl::new_empty!(bool, D), length_secs: fidl::new_empty!(u32, D) }
7729        }
7730
7731        #[inline]
7732        unsafe fn decode(
7733            &mut self,
7734            decoder: &mut fidl::encoding::Decoder<'_, D>,
7735            offset: usize,
7736            _depth: fidl::encoding::Depth,
7737        ) -> fidl::Result<()> {
7738            decoder.debug_check_bounds::<Self>(offset);
7739            // Verify that padding bytes are zero.
7740            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7741            let padval = unsafe { (ptr as *const u32).read_unaligned() };
7742            let mask = 0xffffff00u32;
7743            let maskedval = padval & mask;
7744            if maskedval != 0 {
7745                return Err(fidl::Error::NonZeroPadding {
7746                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7747                });
7748            }
7749            fidl::decode!(bool, D, &mut self.linger, decoder, offset + 0, _depth)?;
7750            fidl::decode!(u32, D, &mut self.length_secs, decoder, offset + 4, _depth)?;
7751            Ok(())
7752        }
7753    }
7754
7755    impl fidl::encoding::ValueTypeMarker for BaseSocketSetMarkRequest {
7756        type Borrowed<'a> = &'a Self;
7757        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7758            value
7759        }
7760    }
7761
7762    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetMarkRequest {
7763        type Owned = Self;
7764
7765        #[inline(always)]
7766        fn inline_align(_context: fidl::encoding::Context) -> usize {
7767            8
7768        }
7769
7770        #[inline(always)]
7771        fn inline_size(_context: fidl::encoding::Context) -> usize {
7772            24
7773        }
7774    }
7775
7776    unsafe impl<D: fidl::encoding::ResourceDialect>
7777        fidl::encoding::Encode<BaseSocketSetMarkRequest, D> for &BaseSocketSetMarkRequest
7778    {
7779        #[inline]
7780        unsafe fn encode(
7781            self,
7782            encoder: &mut fidl::encoding::Encoder<'_, D>,
7783            offset: usize,
7784            _depth: fidl::encoding::Depth,
7785        ) -> fidl::Result<()> {
7786            encoder.debug_check_bounds::<BaseSocketSetMarkRequest>(offset);
7787            // Delegate to tuple encoding.
7788            fidl::encoding::Encode::<BaseSocketSetMarkRequest, D>::encode(
7789                (
7790                    <fidl_fuchsia_net_common::MarkDomain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
7791                    <OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mark),
7792                ),
7793                encoder, offset, _depth
7794            )
7795        }
7796    }
7797    unsafe impl<
7798        D: fidl::encoding::ResourceDialect,
7799        T0: fidl::encoding::Encode<fidl_fuchsia_net_common::MarkDomain, D>,
7800        T1: fidl::encoding::Encode<OptionalUint32, D>,
7801    > fidl::encoding::Encode<BaseSocketSetMarkRequest, D> for (T0, T1)
7802    {
7803        #[inline]
7804        unsafe fn encode(
7805            self,
7806            encoder: &mut fidl::encoding::Encoder<'_, D>,
7807            offset: usize,
7808            depth: fidl::encoding::Depth,
7809        ) -> fidl::Result<()> {
7810            encoder.debug_check_bounds::<BaseSocketSetMarkRequest>(offset);
7811            // Zero out padding regions. There's no need to apply masks
7812            // because the unmasked parts will be overwritten by fields.
7813            unsafe {
7814                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7815                (ptr as *mut u64).write_unaligned(0);
7816            }
7817            // Write the fields.
7818            self.0.encode(encoder, offset + 0, depth)?;
7819            self.1.encode(encoder, offset + 8, depth)?;
7820            Ok(())
7821        }
7822    }
7823
7824    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7825        for BaseSocketSetMarkRequest
7826    {
7827        #[inline(always)]
7828        fn new_empty() -> Self {
7829            Self {
7830                domain: fidl::new_empty!(fidl_fuchsia_net_common::MarkDomain, D),
7831                mark: fidl::new_empty!(OptionalUint32, D),
7832            }
7833        }
7834
7835        #[inline]
7836        unsafe fn decode(
7837            &mut self,
7838            decoder: &mut fidl::encoding::Decoder<'_, D>,
7839            offset: usize,
7840            _depth: fidl::encoding::Depth,
7841        ) -> fidl::Result<()> {
7842            decoder.debug_check_bounds::<Self>(offset);
7843            // Verify that padding bytes are zero.
7844            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7845            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7846            let mask = 0xffffffffffffff00u64;
7847            let maskedval = padval & mask;
7848            if maskedval != 0 {
7849                return Err(fidl::Error::NonZeroPadding {
7850                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7851                });
7852            }
7853            fidl::decode!(
7854                fidl_fuchsia_net_common::MarkDomain,
7855                D,
7856                &mut self.domain,
7857                decoder,
7858                offset + 0,
7859                _depth
7860            )?;
7861            fidl::decode!(OptionalUint32, D, &mut self.mark, decoder, offset + 8, _depth)?;
7862            Ok(())
7863        }
7864    }
7865
7866    impl fidl::encoding::ValueTypeMarker for BaseSocketSetNoCheckRequest {
7867        type Borrowed<'a> = &'a Self;
7868        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7869            value
7870        }
7871    }
7872
7873    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetNoCheckRequest {
7874        type Owned = Self;
7875
7876        #[inline(always)]
7877        fn inline_align(_context: fidl::encoding::Context) -> usize {
7878            1
7879        }
7880
7881        #[inline(always)]
7882        fn inline_size(_context: fidl::encoding::Context) -> usize {
7883            1
7884        }
7885    }
7886
7887    unsafe impl<D: fidl::encoding::ResourceDialect>
7888        fidl::encoding::Encode<BaseSocketSetNoCheckRequest, D> for &BaseSocketSetNoCheckRequest
7889    {
7890        #[inline]
7891        unsafe fn encode(
7892            self,
7893            encoder: &mut fidl::encoding::Encoder<'_, D>,
7894            offset: usize,
7895            _depth: fidl::encoding::Depth,
7896        ) -> fidl::Result<()> {
7897            encoder.debug_check_bounds::<BaseSocketSetNoCheckRequest>(offset);
7898            // Delegate to tuple encoding.
7899            fidl::encoding::Encode::<BaseSocketSetNoCheckRequest, D>::encode(
7900                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7901                encoder,
7902                offset,
7903                _depth,
7904            )
7905        }
7906    }
7907    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7908        fidl::encoding::Encode<BaseSocketSetNoCheckRequest, D> for (T0,)
7909    {
7910        #[inline]
7911        unsafe fn encode(
7912            self,
7913            encoder: &mut fidl::encoding::Encoder<'_, D>,
7914            offset: usize,
7915            depth: fidl::encoding::Depth,
7916        ) -> fidl::Result<()> {
7917            encoder.debug_check_bounds::<BaseSocketSetNoCheckRequest>(offset);
7918            // Zero out padding regions. There's no need to apply masks
7919            // because the unmasked parts will be overwritten by fields.
7920            // Write the fields.
7921            self.0.encode(encoder, offset + 0, depth)?;
7922            Ok(())
7923        }
7924    }
7925
7926    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7927        for BaseSocketSetNoCheckRequest
7928    {
7929        #[inline(always)]
7930        fn new_empty() -> Self {
7931            Self { value: fidl::new_empty!(bool, D) }
7932        }
7933
7934        #[inline]
7935        unsafe fn decode(
7936            &mut self,
7937            decoder: &mut fidl::encoding::Decoder<'_, D>,
7938            offset: usize,
7939            _depth: fidl::encoding::Depth,
7940        ) -> fidl::Result<()> {
7941            decoder.debug_check_bounds::<Self>(offset);
7942            // Verify that padding bytes are zero.
7943            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7944            Ok(())
7945        }
7946    }
7947
7948    impl fidl::encoding::ValueTypeMarker for BaseSocketSetOutOfBandInlineRequest {
7949        type Borrowed<'a> = &'a Self;
7950        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7951            value
7952        }
7953    }
7954
7955    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetOutOfBandInlineRequest {
7956        type Owned = Self;
7957
7958        #[inline(always)]
7959        fn inline_align(_context: fidl::encoding::Context) -> usize {
7960            1
7961        }
7962
7963        #[inline(always)]
7964        fn inline_size(_context: fidl::encoding::Context) -> usize {
7965            1
7966        }
7967    }
7968
7969    unsafe impl<D: fidl::encoding::ResourceDialect>
7970        fidl::encoding::Encode<BaseSocketSetOutOfBandInlineRequest, D>
7971        for &BaseSocketSetOutOfBandInlineRequest
7972    {
7973        #[inline]
7974        unsafe fn encode(
7975            self,
7976            encoder: &mut fidl::encoding::Encoder<'_, D>,
7977            offset: usize,
7978            _depth: fidl::encoding::Depth,
7979        ) -> fidl::Result<()> {
7980            encoder.debug_check_bounds::<BaseSocketSetOutOfBandInlineRequest>(offset);
7981            // Delegate to tuple encoding.
7982            fidl::encoding::Encode::<BaseSocketSetOutOfBandInlineRequest, D>::encode(
7983                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7984                encoder,
7985                offset,
7986                _depth,
7987            )
7988        }
7989    }
7990    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7991        fidl::encoding::Encode<BaseSocketSetOutOfBandInlineRequest, D> for (T0,)
7992    {
7993        #[inline]
7994        unsafe fn encode(
7995            self,
7996            encoder: &mut fidl::encoding::Encoder<'_, D>,
7997            offset: usize,
7998            depth: fidl::encoding::Depth,
7999        ) -> fidl::Result<()> {
8000            encoder.debug_check_bounds::<BaseSocketSetOutOfBandInlineRequest>(offset);
8001            // Zero out padding regions. There's no need to apply masks
8002            // because the unmasked parts will be overwritten by fields.
8003            // Write the fields.
8004            self.0.encode(encoder, offset + 0, depth)?;
8005            Ok(())
8006        }
8007    }
8008
8009    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8010        for BaseSocketSetOutOfBandInlineRequest
8011    {
8012        #[inline(always)]
8013        fn new_empty() -> Self {
8014            Self { value: fidl::new_empty!(bool, D) }
8015        }
8016
8017        #[inline]
8018        unsafe fn decode(
8019            &mut self,
8020            decoder: &mut fidl::encoding::Decoder<'_, D>,
8021            offset: usize,
8022            _depth: fidl::encoding::Depth,
8023        ) -> fidl::Result<()> {
8024            decoder.debug_check_bounds::<Self>(offset);
8025            // Verify that padding bytes are zero.
8026            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8027            Ok(())
8028        }
8029    }
8030
8031    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReceiveBufferRequest {
8032        type Borrowed<'a> = &'a Self;
8033        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8034            value
8035        }
8036    }
8037
8038    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReceiveBufferRequest {
8039        type Owned = Self;
8040
8041        #[inline(always)]
8042        fn inline_align(_context: fidl::encoding::Context) -> usize {
8043            8
8044        }
8045
8046        #[inline(always)]
8047        fn inline_size(_context: fidl::encoding::Context) -> usize {
8048            8
8049        }
8050        #[inline(always)]
8051        fn encode_is_copy() -> bool {
8052            true
8053        }
8054
8055        #[inline(always)]
8056        fn decode_is_copy() -> bool {
8057            true
8058        }
8059    }
8060
8061    unsafe impl<D: fidl::encoding::ResourceDialect>
8062        fidl::encoding::Encode<BaseSocketSetReceiveBufferRequest, D>
8063        for &BaseSocketSetReceiveBufferRequest
8064    {
8065        #[inline]
8066        unsafe fn encode(
8067            self,
8068            encoder: &mut fidl::encoding::Encoder<'_, D>,
8069            offset: usize,
8070            _depth: fidl::encoding::Depth,
8071        ) -> fidl::Result<()> {
8072            encoder.debug_check_bounds::<BaseSocketSetReceiveBufferRequest>(offset);
8073            unsafe {
8074                // Copy the object into the buffer.
8075                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8076                (buf_ptr as *mut BaseSocketSetReceiveBufferRequest)
8077                    .write_unaligned((self as *const BaseSocketSetReceiveBufferRequest).read());
8078                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8079                // done second because the memcpy will write garbage to these bytes.
8080            }
8081            Ok(())
8082        }
8083    }
8084    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8085        fidl::encoding::Encode<BaseSocketSetReceiveBufferRequest, D> for (T0,)
8086    {
8087        #[inline]
8088        unsafe fn encode(
8089            self,
8090            encoder: &mut fidl::encoding::Encoder<'_, D>,
8091            offset: usize,
8092            depth: fidl::encoding::Depth,
8093        ) -> fidl::Result<()> {
8094            encoder.debug_check_bounds::<BaseSocketSetReceiveBufferRequest>(offset);
8095            // Zero out padding regions. There's no need to apply masks
8096            // because the unmasked parts will be overwritten by fields.
8097            // Write the fields.
8098            self.0.encode(encoder, offset + 0, depth)?;
8099            Ok(())
8100        }
8101    }
8102
8103    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8104        for BaseSocketSetReceiveBufferRequest
8105    {
8106        #[inline(always)]
8107        fn new_empty() -> Self {
8108            Self { value_bytes: fidl::new_empty!(u64, D) }
8109        }
8110
8111        #[inline]
8112        unsafe fn decode(
8113            &mut self,
8114            decoder: &mut fidl::encoding::Decoder<'_, D>,
8115            offset: usize,
8116            _depth: fidl::encoding::Depth,
8117        ) -> fidl::Result<()> {
8118            decoder.debug_check_bounds::<Self>(offset);
8119            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8120            // Verify that padding bytes are zero.
8121            // Copy from the buffer into the object.
8122            unsafe {
8123                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8124            }
8125            Ok(())
8126        }
8127    }
8128
8129    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReuseAddressRequest {
8130        type Borrowed<'a> = &'a Self;
8131        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8132            value
8133        }
8134    }
8135
8136    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReuseAddressRequest {
8137        type Owned = Self;
8138
8139        #[inline(always)]
8140        fn inline_align(_context: fidl::encoding::Context) -> usize {
8141            1
8142        }
8143
8144        #[inline(always)]
8145        fn inline_size(_context: fidl::encoding::Context) -> usize {
8146            1
8147        }
8148    }
8149
8150    unsafe impl<D: fidl::encoding::ResourceDialect>
8151        fidl::encoding::Encode<BaseSocketSetReuseAddressRequest, D>
8152        for &BaseSocketSetReuseAddressRequest
8153    {
8154        #[inline]
8155        unsafe fn encode(
8156            self,
8157            encoder: &mut fidl::encoding::Encoder<'_, D>,
8158            offset: usize,
8159            _depth: fidl::encoding::Depth,
8160        ) -> fidl::Result<()> {
8161            encoder.debug_check_bounds::<BaseSocketSetReuseAddressRequest>(offset);
8162            // Delegate to tuple encoding.
8163            fidl::encoding::Encode::<BaseSocketSetReuseAddressRequest, D>::encode(
8164                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8165                encoder,
8166                offset,
8167                _depth,
8168            )
8169        }
8170    }
8171    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8172        fidl::encoding::Encode<BaseSocketSetReuseAddressRequest, D> for (T0,)
8173    {
8174        #[inline]
8175        unsafe fn encode(
8176            self,
8177            encoder: &mut fidl::encoding::Encoder<'_, D>,
8178            offset: usize,
8179            depth: fidl::encoding::Depth,
8180        ) -> fidl::Result<()> {
8181            encoder.debug_check_bounds::<BaseSocketSetReuseAddressRequest>(offset);
8182            // Zero out padding regions. There's no need to apply masks
8183            // because the unmasked parts will be overwritten by fields.
8184            // Write the fields.
8185            self.0.encode(encoder, offset + 0, depth)?;
8186            Ok(())
8187        }
8188    }
8189
8190    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8191        for BaseSocketSetReuseAddressRequest
8192    {
8193        #[inline(always)]
8194        fn new_empty() -> Self {
8195            Self { value: fidl::new_empty!(bool, D) }
8196        }
8197
8198        #[inline]
8199        unsafe fn decode(
8200            &mut self,
8201            decoder: &mut fidl::encoding::Decoder<'_, D>,
8202            offset: usize,
8203            _depth: fidl::encoding::Depth,
8204        ) -> fidl::Result<()> {
8205            decoder.debug_check_bounds::<Self>(offset);
8206            // Verify that padding bytes are zero.
8207            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8208            Ok(())
8209        }
8210    }
8211
8212    impl fidl::encoding::ValueTypeMarker for BaseSocketSetReusePortDeprecatedRequest {
8213        type Borrowed<'a> = &'a Self;
8214        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8215            value
8216        }
8217    }
8218
8219    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetReusePortDeprecatedRequest {
8220        type Owned = Self;
8221
8222        #[inline(always)]
8223        fn inline_align(_context: fidl::encoding::Context) -> usize {
8224            1
8225        }
8226
8227        #[inline(always)]
8228        fn inline_size(_context: fidl::encoding::Context) -> usize {
8229            1
8230        }
8231    }
8232
8233    unsafe impl<D: fidl::encoding::ResourceDialect>
8234        fidl::encoding::Encode<BaseSocketSetReusePortDeprecatedRequest, D>
8235        for &BaseSocketSetReusePortDeprecatedRequest
8236    {
8237        #[inline]
8238        unsafe fn encode(
8239            self,
8240            encoder: &mut fidl::encoding::Encoder<'_, D>,
8241            offset: usize,
8242            _depth: fidl::encoding::Depth,
8243        ) -> fidl::Result<()> {
8244            encoder.debug_check_bounds::<BaseSocketSetReusePortDeprecatedRequest>(offset);
8245            // Delegate to tuple encoding.
8246            fidl::encoding::Encode::<BaseSocketSetReusePortDeprecatedRequest, D>::encode(
8247                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8248                encoder,
8249                offset,
8250                _depth,
8251            )
8252        }
8253    }
8254    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8255        fidl::encoding::Encode<BaseSocketSetReusePortDeprecatedRequest, D> for (T0,)
8256    {
8257        #[inline]
8258        unsafe fn encode(
8259            self,
8260            encoder: &mut fidl::encoding::Encoder<'_, D>,
8261            offset: usize,
8262            depth: fidl::encoding::Depth,
8263        ) -> fidl::Result<()> {
8264            encoder.debug_check_bounds::<BaseSocketSetReusePortDeprecatedRequest>(offset);
8265            // Zero out padding regions. There's no need to apply masks
8266            // because the unmasked parts will be overwritten by fields.
8267            // Write the fields.
8268            self.0.encode(encoder, offset + 0, depth)?;
8269            Ok(())
8270        }
8271    }
8272
8273    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8274        for BaseSocketSetReusePortDeprecatedRequest
8275    {
8276        #[inline(always)]
8277        fn new_empty() -> Self {
8278            Self { value: fidl::new_empty!(bool, D) }
8279        }
8280
8281        #[inline]
8282        unsafe fn decode(
8283            &mut self,
8284            decoder: &mut fidl::encoding::Decoder<'_, D>,
8285            offset: usize,
8286            _depth: fidl::encoding::Depth,
8287        ) -> fidl::Result<()> {
8288            decoder.debug_check_bounds::<Self>(offset);
8289            // Verify that padding bytes are zero.
8290            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8291            Ok(())
8292        }
8293    }
8294
8295    impl fidl::encoding::ValueTypeMarker for BaseSocketSetSendBufferRequest {
8296        type Borrowed<'a> = &'a Self;
8297        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8298            value
8299        }
8300    }
8301
8302    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetSendBufferRequest {
8303        type Owned = Self;
8304
8305        #[inline(always)]
8306        fn inline_align(_context: fidl::encoding::Context) -> usize {
8307            8
8308        }
8309
8310        #[inline(always)]
8311        fn inline_size(_context: fidl::encoding::Context) -> usize {
8312            8
8313        }
8314        #[inline(always)]
8315        fn encode_is_copy() -> bool {
8316            true
8317        }
8318
8319        #[inline(always)]
8320        fn decode_is_copy() -> bool {
8321            true
8322        }
8323    }
8324
8325    unsafe impl<D: fidl::encoding::ResourceDialect>
8326        fidl::encoding::Encode<BaseSocketSetSendBufferRequest, D>
8327        for &BaseSocketSetSendBufferRequest
8328    {
8329        #[inline]
8330        unsafe fn encode(
8331            self,
8332            encoder: &mut fidl::encoding::Encoder<'_, D>,
8333            offset: usize,
8334            _depth: fidl::encoding::Depth,
8335        ) -> fidl::Result<()> {
8336            encoder.debug_check_bounds::<BaseSocketSetSendBufferRequest>(offset);
8337            unsafe {
8338                // Copy the object into the buffer.
8339                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8340                (buf_ptr as *mut BaseSocketSetSendBufferRequest)
8341                    .write_unaligned((self as *const BaseSocketSetSendBufferRequest).read());
8342                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8343                // done second because the memcpy will write garbage to these bytes.
8344            }
8345            Ok(())
8346        }
8347    }
8348    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8349        fidl::encoding::Encode<BaseSocketSetSendBufferRequest, D> for (T0,)
8350    {
8351        #[inline]
8352        unsafe fn encode(
8353            self,
8354            encoder: &mut fidl::encoding::Encoder<'_, D>,
8355            offset: usize,
8356            depth: fidl::encoding::Depth,
8357        ) -> fidl::Result<()> {
8358            encoder.debug_check_bounds::<BaseSocketSetSendBufferRequest>(offset);
8359            // Zero out padding regions. There's no need to apply masks
8360            // because the unmasked parts will be overwritten by fields.
8361            // Write the fields.
8362            self.0.encode(encoder, offset + 0, depth)?;
8363            Ok(())
8364        }
8365    }
8366
8367    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8368        for BaseSocketSetSendBufferRequest
8369    {
8370        #[inline(always)]
8371        fn new_empty() -> Self {
8372            Self { value_bytes: fidl::new_empty!(u64, D) }
8373        }
8374
8375        #[inline]
8376        unsafe fn decode(
8377            &mut self,
8378            decoder: &mut fidl::encoding::Decoder<'_, D>,
8379            offset: usize,
8380            _depth: fidl::encoding::Depth,
8381        ) -> fidl::Result<()> {
8382            decoder.debug_check_bounds::<Self>(offset);
8383            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8384            // Verify that padding bytes are zero.
8385            // Copy from the buffer into the object.
8386            unsafe {
8387                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8388            }
8389            Ok(())
8390        }
8391    }
8392
8393    impl fidl::encoding::ValueTypeMarker for BaseSocketSetTimestampRequest {
8394        type Borrowed<'a> = &'a Self;
8395        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8396            value
8397        }
8398    }
8399
8400    unsafe impl fidl::encoding::TypeMarker for BaseSocketSetTimestampRequest {
8401        type Owned = Self;
8402
8403        #[inline(always)]
8404        fn inline_align(_context: fidl::encoding::Context) -> usize {
8405            4
8406        }
8407
8408        #[inline(always)]
8409        fn inline_size(_context: fidl::encoding::Context) -> usize {
8410            4
8411        }
8412    }
8413
8414    unsafe impl<D: fidl::encoding::ResourceDialect>
8415        fidl::encoding::Encode<BaseSocketSetTimestampRequest, D>
8416        for &BaseSocketSetTimestampRequest
8417    {
8418        #[inline]
8419        unsafe fn encode(
8420            self,
8421            encoder: &mut fidl::encoding::Encoder<'_, D>,
8422            offset: usize,
8423            _depth: fidl::encoding::Depth,
8424        ) -> fidl::Result<()> {
8425            encoder.debug_check_bounds::<BaseSocketSetTimestampRequest>(offset);
8426            // Delegate to tuple encoding.
8427            fidl::encoding::Encode::<BaseSocketSetTimestampRequest, D>::encode(
8428                (<TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8429                encoder,
8430                offset,
8431                _depth,
8432            )
8433        }
8434    }
8435    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TimestampOption, D>>
8436        fidl::encoding::Encode<BaseSocketSetTimestampRequest, D> for (T0,)
8437    {
8438        #[inline]
8439        unsafe fn encode(
8440            self,
8441            encoder: &mut fidl::encoding::Encoder<'_, D>,
8442            offset: usize,
8443            depth: fidl::encoding::Depth,
8444        ) -> fidl::Result<()> {
8445            encoder.debug_check_bounds::<BaseSocketSetTimestampRequest>(offset);
8446            // Zero out padding regions. There's no need to apply masks
8447            // because the unmasked parts will be overwritten by fields.
8448            // Write the fields.
8449            self.0.encode(encoder, offset + 0, depth)?;
8450            Ok(())
8451        }
8452    }
8453
8454    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8455        for BaseSocketSetTimestampRequest
8456    {
8457        #[inline(always)]
8458        fn new_empty() -> Self {
8459            Self { value: fidl::new_empty!(TimestampOption, D) }
8460        }
8461
8462        #[inline]
8463        unsafe fn decode(
8464            &mut self,
8465            decoder: &mut fidl::encoding::Decoder<'_, D>,
8466            offset: usize,
8467            _depth: fidl::encoding::Depth,
8468        ) -> fidl::Result<()> {
8469            decoder.debug_check_bounds::<Self>(offset);
8470            // Verify that padding bytes are zero.
8471            fidl::decode!(TimestampOption, D, &mut self.value, decoder, offset + 0, _depth)?;
8472            Ok(())
8473        }
8474    }
8475
8476    impl fidl::encoding::ValueTypeMarker for BaseSocketGetAcceptConnResponse {
8477        type Borrowed<'a> = &'a Self;
8478        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8479            value
8480        }
8481    }
8482
8483    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetAcceptConnResponse {
8484        type Owned = Self;
8485
8486        #[inline(always)]
8487        fn inline_align(_context: fidl::encoding::Context) -> usize {
8488            1
8489        }
8490
8491        #[inline(always)]
8492        fn inline_size(_context: fidl::encoding::Context) -> usize {
8493            1
8494        }
8495    }
8496
8497    unsafe impl<D: fidl::encoding::ResourceDialect>
8498        fidl::encoding::Encode<BaseSocketGetAcceptConnResponse, D>
8499        for &BaseSocketGetAcceptConnResponse
8500    {
8501        #[inline]
8502        unsafe fn encode(
8503            self,
8504            encoder: &mut fidl::encoding::Encoder<'_, D>,
8505            offset: usize,
8506            _depth: fidl::encoding::Depth,
8507        ) -> fidl::Result<()> {
8508            encoder.debug_check_bounds::<BaseSocketGetAcceptConnResponse>(offset);
8509            // Delegate to tuple encoding.
8510            fidl::encoding::Encode::<BaseSocketGetAcceptConnResponse, D>::encode(
8511                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8512                encoder,
8513                offset,
8514                _depth,
8515            )
8516        }
8517    }
8518    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8519        fidl::encoding::Encode<BaseSocketGetAcceptConnResponse, D> for (T0,)
8520    {
8521        #[inline]
8522        unsafe fn encode(
8523            self,
8524            encoder: &mut fidl::encoding::Encoder<'_, D>,
8525            offset: usize,
8526            depth: fidl::encoding::Depth,
8527        ) -> fidl::Result<()> {
8528            encoder.debug_check_bounds::<BaseSocketGetAcceptConnResponse>(offset);
8529            // Zero out padding regions. There's no need to apply masks
8530            // because the unmasked parts will be overwritten by fields.
8531            // Write the fields.
8532            self.0.encode(encoder, offset + 0, depth)?;
8533            Ok(())
8534        }
8535    }
8536
8537    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8538        for BaseSocketGetAcceptConnResponse
8539    {
8540        #[inline(always)]
8541        fn new_empty() -> Self {
8542            Self { value: fidl::new_empty!(bool, D) }
8543        }
8544
8545        #[inline]
8546        unsafe fn decode(
8547            &mut self,
8548            decoder: &mut fidl::encoding::Decoder<'_, D>,
8549            offset: usize,
8550            _depth: fidl::encoding::Depth,
8551        ) -> fidl::Result<()> {
8552            decoder.debug_check_bounds::<Self>(offset);
8553            // Verify that padding bytes are zero.
8554            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8555            Ok(())
8556        }
8557    }
8558
8559    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBindToDeviceResponse {
8560        type Borrowed<'a> = &'a Self;
8561        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8562            value
8563        }
8564    }
8565
8566    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBindToDeviceResponse {
8567        type Owned = Self;
8568
8569        #[inline(always)]
8570        fn inline_align(_context: fidl::encoding::Context) -> usize {
8571            8
8572        }
8573
8574        #[inline(always)]
8575        fn inline_size(_context: fidl::encoding::Context) -> usize {
8576            16
8577        }
8578    }
8579
8580    unsafe impl<D: fidl::encoding::ResourceDialect>
8581        fidl::encoding::Encode<BaseSocketGetBindToDeviceResponse, D>
8582        for &BaseSocketGetBindToDeviceResponse
8583    {
8584        #[inline]
8585        unsafe fn encode(
8586            self,
8587            encoder: &mut fidl::encoding::Encoder<'_, D>,
8588            offset: usize,
8589            _depth: fidl::encoding::Depth,
8590        ) -> fidl::Result<()> {
8591            encoder.debug_check_bounds::<BaseSocketGetBindToDeviceResponse>(offset);
8592            // Delegate to tuple encoding.
8593            fidl::encoding::Encode::<BaseSocketGetBindToDeviceResponse, D>::encode(
8594                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
8595                    &self.value,
8596                ),),
8597                encoder,
8598                offset,
8599                _depth,
8600            )
8601        }
8602    }
8603    unsafe impl<
8604        D: fidl::encoding::ResourceDialect,
8605        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
8606    > fidl::encoding::Encode<BaseSocketGetBindToDeviceResponse, D> for (T0,)
8607    {
8608        #[inline]
8609        unsafe fn encode(
8610            self,
8611            encoder: &mut fidl::encoding::Encoder<'_, D>,
8612            offset: usize,
8613            depth: fidl::encoding::Depth,
8614        ) -> fidl::Result<()> {
8615            encoder.debug_check_bounds::<BaseSocketGetBindToDeviceResponse>(offset);
8616            // Zero out padding regions. There's no need to apply masks
8617            // because the unmasked parts will be overwritten by fields.
8618            // Write the fields.
8619            self.0.encode(encoder, offset + 0, depth)?;
8620            Ok(())
8621        }
8622    }
8623
8624    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8625        for BaseSocketGetBindToDeviceResponse
8626    {
8627        #[inline(always)]
8628        fn new_empty() -> Self {
8629            Self { value: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
8630        }
8631
8632        #[inline]
8633        unsafe fn decode(
8634            &mut self,
8635            decoder: &mut fidl::encoding::Decoder<'_, D>,
8636            offset: usize,
8637            _depth: fidl::encoding::Depth,
8638        ) -> fidl::Result<()> {
8639            decoder.debug_check_bounds::<Self>(offset);
8640            // Verify that padding bytes are zero.
8641            fidl::decode!(
8642                fidl::encoding::BoundedString<15>,
8643                D,
8644                &mut self.value,
8645                decoder,
8646                offset + 0,
8647                _depth
8648            )?;
8649            Ok(())
8650        }
8651    }
8652
8653    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBindToInterfaceIndexResponse {
8654        type Borrowed<'a> = &'a Self;
8655        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8656            value
8657        }
8658    }
8659
8660    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBindToInterfaceIndexResponse {
8661        type Owned = Self;
8662
8663        #[inline(always)]
8664        fn inline_align(_context: fidl::encoding::Context) -> usize {
8665            8
8666        }
8667
8668        #[inline(always)]
8669        fn inline_size(_context: fidl::encoding::Context) -> usize {
8670            8
8671        }
8672        #[inline(always)]
8673        fn encode_is_copy() -> bool {
8674            true
8675        }
8676
8677        #[inline(always)]
8678        fn decode_is_copy() -> bool {
8679            true
8680        }
8681    }
8682
8683    unsafe impl<D: fidl::encoding::ResourceDialect>
8684        fidl::encoding::Encode<BaseSocketGetBindToInterfaceIndexResponse, D>
8685        for &BaseSocketGetBindToInterfaceIndexResponse
8686    {
8687        #[inline]
8688        unsafe fn encode(
8689            self,
8690            encoder: &mut fidl::encoding::Encoder<'_, D>,
8691            offset: usize,
8692            _depth: fidl::encoding::Depth,
8693        ) -> fidl::Result<()> {
8694            encoder.debug_check_bounds::<BaseSocketGetBindToInterfaceIndexResponse>(offset);
8695            unsafe {
8696                // Copy the object into the buffer.
8697                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8698                (buf_ptr as *mut BaseSocketGetBindToInterfaceIndexResponse).write_unaligned(
8699                    (self as *const BaseSocketGetBindToInterfaceIndexResponse).read(),
8700                );
8701                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8702                // done second because the memcpy will write garbage to these bytes.
8703            }
8704            Ok(())
8705        }
8706    }
8707    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8708        fidl::encoding::Encode<BaseSocketGetBindToInterfaceIndexResponse, D> for (T0,)
8709    {
8710        #[inline]
8711        unsafe fn encode(
8712            self,
8713            encoder: &mut fidl::encoding::Encoder<'_, D>,
8714            offset: usize,
8715            depth: fidl::encoding::Depth,
8716        ) -> fidl::Result<()> {
8717            encoder.debug_check_bounds::<BaseSocketGetBindToInterfaceIndexResponse>(offset);
8718            // Zero out padding regions. There's no need to apply masks
8719            // because the unmasked parts will be overwritten by fields.
8720            // Write the fields.
8721            self.0.encode(encoder, offset + 0, depth)?;
8722            Ok(())
8723        }
8724    }
8725
8726    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8727        for BaseSocketGetBindToInterfaceIndexResponse
8728    {
8729        #[inline(always)]
8730        fn new_empty() -> Self {
8731            Self { value: fidl::new_empty!(u64, D) }
8732        }
8733
8734        #[inline]
8735        unsafe fn decode(
8736            &mut self,
8737            decoder: &mut fidl::encoding::Decoder<'_, D>,
8738            offset: usize,
8739            _depth: fidl::encoding::Depth,
8740        ) -> fidl::Result<()> {
8741            decoder.debug_check_bounds::<Self>(offset);
8742            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8743            // Verify that padding bytes are zero.
8744            // Copy from the buffer into the object.
8745            unsafe {
8746                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8747            }
8748            Ok(())
8749        }
8750    }
8751
8752    impl fidl::encoding::ValueTypeMarker for BaseSocketGetBroadcastResponse {
8753        type Borrowed<'a> = &'a Self;
8754        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8755            value
8756        }
8757    }
8758
8759    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetBroadcastResponse {
8760        type Owned = Self;
8761
8762        #[inline(always)]
8763        fn inline_align(_context: fidl::encoding::Context) -> usize {
8764            1
8765        }
8766
8767        #[inline(always)]
8768        fn inline_size(_context: fidl::encoding::Context) -> usize {
8769            1
8770        }
8771    }
8772
8773    unsafe impl<D: fidl::encoding::ResourceDialect>
8774        fidl::encoding::Encode<BaseSocketGetBroadcastResponse, D>
8775        for &BaseSocketGetBroadcastResponse
8776    {
8777        #[inline]
8778        unsafe fn encode(
8779            self,
8780            encoder: &mut fidl::encoding::Encoder<'_, D>,
8781            offset: usize,
8782            _depth: fidl::encoding::Depth,
8783        ) -> fidl::Result<()> {
8784            encoder.debug_check_bounds::<BaseSocketGetBroadcastResponse>(offset);
8785            // Delegate to tuple encoding.
8786            fidl::encoding::Encode::<BaseSocketGetBroadcastResponse, D>::encode(
8787                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8788                encoder,
8789                offset,
8790                _depth,
8791            )
8792        }
8793    }
8794    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8795        fidl::encoding::Encode<BaseSocketGetBroadcastResponse, D> for (T0,)
8796    {
8797        #[inline]
8798        unsafe fn encode(
8799            self,
8800            encoder: &mut fidl::encoding::Encoder<'_, D>,
8801            offset: usize,
8802            depth: fidl::encoding::Depth,
8803        ) -> fidl::Result<()> {
8804            encoder.debug_check_bounds::<BaseSocketGetBroadcastResponse>(offset);
8805            // Zero out padding regions. There's no need to apply masks
8806            // because the unmasked parts will be overwritten by fields.
8807            // Write the fields.
8808            self.0.encode(encoder, offset + 0, depth)?;
8809            Ok(())
8810        }
8811    }
8812
8813    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8814        for BaseSocketGetBroadcastResponse
8815    {
8816        #[inline(always)]
8817        fn new_empty() -> Self {
8818            Self { value: fidl::new_empty!(bool, D) }
8819        }
8820
8821        #[inline]
8822        unsafe fn decode(
8823            &mut self,
8824            decoder: &mut fidl::encoding::Decoder<'_, D>,
8825            offset: usize,
8826            _depth: fidl::encoding::Depth,
8827        ) -> fidl::Result<()> {
8828            decoder.debug_check_bounds::<Self>(offset);
8829            // Verify that padding bytes are zero.
8830            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
8831            Ok(())
8832        }
8833    }
8834
8835    impl fidl::encoding::ValueTypeMarker for BaseSocketGetCookieResponse {
8836        type Borrowed<'a> = &'a Self;
8837        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8838            value
8839        }
8840    }
8841
8842    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetCookieResponse {
8843        type Owned = Self;
8844
8845        #[inline(always)]
8846        fn inline_align(_context: fidl::encoding::Context) -> usize {
8847            8
8848        }
8849
8850        #[inline(always)]
8851        fn inline_size(_context: fidl::encoding::Context) -> usize {
8852            8
8853        }
8854        #[inline(always)]
8855        fn encode_is_copy() -> bool {
8856            true
8857        }
8858
8859        #[inline(always)]
8860        fn decode_is_copy() -> bool {
8861            true
8862        }
8863    }
8864
8865    unsafe impl<D: fidl::encoding::ResourceDialect>
8866        fidl::encoding::Encode<BaseSocketGetCookieResponse, D> for &BaseSocketGetCookieResponse
8867    {
8868        #[inline]
8869        unsafe fn encode(
8870            self,
8871            encoder: &mut fidl::encoding::Encoder<'_, D>,
8872            offset: usize,
8873            _depth: fidl::encoding::Depth,
8874        ) -> fidl::Result<()> {
8875            encoder.debug_check_bounds::<BaseSocketGetCookieResponse>(offset);
8876            unsafe {
8877                // Copy the object into the buffer.
8878                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8879                (buf_ptr as *mut BaseSocketGetCookieResponse)
8880                    .write_unaligned((self as *const BaseSocketGetCookieResponse).read());
8881                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8882                // done second because the memcpy will write garbage to these bytes.
8883            }
8884            Ok(())
8885        }
8886    }
8887    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
8888        fidl::encoding::Encode<BaseSocketGetCookieResponse, D> for (T0,)
8889    {
8890        #[inline]
8891        unsafe fn encode(
8892            self,
8893            encoder: &mut fidl::encoding::Encoder<'_, D>,
8894            offset: usize,
8895            depth: fidl::encoding::Depth,
8896        ) -> fidl::Result<()> {
8897            encoder.debug_check_bounds::<BaseSocketGetCookieResponse>(offset);
8898            // Zero out padding regions. There's no need to apply masks
8899            // because the unmasked parts will be overwritten by fields.
8900            // Write the fields.
8901            self.0.encode(encoder, offset + 0, depth)?;
8902            Ok(())
8903        }
8904    }
8905
8906    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8907        for BaseSocketGetCookieResponse
8908    {
8909        #[inline(always)]
8910        fn new_empty() -> Self {
8911            Self { value: fidl::new_empty!(u64, D) }
8912        }
8913
8914        #[inline]
8915        unsafe fn decode(
8916            &mut self,
8917            decoder: &mut fidl::encoding::Decoder<'_, D>,
8918            offset: usize,
8919            _depth: fidl::encoding::Depth,
8920        ) -> fidl::Result<()> {
8921            decoder.debug_check_bounds::<Self>(offset);
8922            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8923            // Verify that padding bytes are zero.
8924            // Copy from the buffer into the object.
8925            unsafe {
8926                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8927            }
8928            Ok(())
8929        }
8930    }
8931
8932    impl fidl::encoding::ValueTypeMarker for BaseSocketGetKeepAliveResponse {
8933        type Borrowed<'a> = &'a Self;
8934        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8935            value
8936        }
8937    }
8938
8939    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetKeepAliveResponse {
8940        type Owned = Self;
8941
8942        #[inline(always)]
8943        fn inline_align(_context: fidl::encoding::Context) -> usize {
8944            1
8945        }
8946
8947        #[inline(always)]
8948        fn inline_size(_context: fidl::encoding::Context) -> usize {
8949            1
8950        }
8951    }
8952
8953    unsafe impl<D: fidl::encoding::ResourceDialect>
8954        fidl::encoding::Encode<BaseSocketGetKeepAliveResponse, D>
8955        for &BaseSocketGetKeepAliveResponse
8956    {
8957        #[inline]
8958        unsafe fn encode(
8959            self,
8960            encoder: &mut fidl::encoding::Encoder<'_, D>,
8961            offset: usize,
8962            _depth: fidl::encoding::Depth,
8963        ) -> fidl::Result<()> {
8964            encoder.debug_check_bounds::<BaseSocketGetKeepAliveResponse>(offset);
8965            // Delegate to tuple encoding.
8966            fidl::encoding::Encode::<BaseSocketGetKeepAliveResponse, D>::encode(
8967                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
8968                encoder,
8969                offset,
8970                _depth,
8971            )
8972        }
8973    }
8974    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
8975        fidl::encoding::Encode<BaseSocketGetKeepAliveResponse, D> for (T0,)
8976    {
8977        #[inline]
8978        unsafe fn encode(
8979            self,
8980            encoder: &mut fidl::encoding::Encoder<'_, D>,
8981            offset: usize,
8982            depth: fidl::encoding::Depth,
8983        ) -> fidl::Result<()> {
8984            encoder.debug_check_bounds::<BaseSocketGetKeepAliveResponse>(offset);
8985            // Zero out padding regions. There's no need to apply masks
8986            // because the unmasked parts will be overwritten by fields.
8987            // Write the fields.
8988            self.0.encode(encoder, offset + 0, depth)?;
8989            Ok(())
8990        }
8991    }
8992
8993    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8994        for BaseSocketGetKeepAliveResponse
8995    {
8996        #[inline(always)]
8997        fn new_empty() -> Self {
8998            Self { value: fidl::new_empty!(bool, D) }
8999        }
9000
9001        #[inline]
9002        unsafe fn decode(
9003            &mut self,
9004            decoder: &mut fidl::encoding::Decoder<'_, D>,
9005            offset: usize,
9006            _depth: fidl::encoding::Depth,
9007        ) -> fidl::Result<()> {
9008            decoder.debug_check_bounds::<Self>(offset);
9009            // Verify that padding bytes are zero.
9010            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9011            Ok(())
9012        }
9013    }
9014
9015    impl fidl::encoding::ValueTypeMarker for BaseSocketGetLingerResponse {
9016        type Borrowed<'a> = &'a Self;
9017        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9018            value
9019        }
9020    }
9021
9022    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetLingerResponse {
9023        type Owned = Self;
9024
9025        #[inline(always)]
9026        fn inline_align(_context: fidl::encoding::Context) -> usize {
9027            4
9028        }
9029
9030        #[inline(always)]
9031        fn inline_size(_context: fidl::encoding::Context) -> usize {
9032            8
9033        }
9034    }
9035
9036    unsafe impl<D: fidl::encoding::ResourceDialect>
9037        fidl::encoding::Encode<BaseSocketGetLingerResponse, D> for &BaseSocketGetLingerResponse
9038    {
9039        #[inline]
9040        unsafe fn encode(
9041            self,
9042            encoder: &mut fidl::encoding::Encoder<'_, D>,
9043            offset: usize,
9044            _depth: fidl::encoding::Depth,
9045        ) -> fidl::Result<()> {
9046            encoder.debug_check_bounds::<BaseSocketGetLingerResponse>(offset);
9047            // Delegate to tuple encoding.
9048            fidl::encoding::Encode::<BaseSocketGetLingerResponse, D>::encode(
9049                (
9050                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.linger),
9051                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length_secs),
9052                ),
9053                encoder,
9054                offset,
9055                _depth,
9056            )
9057        }
9058    }
9059    unsafe impl<
9060        D: fidl::encoding::ResourceDialect,
9061        T0: fidl::encoding::Encode<bool, D>,
9062        T1: fidl::encoding::Encode<u32, D>,
9063    > fidl::encoding::Encode<BaseSocketGetLingerResponse, D> for (T0, T1)
9064    {
9065        #[inline]
9066        unsafe fn encode(
9067            self,
9068            encoder: &mut fidl::encoding::Encoder<'_, D>,
9069            offset: usize,
9070            depth: fidl::encoding::Depth,
9071        ) -> fidl::Result<()> {
9072            encoder.debug_check_bounds::<BaseSocketGetLingerResponse>(offset);
9073            // Zero out padding regions. There's no need to apply masks
9074            // because the unmasked parts will be overwritten by fields.
9075            unsafe {
9076                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9077                (ptr as *mut u32).write_unaligned(0);
9078            }
9079            // Write the fields.
9080            self.0.encode(encoder, offset + 0, depth)?;
9081            self.1.encode(encoder, offset + 4, depth)?;
9082            Ok(())
9083        }
9084    }
9085
9086    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9087        for BaseSocketGetLingerResponse
9088    {
9089        #[inline(always)]
9090        fn new_empty() -> Self {
9091            Self { linger: fidl::new_empty!(bool, D), length_secs: fidl::new_empty!(u32, D) }
9092        }
9093
9094        #[inline]
9095        unsafe fn decode(
9096            &mut self,
9097            decoder: &mut fidl::encoding::Decoder<'_, D>,
9098            offset: usize,
9099            _depth: fidl::encoding::Depth,
9100        ) -> fidl::Result<()> {
9101            decoder.debug_check_bounds::<Self>(offset);
9102            // Verify that padding bytes are zero.
9103            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9104            let padval = unsafe { (ptr as *const u32).read_unaligned() };
9105            let mask = 0xffffff00u32;
9106            let maskedval = padval & mask;
9107            if maskedval != 0 {
9108                return Err(fidl::Error::NonZeroPadding {
9109                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9110                });
9111            }
9112            fidl::decode!(bool, D, &mut self.linger, decoder, offset + 0, _depth)?;
9113            fidl::decode!(u32, D, &mut self.length_secs, decoder, offset + 4, _depth)?;
9114            Ok(())
9115        }
9116    }
9117
9118    impl fidl::encoding::ValueTypeMarker for BaseSocketGetMarkResponse {
9119        type Borrowed<'a> = &'a Self;
9120        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9121            value
9122        }
9123    }
9124
9125    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetMarkResponse {
9126        type Owned = Self;
9127
9128        #[inline(always)]
9129        fn inline_align(_context: fidl::encoding::Context) -> usize {
9130            8
9131        }
9132
9133        #[inline(always)]
9134        fn inline_size(_context: fidl::encoding::Context) -> usize {
9135            16
9136        }
9137    }
9138
9139    unsafe impl<D: fidl::encoding::ResourceDialect>
9140        fidl::encoding::Encode<BaseSocketGetMarkResponse, D> for &BaseSocketGetMarkResponse
9141    {
9142        #[inline]
9143        unsafe fn encode(
9144            self,
9145            encoder: &mut fidl::encoding::Encoder<'_, D>,
9146            offset: usize,
9147            _depth: fidl::encoding::Depth,
9148        ) -> fidl::Result<()> {
9149            encoder.debug_check_bounds::<BaseSocketGetMarkResponse>(offset);
9150            // Delegate to tuple encoding.
9151            fidl::encoding::Encode::<BaseSocketGetMarkResponse, D>::encode(
9152                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mark),),
9153                encoder,
9154                offset,
9155                _depth,
9156            )
9157        }
9158    }
9159    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
9160        fidl::encoding::Encode<BaseSocketGetMarkResponse, D> for (T0,)
9161    {
9162        #[inline]
9163        unsafe fn encode(
9164            self,
9165            encoder: &mut fidl::encoding::Encoder<'_, D>,
9166            offset: usize,
9167            depth: fidl::encoding::Depth,
9168        ) -> fidl::Result<()> {
9169            encoder.debug_check_bounds::<BaseSocketGetMarkResponse>(offset);
9170            // Zero out padding regions. There's no need to apply masks
9171            // because the unmasked parts will be overwritten by fields.
9172            // Write the fields.
9173            self.0.encode(encoder, offset + 0, depth)?;
9174            Ok(())
9175        }
9176    }
9177
9178    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9179        for BaseSocketGetMarkResponse
9180    {
9181        #[inline(always)]
9182        fn new_empty() -> Self {
9183            Self { mark: fidl::new_empty!(OptionalUint32, D) }
9184        }
9185
9186        #[inline]
9187        unsafe fn decode(
9188            &mut self,
9189            decoder: &mut fidl::encoding::Decoder<'_, D>,
9190            offset: usize,
9191            _depth: fidl::encoding::Depth,
9192        ) -> fidl::Result<()> {
9193            decoder.debug_check_bounds::<Self>(offset);
9194            // Verify that padding bytes are zero.
9195            fidl::decode!(OptionalUint32, D, &mut self.mark, decoder, offset + 0, _depth)?;
9196            Ok(())
9197        }
9198    }
9199
9200    impl fidl::encoding::ValueTypeMarker for BaseSocketGetNoCheckResponse {
9201        type Borrowed<'a> = &'a Self;
9202        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9203            value
9204        }
9205    }
9206
9207    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetNoCheckResponse {
9208        type Owned = Self;
9209
9210        #[inline(always)]
9211        fn inline_align(_context: fidl::encoding::Context) -> usize {
9212            1
9213        }
9214
9215        #[inline(always)]
9216        fn inline_size(_context: fidl::encoding::Context) -> usize {
9217            1
9218        }
9219    }
9220
9221    unsafe impl<D: fidl::encoding::ResourceDialect>
9222        fidl::encoding::Encode<BaseSocketGetNoCheckResponse, D> for &BaseSocketGetNoCheckResponse
9223    {
9224        #[inline]
9225        unsafe fn encode(
9226            self,
9227            encoder: &mut fidl::encoding::Encoder<'_, D>,
9228            offset: usize,
9229            _depth: fidl::encoding::Depth,
9230        ) -> fidl::Result<()> {
9231            encoder.debug_check_bounds::<BaseSocketGetNoCheckResponse>(offset);
9232            // Delegate to tuple encoding.
9233            fidl::encoding::Encode::<BaseSocketGetNoCheckResponse, D>::encode(
9234                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9235                encoder,
9236                offset,
9237                _depth,
9238            )
9239        }
9240    }
9241    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9242        fidl::encoding::Encode<BaseSocketGetNoCheckResponse, D> for (T0,)
9243    {
9244        #[inline]
9245        unsafe fn encode(
9246            self,
9247            encoder: &mut fidl::encoding::Encoder<'_, D>,
9248            offset: usize,
9249            depth: fidl::encoding::Depth,
9250        ) -> fidl::Result<()> {
9251            encoder.debug_check_bounds::<BaseSocketGetNoCheckResponse>(offset);
9252            // Zero out padding regions. There's no need to apply masks
9253            // because the unmasked parts will be overwritten by fields.
9254            // Write the fields.
9255            self.0.encode(encoder, offset + 0, depth)?;
9256            Ok(())
9257        }
9258    }
9259
9260    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9261        for BaseSocketGetNoCheckResponse
9262    {
9263        #[inline(always)]
9264        fn new_empty() -> Self {
9265            Self { value: fidl::new_empty!(bool, D) }
9266        }
9267
9268        #[inline]
9269        unsafe fn decode(
9270            &mut self,
9271            decoder: &mut fidl::encoding::Decoder<'_, D>,
9272            offset: usize,
9273            _depth: fidl::encoding::Depth,
9274        ) -> fidl::Result<()> {
9275            decoder.debug_check_bounds::<Self>(offset);
9276            // Verify that padding bytes are zero.
9277            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9278            Ok(())
9279        }
9280    }
9281
9282    impl fidl::encoding::ValueTypeMarker for BaseSocketGetOutOfBandInlineResponse {
9283        type Borrowed<'a> = &'a Self;
9284        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9285            value
9286        }
9287    }
9288
9289    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetOutOfBandInlineResponse {
9290        type Owned = Self;
9291
9292        #[inline(always)]
9293        fn inline_align(_context: fidl::encoding::Context) -> usize {
9294            1
9295        }
9296
9297        #[inline(always)]
9298        fn inline_size(_context: fidl::encoding::Context) -> usize {
9299            1
9300        }
9301    }
9302
9303    unsafe impl<D: fidl::encoding::ResourceDialect>
9304        fidl::encoding::Encode<BaseSocketGetOutOfBandInlineResponse, D>
9305        for &BaseSocketGetOutOfBandInlineResponse
9306    {
9307        #[inline]
9308        unsafe fn encode(
9309            self,
9310            encoder: &mut fidl::encoding::Encoder<'_, D>,
9311            offset: usize,
9312            _depth: fidl::encoding::Depth,
9313        ) -> fidl::Result<()> {
9314            encoder.debug_check_bounds::<BaseSocketGetOutOfBandInlineResponse>(offset);
9315            // Delegate to tuple encoding.
9316            fidl::encoding::Encode::<BaseSocketGetOutOfBandInlineResponse, D>::encode(
9317                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9318                encoder,
9319                offset,
9320                _depth,
9321            )
9322        }
9323    }
9324    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9325        fidl::encoding::Encode<BaseSocketGetOutOfBandInlineResponse, D> for (T0,)
9326    {
9327        #[inline]
9328        unsafe fn encode(
9329            self,
9330            encoder: &mut fidl::encoding::Encoder<'_, D>,
9331            offset: usize,
9332            depth: fidl::encoding::Depth,
9333        ) -> fidl::Result<()> {
9334            encoder.debug_check_bounds::<BaseSocketGetOutOfBandInlineResponse>(offset);
9335            // Zero out padding regions. There's no need to apply masks
9336            // because the unmasked parts will be overwritten by fields.
9337            // Write the fields.
9338            self.0.encode(encoder, offset + 0, depth)?;
9339            Ok(())
9340        }
9341    }
9342
9343    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9344        for BaseSocketGetOutOfBandInlineResponse
9345    {
9346        #[inline(always)]
9347        fn new_empty() -> Self {
9348            Self { value: fidl::new_empty!(bool, D) }
9349        }
9350
9351        #[inline]
9352        unsafe fn decode(
9353            &mut self,
9354            decoder: &mut fidl::encoding::Decoder<'_, D>,
9355            offset: usize,
9356            _depth: fidl::encoding::Depth,
9357        ) -> fidl::Result<()> {
9358            decoder.debug_check_bounds::<Self>(offset);
9359            // Verify that padding bytes are zero.
9360            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9361            Ok(())
9362        }
9363    }
9364
9365    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReceiveBufferResponse {
9366        type Borrowed<'a> = &'a Self;
9367        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9368            value
9369        }
9370    }
9371
9372    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReceiveBufferResponse {
9373        type Owned = Self;
9374
9375        #[inline(always)]
9376        fn inline_align(_context: fidl::encoding::Context) -> usize {
9377            8
9378        }
9379
9380        #[inline(always)]
9381        fn inline_size(_context: fidl::encoding::Context) -> usize {
9382            8
9383        }
9384        #[inline(always)]
9385        fn encode_is_copy() -> bool {
9386            true
9387        }
9388
9389        #[inline(always)]
9390        fn decode_is_copy() -> bool {
9391            true
9392        }
9393    }
9394
9395    unsafe impl<D: fidl::encoding::ResourceDialect>
9396        fidl::encoding::Encode<BaseSocketGetReceiveBufferResponse, D>
9397        for &BaseSocketGetReceiveBufferResponse
9398    {
9399        #[inline]
9400        unsafe fn encode(
9401            self,
9402            encoder: &mut fidl::encoding::Encoder<'_, D>,
9403            offset: usize,
9404            _depth: fidl::encoding::Depth,
9405        ) -> fidl::Result<()> {
9406            encoder.debug_check_bounds::<BaseSocketGetReceiveBufferResponse>(offset);
9407            unsafe {
9408                // Copy the object into the buffer.
9409                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9410                (buf_ptr as *mut BaseSocketGetReceiveBufferResponse)
9411                    .write_unaligned((self as *const BaseSocketGetReceiveBufferResponse).read());
9412                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9413                // done second because the memcpy will write garbage to these bytes.
9414            }
9415            Ok(())
9416        }
9417    }
9418    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9419        fidl::encoding::Encode<BaseSocketGetReceiveBufferResponse, D> for (T0,)
9420    {
9421        #[inline]
9422        unsafe fn encode(
9423            self,
9424            encoder: &mut fidl::encoding::Encoder<'_, D>,
9425            offset: usize,
9426            depth: fidl::encoding::Depth,
9427        ) -> fidl::Result<()> {
9428            encoder.debug_check_bounds::<BaseSocketGetReceiveBufferResponse>(offset);
9429            // Zero out padding regions. There's no need to apply masks
9430            // because the unmasked parts will be overwritten by fields.
9431            // Write the fields.
9432            self.0.encode(encoder, offset + 0, depth)?;
9433            Ok(())
9434        }
9435    }
9436
9437    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9438        for BaseSocketGetReceiveBufferResponse
9439    {
9440        #[inline(always)]
9441        fn new_empty() -> Self {
9442            Self { value_bytes: fidl::new_empty!(u64, D) }
9443        }
9444
9445        #[inline]
9446        unsafe fn decode(
9447            &mut self,
9448            decoder: &mut fidl::encoding::Decoder<'_, D>,
9449            offset: usize,
9450            _depth: fidl::encoding::Depth,
9451        ) -> fidl::Result<()> {
9452            decoder.debug_check_bounds::<Self>(offset);
9453            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9454            // Verify that padding bytes are zero.
9455            // Copy from the buffer into the object.
9456            unsafe {
9457                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9458            }
9459            Ok(())
9460        }
9461    }
9462
9463    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReuseAddressResponse {
9464        type Borrowed<'a> = &'a Self;
9465        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9466            value
9467        }
9468    }
9469
9470    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReuseAddressResponse {
9471        type Owned = Self;
9472
9473        #[inline(always)]
9474        fn inline_align(_context: fidl::encoding::Context) -> usize {
9475            1
9476        }
9477
9478        #[inline(always)]
9479        fn inline_size(_context: fidl::encoding::Context) -> usize {
9480            1
9481        }
9482    }
9483
9484    unsafe impl<D: fidl::encoding::ResourceDialect>
9485        fidl::encoding::Encode<BaseSocketGetReuseAddressResponse, D>
9486        for &BaseSocketGetReuseAddressResponse
9487    {
9488        #[inline]
9489        unsafe fn encode(
9490            self,
9491            encoder: &mut fidl::encoding::Encoder<'_, D>,
9492            offset: usize,
9493            _depth: fidl::encoding::Depth,
9494        ) -> fidl::Result<()> {
9495            encoder.debug_check_bounds::<BaseSocketGetReuseAddressResponse>(offset);
9496            // Delegate to tuple encoding.
9497            fidl::encoding::Encode::<BaseSocketGetReuseAddressResponse, D>::encode(
9498                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9499                encoder,
9500                offset,
9501                _depth,
9502            )
9503        }
9504    }
9505    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9506        fidl::encoding::Encode<BaseSocketGetReuseAddressResponse, D> for (T0,)
9507    {
9508        #[inline]
9509        unsafe fn encode(
9510            self,
9511            encoder: &mut fidl::encoding::Encoder<'_, D>,
9512            offset: usize,
9513            depth: fidl::encoding::Depth,
9514        ) -> fidl::Result<()> {
9515            encoder.debug_check_bounds::<BaseSocketGetReuseAddressResponse>(offset);
9516            // Zero out padding regions. There's no need to apply masks
9517            // because the unmasked parts will be overwritten by fields.
9518            // Write the fields.
9519            self.0.encode(encoder, offset + 0, depth)?;
9520            Ok(())
9521        }
9522    }
9523
9524    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9525        for BaseSocketGetReuseAddressResponse
9526    {
9527        #[inline(always)]
9528        fn new_empty() -> Self {
9529            Self { value: fidl::new_empty!(bool, D) }
9530        }
9531
9532        #[inline]
9533        unsafe fn decode(
9534            &mut self,
9535            decoder: &mut fidl::encoding::Decoder<'_, D>,
9536            offset: usize,
9537            _depth: fidl::encoding::Depth,
9538        ) -> fidl::Result<()> {
9539            decoder.debug_check_bounds::<Self>(offset);
9540            // Verify that padding bytes are zero.
9541            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9542            Ok(())
9543        }
9544    }
9545
9546    impl fidl::encoding::ValueTypeMarker for BaseSocketGetReusePortResponse {
9547        type Borrowed<'a> = &'a Self;
9548        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9549            value
9550        }
9551    }
9552
9553    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetReusePortResponse {
9554        type Owned = Self;
9555
9556        #[inline(always)]
9557        fn inline_align(_context: fidl::encoding::Context) -> usize {
9558            1
9559        }
9560
9561        #[inline(always)]
9562        fn inline_size(_context: fidl::encoding::Context) -> usize {
9563            1
9564        }
9565    }
9566
9567    unsafe impl<D: fidl::encoding::ResourceDialect>
9568        fidl::encoding::Encode<BaseSocketGetReusePortResponse, D>
9569        for &BaseSocketGetReusePortResponse
9570    {
9571        #[inline]
9572        unsafe fn encode(
9573            self,
9574            encoder: &mut fidl::encoding::Encoder<'_, D>,
9575            offset: usize,
9576            _depth: fidl::encoding::Depth,
9577        ) -> fidl::Result<()> {
9578            encoder.debug_check_bounds::<BaseSocketGetReusePortResponse>(offset);
9579            // Delegate to tuple encoding.
9580            fidl::encoding::Encode::<BaseSocketGetReusePortResponse, D>::encode(
9581                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9582                encoder,
9583                offset,
9584                _depth,
9585            )
9586        }
9587    }
9588    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
9589        fidl::encoding::Encode<BaseSocketGetReusePortResponse, D> for (T0,)
9590    {
9591        #[inline]
9592        unsafe fn encode(
9593            self,
9594            encoder: &mut fidl::encoding::Encoder<'_, D>,
9595            offset: usize,
9596            depth: fidl::encoding::Depth,
9597        ) -> fidl::Result<()> {
9598            encoder.debug_check_bounds::<BaseSocketGetReusePortResponse>(offset);
9599            // Zero out padding regions. There's no need to apply masks
9600            // because the unmasked parts will be overwritten by fields.
9601            // Write the fields.
9602            self.0.encode(encoder, offset + 0, depth)?;
9603            Ok(())
9604        }
9605    }
9606
9607    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9608        for BaseSocketGetReusePortResponse
9609    {
9610        #[inline(always)]
9611        fn new_empty() -> Self {
9612            Self { value: fidl::new_empty!(bool, D) }
9613        }
9614
9615        #[inline]
9616        unsafe fn decode(
9617            &mut self,
9618            decoder: &mut fidl::encoding::Decoder<'_, D>,
9619            offset: usize,
9620            _depth: fidl::encoding::Depth,
9621        ) -> fidl::Result<()> {
9622            decoder.debug_check_bounds::<Self>(offset);
9623            // Verify that padding bytes are zero.
9624            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
9625            Ok(())
9626        }
9627    }
9628
9629    impl fidl::encoding::ValueTypeMarker for BaseSocketGetSendBufferResponse {
9630        type Borrowed<'a> = &'a Self;
9631        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9632            value
9633        }
9634    }
9635
9636    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetSendBufferResponse {
9637        type Owned = Self;
9638
9639        #[inline(always)]
9640        fn inline_align(_context: fidl::encoding::Context) -> usize {
9641            8
9642        }
9643
9644        #[inline(always)]
9645        fn inline_size(_context: fidl::encoding::Context) -> usize {
9646            8
9647        }
9648        #[inline(always)]
9649        fn encode_is_copy() -> bool {
9650            true
9651        }
9652
9653        #[inline(always)]
9654        fn decode_is_copy() -> bool {
9655            true
9656        }
9657    }
9658
9659    unsafe impl<D: fidl::encoding::ResourceDialect>
9660        fidl::encoding::Encode<BaseSocketGetSendBufferResponse, D>
9661        for &BaseSocketGetSendBufferResponse
9662    {
9663        #[inline]
9664        unsafe fn encode(
9665            self,
9666            encoder: &mut fidl::encoding::Encoder<'_, D>,
9667            offset: usize,
9668            _depth: fidl::encoding::Depth,
9669        ) -> fidl::Result<()> {
9670            encoder.debug_check_bounds::<BaseSocketGetSendBufferResponse>(offset);
9671            unsafe {
9672                // Copy the object into the buffer.
9673                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9674                (buf_ptr as *mut BaseSocketGetSendBufferResponse)
9675                    .write_unaligned((self as *const BaseSocketGetSendBufferResponse).read());
9676                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9677                // done second because the memcpy will write garbage to these bytes.
9678            }
9679            Ok(())
9680        }
9681    }
9682    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9683        fidl::encoding::Encode<BaseSocketGetSendBufferResponse, D> for (T0,)
9684    {
9685        #[inline]
9686        unsafe fn encode(
9687            self,
9688            encoder: &mut fidl::encoding::Encoder<'_, D>,
9689            offset: usize,
9690            depth: fidl::encoding::Depth,
9691        ) -> fidl::Result<()> {
9692            encoder.debug_check_bounds::<BaseSocketGetSendBufferResponse>(offset);
9693            // Zero out padding regions. There's no need to apply masks
9694            // because the unmasked parts will be overwritten by fields.
9695            // Write the fields.
9696            self.0.encode(encoder, offset + 0, depth)?;
9697            Ok(())
9698        }
9699    }
9700
9701    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9702        for BaseSocketGetSendBufferResponse
9703    {
9704        #[inline(always)]
9705        fn new_empty() -> Self {
9706            Self { value_bytes: fidl::new_empty!(u64, D) }
9707        }
9708
9709        #[inline]
9710        unsafe fn decode(
9711            &mut self,
9712            decoder: &mut fidl::encoding::Decoder<'_, D>,
9713            offset: usize,
9714            _depth: fidl::encoding::Depth,
9715        ) -> fidl::Result<()> {
9716            decoder.debug_check_bounds::<Self>(offset);
9717            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9718            // Verify that padding bytes are zero.
9719            // Copy from the buffer into the object.
9720            unsafe {
9721                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9722            }
9723            Ok(())
9724        }
9725    }
9726
9727    impl fidl::encoding::ValueTypeMarker for BaseSocketGetTimestampResponse {
9728        type Borrowed<'a> = &'a Self;
9729        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9730            value
9731        }
9732    }
9733
9734    unsafe impl fidl::encoding::TypeMarker for BaseSocketGetTimestampResponse {
9735        type Owned = Self;
9736
9737        #[inline(always)]
9738        fn inline_align(_context: fidl::encoding::Context) -> usize {
9739            4
9740        }
9741
9742        #[inline(always)]
9743        fn inline_size(_context: fidl::encoding::Context) -> usize {
9744            4
9745        }
9746    }
9747
9748    unsafe impl<D: fidl::encoding::ResourceDialect>
9749        fidl::encoding::Encode<BaseSocketGetTimestampResponse, D>
9750        for &BaseSocketGetTimestampResponse
9751    {
9752        #[inline]
9753        unsafe fn encode(
9754            self,
9755            encoder: &mut fidl::encoding::Encoder<'_, D>,
9756            offset: usize,
9757            _depth: fidl::encoding::Depth,
9758        ) -> fidl::Result<()> {
9759            encoder.debug_check_bounds::<BaseSocketGetTimestampResponse>(offset);
9760            // Delegate to tuple encoding.
9761            fidl::encoding::Encode::<BaseSocketGetTimestampResponse, D>::encode(
9762                (<TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
9763                encoder,
9764                offset,
9765                _depth,
9766            )
9767        }
9768    }
9769    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TimestampOption, D>>
9770        fidl::encoding::Encode<BaseSocketGetTimestampResponse, D> for (T0,)
9771    {
9772        #[inline]
9773        unsafe fn encode(
9774            self,
9775            encoder: &mut fidl::encoding::Encoder<'_, D>,
9776            offset: usize,
9777            depth: fidl::encoding::Depth,
9778        ) -> fidl::Result<()> {
9779            encoder.debug_check_bounds::<BaseSocketGetTimestampResponse>(offset);
9780            // Zero out padding regions. There's no need to apply masks
9781            // because the unmasked parts will be overwritten by fields.
9782            // Write the fields.
9783            self.0.encode(encoder, offset + 0, depth)?;
9784            Ok(())
9785        }
9786    }
9787
9788    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9789        for BaseSocketGetTimestampResponse
9790    {
9791        #[inline(always)]
9792        fn new_empty() -> Self {
9793            Self { value: fidl::new_empty!(TimestampOption, D) }
9794        }
9795
9796        #[inline]
9797        unsafe fn decode(
9798            &mut self,
9799            decoder: &mut fidl::encoding::Decoder<'_, D>,
9800            offset: usize,
9801            _depth: fidl::encoding::Depth,
9802        ) -> fidl::Result<()> {
9803            decoder.debug_check_bounds::<Self>(offset);
9804            // Verify that padding bytes are zero.
9805            fidl::decode!(TimestampOption, D, &mut self.value, decoder, offset + 0, _depth)?;
9806            Ok(())
9807        }
9808    }
9809
9810    impl fidl::encoding::ValueTypeMarker for Empty {
9811        type Borrowed<'a> = &'a Self;
9812        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9813            value
9814        }
9815    }
9816
9817    unsafe impl fidl::encoding::TypeMarker for Empty {
9818        type Owned = Self;
9819
9820        #[inline(always)]
9821        fn inline_align(_context: fidl::encoding::Context) -> usize {
9822            1
9823        }
9824
9825        #[inline(always)]
9826        fn inline_size(_context: fidl::encoding::Context) -> usize {
9827            1
9828        }
9829    }
9830
9831    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
9832        #[inline]
9833        unsafe fn encode(
9834            self,
9835            encoder: &mut fidl::encoding::Encoder<'_, D>,
9836            offset: usize,
9837            _depth: fidl::encoding::Depth,
9838        ) -> fidl::Result<()> {
9839            encoder.debug_check_bounds::<Empty>(offset);
9840            encoder.write_num(0u8, offset);
9841            Ok(())
9842        }
9843    }
9844
9845    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
9846        #[inline(always)]
9847        fn new_empty() -> Self {
9848            Self
9849        }
9850
9851        #[inline]
9852        unsafe fn decode(
9853            &mut self,
9854            decoder: &mut fidl::encoding::Decoder<'_, D>,
9855            offset: usize,
9856            _depth: fidl::encoding::Depth,
9857        ) -> fidl::Result<()> {
9858            decoder.debug_check_bounds::<Self>(offset);
9859            match decoder.read_num::<u8>(offset) {
9860                0 => Ok(()),
9861                _ => Err(fidl::Error::Invalid),
9862            }
9863        }
9864    }
9865
9866    impl fidl::encoding::ValueTypeMarker for IpMulticastMembership {
9867        type Borrowed<'a> = &'a Self;
9868        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9869            value
9870        }
9871    }
9872
9873    unsafe impl fidl::encoding::TypeMarker for IpMulticastMembership {
9874        type Owned = Self;
9875
9876        #[inline(always)]
9877        fn inline_align(_context: fidl::encoding::Context) -> usize {
9878            8
9879        }
9880
9881        #[inline(always)]
9882        fn inline_size(_context: fidl::encoding::Context) -> usize {
9883            16
9884        }
9885    }
9886
9887    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpMulticastMembership, D>
9888        for &IpMulticastMembership
9889    {
9890        #[inline]
9891        unsafe fn encode(
9892            self,
9893            encoder: &mut fidl::encoding::Encoder<'_, D>,
9894            offset: usize,
9895            _depth: fidl::encoding::Depth,
9896        ) -> fidl::Result<()> {
9897            encoder.debug_check_bounds::<IpMulticastMembership>(offset);
9898            // Delegate to tuple encoding.
9899            fidl::encoding::Encode::<IpMulticastMembership, D>::encode(
9900                (
9901                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
9902                    <fidl_fuchsia_net_common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.local_addr),
9903                    <fidl_fuchsia_net_common::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(&self.mcast_addr),
9904                ),
9905                encoder, offset, _depth
9906            )
9907        }
9908    }
9909    unsafe impl<
9910        D: fidl::encoding::ResourceDialect,
9911        T0: fidl::encoding::Encode<u64, D>,
9912        T1: fidl::encoding::Encode<fidl_fuchsia_net_common::Ipv4Address, D>,
9913        T2: fidl::encoding::Encode<fidl_fuchsia_net_common::Ipv4Address, D>,
9914    > fidl::encoding::Encode<IpMulticastMembership, D> for (T0, T1, T2)
9915    {
9916        #[inline]
9917        unsafe fn encode(
9918            self,
9919            encoder: &mut fidl::encoding::Encoder<'_, D>,
9920            offset: usize,
9921            depth: fidl::encoding::Depth,
9922        ) -> fidl::Result<()> {
9923            encoder.debug_check_bounds::<IpMulticastMembership>(offset);
9924            // Zero out padding regions. There's no need to apply masks
9925            // because the unmasked parts will be overwritten by fields.
9926            // Write the fields.
9927            self.0.encode(encoder, offset + 0, depth)?;
9928            self.1.encode(encoder, offset + 8, depth)?;
9929            self.2.encode(encoder, offset + 12, depth)?;
9930            Ok(())
9931        }
9932    }
9933
9934    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpMulticastMembership {
9935        #[inline(always)]
9936        fn new_empty() -> Self {
9937            Self {
9938                iface: fidl::new_empty!(u64, D),
9939                local_addr: fidl::new_empty!(fidl_fuchsia_net_common::Ipv4Address, D),
9940                mcast_addr: fidl::new_empty!(fidl_fuchsia_net_common::Ipv4Address, D),
9941            }
9942        }
9943
9944        #[inline]
9945        unsafe fn decode(
9946            &mut self,
9947            decoder: &mut fidl::encoding::Decoder<'_, D>,
9948            offset: usize,
9949            _depth: fidl::encoding::Depth,
9950        ) -> fidl::Result<()> {
9951            decoder.debug_check_bounds::<Self>(offset);
9952            // Verify that padding bytes are zero.
9953            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
9954            fidl::decode!(
9955                fidl_fuchsia_net_common::Ipv4Address,
9956                D,
9957                &mut self.local_addr,
9958                decoder,
9959                offset + 8,
9960                _depth
9961            )?;
9962            fidl::decode!(
9963                fidl_fuchsia_net_common::Ipv4Address,
9964                D,
9965                &mut self.mcast_addr,
9966                decoder,
9967                offset + 12,
9968                _depth
9969            )?;
9970            Ok(())
9971        }
9972    }
9973
9974    impl fidl::encoding::ValueTypeMarker for Ipv6MulticastMembership {
9975        type Borrowed<'a> = &'a Self;
9976        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9977            value
9978        }
9979    }
9980
9981    unsafe impl fidl::encoding::TypeMarker for Ipv6MulticastMembership {
9982        type Owned = Self;
9983
9984        #[inline(always)]
9985        fn inline_align(_context: fidl::encoding::Context) -> usize {
9986            8
9987        }
9988
9989        #[inline(always)]
9990        fn inline_size(_context: fidl::encoding::Context) -> usize {
9991            24
9992        }
9993    }
9994
9995    unsafe impl<D: fidl::encoding::ResourceDialect>
9996        fidl::encoding::Encode<Ipv6MulticastMembership, D> for &Ipv6MulticastMembership
9997    {
9998        #[inline]
9999        unsafe fn encode(
10000            self,
10001            encoder: &mut fidl::encoding::Encoder<'_, D>,
10002            offset: usize,
10003            _depth: fidl::encoding::Depth,
10004        ) -> fidl::Result<()> {
10005            encoder.debug_check_bounds::<Ipv6MulticastMembership>(offset);
10006            // Delegate to tuple encoding.
10007            fidl::encoding::Encode::<Ipv6MulticastMembership, D>::encode(
10008                (
10009                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10010                    <fidl_fuchsia_net_common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.mcast_addr),
10011                ),
10012                encoder, offset, _depth
10013            )
10014        }
10015    }
10016    unsafe impl<
10017        D: fidl::encoding::ResourceDialect,
10018        T0: fidl::encoding::Encode<u64, D>,
10019        T1: fidl::encoding::Encode<fidl_fuchsia_net_common::Ipv6Address, D>,
10020    > fidl::encoding::Encode<Ipv6MulticastMembership, D> for (T0, T1)
10021    {
10022        #[inline]
10023        unsafe fn encode(
10024            self,
10025            encoder: &mut fidl::encoding::Encoder<'_, D>,
10026            offset: usize,
10027            depth: fidl::encoding::Depth,
10028        ) -> fidl::Result<()> {
10029            encoder.debug_check_bounds::<Ipv6MulticastMembership>(offset);
10030            // Zero out padding regions. There's no need to apply masks
10031            // because the unmasked parts will be overwritten by fields.
10032            // Write the fields.
10033            self.0.encode(encoder, offset + 0, depth)?;
10034            self.1.encode(encoder, offset + 8, depth)?;
10035            Ok(())
10036        }
10037    }
10038
10039    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10040        for Ipv6MulticastMembership
10041    {
10042        #[inline(always)]
10043        fn new_empty() -> Self {
10044            Self {
10045                iface: fidl::new_empty!(u64, D),
10046                mcast_addr: fidl::new_empty!(fidl_fuchsia_net_common::Ipv6Address, D),
10047            }
10048        }
10049
10050        #[inline]
10051        unsafe fn decode(
10052            &mut self,
10053            decoder: &mut fidl::encoding::Decoder<'_, D>,
10054            offset: usize,
10055            _depth: fidl::encoding::Depth,
10056        ) -> fidl::Result<()> {
10057            decoder.debug_check_bounds::<Self>(offset);
10058            // Verify that padding bytes are zero.
10059            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10060            fidl::decode!(
10061                fidl_fuchsia_net_common::Ipv6Address,
10062                D,
10063                &mut self.mcast_addr,
10064                decoder,
10065                offset + 8,
10066                _depth
10067            )?;
10068            Ok(())
10069        }
10070    }
10071
10072    impl fidl::encoding::ValueTypeMarker for Ipv6PktInfoRecvControlData {
10073        type Borrowed<'a> = &'a Self;
10074        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10075            value
10076        }
10077    }
10078
10079    unsafe impl fidl::encoding::TypeMarker for Ipv6PktInfoRecvControlData {
10080        type Owned = Self;
10081
10082        #[inline(always)]
10083        fn inline_align(_context: fidl::encoding::Context) -> usize {
10084            8
10085        }
10086
10087        #[inline(always)]
10088        fn inline_size(_context: fidl::encoding::Context) -> usize {
10089            24
10090        }
10091    }
10092
10093    unsafe impl<D: fidl::encoding::ResourceDialect>
10094        fidl::encoding::Encode<Ipv6PktInfoRecvControlData, D> for &Ipv6PktInfoRecvControlData
10095    {
10096        #[inline]
10097        unsafe fn encode(
10098            self,
10099            encoder: &mut fidl::encoding::Encoder<'_, D>,
10100            offset: usize,
10101            _depth: fidl::encoding::Depth,
10102        ) -> fidl::Result<()> {
10103            encoder.debug_check_bounds::<Ipv6PktInfoRecvControlData>(offset);
10104            // Delegate to tuple encoding.
10105            fidl::encoding::Encode::<Ipv6PktInfoRecvControlData, D>::encode(
10106                (
10107                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10108                    <fidl_fuchsia_net_common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.header_destination_addr),
10109                ),
10110                encoder, offset, _depth
10111            )
10112        }
10113    }
10114    unsafe impl<
10115        D: fidl::encoding::ResourceDialect,
10116        T0: fidl::encoding::Encode<u64, D>,
10117        T1: fidl::encoding::Encode<fidl_fuchsia_net_common::Ipv6Address, D>,
10118    > fidl::encoding::Encode<Ipv6PktInfoRecvControlData, D> for (T0, T1)
10119    {
10120        #[inline]
10121        unsafe fn encode(
10122            self,
10123            encoder: &mut fidl::encoding::Encoder<'_, D>,
10124            offset: usize,
10125            depth: fidl::encoding::Depth,
10126        ) -> fidl::Result<()> {
10127            encoder.debug_check_bounds::<Ipv6PktInfoRecvControlData>(offset);
10128            // Zero out padding regions. There's no need to apply masks
10129            // because the unmasked parts will be overwritten by fields.
10130            // Write the fields.
10131            self.0.encode(encoder, offset + 0, depth)?;
10132            self.1.encode(encoder, offset + 8, depth)?;
10133            Ok(())
10134        }
10135    }
10136
10137    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10138        for Ipv6PktInfoRecvControlData
10139    {
10140        #[inline(always)]
10141        fn new_empty() -> Self {
10142            Self {
10143                iface: fidl::new_empty!(u64, D),
10144                header_destination_addr: fidl::new_empty!(fidl_fuchsia_net_common::Ipv6Address, D),
10145            }
10146        }
10147
10148        #[inline]
10149        unsafe fn decode(
10150            &mut self,
10151            decoder: &mut fidl::encoding::Decoder<'_, D>,
10152            offset: usize,
10153            _depth: fidl::encoding::Depth,
10154        ) -> fidl::Result<()> {
10155            decoder.debug_check_bounds::<Self>(offset);
10156            // Verify that padding bytes are zero.
10157            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10158            fidl::decode!(
10159                fidl_fuchsia_net_common::Ipv6Address,
10160                D,
10161                &mut self.header_destination_addr,
10162                decoder,
10163                offset + 8,
10164                _depth
10165            )?;
10166            Ok(())
10167        }
10168    }
10169
10170    impl fidl::encoding::ValueTypeMarker for Ipv6PktInfoSendControlData {
10171        type Borrowed<'a> = &'a Self;
10172        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10173            value
10174        }
10175    }
10176
10177    unsafe impl fidl::encoding::TypeMarker for Ipv6PktInfoSendControlData {
10178        type Owned = Self;
10179
10180        #[inline(always)]
10181        fn inline_align(_context: fidl::encoding::Context) -> usize {
10182            8
10183        }
10184
10185        #[inline(always)]
10186        fn inline_size(_context: fidl::encoding::Context) -> usize {
10187            24
10188        }
10189    }
10190
10191    unsafe impl<D: fidl::encoding::ResourceDialect>
10192        fidl::encoding::Encode<Ipv6PktInfoSendControlData, D> for &Ipv6PktInfoSendControlData
10193    {
10194        #[inline]
10195        unsafe fn encode(
10196            self,
10197            encoder: &mut fidl::encoding::Encoder<'_, D>,
10198            offset: usize,
10199            _depth: fidl::encoding::Depth,
10200        ) -> fidl::Result<()> {
10201            encoder.debug_check_bounds::<Ipv6PktInfoSendControlData>(offset);
10202            // Delegate to tuple encoding.
10203            fidl::encoding::Encode::<Ipv6PktInfoSendControlData, D>::encode(
10204                (
10205                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface),
10206                    <fidl_fuchsia_net_common::Ipv6Address as fidl::encoding::ValueTypeMarker>::borrow(&self.local_addr),
10207                ),
10208                encoder, offset, _depth
10209            )
10210        }
10211    }
10212    unsafe impl<
10213        D: fidl::encoding::ResourceDialect,
10214        T0: fidl::encoding::Encode<u64, D>,
10215        T1: fidl::encoding::Encode<fidl_fuchsia_net_common::Ipv6Address, D>,
10216    > fidl::encoding::Encode<Ipv6PktInfoSendControlData, D> for (T0, T1)
10217    {
10218        #[inline]
10219        unsafe fn encode(
10220            self,
10221            encoder: &mut fidl::encoding::Encoder<'_, D>,
10222            offset: usize,
10223            depth: fidl::encoding::Depth,
10224        ) -> fidl::Result<()> {
10225            encoder.debug_check_bounds::<Ipv6PktInfoSendControlData>(offset);
10226            // Zero out padding regions. There's no need to apply masks
10227            // because the unmasked parts will be overwritten by fields.
10228            // Write the fields.
10229            self.0.encode(encoder, offset + 0, depth)?;
10230            self.1.encode(encoder, offset + 8, depth)?;
10231            Ok(())
10232        }
10233    }
10234
10235    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10236        for Ipv6PktInfoSendControlData
10237    {
10238        #[inline(always)]
10239        fn new_empty() -> Self {
10240            Self {
10241                iface: fidl::new_empty!(u64, D),
10242                local_addr: fidl::new_empty!(fidl_fuchsia_net_common::Ipv6Address, D),
10243            }
10244        }
10245
10246        #[inline]
10247        unsafe fn decode(
10248            &mut self,
10249            decoder: &mut fidl::encoding::Decoder<'_, D>,
10250            offset: usize,
10251            _depth: fidl::encoding::Depth,
10252        ) -> fidl::Result<()> {
10253            decoder.debug_check_bounds::<Self>(offset);
10254            // Verify that padding bytes are zero.
10255            fidl::decode!(u64, D, &mut self.iface, decoder, offset + 0, _depth)?;
10256            fidl::decode!(
10257                fidl_fuchsia_net_common::Ipv6Address,
10258                D,
10259                &mut self.local_addr,
10260                decoder,
10261                offset + 8,
10262                _depth
10263            )?;
10264            Ok(())
10265        }
10266    }
10267
10268    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketDeprecatedRequest {
10269        type Borrowed<'a> = &'a Self;
10270        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10271            value
10272        }
10273    }
10274
10275    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketDeprecatedRequest {
10276        type Owned = Self;
10277
10278        #[inline(always)]
10279        fn inline_align(_context: fidl::encoding::Context) -> usize {
10280            4
10281        }
10282
10283        #[inline(always)]
10284        fn inline_size(_context: fidl::encoding::Context) -> usize {
10285            8
10286        }
10287    }
10288
10289    unsafe impl<D: fidl::encoding::ResourceDialect>
10290        fidl::encoding::Encode<ProviderDatagramSocketDeprecatedRequest, D>
10291        for &ProviderDatagramSocketDeprecatedRequest
10292    {
10293        #[inline]
10294        unsafe fn encode(
10295            self,
10296            encoder: &mut fidl::encoding::Encoder<'_, D>,
10297            offset: usize,
10298            _depth: fidl::encoding::Depth,
10299        ) -> fidl::Result<()> {
10300            encoder.debug_check_bounds::<ProviderDatagramSocketDeprecatedRequest>(offset);
10301            // Delegate to tuple encoding.
10302            fidl::encoding::Encode::<ProviderDatagramSocketDeprecatedRequest, D>::encode(
10303                (
10304                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10305                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10306                        &self.proto,
10307                    ),
10308                ),
10309                encoder,
10310                offset,
10311                _depth,
10312            )
10313        }
10314    }
10315    unsafe impl<
10316        D: fidl::encoding::ResourceDialect,
10317        T0: fidl::encoding::Encode<Domain, D>,
10318        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10319    > fidl::encoding::Encode<ProviderDatagramSocketDeprecatedRequest, D> for (T0, T1)
10320    {
10321        #[inline]
10322        unsafe fn encode(
10323            self,
10324            encoder: &mut fidl::encoding::Encoder<'_, D>,
10325            offset: usize,
10326            depth: fidl::encoding::Depth,
10327        ) -> fidl::Result<()> {
10328            encoder.debug_check_bounds::<ProviderDatagramSocketDeprecatedRequest>(offset);
10329            // Zero out padding regions. There's no need to apply masks
10330            // because the unmasked parts will be overwritten by fields.
10331            unsafe {
10332                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10333                (ptr as *mut u32).write_unaligned(0);
10334            }
10335            // Write the fields.
10336            self.0.encode(encoder, offset + 0, depth)?;
10337            self.1.encode(encoder, offset + 4, depth)?;
10338            Ok(())
10339        }
10340    }
10341
10342    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10343        for ProviderDatagramSocketDeprecatedRequest
10344    {
10345        #[inline(always)]
10346        fn new_empty() -> Self {
10347            Self {
10348                domain: fidl::new_empty!(Domain, D),
10349                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10350            }
10351        }
10352
10353        #[inline]
10354        unsafe fn decode(
10355            &mut self,
10356            decoder: &mut fidl::encoding::Decoder<'_, D>,
10357            offset: usize,
10358            _depth: fidl::encoding::Depth,
10359        ) -> fidl::Result<()> {
10360            decoder.debug_check_bounds::<Self>(offset);
10361            // Verify that padding bytes are zero.
10362            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10363            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10364            let mask = 0xffff0000u32;
10365            let maskedval = padval & mask;
10366            if maskedval != 0 {
10367                return Err(fidl::Error::NonZeroPadding {
10368                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10369                });
10370            }
10371            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10372            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10373            Ok(())
10374        }
10375    }
10376
10377    impl fidl::encoding::ValueTypeMarker for ProviderDatagramSocketRequest {
10378        type Borrowed<'a> = &'a Self;
10379        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10380            value
10381        }
10382    }
10383
10384    unsafe impl fidl::encoding::TypeMarker for ProviderDatagramSocketRequest {
10385        type Owned = Self;
10386
10387        #[inline(always)]
10388        fn inline_align(_context: fidl::encoding::Context) -> usize {
10389            4
10390        }
10391
10392        #[inline(always)]
10393        fn inline_size(_context: fidl::encoding::Context) -> usize {
10394            8
10395        }
10396    }
10397
10398    unsafe impl<D: fidl::encoding::ResourceDialect>
10399        fidl::encoding::Encode<ProviderDatagramSocketRequest, D>
10400        for &ProviderDatagramSocketRequest
10401    {
10402        #[inline]
10403        unsafe fn encode(
10404            self,
10405            encoder: &mut fidl::encoding::Encoder<'_, D>,
10406            offset: usize,
10407            _depth: fidl::encoding::Depth,
10408        ) -> fidl::Result<()> {
10409            encoder.debug_check_bounds::<ProviderDatagramSocketRequest>(offset);
10410            // Delegate to tuple encoding.
10411            fidl::encoding::Encode::<ProviderDatagramSocketRequest, D>::encode(
10412                (
10413                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10414                    <DatagramSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(
10415                        &self.proto,
10416                    ),
10417                ),
10418                encoder,
10419                offset,
10420                _depth,
10421            )
10422        }
10423    }
10424    unsafe impl<
10425        D: fidl::encoding::ResourceDialect,
10426        T0: fidl::encoding::Encode<Domain, D>,
10427        T1: fidl::encoding::Encode<DatagramSocketProtocol, D>,
10428    > fidl::encoding::Encode<ProviderDatagramSocketRequest, D> for (T0, T1)
10429    {
10430        #[inline]
10431        unsafe fn encode(
10432            self,
10433            encoder: &mut fidl::encoding::Encoder<'_, D>,
10434            offset: usize,
10435            depth: fidl::encoding::Depth,
10436        ) -> fidl::Result<()> {
10437            encoder.debug_check_bounds::<ProviderDatagramSocketRequest>(offset);
10438            // Zero out padding regions. There's no need to apply masks
10439            // because the unmasked parts will be overwritten by fields.
10440            unsafe {
10441                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10442                (ptr as *mut u32).write_unaligned(0);
10443            }
10444            // Write the fields.
10445            self.0.encode(encoder, offset + 0, depth)?;
10446            self.1.encode(encoder, offset + 4, depth)?;
10447            Ok(())
10448        }
10449    }
10450
10451    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10452        for ProviderDatagramSocketRequest
10453    {
10454        #[inline(always)]
10455        fn new_empty() -> Self {
10456            Self {
10457                domain: fidl::new_empty!(Domain, D),
10458                proto: fidl::new_empty!(DatagramSocketProtocol, D),
10459            }
10460        }
10461
10462        #[inline]
10463        unsafe fn decode(
10464            &mut self,
10465            decoder: &mut fidl::encoding::Decoder<'_, D>,
10466            offset: usize,
10467            _depth: fidl::encoding::Depth,
10468        ) -> fidl::Result<()> {
10469            decoder.debug_check_bounds::<Self>(offset);
10470            // Verify that padding bytes are zero.
10471            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10472            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10473            let mask = 0xffff0000u32;
10474            let maskedval = padval & mask;
10475            if maskedval != 0 {
10476                return Err(fidl::Error::NonZeroPadding {
10477                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10478                });
10479            }
10480            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10481            fidl::decode!(DatagramSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10482            Ok(())
10483        }
10484    }
10485
10486    impl fidl::encoding::ValueTypeMarker for ProviderGetInterfaceAddressesResponse {
10487        type Borrowed<'a> = &'a Self;
10488        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10489            value
10490        }
10491    }
10492
10493    unsafe impl fidl::encoding::TypeMarker for ProviderGetInterfaceAddressesResponse {
10494        type Owned = Self;
10495
10496        #[inline(always)]
10497        fn inline_align(_context: fidl::encoding::Context) -> usize {
10498            8
10499        }
10500
10501        #[inline(always)]
10502        fn inline_size(_context: fidl::encoding::Context) -> usize {
10503            16
10504        }
10505    }
10506
10507    unsafe impl<D: fidl::encoding::ResourceDialect>
10508        fidl::encoding::Encode<ProviderGetInterfaceAddressesResponse, D>
10509        for &ProviderGetInterfaceAddressesResponse
10510    {
10511        #[inline]
10512        unsafe fn encode(
10513            self,
10514            encoder: &mut fidl::encoding::Encoder<'_, D>,
10515            offset: usize,
10516            _depth: fidl::encoding::Depth,
10517        ) -> fidl::Result<()> {
10518            encoder.debug_check_bounds::<ProviderGetInterfaceAddressesResponse>(offset);
10519            // Delegate to tuple encoding.
10520            fidl::encoding::Encode::<ProviderGetInterfaceAddressesResponse, D>::encode(
10521                (
10522                    <fidl::encoding::UnboundedVector<InterfaceAddresses> as fidl::encoding::ValueTypeMarker>::borrow(&self.interfaces),
10523                ),
10524                encoder, offset, _depth
10525            )
10526        }
10527    }
10528    unsafe impl<
10529        D: fidl::encoding::ResourceDialect,
10530        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<InterfaceAddresses>, D>,
10531    > fidl::encoding::Encode<ProviderGetInterfaceAddressesResponse, D> for (T0,)
10532    {
10533        #[inline]
10534        unsafe fn encode(
10535            self,
10536            encoder: &mut fidl::encoding::Encoder<'_, D>,
10537            offset: usize,
10538            depth: fidl::encoding::Depth,
10539        ) -> fidl::Result<()> {
10540            encoder.debug_check_bounds::<ProviderGetInterfaceAddressesResponse>(offset);
10541            // Zero out padding regions. There's no need to apply masks
10542            // because the unmasked parts will be overwritten by fields.
10543            // Write the fields.
10544            self.0.encode(encoder, offset + 0, depth)?;
10545            Ok(())
10546        }
10547    }
10548
10549    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10550        for ProviderGetInterfaceAddressesResponse
10551    {
10552        #[inline(always)]
10553        fn new_empty() -> Self {
10554            Self {
10555                interfaces: fidl::new_empty!(
10556                    fidl::encoding::UnboundedVector<InterfaceAddresses>,
10557                    D
10558                ),
10559            }
10560        }
10561
10562        #[inline]
10563        unsafe fn decode(
10564            &mut self,
10565            decoder: &mut fidl::encoding::Decoder<'_, D>,
10566            offset: usize,
10567            _depth: fidl::encoding::Depth,
10568        ) -> fidl::Result<()> {
10569            decoder.debug_check_bounds::<Self>(offset);
10570            // Verify that padding bytes are zero.
10571            fidl::decode!(
10572                fidl::encoding::UnboundedVector<InterfaceAddresses>,
10573                D,
10574                &mut self.interfaces,
10575                decoder,
10576                offset + 0,
10577                _depth
10578            )?;
10579            Ok(())
10580        }
10581    }
10582
10583    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceIndexToNameRequest {
10584        type Borrowed<'a> = &'a Self;
10585        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10586            value
10587        }
10588    }
10589
10590    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceIndexToNameRequest {
10591        type Owned = Self;
10592
10593        #[inline(always)]
10594        fn inline_align(_context: fidl::encoding::Context) -> usize {
10595            8
10596        }
10597
10598        #[inline(always)]
10599        fn inline_size(_context: fidl::encoding::Context) -> usize {
10600            8
10601        }
10602        #[inline(always)]
10603        fn encode_is_copy() -> bool {
10604            true
10605        }
10606
10607        #[inline(always)]
10608        fn decode_is_copy() -> bool {
10609            true
10610        }
10611    }
10612
10613    unsafe impl<D: fidl::encoding::ResourceDialect>
10614        fidl::encoding::Encode<ProviderInterfaceIndexToNameRequest, D>
10615        for &ProviderInterfaceIndexToNameRequest
10616    {
10617        #[inline]
10618        unsafe fn encode(
10619            self,
10620            encoder: &mut fidl::encoding::Encoder<'_, D>,
10621            offset: usize,
10622            _depth: fidl::encoding::Depth,
10623        ) -> fidl::Result<()> {
10624            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameRequest>(offset);
10625            unsafe {
10626                // Copy the object into the buffer.
10627                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10628                (buf_ptr as *mut ProviderInterfaceIndexToNameRequest)
10629                    .write_unaligned((self as *const ProviderInterfaceIndexToNameRequest).read());
10630                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10631                // done second because the memcpy will write garbage to these bytes.
10632            }
10633            Ok(())
10634        }
10635    }
10636    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
10637        fidl::encoding::Encode<ProviderInterfaceIndexToNameRequest, D> for (T0,)
10638    {
10639        #[inline]
10640        unsafe fn encode(
10641            self,
10642            encoder: &mut fidl::encoding::Encoder<'_, D>,
10643            offset: usize,
10644            depth: fidl::encoding::Depth,
10645        ) -> fidl::Result<()> {
10646            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameRequest>(offset);
10647            // Zero out padding regions. There's no need to apply masks
10648            // because the unmasked parts will be overwritten by fields.
10649            // Write the fields.
10650            self.0.encode(encoder, offset + 0, depth)?;
10651            Ok(())
10652        }
10653    }
10654
10655    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10656        for ProviderInterfaceIndexToNameRequest
10657    {
10658        #[inline(always)]
10659        fn new_empty() -> Self {
10660            Self { index: fidl::new_empty!(u64, D) }
10661        }
10662
10663        #[inline]
10664        unsafe fn decode(
10665            &mut self,
10666            decoder: &mut fidl::encoding::Decoder<'_, D>,
10667            offset: usize,
10668            _depth: fidl::encoding::Depth,
10669        ) -> fidl::Result<()> {
10670            decoder.debug_check_bounds::<Self>(offset);
10671            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10672            // Verify that padding bytes are zero.
10673            // Copy from the buffer into the object.
10674            unsafe {
10675                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
10676            }
10677            Ok(())
10678        }
10679    }
10680
10681    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToFlagsRequest {
10682        type Borrowed<'a> = &'a Self;
10683        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10684            value
10685        }
10686    }
10687
10688    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToFlagsRequest {
10689        type Owned = Self;
10690
10691        #[inline(always)]
10692        fn inline_align(_context: fidl::encoding::Context) -> usize {
10693            8
10694        }
10695
10696        #[inline(always)]
10697        fn inline_size(_context: fidl::encoding::Context) -> usize {
10698            16
10699        }
10700    }
10701
10702    unsafe impl<D: fidl::encoding::ResourceDialect>
10703        fidl::encoding::Encode<ProviderInterfaceNameToFlagsRequest, D>
10704        for &ProviderInterfaceNameToFlagsRequest
10705    {
10706        #[inline]
10707        unsafe fn encode(
10708            self,
10709            encoder: &mut fidl::encoding::Encoder<'_, D>,
10710            offset: usize,
10711            _depth: fidl::encoding::Depth,
10712        ) -> fidl::Result<()> {
10713            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsRequest>(offset);
10714            // Delegate to tuple encoding.
10715            fidl::encoding::Encode::<ProviderInterfaceNameToFlagsRequest, D>::encode(
10716                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
10717                    &self.name,
10718                ),),
10719                encoder,
10720                offset,
10721                _depth,
10722            )
10723        }
10724    }
10725    unsafe impl<
10726        D: fidl::encoding::ResourceDialect,
10727        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
10728    > fidl::encoding::Encode<ProviderInterfaceNameToFlagsRequest, D> for (T0,)
10729    {
10730        #[inline]
10731        unsafe fn encode(
10732            self,
10733            encoder: &mut fidl::encoding::Encoder<'_, D>,
10734            offset: usize,
10735            depth: fidl::encoding::Depth,
10736        ) -> fidl::Result<()> {
10737            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsRequest>(offset);
10738            // Zero out padding regions. There's no need to apply masks
10739            // because the unmasked parts will be overwritten by fields.
10740            // Write the fields.
10741            self.0.encode(encoder, offset + 0, depth)?;
10742            Ok(())
10743        }
10744    }
10745
10746    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10747        for ProviderInterfaceNameToFlagsRequest
10748    {
10749        #[inline(always)]
10750        fn new_empty() -> Self {
10751            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
10752        }
10753
10754        #[inline]
10755        unsafe fn decode(
10756            &mut self,
10757            decoder: &mut fidl::encoding::Decoder<'_, D>,
10758            offset: usize,
10759            _depth: fidl::encoding::Depth,
10760        ) -> fidl::Result<()> {
10761            decoder.debug_check_bounds::<Self>(offset);
10762            // Verify that padding bytes are zero.
10763            fidl::decode!(
10764                fidl::encoding::BoundedString<15>,
10765                D,
10766                &mut self.name,
10767                decoder,
10768                offset + 0,
10769                _depth
10770            )?;
10771            Ok(())
10772        }
10773    }
10774
10775    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToIndexRequest {
10776        type Borrowed<'a> = &'a Self;
10777        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10778            value
10779        }
10780    }
10781
10782    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToIndexRequest {
10783        type Owned = Self;
10784
10785        #[inline(always)]
10786        fn inline_align(_context: fidl::encoding::Context) -> usize {
10787            8
10788        }
10789
10790        #[inline(always)]
10791        fn inline_size(_context: fidl::encoding::Context) -> usize {
10792            16
10793        }
10794    }
10795
10796    unsafe impl<D: fidl::encoding::ResourceDialect>
10797        fidl::encoding::Encode<ProviderInterfaceNameToIndexRequest, D>
10798        for &ProviderInterfaceNameToIndexRequest
10799    {
10800        #[inline]
10801        unsafe fn encode(
10802            self,
10803            encoder: &mut fidl::encoding::Encoder<'_, D>,
10804            offset: usize,
10805            _depth: fidl::encoding::Depth,
10806        ) -> fidl::Result<()> {
10807            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexRequest>(offset);
10808            // Delegate to tuple encoding.
10809            fidl::encoding::Encode::<ProviderInterfaceNameToIndexRequest, D>::encode(
10810                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
10811                    &self.name,
10812                ),),
10813                encoder,
10814                offset,
10815                _depth,
10816            )
10817        }
10818    }
10819    unsafe impl<
10820        D: fidl::encoding::ResourceDialect,
10821        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
10822    > fidl::encoding::Encode<ProviderInterfaceNameToIndexRequest, D> for (T0,)
10823    {
10824        #[inline]
10825        unsafe fn encode(
10826            self,
10827            encoder: &mut fidl::encoding::Encoder<'_, D>,
10828            offset: usize,
10829            depth: fidl::encoding::Depth,
10830        ) -> fidl::Result<()> {
10831            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexRequest>(offset);
10832            // Zero out padding regions. There's no need to apply masks
10833            // because the unmasked parts will be overwritten by fields.
10834            // Write the fields.
10835            self.0.encode(encoder, offset + 0, depth)?;
10836            Ok(())
10837        }
10838    }
10839
10840    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10841        for ProviderInterfaceNameToIndexRequest
10842    {
10843        #[inline(always)]
10844        fn new_empty() -> Self {
10845            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
10846        }
10847
10848        #[inline]
10849        unsafe fn decode(
10850            &mut self,
10851            decoder: &mut fidl::encoding::Decoder<'_, D>,
10852            offset: usize,
10853            _depth: fidl::encoding::Depth,
10854        ) -> fidl::Result<()> {
10855            decoder.debug_check_bounds::<Self>(offset);
10856            // Verify that padding bytes are zero.
10857            fidl::decode!(
10858                fidl::encoding::BoundedString<15>,
10859                D,
10860                &mut self.name,
10861                decoder,
10862                offset + 0,
10863                _depth
10864            )?;
10865            Ok(())
10866        }
10867    }
10868
10869    impl fidl::encoding::ValueTypeMarker for ProviderStreamSocketRequest {
10870        type Borrowed<'a> = &'a Self;
10871        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10872            value
10873        }
10874    }
10875
10876    unsafe impl fidl::encoding::TypeMarker for ProviderStreamSocketRequest {
10877        type Owned = Self;
10878
10879        #[inline(always)]
10880        fn inline_align(_context: fidl::encoding::Context) -> usize {
10881            4
10882        }
10883
10884        #[inline(always)]
10885        fn inline_size(_context: fidl::encoding::Context) -> usize {
10886            8
10887        }
10888    }
10889
10890    unsafe impl<D: fidl::encoding::ResourceDialect>
10891        fidl::encoding::Encode<ProviderStreamSocketRequest, D> for &ProviderStreamSocketRequest
10892    {
10893        #[inline]
10894        unsafe fn encode(
10895            self,
10896            encoder: &mut fidl::encoding::Encoder<'_, D>,
10897            offset: usize,
10898            _depth: fidl::encoding::Depth,
10899        ) -> fidl::Result<()> {
10900            encoder.debug_check_bounds::<ProviderStreamSocketRequest>(offset);
10901            // Delegate to tuple encoding.
10902            fidl::encoding::Encode::<ProviderStreamSocketRequest, D>::encode(
10903                (
10904                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
10905                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
10906                ),
10907                encoder,
10908                offset,
10909                _depth,
10910            )
10911        }
10912    }
10913    unsafe impl<
10914        D: fidl::encoding::ResourceDialect,
10915        T0: fidl::encoding::Encode<Domain, D>,
10916        T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
10917    > fidl::encoding::Encode<ProviderStreamSocketRequest, D> for (T0, T1)
10918    {
10919        #[inline]
10920        unsafe fn encode(
10921            self,
10922            encoder: &mut fidl::encoding::Encoder<'_, D>,
10923            offset: usize,
10924            depth: fidl::encoding::Depth,
10925        ) -> fidl::Result<()> {
10926            encoder.debug_check_bounds::<ProviderStreamSocketRequest>(offset);
10927            // Zero out padding regions. There's no need to apply masks
10928            // because the unmasked parts will be overwritten by fields.
10929            unsafe {
10930                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10931                (ptr as *mut u32).write_unaligned(0);
10932            }
10933            // Write the fields.
10934            self.0.encode(encoder, offset + 0, depth)?;
10935            self.1.encode(encoder, offset + 4, depth)?;
10936            Ok(())
10937        }
10938    }
10939
10940    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10941        for ProviderStreamSocketRequest
10942    {
10943        #[inline(always)]
10944        fn new_empty() -> Self {
10945            Self {
10946                domain: fidl::new_empty!(Domain, D),
10947                proto: fidl::new_empty!(StreamSocketProtocol, D),
10948            }
10949        }
10950
10951        #[inline]
10952        unsafe fn decode(
10953            &mut self,
10954            decoder: &mut fidl::encoding::Decoder<'_, D>,
10955            offset: usize,
10956            _depth: fidl::encoding::Depth,
10957        ) -> fidl::Result<()> {
10958            decoder.debug_check_bounds::<Self>(offset);
10959            // Verify that padding bytes are zero.
10960            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10961            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10962            let mask = 0xffff0000u32;
10963            let maskedval = padval & mask;
10964            if maskedval != 0 {
10965                return Err(fidl::Error::NonZeroPadding {
10966                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10967                });
10968            }
10969            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
10970            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
10971            Ok(())
10972        }
10973    }
10974
10975    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceIndexToNameResponse {
10976        type Borrowed<'a> = &'a Self;
10977        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10978            value
10979        }
10980    }
10981
10982    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceIndexToNameResponse {
10983        type Owned = Self;
10984
10985        #[inline(always)]
10986        fn inline_align(_context: fidl::encoding::Context) -> usize {
10987            8
10988        }
10989
10990        #[inline(always)]
10991        fn inline_size(_context: fidl::encoding::Context) -> usize {
10992            16
10993        }
10994    }
10995
10996    unsafe impl<D: fidl::encoding::ResourceDialect>
10997        fidl::encoding::Encode<ProviderInterfaceIndexToNameResponse, D>
10998        for &ProviderInterfaceIndexToNameResponse
10999    {
11000        #[inline]
11001        unsafe fn encode(
11002            self,
11003            encoder: &mut fidl::encoding::Encoder<'_, D>,
11004            offset: usize,
11005            _depth: fidl::encoding::Depth,
11006        ) -> fidl::Result<()> {
11007            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameResponse>(offset);
11008            // Delegate to tuple encoding.
11009            fidl::encoding::Encode::<ProviderInterfaceIndexToNameResponse, D>::encode(
11010                (<fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow(
11011                    &self.name,
11012                ),),
11013                encoder,
11014                offset,
11015                _depth,
11016            )
11017        }
11018    }
11019    unsafe impl<
11020        D: fidl::encoding::ResourceDialect,
11021        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<15>, D>,
11022    > fidl::encoding::Encode<ProviderInterfaceIndexToNameResponse, D> for (T0,)
11023    {
11024        #[inline]
11025        unsafe fn encode(
11026            self,
11027            encoder: &mut fidl::encoding::Encoder<'_, D>,
11028            offset: usize,
11029            depth: fidl::encoding::Depth,
11030        ) -> fidl::Result<()> {
11031            encoder.debug_check_bounds::<ProviderInterfaceIndexToNameResponse>(offset);
11032            // Zero out padding regions. There's no need to apply masks
11033            // because the unmasked parts will be overwritten by fields.
11034            // Write the fields.
11035            self.0.encode(encoder, offset + 0, depth)?;
11036            Ok(())
11037        }
11038    }
11039
11040    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11041        for ProviderInterfaceIndexToNameResponse
11042    {
11043        #[inline(always)]
11044        fn new_empty() -> Self {
11045            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<15>, D) }
11046        }
11047
11048        #[inline]
11049        unsafe fn decode(
11050            &mut self,
11051            decoder: &mut fidl::encoding::Decoder<'_, D>,
11052            offset: usize,
11053            _depth: fidl::encoding::Depth,
11054        ) -> fidl::Result<()> {
11055            decoder.debug_check_bounds::<Self>(offset);
11056            // Verify that padding bytes are zero.
11057            fidl::decode!(
11058                fidl::encoding::BoundedString<15>,
11059                D,
11060                &mut self.name,
11061                decoder,
11062                offset + 0,
11063                _depth
11064            )?;
11065            Ok(())
11066        }
11067    }
11068
11069    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToFlagsResponse {
11070        type Borrowed<'a> = &'a Self;
11071        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11072            value
11073        }
11074    }
11075
11076    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToFlagsResponse {
11077        type Owned = Self;
11078
11079        #[inline(always)]
11080        fn inline_align(_context: fidl::encoding::Context) -> usize {
11081            2
11082        }
11083
11084        #[inline(always)]
11085        fn inline_size(_context: fidl::encoding::Context) -> usize {
11086            2
11087        }
11088    }
11089
11090    unsafe impl<D: fidl::encoding::ResourceDialect>
11091        fidl::encoding::Encode<ProviderInterfaceNameToFlagsResponse, D>
11092        for &ProviderInterfaceNameToFlagsResponse
11093    {
11094        #[inline]
11095        unsafe fn encode(
11096            self,
11097            encoder: &mut fidl::encoding::Encoder<'_, D>,
11098            offset: usize,
11099            _depth: fidl::encoding::Depth,
11100        ) -> fidl::Result<()> {
11101            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsResponse>(offset);
11102            // Delegate to tuple encoding.
11103            fidl::encoding::Encode::<ProviderInterfaceNameToFlagsResponse, D>::encode(
11104                (<InterfaceFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),),
11105                encoder,
11106                offset,
11107                _depth,
11108            )
11109        }
11110    }
11111    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<InterfaceFlags, D>>
11112        fidl::encoding::Encode<ProviderInterfaceNameToFlagsResponse, D> for (T0,)
11113    {
11114        #[inline]
11115        unsafe fn encode(
11116            self,
11117            encoder: &mut fidl::encoding::Encoder<'_, D>,
11118            offset: usize,
11119            depth: fidl::encoding::Depth,
11120        ) -> fidl::Result<()> {
11121            encoder.debug_check_bounds::<ProviderInterfaceNameToFlagsResponse>(offset);
11122            // Zero out padding regions. There's no need to apply masks
11123            // because the unmasked parts will be overwritten by fields.
11124            // Write the fields.
11125            self.0.encode(encoder, offset + 0, depth)?;
11126            Ok(())
11127        }
11128    }
11129
11130    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11131        for ProviderInterfaceNameToFlagsResponse
11132    {
11133        #[inline(always)]
11134        fn new_empty() -> Self {
11135            Self { flags: fidl::new_empty!(InterfaceFlags, D) }
11136        }
11137
11138        #[inline]
11139        unsafe fn decode(
11140            &mut self,
11141            decoder: &mut fidl::encoding::Decoder<'_, D>,
11142            offset: usize,
11143            _depth: fidl::encoding::Depth,
11144        ) -> fidl::Result<()> {
11145            decoder.debug_check_bounds::<Self>(offset);
11146            // Verify that padding bytes are zero.
11147            fidl::decode!(InterfaceFlags, D, &mut self.flags, decoder, offset + 0, _depth)?;
11148            Ok(())
11149        }
11150    }
11151
11152    impl fidl::encoding::ValueTypeMarker for ProviderInterfaceNameToIndexResponse {
11153        type Borrowed<'a> = &'a Self;
11154        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11155            value
11156        }
11157    }
11158
11159    unsafe impl fidl::encoding::TypeMarker for ProviderInterfaceNameToIndexResponse {
11160        type Owned = Self;
11161
11162        #[inline(always)]
11163        fn inline_align(_context: fidl::encoding::Context) -> usize {
11164            8
11165        }
11166
11167        #[inline(always)]
11168        fn inline_size(_context: fidl::encoding::Context) -> usize {
11169            8
11170        }
11171        #[inline(always)]
11172        fn encode_is_copy() -> bool {
11173            true
11174        }
11175
11176        #[inline(always)]
11177        fn decode_is_copy() -> bool {
11178            true
11179        }
11180    }
11181
11182    unsafe impl<D: fidl::encoding::ResourceDialect>
11183        fidl::encoding::Encode<ProviderInterfaceNameToIndexResponse, D>
11184        for &ProviderInterfaceNameToIndexResponse
11185    {
11186        #[inline]
11187        unsafe fn encode(
11188            self,
11189            encoder: &mut fidl::encoding::Encoder<'_, D>,
11190            offset: usize,
11191            _depth: fidl::encoding::Depth,
11192        ) -> fidl::Result<()> {
11193            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexResponse>(offset);
11194            unsafe {
11195                // Copy the object into the buffer.
11196                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11197                (buf_ptr as *mut ProviderInterfaceNameToIndexResponse)
11198                    .write_unaligned((self as *const ProviderInterfaceNameToIndexResponse).read());
11199                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11200                // done second because the memcpy will write garbage to these bytes.
11201            }
11202            Ok(())
11203        }
11204    }
11205    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
11206        fidl::encoding::Encode<ProviderInterfaceNameToIndexResponse, D> for (T0,)
11207    {
11208        #[inline]
11209        unsafe fn encode(
11210            self,
11211            encoder: &mut fidl::encoding::Encoder<'_, D>,
11212            offset: usize,
11213            depth: fidl::encoding::Depth,
11214        ) -> fidl::Result<()> {
11215            encoder.debug_check_bounds::<ProviderInterfaceNameToIndexResponse>(offset);
11216            // Zero out padding regions. There's no need to apply masks
11217            // because the unmasked parts will be overwritten by fields.
11218            // Write the fields.
11219            self.0.encode(encoder, offset + 0, depth)?;
11220            Ok(())
11221        }
11222    }
11223
11224    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11225        for ProviderInterfaceNameToIndexResponse
11226    {
11227        #[inline(always)]
11228        fn new_empty() -> Self {
11229            Self { index: fidl::new_empty!(u64, D) }
11230        }
11231
11232        #[inline]
11233        unsafe fn decode(
11234            &mut self,
11235            decoder: &mut fidl::encoding::Decoder<'_, D>,
11236            offset: usize,
11237            _depth: fidl::encoding::Depth,
11238        ) -> fidl::Result<()> {
11239            decoder.debug_check_bounds::<Self>(offset);
11240            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11241            // Verify that padding bytes are zero.
11242            // Copy from the buffer into the object.
11243            unsafe {
11244                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11245            }
11246            Ok(())
11247        }
11248    }
11249
11250    impl fidl::encoding::ValueTypeMarker for StreamSocketAcceptRequest {
11251        type Borrowed<'a> = &'a Self;
11252        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11253            value
11254        }
11255    }
11256
11257    unsafe impl fidl::encoding::TypeMarker for StreamSocketAcceptRequest {
11258        type Owned = Self;
11259
11260        #[inline(always)]
11261        fn inline_align(_context: fidl::encoding::Context) -> usize {
11262            1
11263        }
11264
11265        #[inline(always)]
11266        fn inline_size(_context: fidl::encoding::Context) -> usize {
11267            1
11268        }
11269    }
11270
11271    unsafe impl<D: fidl::encoding::ResourceDialect>
11272        fidl::encoding::Encode<StreamSocketAcceptRequest, D> for &StreamSocketAcceptRequest
11273    {
11274        #[inline]
11275        unsafe fn encode(
11276            self,
11277            encoder: &mut fidl::encoding::Encoder<'_, D>,
11278            offset: usize,
11279            _depth: fidl::encoding::Depth,
11280        ) -> fidl::Result<()> {
11281            encoder.debug_check_bounds::<StreamSocketAcceptRequest>(offset);
11282            // Delegate to tuple encoding.
11283            fidl::encoding::Encode::<StreamSocketAcceptRequest, D>::encode(
11284                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_addr),),
11285                encoder,
11286                offset,
11287                _depth,
11288            )
11289        }
11290    }
11291    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11292        fidl::encoding::Encode<StreamSocketAcceptRequest, D> for (T0,)
11293    {
11294        #[inline]
11295        unsafe fn encode(
11296            self,
11297            encoder: &mut fidl::encoding::Encoder<'_, D>,
11298            offset: usize,
11299            depth: fidl::encoding::Depth,
11300        ) -> fidl::Result<()> {
11301            encoder.debug_check_bounds::<StreamSocketAcceptRequest>(offset);
11302            // Zero out padding regions. There's no need to apply masks
11303            // because the unmasked parts will be overwritten by fields.
11304            // Write the fields.
11305            self.0.encode(encoder, offset + 0, depth)?;
11306            Ok(())
11307        }
11308    }
11309
11310    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11311        for StreamSocketAcceptRequest
11312    {
11313        #[inline(always)]
11314        fn new_empty() -> Self {
11315            Self { want_addr: fidl::new_empty!(bool, D) }
11316        }
11317
11318        #[inline]
11319        unsafe fn decode(
11320            &mut self,
11321            decoder: &mut fidl::encoding::Decoder<'_, D>,
11322            offset: usize,
11323            _depth: fidl::encoding::Depth,
11324        ) -> fidl::Result<()> {
11325            decoder.debug_check_bounds::<Self>(offset);
11326            // Verify that padding bytes are zero.
11327            fidl::decode!(bool, D, &mut self.want_addr, decoder, offset + 0, _depth)?;
11328            Ok(())
11329        }
11330    }
11331
11332    impl fidl::encoding::ValueTypeMarker for StreamSocketListenRequest {
11333        type Borrowed<'a> = &'a Self;
11334        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11335            value
11336        }
11337    }
11338
11339    unsafe impl fidl::encoding::TypeMarker for StreamSocketListenRequest {
11340        type Owned = Self;
11341
11342        #[inline(always)]
11343        fn inline_align(_context: fidl::encoding::Context) -> usize {
11344            2
11345        }
11346
11347        #[inline(always)]
11348        fn inline_size(_context: fidl::encoding::Context) -> usize {
11349            2
11350        }
11351        #[inline(always)]
11352        fn encode_is_copy() -> bool {
11353            true
11354        }
11355
11356        #[inline(always)]
11357        fn decode_is_copy() -> bool {
11358            true
11359        }
11360    }
11361
11362    unsafe impl<D: fidl::encoding::ResourceDialect>
11363        fidl::encoding::Encode<StreamSocketListenRequest, D> for &StreamSocketListenRequest
11364    {
11365        #[inline]
11366        unsafe fn encode(
11367            self,
11368            encoder: &mut fidl::encoding::Encoder<'_, D>,
11369            offset: usize,
11370            _depth: fidl::encoding::Depth,
11371        ) -> fidl::Result<()> {
11372            encoder.debug_check_bounds::<StreamSocketListenRequest>(offset);
11373            unsafe {
11374                // Copy the object into the buffer.
11375                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11376                (buf_ptr as *mut StreamSocketListenRequest)
11377                    .write_unaligned((self as *const StreamSocketListenRequest).read());
11378                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11379                // done second because the memcpy will write garbage to these bytes.
11380            }
11381            Ok(())
11382        }
11383    }
11384    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
11385        fidl::encoding::Encode<StreamSocketListenRequest, D> for (T0,)
11386    {
11387        #[inline]
11388        unsafe fn encode(
11389            self,
11390            encoder: &mut fidl::encoding::Encoder<'_, D>,
11391            offset: usize,
11392            depth: fidl::encoding::Depth,
11393        ) -> fidl::Result<()> {
11394            encoder.debug_check_bounds::<StreamSocketListenRequest>(offset);
11395            // Zero out padding regions. There's no need to apply masks
11396            // because the unmasked parts will be overwritten by fields.
11397            // Write the fields.
11398            self.0.encode(encoder, offset + 0, depth)?;
11399            Ok(())
11400        }
11401    }
11402
11403    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11404        for StreamSocketListenRequest
11405    {
11406        #[inline(always)]
11407        fn new_empty() -> Self {
11408            Self { backlog: fidl::new_empty!(i16, D) }
11409        }
11410
11411        #[inline]
11412        unsafe fn decode(
11413            &mut self,
11414            decoder: &mut fidl::encoding::Decoder<'_, D>,
11415            offset: usize,
11416            _depth: fidl::encoding::Depth,
11417        ) -> fidl::Result<()> {
11418            decoder.debug_check_bounds::<Self>(offset);
11419            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11420            // Verify that padding bytes are zero.
11421            // Copy from the buffer into the object.
11422            unsafe {
11423                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
11424            }
11425            Ok(())
11426        }
11427    }
11428
11429    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpCongestionRequest {
11430        type Borrowed<'a> = &'a Self;
11431        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11432            value
11433        }
11434    }
11435
11436    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpCongestionRequest {
11437        type Owned = Self;
11438
11439        #[inline(always)]
11440        fn inline_align(_context: fidl::encoding::Context) -> usize {
11441            4
11442        }
11443
11444        #[inline(always)]
11445        fn inline_size(_context: fidl::encoding::Context) -> usize {
11446            4
11447        }
11448    }
11449
11450    unsafe impl<D: fidl::encoding::ResourceDialect>
11451        fidl::encoding::Encode<StreamSocketSetTcpCongestionRequest, D>
11452        for &StreamSocketSetTcpCongestionRequest
11453    {
11454        #[inline]
11455        unsafe fn encode(
11456            self,
11457            encoder: &mut fidl::encoding::Encoder<'_, D>,
11458            offset: usize,
11459            _depth: fidl::encoding::Depth,
11460        ) -> fidl::Result<()> {
11461            encoder.debug_check_bounds::<StreamSocketSetTcpCongestionRequest>(offset);
11462            // Delegate to tuple encoding.
11463            fidl::encoding::Encode::<StreamSocketSetTcpCongestionRequest, D>::encode(
11464                (<TcpCongestionControl as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
11465                encoder,
11466                offset,
11467                _depth,
11468            )
11469        }
11470    }
11471    unsafe impl<
11472        D: fidl::encoding::ResourceDialect,
11473        T0: fidl::encoding::Encode<TcpCongestionControl, D>,
11474    > fidl::encoding::Encode<StreamSocketSetTcpCongestionRequest, D> for (T0,)
11475    {
11476        #[inline]
11477        unsafe fn encode(
11478            self,
11479            encoder: &mut fidl::encoding::Encoder<'_, D>,
11480            offset: usize,
11481            depth: fidl::encoding::Depth,
11482        ) -> fidl::Result<()> {
11483            encoder.debug_check_bounds::<StreamSocketSetTcpCongestionRequest>(offset);
11484            // Zero out padding regions. There's no need to apply masks
11485            // because the unmasked parts will be overwritten by fields.
11486            // Write the fields.
11487            self.0.encode(encoder, offset + 0, depth)?;
11488            Ok(())
11489        }
11490    }
11491
11492    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11493        for StreamSocketSetTcpCongestionRequest
11494    {
11495        #[inline(always)]
11496        fn new_empty() -> Self {
11497            Self { value: fidl::new_empty!(TcpCongestionControl, D) }
11498        }
11499
11500        #[inline]
11501        unsafe fn decode(
11502            &mut self,
11503            decoder: &mut fidl::encoding::Decoder<'_, D>,
11504            offset: usize,
11505            _depth: fidl::encoding::Depth,
11506        ) -> fidl::Result<()> {
11507            decoder.debug_check_bounds::<Self>(offset);
11508            // Verify that padding bytes are zero.
11509            fidl::decode!(TcpCongestionControl, D, &mut self.value, decoder, offset + 0, _depth)?;
11510            Ok(())
11511        }
11512    }
11513
11514    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpCorkRequest {
11515        type Borrowed<'a> = &'a Self;
11516        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11517            value
11518        }
11519    }
11520
11521    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpCorkRequest {
11522        type Owned = Self;
11523
11524        #[inline(always)]
11525        fn inline_align(_context: fidl::encoding::Context) -> usize {
11526            1
11527        }
11528
11529        #[inline(always)]
11530        fn inline_size(_context: fidl::encoding::Context) -> usize {
11531            1
11532        }
11533    }
11534
11535    unsafe impl<D: fidl::encoding::ResourceDialect>
11536        fidl::encoding::Encode<StreamSocketSetTcpCorkRequest, D>
11537        for &StreamSocketSetTcpCorkRequest
11538    {
11539        #[inline]
11540        unsafe fn encode(
11541            self,
11542            encoder: &mut fidl::encoding::Encoder<'_, D>,
11543            offset: usize,
11544            _depth: fidl::encoding::Depth,
11545        ) -> fidl::Result<()> {
11546            encoder.debug_check_bounds::<StreamSocketSetTcpCorkRequest>(offset);
11547            // Delegate to tuple encoding.
11548            fidl::encoding::Encode::<StreamSocketSetTcpCorkRequest, D>::encode(
11549                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
11550                encoder,
11551                offset,
11552                _depth,
11553            )
11554        }
11555    }
11556    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
11557        fidl::encoding::Encode<StreamSocketSetTcpCorkRequest, D> for (T0,)
11558    {
11559        #[inline]
11560        unsafe fn encode(
11561            self,
11562            encoder: &mut fidl::encoding::Encoder<'_, D>,
11563            offset: usize,
11564            depth: fidl::encoding::Depth,
11565        ) -> fidl::Result<()> {
11566            encoder.debug_check_bounds::<StreamSocketSetTcpCorkRequest>(offset);
11567            // Zero out padding regions. There's no need to apply masks
11568            // because the unmasked parts will be overwritten by fields.
11569            // Write the fields.
11570            self.0.encode(encoder, offset + 0, depth)?;
11571            Ok(())
11572        }
11573    }
11574
11575    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11576        for StreamSocketSetTcpCorkRequest
11577    {
11578        #[inline(always)]
11579        fn new_empty() -> Self {
11580            Self { value: fidl::new_empty!(bool, D) }
11581        }
11582
11583        #[inline]
11584        unsafe fn decode(
11585            &mut self,
11586            decoder: &mut fidl::encoding::Decoder<'_, D>,
11587            offset: usize,
11588            _depth: fidl::encoding::Depth,
11589        ) -> fidl::Result<()> {
11590            decoder.debug_check_bounds::<Self>(offset);
11591            // Verify that padding bytes are zero.
11592            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
11593            Ok(())
11594        }
11595    }
11596
11597    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpDeferAcceptRequest {
11598        type Borrowed<'a> = &'a Self;
11599        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11600            value
11601        }
11602    }
11603
11604    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpDeferAcceptRequest {
11605        type Owned = Self;
11606
11607        #[inline(always)]
11608        fn inline_align(_context: fidl::encoding::Context) -> usize {
11609            4
11610        }
11611
11612        #[inline(always)]
11613        fn inline_size(_context: fidl::encoding::Context) -> usize {
11614            4
11615        }
11616        #[inline(always)]
11617        fn encode_is_copy() -> bool {
11618            true
11619        }
11620
11621        #[inline(always)]
11622        fn decode_is_copy() -> bool {
11623            true
11624        }
11625    }
11626
11627    unsafe impl<D: fidl::encoding::ResourceDialect>
11628        fidl::encoding::Encode<StreamSocketSetTcpDeferAcceptRequest, D>
11629        for &StreamSocketSetTcpDeferAcceptRequest
11630    {
11631        #[inline]
11632        unsafe fn encode(
11633            self,
11634            encoder: &mut fidl::encoding::Encoder<'_, D>,
11635            offset: usize,
11636            _depth: fidl::encoding::Depth,
11637        ) -> fidl::Result<()> {
11638            encoder.debug_check_bounds::<StreamSocketSetTcpDeferAcceptRequest>(offset);
11639            unsafe {
11640                // Copy the object into the buffer.
11641                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11642                (buf_ptr as *mut StreamSocketSetTcpDeferAcceptRequest)
11643                    .write_unaligned((self as *const StreamSocketSetTcpDeferAcceptRequest).read());
11644                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11645                // done second because the memcpy will write garbage to these bytes.
11646            }
11647            Ok(())
11648        }
11649    }
11650    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11651        fidl::encoding::Encode<StreamSocketSetTcpDeferAcceptRequest, D> for (T0,)
11652    {
11653        #[inline]
11654        unsafe fn encode(
11655            self,
11656            encoder: &mut fidl::encoding::Encoder<'_, D>,
11657            offset: usize,
11658            depth: fidl::encoding::Depth,
11659        ) -> fidl::Result<()> {
11660            encoder.debug_check_bounds::<StreamSocketSetTcpDeferAcceptRequest>(offset);
11661            // Zero out padding regions. There's no need to apply masks
11662            // because the unmasked parts will be overwritten by fields.
11663            // Write the fields.
11664            self.0.encode(encoder, offset + 0, depth)?;
11665            Ok(())
11666        }
11667    }
11668
11669    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11670        for StreamSocketSetTcpDeferAcceptRequest
11671    {
11672        #[inline(always)]
11673        fn new_empty() -> Self {
11674            Self { value_secs: fidl::new_empty!(u32, D) }
11675        }
11676
11677        #[inline]
11678        unsafe fn decode(
11679            &mut self,
11680            decoder: &mut fidl::encoding::Decoder<'_, D>,
11681            offset: usize,
11682            _depth: fidl::encoding::Depth,
11683        ) -> fidl::Result<()> {
11684            decoder.debug_check_bounds::<Self>(offset);
11685            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11686            // Verify that padding bytes are zero.
11687            // Copy from the buffer into the object.
11688            unsafe {
11689                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11690            }
11691            Ok(())
11692        }
11693    }
11694
11695    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveCountRequest {
11696        type Borrowed<'a> = &'a Self;
11697        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11698            value
11699        }
11700    }
11701
11702    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveCountRequest {
11703        type Owned = Self;
11704
11705        #[inline(always)]
11706        fn inline_align(_context: fidl::encoding::Context) -> usize {
11707            4
11708        }
11709
11710        #[inline(always)]
11711        fn inline_size(_context: fidl::encoding::Context) -> usize {
11712            4
11713        }
11714        #[inline(always)]
11715        fn encode_is_copy() -> bool {
11716            true
11717        }
11718
11719        #[inline(always)]
11720        fn decode_is_copy() -> bool {
11721            true
11722        }
11723    }
11724
11725    unsafe impl<D: fidl::encoding::ResourceDialect>
11726        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveCountRequest, D>
11727        for &StreamSocketSetTcpKeepAliveCountRequest
11728    {
11729        #[inline]
11730        unsafe fn encode(
11731            self,
11732            encoder: &mut fidl::encoding::Encoder<'_, D>,
11733            offset: usize,
11734            _depth: fidl::encoding::Depth,
11735        ) -> fidl::Result<()> {
11736            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveCountRequest>(offset);
11737            unsafe {
11738                // Copy the object into the buffer.
11739                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11740                (buf_ptr as *mut StreamSocketSetTcpKeepAliveCountRequest).write_unaligned(
11741                    (self as *const StreamSocketSetTcpKeepAliveCountRequest).read(),
11742                );
11743                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11744                // done second because the memcpy will write garbage to these bytes.
11745            }
11746            Ok(())
11747        }
11748    }
11749    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11750        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveCountRequest, D> for (T0,)
11751    {
11752        #[inline]
11753        unsafe fn encode(
11754            self,
11755            encoder: &mut fidl::encoding::Encoder<'_, D>,
11756            offset: usize,
11757            depth: fidl::encoding::Depth,
11758        ) -> fidl::Result<()> {
11759            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveCountRequest>(offset);
11760            // Zero out padding regions. There's no need to apply masks
11761            // because the unmasked parts will be overwritten by fields.
11762            // Write the fields.
11763            self.0.encode(encoder, offset + 0, depth)?;
11764            Ok(())
11765        }
11766    }
11767
11768    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11769        for StreamSocketSetTcpKeepAliveCountRequest
11770    {
11771        #[inline(always)]
11772        fn new_empty() -> Self {
11773            Self { value: fidl::new_empty!(u32, D) }
11774        }
11775
11776        #[inline]
11777        unsafe fn decode(
11778            &mut self,
11779            decoder: &mut fidl::encoding::Decoder<'_, D>,
11780            offset: usize,
11781            _depth: fidl::encoding::Depth,
11782        ) -> fidl::Result<()> {
11783            decoder.debug_check_bounds::<Self>(offset);
11784            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11785            // Verify that padding bytes are zero.
11786            // Copy from the buffer into the object.
11787            unsafe {
11788                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11789            }
11790            Ok(())
11791        }
11792    }
11793
11794    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveIdleRequest {
11795        type Borrowed<'a> = &'a Self;
11796        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11797            value
11798        }
11799    }
11800
11801    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveIdleRequest {
11802        type Owned = Self;
11803
11804        #[inline(always)]
11805        fn inline_align(_context: fidl::encoding::Context) -> usize {
11806            4
11807        }
11808
11809        #[inline(always)]
11810        fn inline_size(_context: fidl::encoding::Context) -> usize {
11811            4
11812        }
11813        #[inline(always)]
11814        fn encode_is_copy() -> bool {
11815            true
11816        }
11817
11818        #[inline(always)]
11819        fn decode_is_copy() -> bool {
11820            true
11821        }
11822    }
11823
11824    unsafe impl<D: fidl::encoding::ResourceDialect>
11825        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIdleRequest, D>
11826        for &StreamSocketSetTcpKeepAliveIdleRequest
11827    {
11828        #[inline]
11829        unsafe fn encode(
11830            self,
11831            encoder: &mut fidl::encoding::Encoder<'_, D>,
11832            offset: usize,
11833            _depth: fidl::encoding::Depth,
11834        ) -> fidl::Result<()> {
11835            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIdleRequest>(offset);
11836            unsafe {
11837                // Copy the object into the buffer.
11838                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11839                (buf_ptr as *mut StreamSocketSetTcpKeepAliveIdleRequest).write_unaligned(
11840                    (self as *const StreamSocketSetTcpKeepAliveIdleRequest).read(),
11841                );
11842                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11843                // done second because the memcpy will write garbage to these bytes.
11844            }
11845            Ok(())
11846        }
11847    }
11848    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11849        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIdleRequest, D> for (T0,)
11850    {
11851        #[inline]
11852        unsafe fn encode(
11853            self,
11854            encoder: &mut fidl::encoding::Encoder<'_, D>,
11855            offset: usize,
11856            depth: fidl::encoding::Depth,
11857        ) -> fidl::Result<()> {
11858            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIdleRequest>(offset);
11859            // Zero out padding regions. There's no need to apply masks
11860            // because the unmasked parts will be overwritten by fields.
11861            // Write the fields.
11862            self.0.encode(encoder, offset + 0, depth)?;
11863            Ok(())
11864        }
11865    }
11866
11867    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11868        for StreamSocketSetTcpKeepAliveIdleRequest
11869    {
11870        #[inline(always)]
11871        fn new_empty() -> Self {
11872            Self { value_secs: fidl::new_empty!(u32, D) }
11873        }
11874
11875        #[inline]
11876        unsafe fn decode(
11877            &mut self,
11878            decoder: &mut fidl::encoding::Decoder<'_, D>,
11879            offset: usize,
11880            _depth: fidl::encoding::Depth,
11881        ) -> fidl::Result<()> {
11882            decoder.debug_check_bounds::<Self>(offset);
11883            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11884            // Verify that padding bytes are zero.
11885            // Copy from the buffer into the object.
11886            unsafe {
11887                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11888            }
11889            Ok(())
11890        }
11891    }
11892
11893    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpKeepAliveIntervalRequest {
11894        type Borrowed<'a> = &'a Self;
11895        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11896            value
11897        }
11898    }
11899
11900    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpKeepAliveIntervalRequest {
11901        type Owned = Self;
11902
11903        #[inline(always)]
11904        fn inline_align(_context: fidl::encoding::Context) -> usize {
11905            4
11906        }
11907
11908        #[inline(always)]
11909        fn inline_size(_context: fidl::encoding::Context) -> usize {
11910            4
11911        }
11912        #[inline(always)]
11913        fn encode_is_copy() -> bool {
11914            true
11915        }
11916
11917        #[inline(always)]
11918        fn decode_is_copy() -> bool {
11919            true
11920        }
11921    }
11922
11923    unsafe impl<D: fidl::encoding::ResourceDialect>
11924        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIntervalRequest, D>
11925        for &StreamSocketSetTcpKeepAliveIntervalRequest
11926    {
11927        #[inline]
11928        unsafe fn encode(
11929            self,
11930            encoder: &mut fidl::encoding::Encoder<'_, D>,
11931            offset: usize,
11932            _depth: fidl::encoding::Depth,
11933        ) -> fidl::Result<()> {
11934            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIntervalRequest>(offset);
11935            unsafe {
11936                // Copy the object into the buffer.
11937                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11938                (buf_ptr as *mut StreamSocketSetTcpKeepAliveIntervalRequest).write_unaligned(
11939                    (self as *const StreamSocketSetTcpKeepAliveIntervalRequest).read(),
11940                );
11941                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11942                // done second because the memcpy will write garbage to these bytes.
11943            }
11944            Ok(())
11945        }
11946    }
11947    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11948        fidl::encoding::Encode<StreamSocketSetTcpKeepAliveIntervalRequest, D> for (T0,)
11949    {
11950        #[inline]
11951        unsafe fn encode(
11952            self,
11953            encoder: &mut fidl::encoding::Encoder<'_, D>,
11954            offset: usize,
11955            depth: fidl::encoding::Depth,
11956        ) -> fidl::Result<()> {
11957            encoder.debug_check_bounds::<StreamSocketSetTcpKeepAliveIntervalRequest>(offset);
11958            // Zero out padding regions. There's no need to apply masks
11959            // because the unmasked parts will be overwritten by fields.
11960            // Write the fields.
11961            self.0.encode(encoder, offset + 0, depth)?;
11962            Ok(())
11963        }
11964    }
11965
11966    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11967        for StreamSocketSetTcpKeepAliveIntervalRequest
11968    {
11969        #[inline(always)]
11970        fn new_empty() -> Self {
11971            Self { value_secs: fidl::new_empty!(u32, D) }
11972        }
11973
11974        #[inline]
11975        unsafe fn decode(
11976            &mut self,
11977            decoder: &mut fidl::encoding::Decoder<'_, D>,
11978            offset: usize,
11979            _depth: fidl::encoding::Depth,
11980        ) -> fidl::Result<()> {
11981            decoder.debug_check_bounds::<Self>(offset);
11982            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11983            // Verify that padding bytes are zero.
11984            // Copy from the buffer into the object.
11985            unsafe {
11986                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11987            }
11988            Ok(())
11989        }
11990    }
11991
11992    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpLingerRequest {
11993        type Borrowed<'a> = &'a Self;
11994        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11995            value
11996        }
11997    }
11998
11999    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpLingerRequest {
12000        type Owned = Self;
12001
12002        #[inline(always)]
12003        fn inline_align(_context: fidl::encoding::Context) -> usize {
12004            8
12005        }
12006
12007        #[inline(always)]
12008        fn inline_size(_context: fidl::encoding::Context) -> usize {
12009            16
12010        }
12011    }
12012
12013    unsafe impl<D: fidl::encoding::ResourceDialect>
12014        fidl::encoding::Encode<StreamSocketSetTcpLingerRequest, D>
12015        for &StreamSocketSetTcpLingerRequest
12016    {
12017        #[inline]
12018        unsafe fn encode(
12019            self,
12020            encoder: &mut fidl::encoding::Encoder<'_, D>,
12021            offset: usize,
12022            _depth: fidl::encoding::Depth,
12023        ) -> fidl::Result<()> {
12024            encoder.debug_check_bounds::<StreamSocketSetTcpLingerRequest>(offset);
12025            // Delegate to tuple encoding.
12026            fidl::encoding::Encode::<StreamSocketSetTcpLingerRequest, D>::encode(
12027                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value_secs),),
12028                encoder,
12029                offset,
12030                _depth,
12031            )
12032        }
12033    }
12034    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
12035        fidl::encoding::Encode<StreamSocketSetTcpLingerRequest, D> for (T0,)
12036    {
12037        #[inline]
12038        unsafe fn encode(
12039            self,
12040            encoder: &mut fidl::encoding::Encoder<'_, D>,
12041            offset: usize,
12042            depth: fidl::encoding::Depth,
12043        ) -> fidl::Result<()> {
12044            encoder.debug_check_bounds::<StreamSocketSetTcpLingerRequest>(offset);
12045            // Zero out padding regions. There's no need to apply masks
12046            // because the unmasked parts will be overwritten by fields.
12047            // Write the fields.
12048            self.0.encode(encoder, offset + 0, depth)?;
12049            Ok(())
12050        }
12051    }
12052
12053    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12054        for StreamSocketSetTcpLingerRequest
12055    {
12056        #[inline(always)]
12057        fn new_empty() -> Self {
12058            Self { value_secs: fidl::new_empty!(OptionalUint32, D) }
12059        }
12060
12061        #[inline]
12062        unsafe fn decode(
12063            &mut self,
12064            decoder: &mut fidl::encoding::Decoder<'_, D>,
12065            offset: usize,
12066            _depth: fidl::encoding::Depth,
12067        ) -> fidl::Result<()> {
12068            decoder.debug_check_bounds::<Self>(offset);
12069            // Verify that padding bytes are zero.
12070            fidl::decode!(OptionalUint32, D, &mut self.value_secs, decoder, offset + 0, _depth)?;
12071            Ok(())
12072        }
12073    }
12074
12075    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpMaxSegmentRequest {
12076        type Borrowed<'a> = &'a Self;
12077        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12078            value
12079        }
12080    }
12081
12082    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpMaxSegmentRequest {
12083        type Owned = Self;
12084
12085        #[inline(always)]
12086        fn inline_align(_context: fidl::encoding::Context) -> usize {
12087            4
12088        }
12089
12090        #[inline(always)]
12091        fn inline_size(_context: fidl::encoding::Context) -> usize {
12092            4
12093        }
12094        #[inline(always)]
12095        fn encode_is_copy() -> bool {
12096            true
12097        }
12098
12099        #[inline(always)]
12100        fn decode_is_copy() -> bool {
12101            true
12102        }
12103    }
12104
12105    unsafe impl<D: fidl::encoding::ResourceDialect>
12106        fidl::encoding::Encode<StreamSocketSetTcpMaxSegmentRequest, D>
12107        for &StreamSocketSetTcpMaxSegmentRequest
12108    {
12109        #[inline]
12110        unsafe fn encode(
12111            self,
12112            encoder: &mut fidl::encoding::Encoder<'_, D>,
12113            offset: usize,
12114            _depth: fidl::encoding::Depth,
12115        ) -> fidl::Result<()> {
12116            encoder.debug_check_bounds::<StreamSocketSetTcpMaxSegmentRequest>(offset);
12117            unsafe {
12118                // Copy the object into the buffer.
12119                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12120                (buf_ptr as *mut StreamSocketSetTcpMaxSegmentRequest)
12121                    .write_unaligned((self as *const StreamSocketSetTcpMaxSegmentRequest).read());
12122                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12123                // done second because the memcpy will write garbage to these bytes.
12124            }
12125            Ok(())
12126        }
12127    }
12128    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12129        fidl::encoding::Encode<StreamSocketSetTcpMaxSegmentRequest, D> for (T0,)
12130    {
12131        #[inline]
12132        unsafe fn encode(
12133            self,
12134            encoder: &mut fidl::encoding::Encoder<'_, D>,
12135            offset: usize,
12136            depth: fidl::encoding::Depth,
12137        ) -> fidl::Result<()> {
12138            encoder.debug_check_bounds::<StreamSocketSetTcpMaxSegmentRequest>(offset);
12139            // Zero out padding regions. There's no need to apply masks
12140            // because the unmasked parts will be overwritten by fields.
12141            // Write the fields.
12142            self.0.encode(encoder, offset + 0, depth)?;
12143            Ok(())
12144        }
12145    }
12146
12147    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12148        for StreamSocketSetTcpMaxSegmentRequest
12149    {
12150        #[inline(always)]
12151        fn new_empty() -> Self {
12152            Self { value_bytes: fidl::new_empty!(u32, D) }
12153        }
12154
12155        #[inline]
12156        unsafe fn decode(
12157            &mut self,
12158            decoder: &mut fidl::encoding::Decoder<'_, D>,
12159            offset: usize,
12160            _depth: fidl::encoding::Depth,
12161        ) -> fidl::Result<()> {
12162            decoder.debug_check_bounds::<Self>(offset);
12163            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12164            // Verify that padding bytes are zero.
12165            // Copy from the buffer into the object.
12166            unsafe {
12167                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12168            }
12169            Ok(())
12170        }
12171    }
12172
12173    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpNoDelayRequest {
12174        type Borrowed<'a> = &'a Self;
12175        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12176            value
12177        }
12178    }
12179
12180    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpNoDelayRequest {
12181        type Owned = Self;
12182
12183        #[inline(always)]
12184        fn inline_align(_context: fidl::encoding::Context) -> usize {
12185            1
12186        }
12187
12188        #[inline(always)]
12189        fn inline_size(_context: fidl::encoding::Context) -> usize {
12190            1
12191        }
12192    }
12193
12194    unsafe impl<D: fidl::encoding::ResourceDialect>
12195        fidl::encoding::Encode<StreamSocketSetTcpNoDelayRequest, D>
12196        for &StreamSocketSetTcpNoDelayRequest
12197    {
12198        #[inline]
12199        unsafe fn encode(
12200            self,
12201            encoder: &mut fidl::encoding::Encoder<'_, D>,
12202            offset: usize,
12203            _depth: fidl::encoding::Depth,
12204        ) -> fidl::Result<()> {
12205            encoder.debug_check_bounds::<StreamSocketSetTcpNoDelayRequest>(offset);
12206            // Delegate to tuple encoding.
12207            fidl::encoding::Encode::<StreamSocketSetTcpNoDelayRequest, D>::encode(
12208                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12209                encoder,
12210                offset,
12211                _depth,
12212            )
12213        }
12214    }
12215    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12216        fidl::encoding::Encode<StreamSocketSetTcpNoDelayRequest, D> for (T0,)
12217    {
12218        #[inline]
12219        unsafe fn encode(
12220            self,
12221            encoder: &mut fidl::encoding::Encoder<'_, D>,
12222            offset: usize,
12223            depth: fidl::encoding::Depth,
12224        ) -> fidl::Result<()> {
12225            encoder.debug_check_bounds::<StreamSocketSetTcpNoDelayRequest>(offset);
12226            // Zero out padding regions. There's no need to apply masks
12227            // because the unmasked parts will be overwritten by fields.
12228            // Write the fields.
12229            self.0.encode(encoder, offset + 0, depth)?;
12230            Ok(())
12231        }
12232    }
12233
12234    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12235        for StreamSocketSetTcpNoDelayRequest
12236    {
12237        #[inline(always)]
12238        fn new_empty() -> Self {
12239            Self { value: fidl::new_empty!(bool, D) }
12240        }
12241
12242        #[inline]
12243        unsafe fn decode(
12244            &mut self,
12245            decoder: &mut fidl::encoding::Decoder<'_, D>,
12246            offset: usize,
12247            _depth: fidl::encoding::Depth,
12248        ) -> fidl::Result<()> {
12249            decoder.debug_check_bounds::<Self>(offset);
12250            // Verify that padding bytes are zero.
12251            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12252            Ok(())
12253        }
12254    }
12255
12256    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpQuickAckRequest {
12257        type Borrowed<'a> = &'a Self;
12258        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12259            value
12260        }
12261    }
12262
12263    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpQuickAckRequest {
12264        type Owned = Self;
12265
12266        #[inline(always)]
12267        fn inline_align(_context: fidl::encoding::Context) -> usize {
12268            1
12269        }
12270
12271        #[inline(always)]
12272        fn inline_size(_context: fidl::encoding::Context) -> usize {
12273            1
12274        }
12275    }
12276
12277    unsafe impl<D: fidl::encoding::ResourceDialect>
12278        fidl::encoding::Encode<StreamSocketSetTcpQuickAckRequest, D>
12279        for &StreamSocketSetTcpQuickAckRequest
12280    {
12281        #[inline]
12282        unsafe fn encode(
12283            self,
12284            encoder: &mut fidl::encoding::Encoder<'_, D>,
12285            offset: usize,
12286            _depth: fidl::encoding::Depth,
12287        ) -> fidl::Result<()> {
12288            encoder.debug_check_bounds::<StreamSocketSetTcpQuickAckRequest>(offset);
12289            // Delegate to tuple encoding.
12290            fidl::encoding::Encode::<StreamSocketSetTcpQuickAckRequest, D>::encode(
12291                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12292                encoder,
12293                offset,
12294                _depth,
12295            )
12296        }
12297    }
12298    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12299        fidl::encoding::Encode<StreamSocketSetTcpQuickAckRequest, D> for (T0,)
12300    {
12301        #[inline]
12302        unsafe fn encode(
12303            self,
12304            encoder: &mut fidl::encoding::Encoder<'_, D>,
12305            offset: usize,
12306            depth: fidl::encoding::Depth,
12307        ) -> fidl::Result<()> {
12308            encoder.debug_check_bounds::<StreamSocketSetTcpQuickAckRequest>(offset);
12309            // Zero out padding regions. There's no need to apply masks
12310            // because the unmasked parts will be overwritten by fields.
12311            // Write the fields.
12312            self.0.encode(encoder, offset + 0, depth)?;
12313            Ok(())
12314        }
12315    }
12316
12317    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12318        for StreamSocketSetTcpQuickAckRequest
12319    {
12320        #[inline(always)]
12321        fn new_empty() -> Self {
12322            Self { value: fidl::new_empty!(bool, D) }
12323        }
12324
12325        #[inline]
12326        unsafe fn decode(
12327            &mut self,
12328            decoder: &mut fidl::encoding::Decoder<'_, D>,
12329            offset: usize,
12330            _depth: fidl::encoding::Depth,
12331        ) -> fidl::Result<()> {
12332            decoder.debug_check_bounds::<Self>(offset);
12333            // Verify that padding bytes are zero.
12334            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12335            Ok(())
12336        }
12337    }
12338
12339    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpSynCountRequest {
12340        type Borrowed<'a> = &'a Self;
12341        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12342            value
12343        }
12344    }
12345
12346    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpSynCountRequest {
12347        type Owned = Self;
12348
12349        #[inline(always)]
12350        fn inline_align(_context: fidl::encoding::Context) -> usize {
12351            4
12352        }
12353
12354        #[inline(always)]
12355        fn inline_size(_context: fidl::encoding::Context) -> usize {
12356            4
12357        }
12358        #[inline(always)]
12359        fn encode_is_copy() -> bool {
12360            true
12361        }
12362
12363        #[inline(always)]
12364        fn decode_is_copy() -> bool {
12365            true
12366        }
12367    }
12368
12369    unsafe impl<D: fidl::encoding::ResourceDialect>
12370        fidl::encoding::Encode<StreamSocketSetTcpSynCountRequest, D>
12371        for &StreamSocketSetTcpSynCountRequest
12372    {
12373        #[inline]
12374        unsafe fn encode(
12375            self,
12376            encoder: &mut fidl::encoding::Encoder<'_, D>,
12377            offset: usize,
12378            _depth: fidl::encoding::Depth,
12379        ) -> fidl::Result<()> {
12380            encoder.debug_check_bounds::<StreamSocketSetTcpSynCountRequest>(offset);
12381            unsafe {
12382                // Copy the object into the buffer.
12383                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12384                (buf_ptr as *mut StreamSocketSetTcpSynCountRequest)
12385                    .write_unaligned((self as *const StreamSocketSetTcpSynCountRequest).read());
12386                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12387                // done second because the memcpy will write garbage to these bytes.
12388            }
12389            Ok(())
12390        }
12391    }
12392    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12393        fidl::encoding::Encode<StreamSocketSetTcpSynCountRequest, D> for (T0,)
12394    {
12395        #[inline]
12396        unsafe fn encode(
12397            self,
12398            encoder: &mut fidl::encoding::Encoder<'_, D>,
12399            offset: usize,
12400            depth: fidl::encoding::Depth,
12401        ) -> fidl::Result<()> {
12402            encoder.debug_check_bounds::<StreamSocketSetTcpSynCountRequest>(offset);
12403            // Zero out padding regions. There's no need to apply masks
12404            // because the unmasked parts will be overwritten by fields.
12405            // Write the fields.
12406            self.0.encode(encoder, offset + 0, depth)?;
12407            Ok(())
12408        }
12409    }
12410
12411    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12412        for StreamSocketSetTcpSynCountRequest
12413    {
12414        #[inline(always)]
12415        fn new_empty() -> Self {
12416            Self { value: fidl::new_empty!(u32, D) }
12417        }
12418
12419        #[inline]
12420        unsafe fn decode(
12421            &mut self,
12422            decoder: &mut fidl::encoding::Decoder<'_, D>,
12423            offset: usize,
12424            _depth: fidl::encoding::Depth,
12425        ) -> fidl::Result<()> {
12426            decoder.debug_check_bounds::<Self>(offset);
12427            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12428            // Verify that padding bytes are zero.
12429            // Copy from the buffer into the object.
12430            unsafe {
12431                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12432            }
12433            Ok(())
12434        }
12435    }
12436
12437    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpUserTimeoutRequest {
12438        type Borrowed<'a> = &'a Self;
12439        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12440            value
12441        }
12442    }
12443
12444    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpUserTimeoutRequest {
12445        type Owned = Self;
12446
12447        #[inline(always)]
12448        fn inline_align(_context: fidl::encoding::Context) -> usize {
12449            4
12450        }
12451
12452        #[inline(always)]
12453        fn inline_size(_context: fidl::encoding::Context) -> usize {
12454            4
12455        }
12456        #[inline(always)]
12457        fn encode_is_copy() -> bool {
12458            true
12459        }
12460
12461        #[inline(always)]
12462        fn decode_is_copy() -> bool {
12463            true
12464        }
12465    }
12466
12467    unsafe impl<D: fidl::encoding::ResourceDialect>
12468        fidl::encoding::Encode<StreamSocketSetTcpUserTimeoutRequest, D>
12469        for &StreamSocketSetTcpUserTimeoutRequest
12470    {
12471        #[inline]
12472        unsafe fn encode(
12473            self,
12474            encoder: &mut fidl::encoding::Encoder<'_, D>,
12475            offset: usize,
12476            _depth: fidl::encoding::Depth,
12477        ) -> fidl::Result<()> {
12478            encoder.debug_check_bounds::<StreamSocketSetTcpUserTimeoutRequest>(offset);
12479            unsafe {
12480                // Copy the object into the buffer.
12481                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12482                (buf_ptr as *mut StreamSocketSetTcpUserTimeoutRequest)
12483                    .write_unaligned((self as *const StreamSocketSetTcpUserTimeoutRequest).read());
12484                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12485                // done second because the memcpy will write garbage to these bytes.
12486            }
12487            Ok(())
12488        }
12489    }
12490    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12491        fidl::encoding::Encode<StreamSocketSetTcpUserTimeoutRequest, D> for (T0,)
12492    {
12493        #[inline]
12494        unsafe fn encode(
12495            self,
12496            encoder: &mut fidl::encoding::Encoder<'_, D>,
12497            offset: usize,
12498            depth: fidl::encoding::Depth,
12499        ) -> fidl::Result<()> {
12500            encoder.debug_check_bounds::<StreamSocketSetTcpUserTimeoutRequest>(offset);
12501            // Zero out padding regions. There's no need to apply masks
12502            // because the unmasked parts will be overwritten by fields.
12503            // Write the fields.
12504            self.0.encode(encoder, offset + 0, depth)?;
12505            Ok(())
12506        }
12507    }
12508
12509    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12510        for StreamSocketSetTcpUserTimeoutRequest
12511    {
12512        #[inline(always)]
12513        fn new_empty() -> Self {
12514            Self { value_millis: fidl::new_empty!(u32, D) }
12515        }
12516
12517        #[inline]
12518        unsafe fn decode(
12519            &mut self,
12520            decoder: &mut fidl::encoding::Decoder<'_, D>,
12521            offset: usize,
12522            _depth: fidl::encoding::Depth,
12523        ) -> fidl::Result<()> {
12524            decoder.debug_check_bounds::<Self>(offset);
12525            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12526            // Verify that padding bytes are zero.
12527            // Copy from the buffer into the object.
12528            unsafe {
12529                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12530            }
12531            Ok(())
12532        }
12533    }
12534
12535    impl fidl::encoding::ValueTypeMarker for StreamSocketSetTcpWindowClampRequest {
12536        type Borrowed<'a> = &'a Self;
12537        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12538            value
12539        }
12540    }
12541
12542    unsafe impl fidl::encoding::TypeMarker for StreamSocketSetTcpWindowClampRequest {
12543        type Owned = Self;
12544
12545        #[inline(always)]
12546        fn inline_align(_context: fidl::encoding::Context) -> usize {
12547            4
12548        }
12549
12550        #[inline(always)]
12551        fn inline_size(_context: fidl::encoding::Context) -> usize {
12552            4
12553        }
12554        #[inline(always)]
12555        fn encode_is_copy() -> bool {
12556            true
12557        }
12558
12559        #[inline(always)]
12560        fn decode_is_copy() -> bool {
12561            true
12562        }
12563    }
12564
12565    unsafe impl<D: fidl::encoding::ResourceDialect>
12566        fidl::encoding::Encode<StreamSocketSetTcpWindowClampRequest, D>
12567        for &StreamSocketSetTcpWindowClampRequest
12568    {
12569        #[inline]
12570        unsafe fn encode(
12571            self,
12572            encoder: &mut fidl::encoding::Encoder<'_, D>,
12573            offset: usize,
12574            _depth: fidl::encoding::Depth,
12575        ) -> fidl::Result<()> {
12576            encoder.debug_check_bounds::<StreamSocketSetTcpWindowClampRequest>(offset);
12577            unsafe {
12578                // Copy the object into the buffer.
12579                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12580                (buf_ptr as *mut StreamSocketSetTcpWindowClampRequest)
12581                    .write_unaligned((self as *const StreamSocketSetTcpWindowClampRequest).read());
12582                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12583                // done second because the memcpy will write garbage to these bytes.
12584            }
12585            Ok(())
12586        }
12587    }
12588    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12589        fidl::encoding::Encode<StreamSocketSetTcpWindowClampRequest, D> for (T0,)
12590    {
12591        #[inline]
12592        unsafe fn encode(
12593            self,
12594            encoder: &mut fidl::encoding::Encoder<'_, D>,
12595            offset: usize,
12596            depth: fidl::encoding::Depth,
12597        ) -> fidl::Result<()> {
12598            encoder.debug_check_bounds::<StreamSocketSetTcpWindowClampRequest>(offset);
12599            // Zero out padding regions. There's no need to apply masks
12600            // because the unmasked parts will be overwritten by fields.
12601            // Write the fields.
12602            self.0.encode(encoder, offset + 0, depth)?;
12603            Ok(())
12604        }
12605    }
12606
12607    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12608        for StreamSocketSetTcpWindowClampRequest
12609    {
12610        #[inline(always)]
12611        fn new_empty() -> Self {
12612            Self { value: fidl::new_empty!(u32, D) }
12613        }
12614
12615        #[inline]
12616        unsafe fn decode(
12617            &mut self,
12618            decoder: &mut fidl::encoding::Decoder<'_, D>,
12619            offset: usize,
12620            _depth: fidl::encoding::Depth,
12621        ) -> fidl::Result<()> {
12622            decoder.debug_check_bounds::<Self>(offset);
12623            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12624            // Verify that padding bytes are zero.
12625            // Copy from the buffer into the object.
12626            unsafe {
12627                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12628            }
12629            Ok(())
12630        }
12631    }
12632
12633    impl fidl::encoding::ValueTypeMarker for StreamSocketGetInfoResponse {
12634        type Borrowed<'a> = &'a Self;
12635        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12636            value
12637        }
12638    }
12639
12640    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetInfoResponse {
12641        type Owned = Self;
12642
12643        #[inline(always)]
12644        fn inline_align(_context: fidl::encoding::Context) -> usize {
12645            4
12646        }
12647
12648        #[inline(always)]
12649        fn inline_size(_context: fidl::encoding::Context) -> usize {
12650            8
12651        }
12652    }
12653
12654    unsafe impl<D: fidl::encoding::ResourceDialect>
12655        fidl::encoding::Encode<StreamSocketGetInfoResponse, D> for &StreamSocketGetInfoResponse
12656    {
12657        #[inline]
12658        unsafe fn encode(
12659            self,
12660            encoder: &mut fidl::encoding::Encoder<'_, D>,
12661            offset: usize,
12662            _depth: fidl::encoding::Depth,
12663        ) -> fidl::Result<()> {
12664            encoder.debug_check_bounds::<StreamSocketGetInfoResponse>(offset);
12665            // Delegate to tuple encoding.
12666            fidl::encoding::Encode::<StreamSocketGetInfoResponse, D>::encode(
12667                (
12668                    <Domain as fidl::encoding::ValueTypeMarker>::borrow(&self.domain),
12669                    <StreamSocketProtocol as fidl::encoding::ValueTypeMarker>::borrow(&self.proto),
12670                ),
12671                encoder,
12672                offset,
12673                _depth,
12674            )
12675        }
12676    }
12677    unsafe impl<
12678        D: fidl::encoding::ResourceDialect,
12679        T0: fidl::encoding::Encode<Domain, D>,
12680        T1: fidl::encoding::Encode<StreamSocketProtocol, D>,
12681    > fidl::encoding::Encode<StreamSocketGetInfoResponse, D> for (T0, T1)
12682    {
12683        #[inline]
12684        unsafe fn encode(
12685            self,
12686            encoder: &mut fidl::encoding::Encoder<'_, D>,
12687            offset: usize,
12688            depth: fidl::encoding::Depth,
12689        ) -> fidl::Result<()> {
12690            encoder.debug_check_bounds::<StreamSocketGetInfoResponse>(offset);
12691            // Zero out padding regions. There's no need to apply masks
12692            // because the unmasked parts will be overwritten by fields.
12693            unsafe {
12694                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
12695                (ptr as *mut u32).write_unaligned(0);
12696            }
12697            // Write the fields.
12698            self.0.encode(encoder, offset + 0, depth)?;
12699            self.1.encode(encoder, offset + 4, depth)?;
12700            Ok(())
12701        }
12702    }
12703
12704    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12705        for StreamSocketGetInfoResponse
12706    {
12707        #[inline(always)]
12708        fn new_empty() -> Self {
12709            Self {
12710                domain: fidl::new_empty!(Domain, D),
12711                proto: fidl::new_empty!(StreamSocketProtocol, D),
12712            }
12713        }
12714
12715        #[inline]
12716        unsafe fn decode(
12717            &mut self,
12718            decoder: &mut fidl::encoding::Decoder<'_, D>,
12719            offset: usize,
12720            _depth: fidl::encoding::Depth,
12721        ) -> fidl::Result<()> {
12722            decoder.debug_check_bounds::<Self>(offset);
12723            // Verify that padding bytes are zero.
12724            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
12725            let padval = unsafe { (ptr as *const u32).read_unaligned() };
12726            let mask = 0xffff0000u32;
12727            let maskedval = padval & mask;
12728            if maskedval != 0 {
12729                return Err(fidl::Error::NonZeroPadding {
12730                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
12731                });
12732            }
12733            fidl::decode!(Domain, D, &mut self.domain, decoder, offset + 0, _depth)?;
12734            fidl::decode!(StreamSocketProtocol, D, &mut self.proto, decoder, offset + 4, _depth)?;
12735            Ok(())
12736        }
12737    }
12738
12739    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpCongestionResponse {
12740        type Borrowed<'a> = &'a Self;
12741        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12742            value
12743        }
12744    }
12745
12746    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpCongestionResponse {
12747        type Owned = Self;
12748
12749        #[inline(always)]
12750        fn inline_align(_context: fidl::encoding::Context) -> usize {
12751            4
12752        }
12753
12754        #[inline(always)]
12755        fn inline_size(_context: fidl::encoding::Context) -> usize {
12756            4
12757        }
12758    }
12759
12760    unsafe impl<D: fidl::encoding::ResourceDialect>
12761        fidl::encoding::Encode<StreamSocketGetTcpCongestionResponse, D>
12762        for &StreamSocketGetTcpCongestionResponse
12763    {
12764        #[inline]
12765        unsafe fn encode(
12766            self,
12767            encoder: &mut fidl::encoding::Encoder<'_, D>,
12768            offset: usize,
12769            _depth: fidl::encoding::Depth,
12770        ) -> fidl::Result<()> {
12771            encoder.debug_check_bounds::<StreamSocketGetTcpCongestionResponse>(offset);
12772            // Delegate to tuple encoding.
12773            fidl::encoding::Encode::<StreamSocketGetTcpCongestionResponse, D>::encode(
12774                (<TcpCongestionControl as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12775                encoder,
12776                offset,
12777                _depth,
12778            )
12779        }
12780    }
12781    unsafe impl<
12782        D: fidl::encoding::ResourceDialect,
12783        T0: fidl::encoding::Encode<TcpCongestionControl, D>,
12784    > fidl::encoding::Encode<StreamSocketGetTcpCongestionResponse, D> for (T0,)
12785    {
12786        #[inline]
12787        unsafe fn encode(
12788            self,
12789            encoder: &mut fidl::encoding::Encoder<'_, D>,
12790            offset: usize,
12791            depth: fidl::encoding::Depth,
12792        ) -> fidl::Result<()> {
12793            encoder.debug_check_bounds::<StreamSocketGetTcpCongestionResponse>(offset);
12794            // Zero out padding regions. There's no need to apply masks
12795            // because the unmasked parts will be overwritten by fields.
12796            // Write the fields.
12797            self.0.encode(encoder, offset + 0, depth)?;
12798            Ok(())
12799        }
12800    }
12801
12802    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12803        for StreamSocketGetTcpCongestionResponse
12804    {
12805        #[inline(always)]
12806        fn new_empty() -> Self {
12807            Self { value: fidl::new_empty!(TcpCongestionControl, D) }
12808        }
12809
12810        #[inline]
12811        unsafe fn decode(
12812            &mut self,
12813            decoder: &mut fidl::encoding::Decoder<'_, D>,
12814            offset: usize,
12815            _depth: fidl::encoding::Depth,
12816        ) -> fidl::Result<()> {
12817            decoder.debug_check_bounds::<Self>(offset);
12818            // Verify that padding bytes are zero.
12819            fidl::decode!(TcpCongestionControl, D, &mut self.value, decoder, offset + 0, _depth)?;
12820            Ok(())
12821        }
12822    }
12823
12824    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpCorkResponse {
12825        type Borrowed<'a> = &'a Self;
12826        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12827            value
12828        }
12829    }
12830
12831    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpCorkResponse {
12832        type Owned = Self;
12833
12834        #[inline(always)]
12835        fn inline_align(_context: fidl::encoding::Context) -> usize {
12836            1
12837        }
12838
12839        #[inline(always)]
12840        fn inline_size(_context: fidl::encoding::Context) -> usize {
12841            1
12842        }
12843    }
12844
12845    unsafe impl<D: fidl::encoding::ResourceDialect>
12846        fidl::encoding::Encode<StreamSocketGetTcpCorkResponse, D>
12847        for &StreamSocketGetTcpCorkResponse
12848    {
12849        #[inline]
12850        unsafe fn encode(
12851            self,
12852            encoder: &mut fidl::encoding::Encoder<'_, D>,
12853            offset: usize,
12854            _depth: fidl::encoding::Depth,
12855        ) -> fidl::Result<()> {
12856            encoder.debug_check_bounds::<StreamSocketGetTcpCorkResponse>(offset);
12857            // Delegate to tuple encoding.
12858            fidl::encoding::Encode::<StreamSocketGetTcpCorkResponse, D>::encode(
12859                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
12860                encoder,
12861                offset,
12862                _depth,
12863            )
12864        }
12865    }
12866    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12867        fidl::encoding::Encode<StreamSocketGetTcpCorkResponse, D> for (T0,)
12868    {
12869        #[inline]
12870        unsafe fn encode(
12871            self,
12872            encoder: &mut fidl::encoding::Encoder<'_, D>,
12873            offset: usize,
12874            depth: fidl::encoding::Depth,
12875        ) -> fidl::Result<()> {
12876            encoder.debug_check_bounds::<StreamSocketGetTcpCorkResponse>(offset);
12877            // Zero out padding regions. There's no need to apply masks
12878            // because the unmasked parts will be overwritten by fields.
12879            // Write the fields.
12880            self.0.encode(encoder, offset + 0, depth)?;
12881            Ok(())
12882        }
12883    }
12884
12885    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12886        for StreamSocketGetTcpCorkResponse
12887    {
12888        #[inline(always)]
12889        fn new_empty() -> Self {
12890            Self { value: fidl::new_empty!(bool, D) }
12891        }
12892
12893        #[inline]
12894        unsafe fn decode(
12895            &mut self,
12896            decoder: &mut fidl::encoding::Decoder<'_, D>,
12897            offset: usize,
12898            _depth: fidl::encoding::Depth,
12899        ) -> fidl::Result<()> {
12900            decoder.debug_check_bounds::<Self>(offset);
12901            // Verify that padding bytes are zero.
12902            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
12903            Ok(())
12904        }
12905    }
12906
12907    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpDeferAcceptResponse {
12908        type Borrowed<'a> = &'a Self;
12909        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12910            value
12911        }
12912    }
12913
12914    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpDeferAcceptResponse {
12915        type Owned = Self;
12916
12917        #[inline(always)]
12918        fn inline_align(_context: fidl::encoding::Context) -> usize {
12919            4
12920        }
12921
12922        #[inline(always)]
12923        fn inline_size(_context: fidl::encoding::Context) -> usize {
12924            4
12925        }
12926        #[inline(always)]
12927        fn encode_is_copy() -> bool {
12928            true
12929        }
12930
12931        #[inline(always)]
12932        fn decode_is_copy() -> bool {
12933            true
12934        }
12935    }
12936
12937    unsafe impl<D: fidl::encoding::ResourceDialect>
12938        fidl::encoding::Encode<StreamSocketGetTcpDeferAcceptResponse, D>
12939        for &StreamSocketGetTcpDeferAcceptResponse
12940    {
12941        #[inline]
12942        unsafe fn encode(
12943            self,
12944            encoder: &mut fidl::encoding::Encoder<'_, D>,
12945            offset: usize,
12946            _depth: fidl::encoding::Depth,
12947        ) -> fidl::Result<()> {
12948            encoder.debug_check_bounds::<StreamSocketGetTcpDeferAcceptResponse>(offset);
12949            unsafe {
12950                // Copy the object into the buffer.
12951                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12952                (buf_ptr as *mut StreamSocketGetTcpDeferAcceptResponse)
12953                    .write_unaligned((self as *const StreamSocketGetTcpDeferAcceptResponse).read());
12954                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12955                // done second because the memcpy will write garbage to these bytes.
12956            }
12957            Ok(())
12958        }
12959    }
12960    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12961        fidl::encoding::Encode<StreamSocketGetTcpDeferAcceptResponse, D> for (T0,)
12962    {
12963        #[inline]
12964        unsafe fn encode(
12965            self,
12966            encoder: &mut fidl::encoding::Encoder<'_, D>,
12967            offset: usize,
12968            depth: fidl::encoding::Depth,
12969        ) -> fidl::Result<()> {
12970            encoder.debug_check_bounds::<StreamSocketGetTcpDeferAcceptResponse>(offset);
12971            // Zero out padding regions. There's no need to apply masks
12972            // because the unmasked parts will be overwritten by fields.
12973            // Write the fields.
12974            self.0.encode(encoder, offset + 0, depth)?;
12975            Ok(())
12976        }
12977    }
12978
12979    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12980        for StreamSocketGetTcpDeferAcceptResponse
12981    {
12982        #[inline(always)]
12983        fn new_empty() -> Self {
12984            Self { value_secs: fidl::new_empty!(u32, D) }
12985        }
12986
12987        #[inline]
12988        unsafe fn decode(
12989            &mut self,
12990            decoder: &mut fidl::encoding::Decoder<'_, D>,
12991            offset: usize,
12992            _depth: fidl::encoding::Depth,
12993        ) -> fidl::Result<()> {
12994            decoder.debug_check_bounds::<Self>(offset);
12995            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12996            // Verify that padding bytes are zero.
12997            // Copy from the buffer into the object.
12998            unsafe {
12999                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13000            }
13001            Ok(())
13002        }
13003    }
13004
13005    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpInfoResponse {
13006        type Borrowed<'a> = &'a Self;
13007        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13008            value
13009        }
13010    }
13011
13012    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpInfoResponse {
13013        type Owned = Self;
13014
13015        #[inline(always)]
13016        fn inline_align(_context: fidl::encoding::Context) -> usize {
13017            8
13018        }
13019
13020        #[inline(always)]
13021        fn inline_size(_context: fidl::encoding::Context) -> usize {
13022            16
13023        }
13024    }
13025
13026    unsafe impl<D: fidl::encoding::ResourceDialect>
13027        fidl::encoding::Encode<StreamSocketGetTcpInfoResponse, D>
13028        for &StreamSocketGetTcpInfoResponse
13029    {
13030        #[inline]
13031        unsafe fn encode(
13032            self,
13033            encoder: &mut fidl::encoding::Encoder<'_, D>,
13034            offset: usize,
13035            _depth: fidl::encoding::Depth,
13036        ) -> fidl::Result<()> {
13037            encoder.debug_check_bounds::<StreamSocketGetTcpInfoResponse>(offset);
13038            // Delegate to tuple encoding.
13039            fidl::encoding::Encode::<StreamSocketGetTcpInfoResponse, D>::encode(
13040                (<fidl_fuchsia_net_tcp_common::Info as fidl::encoding::ValueTypeMarker>::borrow(
13041                    &self.info,
13042                ),),
13043                encoder,
13044                offset,
13045                _depth,
13046            )
13047        }
13048    }
13049    unsafe impl<
13050        D: fidl::encoding::ResourceDialect,
13051        T0: fidl::encoding::Encode<fidl_fuchsia_net_tcp_common::Info, D>,
13052    > fidl::encoding::Encode<StreamSocketGetTcpInfoResponse, D> for (T0,)
13053    {
13054        #[inline]
13055        unsafe fn encode(
13056            self,
13057            encoder: &mut fidl::encoding::Encoder<'_, D>,
13058            offset: usize,
13059            depth: fidl::encoding::Depth,
13060        ) -> fidl::Result<()> {
13061            encoder.debug_check_bounds::<StreamSocketGetTcpInfoResponse>(offset);
13062            // Zero out padding regions. There's no need to apply masks
13063            // because the unmasked parts will be overwritten by fields.
13064            // Write the fields.
13065            self.0.encode(encoder, offset + 0, depth)?;
13066            Ok(())
13067        }
13068    }
13069
13070    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13071        for StreamSocketGetTcpInfoResponse
13072    {
13073        #[inline(always)]
13074        fn new_empty() -> Self {
13075            Self { info: fidl::new_empty!(fidl_fuchsia_net_tcp_common::Info, D) }
13076        }
13077
13078        #[inline]
13079        unsafe fn decode(
13080            &mut self,
13081            decoder: &mut fidl::encoding::Decoder<'_, D>,
13082            offset: usize,
13083            _depth: fidl::encoding::Depth,
13084        ) -> fidl::Result<()> {
13085            decoder.debug_check_bounds::<Self>(offset);
13086            // Verify that padding bytes are zero.
13087            fidl::decode!(
13088                fidl_fuchsia_net_tcp_common::Info,
13089                D,
13090                &mut self.info,
13091                decoder,
13092                offset + 0,
13093                _depth
13094            )?;
13095            Ok(())
13096        }
13097    }
13098
13099    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveCountResponse {
13100        type Borrowed<'a> = &'a Self;
13101        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13102            value
13103        }
13104    }
13105
13106    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveCountResponse {
13107        type Owned = Self;
13108
13109        #[inline(always)]
13110        fn inline_align(_context: fidl::encoding::Context) -> usize {
13111            4
13112        }
13113
13114        #[inline(always)]
13115        fn inline_size(_context: fidl::encoding::Context) -> usize {
13116            4
13117        }
13118        #[inline(always)]
13119        fn encode_is_copy() -> bool {
13120            true
13121        }
13122
13123        #[inline(always)]
13124        fn decode_is_copy() -> bool {
13125            true
13126        }
13127    }
13128
13129    unsafe impl<D: fidl::encoding::ResourceDialect>
13130        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveCountResponse, D>
13131        for &StreamSocketGetTcpKeepAliveCountResponse
13132    {
13133        #[inline]
13134        unsafe fn encode(
13135            self,
13136            encoder: &mut fidl::encoding::Encoder<'_, D>,
13137            offset: usize,
13138            _depth: fidl::encoding::Depth,
13139        ) -> fidl::Result<()> {
13140            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveCountResponse>(offset);
13141            unsafe {
13142                // Copy the object into the buffer.
13143                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13144                (buf_ptr as *mut StreamSocketGetTcpKeepAliveCountResponse).write_unaligned(
13145                    (self as *const StreamSocketGetTcpKeepAliveCountResponse).read(),
13146                );
13147                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13148                // done second because the memcpy will write garbage to these bytes.
13149            }
13150            Ok(())
13151        }
13152    }
13153    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13154        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveCountResponse, D> for (T0,)
13155    {
13156        #[inline]
13157        unsafe fn encode(
13158            self,
13159            encoder: &mut fidl::encoding::Encoder<'_, D>,
13160            offset: usize,
13161            depth: fidl::encoding::Depth,
13162        ) -> fidl::Result<()> {
13163            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveCountResponse>(offset);
13164            // Zero out padding regions. There's no need to apply masks
13165            // because the unmasked parts will be overwritten by fields.
13166            // Write the fields.
13167            self.0.encode(encoder, offset + 0, depth)?;
13168            Ok(())
13169        }
13170    }
13171
13172    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13173        for StreamSocketGetTcpKeepAliveCountResponse
13174    {
13175        #[inline(always)]
13176        fn new_empty() -> Self {
13177            Self { value: fidl::new_empty!(u32, D) }
13178        }
13179
13180        #[inline]
13181        unsafe fn decode(
13182            &mut self,
13183            decoder: &mut fidl::encoding::Decoder<'_, D>,
13184            offset: usize,
13185            _depth: fidl::encoding::Depth,
13186        ) -> fidl::Result<()> {
13187            decoder.debug_check_bounds::<Self>(offset);
13188            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13189            // Verify that padding bytes are zero.
13190            // Copy from the buffer into the object.
13191            unsafe {
13192                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13193            }
13194            Ok(())
13195        }
13196    }
13197
13198    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveIdleResponse {
13199        type Borrowed<'a> = &'a Self;
13200        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13201            value
13202        }
13203    }
13204
13205    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveIdleResponse {
13206        type Owned = Self;
13207
13208        #[inline(always)]
13209        fn inline_align(_context: fidl::encoding::Context) -> usize {
13210            4
13211        }
13212
13213        #[inline(always)]
13214        fn inline_size(_context: fidl::encoding::Context) -> usize {
13215            4
13216        }
13217        #[inline(always)]
13218        fn encode_is_copy() -> bool {
13219            true
13220        }
13221
13222        #[inline(always)]
13223        fn decode_is_copy() -> bool {
13224            true
13225        }
13226    }
13227
13228    unsafe impl<D: fidl::encoding::ResourceDialect>
13229        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIdleResponse, D>
13230        for &StreamSocketGetTcpKeepAliveIdleResponse
13231    {
13232        #[inline]
13233        unsafe fn encode(
13234            self,
13235            encoder: &mut fidl::encoding::Encoder<'_, D>,
13236            offset: usize,
13237            _depth: fidl::encoding::Depth,
13238        ) -> fidl::Result<()> {
13239            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIdleResponse>(offset);
13240            unsafe {
13241                // Copy the object into the buffer.
13242                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13243                (buf_ptr as *mut StreamSocketGetTcpKeepAliveIdleResponse).write_unaligned(
13244                    (self as *const StreamSocketGetTcpKeepAliveIdleResponse).read(),
13245                );
13246                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13247                // done second because the memcpy will write garbage to these bytes.
13248            }
13249            Ok(())
13250        }
13251    }
13252    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13253        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIdleResponse, D> for (T0,)
13254    {
13255        #[inline]
13256        unsafe fn encode(
13257            self,
13258            encoder: &mut fidl::encoding::Encoder<'_, D>,
13259            offset: usize,
13260            depth: fidl::encoding::Depth,
13261        ) -> fidl::Result<()> {
13262            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIdleResponse>(offset);
13263            // Zero out padding regions. There's no need to apply masks
13264            // because the unmasked parts will be overwritten by fields.
13265            // Write the fields.
13266            self.0.encode(encoder, offset + 0, depth)?;
13267            Ok(())
13268        }
13269    }
13270
13271    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13272        for StreamSocketGetTcpKeepAliveIdleResponse
13273    {
13274        #[inline(always)]
13275        fn new_empty() -> Self {
13276            Self { value_secs: fidl::new_empty!(u32, D) }
13277        }
13278
13279        #[inline]
13280        unsafe fn decode(
13281            &mut self,
13282            decoder: &mut fidl::encoding::Decoder<'_, D>,
13283            offset: usize,
13284            _depth: fidl::encoding::Depth,
13285        ) -> fidl::Result<()> {
13286            decoder.debug_check_bounds::<Self>(offset);
13287            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13288            // Verify that padding bytes are zero.
13289            // Copy from the buffer into the object.
13290            unsafe {
13291                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13292            }
13293            Ok(())
13294        }
13295    }
13296
13297    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpKeepAliveIntervalResponse {
13298        type Borrowed<'a> = &'a Self;
13299        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13300            value
13301        }
13302    }
13303
13304    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpKeepAliveIntervalResponse {
13305        type Owned = Self;
13306
13307        #[inline(always)]
13308        fn inline_align(_context: fidl::encoding::Context) -> usize {
13309            4
13310        }
13311
13312        #[inline(always)]
13313        fn inline_size(_context: fidl::encoding::Context) -> usize {
13314            4
13315        }
13316        #[inline(always)]
13317        fn encode_is_copy() -> bool {
13318            true
13319        }
13320
13321        #[inline(always)]
13322        fn decode_is_copy() -> bool {
13323            true
13324        }
13325    }
13326
13327    unsafe impl<D: fidl::encoding::ResourceDialect>
13328        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIntervalResponse, D>
13329        for &StreamSocketGetTcpKeepAliveIntervalResponse
13330    {
13331        #[inline]
13332        unsafe fn encode(
13333            self,
13334            encoder: &mut fidl::encoding::Encoder<'_, D>,
13335            offset: usize,
13336            _depth: fidl::encoding::Depth,
13337        ) -> fidl::Result<()> {
13338            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIntervalResponse>(offset);
13339            unsafe {
13340                // Copy the object into the buffer.
13341                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13342                (buf_ptr as *mut StreamSocketGetTcpKeepAliveIntervalResponse).write_unaligned(
13343                    (self as *const StreamSocketGetTcpKeepAliveIntervalResponse).read(),
13344                );
13345                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13346                // done second because the memcpy will write garbage to these bytes.
13347            }
13348            Ok(())
13349        }
13350    }
13351    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13352        fidl::encoding::Encode<StreamSocketGetTcpKeepAliveIntervalResponse, D> for (T0,)
13353    {
13354        #[inline]
13355        unsafe fn encode(
13356            self,
13357            encoder: &mut fidl::encoding::Encoder<'_, D>,
13358            offset: usize,
13359            depth: fidl::encoding::Depth,
13360        ) -> fidl::Result<()> {
13361            encoder.debug_check_bounds::<StreamSocketGetTcpKeepAliveIntervalResponse>(offset);
13362            // Zero out padding regions. There's no need to apply masks
13363            // because the unmasked parts will be overwritten by fields.
13364            // Write the fields.
13365            self.0.encode(encoder, offset + 0, depth)?;
13366            Ok(())
13367        }
13368    }
13369
13370    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13371        for StreamSocketGetTcpKeepAliveIntervalResponse
13372    {
13373        #[inline(always)]
13374        fn new_empty() -> Self {
13375            Self { value_secs: fidl::new_empty!(u32, D) }
13376        }
13377
13378        #[inline]
13379        unsafe fn decode(
13380            &mut self,
13381            decoder: &mut fidl::encoding::Decoder<'_, D>,
13382            offset: usize,
13383            _depth: fidl::encoding::Depth,
13384        ) -> fidl::Result<()> {
13385            decoder.debug_check_bounds::<Self>(offset);
13386            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13387            // Verify that padding bytes are zero.
13388            // Copy from the buffer into the object.
13389            unsafe {
13390                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13391            }
13392            Ok(())
13393        }
13394    }
13395
13396    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpLingerResponse {
13397        type Borrowed<'a> = &'a Self;
13398        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13399            value
13400        }
13401    }
13402
13403    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpLingerResponse {
13404        type Owned = Self;
13405
13406        #[inline(always)]
13407        fn inline_align(_context: fidl::encoding::Context) -> usize {
13408            8
13409        }
13410
13411        #[inline(always)]
13412        fn inline_size(_context: fidl::encoding::Context) -> usize {
13413            16
13414        }
13415    }
13416
13417    unsafe impl<D: fidl::encoding::ResourceDialect>
13418        fidl::encoding::Encode<StreamSocketGetTcpLingerResponse, D>
13419        for &StreamSocketGetTcpLingerResponse
13420    {
13421        #[inline]
13422        unsafe fn encode(
13423            self,
13424            encoder: &mut fidl::encoding::Encoder<'_, D>,
13425            offset: usize,
13426            _depth: fidl::encoding::Depth,
13427        ) -> fidl::Result<()> {
13428            encoder.debug_check_bounds::<StreamSocketGetTcpLingerResponse>(offset);
13429            // Delegate to tuple encoding.
13430            fidl::encoding::Encode::<StreamSocketGetTcpLingerResponse, D>::encode(
13431                (<OptionalUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value_secs),),
13432                encoder,
13433                offset,
13434                _depth,
13435            )
13436        }
13437    }
13438    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionalUint32, D>>
13439        fidl::encoding::Encode<StreamSocketGetTcpLingerResponse, D> for (T0,)
13440    {
13441        #[inline]
13442        unsafe fn encode(
13443            self,
13444            encoder: &mut fidl::encoding::Encoder<'_, D>,
13445            offset: usize,
13446            depth: fidl::encoding::Depth,
13447        ) -> fidl::Result<()> {
13448            encoder.debug_check_bounds::<StreamSocketGetTcpLingerResponse>(offset);
13449            // Zero out padding regions. There's no need to apply masks
13450            // because the unmasked parts will be overwritten by fields.
13451            // Write the fields.
13452            self.0.encode(encoder, offset + 0, depth)?;
13453            Ok(())
13454        }
13455    }
13456
13457    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13458        for StreamSocketGetTcpLingerResponse
13459    {
13460        #[inline(always)]
13461        fn new_empty() -> Self {
13462            Self { value_secs: fidl::new_empty!(OptionalUint32, D) }
13463        }
13464
13465        #[inline]
13466        unsafe fn decode(
13467            &mut self,
13468            decoder: &mut fidl::encoding::Decoder<'_, D>,
13469            offset: usize,
13470            _depth: fidl::encoding::Depth,
13471        ) -> fidl::Result<()> {
13472            decoder.debug_check_bounds::<Self>(offset);
13473            // Verify that padding bytes are zero.
13474            fidl::decode!(OptionalUint32, D, &mut self.value_secs, decoder, offset + 0, _depth)?;
13475            Ok(())
13476        }
13477    }
13478
13479    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpMaxSegmentResponse {
13480        type Borrowed<'a> = &'a Self;
13481        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13482            value
13483        }
13484    }
13485
13486    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpMaxSegmentResponse {
13487        type Owned = Self;
13488
13489        #[inline(always)]
13490        fn inline_align(_context: fidl::encoding::Context) -> usize {
13491            4
13492        }
13493
13494        #[inline(always)]
13495        fn inline_size(_context: fidl::encoding::Context) -> usize {
13496            4
13497        }
13498        #[inline(always)]
13499        fn encode_is_copy() -> bool {
13500            true
13501        }
13502
13503        #[inline(always)]
13504        fn decode_is_copy() -> bool {
13505            true
13506        }
13507    }
13508
13509    unsafe impl<D: fidl::encoding::ResourceDialect>
13510        fidl::encoding::Encode<StreamSocketGetTcpMaxSegmentResponse, D>
13511        for &StreamSocketGetTcpMaxSegmentResponse
13512    {
13513        #[inline]
13514        unsafe fn encode(
13515            self,
13516            encoder: &mut fidl::encoding::Encoder<'_, D>,
13517            offset: usize,
13518            _depth: fidl::encoding::Depth,
13519        ) -> fidl::Result<()> {
13520            encoder.debug_check_bounds::<StreamSocketGetTcpMaxSegmentResponse>(offset);
13521            unsafe {
13522                // Copy the object into the buffer.
13523                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13524                (buf_ptr as *mut StreamSocketGetTcpMaxSegmentResponse)
13525                    .write_unaligned((self as *const StreamSocketGetTcpMaxSegmentResponse).read());
13526                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13527                // done second because the memcpy will write garbage to these bytes.
13528            }
13529            Ok(())
13530        }
13531    }
13532    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13533        fidl::encoding::Encode<StreamSocketGetTcpMaxSegmentResponse, D> for (T0,)
13534    {
13535        #[inline]
13536        unsafe fn encode(
13537            self,
13538            encoder: &mut fidl::encoding::Encoder<'_, D>,
13539            offset: usize,
13540            depth: fidl::encoding::Depth,
13541        ) -> fidl::Result<()> {
13542            encoder.debug_check_bounds::<StreamSocketGetTcpMaxSegmentResponse>(offset);
13543            // Zero out padding regions. There's no need to apply masks
13544            // because the unmasked parts will be overwritten by fields.
13545            // Write the fields.
13546            self.0.encode(encoder, offset + 0, depth)?;
13547            Ok(())
13548        }
13549    }
13550
13551    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13552        for StreamSocketGetTcpMaxSegmentResponse
13553    {
13554        #[inline(always)]
13555        fn new_empty() -> Self {
13556            Self { value_bytes: fidl::new_empty!(u32, D) }
13557        }
13558
13559        #[inline]
13560        unsafe fn decode(
13561            &mut self,
13562            decoder: &mut fidl::encoding::Decoder<'_, D>,
13563            offset: usize,
13564            _depth: fidl::encoding::Depth,
13565        ) -> fidl::Result<()> {
13566            decoder.debug_check_bounds::<Self>(offset);
13567            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13568            // Verify that padding bytes are zero.
13569            // Copy from the buffer into the object.
13570            unsafe {
13571                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13572            }
13573            Ok(())
13574        }
13575    }
13576
13577    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpNoDelayResponse {
13578        type Borrowed<'a> = &'a Self;
13579        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13580            value
13581        }
13582    }
13583
13584    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpNoDelayResponse {
13585        type Owned = Self;
13586
13587        #[inline(always)]
13588        fn inline_align(_context: fidl::encoding::Context) -> usize {
13589            1
13590        }
13591
13592        #[inline(always)]
13593        fn inline_size(_context: fidl::encoding::Context) -> usize {
13594            1
13595        }
13596    }
13597
13598    unsafe impl<D: fidl::encoding::ResourceDialect>
13599        fidl::encoding::Encode<StreamSocketGetTcpNoDelayResponse, D>
13600        for &StreamSocketGetTcpNoDelayResponse
13601    {
13602        #[inline]
13603        unsafe fn encode(
13604            self,
13605            encoder: &mut fidl::encoding::Encoder<'_, D>,
13606            offset: usize,
13607            _depth: fidl::encoding::Depth,
13608        ) -> fidl::Result<()> {
13609            encoder.debug_check_bounds::<StreamSocketGetTcpNoDelayResponse>(offset);
13610            // Delegate to tuple encoding.
13611            fidl::encoding::Encode::<StreamSocketGetTcpNoDelayResponse, D>::encode(
13612                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
13613                encoder,
13614                offset,
13615                _depth,
13616            )
13617        }
13618    }
13619    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
13620        fidl::encoding::Encode<StreamSocketGetTcpNoDelayResponse, D> for (T0,)
13621    {
13622        #[inline]
13623        unsafe fn encode(
13624            self,
13625            encoder: &mut fidl::encoding::Encoder<'_, D>,
13626            offset: usize,
13627            depth: fidl::encoding::Depth,
13628        ) -> fidl::Result<()> {
13629            encoder.debug_check_bounds::<StreamSocketGetTcpNoDelayResponse>(offset);
13630            // Zero out padding regions. There's no need to apply masks
13631            // because the unmasked parts will be overwritten by fields.
13632            // Write the fields.
13633            self.0.encode(encoder, offset + 0, depth)?;
13634            Ok(())
13635        }
13636    }
13637
13638    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13639        for StreamSocketGetTcpNoDelayResponse
13640    {
13641        #[inline(always)]
13642        fn new_empty() -> Self {
13643            Self { value: fidl::new_empty!(bool, D) }
13644        }
13645
13646        #[inline]
13647        unsafe fn decode(
13648            &mut self,
13649            decoder: &mut fidl::encoding::Decoder<'_, D>,
13650            offset: usize,
13651            _depth: fidl::encoding::Depth,
13652        ) -> fidl::Result<()> {
13653            decoder.debug_check_bounds::<Self>(offset);
13654            // Verify that padding bytes are zero.
13655            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13656            Ok(())
13657        }
13658    }
13659
13660    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpQuickAckResponse {
13661        type Borrowed<'a> = &'a Self;
13662        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13663            value
13664        }
13665    }
13666
13667    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpQuickAckResponse {
13668        type Owned = Self;
13669
13670        #[inline(always)]
13671        fn inline_align(_context: fidl::encoding::Context) -> usize {
13672            1
13673        }
13674
13675        #[inline(always)]
13676        fn inline_size(_context: fidl::encoding::Context) -> usize {
13677            1
13678        }
13679    }
13680
13681    unsafe impl<D: fidl::encoding::ResourceDialect>
13682        fidl::encoding::Encode<StreamSocketGetTcpQuickAckResponse, D>
13683        for &StreamSocketGetTcpQuickAckResponse
13684    {
13685        #[inline]
13686        unsafe fn encode(
13687            self,
13688            encoder: &mut fidl::encoding::Encoder<'_, D>,
13689            offset: usize,
13690            _depth: fidl::encoding::Depth,
13691        ) -> fidl::Result<()> {
13692            encoder.debug_check_bounds::<StreamSocketGetTcpQuickAckResponse>(offset);
13693            // Delegate to tuple encoding.
13694            fidl::encoding::Encode::<StreamSocketGetTcpQuickAckResponse, D>::encode(
13695                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
13696                encoder,
13697                offset,
13698                _depth,
13699            )
13700        }
13701    }
13702    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
13703        fidl::encoding::Encode<StreamSocketGetTcpQuickAckResponse, D> for (T0,)
13704    {
13705        #[inline]
13706        unsafe fn encode(
13707            self,
13708            encoder: &mut fidl::encoding::Encoder<'_, D>,
13709            offset: usize,
13710            depth: fidl::encoding::Depth,
13711        ) -> fidl::Result<()> {
13712            encoder.debug_check_bounds::<StreamSocketGetTcpQuickAckResponse>(offset);
13713            // Zero out padding regions. There's no need to apply masks
13714            // because the unmasked parts will be overwritten by fields.
13715            // Write the fields.
13716            self.0.encode(encoder, offset + 0, depth)?;
13717            Ok(())
13718        }
13719    }
13720
13721    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13722        for StreamSocketGetTcpQuickAckResponse
13723    {
13724        #[inline(always)]
13725        fn new_empty() -> Self {
13726            Self { value: fidl::new_empty!(bool, D) }
13727        }
13728
13729        #[inline]
13730        unsafe fn decode(
13731            &mut self,
13732            decoder: &mut fidl::encoding::Decoder<'_, D>,
13733            offset: usize,
13734            _depth: fidl::encoding::Depth,
13735        ) -> fidl::Result<()> {
13736            decoder.debug_check_bounds::<Self>(offset);
13737            // Verify that padding bytes are zero.
13738            fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
13739            Ok(())
13740        }
13741    }
13742
13743    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpSynCountResponse {
13744        type Borrowed<'a> = &'a Self;
13745        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13746            value
13747        }
13748    }
13749
13750    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpSynCountResponse {
13751        type Owned = Self;
13752
13753        #[inline(always)]
13754        fn inline_align(_context: fidl::encoding::Context) -> usize {
13755            4
13756        }
13757
13758        #[inline(always)]
13759        fn inline_size(_context: fidl::encoding::Context) -> usize {
13760            4
13761        }
13762        #[inline(always)]
13763        fn encode_is_copy() -> bool {
13764            true
13765        }
13766
13767        #[inline(always)]
13768        fn decode_is_copy() -> bool {
13769            true
13770        }
13771    }
13772
13773    unsafe impl<D: fidl::encoding::ResourceDialect>
13774        fidl::encoding::Encode<StreamSocketGetTcpSynCountResponse, D>
13775        for &StreamSocketGetTcpSynCountResponse
13776    {
13777        #[inline]
13778        unsafe fn encode(
13779            self,
13780            encoder: &mut fidl::encoding::Encoder<'_, D>,
13781            offset: usize,
13782            _depth: fidl::encoding::Depth,
13783        ) -> fidl::Result<()> {
13784            encoder.debug_check_bounds::<StreamSocketGetTcpSynCountResponse>(offset);
13785            unsafe {
13786                // Copy the object into the buffer.
13787                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13788                (buf_ptr as *mut StreamSocketGetTcpSynCountResponse)
13789                    .write_unaligned((self as *const StreamSocketGetTcpSynCountResponse).read());
13790                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13791                // done second because the memcpy will write garbage to these bytes.
13792            }
13793            Ok(())
13794        }
13795    }
13796    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13797        fidl::encoding::Encode<StreamSocketGetTcpSynCountResponse, D> for (T0,)
13798    {
13799        #[inline]
13800        unsafe fn encode(
13801            self,
13802            encoder: &mut fidl::encoding::Encoder<'_, D>,
13803            offset: usize,
13804            depth: fidl::encoding::Depth,
13805        ) -> fidl::Result<()> {
13806            encoder.debug_check_bounds::<StreamSocketGetTcpSynCountResponse>(offset);
13807            // Zero out padding regions. There's no need to apply masks
13808            // because the unmasked parts will be overwritten by fields.
13809            // Write the fields.
13810            self.0.encode(encoder, offset + 0, depth)?;
13811            Ok(())
13812        }
13813    }
13814
13815    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13816        for StreamSocketGetTcpSynCountResponse
13817    {
13818        #[inline(always)]
13819        fn new_empty() -> Self {
13820            Self { value: fidl::new_empty!(u32, D) }
13821        }
13822
13823        #[inline]
13824        unsafe fn decode(
13825            &mut self,
13826            decoder: &mut fidl::encoding::Decoder<'_, D>,
13827            offset: usize,
13828            _depth: fidl::encoding::Depth,
13829        ) -> fidl::Result<()> {
13830            decoder.debug_check_bounds::<Self>(offset);
13831            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13832            // Verify that padding bytes are zero.
13833            // Copy from the buffer into the object.
13834            unsafe {
13835                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13836            }
13837            Ok(())
13838        }
13839    }
13840
13841    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpUserTimeoutResponse {
13842        type Borrowed<'a> = &'a Self;
13843        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13844            value
13845        }
13846    }
13847
13848    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpUserTimeoutResponse {
13849        type Owned = Self;
13850
13851        #[inline(always)]
13852        fn inline_align(_context: fidl::encoding::Context) -> usize {
13853            4
13854        }
13855
13856        #[inline(always)]
13857        fn inline_size(_context: fidl::encoding::Context) -> usize {
13858            4
13859        }
13860        #[inline(always)]
13861        fn encode_is_copy() -> bool {
13862            true
13863        }
13864
13865        #[inline(always)]
13866        fn decode_is_copy() -> bool {
13867            true
13868        }
13869    }
13870
13871    unsafe impl<D: fidl::encoding::ResourceDialect>
13872        fidl::encoding::Encode<StreamSocketGetTcpUserTimeoutResponse, D>
13873        for &StreamSocketGetTcpUserTimeoutResponse
13874    {
13875        #[inline]
13876        unsafe fn encode(
13877            self,
13878            encoder: &mut fidl::encoding::Encoder<'_, D>,
13879            offset: usize,
13880            _depth: fidl::encoding::Depth,
13881        ) -> fidl::Result<()> {
13882            encoder.debug_check_bounds::<StreamSocketGetTcpUserTimeoutResponse>(offset);
13883            unsafe {
13884                // Copy the object into the buffer.
13885                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13886                (buf_ptr as *mut StreamSocketGetTcpUserTimeoutResponse)
13887                    .write_unaligned((self as *const StreamSocketGetTcpUserTimeoutResponse).read());
13888                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13889                // done second because the memcpy will write garbage to these bytes.
13890            }
13891            Ok(())
13892        }
13893    }
13894    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13895        fidl::encoding::Encode<StreamSocketGetTcpUserTimeoutResponse, D> for (T0,)
13896    {
13897        #[inline]
13898        unsafe fn encode(
13899            self,
13900            encoder: &mut fidl::encoding::Encoder<'_, D>,
13901            offset: usize,
13902            depth: fidl::encoding::Depth,
13903        ) -> fidl::Result<()> {
13904            encoder.debug_check_bounds::<StreamSocketGetTcpUserTimeoutResponse>(offset);
13905            // Zero out padding regions. There's no need to apply masks
13906            // because the unmasked parts will be overwritten by fields.
13907            // Write the fields.
13908            self.0.encode(encoder, offset + 0, depth)?;
13909            Ok(())
13910        }
13911    }
13912
13913    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13914        for StreamSocketGetTcpUserTimeoutResponse
13915    {
13916        #[inline(always)]
13917        fn new_empty() -> Self {
13918            Self { value_millis: fidl::new_empty!(u32, D) }
13919        }
13920
13921        #[inline]
13922        unsafe fn decode(
13923            &mut self,
13924            decoder: &mut fidl::encoding::Decoder<'_, D>,
13925            offset: usize,
13926            _depth: fidl::encoding::Depth,
13927        ) -> fidl::Result<()> {
13928            decoder.debug_check_bounds::<Self>(offset);
13929            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13930            // Verify that padding bytes are zero.
13931            // Copy from the buffer into the object.
13932            unsafe {
13933                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13934            }
13935            Ok(())
13936        }
13937    }
13938
13939    impl fidl::encoding::ValueTypeMarker for StreamSocketGetTcpWindowClampResponse {
13940        type Borrowed<'a> = &'a Self;
13941        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13942            value
13943        }
13944    }
13945
13946    unsafe impl fidl::encoding::TypeMarker for StreamSocketGetTcpWindowClampResponse {
13947        type Owned = Self;
13948
13949        #[inline(always)]
13950        fn inline_align(_context: fidl::encoding::Context) -> usize {
13951            4
13952        }
13953
13954        #[inline(always)]
13955        fn inline_size(_context: fidl::encoding::Context) -> usize {
13956            4
13957        }
13958        #[inline(always)]
13959        fn encode_is_copy() -> bool {
13960            true
13961        }
13962
13963        #[inline(always)]
13964        fn decode_is_copy() -> bool {
13965            true
13966        }
13967    }
13968
13969    unsafe impl<D: fidl::encoding::ResourceDialect>
13970        fidl::encoding::Encode<StreamSocketGetTcpWindowClampResponse, D>
13971        for &StreamSocketGetTcpWindowClampResponse
13972    {
13973        #[inline]
13974        unsafe fn encode(
13975            self,
13976            encoder: &mut fidl::encoding::Encoder<'_, D>,
13977            offset: usize,
13978            _depth: fidl::encoding::Depth,
13979        ) -> fidl::Result<()> {
13980            encoder.debug_check_bounds::<StreamSocketGetTcpWindowClampResponse>(offset);
13981            unsafe {
13982                // Copy the object into the buffer.
13983                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13984                (buf_ptr as *mut StreamSocketGetTcpWindowClampResponse)
13985                    .write_unaligned((self as *const StreamSocketGetTcpWindowClampResponse).read());
13986                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13987                // done second because the memcpy will write garbage to these bytes.
13988            }
13989            Ok(())
13990        }
13991    }
13992    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13993        fidl::encoding::Encode<StreamSocketGetTcpWindowClampResponse, D> for (T0,)
13994    {
13995        #[inline]
13996        unsafe fn encode(
13997            self,
13998            encoder: &mut fidl::encoding::Encoder<'_, D>,
13999            offset: usize,
14000            depth: fidl::encoding::Depth,
14001        ) -> fidl::Result<()> {
14002            encoder.debug_check_bounds::<StreamSocketGetTcpWindowClampResponse>(offset);
14003            // Zero out padding regions. There's no need to apply masks
14004            // because the unmasked parts will be overwritten by fields.
14005            // Write the fields.
14006            self.0.encode(encoder, offset + 0, depth)?;
14007            Ok(())
14008        }
14009    }
14010
14011    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14012        for StreamSocketGetTcpWindowClampResponse
14013    {
14014        #[inline(always)]
14015        fn new_empty() -> Self {
14016            Self { value: fidl::new_empty!(u32, D) }
14017        }
14018
14019        #[inline]
14020        unsafe fn decode(
14021            &mut self,
14022            decoder: &mut fidl::encoding::Decoder<'_, D>,
14023            offset: usize,
14024            _depth: fidl::encoding::Depth,
14025        ) -> fidl::Result<()> {
14026            decoder.debug_check_bounds::<Self>(offset);
14027            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14028            // Verify that padding bytes are zero.
14029            // Copy from the buffer into the object.
14030            unsafe {
14031                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14032            }
14033            Ok(())
14034        }
14035    }
14036
14037    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketRecvMsgRequest {
14038        type Borrowed<'a> = &'a Self;
14039        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14040            value
14041        }
14042    }
14043
14044    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketRecvMsgRequest {
14045        type Owned = Self;
14046
14047        #[inline(always)]
14048        fn inline_align(_context: fidl::encoding::Context) -> usize {
14049            4
14050        }
14051
14052        #[inline(always)]
14053        fn inline_size(_context: fidl::encoding::Context) -> usize {
14054            12
14055        }
14056    }
14057
14058    unsafe impl<D: fidl::encoding::ResourceDialect>
14059        fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgRequest, D>
14060        for &SynchronousDatagramSocketRecvMsgRequest
14061    {
14062        #[inline]
14063        unsafe fn encode(
14064            self,
14065            encoder: &mut fidl::encoding::Encoder<'_, D>,
14066            offset: usize,
14067            _depth: fidl::encoding::Depth,
14068        ) -> fidl::Result<()> {
14069            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgRequest>(offset);
14070            // Delegate to tuple encoding.
14071            fidl::encoding::Encode::<SynchronousDatagramSocketRecvMsgRequest, D>::encode(
14072                (
14073                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_addr),
14074                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data_len),
14075                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.want_control),
14076                    <RecvMsgFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
14077                ),
14078                encoder,
14079                offset,
14080                _depth,
14081            )
14082        }
14083    }
14084    unsafe impl<
14085        D: fidl::encoding::ResourceDialect,
14086        T0: fidl::encoding::Encode<bool, D>,
14087        T1: fidl::encoding::Encode<u32, D>,
14088        T2: fidl::encoding::Encode<bool, D>,
14089        T3: fidl::encoding::Encode<RecvMsgFlags, D>,
14090    > fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgRequest, D> for (T0, T1, T2, T3)
14091    {
14092        #[inline]
14093        unsafe fn encode(
14094            self,
14095            encoder: &mut fidl::encoding::Encoder<'_, D>,
14096            offset: usize,
14097            depth: fidl::encoding::Depth,
14098        ) -> fidl::Result<()> {
14099            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgRequest>(offset);
14100            // Zero out padding regions. There's no need to apply masks
14101            // because the unmasked parts will be overwritten by fields.
14102            unsafe {
14103                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
14104                (ptr as *mut u32).write_unaligned(0);
14105            }
14106            unsafe {
14107                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
14108                (ptr as *mut u32).write_unaligned(0);
14109            }
14110            // Write the fields.
14111            self.0.encode(encoder, offset + 0, depth)?;
14112            self.1.encode(encoder, offset + 4, depth)?;
14113            self.2.encode(encoder, offset + 8, depth)?;
14114            self.3.encode(encoder, offset + 10, depth)?;
14115            Ok(())
14116        }
14117    }
14118
14119    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14120        for SynchronousDatagramSocketRecvMsgRequest
14121    {
14122        #[inline(always)]
14123        fn new_empty() -> Self {
14124            Self {
14125                want_addr: fidl::new_empty!(bool, D),
14126                data_len: fidl::new_empty!(u32, D),
14127                want_control: fidl::new_empty!(bool, D),
14128                flags: fidl::new_empty!(RecvMsgFlags, D),
14129            }
14130        }
14131
14132        #[inline]
14133        unsafe fn decode(
14134            &mut self,
14135            decoder: &mut fidl::encoding::Decoder<'_, D>,
14136            offset: usize,
14137            _depth: fidl::encoding::Depth,
14138        ) -> fidl::Result<()> {
14139            decoder.debug_check_bounds::<Self>(offset);
14140            // Verify that padding bytes are zero.
14141            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
14142            let padval = unsafe { (ptr as *const u32).read_unaligned() };
14143            let mask = 0xffffff00u32;
14144            let maskedval = padval & mask;
14145            if maskedval != 0 {
14146                return Err(fidl::Error::NonZeroPadding {
14147                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
14148                });
14149            }
14150            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
14151            let padval = unsafe { (ptr as *const u32).read_unaligned() };
14152            let mask = 0xff00u32;
14153            let maskedval = padval & mask;
14154            if maskedval != 0 {
14155                return Err(fidl::Error::NonZeroPadding {
14156                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
14157                });
14158            }
14159            fidl::decode!(bool, D, &mut self.want_addr, decoder, offset + 0, _depth)?;
14160            fidl::decode!(u32, D, &mut self.data_len, decoder, offset + 4, _depth)?;
14161            fidl::decode!(bool, D, &mut self.want_control, decoder, offset + 8, _depth)?;
14162            fidl::decode!(RecvMsgFlags, D, &mut self.flags, decoder, offset + 10, _depth)?;
14163            Ok(())
14164        }
14165    }
14166
14167    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketSendMsgRequest {
14168        type Borrowed<'a> = &'a Self;
14169        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14170            value
14171        }
14172    }
14173
14174    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketSendMsgRequest {
14175        type Owned = Self;
14176
14177        #[inline(always)]
14178        fn inline_align(_context: fidl::encoding::Context) -> usize {
14179            8
14180        }
14181
14182        #[inline(always)]
14183        fn inline_size(_context: fidl::encoding::Context) -> usize {
14184            56
14185        }
14186    }
14187
14188    unsafe impl<D: fidl::encoding::ResourceDialect>
14189        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgRequest, D>
14190        for &SynchronousDatagramSocketSendMsgRequest
14191    {
14192        #[inline]
14193        unsafe fn encode(
14194            self,
14195            encoder: &mut fidl::encoding::Encoder<'_, D>,
14196            offset: usize,
14197            _depth: fidl::encoding::Depth,
14198        ) -> fidl::Result<()> {
14199            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgRequest>(offset);
14200            // Delegate to tuple encoding.
14201            fidl::encoding::Encode::<SynchronousDatagramSocketSendMsgRequest, D>::encode(
14202                (
14203                    <fidl::encoding::OptionalUnion<fidl_fuchsia_net_common::SocketAddress> as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
14204                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
14205                    <DatagramSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow(&self.control),
14206                    <SendMsgFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
14207                ),
14208                encoder, offset, _depth
14209            )
14210        }
14211    }
14212    unsafe impl<
14213        D: fidl::encoding::ResourceDialect,
14214        T0: fidl::encoding::Encode<
14215                fidl::encoding::OptionalUnion<fidl_fuchsia_net_common::SocketAddress>,
14216                D,
14217            >,
14218        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
14219        T2: fidl::encoding::Encode<DatagramSocketSendControlData, D>,
14220        T3: fidl::encoding::Encode<SendMsgFlags, D>,
14221    > fidl::encoding::Encode<SynchronousDatagramSocketSendMsgRequest, D> for (T0, T1, T2, T3)
14222    {
14223        #[inline]
14224        unsafe fn encode(
14225            self,
14226            encoder: &mut fidl::encoding::Encoder<'_, D>,
14227            offset: usize,
14228            depth: fidl::encoding::Depth,
14229        ) -> fidl::Result<()> {
14230            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgRequest>(offset);
14231            // Zero out padding regions. There's no need to apply masks
14232            // because the unmasked parts will be overwritten by fields.
14233            unsafe {
14234                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
14235                (ptr as *mut u64).write_unaligned(0);
14236            }
14237            // Write the fields.
14238            self.0.encode(encoder, offset + 0, depth)?;
14239            self.1.encode(encoder, offset + 16, depth)?;
14240            self.2.encode(encoder, offset + 32, depth)?;
14241            self.3.encode(encoder, offset + 48, depth)?;
14242            Ok(())
14243        }
14244    }
14245
14246    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14247        for SynchronousDatagramSocketSendMsgRequest
14248    {
14249        #[inline(always)]
14250        fn new_empty() -> Self {
14251            Self {
14252                addr: fidl::new_empty!(
14253                    fidl::encoding::OptionalUnion<fidl_fuchsia_net_common::SocketAddress>,
14254                    D
14255                ),
14256                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
14257                control: fidl::new_empty!(DatagramSocketSendControlData, D),
14258                flags: fidl::new_empty!(SendMsgFlags, D),
14259            }
14260        }
14261
14262        #[inline]
14263        unsafe fn decode(
14264            &mut self,
14265            decoder: &mut fidl::encoding::Decoder<'_, D>,
14266            offset: usize,
14267            _depth: fidl::encoding::Depth,
14268        ) -> fidl::Result<()> {
14269            decoder.debug_check_bounds::<Self>(offset);
14270            // Verify that padding bytes are zero.
14271            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
14272            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14273            let mask = 0xffffffffffff0000u64;
14274            let maskedval = padval & mask;
14275            if maskedval != 0 {
14276                return Err(fidl::Error::NonZeroPadding {
14277                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
14278                });
14279            }
14280            fidl::decode!(
14281                fidl::encoding::OptionalUnion<fidl_fuchsia_net_common::SocketAddress>,
14282                D,
14283                &mut self.addr,
14284                decoder,
14285                offset + 0,
14286                _depth
14287            )?;
14288            fidl::decode!(
14289                fidl::encoding::UnboundedVector<u8>,
14290                D,
14291                &mut self.data,
14292                decoder,
14293                offset + 16,
14294                _depth
14295            )?;
14296            fidl::decode!(
14297                DatagramSocketSendControlData,
14298                D,
14299                &mut self.control,
14300                decoder,
14301                offset + 32,
14302                _depth
14303            )?;
14304            fidl::decode!(SendMsgFlags, D, &mut self.flags, decoder, offset + 48, _depth)?;
14305            Ok(())
14306        }
14307    }
14308
14309    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketRecvMsgResponse {
14310        type Borrowed<'a> = &'a Self;
14311        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14312            value
14313        }
14314    }
14315
14316    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketRecvMsgResponse {
14317        type Owned = Self;
14318
14319        #[inline(always)]
14320        fn inline_align(_context: fidl::encoding::Context) -> usize {
14321            8
14322        }
14323
14324        #[inline(always)]
14325        fn inline_size(_context: fidl::encoding::Context) -> usize {
14326            56
14327        }
14328    }
14329
14330    unsafe impl<D: fidl::encoding::ResourceDialect>
14331        fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgResponse, D>
14332        for &SynchronousDatagramSocketRecvMsgResponse
14333    {
14334        #[inline]
14335        unsafe fn encode(
14336            self,
14337            encoder: &mut fidl::encoding::Encoder<'_, D>,
14338            offset: usize,
14339            _depth: fidl::encoding::Depth,
14340        ) -> fidl::Result<()> {
14341            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgResponse>(offset);
14342            // Delegate to tuple encoding.
14343            fidl::encoding::Encode::<SynchronousDatagramSocketRecvMsgResponse, D>::encode(
14344                (
14345                    <fidl::encoding::OptionalUnion<fidl_fuchsia_net_common::SocketAddress> as fidl::encoding::ValueTypeMarker>::borrow(&self.addr),
14346                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
14347                    <DatagramSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow(&self.control),
14348                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.truncated),
14349                ),
14350                encoder, offset, _depth
14351            )
14352        }
14353    }
14354    unsafe impl<
14355        D: fidl::encoding::ResourceDialect,
14356        T0: fidl::encoding::Encode<
14357                fidl::encoding::OptionalUnion<fidl_fuchsia_net_common::SocketAddress>,
14358                D,
14359            >,
14360        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
14361        T2: fidl::encoding::Encode<DatagramSocketRecvControlData, D>,
14362        T3: fidl::encoding::Encode<u32, D>,
14363    > fidl::encoding::Encode<SynchronousDatagramSocketRecvMsgResponse, D> for (T0, T1, T2, T3)
14364    {
14365        #[inline]
14366        unsafe fn encode(
14367            self,
14368            encoder: &mut fidl::encoding::Encoder<'_, D>,
14369            offset: usize,
14370            depth: fidl::encoding::Depth,
14371        ) -> fidl::Result<()> {
14372            encoder.debug_check_bounds::<SynchronousDatagramSocketRecvMsgResponse>(offset);
14373            // Zero out padding regions. There's no need to apply masks
14374            // because the unmasked parts will be overwritten by fields.
14375            unsafe {
14376                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
14377                (ptr as *mut u64).write_unaligned(0);
14378            }
14379            // Write the fields.
14380            self.0.encode(encoder, offset + 0, depth)?;
14381            self.1.encode(encoder, offset + 16, depth)?;
14382            self.2.encode(encoder, offset + 32, depth)?;
14383            self.3.encode(encoder, offset + 48, depth)?;
14384            Ok(())
14385        }
14386    }
14387
14388    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14389        for SynchronousDatagramSocketRecvMsgResponse
14390    {
14391        #[inline(always)]
14392        fn new_empty() -> Self {
14393            Self {
14394                addr: fidl::new_empty!(
14395                    fidl::encoding::OptionalUnion<fidl_fuchsia_net_common::SocketAddress>,
14396                    D
14397                ),
14398                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
14399                control: fidl::new_empty!(DatagramSocketRecvControlData, D),
14400                truncated: fidl::new_empty!(u32, D),
14401            }
14402        }
14403
14404        #[inline]
14405        unsafe fn decode(
14406            &mut self,
14407            decoder: &mut fidl::encoding::Decoder<'_, D>,
14408            offset: usize,
14409            _depth: fidl::encoding::Depth,
14410        ) -> fidl::Result<()> {
14411            decoder.debug_check_bounds::<Self>(offset);
14412            // Verify that padding bytes are zero.
14413            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
14414            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14415            let mask = 0xffffffff00000000u64;
14416            let maskedval = padval & mask;
14417            if maskedval != 0 {
14418                return Err(fidl::Error::NonZeroPadding {
14419                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
14420                });
14421            }
14422            fidl::decode!(
14423                fidl::encoding::OptionalUnion<fidl_fuchsia_net_common::SocketAddress>,
14424                D,
14425                &mut self.addr,
14426                decoder,
14427                offset + 0,
14428                _depth
14429            )?;
14430            fidl::decode!(
14431                fidl::encoding::UnboundedVector<u8>,
14432                D,
14433                &mut self.data,
14434                decoder,
14435                offset + 16,
14436                _depth
14437            )?;
14438            fidl::decode!(
14439                DatagramSocketRecvControlData,
14440                D,
14441                &mut self.control,
14442                decoder,
14443                offset + 32,
14444                _depth
14445            )?;
14446            fidl::decode!(u32, D, &mut self.truncated, decoder, offset + 48, _depth)?;
14447            Ok(())
14448        }
14449    }
14450
14451    impl fidl::encoding::ValueTypeMarker for SynchronousDatagramSocketSendMsgResponse {
14452        type Borrowed<'a> = &'a Self;
14453        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14454            value
14455        }
14456    }
14457
14458    unsafe impl fidl::encoding::TypeMarker for SynchronousDatagramSocketSendMsgResponse {
14459        type Owned = Self;
14460
14461        #[inline(always)]
14462        fn inline_align(_context: fidl::encoding::Context) -> usize {
14463            8
14464        }
14465
14466        #[inline(always)]
14467        fn inline_size(_context: fidl::encoding::Context) -> usize {
14468            8
14469        }
14470        #[inline(always)]
14471        fn encode_is_copy() -> bool {
14472            true
14473        }
14474
14475        #[inline(always)]
14476        fn decode_is_copy() -> bool {
14477            true
14478        }
14479    }
14480
14481    unsafe impl<D: fidl::encoding::ResourceDialect>
14482        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgResponse, D>
14483        for &SynchronousDatagramSocketSendMsgResponse
14484    {
14485        #[inline]
14486        unsafe fn encode(
14487            self,
14488            encoder: &mut fidl::encoding::Encoder<'_, D>,
14489            offset: usize,
14490            _depth: fidl::encoding::Depth,
14491        ) -> fidl::Result<()> {
14492            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgResponse>(offset);
14493            unsafe {
14494                // Copy the object into the buffer.
14495                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14496                (buf_ptr as *mut SynchronousDatagramSocketSendMsgResponse).write_unaligned(
14497                    (self as *const SynchronousDatagramSocketSendMsgResponse).read(),
14498                );
14499                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14500                // done second because the memcpy will write garbage to these bytes.
14501            }
14502            Ok(())
14503        }
14504    }
14505    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
14506        fidl::encoding::Encode<SynchronousDatagramSocketSendMsgResponse, D> for (T0,)
14507    {
14508        #[inline]
14509        unsafe fn encode(
14510            self,
14511            encoder: &mut fidl::encoding::Encoder<'_, D>,
14512            offset: usize,
14513            depth: fidl::encoding::Depth,
14514        ) -> fidl::Result<()> {
14515            encoder.debug_check_bounds::<SynchronousDatagramSocketSendMsgResponse>(offset);
14516            // Zero out padding regions. There's no need to apply masks
14517            // because the unmasked parts will be overwritten by fields.
14518            // Write the fields.
14519            self.0.encode(encoder, offset + 0, depth)?;
14520            Ok(())
14521        }
14522    }
14523
14524    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14525        for SynchronousDatagramSocketSendMsgResponse
14526    {
14527        #[inline(always)]
14528        fn new_empty() -> Self {
14529            Self { len: fidl::new_empty!(i64, D) }
14530        }
14531
14532        #[inline]
14533        unsafe fn decode(
14534            &mut self,
14535            decoder: &mut fidl::encoding::Decoder<'_, D>,
14536            offset: usize,
14537            _depth: fidl::encoding::Depth,
14538        ) -> fidl::Result<()> {
14539            decoder.debug_check_bounds::<Self>(offset);
14540            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14541            // Verify that padding bytes are zero.
14542            // Copy from the buffer into the object.
14543            unsafe {
14544                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
14545            }
14546            Ok(())
14547        }
14548    }
14549
14550    impl fidl::encoding::ValueTypeMarker for Timestamp {
14551        type Borrowed<'a> = &'a Self;
14552        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14553            value
14554        }
14555    }
14556
14557    unsafe impl fidl::encoding::TypeMarker for Timestamp {
14558        type Owned = Self;
14559
14560        #[inline(always)]
14561        fn inline_align(_context: fidl::encoding::Context) -> usize {
14562            8
14563        }
14564
14565        #[inline(always)]
14566        fn inline_size(_context: fidl::encoding::Context) -> usize {
14567            16
14568        }
14569    }
14570
14571    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Timestamp, D>
14572        for &Timestamp
14573    {
14574        #[inline]
14575        unsafe fn encode(
14576            self,
14577            encoder: &mut fidl::encoding::Encoder<'_, D>,
14578            offset: usize,
14579            _depth: fidl::encoding::Depth,
14580        ) -> fidl::Result<()> {
14581            encoder.debug_check_bounds::<Timestamp>(offset);
14582            // Delegate to tuple encoding.
14583            fidl::encoding::Encode::<Timestamp, D>::encode(
14584                (
14585                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.nanoseconds),
14586                    <TimestampOption as fidl::encoding::ValueTypeMarker>::borrow(&self.requested),
14587                ),
14588                encoder,
14589                offset,
14590                _depth,
14591            )
14592        }
14593    }
14594    unsafe impl<
14595        D: fidl::encoding::ResourceDialect,
14596        T0: fidl::encoding::Encode<i64, D>,
14597        T1: fidl::encoding::Encode<TimestampOption, D>,
14598    > fidl::encoding::Encode<Timestamp, D> for (T0, T1)
14599    {
14600        #[inline]
14601        unsafe fn encode(
14602            self,
14603            encoder: &mut fidl::encoding::Encoder<'_, D>,
14604            offset: usize,
14605            depth: fidl::encoding::Depth,
14606        ) -> fidl::Result<()> {
14607            encoder.debug_check_bounds::<Timestamp>(offset);
14608            // Zero out padding regions. There's no need to apply masks
14609            // because the unmasked parts will be overwritten by fields.
14610            unsafe {
14611                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
14612                (ptr as *mut u64).write_unaligned(0);
14613            }
14614            // Write the fields.
14615            self.0.encode(encoder, offset + 0, depth)?;
14616            self.1.encode(encoder, offset + 8, depth)?;
14617            Ok(())
14618        }
14619    }
14620
14621    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Timestamp {
14622        #[inline(always)]
14623        fn new_empty() -> Self {
14624            Self {
14625                nanoseconds: fidl::new_empty!(i64, D),
14626                requested: fidl::new_empty!(TimestampOption, D),
14627            }
14628        }
14629
14630        #[inline]
14631        unsafe fn decode(
14632            &mut self,
14633            decoder: &mut fidl::encoding::Decoder<'_, D>,
14634            offset: usize,
14635            _depth: fidl::encoding::Depth,
14636        ) -> fidl::Result<()> {
14637            decoder.debug_check_bounds::<Self>(offset);
14638            // Verify that padding bytes are zero.
14639            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
14640            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14641            let mask = 0xffffffff00000000u64;
14642            let maskedval = padval & mask;
14643            if maskedval != 0 {
14644                return Err(fidl::Error::NonZeroPadding {
14645                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
14646                });
14647            }
14648            fidl::decode!(i64, D, &mut self.nanoseconds, decoder, offset + 0, _depth)?;
14649            fidl::decode!(TimestampOption, D, &mut self.requested, decoder, offset + 8, _depth)?;
14650            Ok(())
14651        }
14652    }
14653
14654    impl DatagramSocketRecvControlData {
14655        #[inline(always)]
14656        fn max_ordinal_present(&self) -> u64 {
14657            if let Some(_) = self.network {
14658                return 1;
14659            }
14660            0
14661        }
14662    }
14663
14664    impl fidl::encoding::ValueTypeMarker for DatagramSocketRecvControlData {
14665        type Borrowed<'a> = &'a Self;
14666        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14667            value
14668        }
14669    }
14670
14671    unsafe impl fidl::encoding::TypeMarker for DatagramSocketRecvControlData {
14672        type Owned = Self;
14673
14674        #[inline(always)]
14675        fn inline_align(_context: fidl::encoding::Context) -> usize {
14676            8
14677        }
14678
14679        #[inline(always)]
14680        fn inline_size(_context: fidl::encoding::Context) -> usize {
14681            16
14682        }
14683    }
14684
14685    unsafe impl<D: fidl::encoding::ResourceDialect>
14686        fidl::encoding::Encode<DatagramSocketRecvControlData, D>
14687        for &DatagramSocketRecvControlData
14688    {
14689        unsafe fn encode(
14690            self,
14691            encoder: &mut fidl::encoding::Encoder<'_, D>,
14692            offset: usize,
14693            mut depth: fidl::encoding::Depth,
14694        ) -> fidl::Result<()> {
14695            encoder.debug_check_bounds::<DatagramSocketRecvControlData>(offset);
14696            // Vector header
14697            let max_ordinal: u64 = self.max_ordinal_present();
14698            encoder.write_num(max_ordinal, offset);
14699            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14700            // Calling encoder.out_of_line_offset(0) is not allowed.
14701            if max_ordinal == 0 {
14702                return Ok(());
14703            }
14704            depth.increment()?;
14705            let envelope_size = 8;
14706            let bytes_len = max_ordinal as usize * envelope_size;
14707            #[allow(unused_variables)]
14708            let offset = encoder.out_of_line_offset(bytes_len);
14709            let mut _prev_end_offset: usize = 0;
14710            if 1 > max_ordinal {
14711                return Ok(());
14712            }
14713
14714            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14715            // are envelope_size bytes.
14716            let cur_offset: usize = (1 - 1) * envelope_size;
14717
14718            // Zero reserved fields.
14719            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14720
14721            // Safety:
14722            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
14723            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
14724            //   envelope_size bytes, there is always sufficient room.
14725            fidl::encoding::encode_in_envelope_optional::<NetworkSocketRecvControlData, D>(
14726                self.network
14727                    .as_ref()
14728                    .map(<NetworkSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
14729                encoder,
14730                offset + cur_offset,
14731                depth,
14732            )?;
14733
14734            _prev_end_offset = cur_offset + envelope_size;
14735
14736            Ok(())
14737        }
14738    }
14739
14740    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14741        for DatagramSocketRecvControlData
14742    {
14743        #[inline(always)]
14744        fn new_empty() -> Self {
14745            Self::default()
14746        }
14747
14748        unsafe fn decode(
14749            &mut self,
14750            decoder: &mut fidl::encoding::Decoder<'_, D>,
14751            offset: usize,
14752            mut depth: fidl::encoding::Depth,
14753        ) -> fidl::Result<()> {
14754            decoder.debug_check_bounds::<Self>(offset);
14755            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14756                None => return Err(fidl::Error::NotNullable),
14757                Some(len) => len,
14758            };
14759            // Calling decoder.out_of_line_offset(0) is not allowed.
14760            if len == 0 {
14761                return Ok(());
14762            };
14763            depth.increment()?;
14764            let envelope_size = 8;
14765            let bytes_len = len * envelope_size;
14766            let offset = decoder.out_of_line_offset(bytes_len)?;
14767            // Decode the envelope for each type.
14768            let mut _next_ordinal_to_read = 0;
14769            let mut next_offset = offset;
14770            let end_offset = offset + bytes_len;
14771            _next_ordinal_to_read += 1;
14772            if next_offset >= end_offset {
14773                return Ok(());
14774            }
14775
14776            // Decode unknown envelopes for gaps in ordinals.
14777            while _next_ordinal_to_read < 1 {
14778                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14779                _next_ordinal_to_read += 1;
14780                next_offset += envelope_size;
14781            }
14782
14783            let next_out_of_line = decoder.next_out_of_line();
14784            let handles_before = decoder.remaining_handles();
14785            if let Some((inlined, num_bytes, num_handles)) =
14786                fidl::encoding::decode_envelope_header(decoder, next_offset)?
14787            {
14788                let member_inline_size =
14789                    <NetworkSocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
14790                        decoder.context,
14791                    );
14792                if inlined != (member_inline_size <= 4) {
14793                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
14794                }
14795                let inner_offset;
14796                let mut inner_depth = depth.clone();
14797                if inlined {
14798                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14799                    inner_offset = next_offset;
14800                } else {
14801                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14802                    inner_depth.increment()?;
14803                }
14804                let val_ref = self
14805                    .network
14806                    .get_or_insert_with(|| fidl::new_empty!(NetworkSocketRecvControlData, D));
14807                fidl::decode!(
14808                    NetworkSocketRecvControlData,
14809                    D,
14810                    val_ref,
14811                    decoder,
14812                    inner_offset,
14813                    inner_depth
14814                )?;
14815                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14816                {
14817                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
14818                }
14819                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14820                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14821                }
14822            }
14823
14824            next_offset += envelope_size;
14825
14826            // Decode the remaining unknown envelopes.
14827            while next_offset < end_offset {
14828                _next_ordinal_to_read += 1;
14829                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14830                next_offset += envelope_size;
14831            }
14832
14833            Ok(())
14834        }
14835    }
14836
14837    impl DatagramSocketSendControlData {
14838        #[inline(always)]
14839        fn max_ordinal_present(&self) -> u64 {
14840            if let Some(_) = self.network {
14841                return 1;
14842            }
14843            0
14844        }
14845    }
14846
14847    impl fidl::encoding::ValueTypeMarker for DatagramSocketSendControlData {
14848        type Borrowed<'a> = &'a Self;
14849        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14850            value
14851        }
14852    }
14853
14854    unsafe impl fidl::encoding::TypeMarker for DatagramSocketSendControlData {
14855        type Owned = Self;
14856
14857        #[inline(always)]
14858        fn inline_align(_context: fidl::encoding::Context) -> usize {
14859            8
14860        }
14861
14862        #[inline(always)]
14863        fn inline_size(_context: fidl::encoding::Context) -> usize {
14864            16
14865        }
14866    }
14867
14868    unsafe impl<D: fidl::encoding::ResourceDialect>
14869        fidl::encoding::Encode<DatagramSocketSendControlData, D>
14870        for &DatagramSocketSendControlData
14871    {
14872        unsafe fn encode(
14873            self,
14874            encoder: &mut fidl::encoding::Encoder<'_, D>,
14875            offset: usize,
14876            mut depth: fidl::encoding::Depth,
14877        ) -> fidl::Result<()> {
14878            encoder.debug_check_bounds::<DatagramSocketSendControlData>(offset);
14879            // Vector header
14880            let max_ordinal: u64 = self.max_ordinal_present();
14881            encoder.write_num(max_ordinal, offset);
14882            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14883            // Calling encoder.out_of_line_offset(0) is not allowed.
14884            if max_ordinal == 0 {
14885                return Ok(());
14886            }
14887            depth.increment()?;
14888            let envelope_size = 8;
14889            let bytes_len = max_ordinal as usize * envelope_size;
14890            #[allow(unused_variables)]
14891            let offset = encoder.out_of_line_offset(bytes_len);
14892            let mut _prev_end_offset: usize = 0;
14893            if 1 > max_ordinal {
14894                return Ok(());
14895            }
14896
14897            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14898            // are envelope_size bytes.
14899            let cur_offset: usize = (1 - 1) * envelope_size;
14900
14901            // Zero reserved fields.
14902            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14903
14904            // Safety:
14905            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
14906            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
14907            //   envelope_size bytes, there is always sufficient room.
14908            fidl::encoding::encode_in_envelope_optional::<NetworkSocketSendControlData, D>(
14909                self.network
14910                    .as_ref()
14911                    .map(<NetworkSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
14912                encoder,
14913                offset + cur_offset,
14914                depth,
14915            )?;
14916
14917            _prev_end_offset = cur_offset + envelope_size;
14918
14919            Ok(())
14920        }
14921    }
14922
14923    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14924        for DatagramSocketSendControlData
14925    {
14926        #[inline(always)]
14927        fn new_empty() -> Self {
14928            Self::default()
14929        }
14930
14931        unsafe fn decode(
14932            &mut self,
14933            decoder: &mut fidl::encoding::Decoder<'_, D>,
14934            offset: usize,
14935            mut depth: fidl::encoding::Depth,
14936        ) -> fidl::Result<()> {
14937            decoder.debug_check_bounds::<Self>(offset);
14938            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14939                None => return Err(fidl::Error::NotNullable),
14940                Some(len) => len,
14941            };
14942            // Calling decoder.out_of_line_offset(0) is not allowed.
14943            if len == 0 {
14944                return Ok(());
14945            };
14946            depth.increment()?;
14947            let envelope_size = 8;
14948            let bytes_len = len * envelope_size;
14949            let offset = decoder.out_of_line_offset(bytes_len)?;
14950            // Decode the envelope for each type.
14951            let mut _next_ordinal_to_read = 0;
14952            let mut next_offset = offset;
14953            let end_offset = offset + bytes_len;
14954            _next_ordinal_to_read += 1;
14955            if next_offset >= end_offset {
14956                return Ok(());
14957            }
14958
14959            // Decode unknown envelopes for gaps in ordinals.
14960            while _next_ordinal_to_read < 1 {
14961                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14962                _next_ordinal_to_read += 1;
14963                next_offset += envelope_size;
14964            }
14965
14966            let next_out_of_line = decoder.next_out_of_line();
14967            let handles_before = decoder.remaining_handles();
14968            if let Some((inlined, num_bytes, num_handles)) =
14969                fidl::encoding::decode_envelope_header(decoder, next_offset)?
14970            {
14971                let member_inline_size =
14972                    <NetworkSocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
14973                        decoder.context,
14974                    );
14975                if inlined != (member_inline_size <= 4) {
14976                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
14977                }
14978                let inner_offset;
14979                let mut inner_depth = depth.clone();
14980                if inlined {
14981                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14982                    inner_offset = next_offset;
14983                } else {
14984                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14985                    inner_depth.increment()?;
14986                }
14987                let val_ref = self
14988                    .network
14989                    .get_or_insert_with(|| fidl::new_empty!(NetworkSocketSendControlData, D));
14990                fidl::decode!(
14991                    NetworkSocketSendControlData,
14992                    D,
14993                    val_ref,
14994                    decoder,
14995                    inner_offset,
14996                    inner_depth
14997                )?;
14998                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14999                {
15000                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15001                }
15002                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15003                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15004                }
15005            }
15006
15007            next_offset += envelope_size;
15008
15009            // Decode the remaining unknown envelopes.
15010            while next_offset < end_offset {
15011                _next_ordinal_to_read += 1;
15012                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15013                next_offset += envelope_size;
15014            }
15015
15016            Ok(())
15017        }
15018    }
15019
15020    impl DatagramSocketSendMsgPreflightRequest {
15021        #[inline(always)]
15022        fn max_ordinal_present(&self) -> u64 {
15023            if let Some(_) = self.ipv6_pktinfo {
15024                return 2;
15025            }
15026            if let Some(_) = self.to {
15027                return 1;
15028            }
15029            0
15030        }
15031    }
15032
15033    impl fidl::encoding::ValueTypeMarker for DatagramSocketSendMsgPreflightRequest {
15034        type Borrowed<'a> = &'a Self;
15035        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15036            value
15037        }
15038    }
15039
15040    unsafe impl fidl::encoding::TypeMarker for DatagramSocketSendMsgPreflightRequest {
15041        type Owned = Self;
15042
15043        #[inline(always)]
15044        fn inline_align(_context: fidl::encoding::Context) -> usize {
15045            8
15046        }
15047
15048        #[inline(always)]
15049        fn inline_size(_context: fidl::encoding::Context) -> usize {
15050            16
15051        }
15052    }
15053
15054    unsafe impl<D: fidl::encoding::ResourceDialect>
15055        fidl::encoding::Encode<DatagramSocketSendMsgPreflightRequest, D>
15056        for &DatagramSocketSendMsgPreflightRequest
15057    {
15058        unsafe fn encode(
15059            self,
15060            encoder: &mut fidl::encoding::Encoder<'_, D>,
15061            offset: usize,
15062            mut depth: fidl::encoding::Depth,
15063        ) -> fidl::Result<()> {
15064            encoder.debug_check_bounds::<DatagramSocketSendMsgPreflightRequest>(offset);
15065            // Vector header
15066            let max_ordinal: u64 = self.max_ordinal_present();
15067            encoder.write_num(max_ordinal, offset);
15068            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15069            // Calling encoder.out_of_line_offset(0) is not allowed.
15070            if max_ordinal == 0 {
15071                return Ok(());
15072            }
15073            depth.increment()?;
15074            let envelope_size = 8;
15075            let bytes_len = max_ordinal as usize * envelope_size;
15076            #[allow(unused_variables)]
15077            let offset = encoder.out_of_line_offset(bytes_len);
15078            let mut _prev_end_offset: usize = 0;
15079            if 1 > max_ordinal {
15080                return Ok(());
15081            }
15082
15083            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15084            // are envelope_size bytes.
15085            let cur_offset: usize = (1 - 1) * envelope_size;
15086
15087            // Zero reserved fields.
15088            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15089
15090            // Safety:
15091            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15092            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15093            //   envelope_size bytes, there is always sufficient room.
15094            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net_common::SocketAddress, D>(
15095            self.to.as_ref().map(<fidl_fuchsia_net_common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
15096            encoder, offset + cur_offset, depth
15097        )?;
15098
15099            _prev_end_offset = cur_offset + envelope_size;
15100            if 2 > max_ordinal {
15101                return Ok(());
15102            }
15103
15104            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15105            // are envelope_size bytes.
15106            let cur_offset: usize = (2 - 1) * envelope_size;
15107
15108            // Zero reserved fields.
15109            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15110
15111            // Safety:
15112            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15113            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15114            //   envelope_size bytes, there is always sufficient room.
15115            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoSendControlData, D>(
15116                self.ipv6_pktinfo
15117                    .as_ref()
15118                    .map(<Ipv6PktInfoSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
15119                encoder,
15120                offset + cur_offset,
15121                depth,
15122            )?;
15123
15124            _prev_end_offset = cur_offset + envelope_size;
15125
15126            Ok(())
15127        }
15128    }
15129
15130    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15131        for DatagramSocketSendMsgPreflightRequest
15132    {
15133        #[inline(always)]
15134        fn new_empty() -> Self {
15135            Self::default()
15136        }
15137
15138        unsafe fn decode(
15139            &mut self,
15140            decoder: &mut fidl::encoding::Decoder<'_, D>,
15141            offset: usize,
15142            mut depth: fidl::encoding::Depth,
15143        ) -> fidl::Result<()> {
15144            decoder.debug_check_bounds::<Self>(offset);
15145            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15146                None => return Err(fidl::Error::NotNullable),
15147                Some(len) => len,
15148            };
15149            // Calling decoder.out_of_line_offset(0) is not allowed.
15150            if len == 0 {
15151                return Ok(());
15152            };
15153            depth.increment()?;
15154            let envelope_size = 8;
15155            let bytes_len = len * envelope_size;
15156            let offset = decoder.out_of_line_offset(bytes_len)?;
15157            // Decode the envelope for each type.
15158            let mut _next_ordinal_to_read = 0;
15159            let mut next_offset = offset;
15160            let end_offset = offset + bytes_len;
15161            _next_ordinal_to_read += 1;
15162            if next_offset >= end_offset {
15163                return Ok(());
15164            }
15165
15166            // Decode unknown envelopes for gaps in ordinals.
15167            while _next_ordinal_to_read < 1 {
15168                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15169                _next_ordinal_to_read += 1;
15170                next_offset += envelope_size;
15171            }
15172
15173            let next_out_of_line = decoder.next_out_of_line();
15174            let handles_before = decoder.remaining_handles();
15175            if let Some((inlined, num_bytes, num_handles)) =
15176                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15177            {
15178                let member_inline_size = <fidl_fuchsia_net_common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15179                if inlined != (member_inline_size <= 4) {
15180                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15181                }
15182                let inner_offset;
15183                let mut inner_depth = depth.clone();
15184                if inlined {
15185                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15186                    inner_offset = next_offset;
15187                } else {
15188                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15189                    inner_depth.increment()?;
15190                }
15191                let val_ref = self.to.get_or_insert_with(|| {
15192                    fidl::new_empty!(fidl_fuchsia_net_common::SocketAddress, D)
15193                });
15194                fidl::decode!(
15195                    fidl_fuchsia_net_common::SocketAddress,
15196                    D,
15197                    val_ref,
15198                    decoder,
15199                    inner_offset,
15200                    inner_depth
15201                )?;
15202                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15203                {
15204                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15205                }
15206                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15207                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15208                }
15209            }
15210
15211            next_offset += envelope_size;
15212            _next_ordinal_to_read += 1;
15213            if next_offset >= end_offset {
15214                return Ok(());
15215            }
15216
15217            // Decode unknown envelopes for gaps in ordinals.
15218            while _next_ordinal_to_read < 2 {
15219                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15220                _next_ordinal_to_read += 1;
15221                next_offset += envelope_size;
15222            }
15223
15224            let next_out_of_line = decoder.next_out_of_line();
15225            let handles_before = decoder.remaining_handles();
15226            if let Some((inlined, num_bytes, num_handles)) =
15227                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15228            {
15229                let member_inline_size =
15230                    <Ipv6PktInfoSendControlData as fidl::encoding::TypeMarker>::inline_size(
15231                        decoder.context,
15232                    );
15233                if inlined != (member_inline_size <= 4) {
15234                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15235                }
15236                let inner_offset;
15237                let mut inner_depth = depth.clone();
15238                if inlined {
15239                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15240                    inner_offset = next_offset;
15241                } else {
15242                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15243                    inner_depth.increment()?;
15244                }
15245                let val_ref = self
15246                    .ipv6_pktinfo
15247                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoSendControlData, D));
15248                fidl::decode!(
15249                    Ipv6PktInfoSendControlData,
15250                    D,
15251                    val_ref,
15252                    decoder,
15253                    inner_offset,
15254                    inner_depth
15255                )?;
15256                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15257                {
15258                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15259                }
15260                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15261                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15262                }
15263            }
15264
15265            next_offset += envelope_size;
15266
15267            // Decode the remaining unknown envelopes.
15268            while next_offset < end_offset {
15269                _next_ordinal_to_read += 1;
15270                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15271                next_offset += envelope_size;
15272            }
15273
15274            Ok(())
15275        }
15276    }
15277
15278    impl InterfaceAddresses {
15279        #[inline(always)]
15280        fn max_ordinal_present(&self) -> u64 {
15281            if let Some(_) = self.interface_flags {
15282                return 5;
15283            }
15284            if let Some(_) = self.addresses {
15285                return 4;
15286            }
15287            if let Some(_) = self.name {
15288                return 2;
15289            }
15290            if let Some(_) = self.id {
15291                return 1;
15292            }
15293            0
15294        }
15295    }
15296
15297    impl fidl::encoding::ValueTypeMarker for InterfaceAddresses {
15298        type Borrowed<'a> = &'a Self;
15299        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15300            value
15301        }
15302    }
15303
15304    unsafe impl fidl::encoding::TypeMarker for InterfaceAddresses {
15305        type Owned = Self;
15306
15307        #[inline(always)]
15308        fn inline_align(_context: fidl::encoding::Context) -> usize {
15309            8
15310        }
15311
15312        #[inline(always)]
15313        fn inline_size(_context: fidl::encoding::Context) -> usize {
15314            16
15315        }
15316    }
15317
15318    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InterfaceAddresses, D>
15319        for &InterfaceAddresses
15320    {
15321        unsafe fn encode(
15322            self,
15323            encoder: &mut fidl::encoding::Encoder<'_, D>,
15324            offset: usize,
15325            mut depth: fidl::encoding::Depth,
15326        ) -> fidl::Result<()> {
15327            encoder.debug_check_bounds::<InterfaceAddresses>(offset);
15328            // Vector header
15329            let max_ordinal: u64 = self.max_ordinal_present();
15330            encoder.write_num(max_ordinal, offset);
15331            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15332            // Calling encoder.out_of_line_offset(0) is not allowed.
15333            if max_ordinal == 0 {
15334                return Ok(());
15335            }
15336            depth.increment()?;
15337            let envelope_size = 8;
15338            let bytes_len = max_ordinal as usize * envelope_size;
15339            #[allow(unused_variables)]
15340            let offset = encoder.out_of_line_offset(bytes_len);
15341            let mut _prev_end_offset: usize = 0;
15342            if 1 > max_ordinal {
15343                return Ok(());
15344            }
15345
15346            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15347            // are envelope_size bytes.
15348            let cur_offset: usize = (1 - 1) * envelope_size;
15349
15350            // Zero reserved fields.
15351            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15352
15353            // Safety:
15354            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15355            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15356            //   envelope_size bytes, there is always sufficient room.
15357            fidl::encoding::encode_in_envelope_optional::<u64, D>(
15358                self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
15359                encoder,
15360                offset + cur_offset,
15361                depth,
15362            )?;
15363
15364            _prev_end_offset = cur_offset + envelope_size;
15365            if 2 > max_ordinal {
15366                return Ok(());
15367            }
15368
15369            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15370            // are envelope_size bytes.
15371            let cur_offset: usize = (2 - 1) * envelope_size;
15372
15373            // Zero reserved fields.
15374            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15375
15376            // Safety:
15377            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15378            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15379            //   envelope_size bytes, there is always sufficient room.
15380            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<15>, D>(
15381                self.name.as_ref().map(
15382                    <fidl::encoding::BoundedString<15> as fidl::encoding::ValueTypeMarker>::borrow,
15383                ),
15384                encoder,
15385                offset + cur_offset,
15386                depth,
15387            )?;
15388
15389            _prev_end_offset = cur_offset + envelope_size;
15390            if 4 > max_ordinal {
15391                return Ok(());
15392            }
15393
15394            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15395            // are envelope_size bytes.
15396            let cur_offset: usize = (4 - 1) * envelope_size;
15397
15398            // Zero reserved fields.
15399            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15400
15401            // Safety:
15402            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15403            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15404            //   envelope_size bytes, there is always sufficient room.
15405            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl_fuchsia_net_common::Subnet>, D>(
15406            self.addresses.as_ref().map(<fidl::encoding::UnboundedVector<fidl_fuchsia_net_common::Subnet> as fidl::encoding::ValueTypeMarker>::borrow),
15407            encoder, offset + cur_offset, depth
15408        )?;
15409
15410            _prev_end_offset = cur_offset + envelope_size;
15411            if 5 > max_ordinal {
15412                return Ok(());
15413            }
15414
15415            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15416            // are envelope_size bytes.
15417            let cur_offset: usize = (5 - 1) * envelope_size;
15418
15419            // Zero reserved fields.
15420            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15421
15422            // Safety:
15423            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15424            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15425            //   envelope_size bytes, there is always sufficient room.
15426            fidl::encoding::encode_in_envelope_optional::<InterfaceFlags, D>(
15427                self.interface_flags
15428                    .as_ref()
15429                    .map(<InterfaceFlags as fidl::encoding::ValueTypeMarker>::borrow),
15430                encoder,
15431                offset + cur_offset,
15432                depth,
15433            )?;
15434
15435            _prev_end_offset = cur_offset + envelope_size;
15436
15437            Ok(())
15438        }
15439    }
15440
15441    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceAddresses {
15442        #[inline(always)]
15443        fn new_empty() -> Self {
15444            Self::default()
15445        }
15446
15447        unsafe fn decode(
15448            &mut self,
15449            decoder: &mut fidl::encoding::Decoder<'_, D>,
15450            offset: usize,
15451            mut depth: fidl::encoding::Depth,
15452        ) -> fidl::Result<()> {
15453            decoder.debug_check_bounds::<Self>(offset);
15454            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15455                None => return Err(fidl::Error::NotNullable),
15456                Some(len) => len,
15457            };
15458            // Calling decoder.out_of_line_offset(0) is not allowed.
15459            if len == 0 {
15460                return Ok(());
15461            };
15462            depth.increment()?;
15463            let envelope_size = 8;
15464            let bytes_len = len * envelope_size;
15465            let offset = decoder.out_of_line_offset(bytes_len)?;
15466            // Decode the envelope for each type.
15467            let mut _next_ordinal_to_read = 0;
15468            let mut next_offset = offset;
15469            let end_offset = offset + bytes_len;
15470            _next_ordinal_to_read += 1;
15471            if next_offset >= end_offset {
15472                return Ok(());
15473            }
15474
15475            // Decode unknown envelopes for gaps in ordinals.
15476            while _next_ordinal_to_read < 1 {
15477                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15478                _next_ordinal_to_read += 1;
15479                next_offset += envelope_size;
15480            }
15481
15482            let next_out_of_line = decoder.next_out_of_line();
15483            let handles_before = decoder.remaining_handles();
15484            if let Some((inlined, num_bytes, num_handles)) =
15485                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15486            {
15487                let member_inline_size =
15488                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15489                if inlined != (member_inline_size <= 4) {
15490                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15491                }
15492                let inner_offset;
15493                let mut inner_depth = depth.clone();
15494                if inlined {
15495                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15496                    inner_offset = next_offset;
15497                } else {
15498                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15499                    inner_depth.increment()?;
15500                }
15501                let val_ref = self.id.get_or_insert_with(|| fidl::new_empty!(u64, D));
15502                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
15503                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15504                {
15505                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15506                }
15507                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15508                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15509                }
15510            }
15511
15512            next_offset += envelope_size;
15513            _next_ordinal_to_read += 1;
15514            if next_offset >= end_offset {
15515                return Ok(());
15516            }
15517
15518            // Decode unknown envelopes for gaps in ordinals.
15519            while _next_ordinal_to_read < 2 {
15520                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15521                _next_ordinal_to_read += 1;
15522                next_offset += envelope_size;
15523            }
15524
15525            let next_out_of_line = decoder.next_out_of_line();
15526            let handles_before = decoder.remaining_handles();
15527            if let Some((inlined, num_bytes, num_handles)) =
15528                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15529            {
15530                let member_inline_size =
15531                    <fidl::encoding::BoundedString<15> as fidl::encoding::TypeMarker>::inline_size(
15532                        decoder.context,
15533                    );
15534                if inlined != (member_inline_size <= 4) {
15535                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15536                }
15537                let inner_offset;
15538                let mut inner_depth = depth.clone();
15539                if inlined {
15540                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15541                    inner_offset = next_offset;
15542                } else {
15543                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15544                    inner_depth.increment()?;
15545                }
15546                let val_ref = self
15547                    .name
15548                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<15>, D));
15549                fidl::decode!(
15550                    fidl::encoding::BoundedString<15>,
15551                    D,
15552                    val_ref,
15553                    decoder,
15554                    inner_offset,
15555                    inner_depth
15556                )?;
15557                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15558                {
15559                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15560                }
15561                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15562                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15563                }
15564            }
15565
15566            next_offset += envelope_size;
15567            _next_ordinal_to_read += 1;
15568            if next_offset >= end_offset {
15569                return Ok(());
15570            }
15571
15572            // Decode unknown envelopes for gaps in ordinals.
15573            while _next_ordinal_to_read < 4 {
15574                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15575                _next_ordinal_to_read += 1;
15576                next_offset += envelope_size;
15577            }
15578
15579            let next_out_of_line = decoder.next_out_of_line();
15580            let handles_before = decoder.remaining_handles();
15581            if let Some((inlined, num_bytes, num_handles)) =
15582                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15583            {
15584                let member_inline_size = <fidl::encoding::UnboundedVector<
15585                    fidl_fuchsia_net_common::Subnet,
15586                > as fidl::encoding::TypeMarker>::inline_size(
15587                    decoder.context
15588                );
15589                if inlined != (member_inline_size <= 4) {
15590                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15591                }
15592                let inner_offset;
15593                let mut inner_depth = depth.clone();
15594                if inlined {
15595                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15596                    inner_offset = next_offset;
15597                } else {
15598                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15599                    inner_depth.increment()?;
15600                }
15601                let val_ref = self.addresses.get_or_insert_with(|| {
15602                    fidl::new_empty!(
15603                        fidl::encoding::UnboundedVector<fidl_fuchsia_net_common::Subnet>,
15604                        D
15605                    )
15606                });
15607                fidl::decode!(
15608                    fidl::encoding::UnboundedVector<fidl_fuchsia_net_common::Subnet>,
15609                    D,
15610                    val_ref,
15611                    decoder,
15612                    inner_offset,
15613                    inner_depth
15614                )?;
15615                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15616                {
15617                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15618                }
15619                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15620                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15621                }
15622            }
15623
15624            next_offset += envelope_size;
15625            _next_ordinal_to_read += 1;
15626            if next_offset >= end_offset {
15627                return Ok(());
15628            }
15629
15630            // Decode unknown envelopes for gaps in ordinals.
15631            while _next_ordinal_to_read < 5 {
15632                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15633                _next_ordinal_to_read += 1;
15634                next_offset += envelope_size;
15635            }
15636
15637            let next_out_of_line = decoder.next_out_of_line();
15638            let handles_before = decoder.remaining_handles();
15639            if let Some((inlined, num_bytes, num_handles)) =
15640                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15641            {
15642                let member_inline_size =
15643                    <InterfaceFlags as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15644                if inlined != (member_inline_size <= 4) {
15645                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15646                }
15647                let inner_offset;
15648                let mut inner_depth = depth.clone();
15649                if inlined {
15650                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15651                    inner_offset = next_offset;
15652                } else {
15653                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15654                    inner_depth.increment()?;
15655                }
15656                let val_ref =
15657                    self.interface_flags.get_or_insert_with(|| fidl::new_empty!(InterfaceFlags, D));
15658                fidl::decode!(InterfaceFlags, D, val_ref, decoder, inner_offset, inner_depth)?;
15659                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15660                {
15661                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15662                }
15663                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15664                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15665                }
15666            }
15667
15668            next_offset += envelope_size;
15669
15670            // Decode the remaining unknown envelopes.
15671            while next_offset < end_offset {
15672                _next_ordinal_to_read += 1;
15673                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15674                next_offset += envelope_size;
15675            }
15676
15677            Ok(())
15678        }
15679    }
15680
15681    impl IpRecvControlData {
15682        #[inline(always)]
15683        fn max_ordinal_present(&self) -> u64 {
15684            if let Some(_) = self.original_destination_address {
15685                return 3;
15686            }
15687            if let Some(_) = self.ttl {
15688                return 2;
15689            }
15690            if let Some(_) = self.tos {
15691                return 1;
15692            }
15693            0
15694        }
15695    }
15696
15697    impl fidl::encoding::ValueTypeMarker for IpRecvControlData {
15698        type Borrowed<'a> = &'a Self;
15699        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15700            value
15701        }
15702    }
15703
15704    unsafe impl fidl::encoding::TypeMarker for IpRecvControlData {
15705        type Owned = Self;
15706
15707        #[inline(always)]
15708        fn inline_align(_context: fidl::encoding::Context) -> usize {
15709            8
15710        }
15711
15712        #[inline(always)]
15713        fn inline_size(_context: fidl::encoding::Context) -> usize {
15714            16
15715        }
15716    }
15717
15718    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpRecvControlData, D>
15719        for &IpRecvControlData
15720    {
15721        unsafe fn encode(
15722            self,
15723            encoder: &mut fidl::encoding::Encoder<'_, D>,
15724            offset: usize,
15725            mut depth: fidl::encoding::Depth,
15726        ) -> fidl::Result<()> {
15727            encoder.debug_check_bounds::<IpRecvControlData>(offset);
15728            // Vector header
15729            let max_ordinal: u64 = self.max_ordinal_present();
15730            encoder.write_num(max_ordinal, offset);
15731            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15732            // Calling encoder.out_of_line_offset(0) is not allowed.
15733            if max_ordinal == 0 {
15734                return Ok(());
15735            }
15736            depth.increment()?;
15737            let envelope_size = 8;
15738            let bytes_len = max_ordinal as usize * envelope_size;
15739            #[allow(unused_variables)]
15740            let offset = encoder.out_of_line_offset(bytes_len);
15741            let mut _prev_end_offset: usize = 0;
15742            if 1 > max_ordinal {
15743                return Ok(());
15744            }
15745
15746            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15747            // are envelope_size bytes.
15748            let cur_offset: usize = (1 - 1) * envelope_size;
15749
15750            // Zero reserved fields.
15751            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15752
15753            // Safety:
15754            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15755            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15756            //   envelope_size bytes, there is always sufficient room.
15757            fidl::encoding::encode_in_envelope_optional::<u8, D>(
15758                self.tos.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
15759                encoder,
15760                offset + cur_offset,
15761                depth,
15762            )?;
15763
15764            _prev_end_offset = cur_offset + envelope_size;
15765            if 2 > max_ordinal {
15766                return Ok(());
15767            }
15768
15769            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15770            // are envelope_size bytes.
15771            let cur_offset: usize = (2 - 1) * envelope_size;
15772
15773            // Zero reserved fields.
15774            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15775
15776            // Safety:
15777            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15778            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15779            //   envelope_size bytes, there is always sufficient room.
15780            fidl::encoding::encode_in_envelope_optional::<u8, D>(
15781                self.ttl.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
15782                encoder,
15783                offset + cur_offset,
15784                depth,
15785            )?;
15786
15787            _prev_end_offset = cur_offset + envelope_size;
15788            if 3 > max_ordinal {
15789                return Ok(());
15790            }
15791
15792            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
15793            // are envelope_size bytes.
15794            let cur_offset: usize = (3 - 1) * envelope_size;
15795
15796            // Zero reserved fields.
15797            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15798
15799            // Safety:
15800            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
15801            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
15802            //   envelope_size bytes, there is always sufficient room.
15803            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net_common::SocketAddress, D>(
15804            self.original_destination_address.as_ref().map(<fidl_fuchsia_net_common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
15805            encoder, offset + cur_offset, depth
15806        )?;
15807
15808            _prev_end_offset = cur_offset + envelope_size;
15809
15810            Ok(())
15811        }
15812    }
15813
15814    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpRecvControlData {
15815        #[inline(always)]
15816        fn new_empty() -> Self {
15817            Self::default()
15818        }
15819
15820        unsafe fn decode(
15821            &mut self,
15822            decoder: &mut fidl::encoding::Decoder<'_, D>,
15823            offset: usize,
15824            mut depth: fidl::encoding::Depth,
15825        ) -> fidl::Result<()> {
15826            decoder.debug_check_bounds::<Self>(offset);
15827            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15828                None => return Err(fidl::Error::NotNullable),
15829                Some(len) => len,
15830            };
15831            // Calling decoder.out_of_line_offset(0) is not allowed.
15832            if len == 0 {
15833                return Ok(());
15834            };
15835            depth.increment()?;
15836            let envelope_size = 8;
15837            let bytes_len = len * envelope_size;
15838            let offset = decoder.out_of_line_offset(bytes_len)?;
15839            // Decode the envelope for each type.
15840            let mut _next_ordinal_to_read = 0;
15841            let mut next_offset = offset;
15842            let end_offset = offset + bytes_len;
15843            _next_ordinal_to_read += 1;
15844            if next_offset >= end_offset {
15845                return Ok(());
15846            }
15847
15848            // Decode unknown envelopes for gaps in ordinals.
15849            while _next_ordinal_to_read < 1 {
15850                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15851                _next_ordinal_to_read += 1;
15852                next_offset += envelope_size;
15853            }
15854
15855            let next_out_of_line = decoder.next_out_of_line();
15856            let handles_before = decoder.remaining_handles();
15857            if let Some((inlined, num_bytes, num_handles)) =
15858                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15859            {
15860                let member_inline_size =
15861                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15862                if inlined != (member_inline_size <= 4) {
15863                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15864                }
15865                let inner_offset;
15866                let mut inner_depth = depth.clone();
15867                if inlined {
15868                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15869                    inner_offset = next_offset;
15870                } else {
15871                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15872                    inner_depth.increment()?;
15873                }
15874                let val_ref = self.tos.get_or_insert_with(|| fidl::new_empty!(u8, D));
15875                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
15876                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15877                {
15878                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15879                }
15880                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15881                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15882                }
15883            }
15884
15885            next_offset += envelope_size;
15886            _next_ordinal_to_read += 1;
15887            if next_offset >= end_offset {
15888                return Ok(());
15889            }
15890
15891            // Decode unknown envelopes for gaps in ordinals.
15892            while _next_ordinal_to_read < 2 {
15893                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15894                _next_ordinal_to_read += 1;
15895                next_offset += envelope_size;
15896            }
15897
15898            let next_out_of_line = decoder.next_out_of_line();
15899            let handles_before = decoder.remaining_handles();
15900            if let Some((inlined, num_bytes, num_handles)) =
15901                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15902            {
15903                let member_inline_size =
15904                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15905                if inlined != (member_inline_size <= 4) {
15906                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15907                }
15908                let inner_offset;
15909                let mut inner_depth = depth.clone();
15910                if inlined {
15911                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15912                    inner_offset = next_offset;
15913                } else {
15914                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15915                    inner_depth.increment()?;
15916                }
15917                let val_ref = self.ttl.get_or_insert_with(|| fidl::new_empty!(u8, D));
15918                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
15919                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15920                {
15921                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15922                }
15923                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15924                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15925                }
15926            }
15927
15928            next_offset += envelope_size;
15929            _next_ordinal_to_read += 1;
15930            if next_offset >= end_offset {
15931                return Ok(());
15932            }
15933
15934            // Decode unknown envelopes for gaps in ordinals.
15935            while _next_ordinal_to_read < 3 {
15936                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15937                _next_ordinal_to_read += 1;
15938                next_offset += envelope_size;
15939            }
15940
15941            let next_out_of_line = decoder.next_out_of_line();
15942            let handles_before = decoder.remaining_handles();
15943            if let Some((inlined, num_bytes, num_handles)) =
15944                fidl::encoding::decode_envelope_header(decoder, next_offset)?
15945            {
15946                let member_inline_size = <fidl_fuchsia_net_common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15947                if inlined != (member_inline_size <= 4) {
15948                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
15949                }
15950                let inner_offset;
15951                let mut inner_depth = depth.clone();
15952                if inlined {
15953                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15954                    inner_offset = next_offset;
15955                } else {
15956                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15957                    inner_depth.increment()?;
15958                }
15959                let val_ref = self.original_destination_address.get_or_insert_with(|| {
15960                    fidl::new_empty!(fidl_fuchsia_net_common::SocketAddress, D)
15961                });
15962                fidl::decode!(
15963                    fidl_fuchsia_net_common::SocketAddress,
15964                    D,
15965                    val_ref,
15966                    decoder,
15967                    inner_offset,
15968                    inner_depth
15969                )?;
15970                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15971                {
15972                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
15973                }
15974                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15975                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15976                }
15977            }
15978
15979            next_offset += envelope_size;
15980
15981            // Decode the remaining unknown envelopes.
15982            while next_offset < end_offset {
15983                _next_ordinal_to_read += 1;
15984                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15985                next_offset += envelope_size;
15986            }
15987
15988            Ok(())
15989        }
15990    }
15991
15992    impl IpSendControlData {
15993        #[inline(always)]
15994        fn max_ordinal_present(&self) -> u64 {
15995            if let Some(_) = self.ttl {
15996                return 2;
15997            }
15998            0
15999        }
16000    }
16001
16002    impl fidl::encoding::ValueTypeMarker for IpSendControlData {
16003        type Borrowed<'a> = &'a Self;
16004        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16005            value
16006        }
16007    }
16008
16009    unsafe impl fidl::encoding::TypeMarker for IpSendControlData {
16010        type Owned = Self;
16011
16012        #[inline(always)]
16013        fn inline_align(_context: fidl::encoding::Context) -> usize {
16014            8
16015        }
16016
16017        #[inline(always)]
16018        fn inline_size(_context: fidl::encoding::Context) -> usize {
16019            16
16020        }
16021    }
16022
16023    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpSendControlData, D>
16024        for &IpSendControlData
16025    {
16026        unsafe fn encode(
16027            self,
16028            encoder: &mut fidl::encoding::Encoder<'_, D>,
16029            offset: usize,
16030            mut depth: fidl::encoding::Depth,
16031        ) -> fidl::Result<()> {
16032            encoder.debug_check_bounds::<IpSendControlData>(offset);
16033            // Vector header
16034            let max_ordinal: u64 = self.max_ordinal_present();
16035            encoder.write_num(max_ordinal, offset);
16036            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16037            // Calling encoder.out_of_line_offset(0) is not allowed.
16038            if max_ordinal == 0 {
16039                return Ok(());
16040            }
16041            depth.increment()?;
16042            let envelope_size = 8;
16043            let bytes_len = max_ordinal as usize * envelope_size;
16044            #[allow(unused_variables)]
16045            let offset = encoder.out_of_line_offset(bytes_len);
16046            let mut _prev_end_offset: usize = 0;
16047            if 2 > max_ordinal {
16048                return Ok(());
16049            }
16050
16051            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16052            // are envelope_size bytes.
16053            let cur_offset: usize = (2 - 1) * envelope_size;
16054
16055            // Zero reserved fields.
16056            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16057
16058            // Safety:
16059            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16060            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16061            //   envelope_size bytes, there is always sufficient room.
16062            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16063                self.ttl.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16064                encoder,
16065                offset + cur_offset,
16066                depth,
16067            )?;
16068
16069            _prev_end_offset = cur_offset + envelope_size;
16070
16071            Ok(())
16072        }
16073    }
16074
16075    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpSendControlData {
16076        #[inline(always)]
16077        fn new_empty() -> Self {
16078            Self::default()
16079        }
16080
16081        unsafe fn decode(
16082            &mut self,
16083            decoder: &mut fidl::encoding::Decoder<'_, D>,
16084            offset: usize,
16085            mut depth: fidl::encoding::Depth,
16086        ) -> fidl::Result<()> {
16087            decoder.debug_check_bounds::<Self>(offset);
16088            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16089                None => return Err(fidl::Error::NotNullable),
16090                Some(len) => len,
16091            };
16092            // Calling decoder.out_of_line_offset(0) is not allowed.
16093            if len == 0 {
16094                return Ok(());
16095            };
16096            depth.increment()?;
16097            let envelope_size = 8;
16098            let bytes_len = len * envelope_size;
16099            let offset = decoder.out_of_line_offset(bytes_len)?;
16100            // Decode the envelope for each type.
16101            let mut _next_ordinal_to_read = 0;
16102            let mut next_offset = offset;
16103            let end_offset = offset + bytes_len;
16104            _next_ordinal_to_read += 1;
16105            if next_offset >= end_offset {
16106                return Ok(());
16107            }
16108
16109            // Decode unknown envelopes for gaps in ordinals.
16110            while _next_ordinal_to_read < 2 {
16111                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16112                _next_ordinal_to_read += 1;
16113                next_offset += envelope_size;
16114            }
16115
16116            let next_out_of_line = decoder.next_out_of_line();
16117            let handles_before = decoder.remaining_handles();
16118            if let Some((inlined, num_bytes, num_handles)) =
16119                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16120            {
16121                let member_inline_size =
16122                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16123                if inlined != (member_inline_size <= 4) {
16124                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16125                }
16126                let inner_offset;
16127                let mut inner_depth = depth.clone();
16128                if inlined {
16129                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16130                    inner_offset = next_offset;
16131                } else {
16132                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16133                    inner_depth.increment()?;
16134                }
16135                let val_ref = self.ttl.get_or_insert_with(|| fidl::new_empty!(u8, D));
16136                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16137                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16138                {
16139                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16140                }
16141                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16142                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16143                }
16144            }
16145
16146            next_offset += envelope_size;
16147
16148            // Decode the remaining unknown envelopes.
16149            while next_offset < end_offset {
16150                _next_ordinal_to_read += 1;
16151                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16152                next_offset += envelope_size;
16153            }
16154
16155            Ok(())
16156        }
16157    }
16158
16159    impl Ipv6RecvControlData {
16160        #[inline(always)]
16161        fn max_ordinal_present(&self) -> u64 {
16162            if let Some(_) = self.pktinfo {
16163                return 3;
16164            }
16165            if let Some(_) = self.hoplimit {
16166                return 2;
16167            }
16168            if let Some(_) = self.tclass {
16169                return 1;
16170            }
16171            0
16172        }
16173    }
16174
16175    impl fidl::encoding::ValueTypeMarker for Ipv6RecvControlData {
16176        type Borrowed<'a> = &'a Self;
16177        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16178            value
16179        }
16180    }
16181
16182    unsafe impl fidl::encoding::TypeMarker for Ipv6RecvControlData {
16183        type Owned = Self;
16184
16185        #[inline(always)]
16186        fn inline_align(_context: fidl::encoding::Context) -> usize {
16187            8
16188        }
16189
16190        #[inline(always)]
16191        fn inline_size(_context: fidl::encoding::Context) -> usize {
16192            16
16193        }
16194    }
16195
16196    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ipv6RecvControlData, D>
16197        for &Ipv6RecvControlData
16198    {
16199        unsafe fn encode(
16200            self,
16201            encoder: &mut fidl::encoding::Encoder<'_, D>,
16202            offset: usize,
16203            mut depth: fidl::encoding::Depth,
16204        ) -> fidl::Result<()> {
16205            encoder.debug_check_bounds::<Ipv6RecvControlData>(offset);
16206            // Vector header
16207            let max_ordinal: u64 = self.max_ordinal_present();
16208            encoder.write_num(max_ordinal, offset);
16209            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16210            // Calling encoder.out_of_line_offset(0) is not allowed.
16211            if max_ordinal == 0 {
16212                return Ok(());
16213            }
16214            depth.increment()?;
16215            let envelope_size = 8;
16216            let bytes_len = max_ordinal as usize * envelope_size;
16217            #[allow(unused_variables)]
16218            let offset = encoder.out_of_line_offset(bytes_len);
16219            let mut _prev_end_offset: usize = 0;
16220            if 1 > max_ordinal {
16221                return Ok(());
16222            }
16223
16224            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16225            // are envelope_size bytes.
16226            let cur_offset: usize = (1 - 1) * envelope_size;
16227
16228            // Zero reserved fields.
16229            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16230
16231            // Safety:
16232            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16233            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16234            //   envelope_size bytes, there is always sufficient room.
16235            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16236                self.tclass.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16237                encoder,
16238                offset + cur_offset,
16239                depth,
16240            )?;
16241
16242            _prev_end_offset = cur_offset + envelope_size;
16243            if 2 > max_ordinal {
16244                return Ok(());
16245            }
16246
16247            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16248            // are envelope_size bytes.
16249            let cur_offset: usize = (2 - 1) * envelope_size;
16250
16251            // Zero reserved fields.
16252            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16253
16254            // Safety:
16255            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16256            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16257            //   envelope_size bytes, there is always sufficient room.
16258            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16259                self.hoplimit.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16260                encoder,
16261                offset + cur_offset,
16262                depth,
16263            )?;
16264
16265            _prev_end_offset = cur_offset + envelope_size;
16266            if 3 > max_ordinal {
16267                return Ok(());
16268            }
16269
16270            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16271            // are envelope_size bytes.
16272            let cur_offset: usize = (3 - 1) * envelope_size;
16273
16274            // Zero reserved fields.
16275            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16276
16277            // Safety:
16278            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16279            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16280            //   envelope_size bytes, there is always sufficient room.
16281            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoRecvControlData, D>(
16282                self.pktinfo
16283                    .as_ref()
16284                    .map(<Ipv6PktInfoRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16285                encoder,
16286                offset + cur_offset,
16287                depth,
16288            )?;
16289
16290            _prev_end_offset = cur_offset + envelope_size;
16291
16292            Ok(())
16293        }
16294    }
16295
16296    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ipv6RecvControlData {
16297        #[inline(always)]
16298        fn new_empty() -> Self {
16299            Self::default()
16300        }
16301
16302        unsafe fn decode(
16303            &mut self,
16304            decoder: &mut fidl::encoding::Decoder<'_, D>,
16305            offset: usize,
16306            mut depth: fidl::encoding::Depth,
16307        ) -> fidl::Result<()> {
16308            decoder.debug_check_bounds::<Self>(offset);
16309            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16310                None => return Err(fidl::Error::NotNullable),
16311                Some(len) => len,
16312            };
16313            // Calling decoder.out_of_line_offset(0) is not allowed.
16314            if len == 0 {
16315                return Ok(());
16316            };
16317            depth.increment()?;
16318            let envelope_size = 8;
16319            let bytes_len = len * envelope_size;
16320            let offset = decoder.out_of_line_offset(bytes_len)?;
16321            // Decode the envelope for each type.
16322            let mut _next_ordinal_to_read = 0;
16323            let mut next_offset = offset;
16324            let end_offset = offset + bytes_len;
16325            _next_ordinal_to_read += 1;
16326            if next_offset >= end_offset {
16327                return Ok(());
16328            }
16329
16330            // Decode unknown envelopes for gaps in ordinals.
16331            while _next_ordinal_to_read < 1 {
16332                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16333                _next_ordinal_to_read += 1;
16334                next_offset += envelope_size;
16335            }
16336
16337            let next_out_of_line = decoder.next_out_of_line();
16338            let handles_before = decoder.remaining_handles();
16339            if let Some((inlined, num_bytes, num_handles)) =
16340                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16341            {
16342                let member_inline_size =
16343                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16344                if inlined != (member_inline_size <= 4) {
16345                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16346                }
16347                let inner_offset;
16348                let mut inner_depth = depth.clone();
16349                if inlined {
16350                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16351                    inner_offset = next_offset;
16352                } else {
16353                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16354                    inner_depth.increment()?;
16355                }
16356                let val_ref = self.tclass.get_or_insert_with(|| fidl::new_empty!(u8, D));
16357                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16358                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16359                {
16360                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16361                }
16362                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16363                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16364                }
16365            }
16366
16367            next_offset += envelope_size;
16368            _next_ordinal_to_read += 1;
16369            if next_offset >= end_offset {
16370                return Ok(());
16371            }
16372
16373            // Decode unknown envelopes for gaps in ordinals.
16374            while _next_ordinal_to_read < 2 {
16375                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16376                _next_ordinal_to_read += 1;
16377                next_offset += envelope_size;
16378            }
16379
16380            let next_out_of_line = decoder.next_out_of_line();
16381            let handles_before = decoder.remaining_handles();
16382            if let Some((inlined, num_bytes, num_handles)) =
16383                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16384            {
16385                let member_inline_size =
16386                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16387                if inlined != (member_inline_size <= 4) {
16388                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16389                }
16390                let inner_offset;
16391                let mut inner_depth = depth.clone();
16392                if inlined {
16393                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16394                    inner_offset = next_offset;
16395                } else {
16396                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16397                    inner_depth.increment()?;
16398                }
16399                let val_ref = self.hoplimit.get_or_insert_with(|| fidl::new_empty!(u8, D));
16400                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16401                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16402                {
16403                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16404                }
16405                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16406                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16407                }
16408            }
16409
16410            next_offset += envelope_size;
16411            _next_ordinal_to_read += 1;
16412            if next_offset >= end_offset {
16413                return Ok(());
16414            }
16415
16416            // Decode unknown envelopes for gaps in ordinals.
16417            while _next_ordinal_to_read < 3 {
16418                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16419                _next_ordinal_to_read += 1;
16420                next_offset += envelope_size;
16421            }
16422
16423            let next_out_of_line = decoder.next_out_of_line();
16424            let handles_before = decoder.remaining_handles();
16425            if let Some((inlined, num_bytes, num_handles)) =
16426                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16427            {
16428                let member_inline_size =
16429                    <Ipv6PktInfoRecvControlData as fidl::encoding::TypeMarker>::inline_size(
16430                        decoder.context,
16431                    );
16432                if inlined != (member_inline_size <= 4) {
16433                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16434                }
16435                let inner_offset;
16436                let mut inner_depth = depth.clone();
16437                if inlined {
16438                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16439                    inner_offset = next_offset;
16440                } else {
16441                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16442                    inner_depth.increment()?;
16443                }
16444                let val_ref = self
16445                    .pktinfo
16446                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoRecvControlData, D));
16447                fidl::decode!(
16448                    Ipv6PktInfoRecvControlData,
16449                    D,
16450                    val_ref,
16451                    decoder,
16452                    inner_offset,
16453                    inner_depth
16454                )?;
16455                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16456                {
16457                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16458                }
16459                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16460                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16461                }
16462            }
16463
16464            next_offset += envelope_size;
16465
16466            // Decode the remaining unknown envelopes.
16467            while next_offset < end_offset {
16468                _next_ordinal_to_read += 1;
16469                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16470                next_offset += envelope_size;
16471            }
16472
16473            Ok(())
16474        }
16475    }
16476
16477    impl Ipv6SendControlData {
16478        #[inline(always)]
16479        fn max_ordinal_present(&self) -> u64 {
16480            if let Some(_) = self.pktinfo {
16481                return 3;
16482            }
16483            if let Some(_) = self.hoplimit {
16484                return 2;
16485            }
16486            0
16487        }
16488    }
16489
16490    impl fidl::encoding::ValueTypeMarker for Ipv6SendControlData {
16491        type Borrowed<'a> = &'a Self;
16492        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16493            value
16494        }
16495    }
16496
16497    unsafe impl fidl::encoding::TypeMarker for Ipv6SendControlData {
16498        type Owned = Self;
16499
16500        #[inline(always)]
16501        fn inline_align(_context: fidl::encoding::Context) -> usize {
16502            8
16503        }
16504
16505        #[inline(always)]
16506        fn inline_size(_context: fidl::encoding::Context) -> usize {
16507            16
16508        }
16509    }
16510
16511    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ipv6SendControlData, D>
16512        for &Ipv6SendControlData
16513    {
16514        unsafe fn encode(
16515            self,
16516            encoder: &mut fidl::encoding::Encoder<'_, D>,
16517            offset: usize,
16518            mut depth: fidl::encoding::Depth,
16519        ) -> fidl::Result<()> {
16520            encoder.debug_check_bounds::<Ipv6SendControlData>(offset);
16521            // Vector header
16522            let max_ordinal: u64 = self.max_ordinal_present();
16523            encoder.write_num(max_ordinal, offset);
16524            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16525            // Calling encoder.out_of_line_offset(0) is not allowed.
16526            if max_ordinal == 0 {
16527                return Ok(());
16528            }
16529            depth.increment()?;
16530            let envelope_size = 8;
16531            let bytes_len = max_ordinal as usize * envelope_size;
16532            #[allow(unused_variables)]
16533            let offset = encoder.out_of_line_offset(bytes_len);
16534            let mut _prev_end_offset: usize = 0;
16535            if 2 > max_ordinal {
16536                return Ok(());
16537            }
16538
16539            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16540            // are envelope_size bytes.
16541            let cur_offset: usize = (2 - 1) * envelope_size;
16542
16543            // Zero reserved fields.
16544            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16545
16546            // Safety:
16547            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16548            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16549            //   envelope_size bytes, there is always sufficient room.
16550            fidl::encoding::encode_in_envelope_optional::<u8, D>(
16551                self.hoplimit.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
16552                encoder,
16553                offset + cur_offset,
16554                depth,
16555            )?;
16556
16557            _prev_end_offset = cur_offset + envelope_size;
16558            if 3 > max_ordinal {
16559                return Ok(());
16560            }
16561
16562            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16563            // are envelope_size bytes.
16564            let cur_offset: usize = (3 - 1) * envelope_size;
16565
16566            // Zero reserved fields.
16567            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16568
16569            // Safety:
16570            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16571            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16572            //   envelope_size bytes, there is always sufficient room.
16573            fidl::encoding::encode_in_envelope_optional::<Ipv6PktInfoSendControlData, D>(
16574                self.pktinfo
16575                    .as_ref()
16576                    .map(<Ipv6PktInfoSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
16577                encoder,
16578                offset + cur_offset,
16579                depth,
16580            )?;
16581
16582            _prev_end_offset = cur_offset + envelope_size;
16583
16584            Ok(())
16585        }
16586    }
16587
16588    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ipv6SendControlData {
16589        #[inline(always)]
16590        fn new_empty() -> Self {
16591            Self::default()
16592        }
16593
16594        unsafe fn decode(
16595            &mut self,
16596            decoder: &mut fidl::encoding::Decoder<'_, D>,
16597            offset: usize,
16598            mut depth: fidl::encoding::Depth,
16599        ) -> fidl::Result<()> {
16600            decoder.debug_check_bounds::<Self>(offset);
16601            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16602                None => return Err(fidl::Error::NotNullable),
16603                Some(len) => len,
16604            };
16605            // Calling decoder.out_of_line_offset(0) is not allowed.
16606            if len == 0 {
16607                return Ok(());
16608            };
16609            depth.increment()?;
16610            let envelope_size = 8;
16611            let bytes_len = len * envelope_size;
16612            let offset = decoder.out_of_line_offset(bytes_len)?;
16613            // Decode the envelope for each type.
16614            let mut _next_ordinal_to_read = 0;
16615            let mut next_offset = offset;
16616            let end_offset = offset + bytes_len;
16617            _next_ordinal_to_read += 1;
16618            if next_offset >= end_offset {
16619                return Ok(());
16620            }
16621
16622            // Decode unknown envelopes for gaps in ordinals.
16623            while _next_ordinal_to_read < 2 {
16624                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16625                _next_ordinal_to_read += 1;
16626                next_offset += envelope_size;
16627            }
16628
16629            let next_out_of_line = decoder.next_out_of_line();
16630            let handles_before = decoder.remaining_handles();
16631            if let Some((inlined, num_bytes, num_handles)) =
16632                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16633            {
16634                let member_inline_size =
16635                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16636                if inlined != (member_inline_size <= 4) {
16637                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16638                }
16639                let inner_offset;
16640                let mut inner_depth = depth.clone();
16641                if inlined {
16642                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16643                    inner_offset = next_offset;
16644                } else {
16645                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16646                    inner_depth.increment()?;
16647                }
16648                let val_ref = self.hoplimit.get_or_insert_with(|| fidl::new_empty!(u8, D));
16649                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
16650                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16651                {
16652                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16653                }
16654                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16655                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16656                }
16657            }
16658
16659            next_offset += envelope_size;
16660            _next_ordinal_to_read += 1;
16661            if next_offset >= end_offset {
16662                return Ok(());
16663            }
16664
16665            // Decode unknown envelopes for gaps in ordinals.
16666            while _next_ordinal_to_read < 3 {
16667                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16668                _next_ordinal_to_read += 1;
16669                next_offset += envelope_size;
16670            }
16671
16672            let next_out_of_line = decoder.next_out_of_line();
16673            let handles_before = decoder.remaining_handles();
16674            if let Some((inlined, num_bytes, num_handles)) =
16675                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16676            {
16677                let member_inline_size =
16678                    <Ipv6PktInfoSendControlData as fidl::encoding::TypeMarker>::inline_size(
16679                        decoder.context,
16680                    );
16681                if inlined != (member_inline_size <= 4) {
16682                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16683                }
16684                let inner_offset;
16685                let mut inner_depth = depth.clone();
16686                if inlined {
16687                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16688                    inner_offset = next_offset;
16689                } else {
16690                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16691                    inner_depth.increment()?;
16692                }
16693                let val_ref = self
16694                    .pktinfo
16695                    .get_or_insert_with(|| fidl::new_empty!(Ipv6PktInfoSendControlData, D));
16696                fidl::decode!(
16697                    Ipv6PktInfoSendControlData,
16698                    D,
16699                    val_ref,
16700                    decoder,
16701                    inner_offset,
16702                    inner_depth
16703                )?;
16704                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16705                {
16706                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16707                }
16708                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16709                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16710                }
16711            }
16712
16713            next_offset += envelope_size;
16714
16715            // Decode the remaining unknown envelopes.
16716            while next_offset < end_offset {
16717                _next_ordinal_to_read += 1;
16718                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16719                next_offset += envelope_size;
16720            }
16721
16722            Ok(())
16723        }
16724    }
16725
16726    impl NetworkSocketRecvControlData {
16727        #[inline(always)]
16728        fn max_ordinal_present(&self) -> u64 {
16729            if let Some(_) = self.ipv6 {
16730                return 3;
16731            }
16732            if let Some(_) = self.ip {
16733                return 2;
16734            }
16735            if let Some(_) = self.socket {
16736                return 1;
16737            }
16738            0
16739        }
16740    }
16741
16742    impl fidl::encoding::ValueTypeMarker for NetworkSocketRecvControlData {
16743        type Borrowed<'a> = &'a Self;
16744        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16745            value
16746        }
16747    }
16748
16749    unsafe impl fidl::encoding::TypeMarker for NetworkSocketRecvControlData {
16750        type Owned = Self;
16751
16752        #[inline(always)]
16753        fn inline_align(_context: fidl::encoding::Context) -> usize {
16754            8
16755        }
16756
16757        #[inline(always)]
16758        fn inline_size(_context: fidl::encoding::Context) -> usize {
16759            16
16760        }
16761    }
16762
16763    unsafe impl<D: fidl::encoding::ResourceDialect>
16764        fidl::encoding::Encode<NetworkSocketRecvControlData, D> for &NetworkSocketRecvControlData
16765    {
16766        unsafe fn encode(
16767            self,
16768            encoder: &mut fidl::encoding::Encoder<'_, D>,
16769            offset: usize,
16770            mut depth: fidl::encoding::Depth,
16771        ) -> fidl::Result<()> {
16772            encoder.debug_check_bounds::<NetworkSocketRecvControlData>(offset);
16773            // Vector header
16774            let max_ordinal: u64 = self.max_ordinal_present();
16775            encoder.write_num(max_ordinal, offset);
16776            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16777            // Calling encoder.out_of_line_offset(0) is not allowed.
16778            if max_ordinal == 0 {
16779                return Ok(());
16780            }
16781            depth.increment()?;
16782            let envelope_size = 8;
16783            let bytes_len = max_ordinal as usize * envelope_size;
16784            #[allow(unused_variables)]
16785            let offset = encoder.out_of_line_offset(bytes_len);
16786            let mut _prev_end_offset: usize = 0;
16787            if 1 > max_ordinal {
16788                return Ok(());
16789            }
16790
16791            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16792            // are envelope_size bytes.
16793            let cur_offset: usize = (1 - 1) * envelope_size;
16794
16795            // Zero reserved fields.
16796            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16797
16798            // Safety:
16799            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16800            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16801            //   envelope_size bytes, there is always sufficient room.
16802            fidl::encoding::encode_in_envelope_optional::<SocketRecvControlData, D>(
16803                self.socket
16804                    .as_ref()
16805                    .map(<SocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16806                encoder,
16807                offset + cur_offset,
16808                depth,
16809            )?;
16810
16811            _prev_end_offset = cur_offset + envelope_size;
16812            if 2 > max_ordinal {
16813                return Ok(());
16814            }
16815
16816            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16817            // are envelope_size bytes.
16818            let cur_offset: usize = (2 - 1) * envelope_size;
16819
16820            // Zero reserved fields.
16821            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16822
16823            // Safety:
16824            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16825            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16826            //   envelope_size bytes, there is always sufficient room.
16827            fidl::encoding::encode_in_envelope_optional::<IpRecvControlData, D>(
16828                self.ip
16829                    .as_ref()
16830                    .map(<IpRecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16831                encoder,
16832                offset + cur_offset,
16833                depth,
16834            )?;
16835
16836            _prev_end_offset = cur_offset + envelope_size;
16837            if 3 > max_ordinal {
16838                return Ok(());
16839            }
16840
16841            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
16842            // are envelope_size bytes.
16843            let cur_offset: usize = (3 - 1) * envelope_size;
16844
16845            // Zero reserved fields.
16846            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16847
16848            // Safety:
16849            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
16850            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
16851            //   envelope_size bytes, there is always sufficient room.
16852            fidl::encoding::encode_in_envelope_optional::<Ipv6RecvControlData, D>(
16853                self.ipv6
16854                    .as_ref()
16855                    .map(<Ipv6RecvControlData as fidl::encoding::ValueTypeMarker>::borrow),
16856                encoder,
16857                offset + cur_offset,
16858                depth,
16859            )?;
16860
16861            _prev_end_offset = cur_offset + envelope_size;
16862
16863            Ok(())
16864        }
16865    }
16866
16867    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16868        for NetworkSocketRecvControlData
16869    {
16870        #[inline(always)]
16871        fn new_empty() -> Self {
16872            Self::default()
16873        }
16874
16875        unsafe fn decode(
16876            &mut self,
16877            decoder: &mut fidl::encoding::Decoder<'_, D>,
16878            offset: usize,
16879            mut depth: fidl::encoding::Depth,
16880        ) -> fidl::Result<()> {
16881            decoder.debug_check_bounds::<Self>(offset);
16882            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16883                None => return Err(fidl::Error::NotNullable),
16884                Some(len) => len,
16885            };
16886            // Calling decoder.out_of_line_offset(0) is not allowed.
16887            if len == 0 {
16888                return Ok(());
16889            };
16890            depth.increment()?;
16891            let envelope_size = 8;
16892            let bytes_len = len * envelope_size;
16893            let offset = decoder.out_of_line_offset(bytes_len)?;
16894            // Decode the envelope for each type.
16895            let mut _next_ordinal_to_read = 0;
16896            let mut next_offset = offset;
16897            let end_offset = offset + bytes_len;
16898            _next_ordinal_to_read += 1;
16899            if next_offset >= end_offset {
16900                return Ok(());
16901            }
16902
16903            // Decode unknown envelopes for gaps in ordinals.
16904            while _next_ordinal_to_read < 1 {
16905                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16906                _next_ordinal_to_read += 1;
16907                next_offset += envelope_size;
16908            }
16909
16910            let next_out_of_line = decoder.next_out_of_line();
16911            let handles_before = decoder.remaining_handles();
16912            if let Some((inlined, num_bytes, num_handles)) =
16913                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16914            {
16915                let member_inline_size =
16916                    <SocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
16917                        decoder.context,
16918                    );
16919                if inlined != (member_inline_size <= 4) {
16920                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16921                }
16922                let inner_offset;
16923                let mut inner_depth = depth.clone();
16924                if inlined {
16925                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16926                    inner_offset = next_offset;
16927                } else {
16928                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16929                    inner_depth.increment()?;
16930                }
16931                let val_ref =
16932                    self.socket.get_or_insert_with(|| fidl::new_empty!(SocketRecvControlData, D));
16933                fidl::decode!(
16934                    SocketRecvControlData,
16935                    D,
16936                    val_ref,
16937                    decoder,
16938                    inner_offset,
16939                    inner_depth
16940                )?;
16941                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16942                {
16943                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16944                }
16945                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16946                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16947                }
16948            }
16949
16950            next_offset += envelope_size;
16951            _next_ordinal_to_read += 1;
16952            if next_offset >= end_offset {
16953                return Ok(());
16954            }
16955
16956            // Decode unknown envelopes for gaps in ordinals.
16957            while _next_ordinal_to_read < 2 {
16958                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16959                _next_ordinal_to_read += 1;
16960                next_offset += envelope_size;
16961            }
16962
16963            let next_out_of_line = decoder.next_out_of_line();
16964            let handles_before = decoder.remaining_handles();
16965            if let Some((inlined, num_bytes, num_handles)) =
16966                fidl::encoding::decode_envelope_header(decoder, next_offset)?
16967            {
16968                let member_inline_size =
16969                    <IpRecvControlData as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16970                if inlined != (member_inline_size <= 4) {
16971                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
16972                }
16973                let inner_offset;
16974                let mut inner_depth = depth.clone();
16975                if inlined {
16976                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16977                    inner_offset = next_offset;
16978                } else {
16979                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16980                    inner_depth.increment()?;
16981                }
16982                let val_ref = self.ip.get_or_insert_with(|| fidl::new_empty!(IpRecvControlData, D));
16983                fidl::decode!(IpRecvControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
16984                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16985                {
16986                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
16987                }
16988                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16989                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16990                }
16991            }
16992
16993            next_offset += envelope_size;
16994            _next_ordinal_to_read += 1;
16995            if next_offset >= end_offset {
16996                return Ok(());
16997            }
16998
16999            // Decode unknown envelopes for gaps in ordinals.
17000            while _next_ordinal_to_read < 3 {
17001                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17002                _next_ordinal_to_read += 1;
17003                next_offset += envelope_size;
17004            }
17005
17006            let next_out_of_line = decoder.next_out_of_line();
17007            let handles_before = decoder.remaining_handles();
17008            if let Some((inlined, num_bytes, num_handles)) =
17009                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17010            {
17011                let member_inline_size =
17012                    <Ipv6RecvControlData as fidl::encoding::TypeMarker>::inline_size(
17013                        decoder.context,
17014                    );
17015                if inlined != (member_inline_size <= 4) {
17016                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17017                }
17018                let inner_offset;
17019                let mut inner_depth = depth.clone();
17020                if inlined {
17021                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17022                    inner_offset = next_offset;
17023                } else {
17024                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17025                    inner_depth.increment()?;
17026                }
17027                let val_ref =
17028                    self.ipv6.get_or_insert_with(|| fidl::new_empty!(Ipv6RecvControlData, D));
17029                fidl::decode!(Ipv6RecvControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17030                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17031                {
17032                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17033                }
17034                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17035                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17036                }
17037            }
17038
17039            next_offset += envelope_size;
17040
17041            // Decode the remaining unknown envelopes.
17042            while next_offset < end_offset {
17043                _next_ordinal_to_read += 1;
17044                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17045                next_offset += envelope_size;
17046            }
17047
17048            Ok(())
17049        }
17050    }
17051
17052    impl NetworkSocketSendControlData {
17053        #[inline(always)]
17054        fn max_ordinal_present(&self) -> u64 {
17055            if let Some(_) = self.ipv6 {
17056                return 3;
17057            }
17058            if let Some(_) = self.ip {
17059                return 2;
17060            }
17061            if let Some(_) = self.socket {
17062                return 1;
17063            }
17064            0
17065        }
17066    }
17067
17068    impl fidl::encoding::ValueTypeMarker for NetworkSocketSendControlData {
17069        type Borrowed<'a> = &'a Self;
17070        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17071            value
17072        }
17073    }
17074
17075    unsafe impl fidl::encoding::TypeMarker for NetworkSocketSendControlData {
17076        type Owned = Self;
17077
17078        #[inline(always)]
17079        fn inline_align(_context: fidl::encoding::Context) -> usize {
17080            8
17081        }
17082
17083        #[inline(always)]
17084        fn inline_size(_context: fidl::encoding::Context) -> usize {
17085            16
17086        }
17087    }
17088
17089    unsafe impl<D: fidl::encoding::ResourceDialect>
17090        fidl::encoding::Encode<NetworkSocketSendControlData, D> for &NetworkSocketSendControlData
17091    {
17092        unsafe fn encode(
17093            self,
17094            encoder: &mut fidl::encoding::Encoder<'_, D>,
17095            offset: usize,
17096            mut depth: fidl::encoding::Depth,
17097        ) -> fidl::Result<()> {
17098            encoder.debug_check_bounds::<NetworkSocketSendControlData>(offset);
17099            // Vector header
17100            let max_ordinal: u64 = self.max_ordinal_present();
17101            encoder.write_num(max_ordinal, offset);
17102            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17103            // Calling encoder.out_of_line_offset(0) is not allowed.
17104            if max_ordinal == 0 {
17105                return Ok(());
17106            }
17107            depth.increment()?;
17108            let envelope_size = 8;
17109            let bytes_len = max_ordinal as usize * envelope_size;
17110            #[allow(unused_variables)]
17111            let offset = encoder.out_of_line_offset(bytes_len);
17112            let mut _prev_end_offset: usize = 0;
17113            if 1 > max_ordinal {
17114                return Ok(());
17115            }
17116
17117            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17118            // are envelope_size bytes.
17119            let cur_offset: usize = (1 - 1) * envelope_size;
17120
17121            // Zero reserved fields.
17122            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17123
17124            // Safety:
17125            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17126            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17127            //   envelope_size bytes, there is always sufficient room.
17128            fidl::encoding::encode_in_envelope_optional::<SocketSendControlData, D>(
17129                self.socket
17130                    .as_ref()
17131                    .map(<SocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17132                encoder,
17133                offset + cur_offset,
17134                depth,
17135            )?;
17136
17137            _prev_end_offset = cur_offset + envelope_size;
17138            if 2 > max_ordinal {
17139                return Ok(());
17140            }
17141
17142            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17143            // are envelope_size bytes.
17144            let cur_offset: usize = (2 - 1) * envelope_size;
17145
17146            // Zero reserved fields.
17147            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17148
17149            // Safety:
17150            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17151            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17152            //   envelope_size bytes, there is always sufficient room.
17153            fidl::encoding::encode_in_envelope_optional::<IpSendControlData, D>(
17154                self.ip
17155                    .as_ref()
17156                    .map(<IpSendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17157                encoder,
17158                offset + cur_offset,
17159                depth,
17160            )?;
17161
17162            _prev_end_offset = cur_offset + envelope_size;
17163            if 3 > max_ordinal {
17164                return Ok(());
17165            }
17166
17167            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17168            // are envelope_size bytes.
17169            let cur_offset: usize = (3 - 1) * envelope_size;
17170
17171            // Zero reserved fields.
17172            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17173
17174            // Safety:
17175            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17176            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17177            //   envelope_size bytes, there is always sufficient room.
17178            fidl::encoding::encode_in_envelope_optional::<Ipv6SendControlData, D>(
17179                self.ipv6
17180                    .as_ref()
17181                    .map(<Ipv6SendControlData as fidl::encoding::ValueTypeMarker>::borrow),
17182                encoder,
17183                offset + cur_offset,
17184                depth,
17185            )?;
17186
17187            _prev_end_offset = cur_offset + envelope_size;
17188
17189            Ok(())
17190        }
17191    }
17192
17193    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17194        for NetworkSocketSendControlData
17195    {
17196        #[inline(always)]
17197        fn new_empty() -> Self {
17198            Self::default()
17199        }
17200
17201        unsafe fn decode(
17202            &mut self,
17203            decoder: &mut fidl::encoding::Decoder<'_, D>,
17204            offset: usize,
17205            mut depth: fidl::encoding::Depth,
17206        ) -> fidl::Result<()> {
17207            decoder.debug_check_bounds::<Self>(offset);
17208            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17209                None => return Err(fidl::Error::NotNullable),
17210                Some(len) => len,
17211            };
17212            // Calling decoder.out_of_line_offset(0) is not allowed.
17213            if len == 0 {
17214                return Ok(());
17215            };
17216            depth.increment()?;
17217            let envelope_size = 8;
17218            let bytes_len = len * envelope_size;
17219            let offset = decoder.out_of_line_offset(bytes_len)?;
17220            // Decode the envelope for each type.
17221            let mut _next_ordinal_to_read = 0;
17222            let mut next_offset = offset;
17223            let end_offset = offset + bytes_len;
17224            _next_ordinal_to_read += 1;
17225            if next_offset >= end_offset {
17226                return Ok(());
17227            }
17228
17229            // Decode unknown envelopes for gaps in ordinals.
17230            while _next_ordinal_to_read < 1 {
17231                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17232                _next_ordinal_to_read += 1;
17233                next_offset += envelope_size;
17234            }
17235
17236            let next_out_of_line = decoder.next_out_of_line();
17237            let handles_before = decoder.remaining_handles();
17238            if let Some((inlined, num_bytes, num_handles)) =
17239                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17240            {
17241                let member_inline_size =
17242                    <SocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
17243                        decoder.context,
17244                    );
17245                if inlined != (member_inline_size <= 4) {
17246                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17247                }
17248                let inner_offset;
17249                let mut inner_depth = depth.clone();
17250                if inlined {
17251                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17252                    inner_offset = next_offset;
17253                } else {
17254                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17255                    inner_depth.increment()?;
17256                }
17257                let val_ref =
17258                    self.socket.get_or_insert_with(|| fidl::new_empty!(SocketSendControlData, D));
17259                fidl::decode!(
17260                    SocketSendControlData,
17261                    D,
17262                    val_ref,
17263                    decoder,
17264                    inner_offset,
17265                    inner_depth
17266                )?;
17267                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17268                {
17269                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17270                }
17271                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17272                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17273                }
17274            }
17275
17276            next_offset += envelope_size;
17277            _next_ordinal_to_read += 1;
17278            if next_offset >= end_offset {
17279                return Ok(());
17280            }
17281
17282            // Decode unknown envelopes for gaps in ordinals.
17283            while _next_ordinal_to_read < 2 {
17284                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17285                _next_ordinal_to_read += 1;
17286                next_offset += envelope_size;
17287            }
17288
17289            let next_out_of_line = decoder.next_out_of_line();
17290            let handles_before = decoder.remaining_handles();
17291            if let Some((inlined, num_bytes, num_handles)) =
17292                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17293            {
17294                let member_inline_size =
17295                    <IpSendControlData as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17296                if inlined != (member_inline_size <= 4) {
17297                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17298                }
17299                let inner_offset;
17300                let mut inner_depth = depth.clone();
17301                if inlined {
17302                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17303                    inner_offset = next_offset;
17304                } else {
17305                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17306                    inner_depth.increment()?;
17307                }
17308                let val_ref = self.ip.get_or_insert_with(|| fidl::new_empty!(IpSendControlData, D));
17309                fidl::decode!(IpSendControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17310                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17311                {
17312                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17313                }
17314                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17315                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17316                }
17317            }
17318
17319            next_offset += envelope_size;
17320            _next_ordinal_to_read += 1;
17321            if next_offset >= end_offset {
17322                return Ok(());
17323            }
17324
17325            // Decode unknown envelopes for gaps in ordinals.
17326            while _next_ordinal_to_read < 3 {
17327                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17328                _next_ordinal_to_read += 1;
17329                next_offset += envelope_size;
17330            }
17331
17332            let next_out_of_line = decoder.next_out_of_line();
17333            let handles_before = decoder.remaining_handles();
17334            if let Some((inlined, num_bytes, num_handles)) =
17335                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17336            {
17337                let member_inline_size =
17338                    <Ipv6SendControlData as fidl::encoding::TypeMarker>::inline_size(
17339                        decoder.context,
17340                    );
17341                if inlined != (member_inline_size <= 4) {
17342                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17343                }
17344                let inner_offset;
17345                let mut inner_depth = depth.clone();
17346                if inlined {
17347                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17348                    inner_offset = next_offset;
17349                } else {
17350                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17351                    inner_depth.increment()?;
17352                }
17353                let val_ref =
17354                    self.ipv6.get_or_insert_with(|| fidl::new_empty!(Ipv6SendControlData, D));
17355                fidl::decode!(Ipv6SendControlData, D, val_ref, decoder, inner_offset, inner_depth)?;
17356                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17357                {
17358                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17359                }
17360                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17361                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17362                }
17363            }
17364
17365            next_offset += envelope_size;
17366
17367            // Decode the remaining unknown envelopes.
17368            while next_offset < end_offset {
17369                _next_ordinal_to_read += 1;
17370                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17371                next_offset += envelope_size;
17372            }
17373
17374            Ok(())
17375        }
17376    }
17377
17378    impl RecvMsgMeta {
17379        #[inline(always)]
17380        fn max_ordinal_present(&self) -> u64 {
17381            if let Some(_) = self.payload_len {
17382                return 3;
17383            }
17384            if let Some(_) = self.control {
17385                return 2;
17386            }
17387            if let Some(_) = self.from {
17388                return 1;
17389            }
17390            0
17391        }
17392    }
17393
17394    impl fidl::encoding::ValueTypeMarker for RecvMsgMeta {
17395        type Borrowed<'a> = &'a Self;
17396        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17397            value
17398        }
17399    }
17400
17401    unsafe impl fidl::encoding::TypeMarker for RecvMsgMeta {
17402        type Owned = Self;
17403
17404        #[inline(always)]
17405        fn inline_align(_context: fidl::encoding::Context) -> usize {
17406            8
17407        }
17408
17409        #[inline(always)]
17410        fn inline_size(_context: fidl::encoding::Context) -> usize {
17411            16
17412        }
17413    }
17414
17415    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecvMsgMeta, D>
17416        for &RecvMsgMeta
17417    {
17418        unsafe fn encode(
17419            self,
17420            encoder: &mut fidl::encoding::Encoder<'_, D>,
17421            offset: usize,
17422            mut depth: fidl::encoding::Depth,
17423        ) -> fidl::Result<()> {
17424            encoder.debug_check_bounds::<RecvMsgMeta>(offset);
17425            // Vector header
17426            let max_ordinal: u64 = self.max_ordinal_present();
17427            encoder.write_num(max_ordinal, offset);
17428            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17429            // Calling encoder.out_of_line_offset(0) is not allowed.
17430            if max_ordinal == 0 {
17431                return Ok(());
17432            }
17433            depth.increment()?;
17434            let envelope_size = 8;
17435            let bytes_len = max_ordinal as usize * envelope_size;
17436            #[allow(unused_variables)]
17437            let offset = encoder.out_of_line_offset(bytes_len);
17438            let mut _prev_end_offset: usize = 0;
17439            if 1 > max_ordinal {
17440                return Ok(());
17441            }
17442
17443            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17444            // are envelope_size bytes.
17445            let cur_offset: usize = (1 - 1) * envelope_size;
17446
17447            // Zero reserved fields.
17448            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17449
17450            // Safety:
17451            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17452            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17453            //   envelope_size bytes, there is always sufficient room.
17454            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net_common::SocketAddress, D>(
17455            self.from.as_ref().map(<fidl_fuchsia_net_common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
17456            encoder, offset + cur_offset, depth
17457        )?;
17458
17459            _prev_end_offset = cur_offset + envelope_size;
17460            if 2 > max_ordinal {
17461                return Ok(());
17462            }
17463
17464            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17465            // are envelope_size bytes.
17466            let cur_offset: usize = (2 - 1) * envelope_size;
17467
17468            // Zero reserved fields.
17469            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17470
17471            // Safety:
17472            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17473            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17474            //   envelope_size bytes, there is always sufficient room.
17475            fidl::encoding::encode_in_envelope_optional::<DatagramSocketRecvControlData, D>(
17476                self.control.as_ref().map(
17477                    <DatagramSocketRecvControlData as fidl::encoding::ValueTypeMarker>::borrow,
17478                ),
17479                encoder,
17480                offset + cur_offset,
17481                depth,
17482            )?;
17483
17484            _prev_end_offset = cur_offset + envelope_size;
17485            if 3 > max_ordinal {
17486                return Ok(());
17487            }
17488
17489            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17490            // are envelope_size bytes.
17491            let cur_offset: usize = (3 - 1) * envelope_size;
17492
17493            // Zero reserved fields.
17494            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17495
17496            // Safety:
17497            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17498            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17499            //   envelope_size bytes, there is always sufficient room.
17500            fidl::encoding::encode_in_envelope_optional::<u16, D>(
17501                self.payload_len.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
17502                encoder,
17503                offset + cur_offset,
17504                depth,
17505            )?;
17506
17507            _prev_end_offset = cur_offset + envelope_size;
17508
17509            Ok(())
17510        }
17511    }
17512
17513    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecvMsgMeta {
17514        #[inline(always)]
17515        fn new_empty() -> Self {
17516            Self::default()
17517        }
17518
17519        unsafe fn decode(
17520            &mut self,
17521            decoder: &mut fidl::encoding::Decoder<'_, D>,
17522            offset: usize,
17523            mut depth: fidl::encoding::Depth,
17524        ) -> fidl::Result<()> {
17525            decoder.debug_check_bounds::<Self>(offset);
17526            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17527                None => return Err(fidl::Error::NotNullable),
17528                Some(len) => len,
17529            };
17530            // Calling decoder.out_of_line_offset(0) is not allowed.
17531            if len == 0 {
17532                return Ok(());
17533            };
17534            depth.increment()?;
17535            let envelope_size = 8;
17536            let bytes_len = len * envelope_size;
17537            let offset = decoder.out_of_line_offset(bytes_len)?;
17538            // Decode the envelope for each type.
17539            let mut _next_ordinal_to_read = 0;
17540            let mut next_offset = offset;
17541            let end_offset = offset + bytes_len;
17542            _next_ordinal_to_read += 1;
17543            if next_offset >= end_offset {
17544                return Ok(());
17545            }
17546
17547            // Decode unknown envelopes for gaps in ordinals.
17548            while _next_ordinal_to_read < 1 {
17549                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17550                _next_ordinal_to_read += 1;
17551                next_offset += envelope_size;
17552            }
17553
17554            let next_out_of_line = decoder.next_out_of_line();
17555            let handles_before = decoder.remaining_handles();
17556            if let Some((inlined, num_bytes, num_handles)) =
17557                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17558            {
17559                let member_inline_size = <fidl_fuchsia_net_common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17560                if inlined != (member_inline_size <= 4) {
17561                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17562                }
17563                let inner_offset;
17564                let mut inner_depth = depth.clone();
17565                if inlined {
17566                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17567                    inner_offset = next_offset;
17568                } else {
17569                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17570                    inner_depth.increment()?;
17571                }
17572                let val_ref = self.from.get_or_insert_with(|| {
17573                    fidl::new_empty!(fidl_fuchsia_net_common::SocketAddress, D)
17574                });
17575                fidl::decode!(
17576                    fidl_fuchsia_net_common::SocketAddress,
17577                    D,
17578                    val_ref,
17579                    decoder,
17580                    inner_offset,
17581                    inner_depth
17582                )?;
17583                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17584                {
17585                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17586                }
17587                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17588                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17589                }
17590            }
17591
17592            next_offset += envelope_size;
17593            _next_ordinal_to_read += 1;
17594            if next_offset >= end_offset {
17595                return Ok(());
17596            }
17597
17598            // Decode unknown envelopes for gaps in ordinals.
17599            while _next_ordinal_to_read < 2 {
17600                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17601                _next_ordinal_to_read += 1;
17602                next_offset += envelope_size;
17603            }
17604
17605            let next_out_of_line = decoder.next_out_of_line();
17606            let handles_before = decoder.remaining_handles();
17607            if let Some((inlined, num_bytes, num_handles)) =
17608                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17609            {
17610                let member_inline_size =
17611                    <DatagramSocketRecvControlData as fidl::encoding::TypeMarker>::inline_size(
17612                        decoder.context,
17613                    );
17614                if inlined != (member_inline_size <= 4) {
17615                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17616                }
17617                let inner_offset;
17618                let mut inner_depth = depth.clone();
17619                if inlined {
17620                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17621                    inner_offset = next_offset;
17622                } else {
17623                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17624                    inner_depth.increment()?;
17625                }
17626                let val_ref = self
17627                    .control
17628                    .get_or_insert_with(|| fidl::new_empty!(DatagramSocketRecvControlData, D));
17629                fidl::decode!(
17630                    DatagramSocketRecvControlData,
17631                    D,
17632                    val_ref,
17633                    decoder,
17634                    inner_offset,
17635                    inner_depth
17636                )?;
17637                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17638                {
17639                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17640                }
17641                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17642                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17643                }
17644            }
17645
17646            next_offset += envelope_size;
17647            _next_ordinal_to_read += 1;
17648            if next_offset >= end_offset {
17649                return Ok(());
17650            }
17651
17652            // Decode unknown envelopes for gaps in ordinals.
17653            while _next_ordinal_to_read < 3 {
17654                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17655                _next_ordinal_to_read += 1;
17656                next_offset += envelope_size;
17657            }
17658
17659            let next_out_of_line = decoder.next_out_of_line();
17660            let handles_before = decoder.remaining_handles();
17661            if let Some((inlined, num_bytes, num_handles)) =
17662                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17663            {
17664                let member_inline_size =
17665                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17666                if inlined != (member_inline_size <= 4) {
17667                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17668                }
17669                let inner_offset;
17670                let mut inner_depth = depth.clone();
17671                if inlined {
17672                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17673                    inner_offset = next_offset;
17674                } else {
17675                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17676                    inner_depth.increment()?;
17677                }
17678                let val_ref = self.payload_len.get_or_insert_with(|| fidl::new_empty!(u16, D));
17679                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
17680                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17681                {
17682                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17683                }
17684                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17685                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17686                }
17687            }
17688
17689            next_offset += envelope_size;
17690
17691            // Decode the remaining unknown envelopes.
17692            while next_offset < end_offset {
17693                _next_ordinal_to_read += 1;
17694                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17695                next_offset += envelope_size;
17696            }
17697
17698            Ok(())
17699        }
17700    }
17701
17702    impl SendMsgMeta {
17703        #[inline(always)]
17704        fn max_ordinal_present(&self) -> u64 {
17705            if let Some(_) = self.control {
17706                return 2;
17707            }
17708            if let Some(_) = self.to {
17709                return 1;
17710            }
17711            0
17712        }
17713    }
17714
17715    impl fidl::encoding::ValueTypeMarker for SendMsgMeta {
17716        type Borrowed<'a> = &'a Self;
17717        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17718            value
17719        }
17720    }
17721
17722    unsafe impl fidl::encoding::TypeMarker for SendMsgMeta {
17723        type Owned = Self;
17724
17725        #[inline(always)]
17726        fn inline_align(_context: fidl::encoding::Context) -> usize {
17727            8
17728        }
17729
17730        #[inline(always)]
17731        fn inline_size(_context: fidl::encoding::Context) -> usize {
17732            16
17733        }
17734    }
17735
17736    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SendMsgMeta, D>
17737        for &SendMsgMeta
17738    {
17739        unsafe fn encode(
17740            self,
17741            encoder: &mut fidl::encoding::Encoder<'_, D>,
17742            offset: usize,
17743            mut depth: fidl::encoding::Depth,
17744        ) -> fidl::Result<()> {
17745            encoder.debug_check_bounds::<SendMsgMeta>(offset);
17746            // Vector header
17747            let max_ordinal: u64 = self.max_ordinal_present();
17748            encoder.write_num(max_ordinal, offset);
17749            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17750            // Calling encoder.out_of_line_offset(0) is not allowed.
17751            if max_ordinal == 0 {
17752                return Ok(());
17753            }
17754            depth.increment()?;
17755            let envelope_size = 8;
17756            let bytes_len = max_ordinal as usize * envelope_size;
17757            #[allow(unused_variables)]
17758            let offset = encoder.out_of_line_offset(bytes_len);
17759            let mut _prev_end_offset: usize = 0;
17760            if 1 > max_ordinal {
17761                return Ok(());
17762            }
17763
17764            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17765            // are envelope_size bytes.
17766            let cur_offset: usize = (1 - 1) * envelope_size;
17767
17768            // Zero reserved fields.
17769            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17770
17771            // Safety:
17772            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17773            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17774            //   envelope_size bytes, there is always sufficient room.
17775            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net_common::SocketAddress, D>(
17776            self.to.as_ref().map(<fidl_fuchsia_net_common::SocketAddress as fidl::encoding::ValueTypeMarker>::borrow),
17777            encoder, offset + cur_offset, depth
17778        )?;
17779
17780            _prev_end_offset = cur_offset + envelope_size;
17781            if 2 > max_ordinal {
17782                return Ok(());
17783            }
17784
17785            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
17786            // are envelope_size bytes.
17787            let cur_offset: usize = (2 - 1) * envelope_size;
17788
17789            // Zero reserved fields.
17790            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17791
17792            // Safety:
17793            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
17794            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
17795            //   envelope_size bytes, there is always sufficient room.
17796            fidl::encoding::encode_in_envelope_optional::<DatagramSocketSendControlData, D>(
17797                self.control.as_ref().map(
17798                    <DatagramSocketSendControlData as fidl::encoding::ValueTypeMarker>::borrow,
17799                ),
17800                encoder,
17801                offset + cur_offset,
17802                depth,
17803            )?;
17804
17805            _prev_end_offset = cur_offset + envelope_size;
17806
17807            Ok(())
17808        }
17809    }
17810
17811    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SendMsgMeta {
17812        #[inline(always)]
17813        fn new_empty() -> Self {
17814            Self::default()
17815        }
17816
17817        unsafe fn decode(
17818            &mut self,
17819            decoder: &mut fidl::encoding::Decoder<'_, D>,
17820            offset: usize,
17821            mut depth: fidl::encoding::Depth,
17822        ) -> fidl::Result<()> {
17823            decoder.debug_check_bounds::<Self>(offset);
17824            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17825                None => return Err(fidl::Error::NotNullable),
17826                Some(len) => len,
17827            };
17828            // Calling decoder.out_of_line_offset(0) is not allowed.
17829            if len == 0 {
17830                return Ok(());
17831            };
17832            depth.increment()?;
17833            let envelope_size = 8;
17834            let bytes_len = len * envelope_size;
17835            let offset = decoder.out_of_line_offset(bytes_len)?;
17836            // Decode the envelope for each type.
17837            let mut _next_ordinal_to_read = 0;
17838            let mut next_offset = offset;
17839            let end_offset = offset + bytes_len;
17840            _next_ordinal_to_read += 1;
17841            if next_offset >= end_offset {
17842                return Ok(());
17843            }
17844
17845            // Decode unknown envelopes for gaps in ordinals.
17846            while _next_ordinal_to_read < 1 {
17847                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17848                _next_ordinal_to_read += 1;
17849                next_offset += envelope_size;
17850            }
17851
17852            let next_out_of_line = decoder.next_out_of_line();
17853            let handles_before = decoder.remaining_handles();
17854            if let Some((inlined, num_bytes, num_handles)) =
17855                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17856            {
17857                let member_inline_size = <fidl_fuchsia_net_common::SocketAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17858                if inlined != (member_inline_size <= 4) {
17859                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17860                }
17861                let inner_offset;
17862                let mut inner_depth = depth.clone();
17863                if inlined {
17864                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17865                    inner_offset = next_offset;
17866                } else {
17867                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17868                    inner_depth.increment()?;
17869                }
17870                let val_ref = self.to.get_or_insert_with(|| {
17871                    fidl::new_empty!(fidl_fuchsia_net_common::SocketAddress, D)
17872                });
17873                fidl::decode!(
17874                    fidl_fuchsia_net_common::SocketAddress,
17875                    D,
17876                    val_ref,
17877                    decoder,
17878                    inner_offset,
17879                    inner_depth
17880                )?;
17881                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17882                {
17883                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17884                }
17885                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17886                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17887                }
17888            }
17889
17890            next_offset += envelope_size;
17891            _next_ordinal_to_read += 1;
17892            if next_offset >= end_offset {
17893                return Ok(());
17894            }
17895
17896            // Decode unknown envelopes for gaps in ordinals.
17897            while _next_ordinal_to_read < 2 {
17898                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17899                _next_ordinal_to_read += 1;
17900                next_offset += envelope_size;
17901            }
17902
17903            let next_out_of_line = decoder.next_out_of_line();
17904            let handles_before = decoder.remaining_handles();
17905            if let Some((inlined, num_bytes, num_handles)) =
17906                fidl::encoding::decode_envelope_header(decoder, next_offset)?
17907            {
17908                let member_inline_size =
17909                    <DatagramSocketSendControlData as fidl::encoding::TypeMarker>::inline_size(
17910                        decoder.context,
17911                    );
17912                if inlined != (member_inline_size <= 4) {
17913                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
17914                }
17915                let inner_offset;
17916                let mut inner_depth = depth.clone();
17917                if inlined {
17918                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17919                    inner_offset = next_offset;
17920                } else {
17921                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17922                    inner_depth.increment()?;
17923                }
17924                let val_ref = self
17925                    .control
17926                    .get_or_insert_with(|| fidl::new_empty!(DatagramSocketSendControlData, D));
17927                fidl::decode!(
17928                    DatagramSocketSendControlData,
17929                    D,
17930                    val_ref,
17931                    decoder,
17932                    inner_offset,
17933                    inner_depth
17934                )?;
17935                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17936                {
17937                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
17938                }
17939                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17940                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17941                }
17942            }
17943
17944            next_offset += envelope_size;
17945
17946            // Decode the remaining unknown envelopes.
17947            while next_offset < end_offset {
17948                _next_ordinal_to_read += 1;
17949                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17950                next_offset += envelope_size;
17951            }
17952
17953            Ok(())
17954        }
17955    }
17956
17957    impl SocketRecvControlData {
17958        #[inline(always)]
17959        fn max_ordinal_present(&self) -> u64 {
17960            if let Some(_) = self.timestamp {
17961                return 3;
17962            }
17963            0
17964        }
17965    }
17966
17967    impl fidl::encoding::ValueTypeMarker for SocketRecvControlData {
17968        type Borrowed<'a> = &'a Self;
17969        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17970            value
17971        }
17972    }
17973
17974    unsafe impl fidl::encoding::TypeMarker for SocketRecvControlData {
17975        type Owned = Self;
17976
17977        #[inline(always)]
17978        fn inline_align(_context: fidl::encoding::Context) -> usize {
17979            8
17980        }
17981
17982        #[inline(always)]
17983        fn inline_size(_context: fidl::encoding::Context) -> usize {
17984            16
17985        }
17986    }
17987
17988    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketRecvControlData, D>
17989        for &SocketRecvControlData
17990    {
17991        unsafe fn encode(
17992            self,
17993            encoder: &mut fidl::encoding::Encoder<'_, D>,
17994            offset: usize,
17995            mut depth: fidl::encoding::Depth,
17996        ) -> fidl::Result<()> {
17997            encoder.debug_check_bounds::<SocketRecvControlData>(offset);
17998            // Vector header
17999            let max_ordinal: u64 = self.max_ordinal_present();
18000            encoder.write_num(max_ordinal, offset);
18001            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18002            // Calling encoder.out_of_line_offset(0) is not allowed.
18003            if max_ordinal == 0 {
18004                return Ok(());
18005            }
18006            depth.increment()?;
18007            let envelope_size = 8;
18008            let bytes_len = max_ordinal as usize * envelope_size;
18009            #[allow(unused_variables)]
18010            let offset = encoder.out_of_line_offset(bytes_len);
18011            let mut _prev_end_offset: usize = 0;
18012            if 3 > max_ordinal {
18013                return Ok(());
18014            }
18015
18016            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
18017            // are envelope_size bytes.
18018            let cur_offset: usize = (3 - 1) * envelope_size;
18019
18020            // Zero reserved fields.
18021            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18022
18023            // Safety:
18024            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
18025            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
18026            //   envelope_size bytes, there is always sufficient room.
18027            fidl::encoding::encode_in_envelope_optional::<Timestamp, D>(
18028                self.timestamp.as_ref().map(<Timestamp as fidl::encoding::ValueTypeMarker>::borrow),
18029                encoder,
18030                offset + cur_offset,
18031                depth,
18032            )?;
18033
18034            _prev_end_offset = cur_offset + envelope_size;
18035
18036            Ok(())
18037        }
18038    }
18039
18040    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketRecvControlData {
18041        #[inline(always)]
18042        fn new_empty() -> Self {
18043            Self::default()
18044        }
18045
18046        unsafe fn decode(
18047            &mut self,
18048            decoder: &mut fidl::encoding::Decoder<'_, D>,
18049            offset: usize,
18050            mut depth: fidl::encoding::Depth,
18051        ) -> fidl::Result<()> {
18052            decoder.debug_check_bounds::<Self>(offset);
18053            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18054                None => return Err(fidl::Error::NotNullable),
18055                Some(len) => len,
18056            };
18057            // Calling decoder.out_of_line_offset(0) is not allowed.
18058            if len == 0 {
18059                return Ok(());
18060            };
18061            depth.increment()?;
18062            let envelope_size = 8;
18063            let bytes_len = len * envelope_size;
18064            let offset = decoder.out_of_line_offset(bytes_len)?;
18065            // Decode the envelope for each type.
18066            let mut _next_ordinal_to_read = 0;
18067            let mut next_offset = offset;
18068            let end_offset = offset + bytes_len;
18069            _next_ordinal_to_read += 1;
18070            if next_offset >= end_offset {
18071                return Ok(());
18072            }
18073
18074            // Decode unknown envelopes for gaps in ordinals.
18075            while _next_ordinal_to_read < 3 {
18076                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18077                _next_ordinal_to_read += 1;
18078                next_offset += envelope_size;
18079            }
18080
18081            let next_out_of_line = decoder.next_out_of_line();
18082            let handles_before = decoder.remaining_handles();
18083            if let Some((inlined, num_bytes, num_handles)) =
18084                fidl::encoding::decode_envelope_header(decoder, next_offset)?
18085            {
18086                let member_inline_size =
18087                    <Timestamp as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18088                if inlined != (member_inline_size <= 4) {
18089                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
18090                }
18091                let inner_offset;
18092                let mut inner_depth = depth.clone();
18093                if inlined {
18094                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18095                    inner_offset = next_offset;
18096                } else {
18097                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18098                    inner_depth.increment()?;
18099                }
18100                let val_ref = self.timestamp.get_or_insert_with(|| fidl::new_empty!(Timestamp, D));
18101                fidl::decode!(Timestamp, D, val_ref, decoder, inner_offset, inner_depth)?;
18102                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18103                {
18104                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
18105                }
18106                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18107                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18108                }
18109            }
18110
18111            next_offset += envelope_size;
18112
18113            // Decode the remaining unknown envelopes.
18114            while next_offset < end_offset {
18115                _next_ordinal_to_read += 1;
18116                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18117                next_offset += envelope_size;
18118            }
18119
18120            Ok(())
18121        }
18122    }
18123
18124    impl SocketSendControlData {
18125        #[inline(always)]
18126        fn max_ordinal_present(&self) -> u64 {
18127            0
18128        }
18129    }
18130
18131    impl fidl::encoding::ValueTypeMarker for SocketSendControlData {
18132        type Borrowed<'a> = &'a Self;
18133        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18134            value
18135        }
18136    }
18137
18138    unsafe impl fidl::encoding::TypeMarker for SocketSendControlData {
18139        type Owned = Self;
18140
18141        #[inline(always)]
18142        fn inline_align(_context: fidl::encoding::Context) -> usize {
18143            8
18144        }
18145
18146        #[inline(always)]
18147        fn inline_size(_context: fidl::encoding::Context) -> usize {
18148            16
18149        }
18150    }
18151
18152    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SocketSendControlData, D>
18153        for &SocketSendControlData
18154    {
18155        unsafe fn encode(
18156            self,
18157            encoder: &mut fidl::encoding::Encoder<'_, D>,
18158            offset: usize,
18159            mut depth: fidl::encoding::Depth,
18160        ) -> fidl::Result<()> {
18161            encoder.debug_check_bounds::<SocketSendControlData>(offset);
18162            // Vector header
18163            let max_ordinal: u64 = self.max_ordinal_present();
18164            encoder.write_num(max_ordinal, offset);
18165            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18166            // Calling encoder.out_of_line_offset(0) is not allowed.
18167            if max_ordinal == 0 {
18168                return Ok(());
18169            }
18170            depth.increment()?;
18171            let envelope_size = 8;
18172            let bytes_len = max_ordinal as usize * envelope_size;
18173            #[allow(unused_variables)]
18174            let offset = encoder.out_of_line_offset(bytes_len);
18175            let mut _prev_end_offset: usize = 0;
18176
18177            Ok(())
18178        }
18179    }
18180
18181    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SocketSendControlData {
18182        #[inline(always)]
18183        fn new_empty() -> Self {
18184            Self::default()
18185        }
18186
18187        unsafe fn decode(
18188            &mut self,
18189            decoder: &mut fidl::encoding::Decoder<'_, D>,
18190            offset: usize,
18191            mut depth: fidl::encoding::Depth,
18192        ) -> fidl::Result<()> {
18193            decoder.debug_check_bounds::<Self>(offset);
18194            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18195                None => return Err(fidl::Error::NotNullable),
18196                Some(len) => len,
18197            };
18198            // Calling decoder.out_of_line_offset(0) is not allowed.
18199            if len == 0 {
18200                return Ok(());
18201            };
18202            depth.increment()?;
18203            let envelope_size = 8;
18204            let bytes_len = len * envelope_size;
18205            let offset = decoder.out_of_line_offset(bytes_len)?;
18206            // Decode the envelope for each type.
18207            let mut _next_ordinal_to_read = 0;
18208            let mut next_offset = offset;
18209            let end_offset = offset + bytes_len;
18210
18211            // Decode the remaining unknown envelopes.
18212            while next_offset < end_offset {
18213                _next_ordinal_to_read += 1;
18214                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18215                next_offset += envelope_size;
18216            }
18217
18218            Ok(())
18219        }
18220    }
18221
18222    impl fidl::encoding::ValueTypeMarker for OptionalUint32 {
18223        type Borrowed<'a> = &'a Self;
18224        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18225            value
18226        }
18227    }
18228
18229    unsafe impl fidl::encoding::TypeMarker for OptionalUint32 {
18230        type Owned = Self;
18231
18232        #[inline(always)]
18233        fn inline_align(_context: fidl::encoding::Context) -> usize {
18234            8
18235        }
18236
18237        #[inline(always)]
18238        fn inline_size(_context: fidl::encoding::Context) -> usize {
18239            16
18240        }
18241    }
18242
18243    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalUint32, D>
18244        for &OptionalUint32
18245    {
18246        #[inline]
18247        unsafe fn encode(
18248            self,
18249            encoder: &mut fidl::encoding::Encoder<'_, D>,
18250            offset: usize,
18251            _depth: fidl::encoding::Depth,
18252        ) -> fidl::Result<()> {
18253            encoder.debug_check_bounds::<OptionalUint32>(offset);
18254            encoder.write_num::<u64>(self.ordinal(), offset);
18255            match self {
18256                OptionalUint32::Value(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
18257                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
18258                    encoder,
18259                    offset + 8,
18260                    _depth,
18261                ),
18262                OptionalUint32::Unset(ref val) => fidl::encoding::encode_in_envelope::<Empty, D>(
18263                    <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
18264                    encoder,
18265                    offset + 8,
18266                    _depth,
18267                ),
18268            }
18269        }
18270    }
18271
18272    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalUint32 {
18273        #[inline(always)]
18274        fn new_empty() -> Self {
18275            Self::Value(fidl::new_empty!(u32, D))
18276        }
18277
18278        #[inline]
18279        unsafe fn decode(
18280            &mut self,
18281            decoder: &mut fidl::encoding::Decoder<'_, D>,
18282            offset: usize,
18283            mut depth: fidl::encoding::Depth,
18284        ) -> fidl::Result<()> {
18285            decoder.debug_check_bounds::<Self>(offset);
18286            #[allow(unused_variables)]
18287            let next_out_of_line = decoder.next_out_of_line();
18288            let handles_before = decoder.remaining_handles();
18289            let (ordinal, inlined, num_bytes, num_handles) =
18290                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
18291
18292            let member_inline_size = match ordinal {
18293                1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18294                2 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18295                _ => return Err(fidl::Error::UnknownUnionTag),
18296            };
18297
18298            if inlined != (member_inline_size <= 4) {
18299                return Err(fidl::Error::InvalidInlineBitInEnvelope);
18300            }
18301            let _inner_offset;
18302            if inlined {
18303                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
18304                _inner_offset = offset + 8;
18305            } else {
18306                depth.increment()?;
18307                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18308            }
18309            match ordinal {
18310                1 => {
18311                    #[allow(irrefutable_let_patterns)]
18312                    if let OptionalUint32::Value(_) = self {
18313                        // Do nothing, read the value into the object
18314                    } else {
18315                        // Initialize `self` to the right variant
18316                        *self = OptionalUint32::Value(fidl::new_empty!(u32, D));
18317                    }
18318                    #[allow(irrefutable_let_patterns)]
18319                    if let OptionalUint32::Value(ref mut val) = self {
18320                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
18321                    } else {
18322                        unreachable!()
18323                    }
18324                }
18325                2 => {
18326                    #[allow(irrefutable_let_patterns)]
18327                    if let OptionalUint32::Unset(_) = self {
18328                        // Do nothing, read the value into the object
18329                    } else {
18330                        // Initialize `self` to the right variant
18331                        *self = OptionalUint32::Unset(fidl::new_empty!(Empty, D));
18332                    }
18333                    #[allow(irrefutable_let_patterns)]
18334                    if let OptionalUint32::Unset(ref mut val) = self {
18335                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
18336                    } else {
18337                        unreachable!()
18338                    }
18339                }
18340                ordinal => panic!("unexpected ordinal {:?}", ordinal),
18341            }
18342            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
18343                return Err(fidl::Error::InvalidNumBytesInEnvelope);
18344            }
18345            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18346                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18347            }
18348            Ok(())
18349        }
18350    }
18351
18352    impl fidl::encoding::ValueTypeMarker for OptionalUint8 {
18353        type Borrowed<'a> = &'a Self;
18354        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18355            value
18356        }
18357    }
18358
18359    unsafe impl fidl::encoding::TypeMarker for OptionalUint8 {
18360        type Owned = Self;
18361
18362        #[inline(always)]
18363        fn inline_align(_context: fidl::encoding::Context) -> usize {
18364            8
18365        }
18366
18367        #[inline(always)]
18368        fn inline_size(_context: fidl::encoding::Context) -> usize {
18369            16
18370        }
18371    }
18372
18373    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalUint8, D>
18374        for &OptionalUint8
18375    {
18376        #[inline]
18377        unsafe fn encode(
18378            self,
18379            encoder: &mut fidl::encoding::Encoder<'_, D>,
18380            offset: usize,
18381            _depth: fidl::encoding::Depth,
18382        ) -> fidl::Result<()> {
18383            encoder.debug_check_bounds::<OptionalUint8>(offset);
18384            encoder.write_num::<u64>(self.ordinal(), offset);
18385            match self {
18386                OptionalUint8::Value(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
18387                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
18388                    encoder,
18389                    offset + 8,
18390                    _depth,
18391                ),
18392                OptionalUint8::Unset(ref val) => fidl::encoding::encode_in_envelope::<Empty, D>(
18393                    <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
18394                    encoder,
18395                    offset + 8,
18396                    _depth,
18397                ),
18398            }
18399        }
18400    }
18401
18402    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalUint8 {
18403        #[inline(always)]
18404        fn new_empty() -> Self {
18405            Self::Value(fidl::new_empty!(u8, D))
18406        }
18407
18408        #[inline]
18409        unsafe fn decode(
18410            &mut self,
18411            decoder: &mut fidl::encoding::Decoder<'_, D>,
18412            offset: usize,
18413            mut depth: fidl::encoding::Depth,
18414        ) -> fidl::Result<()> {
18415            decoder.debug_check_bounds::<Self>(offset);
18416            #[allow(unused_variables)]
18417            let next_out_of_line = decoder.next_out_of_line();
18418            let handles_before = decoder.remaining_handles();
18419            let (ordinal, inlined, num_bytes, num_handles) =
18420                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
18421
18422            let member_inline_size = match ordinal {
18423                1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18424                2 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18425                _ => return Err(fidl::Error::UnknownUnionTag),
18426            };
18427
18428            if inlined != (member_inline_size <= 4) {
18429                return Err(fidl::Error::InvalidInlineBitInEnvelope);
18430            }
18431            let _inner_offset;
18432            if inlined {
18433                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
18434                _inner_offset = offset + 8;
18435            } else {
18436                depth.increment()?;
18437                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18438            }
18439            match ordinal {
18440                1 => {
18441                    #[allow(irrefutable_let_patterns)]
18442                    if let OptionalUint8::Value(_) = self {
18443                        // Do nothing, read the value into the object
18444                    } else {
18445                        // Initialize `self` to the right variant
18446                        *self = OptionalUint8::Value(fidl::new_empty!(u8, D));
18447                    }
18448                    #[allow(irrefutable_let_patterns)]
18449                    if let OptionalUint8::Value(ref mut val) = self {
18450                        fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
18451                    } else {
18452                        unreachable!()
18453                    }
18454                }
18455                2 => {
18456                    #[allow(irrefutable_let_patterns)]
18457                    if let OptionalUint8::Unset(_) = self {
18458                        // Do nothing, read the value into the object
18459                    } else {
18460                        // Initialize `self` to the right variant
18461                        *self = OptionalUint8::Unset(fidl::new_empty!(Empty, D));
18462                    }
18463                    #[allow(irrefutable_let_patterns)]
18464                    if let OptionalUint8::Unset(ref mut val) = self {
18465                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
18466                    } else {
18467                        unreachable!()
18468                    }
18469                }
18470                ordinal => panic!("unexpected ordinal {:?}", ordinal),
18471            }
18472            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
18473                return Err(fidl::Error::InvalidNumBytesInEnvelope);
18474            }
18475            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18476                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18477            }
18478            Ok(())
18479        }
18480    }
18481}