1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11pub type Addresses = Vec<fidl_fuchsia_net::Ipv4Address>;
19
20pub type AsciiString = String;
28
29pub type Duration = u32;
33
34pub const MAX_DNS_SERVERS: u8 = 64;
48
49pub const MAX_ROUTERS: u8 = 64;
63
64bitflags! {
65 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
68 pub struct NodeTypes: u8 {
69 const B_NODE = 1;
71 const P_NODE = 2;
73 const M_NODE = 4;
75 const H_NODE = 8;
77 }
78}
79
80impl NodeTypes {
81 #[deprecated = "Strict bits should not use `has_unknown_bits`"]
82 #[inline(always)]
83 pub fn has_unknown_bits(&self) -> bool {
84 false
85 }
86
87 #[deprecated = "Strict bits should not use `get_unknown_bits`"]
88 #[inline(always)]
89 pub fn get_unknown_bits(&self) -> u8 {
90 0
91 }
92}
93
94#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
95#[repr(u32)]
96pub enum ClientExitReason {
97 ClientAlreadyExistsOnInterface = 1,
99 WatchConfigurationAlreadyPending = 2,
101 InvalidInterface = 3,
103 InvalidParams = 4,
105 NetworkUnreachable = 5,
108 UnableToOpenSocket = 6,
110 GracefulShutdown = 7,
112 AddressRemovedByUser = 8,
114 AddressStateProviderError = 9,
118}
119
120impl ClientExitReason {
121 #[inline]
122 pub fn from_primitive(prim: u32) -> Option<Self> {
123 match prim {
124 1 => Some(Self::ClientAlreadyExistsOnInterface),
125 2 => Some(Self::WatchConfigurationAlreadyPending),
126 3 => Some(Self::InvalidInterface),
127 4 => Some(Self::InvalidParams),
128 5 => Some(Self::NetworkUnreachable),
129 6 => Some(Self::UnableToOpenSocket),
130 7 => Some(Self::GracefulShutdown),
131 8 => Some(Self::AddressRemovedByUser),
132 9 => Some(Self::AddressStateProviderError),
133 _ => None,
134 }
135 }
136
137 #[inline]
138 pub const fn into_primitive(self) -> u32 {
139 self as u32
140 }
141
142 #[deprecated = "Strict enums should not use `is_unknown`"]
143 #[inline]
144 pub fn is_unknown(&self) -> bool {
145 false
146 }
147}
148
149#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
153#[repr(u8)]
154pub enum MessageType {
155 Dhcpdiscover = 1,
157 Dhcpoffer = 2,
159 Dhcprequest = 3,
161 Dhcpdecline = 4,
163 Dhcpack = 5,
165 Dhcpnak = 6,
167 Dhcprelease = 7,
169 Dhcpinform = 8,
171}
172
173impl MessageType {
174 #[inline]
175 pub fn from_primitive(prim: u8) -> Option<Self> {
176 match prim {
177 1 => Some(Self::Dhcpdiscover),
178 2 => Some(Self::Dhcpoffer),
179 3 => Some(Self::Dhcprequest),
180 4 => Some(Self::Dhcpdecline),
181 5 => Some(Self::Dhcpack),
182 6 => Some(Self::Dhcpnak),
183 7 => Some(Self::Dhcprelease),
184 8 => Some(Self::Dhcpinform),
185 _ => None,
186 }
187 }
188
189 #[inline]
190 pub const fn into_primitive(self) -> u8 {
191 self as u8
192 }
193
194 #[deprecated = "Strict enums should not use `is_unknown`"]
195 #[inline]
196 pub fn is_unknown(&self) -> bool {
197 false
198 }
199}
200
201#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
205#[repr(u32)]
206pub enum OptionCode {
207 SubnetMask = 1,
208 TimeOffset = 2,
209 Router = 3,
210 TimeServer = 4,
211 NameServer = 5,
212 DomainNameServer = 6,
213 LogServer = 7,
214 CookieServer = 8,
215 LprServer = 9,
216 ImpressServer = 10,
217 ResourceLocationServer = 11,
218 HostName = 12,
219 BootFileSize = 13,
220 MeritDumpFile = 14,
221 DomainName = 15,
222 SwapServer = 16,
223 RootPath = 17,
224 ExtensionsPath = 18,
225 IpForwarding = 19,
226 NonLocalSourceRouting = 20,
227 PolicyFilter = 21,
228 MaxDatagramReassemblySize = 22,
229 DefaultIpTtl = 23,
230 PathMtuAgingTimeout = 24,
231 PathMtuPlateauTable = 25,
232 InterfaceMtu = 26,
233 AllSubnetsLocal = 27,
234 BroadcastAddress = 28,
235 PerformMaskDiscovery = 29,
236 MaskSupplier = 30,
237 PerformRouterDiscovery = 31,
238 RouterSolicitationAddress = 32,
239 StaticRoute = 33,
240 TrailerEncapsulation = 34,
241 ArpCacheTimeout = 35,
242 EthernetEncapsulation = 36,
243 TcpDefaultTtl = 37,
244 TcpKeepaliveInterval = 38,
245 TcpKeepaliveGarbage = 39,
246 NetworkInformationServiceDomain = 40,
247 NetworkInformationServers = 41,
248 NetworkTimeProtocolServers = 42,
249 VendorSpecificInformation = 43,
250 NetbiosOverTcpipNameServer = 44,
251 NetbiosOverTcpipDatagramDistributionServer = 45,
252 NetbiosOverTcpipNodeType = 46,
253 NetbiosOverTcpipScope = 47,
254 XWindowSystemFontServer = 48,
255 XWindowSystemDisplayManager = 49,
256 NetworkInformationServicePlusDomain = 64,
257 NetworkInformationServicePlusServers = 65,
258 MobileIpHomeAgent = 68,
259 SmtpServer = 69,
260 Pop3Server = 70,
261 NntpServer = 71,
262 DefaultWwwServer = 72,
263 DefaultFingerServer = 73,
264 DefaultIrcServer = 74,
265 StreettalkServer = 75,
266 StreettalkDirectoryAssistanceServer = 76,
267 OptionOverload = 52,
268 TftpServerName = 66,
269 BootfileName = 67,
270 MaxDhcpMessageSize = 57,
271 RenewalTimeValue = 58,
272 RebindingTimeValue = 59,
273}
274
275impl OptionCode {
276 #[inline]
277 pub fn from_primitive(prim: u32) -> Option<Self> {
278 match prim {
279 1 => Some(Self::SubnetMask),
280 2 => Some(Self::TimeOffset),
281 3 => Some(Self::Router),
282 4 => Some(Self::TimeServer),
283 5 => Some(Self::NameServer),
284 6 => Some(Self::DomainNameServer),
285 7 => Some(Self::LogServer),
286 8 => Some(Self::CookieServer),
287 9 => Some(Self::LprServer),
288 10 => Some(Self::ImpressServer),
289 11 => Some(Self::ResourceLocationServer),
290 12 => Some(Self::HostName),
291 13 => Some(Self::BootFileSize),
292 14 => Some(Self::MeritDumpFile),
293 15 => Some(Self::DomainName),
294 16 => Some(Self::SwapServer),
295 17 => Some(Self::RootPath),
296 18 => Some(Self::ExtensionsPath),
297 19 => Some(Self::IpForwarding),
298 20 => Some(Self::NonLocalSourceRouting),
299 21 => Some(Self::PolicyFilter),
300 22 => Some(Self::MaxDatagramReassemblySize),
301 23 => Some(Self::DefaultIpTtl),
302 24 => Some(Self::PathMtuAgingTimeout),
303 25 => Some(Self::PathMtuPlateauTable),
304 26 => Some(Self::InterfaceMtu),
305 27 => Some(Self::AllSubnetsLocal),
306 28 => Some(Self::BroadcastAddress),
307 29 => Some(Self::PerformMaskDiscovery),
308 30 => Some(Self::MaskSupplier),
309 31 => Some(Self::PerformRouterDiscovery),
310 32 => Some(Self::RouterSolicitationAddress),
311 33 => Some(Self::StaticRoute),
312 34 => Some(Self::TrailerEncapsulation),
313 35 => Some(Self::ArpCacheTimeout),
314 36 => Some(Self::EthernetEncapsulation),
315 37 => Some(Self::TcpDefaultTtl),
316 38 => Some(Self::TcpKeepaliveInterval),
317 39 => Some(Self::TcpKeepaliveGarbage),
318 40 => Some(Self::NetworkInformationServiceDomain),
319 41 => Some(Self::NetworkInformationServers),
320 42 => Some(Self::NetworkTimeProtocolServers),
321 43 => Some(Self::VendorSpecificInformation),
322 44 => Some(Self::NetbiosOverTcpipNameServer),
323 45 => Some(Self::NetbiosOverTcpipDatagramDistributionServer),
324 46 => Some(Self::NetbiosOverTcpipNodeType),
325 47 => Some(Self::NetbiosOverTcpipScope),
326 48 => Some(Self::XWindowSystemFontServer),
327 49 => Some(Self::XWindowSystemDisplayManager),
328 64 => Some(Self::NetworkInformationServicePlusDomain),
329 65 => Some(Self::NetworkInformationServicePlusServers),
330 68 => Some(Self::MobileIpHomeAgent),
331 69 => Some(Self::SmtpServer),
332 70 => Some(Self::Pop3Server),
333 71 => Some(Self::NntpServer),
334 72 => Some(Self::DefaultWwwServer),
335 73 => Some(Self::DefaultFingerServer),
336 74 => Some(Self::DefaultIrcServer),
337 75 => Some(Self::StreettalkServer),
338 76 => Some(Self::StreettalkDirectoryAssistanceServer),
339 52 => Some(Self::OptionOverload),
340 66 => Some(Self::TftpServerName),
341 67 => Some(Self::BootfileName),
342 57 => Some(Self::MaxDhcpMessageSize),
343 58 => Some(Self::RenewalTimeValue),
344 59 => Some(Self::RebindingTimeValue),
345 _ => None,
346 }
347 }
348
349 #[inline]
350 pub const fn into_primitive(self) -> u32 {
351 self as u32
352 }
353
354 #[deprecated = "Strict enums should not use `is_unknown`"]
355 #[inline]
356 pub fn is_unknown(&self) -> bool {
357 false
358 }
359}
360
361#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
363#[repr(u8)]
364pub enum OptionOverloadValue {
365 File = 1,
367 Sname = 2,
369 Both = 3,
371}
372
373impl OptionOverloadValue {
374 #[inline]
375 pub fn from_primitive(prim: u8) -> Option<Self> {
376 match prim {
377 1 => Some(Self::File),
378 2 => Some(Self::Sname),
379 3 => Some(Self::Both),
380 _ => None,
381 }
382 }
383
384 #[inline]
385 pub const fn into_primitive(self) -> u8 {
386 self as u8
387 }
388
389 #[deprecated = "Strict enums should not use `is_unknown`"]
390 #[inline]
391 pub fn is_unknown(&self) -> bool {
392 false
393 }
394}
395
396#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
398#[repr(u32)]
399pub enum ParameterName {
400 IpAddrs = 0,
401 AddressPool = 1,
402 LeaseLength = 2,
403 PermittedMacs = 3,
404 StaticallyAssignedAddrs = 4,
405 ArpProbe = 5,
406 BoundDeviceNames = 6,
407}
408
409impl ParameterName {
410 #[inline]
411 pub fn from_primitive(prim: u32) -> Option<Self> {
412 match prim {
413 0 => Some(Self::IpAddrs),
414 1 => Some(Self::AddressPool),
415 2 => Some(Self::LeaseLength),
416 3 => Some(Self::PermittedMacs),
417 4 => Some(Self::StaticallyAssignedAddrs),
418 5 => Some(Self::ArpProbe),
419 6 => Some(Self::BoundDeviceNames),
420 _ => None,
421 }
422 }
423
424 #[inline]
425 pub const fn into_primitive(self) -> u32 {
426 self as u32
427 }
428
429 #[deprecated = "Strict enums should not use `is_unknown`"]
430 #[inline]
431 pub fn is_unknown(&self) -> bool {
432 false
433 }
434}
435
436#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
437pub struct ClientOnExitRequest {
438 pub reason: ClientExitReason,
439}
440
441impl fidl::Persistable for ClientOnExitRequest {}
442
443#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
444pub struct ServerGetOptionRequest {
445 pub code: OptionCode,
446}
447
448impl fidl::Persistable for ServerGetOptionRequest {}
449
450#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
451pub struct ServerGetParameterRequest {
452 pub name: ParameterName,
453}
454
455impl fidl::Persistable for ServerGetParameterRequest {}
456
457#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
458pub struct ServerIsServingResponse {
459 pub enabled: bool,
460}
461
462impl fidl::Persistable for ServerIsServingResponse {}
463
464#[derive(Clone, Debug, PartialEq)]
465pub struct ServerSetOptionRequest {
466 pub value: Option_,
467}
468
469impl fidl::Persistable for ServerSetOptionRequest {}
470
471#[derive(Clone, Debug, PartialEq)]
472pub struct ServerSetParameterRequest {
473 pub value: Parameter,
474}
475
476impl fidl::Persistable for ServerSetParameterRequest {}
477
478#[derive(Clone, Debug, PartialEq)]
479pub struct ServerGetOptionResponse {
480 pub value: Option_,
481}
482
483impl fidl::Persistable for ServerGetOptionResponse {}
484
485#[derive(Clone, Debug, PartialEq)]
486pub struct ServerGetParameterResponse {
487 pub value: Parameter,
488}
489
490impl fidl::Persistable for ServerGetParameterResponse {}
491
492#[derive(Clone, Debug, PartialEq)]
493pub struct ServerListOptionsResponse {
494 pub options: Vec<Option_>,
495}
496
497impl fidl::Persistable for ServerListOptionsResponse {}
498
499#[derive(Clone, Debug, PartialEq)]
500pub struct ServerListParametersResponse {
501 pub parameters: Vec<Parameter>,
502}
503
504impl fidl::Persistable for ServerListParametersResponse {}
505
506#[derive(Clone, Debug, Default, PartialEq)]
507pub struct AddressPool {
508 pub prefix_length: Option<u8>,
510 pub range_start: Option<fidl_fuchsia_net::Ipv4Address>,
513 pub range_stop: Option<fidl_fuchsia_net::Ipv4Address>,
516 #[doc(hidden)]
517 pub __source_breaking: fidl::marker::SourceBreaking,
518}
519
520impl fidl::Persistable for AddressPool {}
521
522#[derive(Clone, Debug, Default, PartialEq)]
525pub struct ConfigurationToRequest {
526 pub routers: Option<bool>,
532 pub dns_servers: Option<bool>,
537 #[doc(hidden)]
538 pub __source_breaking: fidl::marker::SourceBreaking,
539}
540
541impl fidl::Persistable for ConfigurationToRequest {}
542
543#[derive(Clone, Debug, Default, PartialEq)]
544pub struct LeaseLength {
545 pub default: Option<u32>,
548 pub max: Option<u32>,
552 #[doc(hidden)]
553 pub __source_breaking: fidl::marker::SourceBreaking,
554}
555
556impl fidl::Persistable for LeaseLength {}
557
558#[derive(Clone, Debug, Default, PartialEq)]
559pub struct NewClientParams {
560 pub configuration_to_request: Option<ConfigurationToRequest>,
566 pub request_ip_address: Option<bool>,
572 #[doc(hidden)]
573 pub __source_breaking: fidl::marker::SourceBreaking,
574}
575
576impl fidl::Persistable for NewClientParams {}
577
578#[derive(Clone, Debug, Default, PartialEq)]
579pub struct StaticAssignment {
580 pub host: Option<fidl_fuchsia_net::MacAddress>,
583 pub assigned_addr: Option<fidl_fuchsia_net::Ipv4Address>,
586 #[doc(hidden)]
587 pub __source_breaking: fidl::marker::SourceBreaking,
588}
589
590impl fidl::Persistable for StaticAssignment {}
591
592#[derive(Clone, Debug)]
609pub enum Option_ {
610 SubnetMask(fidl_fuchsia_net::Ipv4Address),
612 TimeOffset(i32),
615 Router(Vec<fidl_fuchsia_net::Ipv4Address>),
617 TimeServer(Vec<fidl_fuchsia_net::Ipv4Address>),
619 NameServer(Vec<fidl_fuchsia_net::Ipv4Address>),
621 DomainNameServer(Vec<fidl_fuchsia_net::Ipv4Address>),
623 LogServer(Vec<fidl_fuchsia_net::Ipv4Address>),
625 CookieServer(Vec<fidl_fuchsia_net::Ipv4Address>),
627 LprServer(Vec<fidl_fuchsia_net::Ipv4Address>),
629 ImpressServer(Vec<fidl_fuchsia_net::Ipv4Address>),
631 ResourceLocationServer(Vec<fidl_fuchsia_net::Ipv4Address>),
633 HostName(String),
635 BootFileSize(u16),
637 MeritDumpFile(String),
639 DomainName(String),
641 SwapServer(fidl_fuchsia_net::Ipv4Address),
643 RootPath(String),
645 ExtensionsPath(String),
649 IpForwarding(bool),
651 NonLocalSourceRouting(bool),
653 PolicyFilter(Vec<fidl_fuchsia_net::Ipv4Address>),
657 MaxDatagramReassemblySize(u16),
660 DefaultIpTtl(u8),
663 PathMtuAgingTimeout(u32),
665 PathMtuPlateauTable(Vec<u16>),
669 InterfaceMtu(u16),
671 AllSubnetsLocal(bool),
674 BroadcastAddress(fidl_fuchsia_net::Ipv4Address),
676 PerformMaskDiscovery(bool),
678 MaskSupplier(bool),
681 PerformRouterDiscovery(bool),
684 RouterSolicitationAddress(fidl_fuchsia_net::Ipv4Address),
686 StaticRoute(Vec<fidl_fuchsia_net::Ipv4Address>),
691 TrailerEncapsulation(bool),
694 ArpCacheTimeout(u32),
696 EthernetEncapsulation(bool),
699 TcpDefaultTtl(u8),
702 TcpKeepaliveInterval(u32),
706 TcpKeepaliveGarbage(bool),
709 NetworkInformationServiceDomain(String),
711 NetworkInformationServers(Vec<fidl_fuchsia_net::Ipv4Address>),
714 NetworkTimeProtocolServers(Vec<fidl_fuchsia_net::Ipv4Address>),
717 VendorSpecificInformation(Vec<u8>),
719 NetbiosOverTcpipNameServer(Vec<fidl_fuchsia_net::Ipv4Address>),
722 NetbiosOverTcpipDatagramDistributionServer(Vec<fidl_fuchsia_net::Ipv4Address>),
725 NetbiosOverTcpipNodeType(NodeTypes),
727 NetbiosOverTcpipScope(String),
729 XWindowSystemFontServer(Vec<fidl_fuchsia_net::Ipv4Address>),
732 XWindowSystemDisplayManager(Vec<fidl_fuchsia_net::Ipv4Address>),
735 NetworkInformationServicePlusDomain(String),
737 NetworkInformationServicePlusServers(Vec<fidl_fuchsia_net::Ipv4Address>),
740 MobileIpHomeAgent(Vec<fidl_fuchsia_net::Ipv4Address>),
743 SmtpServer(Vec<fidl_fuchsia_net::Ipv4Address>),
746 Pop3Server(Vec<fidl_fuchsia_net::Ipv4Address>),
749 NntpServer(Vec<fidl_fuchsia_net::Ipv4Address>),
752 DefaultWwwServer(Vec<fidl_fuchsia_net::Ipv4Address>),
755 DefaultFingerServer(Vec<fidl_fuchsia_net::Ipv4Address>),
758 DefaultIrcServer(Vec<fidl_fuchsia_net::Ipv4Address>),
761 StreettalkServer(Vec<fidl_fuchsia_net::Ipv4Address>),
764 StreettalkDirectoryAssistanceServer(Vec<fidl_fuchsia_net::Ipv4Address>),
767 OptionOverload(OptionOverloadValue),
771 TftpServerName(String),
774 BootfileName(String),
777 MaxDhcpMessageSize(u16),
780 RenewalTimeValue(u32),
783 RebindingTimeValue(u32),
786 #[doc(hidden)]
787 __SourceBreaking { unknown_ordinal: u64 },
788}
789
790#[macro_export]
792macro_rules! Option_Unknown {
793 () => {
794 _
795 };
796}
797
798impl PartialEq for Option_ {
800 fn eq(&self, other: &Self) -> bool {
801 match (self, other) {
802 (Self::SubnetMask(x), Self::SubnetMask(y)) => *x == *y,
803 (Self::TimeOffset(x), Self::TimeOffset(y)) => *x == *y,
804 (Self::Router(x), Self::Router(y)) => *x == *y,
805 (Self::TimeServer(x), Self::TimeServer(y)) => *x == *y,
806 (Self::NameServer(x), Self::NameServer(y)) => *x == *y,
807 (Self::DomainNameServer(x), Self::DomainNameServer(y)) => *x == *y,
808 (Self::LogServer(x), Self::LogServer(y)) => *x == *y,
809 (Self::CookieServer(x), Self::CookieServer(y)) => *x == *y,
810 (Self::LprServer(x), Self::LprServer(y)) => *x == *y,
811 (Self::ImpressServer(x), Self::ImpressServer(y)) => *x == *y,
812 (Self::ResourceLocationServer(x), Self::ResourceLocationServer(y)) => *x == *y,
813 (Self::HostName(x), Self::HostName(y)) => *x == *y,
814 (Self::BootFileSize(x), Self::BootFileSize(y)) => *x == *y,
815 (Self::MeritDumpFile(x), Self::MeritDumpFile(y)) => *x == *y,
816 (Self::DomainName(x), Self::DomainName(y)) => *x == *y,
817 (Self::SwapServer(x), Self::SwapServer(y)) => *x == *y,
818 (Self::RootPath(x), Self::RootPath(y)) => *x == *y,
819 (Self::ExtensionsPath(x), Self::ExtensionsPath(y)) => *x == *y,
820 (Self::IpForwarding(x), Self::IpForwarding(y)) => *x == *y,
821 (Self::NonLocalSourceRouting(x), Self::NonLocalSourceRouting(y)) => *x == *y,
822 (Self::PolicyFilter(x), Self::PolicyFilter(y)) => *x == *y,
823 (Self::MaxDatagramReassemblySize(x), Self::MaxDatagramReassemblySize(y)) => *x == *y,
824 (Self::DefaultIpTtl(x), Self::DefaultIpTtl(y)) => *x == *y,
825 (Self::PathMtuAgingTimeout(x), Self::PathMtuAgingTimeout(y)) => *x == *y,
826 (Self::PathMtuPlateauTable(x), Self::PathMtuPlateauTable(y)) => *x == *y,
827 (Self::InterfaceMtu(x), Self::InterfaceMtu(y)) => *x == *y,
828 (Self::AllSubnetsLocal(x), Self::AllSubnetsLocal(y)) => *x == *y,
829 (Self::BroadcastAddress(x), Self::BroadcastAddress(y)) => *x == *y,
830 (Self::PerformMaskDiscovery(x), Self::PerformMaskDiscovery(y)) => *x == *y,
831 (Self::MaskSupplier(x), Self::MaskSupplier(y)) => *x == *y,
832 (Self::PerformRouterDiscovery(x), Self::PerformRouterDiscovery(y)) => *x == *y,
833 (Self::RouterSolicitationAddress(x), Self::RouterSolicitationAddress(y)) => *x == *y,
834 (Self::StaticRoute(x), Self::StaticRoute(y)) => *x == *y,
835 (Self::TrailerEncapsulation(x), Self::TrailerEncapsulation(y)) => *x == *y,
836 (Self::ArpCacheTimeout(x), Self::ArpCacheTimeout(y)) => *x == *y,
837 (Self::EthernetEncapsulation(x), Self::EthernetEncapsulation(y)) => *x == *y,
838 (Self::TcpDefaultTtl(x), Self::TcpDefaultTtl(y)) => *x == *y,
839 (Self::TcpKeepaliveInterval(x), Self::TcpKeepaliveInterval(y)) => *x == *y,
840 (Self::TcpKeepaliveGarbage(x), Self::TcpKeepaliveGarbage(y)) => *x == *y,
841 (
842 Self::NetworkInformationServiceDomain(x),
843 Self::NetworkInformationServiceDomain(y),
844 ) => *x == *y,
845 (Self::NetworkInformationServers(x), Self::NetworkInformationServers(y)) => *x == *y,
846 (Self::NetworkTimeProtocolServers(x), Self::NetworkTimeProtocolServers(y)) => *x == *y,
847 (Self::VendorSpecificInformation(x), Self::VendorSpecificInformation(y)) => *x == *y,
848 (Self::NetbiosOverTcpipNameServer(x), Self::NetbiosOverTcpipNameServer(y)) => *x == *y,
849 (
850 Self::NetbiosOverTcpipDatagramDistributionServer(x),
851 Self::NetbiosOverTcpipDatagramDistributionServer(y),
852 ) => *x == *y,
853 (Self::NetbiosOverTcpipNodeType(x), Self::NetbiosOverTcpipNodeType(y)) => *x == *y,
854 (Self::NetbiosOverTcpipScope(x), Self::NetbiosOverTcpipScope(y)) => *x == *y,
855 (Self::XWindowSystemFontServer(x), Self::XWindowSystemFontServer(y)) => *x == *y,
856 (Self::XWindowSystemDisplayManager(x), Self::XWindowSystemDisplayManager(y)) => {
857 *x == *y
858 }
859 (
860 Self::NetworkInformationServicePlusDomain(x),
861 Self::NetworkInformationServicePlusDomain(y),
862 ) => *x == *y,
863 (
864 Self::NetworkInformationServicePlusServers(x),
865 Self::NetworkInformationServicePlusServers(y),
866 ) => *x == *y,
867 (Self::MobileIpHomeAgent(x), Self::MobileIpHomeAgent(y)) => *x == *y,
868 (Self::SmtpServer(x), Self::SmtpServer(y)) => *x == *y,
869 (Self::Pop3Server(x), Self::Pop3Server(y)) => *x == *y,
870 (Self::NntpServer(x), Self::NntpServer(y)) => *x == *y,
871 (Self::DefaultWwwServer(x), Self::DefaultWwwServer(y)) => *x == *y,
872 (Self::DefaultFingerServer(x), Self::DefaultFingerServer(y)) => *x == *y,
873 (Self::DefaultIrcServer(x), Self::DefaultIrcServer(y)) => *x == *y,
874 (Self::StreettalkServer(x), Self::StreettalkServer(y)) => *x == *y,
875 (
876 Self::StreettalkDirectoryAssistanceServer(x),
877 Self::StreettalkDirectoryAssistanceServer(y),
878 ) => *x == *y,
879 (Self::OptionOverload(x), Self::OptionOverload(y)) => *x == *y,
880 (Self::TftpServerName(x), Self::TftpServerName(y)) => *x == *y,
881 (Self::BootfileName(x), Self::BootfileName(y)) => *x == *y,
882 (Self::MaxDhcpMessageSize(x), Self::MaxDhcpMessageSize(y)) => *x == *y,
883 (Self::RenewalTimeValue(x), Self::RenewalTimeValue(y)) => *x == *y,
884 (Self::RebindingTimeValue(x), Self::RebindingTimeValue(y)) => *x == *y,
885 _ => false,
886 }
887 }
888}
889
890impl Option_ {
891 #[inline]
892 pub fn ordinal(&self) -> u64 {
893 match *self {
894 Self::SubnetMask(_) => 1,
895 Self::TimeOffset(_) => 2,
896 Self::Router(_) => 3,
897 Self::TimeServer(_) => 4,
898 Self::NameServer(_) => 5,
899 Self::DomainNameServer(_) => 6,
900 Self::LogServer(_) => 7,
901 Self::CookieServer(_) => 8,
902 Self::LprServer(_) => 9,
903 Self::ImpressServer(_) => 10,
904 Self::ResourceLocationServer(_) => 11,
905 Self::HostName(_) => 12,
906 Self::BootFileSize(_) => 13,
907 Self::MeritDumpFile(_) => 14,
908 Self::DomainName(_) => 15,
909 Self::SwapServer(_) => 16,
910 Self::RootPath(_) => 17,
911 Self::ExtensionsPath(_) => 18,
912 Self::IpForwarding(_) => 19,
913 Self::NonLocalSourceRouting(_) => 20,
914 Self::PolicyFilter(_) => 21,
915 Self::MaxDatagramReassemblySize(_) => 22,
916 Self::DefaultIpTtl(_) => 23,
917 Self::PathMtuAgingTimeout(_) => 24,
918 Self::PathMtuPlateauTable(_) => 25,
919 Self::InterfaceMtu(_) => 26,
920 Self::AllSubnetsLocal(_) => 27,
921 Self::BroadcastAddress(_) => 28,
922 Self::PerformMaskDiscovery(_) => 29,
923 Self::MaskSupplier(_) => 30,
924 Self::PerformRouterDiscovery(_) => 31,
925 Self::RouterSolicitationAddress(_) => 32,
926 Self::StaticRoute(_) => 33,
927 Self::TrailerEncapsulation(_) => 34,
928 Self::ArpCacheTimeout(_) => 35,
929 Self::EthernetEncapsulation(_) => 36,
930 Self::TcpDefaultTtl(_) => 37,
931 Self::TcpKeepaliveInterval(_) => 38,
932 Self::TcpKeepaliveGarbage(_) => 39,
933 Self::NetworkInformationServiceDomain(_) => 40,
934 Self::NetworkInformationServers(_) => 41,
935 Self::NetworkTimeProtocolServers(_) => 42,
936 Self::VendorSpecificInformation(_) => 43,
937 Self::NetbiosOverTcpipNameServer(_) => 44,
938 Self::NetbiosOverTcpipDatagramDistributionServer(_) => 45,
939 Self::NetbiosOverTcpipNodeType(_) => 46,
940 Self::NetbiosOverTcpipScope(_) => 47,
941 Self::XWindowSystemFontServer(_) => 48,
942 Self::XWindowSystemDisplayManager(_) => 49,
943 Self::NetworkInformationServicePlusDomain(_) => 50,
944 Self::NetworkInformationServicePlusServers(_) => 51,
945 Self::MobileIpHomeAgent(_) => 52,
946 Self::SmtpServer(_) => 53,
947 Self::Pop3Server(_) => 54,
948 Self::NntpServer(_) => 55,
949 Self::DefaultWwwServer(_) => 56,
950 Self::DefaultFingerServer(_) => 57,
951 Self::DefaultIrcServer(_) => 58,
952 Self::StreettalkServer(_) => 59,
953 Self::StreettalkDirectoryAssistanceServer(_) => 60,
954 Self::OptionOverload(_) => 61,
955 Self::TftpServerName(_) => 62,
956 Self::BootfileName(_) => 63,
957 Self::MaxDhcpMessageSize(_) => 64,
958 Self::RenewalTimeValue(_) => 65,
959 Self::RebindingTimeValue(_) => 66,
960 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
961 }
962 }
963
964 #[inline]
965 pub fn unknown_variant_for_testing() -> Self {
966 Self::__SourceBreaking { unknown_ordinal: 0 }
967 }
968
969 #[inline]
970 pub fn is_unknown(&self) -> bool {
971 match self {
972 Self::__SourceBreaking { .. } => true,
973 _ => false,
974 }
975 }
976}
977
978impl fidl::Persistable for Option_ {}
979
980#[derive(Clone, Debug)]
982pub enum Parameter {
983 IpAddrs(Vec<fidl_fuchsia_net::Ipv4Address>),
986 AddressPool(AddressPool),
1008 Lease(LeaseLength),
1010 PermittedMacs(Vec<fidl_fuchsia_net::MacAddress>),
1017 StaticallyAssignedAddrs(Vec<StaticAssignment>),
1023 ArpProbe(bool),
1027 BoundDeviceNames(Vec<String>),
1035 #[doc(hidden)]
1036 __SourceBreaking { unknown_ordinal: u64 },
1037}
1038
1039#[macro_export]
1041macro_rules! ParameterUnknown {
1042 () => {
1043 _
1044 };
1045}
1046
1047impl PartialEq for Parameter {
1049 fn eq(&self, other: &Self) -> bool {
1050 match (self, other) {
1051 (Self::IpAddrs(x), Self::IpAddrs(y)) => *x == *y,
1052 (Self::AddressPool(x), Self::AddressPool(y)) => *x == *y,
1053 (Self::Lease(x), Self::Lease(y)) => *x == *y,
1054 (Self::PermittedMacs(x), Self::PermittedMacs(y)) => *x == *y,
1055 (Self::StaticallyAssignedAddrs(x), Self::StaticallyAssignedAddrs(y)) => *x == *y,
1056 (Self::ArpProbe(x), Self::ArpProbe(y)) => *x == *y,
1057 (Self::BoundDeviceNames(x), Self::BoundDeviceNames(y)) => *x == *y,
1058 _ => false,
1059 }
1060 }
1061}
1062
1063impl Parameter {
1064 #[inline]
1065 pub fn ordinal(&self) -> u64 {
1066 match *self {
1067 Self::IpAddrs(_) => 1,
1068 Self::AddressPool(_) => 2,
1069 Self::Lease(_) => 3,
1070 Self::PermittedMacs(_) => 4,
1071 Self::StaticallyAssignedAddrs(_) => 5,
1072 Self::ArpProbe(_) => 6,
1073 Self::BoundDeviceNames(_) => 7,
1074 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1075 }
1076 }
1077
1078 #[inline]
1079 pub fn unknown_variant_for_testing() -> Self {
1080 Self::__SourceBreaking { unknown_ordinal: 0 }
1081 }
1082
1083 #[inline]
1084 pub fn is_unknown(&self) -> bool {
1085 match self {
1086 Self::__SourceBreaking { .. } => true,
1087 _ => false,
1088 }
1089 }
1090}
1091
1092impl fidl::Persistable for Parameter {}
1093
1094mod internal {
1095 use super::*;
1096 unsafe impl fidl::encoding::TypeMarker for NodeTypes {
1097 type Owned = Self;
1098
1099 #[inline(always)]
1100 fn inline_align(_context: fidl::encoding::Context) -> usize {
1101 1
1102 }
1103
1104 #[inline(always)]
1105 fn inline_size(_context: fidl::encoding::Context) -> usize {
1106 1
1107 }
1108 }
1109
1110 impl fidl::encoding::ValueTypeMarker for NodeTypes {
1111 type Borrowed<'a> = Self;
1112 #[inline(always)]
1113 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1114 *value
1115 }
1116 }
1117
1118 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for NodeTypes {
1119 #[inline]
1120 unsafe fn encode(
1121 self,
1122 encoder: &mut fidl::encoding::Encoder<'_, D>,
1123 offset: usize,
1124 _depth: fidl::encoding::Depth,
1125 ) -> fidl::Result<()> {
1126 encoder.debug_check_bounds::<Self>(offset);
1127 if self.bits() & Self::all().bits() != self.bits() {
1128 return Err(fidl::Error::InvalidBitsValue);
1129 }
1130 encoder.write_num(self.bits(), offset);
1131 Ok(())
1132 }
1133 }
1134
1135 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NodeTypes {
1136 #[inline(always)]
1137 fn new_empty() -> Self {
1138 Self::empty()
1139 }
1140
1141 #[inline]
1142 unsafe fn decode(
1143 &mut self,
1144 decoder: &mut fidl::encoding::Decoder<'_, D>,
1145 offset: usize,
1146 _depth: fidl::encoding::Depth,
1147 ) -> fidl::Result<()> {
1148 decoder.debug_check_bounds::<Self>(offset);
1149 let prim = decoder.read_num::<u8>(offset);
1150 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
1151 Ok(())
1152 }
1153 }
1154 unsafe impl fidl::encoding::TypeMarker for ClientExitReason {
1155 type Owned = Self;
1156
1157 #[inline(always)]
1158 fn inline_align(_context: fidl::encoding::Context) -> usize {
1159 std::mem::align_of::<u32>()
1160 }
1161
1162 #[inline(always)]
1163 fn inline_size(_context: fidl::encoding::Context) -> usize {
1164 std::mem::size_of::<u32>()
1165 }
1166
1167 #[inline(always)]
1168 fn encode_is_copy() -> bool {
1169 true
1170 }
1171
1172 #[inline(always)]
1173 fn decode_is_copy() -> bool {
1174 false
1175 }
1176 }
1177
1178 impl fidl::encoding::ValueTypeMarker for ClientExitReason {
1179 type Borrowed<'a> = Self;
1180 #[inline(always)]
1181 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1182 *value
1183 }
1184 }
1185
1186 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1187 for ClientExitReason
1188 {
1189 #[inline]
1190 unsafe fn encode(
1191 self,
1192 encoder: &mut fidl::encoding::Encoder<'_, D>,
1193 offset: usize,
1194 _depth: fidl::encoding::Depth,
1195 ) -> fidl::Result<()> {
1196 encoder.debug_check_bounds::<Self>(offset);
1197 encoder.write_num(self.into_primitive(), offset);
1198 Ok(())
1199 }
1200 }
1201
1202 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientExitReason {
1203 #[inline(always)]
1204 fn new_empty() -> Self {
1205 Self::ClientAlreadyExistsOnInterface
1206 }
1207
1208 #[inline]
1209 unsafe fn decode(
1210 &mut self,
1211 decoder: &mut fidl::encoding::Decoder<'_, D>,
1212 offset: usize,
1213 _depth: fidl::encoding::Depth,
1214 ) -> fidl::Result<()> {
1215 decoder.debug_check_bounds::<Self>(offset);
1216 let prim = decoder.read_num::<u32>(offset);
1217
1218 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1219 Ok(())
1220 }
1221 }
1222 unsafe impl fidl::encoding::TypeMarker for MessageType {
1223 type Owned = Self;
1224
1225 #[inline(always)]
1226 fn inline_align(_context: fidl::encoding::Context) -> usize {
1227 std::mem::align_of::<u8>()
1228 }
1229
1230 #[inline(always)]
1231 fn inline_size(_context: fidl::encoding::Context) -> usize {
1232 std::mem::size_of::<u8>()
1233 }
1234
1235 #[inline(always)]
1236 fn encode_is_copy() -> bool {
1237 true
1238 }
1239
1240 #[inline(always)]
1241 fn decode_is_copy() -> bool {
1242 false
1243 }
1244 }
1245
1246 impl fidl::encoding::ValueTypeMarker for MessageType {
1247 type Borrowed<'a> = Self;
1248 #[inline(always)]
1249 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1250 *value
1251 }
1252 }
1253
1254 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for MessageType {
1255 #[inline]
1256 unsafe fn encode(
1257 self,
1258 encoder: &mut fidl::encoding::Encoder<'_, D>,
1259 offset: usize,
1260 _depth: fidl::encoding::Depth,
1261 ) -> fidl::Result<()> {
1262 encoder.debug_check_bounds::<Self>(offset);
1263 encoder.write_num(self.into_primitive(), offset);
1264 Ok(())
1265 }
1266 }
1267
1268 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MessageType {
1269 #[inline(always)]
1270 fn new_empty() -> Self {
1271 Self::Dhcpdiscover
1272 }
1273
1274 #[inline]
1275 unsafe fn decode(
1276 &mut self,
1277 decoder: &mut fidl::encoding::Decoder<'_, D>,
1278 offset: usize,
1279 _depth: fidl::encoding::Depth,
1280 ) -> fidl::Result<()> {
1281 decoder.debug_check_bounds::<Self>(offset);
1282 let prim = decoder.read_num::<u8>(offset);
1283
1284 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1285 Ok(())
1286 }
1287 }
1288 unsafe impl fidl::encoding::TypeMarker for OptionCode {
1289 type Owned = Self;
1290
1291 #[inline(always)]
1292 fn inline_align(_context: fidl::encoding::Context) -> usize {
1293 std::mem::align_of::<u32>()
1294 }
1295
1296 #[inline(always)]
1297 fn inline_size(_context: fidl::encoding::Context) -> usize {
1298 std::mem::size_of::<u32>()
1299 }
1300
1301 #[inline(always)]
1302 fn encode_is_copy() -> bool {
1303 true
1304 }
1305
1306 #[inline(always)]
1307 fn decode_is_copy() -> bool {
1308 false
1309 }
1310 }
1311
1312 impl fidl::encoding::ValueTypeMarker for OptionCode {
1313 type Borrowed<'a> = Self;
1314 #[inline(always)]
1315 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1316 *value
1317 }
1318 }
1319
1320 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OptionCode {
1321 #[inline]
1322 unsafe fn encode(
1323 self,
1324 encoder: &mut fidl::encoding::Encoder<'_, D>,
1325 offset: usize,
1326 _depth: fidl::encoding::Depth,
1327 ) -> fidl::Result<()> {
1328 encoder.debug_check_bounds::<Self>(offset);
1329 encoder.write_num(self.into_primitive(), offset);
1330 Ok(())
1331 }
1332 }
1333
1334 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionCode {
1335 #[inline(always)]
1336 fn new_empty() -> Self {
1337 Self::SubnetMask
1338 }
1339
1340 #[inline]
1341 unsafe fn decode(
1342 &mut self,
1343 decoder: &mut fidl::encoding::Decoder<'_, D>,
1344 offset: usize,
1345 _depth: fidl::encoding::Depth,
1346 ) -> fidl::Result<()> {
1347 decoder.debug_check_bounds::<Self>(offset);
1348 let prim = decoder.read_num::<u32>(offset);
1349
1350 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1351 Ok(())
1352 }
1353 }
1354 unsafe impl fidl::encoding::TypeMarker for OptionOverloadValue {
1355 type Owned = Self;
1356
1357 #[inline(always)]
1358 fn inline_align(_context: fidl::encoding::Context) -> usize {
1359 std::mem::align_of::<u8>()
1360 }
1361
1362 #[inline(always)]
1363 fn inline_size(_context: fidl::encoding::Context) -> usize {
1364 std::mem::size_of::<u8>()
1365 }
1366
1367 #[inline(always)]
1368 fn encode_is_copy() -> bool {
1369 true
1370 }
1371
1372 #[inline(always)]
1373 fn decode_is_copy() -> bool {
1374 false
1375 }
1376 }
1377
1378 impl fidl::encoding::ValueTypeMarker for OptionOverloadValue {
1379 type Borrowed<'a> = Self;
1380 #[inline(always)]
1381 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1382 *value
1383 }
1384 }
1385
1386 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1387 for OptionOverloadValue
1388 {
1389 #[inline]
1390 unsafe fn encode(
1391 self,
1392 encoder: &mut fidl::encoding::Encoder<'_, D>,
1393 offset: usize,
1394 _depth: fidl::encoding::Depth,
1395 ) -> fidl::Result<()> {
1396 encoder.debug_check_bounds::<Self>(offset);
1397 encoder.write_num(self.into_primitive(), offset);
1398 Ok(())
1399 }
1400 }
1401
1402 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionOverloadValue {
1403 #[inline(always)]
1404 fn new_empty() -> Self {
1405 Self::File
1406 }
1407
1408 #[inline]
1409 unsafe fn decode(
1410 &mut self,
1411 decoder: &mut fidl::encoding::Decoder<'_, D>,
1412 offset: usize,
1413 _depth: fidl::encoding::Depth,
1414 ) -> fidl::Result<()> {
1415 decoder.debug_check_bounds::<Self>(offset);
1416 let prim = decoder.read_num::<u8>(offset);
1417
1418 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1419 Ok(())
1420 }
1421 }
1422 unsafe impl fidl::encoding::TypeMarker for ParameterName {
1423 type Owned = Self;
1424
1425 #[inline(always)]
1426 fn inline_align(_context: fidl::encoding::Context) -> usize {
1427 std::mem::align_of::<u32>()
1428 }
1429
1430 #[inline(always)]
1431 fn inline_size(_context: fidl::encoding::Context) -> usize {
1432 std::mem::size_of::<u32>()
1433 }
1434
1435 #[inline(always)]
1436 fn encode_is_copy() -> bool {
1437 true
1438 }
1439
1440 #[inline(always)]
1441 fn decode_is_copy() -> bool {
1442 false
1443 }
1444 }
1445
1446 impl fidl::encoding::ValueTypeMarker for ParameterName {
1447 type Borrowed<'a> = Self;
1448 #[inline(always)]
1449 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1450 *value
1451 }
1452 }
1453
1454 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ParameterName {
1455 #[inline]
1456 unsafe fn encode(
1457 self,
1458 encoder: &mut fidl::encoding::Encoder<'_, D>,
1459 offset: usize,
1460 _depth: fidl::encoding::Depth,
1461 ) -> fidl::Result<()> {
1462 encoder.debug_check_bounds::<Self>(offset);
1463 encoder.write_num(self.into_primitive(), offset);
1464 Ok(())
1465 }
1466 }
1467
1468 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ParameterName {
1469 #[inline(always)]
1470 fn new_empty() -> Self {
1471 Self::IpAddrs
1472 }
1473
1474 #[inline]
1475 unsafe fn decode(
1476 &mut self,
1477 decoder: &mut fidl::encoding::Decoder<'_, D>,
1478 offset: usize,
1479 _depth: fidl::encoding::Depth,
1480 ) -> fidl::Result<()> {
1481 decoder.debug_check_bounds::<Self>(offset);
1482 let prim = decoder.read_num::<u32>(offset);
1483
1484 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1485 Ok(())
1486 }
1487 }
1488
1489 impl fidl::encoding::ValueTypeMarker for ClientOnExitRequest {
1490 type Borrowed<'a> = &'a Self;
1491 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1492 value
1493 }
1494 }
1495
1496 unsafe impl fidl::encoding::TypeMarker for ClientOnExitRequest {
1497 type Owned = Self;
1498
1499 #[inline(always)]
1500 fn inline_align(_context: fidl::encoding::Context) -> usize {
1501 4
1502 }
1503
1504 #[inline(always)]
1505 fn inline_size(_context: fidl::encoding::Context) -> usize {
1506 4
1507 }
1508 }
1509
1510 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientOnExitRequest, D>
1511 for &ClientOnExitRequest
1512 {
1513 #[inline]
1514 unsafe fn encode(
1515 self,
1516 encoder: &mut fidl::encoding::Encoder<'_, D>,
1517 offset: usize,
1518 _depth: fidl::encoding::Depth,
1519 ) -> fidl::Result<()> {
1520 encoder.debug_check_bounds::<ClientOnExitRequest>(offset);
1521 fidl::encoding::Encode::<ClientOnExitRequest, D>::encode(
1523 (<ClientExitReason as fidl::encoding::ValueTypeMarker>::borrow(&self.reason),),
1524 encoder,
1525 offset,
1526 _depth,
1527 )
1528 }
1529 }
1530 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ClientExitReason, D>>
1531 fidl::encoding::Encode<ClientOnExitRequest, D> for (T0,)
1532 {
1533 #[inline]
1534 unsafe fn encode(
1535 self,
1536 encoder: &mut fidl::encoding::Encoder<'_, D>,
1537 offset: usize,
1538 depth: fidl::encoding::Depth,
1539 ) -> fidl::Result<()> {
1540 encoder.debug_check_bounds::<ClientOnExitRequest>(offset);
1541 self.0.encode(encoder, offset + 0, depth)?;
1545 Ok(())
1546 }
1547 }
1548
1549 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientOnExitRequest {
1550 #[inline(always)]
1551 fn new_empty() -> Self {
1552 Self { reason: fidl::new_empty!(ClientExitReason, D) }
1553 }
1554
1555 #[inline]
1556 unsafe fn decode(
1557 &mut self,
1558 decoder: &mut fidl::encoding::Decoder<'_, D>,
1559 offset: usize,
1560 _depth: fidl::encoding::Depth,
1561 ) -> fidl::Result<()> {
1562 decoder.debug_check_bounds::<Self>(offset);
1563 fidl::decode!(ClientExitReason, D, &mut self.reason, decoder, offset + 0, _depth)?;
1565 Ok(())
1566 }
1567 }
1568
1569 impl fidl::encoding::ValueTypeMarker for ServerGetOptionRequest {
1570 type Borrowed<'a> = &'a Self;
1571 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1572 value
1573 }
1574 }
1575
1576 unsafe impl fidl::encoding::TypeMarker for ServerGetOptionRequest {
1577 type Owned = Self;
1578
1579 #[inline(always)]
1580 fn inline_align(_context: fidl::encoding::Context) -> usize {
1581 4
1582 }
1583
1584 #[inline(always)]
1585 fn inline_size(_context: fidl::encoding::Context) -> usize {
1586 4
1587 }
1588 }
1589
1590 unsafe impl<D: fidl::encoding::ResourceDialect>
1591 fidl::encoding::Encode<ServerGetOptionRequest, D> for &ServerGetOptionRequest
1592 {
1593 #[inline]
1594 unsafe fn encode(
1595 self,
1596 encoder: &mut fidl::encoding::Encoder<'_, D>,
1597 offset: usize,
1598 _depth: fidl::encoding::Depth,
1599 ) -> fidl::Result<()> {
1600 encoder.debug_check_bounds::<ServerGetOptionRequest>(offset);
1601 fidl::encoding::Encode::<ServerGetOptionRequest, D>::encode(
1603 (<OptionCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
1604 encoder,
1605 offset,
1606 _depth,
1607 )
1608 }
1609 }
1610 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<OptionCode, D>>
1611 fidl::encoding::Encode<ServerGetOptionRequest, D> for (T0,)
1612 {
1613 #[inline]
1614 unsafe fn encode(
1615 self,
1616 encoder: &mut fidl::encoding::Encoder<'_, D>,
1617 offset: usize,
1618 depth: fidl::encoding::Depth,
1619 ) -> fidl::Result<()> {
1620 encoder.debug_check_bounds::<ServerGetOptionRequest>(offset);
1621 self.0.encode(encoder, offset + 0, depth)?;
1625 Ok(())
1626 }
1627 }
1628
1629 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1630 for ServerGetOptionRequest
1631 {
1632 #[inline(always)]
1633 fn new_empty() -> Self {
1634 Self { code: fidl::new_empty!(OptionCode, D) }
1635 }
1636
1637 #[inline]
1638 unsafe fn decode(
1639 &mut self,
1640 decoder: &mut fidl::encoding::Decoder<'_, D>,
1641 offset: usize,
1642 _depth: fidl::encoding::Depth,
1643 ) -> fidl::Result<()> {
1644 decoder.debug_check_bounds::<Self>(offset);
1645 fidl::decode!(OptionCode, D, &mut self.code, decoder, offset + 0, _depth)?;
1647 Ok(())
1648 }
1649 }
1650
1651 impl fidl::encoding::ValueTypeMarker for ServerGetParameterRequest {
1652 type Borrowed<'a> = &'a Self;
1653 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1654 value
1655 }
1656 }
1657
1658 unsafe impl fidl::encoding::TypeMarker for ServerGetParameterRequest {
1659 type Owned = Self;
1660
1661 #[inline(always)]
1662 fn inline_align(_context: fidl::encoding::Context) -> usize {
1663 4
1664 }
1665
1666 #[inline(always)]
1667 fn inline_size(_context: fidl::encoding::Context) -> usize {
1668 4
1669 }
1670 }
1671
1672 unsafe impl<D: fidl::encoding::ResourceDialect>
1673 fidl::encoding::Encode<ServerGetParameterRequest, D> for &ServerGetParameterRequest
1674 {
1675 #[inline]
1676 unsafe fn encode(
1677 self,
1678 encoder: &mut fidl::encoding::Encoder<'_, D>,
1679 offset: usize,
1680 _depth: fidl::encoding::Depth,
1681 ) -> fidl::Result<()> {
1682 encoder.debug_check_bounds::<ServerGetParameterRequest>(offset);
1683 fidl::encoding::Encode::<ServerGetParameterRequest, D>::encode(
1685 (<ParameterName as fidl::encoding::ValueTypeMarker>::borrow(&self.name),),
1686 encoder,
1687 offset,
1688 _depth,
1689 )
1690 }
1691 }
1692 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ParameterName, D>>
1693 fidl::encoding::Encode<ServerGetParameterRequest, D> for (T0,)
1694 {
1695 #[inline]
1696 unsafe fn encode(
1697 self,
1698 encoder: &mut fidl::encoding::Encoder<'_, D>,
1699 offset: usize,
1700 depth: fidl::encoding::Depth,
1701 ) -> fidl::Result<()> {
1702 encoder.debug_check_bounds::<ServerGetParameterRequest>(offset);
1703 self.0.encode(encoder, offset + 0, depth)?;
1707 Ok(())
1708 }
1709 }
1710
1711 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1712 for ServerGetParameterRequest
1713 {
1714 #[inline(always)]
1715 fn new_empty() -> Self {
1716 Self { name: fidl::new_empty!(ParameterName, D) }
1717 }
1718
1719 #[inline]
1720 unsafe fn decode(
1721 &mut self,
1722 decoder: &mut fidl::encoding::Decoder<'_, D>,
1723 offset: usize,
1724 _depth: fidl::encoding::Depth,
1725 ) -> fidl::Result<()> {
1726 decoder.debug_check_bounds::<Self>(offset);
1727 fidl::decode!(ParameterName, D, &mut self.name, decoder, offset + 0, _depth)?;
1729 Ok(())
1730 }
1731 }
1732
1733 impl fidl::encoding::ValueTypeMarker for ServerIsServingResponse {
1734 type Borrowed<'a> = &'a Self;
1735 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1736 value
1737 }
1738 }
1739
1740 unsafe impl fidl::encoding::TypeMarker for ServerIsServingResponse {
1741 type Owned = Self;
1742
1743 #[inline(always)]
1744 fn inline_align(_context: fidl::encoding::Context) -> usize {
1745 1
1746 }
1747
1748 #[inline(always)]
1749 fn inline_size(_context: fidl::encoding::Context) -> usize {
1750 1
1751 }
1752 }
1753
1754 unsafe impl<D: fidl::encoding::ResourceDialect>
1755 fidl::encoding::Encode<ServerIsServingResponse, D> for &ServerIsServingResponse
1756 {
1757 #[inline]
1758 unsafe fn encode(
1759 self,
1760 encoder: &mut fidl::encoding::Encoder<'_, D>,
1761 offset: usize,
1762 _depth: fidl::encoding::Depth,
1763 ) -> fidl::Result<()> {
1764 encoder.debug_check_bounds::<ServerIsServingResponse>(offset);
1765 fidl::encoding::Encode::<ServerIsServingResponse, D>::encode(
1767 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enabled),),
1768 encoder,
1769 offset,
1770 _depth,
1771 )
1772 }
1773 }
1774 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
1775 fidl::encoding::Encode<ServerIsServingResponse, D> for (T0,)
1776 {
1777 #[inline]
1778 unsafe fn encode(
1779 self,
1780 encoder: &mut fidl::encoding::Encoder<'_, D>,
1781 offset: usize,
1782 depth: fidl::encoding::Depth,
1783 ) -> fidl::Result<()> {
1784 encoder.debug_check_bounds::<ServerIsServingResponse>(offset);
1785 self.0.encode(encoder, offset + 0, depth)?;
1789 Ok(())
1790 }
1791 }
1792
1793 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1794 for ServerIsServingResponse
1795 {
1796 #[inline(always)]
1797 fn new_empty() -> Self {
1798 Self { enabled: fidl::new_empty!(bool, D) }
1799 }
1800
1801 #[inline]
1802 unsafe fn decode(
1803 &mut self,
1804 decoder: &mut fidl::encoding::Decoder<'_, D>,
1805 offset: usize,
1806 _depth: fidl::encoding::Depth,
1807 ) -> fidl::Result<()> {
1808 decoder.debug_check_bounds::<Self>(offset);
1809 fidl::decode!(bool, D, &mut self.enabled, decoder, offset + 0, _depth)?;
1811 Ok(())
1812 }
1813 }
1814
1815 impl fidl::encoding::ValueTypeMarker for ServerSetOptionRequest {
1816 type Borrowed<'a> = &'a Self;
1817 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1818 value
1819 }
1820 }
1821
1822 unsafe impl fidl::encoding::TypeMarker for ServerSetOptionRequest {
1823 type Owned = Self;
1824
1825 #[inline(always)]
1826 fn inline_align(_context: fidl::encoding::Context) -> usize {
1827 8
1828 }
1829
1830 #[inline(always)]
1831 fn inline_size(_context: fidl::encoding::Context) -> usize {
1832 16
1833 }
1834 }
1835
1836 unsafe impl<D: fidl::encoding::ResourceDialect>
1837 fidl::encoding::Encode<ServerSetOptionRequest, D> for &ServerSetOptionRequest
1838 {
1839 #[inline]
1840 unsafe fn encode(
1841 self,
1842 encoder: &mut fidl::encoding::Encoder<'_, D>,
1843 offset: usize,
1844 _depth: fidl::encoding::Depth,
1845 ) -> fidl::Result<()> {
1846 encoder.debug_check_bounds::<ServerSetOptionRequest>(offset);
1847 fidl::encoding::Encode::<ServerSetOptionRequest, D>::encode(
1849 (<Option_ as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
1850 encoder,
1851 offset,
1852 _depth,
1853 )
1854 }
1855 }
1856 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Option_, D>>
1857 fidl::encoding::Encode<ServerSetOptionRequest, D> for (T0,)
1858 {
1859 #[inline]
1860 unsafe fn encode(
1861 self,
1862 encoder: &mut fidl::encoding::Encoder<'_, D>,
1863 offset: usize,
1864 depth: fidl::encoding::Depth,
1865 ) -> fidl::Result<()> {
1866 encoder.debug_check_bounds::<ServerSetOptionRequest>(offset);
1867 self.0.encode(encoder, offset + 0, depth)?;
1871 Ok(())
1872 }
1873 }
1874
1875 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1876 for ServerSetOptionRequest
1877 {
1878 #[inline(always)]
1879 fn new_empty() -> Self {
1880 Self { value: fidl::new_empty!(Option_, D) }
1881 }
1882
1883 #[inline]
1884 unsafe fn decode(
1885 &mut self,
1886 decoder: &mut fidl::encoding::Decoder<'_, D>,
1887 offset: usize,
1888 _depth: fidl::encoding::Depth,
1889 ) -> fidl::Result<()> {
1890 decoder.debug_check_bounds::<Self>(offset);
1891 fidl::decode!(Option_, D, &mut self.value, decoder, offset + 0, _depth)?;
1893 Ok(())
1894 }
1895 }
1896
1897 impl fidl::encoding::ValueTypeMarker for ServerSetParameterRequest {
1898 type Borrowed<'a> = &'a Self;
1899 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1900 value
1901 }
1902 }
1903
1904 unsafe impl fidl::encoding::TypeMarker for ServerSetParameterRequest {
1905 type Owned = Self;
1906
1907 #[inline(always)]
1908 fn inline_align(_context: fidl::encoding::Context) -> usize {
1909 8
1910 }
1911
1912 #[inline(always)]
1913 fn inline_size(_context: fidl::encoding::Context) -> usize {
1914 16
1915 }
1916 }
1917
1918 unsafe impl<D: fidl::encoding::ResourceDialect>
1919 fidl::encoding::Encode<ServerSetParameterRequest, D> for &ServerSetParameterRequest
1920 {
1921 #[inline]
1922 unsafe fn encode(
1923 self,
1924 encoder: &mut fidl::encoding::Encoder<'_, D>,
1925 offset: usize,
1926 _depth: fidl::encoding::Depth,
1927 ) -> fidl::Result<()> {
1928 encoder.debug_check_bounds::<ServerSetParameterRequest>(offset);
1929 fidl::encoding::Encode::<ServerSetParameterRequest, D>::encode(
1931 (<Parameter as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
1932 encoder,
1933 offset,
1934 _depth,
1935 )
1936 }
1937 }
1938 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Parameter, D>>
1939 fidl::encoding::Encode<ServerSetParameterRequest, D> for (T0,)
1940 {
1941 #[inline]
1942 unsafe fn encode(
1943 self,
1944 encoder: &mut fidl::encoding::Encoder<'_, D>,
1945 offset: usize,
1946 depth: fidl::encoding::Depth,
1947 ) -> fidl::Result<()> {
1948 encoder.debug_check_bounds::<ServerSetParameterRequest>(offset);
1949 self.0.encode(encoder, offset + 0, depth)?;
1953 Ok(())
1954 }
1955 }
1956
1957 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1958 for ServerSetParameterRequest
1959 {
1960 #[inline(always)]
1961 fn new_empty() -> Self {
1962 Self { value: fidl::new_empty!(Parameter, D) }
1963 }
1964
1965 #[inline]
1966 unsafe fn decode(
1967 &mut self,
1968 decoder: &mut fidl::encoding::Decoder<'_, D>,
1969 offset: usize,
1970 _depth: fidl::encoding::Depth,
1971 ) -> fidl::Result<()> {
1972 decoder.debug_check_bounds::<Self>(offset);
1973 fidl::decode!(Parameter, D, &mut self.value, decoder, offset + 0, _depth)?;
1975 Ok(())
1976 }
1977 }
1978
1979 impl fidl::encoding::ValueTypeMarker for ServerGetOptionResponse {
1980 type Borrowed<'a> = &'a Self;
1981 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1982 value
1983 }
1984 }
1985
1986 unsafe impl fidl::encoding::TypeMarker for ServerGetOptionResponse {
1987 type Owned = Self;
1988
1989 #[inline(always)]
1990 fn inline_align(_context: fidl::encoding::Context) -> usize {
1991 8
1992 }
1993
1994 #[inline(always)]
1995 fn inline_size(_context: fidl::encoding::Context) -> usize {
1996 16
1997 }
1998 }
1999
2000 unsafe impl<D: fidl::encoding::ResourceDialect>
2001 fidl::encoding::Encode<ServerGetOptionResponse, D> for &ServerGetOptionResponse
2002 {
2003 #[inline]
2004 unsafe fn encode(
2005 self,
2006 encoder: &mut fidl::encoding::Encoder<'_, D>,
2007 offset: usize,
2008 _depth: fidl::encoding::Depth,
2009 ) -> fidl::Result<()> {
2010 encoder.debug_check_bounds::<ServerGetOptionResponse>(offset);
2011 fidl::encoding::Encode::<ServerGetOptionResponse, D>::encode(
2013 (<Option_ as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
2014 encoder,
2015 offset,
2016 _depth,
2017 )
2018 }
2019 }
2020 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Option_, D>>
2021 fidl::encoding::Encode<ServerGetOptionResponse, D> for (T0,)
2022 {
2023 #[inline]
2024 unsafe fn encode(
2025 self,
2026 encoder: &mut fidl::encoding::Encoder<'_, D>,
2027 offset: usize,
2028 depth: fidl::encoding::Depth,
2029 ) -> fidl::Result<()> {
2030 encoder.debug_check_bounds::<ServerGetOptionResponse>(offset);
2031 self.0.encode(encoder, offset + 0, depth)?;
2035 Ok(())
2036 }
2037 }
2038
2039 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2040 for ServerGetOptionResponse
2041 {
2042 #[inline(always)]
2043 fn new_empty() -> Self {
2044 Self { value: fidl::new_empty!(Option_, D) }
2045 }
2046
2047 #[inline]
2048 unsafe fn decode(
2049 &mut self,
2050 decoder: &mut fidl::encoding::Decoder<'_, D>,
2051 offset: usize,
2052 _depth: fidl::encoding::Depth,
2053 ) -> fidl::Result<()> {
2054 decoder.debug_check_bounds::<Self>(offset);
2055 fidl::decode!(Option_, D, &mut self.value, decoder, offset + 0, _depth)?;
2057 Ok(())
2058 }
2059 }
2060
2061 impl fidl::encoding::ValueTypeMarker for ServerGetParameterResponse {
2062 type Borrowed<'a> = &'a Self;
2063 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2064 value
2065 }
2066 }
2067
2068 unsafe impl fidl::encoding::TypeMarker for ServerGetParameterResponse {
2069 type Owned = Self;
2070
2071 #[inline(always)]
2072 fn inline_align(_context: fidl::encoding::Context) -> usize {
2073 8
2074 }
2075
2076 #[inline(always)]
2077 fn inline_size(_context: fidl::encoding::Context) -> usize {
2078 16
2079 }
2080 }
2081
2082 unsafe impl<D: fidl::encoding::ResourceDialect>
2083 fidl::encoding::Encode<ServerGetParameterResponse, D> for &ServerGetParameterResponse
2084 {
2085 #[inline]
2086 unsafe fn encode(
2087 self,
2088 encoder: &mut fidl::encoding::Encoder<'_, D>,
2089 offset: usize,
2090 _depth: fidl::encoding::Depth,
2091 ) -> fidl::Result<()> {
2092 encoder.debug_check_bounds::<ServerGetParameterResponse>(offset);
2093 fidl::encoding::Encode::<ServerGetParameterResponse, D>::encode(
2095 (<Parameter as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
2096 encoder,
2097 offset,
2098 _depth,
2099 )
2100 }
2101 }
2102 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Parameter, D>>
2103 fidl::encoding::Encode<ServerGetParameterResponse, D> for (T0,)
2104 {
2105 #[inline]
2106 unsafe fn encode(
2107 self,
2108 encoder: &mut fidl::encoding::Encoder<'_, D>,
2109 offset: usize,
2110 depth: fidl::encoding::Depth,
2111 ) -> fidl::Result<()> {
2112 encoder.debug_check_bounds::<ServerGetParameterResponse>(offset);
2113 self.0.encode(encoder, offset + 0, depth)?;
2117 Ok(())
2118 }
2119 }
2120
2121 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2122 for ServerGetParameterResponse
2123 {
2124 #[inline(always)]
2125 fn new_empty() -> Self {
2126 Self { value: fidl::new_empty!(Parameter, D) }
2127 }
2128
2129 #[inline]
2130 unsafe fn decode(
2131 &mut self,
2132 decoder: &mut fidl::encoding::Decoder<'_, D>,
2133 offset: usize,
2134 _depth: fidl::encoding::Depth,
2135 ) -> fidl::Result<()> {
2136 decoder.debug_check_bounds::<Self>(offset);
2137 fidl::decode!(Parameter, D, &mut self.value, decoder, offset + 0, _depth)?;
2139 Ok(())
2140 }
2141 }
2142
2143 impl fidl::encoding::ValueTypeMarker for ServerListOptionsResponse {
2144 type Borrowed<'a> = &'a Self;
2145 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2146 value
2147 }
2148 }
2149
2150 unsafe impl fidl::encoding::TypeMarker for ServerListOptionsResponse {
2151 type Owned = Self;
2152
2153 #[inline(always)]
2154 fn inline_align(_context: fidl::encoding::Context) -> usize {
2155 8
2156 }
2157
2158 #[inline(always)]
2159 fn inline_size(_context: fidl::encoding::Context) -> usize {
2160 16
2161 }
2162 }
2163
2164 unsafe impl<D: fidl::encoding::ResourceDialect>
2165 fidl::encoding::Encode<ServerListOptionsResponse, D> for &ServerListOptionsResponse
2166 {
2167 #[inline]
2168 unsafe fn encode(
2169 self,
2170 encoder: &mut fidl::encoding::Encoder<'_, D>,
2171 offset: usize,
2172 _depth: fidl::encoding::Depth,
2173 ) -> fidl::Result<()> {
2174 encoder.debug_check_bounds::<ServerListOptionsResponse>(offset);
2175 fidl::encoding::Encode::<ServerListOptionsResponse, D>::encode(
2177 (
2178 <fidl::encoding::Vector<Option_, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
2179 ),
2180 encoder, offset, _depth
2181 )
2182 }
2183 }
2184 unsafe impl<
2185 D: fidl::encoding::ResourceDialect,
2186 T0: fidl::encoding::Encode<fidl::encoding::Vector<Option_, 256>, D>,
2187 > fidl::encoding::Encode<ServerListOptionsResponse, D> for (T0,)
2188 {
2189 #[inline]
2190 unsafe fn encode(
2191 self,
2192 encoder: &mut fidl::encoding::Encoder<'_, D>,
2193 offset: usize,
2194 depth: fidl::encoding::Depth,
2195 ) -> fidl::Result<()> {
2196 encoder.debug_check_bounds::<ServerListOptionsResponse>(offset);
2197 self.0.encode(encoder, offset + 0, depth)?;
2201 Ok(())
2202 }
2203 }
2204
2205 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2206 for ServerListOptionsResponse
2207 {
2208 #[inline(always)]
2209 fn new_empty() -> Self {
2210 Self { options: fidl::new_empty!(fidl::encoding::Vector<Option_, 256>, D) }
2211 }
2212
2213 #[inline]
2214 unsafe fn decode(
2215 &mut self,
2216 decoder: &mut fidl::encoding::Decoder<'_, D>,
2217 offset: usize,
2218 _depth: fidl::encoding::Depth,
2219 ) -> fidl::Result<()> {
2220 decoder.debug_check_bounds::<Self>(offset);
2221 fidl::decode!(fidl::encoding::Vector<Option_, 256>, D, &mut self.options, decoder, offset + 0, _depth)?;
2223 Ok(())
2224 }
2225 }
2226
2227 impl fidl::encoding::ValueTypeMarker for ServerListParametersResponse {
2228 type Borrowed<'a> = &'a Self;
2229 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2230 value
2231 }
2232 }
2233
2234 unsafe impl fidl::encoding::TypeMarker for ServerListParametersResponse {
2235 type Owned = Self;
2236
2237 #[inline(always)]
2238 fn inline_align(_context: fidl::encoding::Context) -> usize {
2239 8
2240 }
2241
2242 #[inline(always)]
2243 fn inline_size(_context: fidl::encoding::Context) -> usize {
2244 16
2245 }
2246 }
2247
2248 unsafe impl<D: fidl::encoding::ResourceDialect>
2249 fidl::encoding::Encode<ServerListParametersResponse, D> for &ServerListParametersResponse
2250 {
2251 #[inline]
2252 unsafe fn encode(
2253 self,
2254 encoder: &mut fidl::encoding::Encoder<'_, D>,
2255 offset: usize,
2256 _depth: fidl::encoding::Depth,
2257 ) -> fidl::Result<()> {
2258 encoder.debug_check_bounds::<ServerListParametersResponse>(offset);
2259 fidl::encoding::Encode::<ServerListParametersResponse, D>::encode(
2261 (
2262 <fidl::encoding::Vector<Parameter, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.parameters),
2263 ),
2264 encoder, offset, _depth
2265 )
2266 }
2267 }
2268 unsafe impl<
2269 D: fidl::encoding::ResourceDialect,
2270 T0: fidl::encoding::Encode<fidl::encoding::Vector<Parameter, 256>, D>,
2271 > fidl::encoding::Encode<ServerListParametersResponse, D> for (T0,)
2272 {
2273 #[inline]
2274 unsafe fn encode(
2275 self,
2276 encoder: &mut fidl::encoding::Encoder<'_, D>,
2277 offset: usize,
2278 depth: fidl::encoding::Depth,
2279 ) -> fidl::Result<()> {
2280 encoder.debug_check_bounds::<ServerListParametersResponse>(offset);
2281 self.0.encode(encoder, offset + 0, depth)?;
2285 Ok(())
2286 }
2287 }
2288
2289 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2290 for ServerListParametersResponse
2291 {
2292 #[inline(always)]
2293 fn new_empty() -> Self {
2294 Self { parameters: fidl::new_empty!(fidl::encoding::Vector<Parameter, 256>, D) }
2295 }
2296
2297 #[inline]
2298 unsafe fn decode(
2299 &mut self,
2300 decoder: &mut fidl::encoding::Decoder<'_, D>,
2301 offset: usize,
2302 _depth: fidl::encoding::Depth,
2303 ) -> fidl::Result<()> {
2304 decoder.debug_check_bounds::<Self>(offset);
2305 fidl::decode!(fidl::encoding::Vector<Parameter, 256>, D, &mut self.parameters, decoder, offset + 0, _depth)?;
2307 Ok(())
2308 }
2309 }
2310
2311 impl AddressPool {
2312 #[inline(always)]
2313 fn max_ordinal_present(&self) -> u64 {
2314 if let Some(_) = self.range_stop {
2315 return 3;
2316 }
2317 if let Some(_) = self.range_start {
2318 return 2;
2319 }
2320 if let Some(_) = self.prefix_length {
2321 return 1;
2322 }
2323 0
2324 }
2325 }
2326
2327 impl fidl::encoding::ValueTypeMarker for AddressPool {
2328 type Borrowed<'a> = &'a Self;
2329 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2330 value
2331 }
2332 }
2333
2334 unsafe impl fidl::encoding::TypeMarker for AddressPool {
2335 type Owned = Self;
2336
2337 #[inline(always)]
2338 fn inline_align(_context: fidl::encoding::Context) -> usize {
2339 8
2340 }
2341
2342 #[inline(always)]
2343 fn inline_size(_context: fidl::encoding::Context) -> usize {
2344 16
2345 }
2346 }
2347
2348 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddressPool, D>
2349 for &AddressPool
2350 {
2351 unsafe fn encode(
2352 self,
2353 encoder: &mut fidl::encoding::Encoder<'_, D>,
2354 offset: usize,
2355 mut depth: fidl::encoding::Depth,
2356 ) -> fidl::Result<()> {
2357 encoder.debug_check_bounds::<AddressPool>(offset);
2358 let max_ordinal: u64 = self.max_ordinal_present();
2360 encoder.write_num(max_ordinal, offset);
2361 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2362 if max_ordinal == 0 {
2364 return Ok(());
2365 }
2366 depth.increment()?;
2367 let envelope_size = 8;
2368 let bytes_len = max_ordinal as usize * envelope_size;
2369 #[allow(unused_variables)]
2370 let offset = encoder.out_of_line_offset(bytes_len);
2371 let mut _prev_end_offset: usize = 0;
2372 if 1 > max_ordinal {
2373 return Ok(());
2374 }
2375
2376 let cur_offset: usize = (1 - 1) * envelope_size;
2379
2380 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2382
2383 fidl::encoding::encode_in_envelope_optional::<u8, D>(
2388 self.prefix_length.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
2389 encoder,
2390 offset + cur_offset,
2391 depth,
2392 )?;
2393
2394 _prev_end_offset = cur_offset + envelope_size;
2395 if 2 > max_ordinal {
2396 return Ok(());
2397 }
2398
2399 let cur_offset: usize = (2 - 1) * envelope_size;
2402
2403 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2405
2406 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::Ipv4Address, D>(
2411 self.range_start.as_ref().map(
2412 <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow,
2413 ),
2414 encoder,
2415 offset + cur_offset,
2416 depth,
2417 )?;
2418
2419 _prev_end_offset = cur_offset + envelope_size;
2420 if 3 > max_ordinal {
2421 return Ok(());
2422 }
2423
2424 let cur_offset: usize = (3 - 1) * envelope_size;
2427
2428 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2430
2431 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::Ipv4Address, D>(
2436 self.range_stop.as_ref().map(
2437 <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow,
2438 ),
2439 encoder,
2440 offset + cur_offset,
2441 depth,
2442 )?;
2443
2444 _prev_end_offset = cur_offset + envelope_size;
2445
2446 Ok(())
2447 }
2448 }
2449
2450 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddressPool {
2451 #[inline(always)]
2452 fn new_empty() -> Self {
2453 Self::default()
2454 }
2455
2456 unsafe fn decode(
2457 &mut self,
2458 decoder: &mut fidl::encoding::Decoder<'_, D>,
2459 offset: usize,
2460 mut depth: fidl::encoding::Depth,
2461 ) -> fidl::Result<()> {
2462 decoder.debug_check_bounds::<Self>(offset);
2463 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2464 None => return Err(fidl::Error::NotNullable),
2465 Some(len) => len,
2466 };
2467 if len == 0 {
2469 return Ok(());
2470 };
2471 depth.increment()?;
2472 let envelope_size = 8;
2473 let bytes_len = len * envelope_size;
2474 let offset = decoder.out_of_line_offset(bytes_len)?;
2475 let mut _next_ordinal_to_read = 0;
2477 let mut next_offset = offset;
2478 let end_offset = offset + bytes_len;
2479 _next_ordinal_to_read += 1;
2480 if next_offset >= end_offset {
2481 return Ok(());
2482 }
2483
2484 while _next_ordinal_to_read < 1 {
2486 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2487 _next_ordinal_to_read += 1;
2488 next_offset += envelope_size;
2489 }
2490
2491 let next_out_of_line = decoder.next_out_of_line();
2492 let handles_before = decoder.remaining_handles();
2493 if let Some((inlined, num_bytes, num_handles)) =
2494 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2495 {
2496 let member_inline_size =
2497 <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2498 if inlined != (member_inline_size <= 4) {
2499 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2500 }
2501 let inner_offset;
2502 let mut inner_depth = depth.clone();
2503 if inlined {
2504 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2505 inner_offset = next_offset;
2506 } else {
2507 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2508 inner_depth.increment()?;
2509 }
2510 let val_ref = self.prefix_length.get_or_insert_with(|| fidl::new_empty!(u8, D));
2511 fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
2512 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2513 {
2514 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2515 }
2516 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2517 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2518 }
2519 }
2520
2521 next_offset += envelope_size;
2522 _next_ordinal_to_read += 1;
2523 if next_offset >= end_offset {
2524 return Ok(());
2525 }
2526
2527 while _next_ordinal_to_read < 2 {
2529 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2530 _next_ordinal_to_read += 1;
2531 next_offset += envelope_size;
2532 }
2533
2534 let next_out_of_line = decoder.next_out_of_line();
2535 let handles_before = decoder.remaining_handles();
2536 if let Some((inlined, num_bytes, num_handles)) =
2537 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2538 {
2539 let member_inline_size =
2540 <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(
2541 decoder.context,
2542 );
2543 if inlined != (member_inline_size <= 4) {
2544 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2545 }
2546 let inner_offset;
2547 let mut inner_depth = depth.clone();
2548 if inlined {
2549 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2550 inner_offset = next_offset;
2551 } else {
2552 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2553 inner_depth.increment()?;
2554 }
2555 let val_ref = self
2556 .range_start
2557 .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net::Ipv4Address, D));
2558 fidl::decode!(
2559 fidl_fuchsia_net::Ipv4Address,
2560 D,
2561 val_ref,
2562 decoder,
2563 inner_offset,
2564 inner_depth
2565 )?;
2566 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2567 {
2568 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2569 }
2570 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2571 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2572 }
2573 }
2574
2575 next_offset += envelope_size;
2576 _next_ordinal_to_read += 1;
2577 if next_offset >= end_offset {
2578 return Ok(());
2579 }
2580
2581 while _next_ordinal_to_read < 3 {
2583 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2584 _next_ordinal_to_read += 1;
2585 next_offset += envelope_size;
2586 }
2587
2588 let next_out_of_line = decoder.next_out_of_line();
2589 let handles_before = decoder.remaining_handles();
2590 if let Some((inlined, num_bytes, num_handles)) =
2591 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2592 {
2593 let member_inline_size =
2594 <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(
2595 decoder.context,
2596 );
2597 if inlined != (member_inline_size <= 4) {
2598 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2599 }
2600 let inner_offset;
2601 let mut inner_depth = depth.clone();
2602 if inlined {
2603 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2604 inner_offset = next_offset;
2605 } else {
2606 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2607 inner_depth.increment()?;
2608 }
2609 let val_ref = self
2610 .range_stop
2611 .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net::Ipv4Address, D));
2612 fidl::decode!(
2613 fidl_fuchsia_net::Ipv4Address,
2614 D,
2615 val_ref,
2616 decoder,
2617 inner_offset,
2618 inner_depth
2619 )?;
2620 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2621 {
2622 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2623 }
2624 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2625 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2626 }
2627 }
2628
2629 next_offset += envelope_size;
2630
2631 while next_offset < end_offset {
2633 _next_ordinal_to_read += 1;
2634 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2635 next_offset += envelope_size;
2636 }
2637
2638 Ok(())
2639 }
2640 }
2641
2642 impl ConfigurationToRequest {
2643 #[inline(always)]
2644 fn max_ordinal_present(&self) -> u64 {
2645 if let Some(_) = self.dns_servers {
2646 return 2;
2647 }
2648 if let Some(_) = self.routers {
2649 return 1;
2650 }
2651 0
2652 }
2653 }
2654
2655 impl fidl::encoding::ValueTypeMarker for ConfigurationToRequest {
2656 type Borrowed<'a> = &'a Self;
2657 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2658 value
2659 }
2660 }
2661
2662 unsafe impl fidl::encoding::TypeMarker for ConfigurationToRequest {
2663 type Owned = Self;
2664
2665 #[inline(always)]
2666 fn inline_align(_context: fidl::encoding::Context) -> usize {
2667 8
2668 }
2669
2670 #[inline(always)]
2671 fn inline_size(_context: fidl::encoding::Context) -> usize {
2672 16
2673 }
2674 }
2675
2676 unsafe impl<D: fidl::encoding::ResourceDialect>
2677 fidl::encoding::Encode<ConfigurationToRequest, D> for &ConfigurationToRequest
2678 {
2679 unsafe fn encode(
2680 self,
2681 encoder: &mut fidl::encoding::Encoder<'_, D>,
2682 offset: usize,
2683 mut depth: fidl::encoding::Depth,
2684 ) -> fidl::Result<()> {
2685 encoder.debug_check_bounds::<ConfigurationToRequest>(offset);
2686 let max_ordinal: u64 = self.max_ordinal_present();
2688 encoder.write_num(max_ordinal, offset);
2689 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2690 if max_ordinal == 0 {
2692 return Ok(());
2693 }
2694 depth.increment()?;
2695 let envelope_size = 8;
2696 let bytes_len = max_ordinal as usize * envelope_size;
2697 #[allow(unused_variables)]
2698 let offset = encoder.out_of_line_offset(bytes_len);
2699 let mut _prev_end_offset: usize = 0;
2700 if 1 > max_ordinal {
2701 return Ok(());
2702 }
2703
2704 let cur_offset: usize = (1 - 1) * envelope_size;
2707
2708 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2710
2711 fidl::encoding::encode_in_envelope_optional::<bool, D>(
2716 self.routers.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2717 encoder,
2718 offset + cur_offset,
2719 depth,
2720 )?;
2721
2722 _prev_end_offset = cur_offset + envelope_size;
2723 if 2 > max_ordinal {
2724 return Ok(());
2725 }
2726
2727 let cur_offset: usize = (2 - 1) * envelope_size;
2730
2731 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2733
2734 fidl::encoding::encode_in_envelope_optional::<bool, D>(
2739 self.dns_servers.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2740 encoder,
2741 offset + cur_offset,
2742 depth,
2743 )?;
2744
2745 _prev_end_offset = cur_offset + envelope_size;
2746
2747 Ok(())
2748 }
2749 }
2750
2751 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2752 for ConfigurationToRequest
2753 {
2754 #[inline(always)]
2755 fn new_empty() -> Self {
2756 Self::default()
2757 }
2758
2759 unsafe fn decode(
2760 &mut self,
2761 decoder: &mut fidl::encoding::Decoder<'_, D>,
2762 offset: usize,
2763 mut depth: fidl::encoding::Depth,
2764 ) -> fidl::Result<()> {
2765 decoder.debug_check_bounds::<Self>(offset);
2766 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2767 None => return Err(fidl::Error::NotNullable),
2768 Some(len) => len,
2769 };
2770 if len == 0 {
2772 return Ok(());
2773 };
2774 depth.increment()?;
2775 let envelope_size = 8;
2776 let bytes_len = len * envelope_size;
2777 let offset = decoder.out_of_line_offset(bytes_len)?;
2778 let mut _next_ordinal_to_read = 0;
2780 let mut next_offset = offset;
2781 let end_offset = offset + bytes_len;
2782 _next_ordinal_to_read += 1;
2783 if next_offset >= end_offset {
2784 return Ok(());
2785 }
2786
2787 while _next_ordinal_to_read < 1 {
2789 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2790 _next_ordinal_to_read += 1;
2791 next_offset += envelope_size;
2792 }
2793
2794 let next_out_of_line = decoder.next_out_of_line();
2795 let handles_before = decoder.remaining_handles();
2796 if let Some((inlined, num_bytes, num_handles)) =
2797 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2798 {
2799 let member_inline_size =
2800 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2801 if inlined != (member_inline_size <= 4) {
2802 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2803 }
2804 let inner_offset;
2805 let mut inner_depth = depth.clone();
2806 if inlined {
2807 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2808 inner_offset = next_offset;
2809 } else {
2810 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2811 inner_depth.increment()?;
2812 }
2813 let val_ref = self.routers.get_or_insert_with(|| fidl::new_empty!(bool, D));
2814 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
2815 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2816 {
2817 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2818 }
2819 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2820 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2821 }
2822 }
2823
2824 next_offset += envelope_size;
2825 _next_ordinal_to_read += 1;
2826 if next_offset >= end_offset {
2827 return Ok(());
2828 }
2829
2830 while _next_ordinal_to_read < 2 {
2832 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2833 _next_ordinal_to_read += 1;
2834 next_offset += envelope_size;
2835 }
2836
2837 let next_out_of_line = decoder.next_out_of_line();
2838 let handles_before = decoder.remaining_handles();
2839 if let Some((inlined, num_bytes, num_handles)) =
2840 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2841 {
2842 let member_inline_size =
2843 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2844 if inlined != (member_inline_size <= 4) {
2845 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2846 }
2847 let inner_offset;
2848 let mut inner_depth = depth.clone();
2849 if inlined {
2850 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2851 inner_offset = next_offset;
2852 } else {
2853 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2854 inner_depth.increment()?;
2855 }
2856 let val_ref = self.dns_servers.get_or_insert_with(|| fidl::new_empty!(bool, D));
2857 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
2858 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2859 {
2860 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2861 }
2862 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2863 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2864 }
2865 }
2866
2867 next_offset += envelope_size;
2868
2869 while next_offset < end_offset {
2871 _next_ordinal_to_read += 1;
2872 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2873 next_offset += envelope_size;
2874 }
2875
2876 Ok(())
2877 }
2878 }
2879
2880 impl LeaseLength {
2881 #[inline(always)]
2882 fn max_ordinal_present(&self) -> u64 {
2883 if let Some(_) = self.max {
2884 return 2;
2885 }
2886 if let Some(_) = self.default {
2887 return 1;
2888 }
2889 0
2890 }
2891 }
2892
2893 impl fidl::encoding::ValueTypeMarker for LeaseLength {
2894 type Borrowed<'a> = &'a Self;
2895 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2896 value
2897 }
2898 }
2899
2900 unsafe impl fidl::encoding::TypeMarker for LeaseLength {
2901 type Owned = Self;
2902
2903 #[inline(always)]
2904 fn inline_align(_context: fidl::encoding::Context) -> usize {
2905 8
2906 }
2907
2908 #[inline(always)]
2909 fn inline_size(_context: fidl::encoding::Context) -> usize {
2910 16
2911 }
2912 }
2913
2914 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LeaseLength, D>
2915 for &LeaseLength
2916 {
2917 unsafe fn encode(
2918 self,
2919 encoder: &mut fidl::encoding::Encoder<'_, D>,
2920 offset: usize,
2921 mut depth: fidl::encoding::Depth,
2922 ) -> fidl::Result<()> {
2923 encoder.debug_check_bounds::<LeaseLength>(offset);
2924 let max_ordinal: u64 = self.max_ordinal_present();
2926 encoder.write_num(max_ordinal, offset);
2927 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2928 if max_ordinal == 0 {
2930 return Ok(());
2931 }
2932 depth.increment()?;
2933 let envelope_size = 8;
2934 let bytes_len = max_ordinal as usize * envelope_size;
2935 #[allow(unused_variables)]
2936 let offset = encoder.out_of_line_offset(bytes_len);
2937 let mut _prev_end_offset: usize = 0;
2938 if 1 > max_ordinal {
2939 return Ok(());
2940 }
2941
2942 let cur_offset: usize = (1 - 1) * envelope_size;
2945
2946 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2948
2949 fidl::encoding::encode_in_envelope_optional::<u32, D>(
2954 self.default.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
2955 encoder,
2956 offset + cur_offset,
2957 depth,
2958 )?;
2959
2960 _prev_end_offset = cur_offset + envelope_size;
2961 if 2 > max_ordinal {
2962 return Ok(());
2963 }
2964
2965 let cur_offset: usize = (2 - 1) * envelope_size;
2968
2969 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2971
2972 fidl::encoding::encode_in_envelope_optional::<u32, D>(
2977 self.max.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
2978 encoder,
2979 offset + cur_offset,
2980 depth,
2981 )?;
2982
2983 _prev_end_offset = cur_offset + envelope_size;
2984
2985 Ok(())
2986 }
2987 }
2988
2989 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LeaseLength {
2990 #[inline(always)]
2991 fn new_empty() -> Self {
2992 Self::default()
2993 }
2994
2995 unsafe fn decode(
2996 &mut self,
2997 decoder: &mut fidl::encoding::Decoder<'_, D>,
2998 offset: usize,
2999 mut depth: fidl::encoding::Depth,
3000 ) -> fidl::Result<()> {
3001 decoder.debug_check_bounds::<Self>(offset);
3002 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3003 None => return Err(fidl::Error::NotNullable),
3004 Some(len) => len,
3005 };
3006 if len == 0 {
3008 return Ok(());
3009 };
3010 depth.increment()?;
3011 let envelope_size = 8;
3012 let bytes_len = len * envelope_size;
3013 let offset = decoder.out_of_line_offset(bytes_len)?;
3014 let mut _next_ordinal_to_read = 0;
3016 let mut next_offset = offset;
3017 let end_offset = offset + bytes_len;
3018 _next_ordinal_to_read += 1;
3019 if next_offset >= end_offset {
3020 return Ok(());
3021 }
3022
3023 while _next_ordinal_to_read < 1 {
3025 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3026 _next_ordinal_to_read += 1;
3027 next_offset += envelope_size;
3028 }
3029
3030 let next_out_of_line = decoder.next_out_of_line();
3031 let handles_before = decoder.remaining_handles();
3032 if let Some((inlined, num_bytes, num_handles)) =
3033 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3034 {
3035 let member_inline_size =
3036 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3037 if inlined != (member_inline_size <= 4) {
3038 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3039 }
3040 let inner_offset;
3041 let mut inner_depth = depth.clone();
3042 if inlined {
3043 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3044 inner_offset = next_offset;
3045 } else {
3046 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3047 inner_depth.increment()?;
3048 }
3049 let val_ref = self.default.get_or_insert_with(|| fidl::new_empty!(u32, D));
3050 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
3051 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3052 {
3053 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3054 }
3055 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3056 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3057 }
3058 }
3059
3060 next_offset += envelope_size;
3061 _next_ordinal_to_read += 1;
3062 if next_offset >= end_offset {
3063 return Ok(());
3064 }
3065
3066 while _next_ordinal_to_read < 2 {
3068 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3069 _next_ordinal_to_read += 1;
3070 next_offset += envelope_size;
3071 }
3072
3073 let next_out_of_line = decoder.next_out_of_line();
3074 let handles_before = decoder.remaining_handles();
3075 if let Some((inlined, num_bytes, num_handles)) =
3076 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3077 {
3078 let member_inline_size =
3079 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3080 if inlined != (member_inline_size <= 4) {
3081 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3082 }
3083 let inner_offset;
3084 let mut inner_depth = depth.clone();
3085 if inlined {
3086 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3087 inner_offset = next_offset;
3088 } else {
3089 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3090 inner_depth.increment()?;
3091 }
3092 let val_ref = self.max.get_or_insert_with(|| fidl::new_empty!(u32, D));
3093 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
3094 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3095 {
3096 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3097 }
3098 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3099 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3100 }
3101 }
3102
3103 next_offset += envelope_size;
3104
3105 while next_offset < end_offset {
3107 _next_ordinal_to_read += 1;
3108 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3109 next_offset += envelope_size;
3110 }
3111
3112 Ok(())
3113 }
3114 }
3115
3116 impl NewClientParams {
3117 #[inline(always)]
3118 fn max_ordinal_present(&self) -> u64 {
3119 if let Some(_) = self.request_ip_address {
3120 return 2;
3121 }
3122 if let Some(_) = self.configuration_to_request {
3123 return 1;
3124 }
3125 0
3126 }
3127 }
3128
3129 impl fidl::encoding::ValueTypeMarker for NewClientParams {
3130 type Borrowed<'a> = &'a Self;
3131 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3132 value
3133 }
3134 }
3135
3136 unsafe impl fidl::encoding::TypeMarker for NewClientParams {
3137 type Owned = Self;
3138
3139 #[inline(always)]
3140 fn inline_align(_context: fidl::encoding::Context) -> usize {
3141 8
3142 }
3143
3144 #[inline(always)]
3145 fn inline_size(_context: fidl::encoding::Context) -> usize {
3146 16
3147 }
3148 }
3149
3150 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<NewClientParams, D>
3151 for &NewClientParams
3152 {
3153 unsafe fn encode(
3154 self,
3155 encoder: &mut fidl::encoding::Encoder<'_, D>,
3156 offset: usize,
3157 mut depth: fidl::encoding::Depth,
3158 ) -> fidl::Result<()> {
3159 encoder.debug_check_bounds::<NewClientParams>(offset);
3160 let max_ordinal: u64 = self.max_ordinal_present();
3162 encoder.write_num(max_ordinal, offset);
3163 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3164 if max_ordinal == 0 {
3166 return Ok(());
3167 }
3168 depth.increment()?;
3169 let envelope_size = 8;
3170 let bytes_len = max_ordinal as usize * envelope_size;
3171 #[allow(unused_variables)]
3172 let offset = encoder.out_of_line_offset(bytes_len);
3173 let mut _prev_end_offset: usize = 0;
3174 if 1 > max_ordinal {
3175 return Ok(());
3176 }
3177
3178 let cur_offset: usize = (1 - 1) * envelope_size;
3181
3182 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3184
3185 fidl::encoding::encode_in_envelope_optional::<ConfigurationToRequest, D>(
3190 self.configuration_to_request
3191 .as_ref()
3192 .map(<ConfigurationToRequest as fidl::encoding::ValueTypeMarker>::borrow),
3193 encoder,
3194 offset + cur_offset,
3195 depth,
3196 )?;
3197
3198 _prev_end_offset = cur_offset + envelope_size;
3199 if 2 > max_ordinal {
3200 return Ok(());
3201 }
3202
3203 let cur_offset: usize = (2 - 1) * envelope_size;
3206
3207 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3209
3210 fidl::encoding::encode_in_envelope_optional::<bool, D>(
3215 self.request_ip_address
3216 .as_ref()
3217 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
3218 encoder,
3219 offset + cur_offset,
3220 depth,
3221 )?;
3222
3223 _prev_end_offset = cur_offset + envelope_size;
3224
3225 Ok(())
3226 }
3227 }
3228
3229 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NewClientParams {
3230 #[inline(always)]
3231 fn new_empty() -> Self {
3232 Self::default()
3233 }
3234
3235 unsafe fn decode(
3236 &mut self,
3237 decoder: &mut fidl::encoding::Decoder<'_, D>,
3238 offset: usize,
3239 mut depth: fidl::encoding::Depth,
3240 ) -> fidl::Result<()> {
3241 decoder.debug_check_bounds::<Self>(offset);
3242 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3243 None => return Err(fidl::Error::NotNullable),
3244 Some(len) => len,
3245 };
3246 if len == 0 {
3248 return Ok(());
3249 };
3250 depth.increment()?;
3251 let envelope_size = 8;
3252 let bytes_len = len * envelope_size;
3253 let offset = decoder.out_of_line_offset(bytes_len)?;
3254 let mut _next_ordinal_to_read = 0;
3256 let mut next_offset = offset;
3257 let end_offset = offset + bytes_len;
3258 _next_ordinal_to_read += 1;
3259 if next_offset >= end_offset {
3260 return Ok(());
3261 }
3262
3263 while _next_ordinal_to_read < 1 {
3265 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3266 _next_ordinal_to_read += 1;
3267 next_offset += envelope_size;
3268 }
3269
3270 let next_out_of_line = decoder.next_out_of_line();
3271 let handles_before = decoder.remaining_handles();
3272 if let Some((inlined, num_bytes, num_handles)) =
3273 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3274 {
3275 let member_inline_size =
3276 <ConfigurationToRequest as fidl::encoding::TypeMarker>::inline_size(
3277 decoder.context,
3278 );
3279 if inlined != (member_inline_size <= 4) {
3280 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3281 }
3282 let inner_offset;
3283 let mut inner_depth = depth.clone();
3284 if inlined {
3285 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3286 inner_offset = next_offset;
3287 } else {
3288 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3289 inner_depth.increment()?;
3290 }
3291 let val_ref = self
3292 .configuration_to_request
3293 .get_or_insert_with(|| fidl::new_empty!(ConfigurationToRequest, D));
3294 fidl::decode!(
3295 ConfigurationToRequest,
3296 D,
3297 val_ref,
3298 decoder,
3299 inner_offset,
3300 inner_depth
3301 )?;
3302 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3303 {
3304 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3305 }
3306 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3307 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3308 }
3309 }
3310
3311 next_offset += envelope_size;
3312 _next_ordinal_to_read += 1;
3313 if next_offset >= end_offset {
3314 return Ok(());
3315 }
3316
3317 while _next_ordinal_to_read < 2 {
3319 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3320 _next_ordinal_to_read += 1;
3321 next_offset += envelope_size;
3322 }
3323
3324 let next_out_of_line = decoder.next_out_of_line();
3325 let handles_before = decoder.remaining_handles();
3326 if let Some((inlined, num_bytes, num_handles)) =
3327 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3328 {
3329 let member_inline_size =
3330 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3331 if inlined != (member_inline_size <= 4) {
3332 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3333 }
3334 let inner_offset;
3335 let mut inner_depth = depth.clone();
3336 if inlined {
3337 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3338 inner_offset = next_offset;
3339 } else {
3340 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3341 inner_depth.increment()?;
3342 }
3343 let val_ref =
3344 self.request_ip_address.get_or_insert_with(|| fidl::new_empty!(bool, D));
3345 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3346 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3347 {
3348 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3349 }
3350 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3351 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3352 }
3353 }
3354
3355 next_offset += envelope_size;
3356
3357 while next_offset < end_offset {
3359 _next_ordinal_to_read += 1;
3360 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3361 next_offset += envelope_size;
3362 }
3363
3364 Ok(())
3365 }
3366 }
3367
3368 impl StaticAssignment {
3369 #[inline(always)]
3370 fn max_ordinal_present(&self) -> u64 {
3371 if let Some(_) = self.assigned_addr {
3372 return 2;
3373 }
3374 if let Some(_) = self.host {
3375 return 1;
3376 }
3377 0
3378 }
3379 }
3380
3381 impl fidl::encoding::ValueTypeMarker for StaticAssignment {
3382 type Borrowed<'a> = &'a Self;
3383 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3384 value
3385 }
3386 }
3387
3388 unsafe impl fidl::encoding::TypeMarker for StaticAssignment {
3389 type Owned = Self;
3390
3391 #[inline(always)]
3392 fn inline_align(_context: fidl::encoding::Context) -> usize {
3393 8
3394 }
3395
3396 #[inline(always)]
3397 fn inline_size(_context: fidl::encoding::Context) -> usize {
3398 16
3399 }
3400 }
3401
3402 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StaticAssignment, D>
3403 for &StaticAssignment
3404 {
3405 unsafe fn encode(
3406 self,
3407 encoder: &mut fidl::encoding::Encoder<'_, D>,
3408 offset: usize,
3409 mut depth: fidl::encoding::Depth,
3410 ) -> fidl::Result<()> {
3411 encoder.debug_check_bounds::<StaticAssignment>(offset);
3412 let max_ordinal: u64 = self.max_ordinal_present();
3414 encoder.write_num(max_ordinal, offset);
3415 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3416 if max_ordinal == 0 {
3418 return Ok(());
3419 }
3420 depth.increment()?;
3421 let envelope_size = 8;
3422 let bytes_len = max_ordinal as usize * envelope_size;
3423 #[allow(unused_variables)]
3424 let offset = encoder.out_of_line_offset(bytes_len);
3425 let mut _prev_end_offset: usize = 0;
3426 if 1 > max_ordinal {
3427 return Ok(());
3428 }
3429
3430 let cur_offset: usize = (1 - 1) * envelope_size;
3433
3434 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3436
3437 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::MacAddress, D>(
3442 self.host
3443 .as_ref()
3444 .map(<fidl_fuchsia_net::MacAddress as fidl::encoding::ValueTypeMarker>::borrow),
3445 encoder,
3446 offset + cur_offset,
3447 depth,
3448 )?;
3449
3450 _prev_end_offset = cur_offset + envelope_size;
3451 if 2 > max_ordinal {
3452 return Ok(());
3453 }
3454
3455 let cur_offset: usize = (2 - 1) * envelope_size;
3458
3459 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3461
3462 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_net::Ipv4Address, D>(
3467 self.assigned_addr.as_ref().map(
3468 <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow,
3469 ),
3470 encoder,
3471 offset + cur_offset,
3472 depth,
3473 )?;
3474
3475 _prev_end_offset = cur_offset + envelope_size;
3476
3477 Ok(())
3478 }
3479 }
3480
3481 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StaticAssignment {
3482 #[inline(always)]
3483 fn new_empty() -> Self {
3484 Self::default()
3485 }
3486
3487 unsafe fn decode(
3488 &mut self,
3489 decoder: &mut fidl::encoding::Decoder<'_, D>,
3490 offset: usize,
3491 mut depth: fidl::encoding::Depth,
3492 ) -> fidl::Result<()> {
3493 decoder.debug_check_bounds::<Self>(offset);
3494 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3495 None => return Err(fidl::Error::NotNullable),
3496 Some(len) => len,
3497 };
3498 if len == 0 {
3500 return Ok(());
3501 };
3502 depth.increment()?;
3503 let envelope_size = 8;
3504 let bytes_len = len * envelope_size;
3505 let offset = decoder.out_of_line_offset(bytes_len)?;
3506 let mut _next_ordinal_to_read = 0;
3508 let mut next_offset = offset;
3509 let end_offset = offset + bytes_len;
3510 _next_ordinal_to_read += 1;
3511 if next_offset >= end_offset {
3512 return Ok(());
3513 }
3514
3515 while _next_ordinal_to_read < 1 {
3517 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3518 _next_ordinal_to_read += 1;
3519 next_offset += envelope_size;
3520 }
3521
3522 let next_out_of_line = decoder.next_out_of_line();
3523 let handles_before = decoder.remaining_handles();
3524 if let Some((inlined, num_bytes, num_handles)) =
3525 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3526 {
3527 let member_inline_size =
3528 <fidl_fuchsia_net::MacAddress as fidl::encoding::TypeMarker>::inline_size(
3529 decoder.context,
3530 );
3531 if inlined != (member_inline_size <= 4) {
3532 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3533 }
3534 let inner_offset;
3535 let mut inner_depth = depth.clone();
3536 if inlined {
3537 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3538 inner_offset = next_offset;
3539 } else {
3540 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3541 inner_depth.increment()?;
3542 }
3543 let val_ref = self
3544 .host
3545 .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net::MacAddress, D));
3546 fidl::decode!(
3547 fidl_fuchsia_net::MacAddress,
3548 D,
3549 val_ref,
3550 decoder,
3551 inner_offset,
3552 inner_depth
3553 )?;
3554 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3555 {
3556 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3557 }
3558 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3559 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3560 }
3561 }
3562
3563 next_offset += envelope_size;
3564 _next_ordinal_to_read += 1;
3565 if next_offset >= end_offset {
3566 return Ok(());
3567 }
3568
3569 while _next_ordinal_to_read < 2 {
3571 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3572 _next_ordinal_to_read += 1;
3573 next_offset += envelope_size;
3574 }
3575
3576 let next_out_of_line = decoder.next_out_of_line();
3577 let handles_before = decoder.remaining_handles();
3578 if let Some((inlined, num_bytes, num_handles)) =
3579 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3580 {
3581 let member_inline_size =
3582 <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(
3583 decoder.context,
3584 );
3585 if inlined != (member_inline_size <= 4) {
3586 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3587 }
3588 let inner_offset;
3589 let mut inner_depth = depth.clone();
3590 if inlined {
3591 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3592 inner_offset = next_offset;
3593 } else {
3594 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3595 inner_depth.increment()?;
3596 }
3597 let val_ref = self
3598 .assigned_addr
3599 .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_net::Ipv4Address, D));
3600 fidl::decode!(
3601 fidl_fuchsia_net::Ipv4Address,
3602 D,
3603 val_ref,
3604 decoder,
3605 inner_offset,
3606 inner_depth
3607 )?;
3608 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3609 {
3610 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3611 }
3612 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3613 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3614 }
3615 }
3616
3617 next_offset += envelope_size;
3618
3619 while next_offset < end_offset {
3621 _next_ordinal_to_read += 1;
3622 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3623 next_offset += envelope_size;
3624 }
3625
3626 Ok(())
3627 }
3628 }
3629
3630 impl fidl::encoding::ValueTypeMarker for Option_ {
3631 type Borrowed<'a> = &'a Self;
3632 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3633 value
3634 }
3635 }
3636
3637 unsafe impl fidl::encoding::TypeMarker for Option_ {
3638 type Owned = Self;
3639
3640 #[inline(always)]
3641 fn inline_align(_context: fidl::encoding::Context) -> usize {
3642 8
3643 }
3644
3645 #[inline(always)]
3646 fn inline_size(_context: fidl::encoding::Context) -> usize {
3647 16
3648 }
3649 }
3650
3651 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Option_, D> for &Option_ {
3652 #[inline]
3653 unsafe fn encode(
3654 self,
3655 encoder: &mut fidl::encoding::Encoder<'_, D>,
3656 offset: usize,
3657 _depth: fidl::encoding::Depth,
3658 ) -> fidl::Result<()> {
3659 encoder.debug_check_bounds::<Option_>(offset);
3660 encoder.write_num::<u64>(self.ordinal(), offset);
3661 match self {
3662 Option_::SubnetMask(ref val) => {
3663 fidl::encoding::encode_in_envelope::<fidl_fuchsia_net::Ipv4Address, D>(
3664 <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
3665 encoder, offset + 8, _depth
3666 )
3667 }
3668 Option_::TimeOffset(ref val) => {
3669 fidl::encoding::encode_in_envelope::<i32, D>(
3670 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3671 encoder, offset + 8, _depth
3672 )
3673 }
3674 Option_::Router(ref val) => {
3675 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3676 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3677 encoder, offset + 8, _depth
3678 )
3679 }
3680 Option_::TimeServer(ref val) => {
3681 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3682 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3683 encoder, offset + 8, _depth
3684 )
3685 }
3686 Option_::NameServer(ref val) => {
3687 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3688 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3689 encoder, offset + 8, _depth
3690 )
3691 }
3692 Option_::DomainNameServer(ref val) => {
3693 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3694 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3695 encoder, offset + 8, _depth
3696 )
3697 }
3698 Option_::LogServer(ref val) => {
3699 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3700 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3701 encoder, offset + 8, _depth
3702 )
3703 }
3704 Option_::CookieServer(ref val) => {
3705 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3706 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3707 encoder, offset + 8, _depth
3708 )
3709 }
3710 Option_::LprServer(ref val) => {
3711 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3712 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3713 encoder, offset + 8, _depth
3714 )
3715 }
3716 Option_::ImpressServer(ref val) => {
3717 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3718 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3719 encoder, offset + 8, _depth
3720 )
3721 }
3722 Option_::ResourceLocationServer(ref val) => {
3723 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3724 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3725 encoder, offset + 8, _depth
3726 )
3727 }
3728 Option_::HostName(ref val) => {
3729 fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3730 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3731 encoder, offset + 8, _depth
3732 )
3733 }
3734 Option_::BootFileSize(ref val) => {
3735 fidl::encoding::encode_in_envelope::<u16, D>(
3736 <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
3737 encoder, offset + 8, _depth
3738 )
3739 }
3740 Option_::MeritDumpFile(ref val) => {
3741 fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3742 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3743 encoder, offset + 8, _depth
3744 )
3745 }
3746 Option_::DomainName(ref val) => {
3747 fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3748 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3749 encoder, offset + 8, _depth
3750 )
3751 }
3752 Option_::SwapServer(ref val) => {
3753 fidl::encoding::encode_in_envelope::<fidl_fuchsia_net::Ipv4Address, D>(
3754 <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
3755 encoder, offset + 8, _depth
3756 )
3757 }
3758 Option_::RootPath(ref val) => {
3759 fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3760 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3761 encoder, offset + 8, _depth
3762 )
3763 }
3764 Option_::ExtensionsPath(ref val) => {
3765 fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3766 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3767 encoder, offset + 8, _depth
3768 )
3769 }
3770 Option_::IpForwarding(ref val) => {
3771 fidl::encoding::encode_in_envelope::<bool, D>(
3772 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3773 encoder, offset + 8, _depth
3774 )
3775 }
3776 Option_::NonLocalSourceRouting(ref val) => {
3777 fidl::encoding::encode_in_envelope::<bool, D>(
3778 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3779 encoder, offset + 8, _depth
3780 )
3781 }
3782 Option_::PolicyFilter(ref val) => {
3783 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3784 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3785 encoder, offset + 8, _depth
3786 )
3787 }
3788 Option_::MaxDatagramReassemblySize(ref val) => {
3789 fidl::encoding::encode_in_envelope::<u16, D>(
3790 <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
3791 encoder, offset + 8, _depth
3792 )
3793 }
3794 Option_::DefaultIpTtl(ref val) => {
3795 fidl::encoding::encode_in_envelope::<u8, D>(
3796 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
3797 encoder, offset + 8, _depth
3798 )
3799 }
3800 Option_::PathMtuAgingTimeout(ref val) => {
3801 fidl::encoding::encode_in_envelope::<u32, D>(
3802 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3803 encoder, offset + 8, _depth
3804 )
3805 }
3806 Option_::PathMtuPlateauTable(ref val) => {
3807 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u16, 127>, D>(
3808 <fidl::encoding::Vector<u16, 127> as fidl::encoding::ValueTypeMarker>::borrow(val),
3809 encoder, offset + 8, _depth
3810 )
3811 }
3812 Option_::InterfaceMtu(ref val) => {
3813 fidl::encoding::encode_in_envelope::<u16, D>(
3814 <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
3815 encoder, offset + 8, _depth
3816 )
3817 }
3818 Option_::AllSubnetsLocal(ref val) => {
3819 fidl::encoding::encode_in_envelope::<bool, D>(
3820 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3821 encoder, offset + 8, _depth
3822 )
3823 }
3824 Option_::BroadcastAddress(ref val) => {
3825 fidl::encoding::encode_in_envelope::<fidl_fuchsia_net::Ipv4Address, D>(
3826 <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
3827 encoder, offset + 8, _depth
3828 )
3829 }
3830 Option_::PerformMaskDiscovery(ref val) => {
3831 fidl::encoding::encode_in_envelope::<bool, D>(
3832 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3833 encoder, offset + 8, _depth
3834 )
3835 }
3836 Option_::MaskSupplier(ref val) => {
3837 fidl::encoding::encode_in_envelope::<bool, D>(
3838 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3839 encoder, offset + 8, _depth
3840 )
3841 }
3842 Option_::PerformRouterDiscovery(ref val) => {
3843 fidl::encoding::encode_in_envelope::<bool, D>(
3844 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3845 encoder, offset + 8, _depth
3846 )
3847 }
3848 Option_::RouterSolicitationAddress(ref val) => {
3849 fidl::encoding::encode_in_envelope::<fidl_fuchsia_net::Ipv4Address, D>(
3850 <fidl_fuchsia_net::Ipv4Address as fidl::encoding::ValueTypeMarker>::borrow(val),
3851 encoder, offset + 8, _depth
3852 )
3853 }
3854 Option_::StaticRoute(ref val) => {
3855 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3856 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3857 encoder, offset + 8, _depth
3858 )
3859 }
3860 Option_::TrailerEncapsulation(ref val) => {
3861 fidl::encoding::encode_in_envelope::<bool, D>(
3862 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3863 encoder, offset + 8, _depth
3864 )
3865 }
3866 Option_::ArpCacheTimeout(ref val) => {
3867 fidl::encoding::encode_in_envelope::<u32, D>(
3868 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3869 encoder, offset + 8, _depth
3870 )
3871 }
3872 Option_::EthernetEncapsulation(ref val) => {
3873 fidl::encoding::encode_in_envelope::<bool, D>(
3874 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3875 encoder, offset + 8, _depth
3876 )
3877 }
3878 Option_::TcpDefaultTtl(ref val) => {
3879 fidl::encoding::encode_in_envelope::<u8, D>(
3880 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
3881 encoder, offset + 8, _depth
3882 )
3883 }
3884 Option_::TcpKeepaliveInterval(ref val) => {
3885 fidl::encoding::encode_in_envelope::<u32, D>(
3886 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3887 encoder, offset + 8, _depth
3888 )
3889 }
3890 Option_::TcpKeepaliveGarbage(ref val) => {
3891 fidl::encoding::encode_in_envelope::<bool, D>(
3892 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3893 encoder, offset + 8, _depth
3894 )
3895 }
3896 Option_::NetworkInformationServiceDomain(ref val) => {
3897 fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3898 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3899 encoder, offset + 8, _depth
3900 )
3901 }
3902 Option_::NetworkInformationServers(ref val) => {
3903 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3904 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3905 encoder, offset + 8, _depth
3906 )
3907 }
3908 Option_::NetworkTimeProtocolServers(ref val) => {
3909 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3910 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3911 encoder, offset + 8, _depth
3912 )
3913 }
3914 Option_::VendorSpecificInformation(ref val) => {
3915 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u8, 255>, D>(
3916 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3917 encoder, offset + 8, _depth
3918 )
3919 }
3920 Option_::NetbiosOverTcpipNameServer(ref val) => {
3921 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3922 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3923 encoder, offset + 8, _depth
3924 )
3925 }
3926 Option_::NetbiosOverTcpipDatagramDistributionServer(ref val) => {
3927 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3928 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3929 encoder, offset + 8, _depth
3930 )
3931 }
3932 Option_::NetbiosOverTcpipNodeType(ref val) => {
3933 fidl::encoding::encode_in_envelope::<NodeTypes, D>(
3934 <NodeTypes as fidl::encoding::ValueTypeMarker>::borrow(val),
3935 encoder, offset + 8, _depth
3936 )
3937 }
3938 Option_::NetbiosOverTcpipScope(ref val) => {
3939 fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3940 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3941 encoder, offset + 8, _depth
3942 )
3943 }
3944 Option_::XWindowSystemFontServer(ref val) => {
3945 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3946 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3947 encoder, offset + 8, _depth
3948 )
3949 }
3950 Option_::XWindowSystemDisplayManager(ref val) => {
3951 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3952 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3953 encoder, offset + 8, _depth
3954 )
3955 }
3956 Option_::NetworkInformationServicePlusDomain(ref val) => {
3957 fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
3958 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
3959 encoder, offset + 8, _depth
3960 )
3961 }
3962 Option_::NetworkInformationServicePlusServers(ref val) => {
3963 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3964 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3965 encoder, offset + 8, _depth
3966 )
3967 }
3968 Option_::MobileIpHomeAgent(ref val) => {
3969 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3970 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3971 encoder, offset + 8, _depth
3972 )
3973 }
3974 Option_::SmtpServer(ref val) => {
3975 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3976 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3977 encoder, offset + 8, _depth
3978 )
3979 }
3980 Option_::Pop3Server(ref val) => {
3981 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3982 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3983 encoder, offset + 8, _depth
3984 )
3985 }
3986 Option_::NntpServer(ref val) => {
3987 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3988 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3989 encoder, offset + 8, _depth
3990 )
3991 }
3992 Option_::DefaultWwwServer(ref val) => {
3993 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
3994 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
3995 encoder, offset + 8, _depth
3996 )
3997 }
3998 Option_::DefaultFingerServer(ref val) => {
3999 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
4000 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
4001 encoder, offset + 8, _depth
4002 )
4003 }
4004 Option_::DefaultIrcServer(ref val) => {
4005 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
4006 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
4007 encoder, offset + 8, _depth
4008 )
4009 }
4010 Option_::StreettalkServer(ref val) => {
4011 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
4012 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
4013 encoder, offset + 8, _depth
4014 )
4015 }
4016 Option_::StreettalkDirectoryAssistanceServer(ref val) => {
4017 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D>(
4018 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::ValueTypeMarker>::borrow(val),
4019 encoder, offset + 8, _depth
4020 )
4021 }
4022 Option_::OptionOverload(ref val) => {
4023 fidl::encoding::encode_in_envelope::<OptionOverloadValue, D>(
4024 <OptionOverloadValue as fidl::encoding::ValueTypeMarker>::borrow(val),
4025 encoder, offset + 8, _depth
4026 )
4027 }
4028 Option_::TftpServerName(ref val) => {
4029 fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
4030 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
4031 encoder, offset + 8, _depth
4032 )
4033 }
4034 Option_::BootfileName(ref val) => {
4035 fidl::encoding::encode_in_envelope::<fidl::encoding::BoundedString<255>, D>(
4036 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(val),
4037 encoder, offset + 8, _depth
4038 )
4039 }
4040 Option_::MaxDhcpMessageSize(ref val) => {
4041 fidl::encoding::encode_in_envelope::<u16, D>(
4042 <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
4043 encoder, offset + 8, _depth
4044 )
4045 }
4046 Option_::RenewalTimeValue(ref val) => {
4047 fidl::encoding::encode_in_envelope::<u32, D>(
4048 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
4049 encoder, offset + 8, _depth
4050 )
4051 }
4052 Option_::RebindingTimeValue(ref val) => {
4053 fidl::encoding::encode_in_envelope::<u32, D>(
4054 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
4055 encoder, offset + 8, _depth
4056 )
4057 }
4058 Option_::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
4059 }
4060 }
4061 }
4062
4063 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Option_ {
4064 #[inline(always)]
4065 fn new_empty() -> Self {
4066 Self::__SourceBreaking { unknown_ordinal: 0 }
4067 }
4068
4069 #[inline]
4070 unsafe fn decode(
4071 &mut self,
4072 decoder: &mut fidl::encoding::Decoder<'_, D>,
4073 offset: usize,
4074 mut depth: fidl::encoding::Depth,
4075 ) -> fidl::Result<()> {
4076 decoder.debug_check_bounds::<Self>(offset);
4077 #[allow(unused_variables)]
4078 let next_out_of_line = decoder.next_out_of_line();
4079 let handles_before = decoder.remaining_handles();
4080 let (ordinal, inlined, num_bytes, num_handles) =
4081 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4082
4083 let member_inline_size = match ordinal {
4084 1 => <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4085 2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4086 3 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4087 4 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4088 5 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4089 6 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4090 7 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4091 8 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4092 9 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4093 10 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4094 11 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4095 12 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4096 13 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4097 14 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4098 15 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4099 16 => <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4100 17 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4101 18 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4102 19 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4103 20 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4104 21 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4105 22 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4106 23 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4107 24 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4108 25 => <fidl::encoding::Vector<u16, 127> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4109 26 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4110 27 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4111 28 => <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4112 29 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4113 30 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4114 31 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4115 32 => <fidl_fuchsia_net::Ipv4Address as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4116 33 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4117 34 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4118 35 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4119 36 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4120 37 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4121 38 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4122 39 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4123 40 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4124 41 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4125 42 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4126 43 => <fidl::encoding::Vector<u8, 255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4127 44 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4128 45 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4129 46 => <NodeTypes as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4130 47 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4131 48 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4132 49 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4133 50 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4134 51 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4135 52 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4136 53 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4137 54 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4138 55 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4139 56 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4140 57 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4141 58 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4142 59 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4143 60 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4144 61 => <OptionOverloadValue as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4145 62 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4146 63 => <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4147 64 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4148 65 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4149 66 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4150 0 => return Err(fidl::Error::UnknownUnionTag),
4151 _ => num_bytes as usize,
4152 };
4153
4154 if inlined != (member_inline_size <= 4) {
4155 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4156 }
4157 let _inner_offset;
4158 if inlined {
4159 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4160 _inner_offset = offset + 8;
4161 } else {
4162 depth.increment()?;
4163 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4164 }
4165 match ordinal {
4166 1 => {
4167 #[allow(irrefutable_let_patterns)]
4168 if let Option_::SubnetMask(_) = self {
4169 } else {
4171 *self =
4173 Option_::SubnetMask(fidl::new_empty!(fidl_fuchsia_net::Ipv4Address, D));
4174 }
4175 #[allow(irrefutable_let_patterns)]
4176 if let Option_::SubnetMask(ref mut val) = self {
4177 fidl::decode!(
4178 fidl_fuchsia_net::Ipv4Address,
4179 D,
4180 val,
4181 decoder,
4182 _inner_offset,
4183 depth
4184 )?;
4185 } else {
4186 unreachable!()
4187 }
4188 }
4189 2 => {
4190 #[allow(irrefutable_let_patterns)]
4191 if let Option_::TimeOffset(_) = self {
4192 } else {
4194 *self = Option_::TimeOffset(fidl::new_empty!(i32, D));
4196 }
4197 #[allow(irrefutable_let_patterns)]
4198 if let Option_::TimeOffset(ref mut val) = self {
4199 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
4200 } else {
4201 unreachable!()
4202 }
4203 }
4204 3 => {
4205 #[allow(irrefutable_let_patterns)]
4206 if let Option_::Router(_) = self {
4207 } else {
4209 *self = Option_::Router(
4211 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4212 );
4213 }
4214 #[allow(irrefutable_let_patterns)]
4215 if let Option_::Router(ref mut val) = self {
4216 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4217 } else {
4218 unreachable!()
4219 }
4220 }
4221 4 => {
4222 #[allow(irrefutable_let_patterns)]
4223 if let Option_::TimeServer(_) = self {
4224 } else {
4226 *self = Option_::TimeServer(
4228 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4229 );
4230 }
4231 #[allow(irrefutable_let_patterns)]
4232 if let Option_::TimeServer(ref mut val) = self {
4233 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4234 } else {
4235 unreachable!()
4236 }
4237 }
4238 5 => {
4239 #[allow(irrefutable_let_patterns)]
4240 if let Option_::NameServer(_) = self {
4241 } else {
4243 *self = Option_::NameServer(
4245 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4246 );
4247 }
4248 #[allow(irrefutable_let_patterns)]
4249 if let Option_::NameServer(ref mut val) = self {
4250 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4251 } else {
4252 unreachable!()
4253 }
4254 }
4255 6 => {
4256 #[allow(irrefutable_let_patterns)]
4257 if let Option_::DomainNameServer(_) = self {
4258 } else {
4260 *self = Option_::DomainNameServer(
4262 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4263 );
4264 }
4265 #[allow(irrefutable_let_patterns)]
4266 if let Option_::DomainNameServer(ref mut val) = self {
4267 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4268 } else {
4269 unreachable!()
4270 }
4271 }
4272 7 => {
4273 #[allow(irrefutable_let_patterns)]
4274 if let Option_::LogServer(_) = self {
4275 } else {
4277 *self = Option_::LogServer(
4279 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4280 );
4281 }
4282 #[allow(irrefutable_let_patterns)]
4283 if let Option_::LogServer(ref mut val) = self {
4284 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4285 } else {
4286 unreachable!()
4287 }
4288 }
4289 8 => {
4290 #[allow(irrefutable_let_patterns)]
4291 if let Option_::CookieServer(_) = self {
4292 } else {
4294 *self = Option_::CookieServer(
4296 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4297 );
4298 }
4299 #[allow(irrefutable_let_patterns)]
4300 if let Option_::CookieServer(ref mut val) = self {
4301 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4302 } else {
4303 unreachable!()
4304 }
4305 }
4306 9 => {
4307 #[allow(irrefutable_let_patterns)]
4308 if let Option_::LprServer(_) = self {
4309 } else {
4311 *self = Option_::LprServer(
4313 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4314 );
4315 }
4316 #[allow(irrefutable_let_patterns)]
4317 if let Option_::LprServer(ref mut val) = self {
4318 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4319 } else {
4320 unreachable!()
4321 }
4322 }
4323 10 => {
4324 #[allow(irrefutable_let_patterns)]
4325 if let Option_::ImpressServer(_) = self {
4326 } else {
4328 *self = Option_::ImpressServer(
4330 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4331 );
4332 }
4333 #[allow(irrefutable_let_patterns)]
4334 if let Option_::ImpressServer(ref mut val) = self {
4335 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4336 } else {
4337 unreachable!()
4338 }
4339 }
4340 11 => {
4341 #[allow(irrefutable_let_patterns)]
4342 if let Option_::ResourceLocationServer(_) = self {
4343 } else {
4345 *self = Option_::ResourceLocationServer(
4347 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4348 );
4349 }
4350 #[allow(irrefutable_let_patterns)]
4351 if let Option_::ResourceLocationServer(ref mut val) = self {
4352 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4353 } else {
4354 unreachable!()
4355 }
4356 }
4357 12 => {
4358 #[allow(irrefutable_let_patterns)]
4359 if let Option_::HostName(_) = self {
4360 } else {
4362 *self = Option_::HostName(fidl::new_empty!(
4364 fidl::encoding::BoundedString<255>,
4365 D
4366 ));
4367 }
4368 #[allow(irrefutable_let_patterns)]
4369 if let Option_::HostName(ref mut val) = self {
4370 fidl::decode!(
4371 fidl::encoding::BoundedString<255>,
4372 D,
4373 val,
4374 decoder,
4375 _inner_offset,
4376 depth
4377 )?;
4378 } else {
4379 unreachable!()
4380 }
4381 }
4382 13 => {
4383 #[allow(irrefutable_let_patterns)]
4384 if let Option_::BootFileSize(_) = self {
4385 } else {
4387 *self = Option_::BootFileSize(fidl::new_empty!(u16, D));
4389 }
4390 #[allow(irrefutable_let_patterns)]
4391 if let Option_::BootFileSize(ref mut val) = self {
4392 fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
4393 } else {
4394 unreachable!()
4395 }
4396 }
4397 14 => {
4398 #[allow(irrefutable_let_patterns)]
4399 if let Option_::MeritDumpFile(_) = self {
4400 } else {
4402 *self = Option_::MeritDumpFile(fidl::new_empty!(
4404 fidl::encoding::BoundedString<255>,
4405 D
4406 ));
4407 }
4408 #[allow(irrefutable_let_patterns)]
4409 if let Option_::MeritDumpFile(ref mut val) = self {
4410 fidl::decode!(
4411 fidl::encoding::BoundedString<255>,
4412 D,
4413 val,
4414 decoder,
4415 _inner_offset,
4416 depth
4417 )?;
4418 } else {
4419 unreachable!()
4420 }
4421 }
4422 15 => {
4423 #[allow(irrefutable_let_patterns)]
4424 if let Option_::DomainName(_) = self {
4425 } else {
4427 *self = Option_::DomainName(fidl::new_empty!(
4429 fidl::encoding::BoundedString<255>,
4430 D
4431 ));
4432 }
4433 #[allow(irrefutable_let_patterns)]
4434 if let Option_::DomainName(ref mut val) = self {
4435 fidl::decode!(
4436 fidl::encoding::BoundedString<255>,
4437 D,
4438 val,
4439 decoder,
4440 _inner_offset,
4441 depth
4442 )?;
4443 } else {
4444 unreachable!()
4445 }
4446 }
4447 16 => {
4448 #[allow(irrefutable_let_patterns)]
4449 if let Option_::SwapServer(_) = self {
4450 } else {
4452 *self =
4454 Option_::SwapServer(fidl::new_empty!(fidl_fuchsia_net::Ipv4Address, D));
4455 }
4456 #[allow(irrefutable_let_patterns)]
4457 if let Option_::SwapServer(ref mut val) = self {
4458 fidl::decode!(
4459 fidl_fuchsia_net::Ipv4Address,
4460 D,
4461 val,
4462 decoder,
4463 _inner_offset,
4464 depth
4465 )?;
4466 } else {
4467 unreachable!()
4468 }
4469 }
4470 17 => {
4471 #[allow(irrefutable_let_patterns)]
4472 if let Option_::RootPath(_) = self {
4473 } else {
4475 *self = Option_::RootPath(fidl::new_empty!(
4477 fidl::encoding::BoundedString<255>,
4478 D
4479 ));
4480 }
4481 #[allow(irrefutable_let_patterns)]
4482 if let Option_::RootPath(ref mut val) = self {
4483 fidl::decode!(
4484 fidl::encoding::BoundedString<255>,
4485 D,
4486 val,
4487 decoder,
4488 _inner_offset,
4489 depth
4490 )?;
4491 } else {
4492 unreachable!()
4493 }
4494 }
4495 18 => {
4496 #[allow(irrefutable_let_patterns)]
4497 if let Option_::ExtensionsPath(_) = self {
4498 } else {
4500 *self = Option_::ExtensionsPath(fidl::new_empty!(
4502 fidl::encoding::BoundedString<255>,
4503 D
4504 ));
4505 }
4506 #[allow(irrefutable_let_patterns)]
4507 if let Option_::ExtensionsPath(ref mut val) = self {
4508 fidl::decode!(
4509 fidl::encoding::BoundedString<255>,
4510 D,
4511 val,
4512 decoder,
4513 _inner_offset,
4514 depth
4515 )?;
4516 } else {
4517 unreachable!()
4518 }
4519 }
4520 19 => {
4521 #[allow(irrefutable_let_patterns)]
4522 if let Option_::IpForwarding(_) = self {
4523 } else {
4525 *self = Option_::IpForwarding(fidl::new_empty!(bool, D));
4527 }
4528 #[allow(irrefutable_let_patterns)]
4529 if let Option_::IpForwarding(ref mut val) = self {
4530 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4531 } else {
4532 unreachable!()
4533 }
4534 }
4535 20 => {
4536 #[allow(irrefutable_let_patterns)]
4537 if let Option_::NonLocalSourceRouting(_) = self {
4538 } else {
4540 *self = Option_::NonLocalSourceRouting(fidl::new_empty!(bool, D));
4542 }
4543 #[allow(irrefutable_let_patterns)]
4544 if let Option_::NonLocalSourceRouting(ref mut val) = self {
4545 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4546 } else {
4547 unreachable!()
4548 }
4549 }
4550 21 => {
4551 #[allow(irrefutable_let_patterns)]
4552 if let Option_::PolicyFilter(_) = self {
4553 } else {
4555 *self = Option_::PolicyFilter(
4557 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4558 );
4559 }
4560 #[allow(irrefutable_let_patterns)]
4561 if let Option_::PolicyFilter(ref mut val) = self {
4562 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4563 } else {
4564 unreachable!()
4565 }
4566 }
4567 22 => {
4568 #[allow(irrefutable_let_patterns)]
4569 if let Option_::MaxDatagramReassemblySize(_) = self {
4570 } else {
4572 *self = Option_::MaxDatagramReassemblySize(fidl::new_empty!(u16, D));
4574 }
4575 #[allow(irrefutable_let_patterns)]
4576 if let Option_::MaxDatagramReassemblySize(ref mut val) = self {
4577 fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
4578 } else {
4579 unreachable!()
4580 }
4581 }
4582 23 => {
4583 #[allow(irrefutable_let_patterns)]
4584 if let Option_::DefaultIpTtl(_) = self {
4585 } else {
4587 *self = Option_::DefaultIpTtl(fidl::new_empty!(u8, D));
4589 }
4590 #[allow(irrefutable_let_patterns)]
4591 if let Option_::DefaultIpTtl(ref mut val) = self {
4592 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
4593 } else {
4594 unreachable!()
4595 }
4596 }
4597 24 => {
4598 #[allow(irrefutable_let_patterns)]
4599 if let Option_::PathMtuAgingTimeout(_) = self {
4600 } else {
4602 *self = Option_::PathMtuAgingTimeout(fidl::new_empty!(u32, D));
4604 }
4605 #[allow(irrefutable_let_patterns)]
4606 if let Option_::PathMtuAgingTimeout(ref mut val) = self {
4607 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
4608 } else {
4609 unreachable!()
4610 }
4611 }
4612 25 => {
4613 #[allow(irrefutable_let_patterns)]
4614 if let Option_::PathMtuPlateauTable(_) = self {
4615 } else {
4617 *self = Option_::PathMtuPlateauTable(
4619 fidl::new_empty!(fidl::encoding::Vector<u16, 127>, D),
4620 );
4621 }
4622 #[allow(irrefutable_let_patterns)]
4623 if let Option_::PathMtuPlateauTable(ref mut val) = self {
4624 fidl::decode!(fidl::encoding::Vector<u16, 127>, D, val, decoder, _inner_offset, depth)?;
4625 } else {
4626 unreachable!()
4627 }
4628 }
4629 26 => {
4630 #[allow(irrefutable_let_patterns)]
4631 if let Option_::InterfaceMtu(_) = self {
4632 } else {
4634 *self = Option_::InterfaceMtu(fidl::new_empty!(u16, D));
4636 }
4637 #[allow(irrefutable_let_patterns)]
4638 if let Option_::InterfaceMtu(ref mut val) = self {
4639 fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
4640 } else {
4641 unreachable!()
4642 }
4643 }
4644 27 => {
4645 #[allow(irrefutable_let_patterns)]
4646 if let Option_::AllSubnetsLocal(_) = self {
4647 } else {
4649 *self = Option_::AllSubnetsLocal(fidl::new_empty!(bool, D));
4651 }
4652 #[allow(irrefutable_let_patterns)]
4653 if let Option_::AllSubnetsLocal(ref mut val) = self {
4654 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4655 } else {
4656 unreachable!()
4657 }
4658 }
4659 28 => {
4660 #[allow(irrefutable_let_patterns)]
4661 if let Option_::BroadcastAddress(_) = self {
4662 } else {
4664 *self = Option_::BroadcastAddress(fidl::new_empty!(
4666 fidl_fuchsia_net::Ipv4Address,
4667 D
4668 ));
4669 }
4670 #[allow(irrefutable_let_patterns)]
4671 if let Option_::BroadcastAddress(ref mut val) = self {
4672 fidl::decode!(
4673 fidl_fuchsia_net::Ipv4Address,
4674 D,
4675 val,
4676 decoder,
4677 _inner_offset,
4678 depth
4679 )?;
4680 } else {
4681 unreachable!()
4682 }
4683 }
4684 29 => {
4685 #[allow(irrefutable_let_patterns)]
4686 if let Option_::PerformMaskDiscovery(_) = self {
4687 } else {
4689 *self = Option_::PerformMaskDiscovery(fidl::new_empty!(bool, D));
4691 }
4692 #[allow(irrefutable_let_patterns)]
4693 if let Option_::PerformMaskDiscovery(ref mut val) = self {
4694 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4695 } else {
4696 unreachable!()
4697 }
4698 }
4699 30 => {
4700 #[allow(irrefutable_let_patterns)]
4701 if let Option_::MaskSupplier(_) = self {
4702 } else {
4704 *self = Option_::MaskSupplier(fidl::new_empty!(bool, D));
4706 }
4707 #[allow(irrefutable_let_patterns)]
4708 if let Option_::MaskSupplier(ref mut val) = self {
4709 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4710 } else {
4711 unreachable!()
4712 }
4713 }
4714 31 => {
4715 #[allow(irrefutable_let_patterns)]
4716 if let Option_::PerformRouterDiscovery(_) = self {
4717 } else {
4719 *self = Option_::PerformRouterDiscovery(fidl::new_empty!(bool, D));
4721 }
4722 #[allow(irrefutable_let_patterns)]
4723 if let Option_::PerformRouterDiscovery(ref mut val) = self {
4724 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4725 } else {
4726 unreachable!()
4727 }
4728 }
4729 32 => {
4730 #[allow(irrefutable_let_patterns)]
4731 if let Option_::RouterSolicitationAddress(_) = self {
4732 } else {
4734 *self = Option_::RouterSolicitationAddress(fidl::new_empty!(
4736 fidl_fuchsia_net::Ipv4Address,
4737 D
4738 ));
4739 }
4740 #[allow(irrefutable_let_patterns)]
4741 if let Option_::RouterSolicitationAddress(ref mut val) = self {
4742 fidl::decode!(
4743 fidl_fuchsia_net::Ipv4Address,
4744 D,
4745 val,
4746 decoder,
4747 _inner_offset,
4748 depth
4749 )?;
4750 } else {
4751 unreachable!()
4752 }
4753 }
4754 33 => {
4755 #[allow(irrefutable_let_patterns)]
4756 if let Option_::StaticRoute(_) = self {
4757 } else {
4759 *self = Option_::StaticRoute(
4761 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4762 );
4763 }
4764 #[allow(irrefutable_let_patterns)]
4765 if let Option_::StaticRoute(ref mut val) = self {
4766 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4767 } else {
4768 unreachable!()
4769 }
4770 }
4771 34 => {
4772 #[allow(irrefutable_let_patterns)]
4773 if let Option_::TrailerEncapsulation(_) = self {
4774 } else {
4776 *self = Option_::TrailerEncapsulation(fidl::new_empty!(bool, D));
4778 }
4779 #[allow(irrefutable_let_patterns)]
4780 if let Option_::TrailerEncapsulation(ref mut val) = self {
4781 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4782 } else {
4783 unreachable!()
4784 }
4785 }
4786 35 => {
4787 #[allow(irrefutable_let_patterns)]
4788 if let Option_::ArpCacheTimeout(_) = self {
4789 } else {
4791 *self = Option_::ArpCacheTimeout(fidl::new_empty!(u32, D));
4793 }
4794 #[allow(irrefutable_let_patterns)]
4795 if let Option_::ArpCacheTimeout(ref mut val) = self {
4796 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
4797 } else {
4798 unreachable!()
4799 }
4800 }
4801 36 => {
4802 #[allow(irrefutable_let_patterns)]
4803 if let Option_::EthernetEncapsulation(_) = self {
4804 } else {
4806 *self = Option_::EthernetEncapsulation(fidl::new_empty!(bool, D));
4808 }
4809 #[allow(irrefutable_let_patterns)]
4810 if let Option_::EthernetEncapsulation(ref mut val) = self {
4811 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4812 } else {
4813 unreachable!()
4814 }
4815 }
4816 37 => {
4817 #[allow(irrefutable_let_patterns)]
4818 if let Option_::TcpDefaultTtl(_) = self {
4819 } else {
4821 *self = Option_::TcpDefaultTtl(fidl::new_empty!(u8, D));
4823 }
4824 #[allow(irrefutable_let_patterns)]
4825 if let Option_::TcpDefaultTtl(ref mut val) = self {
4826 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
4827 } else {
4828 unreachable!()
4829 }
4830 }
4831 38 => {
4832 #[allow(irrefutable_let_patterns)]
4833 if let Option_::TcpKeepaliveInterval(_) = self {
4834 } else {
4836 *self = Option_::TcpKeepaliveInterval(fidl::new_empty!(u32, D));
4838 }
4839 #[allow(irrefutable_let_patterns)]
4840 if let Option_::TcpKeepaliveInterval(ref mut val) = self {
4841 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
4842 } else {
4843 unreachable!()
4844 }
4845 }
4846 39 => {
4847 #[allow(irrefutable_let_patterns)]
4848 if let Option_::TcpKeepaliveGarbage(_) = self {
4849 } else {
4851 *self = Option_::TcpKeepaliveGarbage(fidl::new_empty!(bool, D));
4853 }
4854 #[allow(irrefutable_let_patterns)]
4855 if let Option_::TcpKeepaliveGarbage(ref mut val) = self {
4856 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
4857 } else {
4858 unreachable!()
4859 }
4860 }
4861 40 => {
4862 #[allow(irrefutable_let_patterns)]
4863 if let Option_::NetworkInformationServiceDomain(_) = self {
4864 } else {
4866 *self = Option_::NetworkInformationServiceDomain(fidl::new_empty!(
4868 fidl::encoding::BoundedString<255>,
4869 D
4870 ));
4871 }
4872 #[allow(irrefutable_let_patterns)]
4873 if let Option_::NetworkInformationServiceDomain(ref mut val) = self {
4874 fidl::decode!(
4875 fidl::encoding::BoundedString<255>,
4876 D,
4877 val,
4878 decoder,
4879 _inner_offset,
4880 depth
4881 )?;
4882 } else {
4883 unreachable!()
4884 }
4885 }
4886 41 => {
4887 #[allow(irrefutable_let_patterns)]
4888 if let Option_::NetworkInformationServers(_) = self {
4889 } else {
4891 *self = Option_::NetworkInformationServers(
4893 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4894 );
4895 }
4896 #[allow(irrefutable_let_patterns)]
4897 if let Option_::NetworkInformationServers(ref mut val) = self {
4898 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4899 } else {
4900 unreachable!()
4901 }
4902 }
4903 42 => {
4904 #[allow(irrefutable_let_patterns)]
4905 if let Option_::NetworkTimeProtocolServers(_) = self {
4906 } else {
4908 *self = Option_::NetworkTimeProtocolServers(
4910 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4911 );
4912 }
4913 #[allow(irrefutable_let_patterns)]
4914 if let Option_::NetworkTimeProtocolServers(ref mut val) = self {
4915 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4916 } else {
4917 unreachable!()
4918 }
4919 }
4920 43 => {
4921 #[allow(irrefutable_let_patterns)]
4922 if let Option_::VendorSpecificInformation(_) = self {
4923 } else {
4925 *self = Option_::VendorSpecificInformation(
4927 fidl::new_empty!(fidl::encoding::Vector<u8, 255>, D),
4928 );
4929 }
4930 #[allow(irrefutable_let_patterns)]
4931 if let Option_::VendorSpecificInformation(ref mut val) = self {
4932 fidl::decode!(fidl::encoding::Vector<u8, 255>, D, val, decoder, _inner_offset, depth)?;
4933 } else {
4934 unreachable!()
4935 }
4936 }
4937 44 => {
4938 #[allow(irrefutable_let_patterns)]
4939 if let Option_::NetbiosOverTcpipNameServer(_) = self {
4940 } else {
4942 *self = Option_::NetbiosOverTcpipNameServer(
4944 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4945 );
4946 }
4947 #[allow(irrefutable_let_patterns)]
4948 if let Option_::NetbiosOverTcpipNameServer(ref mut val) = self {
4949 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4950 } else {
4951 unreachable!()
4952 }
4953 }
4954 45 => {
4955 #[allow(irrefutable_let_patterns)]
4956 if let Option_::NetbiosOverTcpipDatagramDistributionServer(_) = self {
4957 } else {
4959 *self = Option_::NetbiosOverTcpipDatagramDistributionServer(
4961 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
4962 );
4963 }
4964 #[allow(irrefutable_let_patterns)]
4965 if let Option_::NetbiosOverTcpipDatagramDistributionServer(ref mut val) = self {
4966 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
4967 } else {
4968 unreachable!()
4969 }
4970 }
4971 46 => {
4972 #[allow(irrefutable_let_patterns)]
4973 if let Option_::NetbiosOverTcpipNodeType(_) = self {
4974 } else {
4976 *self = Option_::NetbiosOverTcpipNodeType(fidl::new_empty!(NodeTypes, D));
4978 }
4979 #[allow(irrefutable_let_patterns)]
4980 if let Option_::NetbiosOverTcpipNodeType(ref mut val) = self {
4981 fidl::decode!(NodeTypes, D, val, decoder, _inner_offset, depth)?;
4982 } else {
4983 unreachable!()
4984 }
4985 }
4986 47 => {
4987 #[allow(irrefutable_let_patterns)]
4988 if let Option_::NetbiosOverTcpipScope(_) = self {
4989 } else {
4991 *self = Option_::NetbiosOverTcpipScope(fidl::new_empty!(
4993 fidl::encoding::BoundedString<255>,
4994 D
4995 ));
4996 }
4997 #[allow(irrefutable_let_patterns)]
4998 if let Option_::NetbiosOverTcpipScope(ref mut val) = self {
4999 fidl::decode!(
5000 fidl::encoding::BoundedString<255>,
5001 D,
5002 val,
5003 decoder,
5004 _inner_offset,
5005 depth
5006 )?;
5007 } else {
5008 unreachable!()
5009 }
5010 }
5011 48 => {
5012 #[allow(irrefutable_let_patterns)]
5013 if let Option_::XWindowSystemFontServer(_) = self {
5014 } else {
5016 *self = Option_::XWindowSystemFontServer(
5018 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5019 );
5020 }
5021 #[allow(irrefutable_let_patterns)]
5022 if let Option_::XWindowSystemFontServer(ref mut val) = self {
5023 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5024 } else {
5025 unreachable!()
5026 }
5027 }
5028 49 => {
5029 #[allow(irrefutable_let_patterns)]
5030 if let Option_::XWindowSystemDisplayManager(_) = self {
5031 } else {
5033 *self = Option_::XWindowSystemDisplayManager(
5035 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5036 );
5037 }
5038 #[allow(irrefutable_let_patterns)]
5039 if let Option_::XWindowSystemDisplayManager(ref mut val) = self {
5040 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5041 } else {
5042 unreachable!()
5043 }
5044 }
5045 50 => {
5046 #[allow(irrefutable_let_patterns)]
5047 if let Option_::NetworkInformationServicePlusDomain(_) = self {
5048 } else {
5050 *self = Option_::NetworkInformationServicePlusDomain(fidl::new_empty!(
5052 fidl::encoding::BoundedString<255>,
5053 D
5054 ));
5055 }
5056 #[allow(irrefutable_let_patterns)]
5057 if let Option_::NetworkInformationServicePlusDomain(ref mut val) = self {
5058 fidl::decode!(
5059 fidl::encoding::BoundedString<255>,
5060 D,
5061 val,
5062 decoder,
5063 _inner_offset,
5064 depth
5065 )?;
5066 } else {
5067 unreachable!()
5068 }
5069 }
5070 51 => {
5071 #[allow(irrefutable_let_patterns)]
5072 if let Option_::NetworkInformationServicePlusServers(_) = self {
5073 } else {
5075 *self = Option_::NetworkInformationServicePlusServers(
5077 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5078 );
5079 }
5080 #[allow(irrefutable_let_patterns)]
5081 if let Option_::NetworkInformationServicePlusServers(ref mut val) = self {
5082 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5083 } else {
5084 unreachable!()
5085 }
5086 }
5087 52 => {
5088 #[allow(irrefutable_let_patterns)]
5089 if let Option_::MobileIpHomeAgent(_) = self {
5090 } else {
5092 *self = Option_::MobileIpHomeAgent(
5094 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5095 );
5096 }
5097 #[allow(irrefutable_let_patterns)]
5098 if let Option_::MobileIpHomeAgent(ref mut val) = self {
5099 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5100 } else {
5101 unreachable!()
5102 }
5103 }
5104 53 => {
5105 #[allow(irrefutable_let_patterns)]
5106 if let Option_::SmtpServer(_) = self {
5107 } else {
5109 *self = Option_::SmtpServer(
5111 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5112 );
5113 }
5114 #[allow(irrefutable_let_patterns)]
5115 if let Option_::SmtpServer(ref mut val) = self {
5116 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5117 } else {
5118 unreachable!()
5119 }
5120 }
5121 54 => {
5122 #[allow(irrefutable_let_patterns)]
5123 if let Option_::Pop3Server(_) = self {
5124 } else {
5126 *self = Option_::Pop3Server(
5128 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5129 );
5130 }
5131 #[allow(irrefutable_let_patterns)]
5132 if let Option_::Pop3Server(ref mut val) = self {
5133 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5134 } else {
5135 unreachable!()
5136 }
5137 }
5138 55 => {
5139 #[allow(irrefutable_let_patterns)]
5140 if let Option_::NntpServer(_) = self {
5141 } else {
5143 *self = Option_::NntpServer(
5145 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5146 );
5147 }
5148 #[allow(irrefutable_let_patterns)]
5149 if let Option_::NntpServer(ref mut val) = self {
5150 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5151 } else {
5152 unreachable!()
5153 }
5154 }
5155 56 => {
5156 #[allow(irrefutable_let_patterns)]
5157 if let Option_::DefaultWwwServer(_) = self {
5158 } else {
5160 *self = Option_::DefaultWwwServer(
5162 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5163 );
5164 }
5165 #[allow(irrefutable_let_patterns)]
5166 if let Option_::DefaultWwwServer(ref mut val) = self {
5167 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5168 } else {
5169 unreachable!()
5170 }
5171 }
5172 57 => {
5173 #[allow(irrefutable_let_patterns)]
5174 if let Option_::DefaultFingerServer(_) = self {
5175 } else {
5177 *self = Option_::DefaultFingerServer(
5179 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5180 );
5181 }
5182 #[allow(irrefutable_let_patterns)]
5183 if let Option_::DefaultFingerServer(ref mut val) = self {
5184 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5185 } else {
5186 unreachable!()
5187 }
5188 }
5189 58 => {
5190 #[allow(irrefutable_let_patterns)]
5191 if let Option_::DefaultIrcServer(_) = self {
5192 } else {
5194 *self = Option_::DefaultIrcServer(
5196 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5197 );
5198 }
5199 #[allow(irrefutable_let_patterns)]
5200 if let Option_::DefaultIrcServer(ref mut val) = self {
5201 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5202 } else {
5203 unreachable!()
5204 }
5205 }
5206 59 => {
5207 #[allow(irrefutable_let_patterns)]
5208 if let Option_::StreettalkServer(_) = self {
5209 } else {
5211 *self = Option_::StreettalkServer(
5213 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5214 );
5215 }
5216 #[allow(irrefutable_let_patterns)]
5217 if let Option_::StreettalkServer(ref mut val) = self {
5218 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5219 } else {
5220 unreachable!()
5221 }
5222 }
5223 60 => {
5224 #[allow(irrefutable_let_patterns)]
5225 if let Option_::StreettalkDirectoryAssistanceServer(_) = self {
5226 } else {
5228 *self = Option_::StreettalkDirectoryAssistanceServer(
5230 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D),
5231 );
5232 }
5233 #[allow(irrefutable_let_patterns)]
5234 if let Option_::StreettalkDirectoryAssistanceServer(ref mut val) = self {
5235 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 63>, D, val, decoder, _inner_offset, depth)?;
5236 } else {
5237 unreachable!()
5238 }
5239 }
5240 61 => {
5241 #[allow(irrefutable_let_patterns)]
5242 if let Option_::OptionOverload(_) = self {
5243 } else {
5245 *self = Option_::OptionOverload(fidl::new_empty!(OptionOverloadValue, D));
5247 }
5248 #[allow(irrefutable_let_patterns)]
5249 if let Option_::OptionOverload(ref mut val) = self {
5250 fidl::decode!(OptionOverloadValue, D, val, decoder, _inner_offset, depth)?;
5251 } else {
5252 unreachable!()
5253 }
5254 }
5255 62 => {
5256 #[allow(irrefutable_let_patterns)]
5257 if let Option_::TftpServerName(_) = self {
5258 } else {
5260 *self = Option_::TftpServerName(fidl::new_empty!(
5262 fidl::encoding::BoundedString<255>,
5263 D
5264 ));
5265 }
5266 #[allow(irrefutable_let_patterns)]
5267 if let Option_::TftpServerName(ref mut val) = self {
5268 fidl::decode!(
5269 fidl::encoding::BoundedString<255>,
5270 D,
5271 val,
5272 decoder,
5273 _inner_offset,
5274 depth
5275 )?;
5276 } else {
5277 unreachable!()
5278 }
5279 }
5280 63 => {
5281 #[allow(irrefutable_let_patterns)]
5282 if let Option_::BootfileName(_) = self {
5283 } else {
5285 *self = Option_::BootfileName(fidl::new_empty!(
5287 fidl::encoding::BoundedString<255>,
5288 D
5289 ));
5290 }
5291 #[allow(irrefutable_let_patterns)]
5292 if let Option_::BootfileName(ref mut val) = self {
5293 fidl::decode!(
5294 fidl::encoding::BoundedString<255>,
5295 D,
5296 val,
5297 decoder,
5298 _inner_offset,
5299 depth
5300 )?;
5301 } else {
5302 unreachable!()
5303 }
5304 }
5305 64 => {
5306 #[allow(irrefutable_let_patterns)]
5307 if let Option_::MaxDhcpMessageSize(_) = self {
5308 } else {
5310 *self = Option_::MaxDhcpMessageSize(fidl::new_empty!(u16, D));
5312 }
5313 #[allow(irrefutable_let_patterns)]
5314 if let Option_::MaxDhcpMessageSize(ref mut val) = self {
5315 fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
5316 } else {
5317 unreachable!()
5318 }
5319 }
5320 65 => {
5321 #[allow(irrefutable_let_patterns)]
5322 if let Option_::RenewalTimeValue(_) = self {
5323 } else {
5325 *self = Option_::RenewalTimeValue(fidl::new_empty!(u32, D));
5327 }
5328 #[allow(irrefutable_let_patterns)]
5329 if let Option_::RenewalTimeValue(ref mut val) = self {
5330 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
5331 } else {
5332 unreachable!()
5333 }
5334 }
5335 66 => {
5336 #[allow(irrefutable_let_patterns)]
5337 if let Option_::RebindingTimeValue(_) = self {
5338 } else {
5340 *self = Option_::RebindingTimeValue(fidl::new_empty!(u32, D));
5342 }
5343 #[allow(irrefutable_let_patterns)]
5344 if let Option_::RebindingTimeValue(ref mut val) = self {
5345 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
5346 } else {
5347 unreachable!()
5348 }
5349 }
5350 #[allow(deprecated)]
5351 ordinal => {
5352 for _ in 0..num_handles {
5353 decoder.drop_next_handle()?;
5354 }
5355 *self = Option_::__SourceBreaking { unknown_ordinal: ordinal };
5356 }
5357 }
5358 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5359 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5360 }
5361 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5362 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5363 }
5364 Ok(())
5365 }
5366 }
5367
5368 impl fidl::encoding::ValueTypeMarker for Parameter {
5369 type Borrowed<'a> = &'a Self;
5370 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5371 value
5372 }
5373 }
5374
5375 unsafe impl fidl::encoding::TypeMarker for Parameter {
5376 type Owned = Self;
5377
5378 #[inline(always)]
5379 fn inline_align(_context: fidl::encoding::Context) -> usize {
5380 8
5381 }
5382
5383 #[inline(always)]
5384 fn inline_size(_context: fidl::encoding::Context) -> usize {
5385 16
5386 }
5387 }
5388
5389 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Parameter, D>
5390 for &Parameter
5391 {
5392 #[inline]
5393 unsafe fn encode(
5394 self,
5395 encoder: &mut fidl::encoding::Encoder<'_, D>,
5396 offset: usize,
5397 _depth: fidl::encoding::Depth,
5398 ) -> fidl::Result<()> {
5399 encoder.debug_check_bounds::<Parameter>(offset);
5400 encoder.write_num::<u64>(self.ordinal(), offset);
5401 match self {
5402 Parameter::IpAddrs(ref val) => {
5403 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 256>, D>(
5404 <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
5405 encoder, offset + 8, _depth
5406 )
5407 }
5408 Parameter::AddressPool(ref val) => {
5409 fidl::encoding::encode_in_envelope::<AddressPool, D>(
5410 <AddressPool as fidl::encoding::ValueTypeMarker>::borrow(val),
5411 encoder, offset + 8, _depth
5412 )
5413 }
5414 Parameter::Lease(ref val) => {
5415 fidl::encoding::encode_in_envelope::<LeaseLength, D>(
5416 <LeaseLength as fidl::encoding::ValueTypeMarker>::borrow(val),
5417 encoder, offset + 8, _depth
5418 )
5419 }
5420 Parameter::PermittedMacs(ref val) => {
5421 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl_fuchsia_net::MacAddress, 256>, D>(
5422 <fidl::encoding::Vector<fidl_fuchsia_net::MacAddress, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
5423 encoder, offset + 8, _depth
5424 )
5425 }
5426 Parameter::StaticallyAssignedAddrs(ref val) => {
5427 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<StaticAssignment, 256>, D>(
5428 <fidl::encoding::Vector<StaticAssignment, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
5429 encoder, offset + 8, _depth
5430 )
5431 }
5432 Parameter::ArpProbe(ref val) => {
5433 fidl::encoding::encode_in_envelope::<bool, D>(
5434 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
5435 encoder, offset + 8, _depth
5436 )
5437 }
5438 Parameter::BoundDeviceNames(ref val) => {
5439 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256>, D>(
5440 <fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256> as fidl::encoding::ValueTypeMarker>::borrow(val),
5441 encoder, offset + 8, _depth
5442 )
5443 }
5444 Parameter::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
5445 }
5446 }
5447 }
5448
5449 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Parameter {
5450 #[inline(always)]
5451 fn new_empty() -> Self {
5452 Self::__SourceBreaking { unknown_ordinal: 0 }
5453 }
5454
5455 #[inline]
5456 unsafe fn decode(
5457 &mut self,
5458 decoder: &mut fidl::encoding::Decoder<'_, D>,
5459 offset: usize,
5460 mut depth: fidl::encoding::Depth,
5461 ) -> fidl::Result<()> {
5462 decoder.debug_check_bounds::<Self>(offset);
5463 #[allow(unused_variables)]
5464 let next_out_of_line = decoder.next_out_of_line();
5465 let handles_before = decoder.remaining_handles();
5466 let (ordinal, inlined, num_bytes, num_handles) =
5467 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5468
5469 let member_inline_size = match ordinal {
5470 1 => <fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5471 2 => <AddressPool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5472 3 => <LeaseLength as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5473 4 => <fidl::encoding::Vector<fidl_fuchsia_net::MacAddress, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5474 5 => <fidl::encoding::Vector<StaticAssignment, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5475 6 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5476 7 => <fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5477 0 => return Err(fidl::Error::UnknownUnionTag),
5478 _ => num_bytes as usize,
5479 };
5480
5481 if inlined != (member_inline_size <= 4) {
5482 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5483 }
5484 let _inner_offset;
5485 if inlined {
5486 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5487 _inner_offset = offset + 8;
5488 } else {
5489 depth.increment()?;
5490 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5491 }
5492 match ordinal {
5493 1 => {
5494 #[allow(irrefutable_let_patterns)]
5495 if let Parameter::IpAddrs(_) = self {
5496 } else {
5498 *self = Parameter::IpAddrs(
5500 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 256>, D),
5501 );
5502 }
5503 #[allow(irrefutable_let_patterns)]
5504 if let Parameter::IpAddrs(ref mut val) = self {
5505 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::Ipv4Address, 256>, D, val, decoder, _inner_offset, depth)?;
5506 } else {
5507 unreachable!()
5508 }
5509 }
5510 2 => {
5511 #[allow(irrefutable_let_patterns)]
5512 if let Parameter::AddressPool(_) = self {
5513 } else {
5515 *self = Parameter::AddressPool(fidl::new_empty!(AddressPool, D));
5517 }
5518 #[allow(irrefutable_let_patterns)]
5519 if let Parameter::AddressPool(ref mut val) = self {
5520 fidl::decode!(AddressPool, D, val, decoder, _inner_offset, depth)?;
5521 } else {
5522 unreachable!()
5523 }
5524 }
5525 3 => {
5526 #[allow(irrefutable_let_patterns)]
5527 if let Parameter::Lease(_) = self {
5528 } else {
5530 *self = Parameter::Lease(fidl::new_empty!(LeaseLength, D));
5532 }
5533 #[allow(irrefutable_let_patterns)]
5534 if let Parameter::Lease(ref mut val) = self {
5535 fidl::decode!(LeaseLength, D, val, decoder, _inner_offset, depth)?;
5536 } else {
5537 unreachable!()
5538 }
5539 }
5540 4 => {
5541 #[allow(irrefutable_let_patterns)]
5542 if let Parameter::PermittedMacs(_) = self {
5543 } else {
5545 *self = Parameter::PermittedMacs(
5547 fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_net::MacAddress, 256>, D),
5548 );
5549 }
5550 #[allow(irrefutable_let_patterns)]
5551 if let Parameter::PermittedMacs(ref mut val) = self {
5552 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_net::MacAddress, 256>, D, val, decoder, _inner_offset, depth)?;
5553 } else {
5554 unreachable!()
5555 }
5556 }
5557 5 => {
5558 #[allow(irrefutable_let_patterns)]
5559 if let Parameter::StaticallyAssignedAddrs(_) = self {
5560 } else {
5562 *self = Parameter::StaticallyAssignedAddrs(
5564 fidl::new_empty!(fidl::encoding::Vector<StaticAssignment, 256>, D),
5565 );
5566 }
5567 #[allow(irrefutable_let_patterns)]
5568 if let Parameter::StaticallyAssignedAddrs(ref mut val) = self {
5569 fidl::decode!(fidl::encoding::Vector<StaticAssignment, 256>, D, val, decoder, _inner_offset, depth)?;
5570 } else {
5571 unreachable!()
5572 }
5573 }
5574 6 => {
5575 #[allow(irrefutable_let_patterns)]
5576 if let Parameter::ArpProbe(_) = self {
5577 } else {
5579 *self = Parameter::ArpProbe(fidl::new_empty!(bool, D));
5581 }
5582 #[allow(irrefutable_let_patterns)]
5583 if let Parameter::ArpProbe(ref mut val) = self {
5584 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
5585 } else {
5586 unreachable!()
5587 }
5588 }
5589 7 => {
5590 #[allow(irrefutable_let_patterns)]
5591 if let Parameter::BoundDeviceNames(_) = self {
5592 } else {
5594 *self = Parameter::BoundDeviceNames(fidl::new_empty!(
5596 fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256>,
5597 D
5598 ));
5599 }
5600 #[allow(irrefutable_let_patterns)]
5601 if let Parameter::BoundDeviceNames(ref mut val) = self {
5602 fidl::decode!(
5603 fidl::encoding::Vector<fidl::encoding::BoundedString<256>, 256>,
5604 D,
5605 val,
5606 decoder,
5607 _inner_offset,
5608 depth
5609 )?;
5610 } else {
5611 unreachable!()
5612 }
5613 }
5614 #[allow(deprecated)]
5615 ordinal => {
5616 for _ in 0..num_handles {
5617 decoder.drop_next_handle()?;
5618 }
5619 *self = Parameter::__SourceBreaking { unknown_ordinal: ordinal };
5620 }
5621 }
5622 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5623 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5624 }
5625 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5626 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5627 }
5628 Ok(())
5629 }
5630 }
5631}