Skip to main content

fidl_next_common_fuchsia_ldsvc/
fidl_next_common_fuchsia_ldsvc.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8    pub struct LoaderLoadObjectRequest {
9        pub object_name: ::std::string::String,
10    }
11
12    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>
13        for LoaderLoadObjectRequest
14    where
15        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16        ___E: ::fidl_next::Encoder,
17    {
18        #[inline]
19        fn encode(
20            self,
21            encoder_: &mut ___E,
22            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderLoadObjectRequest<'static>>,
23            _: (),
24        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
25            ::fidl_next::munge! {
26                let crate::wire::LoaderLoadObjectRequest {
27                    object_name,
28
29                } = out_;
30            }
31
32            ::fidl_next::Encode::encode(self.object_name, encoder_, object_name, 1024)?;
33
34            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object_name.as_mut_ptr()) };
35            ::fidl_next::Constrained::validate(_field, 1024)?;
36
37            Ok(())
38        }
39    }
40
41    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>
42        for &'a LoaderLoadObjectRequest
43    where
44        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
45        ___E: ::fidl_next::Encoder,
46    {
47        #[inline]
48        fn encode(
49            self,
50            encoder_: &mut ___E,
51            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderLoadObjectRequest<'static>>,
52            _: (),
53        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
54            ::fidl_next::munge! {
55                let crate::wire::LoaderLoadObjectRequest {
56
57                    object_name,
58
59                } = out_;
60            }
61
62            ::fidl_next::Encode::encode(&self.object_name, encoder_, object_name, 1024)?;
63
64            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object_name.as_mut_ptr()) };
65            ::fidl_next::Constrained::validate(_field, 1024)?;
66
67            Ok(())
68        }
69    }
70
71    unsafe impl<___E>
72        ::fidl_next::EncodeOption<
73            ::fidl_next::wire::Box<'static, crate::wire::LoaderLoadObjectRequest<'static>>,
74            ___E,
75        > for LoaderLoadObjectRequest
76    where
77        ___E: ::fidl_next::Encoder + ?Sized,
78        LoaderLoadObjectRequest:
79            ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>,
80    {
81        #[inline]
82        fn encode_option(
83            this: ::core::option::Option<Self>,
84            encoder: &mut ___E,
85            out: &mut ::core::mem::MaybeUninit<
86                ::fidl_next::wire::Box<'static, crate::wire::LoaderLoadObjectRequest<'static>>,
87            >,
88            _: (),
89        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
90            if let Some(inner) = this {
91                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
92                ::fidl_next::wire::Box::encode_present(out);
93            } else {
94                ::fidl_next::wire::Box::encode_absent(out);
95            }
96
97            Ok(())
98        }
99    }
100
101    unsafe impl<'a, ___E>
102        ::fidl_next::EncodeOption<
103            ::fidl_next::wire::Box<'static, crate::wire::LoaderLoadObjectRequest<'static>>,
104            ___E,
105        > for &'a LoaderLoadObjectRequest
106    where
107        ___E: ::fidl_next::Encoder + ?Sized,
108        &'a LoaderLoadObjectRequest:
109            ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>,
110    {
111        #[inline]
112        fn encode_option(
113            this: ::core::option::Option<Self>,
114            encoder: &mut ___E,
115            out: &mut ::core::mem::MaybeUninit<
116                ::fidl_next::wire::Box<'static, crate::wire::LoaderLoadObjectRequest<'static>>,
117            >,
118            _: (),
119        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
120            if let Some(inner) = this {
121                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
122                ::fidl_next::wire::Box::encode_present(out);
123            } else {
124                ::fidl_next::wire::Box::encode_absent(out);
125            }
126
127            Ok(())
128        }
129    }
130
131    impl<'de> ::fidl_next::FromWire<crate::wire::LoaderLoadObjectRequest<'de>>
132        for LoaderLoadObjectRequest
133    {
134        #[inline]
135        fn from_wire(wire: crate::wire::LoaderLoadObjectRequest<'de>) -> Self {
136            Self { object_name: ::fidl_next::FromWire::from_wire(wire.object_name) }
137        }
138    }
139
140    impl<'de> ::fidl_next::FromWireRef<crate::wire::LoaderLoadObjectRequest<'de>>
141        for LoaderLoadObjectRequest
142    {
143        #[inline]
144        fn from_wire_ref(wire: &crate::wire::LoaderLoadObjectRequest<'de>) -> Self {
145            Self { object_name: ::fidl_next::FromWireRef::from_wire_ref(&wire.object_name) }
146        }
147    }
148
149    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
150    pub struct LoaderConfigRequest {
151        pub config: ::std::string::String,
152    }
153
154    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>
155        for LoaderConfigRequest
156    where
157        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
158        ___E: ::fidl_next::Encoder,
159    {
160        #[inline]
161        fn encode(
162            self,
163            encoder_: &mut ___E,
164            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigRequest<'static>>,
165            _: (),
166        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
167            ::fidl_next::munge! {
168                let crate::wire::LoaderConfigRequest {
169                    config,
170
171                } = out_;
172            }
173
174            ::fidl_next::Encode::encode(self.config, encoder_, config, 1024)?;
175
176            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(config.as_mut_ptr()) };
177            ::fidl_next::Constrained::validate(_field, 1024)?;
178
179            Ok(())
180        }
181    }
182
183    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>
184        for &'a LoaderConfigRequest
185    where
186        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
187        ___E: ::fidl_next::Encoder,
188    {
189        #[inline]
190        fn encode(
191            self,
192            encoder_: &mut ___E,
193            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigRequest<'static>>,
194            _: (),
195        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
196            ::fidl_next::munge! {
197                let crate::wire::LoaderConfigRequest {
198
199                    config,
200
201                } = out_;
202            }
203
204            ::fidl_next::Encode::encode(&self.config, encoder_, config, 1024)?;
205
206            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(config.as_mut_ptr()) };
207            ::fidl_next::Constrained::validate(_field, 1024)?;
208
209            Ok(())
210        }
211    }
212
213    unsafe impl<___E>
214        ::fidl_next::EncodeOption<
215            ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigRequest<'static>>,
216            ___E,
217        > for LoaderConfigRequest
218    where
219        ___E: ::fidl_next::Encoder + ?Sized,
220        LoaderConfigRequest: ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>,
221    {
222        #[inline]
223        fn encode_option(
224            this: ::core::option::Option<Self>,
225            encoder: &mut ___E,
226            out: &mut ::core::mem::MaybeUninit<
227                ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigRequest<'static>>,
228            >,
229            _: (),
230        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
231            if let Some(inner) = this {
232                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
233                ::fidl_next::wire::Box::encode_present(out);
234            } else {
235                ::fidl_next::wire::Box::encode_absent(out);
236            }
237
238            Ok(())
239        }
240    }
241
242    unsafe impl<'a, ___E>
243        ::fidl_next::EncodeOption<
244            ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigRequest<'static>>,
245            ___E,
246        > for &'a LoaderConfigRequest
247    where
248        ___E: ::fidl_next::Encoder + ?Sized,
249        &'a LoaderConfigRequest:
250            ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>,
251    {
252        #[inline]
253        fn encode_option(
254            this: ::core::option::Option<Self>,
255            encoder: &mut ___E,
256            out: &mut ::core::mem::MaybeUninit<
257                ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigRequest<'static>>,
258            >,
259            _: (),
260        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
261            if let Some(inner) = this {
262                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
263                ::fidl_next::wire::Box::encode_present(out);
264            } else {
265                ::fidl_next::wire::Box::encode_absent(out);
266            }
267
268            Ok(())
269        }
270    }
271
272    impl<'de> ::fidl_next::FromWire<crate::wire::LoaderConfigRequest<'de>> for LoaderConfigRequest {
273        #[inline]
274        fn from_wire(wire: crate::wire::LoaderConfigRequest<'de>) -> Self {
275            Self { config: ::fidl_next::FromWire::from_wire(wire.config) }
276        }
277    }
278
279    impl<'de> ::fidl_next::FromWireRef<crate::wire::LoaderConfigRequest<'de>> for LoaderConfigRequest {
280        #[inline]
281        fn from_wire_ref(wire: &crate::wire::LoaderConfigRequest<'de>) -> Self {
282            Self { config: ::fidl_next::FromWireRef::from_wire_ref(&wire.config) }
283        }
284    }
285
286    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
287    #[repr(C)]
288    pub struct LoaderConfigResponse {
289        pub rv: i32,
290    }
291
292    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>
293        for LoaderConfigResponse
294    where
295        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
296    {
297        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
298            Self,
299            crate::wire::LoaderConfigResponse,
300        > = unsafe {
301            ::fidl_next::CopyOptimization::enable_if(
302            true
303
304                && <
305                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
306                >::COPY_OPTIMIZATION.is_enabled()
307
308        )
309        };
310
311        #[inline]
312        fn encode(
313            self,
314            encoder_: &mut ___E,
315            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
316            _: (),
317        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
318            ::fidl_next::munge! {
319                let crate::wire::LoaderConfigResponse {
320                    rv,
321
322                } = out_;
323            }
324
325            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
326
327            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
328
329            Ok(())
330        }
331    }
332
333    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>
334        for &'a LoaderConfigResponse
335    where
336        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
337    {
338        #[inline]
339        fn encode(
340            self,
341            encoder_: &mut ___E,
342            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
343            _: (),
344        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
345            ::fidl_next::munge! {
346                let crate::wire::LoaderConfigResponse {
347
348                    rv,
349
350                } = out_;
351            }
352
353            ::fidl_next::Encode::encode(&self.rv, encoder_, rv, ())?;
354
355            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
356
357            Ok(())
358        }
359    }
360
361    unsafe impl<___E>
362        ::fidl_next::EncodeOption<
363            ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigResponse>,
364            ___E,
365        > for LoaderConfigResponse
366    where
367        ___E: ::fidl_next::Encoder + ?Sized,
368        LoaderConfigResponse: ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>,
369    {
370        #[inline]
371        fn encode_option(
372            this: ::core::option::Option<Self>,
373            encoder: &mut ___E,
374            out: &mut ::core::mem::MaybeUninit<
375                ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigResponse>,
376            >,
377            _: (),
378        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
379            if let Some(inner) = this {
380                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
381                ::fidl_next::wire::Box::encode_present(out);
382            } else {
383                ::fidl_next::wire::Box::encode_absent(out);
384            }
385
386            Ok(())
387        }
388    }
389
390    unsafe impl<'a, ___E>
391        ::fidl_next::EncodeOption<
392            ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigResponse>,
393            ___E,
394        > for &'a LoaderConfigResponse
395    where
396        ___E: ::fidl_next::Encoder + ?Sized,
397        &'a LoaderConfigResponse: ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>,
398    {
399        #[inline]
400        fn encode_option(
401            this: ::core::option::Option<Self>,
402            encoder: &mut ___E,
403            out: &mut ::core::mem::MaybeUninit<
404                ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigResponse>,
405            >,
406            _: (),
407        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
408            if let Some(inner) = this {
409                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
410                ::fidl_next::wire::Box::encode_present(out);
411            } else {
412                ::fidl_next::wire::Box::encode_absent(out);
413            }
414
415            Ok(())
416        }
417    }
418
419    impl ::fidl_next::FromWire<crate::wire::LoaderConfigResponse> for LoaderConfigResponse {
420        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
421            crate::wire::LoaderConfigResponse,
422            Self,
423        > = unsafe {
424            ::fidl_next::CopyOptimization::enable_if(
425                true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
426                    .is_enabled(),
427            )
428        };
429
430        #[inline]
431        fn from_wire(wire: crate::wire::LoaderConfigResponse) -> Self {
432            Self { rv: ::fidl_next::FromWire::from_wire(wire.rv) }
433        }
434    }
435
436    impl ::fidl_next::FromWireRef<crate::wire::LoaderConfigResponse> for LoaderConfigResponse {
437        #[inline]
438        fn from_wire_ref(wire: &crate::wire::LoaderConfigResponse) -> Self {
439            Self { rv: ::fidl_next::FromWireRef::from_wire_ref(&wire.rv) }
440        }
441    }
442
443    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
444    #[repr(C)]
445    pub struct LoaderCloneResponse {
446        pub rv: i32,
447    }
448
449    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
450        for LoaderCloneResponse
451    where
452        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
453    {
454        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
455            Self,
456            crate::wire::LoaderCloneResponse,
457        > = unsafe {
458            ::fidl_next::CopyOptimization::enable_if(
459            true
460
461                && <
462                    i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
463                >::COPY_OPTIMIZATION.is_enabled()
464
465        )
466        };
467
468        #[inline]
469        fn encode(
470            self,
471            encoder_: &mut ___E,
472            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderCloneResponse>,
473            _: (),
474        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
475            ::fidl_next::munge! {
476                let crate::wire::LoaderCloneResponse {
477                    rv,
478
479                } = out_;
480            }
481
482            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
483
484            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
485
486            Ok(())
487        }
488    }
489
490    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
491        for &'a LoaderCloneResponse
492    where
493        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
494    {
495        #[inline]
496        fn encode(
497            self,
498            encoder_: &mut ___E,
499            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderCloneResponse>,
500            _: (),
501        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
502            ::fidl_next::munge! {
503                let crate::wire::LoaderCloneResponse {
504
505                    rv,
506
507                } = out_;
508            }
509
510            ::fidl_next::Encode::encode(&self.rv, encoder_, rv, ())?;
511
512            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
513
514            Ok(())
515        }
516    }
517
518    unsafe impl<___E>
519        ::fidl_next::EncodeOption<
520            ::fidl_next::wire::Box<'static, crate::wire::LoaderCloneResponse>,
521            ___E,
522        > for LoaderCloneResponse
523    where
524        ___E: ::fidl_next::Encoder + ?Sized,
525        LoaderCloneResponse: ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>,
526    {
527        #[inline]
528        fn encode_option(
529            this: ::core::option::Option<Self>,
530            encoder: &mut ___E,
531            out: &mut ::core::mem::MaybeUninit<
532                ::fidl_next::wire::Box<'static, crate::wire::LoaderCloneResponse>,
533            >,
534            _: (),
535        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
536            if let Some(inner) = this {
537                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
538                ::fidl_next::wire::Box::encode_present(out);
539            } else {
540                ::fidl_next::wire::Box::encode_absent(out);
541            }
542
543            Ok(())
544        }
545    }
546
547    unsafe impl<'a, ___E>
548        ::fidl_next::EncodeOption<
549            ::fidl_next::wire::Box<'static, crate::wire::LoaderCloneResponse>,
550            ___E,
551        > for &'a LoaderCloneResponse
552    where
553        ___E: ::fidl_next::Encoder + ?Sized,
554        &'a LoaderCloneResponse: ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>,
555    {
556        #[inline]
557        fn encode_option(
558            this: ::core::option::Option<Self>,
559            encoder: &mut ___E,
560            out: &mut ::core::mem::MaybeUninit<
561                ::fidl_next::wire::Box<'static, crate::wire::LoaderCloneResponse>,
562            >,
563            _: (),
564        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
565            if let Some(inner) = this {
566                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
567                ::fidl_next::wire::Box::encode_present(out);
568            } else {
569                ::fidl_next::wire::Box::encode_absent(out);
570            }
571
572            Ok(())
573        }
574    }
575
576    impl ::fidl_next::FromWire<crate::wire::LoaderCloneResponse> for LoaderCloneResponse {
577        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
578            crate::wire::LoaderCloneResponse,
579            Self,
580        > = unsafe {
581            ::fidl_next::CopyOptimization::enable_if(
582                true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
583                    .is_enabled(),
584            )
585        };
586
587        #[inline]
588        fn from_wire(wire: crate::wire::LoaderCloneResponse) -> Self {
589            Self { rv: ::fidl_next::FromWire::from_wire(wire.rv) }
590        }
591    }
592
593    impl ::fidl_next::FromWireRef<crate::wire::LoaderCloneResponse> for LoaderCloneResponse {
594        #[inline]
595        fn from_wire_ref(wire: &crate::wire::LoaderCloneResponse) -> Self {
596            Self { rv: ::fidl_next::FromWireRef::from_wire_ref(&wire.rv) }
597        }
598    }
599}
600
601pub mod wire {
602
603    /// The wire type corresponding to [`LoaderLoadObjectRequest`].
604    #[derive(Debug)]
605    #[repr(C)]
606    pub struct LoaderLoadObjectRequest<'de> {
607        pub object_name: ::fidl_next::wire::String<'de>,
608    }
609
610    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderLoadObjectRequest<'_>>(), 16);
611    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderLoadObjectRequest<'_>>(), 8);
612
613    static_assertions::const_assert_eq!(
614        std::mem::offset_of!(LoaderLoadObjectRequest<'_>, object_name),
615        0
616    );
617
618    impl ::fidl_next::Constrained for LoaderLoadObjectRequest<'_> {
619        type Constraint = ();
620
621        fn validate(
622            _: ::fidl_next::Slot<'_, Self>,
623            _: Self::Constraint,
624        ) -> Result<(), ::fidl_next::ValidationError> {
625            Ok(())
626        }
627    }
628
629    unsafe impl ::fidl_next::Wire for LoaderLoadObjectRequest<'static> {
630        type Narrowed<'de> = LoaderLoadObjectRequest<'de>;
631
632        #[inline]
633        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
634            ::fidl_next::munge! {
635                let Self {
636
637                    object_name,
638
639                } = &mut *out_;
640            }
641
642            ::fidl_next::Wire::zero_padding(object_name);
643        }
644    }
645
646    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LoaderLoadObjectRequest<'de>
647    where
648        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
649        ___D: ::fidl_next::Decoder<'de>,
650    {
651        fn decode(
652            slot_: ::fidl_next::Slot<'_, Self>,
653            decoder_: &mut ___D,
654            _: (),
655        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
656            ::fidl_next::munge! {
657                let Self {
658
659                    mut object_name,
660
661                } = slot_;
662            }
663
664            let _field = object_name.as_mut();
665            ::fidl_next::Constrained::validate(_field, 1024)?;
666            ::fidl_next::Decode::decode(object_name.as_mut(), decoder_, 1024)?;
667
668            let object_name = unsafe { object_name.deref_unchecked() };
669
670            if object_name.len() > 1024 {
671                return Err(::fidl_next::DecodeError::VectorTooLong {
672                    size: object_name.len() as u64,
673                    limit: 1024,
674                });
675            }
676
677            Ok(())
678        }
679    }
680
681    impl<'de> ::fidl_next::IntoNatural for LoaderLoadObjectRequest<'de> {
682        type Natural = crate::natural::LoaderLoadObjectRequest;
683    }
684
685    /// The wire type corresponding to [`LoaderConfigRequest`].
686    #[derive(Debug)]
687    #[repr(C)]
688    pub struct LoaderConfigRequest<'de> {
689        pub config: ::fidl_next::wire::String<'de>,
690    }
691
692    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderConfigRequest<'_>>(), 16);
693    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderConfigRequest<'_>>(), 8);
694
695    static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderConfigRequest<'_>, config), 0);
696
697    impl ::fidl_next::Constrained for LoaderConfigRequest<'_> {
698        type Constraint = ();
699
700        fn validate(
701            _: ::fidl_next::Slot<'_, Self>,
702            _: Self::Constraint,
703        ) -> Result<(), ::fidl_next::ValidationError> {
704            Ok(())
705        }
706    }
707
708    unsafe impl ::fidl_next::Wire for LoaderConfigRequest<'static> {
709        type Narrowed<'de> = LoaderConfigRequest<'de>;
710
711        #[inline]
712        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
713            ::fidl_next::munge! {
714                let Self {
715
716                    config,
717
718                } = &mut *out_;
719            }
720
721            ::fidl_next::Wire::zero_padding(config);
722        }
723    }
724
725    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LoaderConfigRequest<'de>
726    where
727        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
728        ___D: ::fidl_next::Decoder<'de>,
729    {
730        fn decode(
731            slot_: ::fidl_next::Slot<'_, Self>,
732            decoder_: &mut ___D,
733            _: (),
734        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
735            ::fidl_next::munge! {
736                let Self {
737
738                    mut config,
739
740                } = slot_;
741            }
742
743            let _field = config.as_mut();
744            ::fidl_next::Constrained::validate(_field, 1024)?;
745            ::fidl_next::Decode::decode(config.as_mut(), decoder_, 1024)?;
746
747            let config = unsafe { config.deref_unchecked() };
748
749            if config.len() > 1024 {
750                return Err(::fidl_next::DecodeError::VectorTooLong {
751                    size: config.len() as u64,
752                    limit: 1024,
753                });
754            }
755
756            Ok(())
757        }
758    }
759
760    impl<'de> ::fidl_next::IntoNatural for LoaderConfigRequest<'de> {
761        type Natural = crate::natural::LoaderConfigRequest;
762    }
763
764    /// The wire type corresponding to [`LoaderConfigResponse`].
765    #[derive(Clone, Debug)]
766    #[repr(C)]
767    pub struct LoaderConfigResponse {
768        pub rv: ::fidl_next::wire::Int32,
769    }
770
771    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderConfigResponse>(), 4);
772    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderConfigResponse>(), 4);
773
774    static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderConfigResponse, rv), 0);
775
776    impl ::fidl_next::Constrained for LoaderConfigResponse {
777        type Constraint = ();
778
779        fn validate(
780            _: ::fidl_next::Slot<'_, Self>,
781            _: Self::Constraint,
782        ) -> Result<(), ::fidl_next::ValidationError> {
783            Ok(())
784        }
785    }
786
787    unsafe impl ::fidl_next::Wire for LoaderConfigResponse {
788        type Narrowed<'de> = LoaderConfigResponse;
789
790        #[inline]
791        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
792            ::fidl_next::munge! {
793                let Self {
794
795                    rv,
796
797                } = &mut *out_;
798            }
799
800            ::fidl_next::Wire::zero_padding(rv);
801        }
802    }
803
804    unsafe impl<___D> ::fidl_next::Decode<___D> for LoaderConfigResponse
805    where
806        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
807    {
808        fn decode(
809            slot_: ::fidl_next::Slot<'_, Self>,
810            decoder_: &mut ___D,
811            _: (),
812        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
813            ::fidl_next::munge! {
814                let Self {
815
816                    mut rv,
817
818                } = slot_;
819            }
820
821            let _field = rv.as_mut();
822
823            ::fidl_next::Decode::decode(rv.as_mut(), decoder_, ())?;
824
825            Ok(())
826        }
827    }
828
829    impl ::fidl_next::IntoNatural for LoaderConfigResponse {
830        type Natural = crate::natural::LoaderConfigResponse;
831    }
832
833    /// The wire type corresponding to [`LoaderCloneResponse`].
834    #[derive(Clone, Debug)]
835    #[repr(C)]
836    pub struct LoaderCloneResponse {
837        pub rv: ::fidl_next::wire::Int32,
838    }
839
840    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderCloneResponse>(), 4);
841    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderCloneResponse>(), 4);
842
843    static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderCloneResponse, rv), 0);
844
845    impl ::fidl_next::Constrained for LoaderCloneResponse {
846        type Constraint = ();
847
848        fn validate(
849            _: ::fidl_next::Slot<'_, Self>,
850            _: Self::Constraint,
851        ) -> Result<(), ::fidl_next::ValidationError> {
852            Ok(())
853        }
854    }
855
856    unsafe impl ::fidl_next::Wire for LoaderCloneResponse {
857        type Narrowed<'de> = LoaderCloneResponse;
858
859        #[inline]
860        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
861            ::fidl_next::munge! {
862                let Self {
863
864                    rv,
865
866                } = &mut *out_;
867            }
868
869            ::fidl_next::Wire::zero_padding(rv);
870        }
871    }
872
873    unsafe impl<___D> ::fidl_next::Decode<___D> for LoaderCloneResponse
874    where
875        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
876    {
877        fn decode(
878            slot_: ::fidl_next::Slot<'_, Self>,
879            decoder_: &mut ___D,
880            _: (),
881        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
882            ::fidl_next::munge! {
883                let Self {
884
885                    mut rv,
886
887                } = slot_;
888            }
889
890            let _field = rv.as_mut();
891
892            ::fidl_next::Decode::decode(rv.as_mut(), decoder_, ())?;
893
894            Ok(())
895        }
896    }
897
898    impl ::fidl_next::IntoNatural for LoaderCloneResponse {
899        type Natural = crate::natural::LoaderCloneResponse;
900    }
901}
902
903pub mod wire_optional {}
904
905pub mod generic {
906
907    pub struct LoaderLoadObjectRequest<T0> {
908        pub object_name: T0,
909    }
910
911    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>
912        for LoaderLoadObjectRequest<T0>
913    where
914        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
915        ___E: ::fidl_next::Encoder,
916        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
917    {
918        #[inline]
919        fn encode(
920            self,
921            encoder_: &mut ___E,
922            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderLoadObjectRequest<'static>>,
923            _: (),
924        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
925            ::fidl_next::munge! {
926                let crate::wire::LoaderLoadObjectRequest {
927
928                    object_name,
929
930                } = out_;
931            }
932
933            ::fidl_next::Encode::encode(self.object_name, encoder_, object_name, 1024)?;
934
935            Ok(())
936        }
937    }
938
939    pub struct LoaderConfigRequest<T0> {
940        pub config: T0,
941    }
942
943    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>
944        for LoaderConfigRequest<T0>
945    where
946        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
947        ___E: ::fidl_next::Encoder,
948        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
949    {
950        #[inline]
951        fn encode(
952            self,
953            encoder_: &mut ___E,
954            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigRequest<'static>>,
955            _: (),
956        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
957            ::fidl_next::munge! {
958                let crate::wire::LoaderConfigRequest {
959
960                    config,
961
962                } = out_;
963            }
964
965            ::fidl_next::Encode::encode(self.config, encoder_, config, 1024)?;
966
967            Ok(())
968        }
969    }
970
971    pub struct LoaderConfigResponse<T0> {
972        pub rv: T0,
973    }
974
975    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>
976        for LoaderConfigResponse<T0>
977    where
978        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
979        T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
980    {
981        #[inline]
982        fn encode(
983            self,
984            encoder_: &mut ___E,
985            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
986            _: (),
987        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
988            ::fidl_next::munge! {
989                let crate::wire::LoaderConfigResponse {
990
991                    rv,
992
993                } = out_;
994            }
995
996            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
997
998            Ok(())
999        }
1000    }
1001
1002    pub struct LoaderCloneResponse<T0> {
1003        pub rv: T0,
1004    }
1005
1006    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
1007        for LoaderCloneResponse<T0>
1008    where
1009        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1010        T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
1011    {
1012        #[inline]
1013        fn encode(
1014            self,
1015            encoder_: &mut ___E,
1016            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderCloneResponse>,
1017            _: (),
1018        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1019            ::fidl_next::munge! {
1020                let crate::wire::LoaderCloneResponse {
1021
1022                    rv,
1023
1024                } = out_;
1025            }
1026
1027            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
1028
1029            Ok(())
1030        }
1031    }
1032}
1033
1034pub use self::natural::*;
1035
1036/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
1037pub mod compat {
1038
1039    impl ::fidl_next::CompatFrom<crate::LoaderLoadObjectRequest>
1040        for ::fidl_fuchsia_ldsvc::LoaderLoadObjectRequest
1041    {
1042        #[inline]
1043        fn compat_from(value: crate::LoaderLoadObjectRequest) -> Self {
1044            Self { object_name: ::fidl_next::CompatFrom::compat_from(value.object_name) }
1045        }
1046    }
1047
1048    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderLoadObjectRequest>
1049        for crate::LoaderLoadObjectRequest
1050    {
1051        #[inline]
1052        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderLoadObjectRequest) -> Self {
1053            Self { object_name: ::fidl_next::CompatFrom::compat_from(value.object_name) }
1054        }
1055    }
1056
1057    impl ::fidl_next::CompatFrom<crate::LoaderConfigRequest>
1058        for ::fidl_fuchsia_ldsvc::LoaderConfigRequest
1059    {
1060        #[inline]
1061        fn compat_from(value: crate::LoaderConfigRequest) -> Self {
1062            Self { config: ::fidl_next::CompatFrom::compat_from(value.config) }
1063        }
1064    }
1065
1066    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderConfigRequest>
1067        for crate::LoaderConfigRequest
1068    {
1069        #[inline]
1070        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderConfigRequest) -> Self {
1071            Self { config: ::fidl_next::CompatFrom::compat_from(value.config) }
1072        }
1073    }
1074
1075    impl ::fidl_next::CompatFrom<crate::LoaderConfigResponse>
1076        for ::fidl_fuchsia_ldsvc::LoaderConfigResponse
1077    {
1078        #[inline]
1079        fn compat_from(value: crate::LoaderConfigResponse) -> Self {
1080            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1081        }
1082    }
1083
1084    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderConfigResponse>
1085        for crate::LoaderConfigResponse
1086    {
1087        #[inline]
1088        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderConfigResponse) -> Self {
1089            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1090        }
1091    }
1092
1093    impl ::fidl_next::CompatFrom<crate::LoaderCloneResponse>
1094        for ::fidl_fuchsia_ldsvc::LoaderCloneResponse
1095    {
1096        #[inline]
1097        fn compat_from(value: crate::LoaderCloneResponse) -> Self {
1098            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1099        }
1100    }
1101
1102    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderCloneResponse>
1103        for crate::LoaderCloneResponse
1104    {
1105        #[inline]
1106        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderCloneResponse) -> Self {
1107            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1108        }
1109    }
1110}