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