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(PartialEq, Clone, Debug)]
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::WireBox<'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::WireBox<'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::WireBox::encode_present(out);
93            } else {
94                ::fidl_next::WireBox::encode_absent(out);
95            }
96
97            Ok(())
98        }
99    }
100
101    unsafe impl<'a, ___E>
102        ::fidl_next::EncodeOption<
103            ::fidl_next::WireBox<'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::WireBox<'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::WireBox::encode_present(out);
123            } else {
124                ::fidl_next::WireBox::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(PartialEq, Clone, Debug)]
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::WireBox<'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::WireBox<'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::WireBox::encode_present(out);
234            } else {
235                ::fidl_next::WireBox::encode_absent(out);
236            }
237
238            Ok(())
239        }
240    }
241
242    unsafe impl<'a, ___E>
243        ::fidl_next::EncodeOption<
244            ::fidl_next::WireBox<'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::WireBox<'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::WireBox::encode_present(out);
264            } else {
265                ::fidl_next::WireBox::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(PartialEq, Clone, Debug)]
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 && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
303                    .is_enabled(),
304            )
305        };
306
307        #[inline]
308        fn encode(
309            self,
310            encoder_: &mut ___E,
311            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
312            _: (),
313        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
314            ::fidl_next::munge! {
315                let crate::wire::LoaderConfigResponse {
316                    rv,
317
318                } = out_;
319            }
320
321            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
322
323            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
324
325            Ok(())
326        }
327    }
328
329    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>
330        for &'a LoaderConfigResponse
331    where
332        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
333    {
334        #[inline]
335        fn encode(
336            self,
337            encoder_: &mut ___E,
338            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
339            _: (),
340        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
341            ::fidl_next::munge! {
342                let crate::wire::LoaderConfigResponse {
343
344                    rv,
345
346                } = out_;
347            }
348
349            ::fidl_next::Encode::encode(&self.rv, encoder_, rv, ())?;
350
351            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
352
353            Ok(())
354        }
355    }
356
357    unsafe impl<___E>
358        ::fidl_next::EncodeOption<
359            ::fidl_next::WireBox<'static, crate::wire::LoaderConfigResponse>,
360            ___E,
361        > for LoaderConfigResponse
362    where
363        ___E: ::fidl_next::Encoder + ?Sized,
364        LoaderConfigResponse: ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>,
365    {
366        #[inline]
367        fn encode_option(
368            this: ::core::option::Option<Self>,
369            encoder: &mut ___E,
370            out: &mut ::core::mem::MaybeUninit<
371                ::fidl_next::WireBox<'static, crate::wire::LoaderConfigResponse>,
372            >,
373            _: (),
374        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
375            if let Some(inner) = this {
376                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
377                ::fidl_next::WireBox::encode_present(out);
378            } else {
379                ::fidl_next::WireBox::encode_absent(out);
380            }
381
382            Ok(())
383        }
384    }
385
386    unsafe impl<'a, ___E>
387        ::fidl_next::EncodeOption<
388            ::fidl_next::WireBox<'static, crate::wire::LoaderConfigResponse>,
389            ___E,
390        > for &'a LoaderConfigResponse
391    where
392        ___E: ::fidl_next::Encoder + ?Sized,
393        &'a LoaderConfigResponse: ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>,
394    {
395        #[inline]
396        fn encode_option(
397            this: ::core::option::Option<Self>,
398            encoder: &mut ___E,
399            out: &mut ::core::mem::MaybeUninit<
400                ::fidl_next::WireBox<'static, crate::wire::LoaderConfigResponse>,
401            >,
402            _: (),
403        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
404            if let Some(inner) = this {
405                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
406                ::fidl_next::WireBox::encode_present(out);
407            } else {
408                ::fidl_next::WireBox::encode_absent(out);
409            }
410
411            Ok(())
412        }
413    }
414
415    impl ::fidl_next::FromWire<crate::wire::LoaderConfigResponse> for LoaderConfigResponse {
416        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
417            crate::wire::LoaderConfigResponse,
418            Self,
419        > = unsafe {
420            ::fidl_next::CopyOptimization::enable_if(
421                true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
422                    .is_enabled(),
423            )
424        };
425
426        #[inline]
427        fn from_wire(wire: crate::wire::LoaderConfigResponse) -> Self {
428            Self { rv: ::fidl_next::FromWire::from_wire(wire.rv) }
429        }
430    }
431
432    impl ::fidl_next::FromWireRef<crate::wire::LoaderConfigResponse> for LoaderConfigResponse {
433        #[inline]
434        fn from_wire_ref(wire: &crate::wire::LoaderConfigResponse) -> Self {
435            Self { rv: ::fidl_next::FromWireRef::from_wire_ref(&wire.rv) }
436        }
437    }
438
439    #[derive(PartialEq, Clone, Debug)]
440    #[repr(C)]
441    pub struct LoaderCloneResponse {
442        pub rv: i32,
443    }
444
445    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
446        for LoaderCloneResponse
447    where
448        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
449    {
450        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
451            Self,
452            crate::wire::LoaderCloneResponse,
453        > = unsafe {
454            ::fidl_next::CopyOptimization::enable_if(
455                true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
456                    .is_enabled(),
457            )
458        };
459
460        #[inline]
461        fn encode(
462            self,
463            encoder_: &mut ___E,
464            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderCloneResponse>,
465            _: (),
466        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
467            ::fidl_next::munge! {
468                let crate::wire::LoaderCloneResponse {
469                    rv,
470
471                } = out_;
472            }
473
474            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
475
476            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
477
478            Ok(())
479        }
480    }
481
482    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
483        for &'a LoaderCloneResponse
484    where
485        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
486    {
487        #[inline]
488        fn encode(
489            self,
490            encoder_: &mut ___E,
491            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderCloneResponse>,
492            _: (),
493        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
494            ::fidl_next::munge! {
495                let crate::wire::LoaderCloneResponse {
496
497                    rv,
498
499                } = out_;
500            }
501
502            ::fidl_next::Encode::encode(&self.rv, encoder_, rv, ())?;
503
504            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
505
506            Ok(())
507        }
508    }
509
510    unsafe impl<___E>
511        ::fidl_next::EncodeOption<
512            ::fidl_next::WireBox<'static, crate::wire::LoaderCloneResponse>,
513            ___E,
514        > for LoaderCloneResponse
515    where
516        ___E: ::fidl_next::Encoder + ?Sized,
517        LoaderCloneResponse: ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>,
518    {
519        #[inline]
520        fn encode_option(
521            this: ::core::option::Option<Self>,
522            encoder: &mut ___E,
523            out: &mut ::core::mem::MaybeUninit<
524                ::fidl_next::WireBox<'static, crate::wire::LoaderCloneResponse>,
525            >,
526            _: (),
527        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
528            if let Some(inner) = this {
529                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
530                ::fidl_next::WireBox::encode_present(out);
531            } else {
532                ::fidl_next::WireBox::encode_absent(out);
533            }
534
535            Ok(())
536        }
537    }
538
539    unsafe impl<'a, ___E>
540        ::fidl_next::EncodeOption<
541            ::fidl_next::WireBox<'static, crate::wire::LoaderCloneResponse>,
542            ___E,
543        > for &'a LoaderCloneResponse
544    where
545        ___E: ::fidl_next::Encoder + ?Sized,
546        &'a LoaderCloneResponse: ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>,
547    {
548        #[inline]
549        fn encode_option(
550            this: ::core::option::Option<Self>,
551            encoder: &mut ___E,
552            out: &mut ::core::mem::MaybeUninit<
553                ::fidl_next::WireBox<'static, crate::wire::LoaderCloneResponse>,
554            >,
555            _: (),
556        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
557            if let Some(inner) = this {
558                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
559                ::fidl_next::WireBox::encode_present(out);
560            } else {
561                ::fidl_next::WireBox::encode_absent(out);
562            }
563
564            Ok(())
565        }
566    }
567
568    impl ::fidl_next::FromWire<crate::wire::LoaderCloneResponse> for LoaderCloneResponse {
569        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
570            crate::wire::LoaderCloneResponse,
571            Self,
572        > = unsafe {
573            ::fidl_next::CopyOptimization::enable_if(
574                true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
575                    .is_enabled(),
576            )
577        };
578
579        #[inline]
580        fn from_wire(wire: crate::wire::LoaderCloneResponse) -> Self {
581            Self { rv: ::fidl_next::FromWire::from_wire(wire.rv) }
582        }
583    }
584
585    impl ::fidl_next::FromWireRef<crate::wire::LoaderCloneResponse> for LoaderCloneResponse {
586        #[inline]
587        fn from_wire_ref(wire: &crate::wire::LoaderCloneResponse) -> Self {
588            Self { rv: ::fidl_next::FromWireRef::from_wire_ref(&wire.rv) }
589        }
590    }
591}
592
593pub mod wire {
594
595    /// The wire type corresponding to [`LoaderLoadObjectRequest`].
596    #[derive(Debug)]
597    #[repr(C)]
598    pub struct LoaderLoadObjectRequest<'de> {
599        pub object_name: ::fidl_next::WireString<'de>,
600    }
601
602    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderLoadObjectRequest<'_>>(), 16);
603    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderLoadObjectRequest<'_>>(), 8);
604
605    static_assertions::const_assert_eq!(
606        std::mem::offset_of!(LoaderLoadObjectRequest<'_>, object_name),
607        0
608    );
609
610    unsafe impl ::fidl_next::Wire for LoaderLoadObjectRequest<'static> {
611        type Owned<'de> = LoaderLoadObjectRequest<'de>;
612
613        #[inline]
614        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
615            ::fidl_next::munge! {
616                let Self {
617
618                    object_name,
619
620                } = &mut *out_;
621            }
622
623            ::fidl_next::Wire::zero_padding(object_name);
624        }
625    }
626
627    unsafe impl<___D> ::fidl_next::Decode<___D> for LoaderLoadObjectRequest<'static>
628    where
629        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
630        ___D: ::fidl_next::Decoder,
631    {
632        fn decode(
633            slot_: ::fidl_next::Slot<'_, Self>,
634            decoder_: &mut ___D,
635            _: (),
636        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
637            ::fidl_next::munge! {
638                let Self {
639
640                    mut object_name,
641
642                } = slot_;
643            }
644
645            let _field = object_name.as_mut();
646            ::fidl_next::Constrained::validate(_field, 1024)?;
647            ::fidl_next::Decode::decode(object_name.as_mut(), decoder_, 1024)?;
648
649            let object_name = unsafe { object_name.deref_unchecked() };
650
651            if object_name.len() > 1024 {
652                return Err(::fidl_next::DecodeError::VectorTooLong {
653                    size: object_name.len() as u64,
654                    limit: 1024,
655                });
656            }
657
658            Ok(())
659        }
660    }
661
662    impl<'de> ::fidl_next::IntoNatural for LoaderLoadObjectRequest<'de> {
663        type Natural = crate::natural::LoaderLoadObjectRequest;
664    }
665
666    impl ::fidl_next::Unconstrained for LoaderLoadObjectRequest<'static> {}
667
668    /// The wire type corresponding to [`LoaderConfigRequest`].
669    #[derive(Debug)]
670    #[repr(C)]
671    pub struct LoaderConfigRequest<'de> {
672        pub config: ::fidl_next::WireString<'de>,
673    }
674
675    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderConfigRequest<'_>>(), 16);
676    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderConfigRequest<'_>>(), 8);
677
678    static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderConfigRequest<'_>, config), 0);
679
680    unsafe impl ::fidl_next::Wire for LoaderConfigRequest<'static> {
681        type Owned<'de> = LoaderConfigRequest<'de>;
682
683        #[inline]
684        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
685            ::fidl_next::munge! {
686                let Self {
687
688                    config,
689
690                } = &mut *out_;
691            }
692
693            ::fidl_next::Wire::zero_padding(config);
694        }
695    }
696
697    unsafe impl<___D> ::fidl_next::Decode<___D> for LoaderConfigRequest<'static>
698    where
699        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
700        ___D: ::fidl_next::Decoder,
701    {
702        fn decode(
703            slot_: ::fidl_next::Slot<'_, Self>,
704            decoder_: &mut ___D,
705            _: (),
706        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
707            ::fidl_next::munge! {
708                let Self {
709
710                    mut config,
711
712                } = slot_;
713            }
714
715            let _field = config.as_mut();
716            ::fidl_next::Constrained::validate(_field, 1024)?;
717            ::fidl_next::Decode::decode(config.as_mut(), decoder_, 1024)?;
718
719            let config = unsafe { config.deref_unchecked() };
720
721            if config.len() > 1024 {
722                return Err(::fidl_next::DecodeError::VectorTooLong {
723                    size: config.len() as u64,
724                    limit: 1024,
725                });
726            }
727
728            Ok(())
729        }
730    }
731
732    impl<'de> ::fidl_next::IntoNatural for LoaderConfigRequest<'de> {
733        type Natural = crate::natural::LoaderConfigRequest;
734    }
735
736    impl ::fidl_next::Unconstrained for LoaderConfigRequest<'static> {}
737
738    /// The wire type corresponding to [`LoaderConfigResponse`].
739    #[derive(Clone, Debug)]
740    #[repr(C)]
741    pub struct LoaderConfigResponse {
742        pub rv: ::fidl_next::WireI32,
743    }
744
745    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderConfigResponse>(), 4);
746    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderConfigResponse>(), 4);
747
748    static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderConfigResponse, rv), 0);
749
750    unsafe impl ::fidl_next::Wire for LoaderConfigResponse {
751        type Owned<'de> = LoaderConfigResponse;
752
753        #[inline]
754        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
755            ::fidl_next::munge! {
756                let Self {
757
758                    rv,
759
760                } = &mut *out_;
761            }
762
763            ::fidl_next::Wire::zero_padding(rv);
764        }
765    }
766
767    unsafe impl<___D> ::fidl_next::Decode<___D> for LoaderConfigResponse
768    where
769        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
770    {
771        fn decode(
772            slot_: ::fidl_next::Slot<'_, Self>,
773            decoder_: &mut ___D,
774            _: (),
775        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
776            ::fidl_next::munge! {
777                let Self {
778
779                    mut rv,
780
781                } = slot_;
782            }
783
784            let _field = rv.as_mut();
785
786            ::fidl_next::Decode::decode(rv.as_mut(), decoder_, ())?;
787
788            Ok(())
789        }
790    }
791
792    impl ::fidl_next::IntoNatural for LoaderConfigResponse {
793        type Natural = crate::natural::LoaderConfigResponse;
794    }
795
796    impl ::fidl_next::Unconstrained for LoaderConfigResponse {}
797
798    /// The wire type corresponding to [`LoaderCloneResponse`].
799    #[derive(Clone, Debug)]
800    #[repr(C)]
801    pub struct LoaderCloneResponse {
802        pub rv: ::fidl_next::WireI32,
803    }
804
805    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderCloneResponse>(), 4);
806    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderCloneResponse>(), 4);
807
808    static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderCloneResponse, rv), 0);
809
810    unsafe impl ::fidl_next::Wire for LoaderCloneResponse {
811        type Owned<'de> = LoaderCloneResponse;
812
813        #[inline]
814        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
815            ::fidl_next::munge! {
816                let Self {
817
818                    rv,
819
820                } = &mut *out_;
821            }
822
823            ::fidl_next::Wire::zero_padding(rv);
824        }
825    }
826
827    unsafe impl<___D> ::fidl_next::Decode<___D> for LoaderCloneResponse
828    where
829        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
830    {
831        fn decode(
832            slot_: ::fidl_next::Slot<'_, Self>,
833            decoder_: &mut ___D,
834            _: (),
835        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
836            ::fidl_next::munge! {
837                let Self {
838
839                    mut rv,
840
841                } = slot_;
842            }
843
844            let _field = rv.as_mut();
845
846            ::fidl_next::Decode::decode(rv.as_mut(), decoder_, ())?;
847
848            Ok(())
849        }
850    }
851
852    impl ::fidl_next::IntoNatural for LoaderCloneResponse {
853        type Natural = crate::natural::LoaderCloneResponse;
854    }
855
856    impl ::fidl_next::Unconstrained for LoaderCloneResponse {}
857}
858
859pub mod wire_optional {}
860
861pub mod generic {
862
863    pub struct LoaderLoadObjectRequest<T0> {
864        pub object_name: T0,
865    }
866
867    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>
868        for LoaderLoadObjectRequest<T0>
869    where
870        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
871        ___E: ::fidl_next::Encoder,
872        T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>,
873    {
874        #[inline]
875        fn encode(
876            self,
877            encoder_: &mut ___E,
878            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderLoadObjectRequest<'static>>,
879            _: (),
880        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
881            ::fidl_next::munge! {
882                let crate::wire::LoaderLoadObjectRequest {
883
884                    object_name,
885
886                } = out_;
887            }
888
889            ::fidl_next::Encode::encode(self.object_name, encoder_, object_name, 1024)?;
890
891            Ok(())
892        }
893    }
894
895    pub struct LoaderConfigRequest<T0> {
896        pub config: T0,
897    }
898
899    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>
900        for LoaderConfigRequest<T0>
901    where
902        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
903        ___E: ::fidl_next::Encoder,
904        T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>,
905    {
906        #[inline]
907        fn encode(
908            self,
909            encoder_: &mut ___E,
910            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigRequest<'static>>,
911            _: (),
912        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
913            ::fidl_next::munge! {
914                let crate::wire::LoaderConfigRequest {
915
916                    config,
917
918                } = out_;
919            }
920
921            ::fidl_next::Encode::encode(self.config, encoder_, config, 1024)?;
922
923            Ok(())
924        }
925    }
926
927    pub struct LoaderConfigResponse<T0> {
928        pub rv: T0,
929    }
930
931    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>
932        for LoaderConfigResponse<T0>
933    where
934        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
935        T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
936    {
937        #[inline]
938        fn encode(
939            self,
940            encoder_: &mut ___E,
941            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
942            _: (),
943        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
944            ::fidl_next::munge! {
945                let crate::wire::LoaderConfigResponse {
946
947                    rv,
948
949                } = out_;
950            }
951
952            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
953
954            Ok(())
955        }
956    }
957
958    pub struct LoaderCloneResponse<T0> {
959        pub rv: T0,
960    }
961
962    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
963        for LoaderCloneResponse<T0>
964    where
965        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
966        T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
967    {
968        #[inline]
969        fn encode(
970            self,
971            encoder_: &mut ___E,
972            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderCloneResponse>,
973            _: (),
974        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
975            ::fidl_next::munge! {
976                let crate::wire::LoaderCloneResponse {
977
978                    rv,
979
980                } = out_;
981            }
982
983            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
984
985            Ok(())
986        }
987    }
988}
989
990pub use self::natural::*;
991
992/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
993pub mod compat {
994
995    impl ::fidl_next::CompatFrom<crate::LoaderLoadObjectRequest>
996        for ::fidl_fuchsia_ldsvc::LoaderLoadObjectRequest
997    {
998        #[inline]
999        fn compat_from(value: crate::LoaderLoadObjectRequest) -> Self {
1000            Self { object_name: ::fidl_next::CompatFrom::compat_from(value.object_name) }
1001        }
1002    }
1003
1004    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderLoadObjectRequest>
1005        for crate::LoaderLoadObjectRequest
1006    {
1007        #[inline]
1008        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderLoadObjectRequest) -> Self {
1009            Self { object_name: ::fidl_next::CompatFrom::compat_from(value.object_name) }
1010        }
1011    }
1012
1013    impl ::fidl_next::CompatFrom<crate::LoaderConfigRequest>
1014        for ::fidl_fuchsia_ldsvc::LoaderConfigRequest
1015    {
1016        #[inline]
1017        fn compat_from(value: crate::LoaderConfigRequest) -> Self {
1018            Self { config: ::fidl_next::CompatFrom::compat_from(value.config) }
1019        }
1020    }
1021
1022    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderConfigRequest>
1023        for crate::LoaderConfigRequest
1024    {
1025        #[inline]
1026        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderConfigRequest) -> Self {
1027            Self { config: ::fidl_next::CompatFrom::compat_from(value.config) }
1028        }
1029    }
1030
1031    impl ::fidl_next::CompatFrom<crate::LoaderConfigResponse>
1032        for ::fidl_fuchsia_ldsvc::LoaderConfigResponse
1033    {
1034        #[inline]
1035        fn compat_from(value: crate::LoaderConfigResponse) -> Self {
1036            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1037        }
1038    }
1039
1040    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderConfigResponse>
1041        for crate::LoaderConfigResponse
1042    {
1043        #[inline]
1044        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderConfigResponse) -> Self {
1045            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1046        }
1047    }
1048
1049    impl ::fidl_next::CompatFrom<crate::LoaderCloneResponse>
1050        for ::fidl_fuchsia_ldsvc::LoaderCloneResponse
1051    {
1052        #[inline]
1053        fn compat_from(value: crate::LoaderCloneResponse) -> Self {
1054            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1055        }
1056    }
1057
1058    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderCloneResponse>
1059        for crate::LoaderCloneResponse
1060    {
1061        #[inline]
1062        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderCloneResponse) -> Self {
1063            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1064        }
1065    }
1066}