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: ::fidl_next::fuchsia::zx::Status,
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 && <::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<
301                    ::fidl_next::wire::fuchsia::Status,
302                    ___E,
303                >>::COPY_OPTIMIZATION
304                    .is_enabled(),
305            )
306        };
307
308        #[inline]
309        fn encode(
310            self,
311            encoder_: &mut ___E,
312            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
313            _: (),
314        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
315            ::fidl_next::munge! {
316                let crate::wire::LoaderConfigResponse {
317                    rv,
318
319                } = out_;
320            }
321
322            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
323
324            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
325
326            Ok(())
327        }
328    }
329
330    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>
331        for &'a LoaderConfigResponse
332    where
333        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
334    {
335        #[inline]
336        fn encode(
337            self,
338            encoder_: &mut ___E,
339            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
340            _: (),
341        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
342            ::fidl_next::munge! {
343                let crate::wire::LoaderConfigResponse {
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::wire::Box<'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::wire::Box<'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::wire::Box::encode_present(out);
378            } else {
379                ::fidl_next::wire::Box::encode_absent(out);
380            }
381
382            Ok(())
383        }
384    }
385
386    unsafe impl<'a, ___E>
387        ::fidl_next::EncodeOption<
388            ::fidl_next::wire::Box<'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::wire::Box<'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::wire::Box::encode_present(out);
407            } else {
408                ::fidl_next::wire::Box::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 && <::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<
422                    ::fidl_next::wire::fuchsia::Status,
423                >>::COPY_OPTIMIZATION
424                    .is_enabled(),
425            )
426        };
427
428        #[inline]
429        fn from_wire(wire: crate::wire::LoaderConfigResponse) -> Self {
430            Self { rv: ::fidl_next::FromWire::from_wire(wire.rv) }
431        }
432    }
433
434    impl ::fidl_next::FromWireRef<crate::wire::LoaderConfigResponse> for LoaderConfigResponse {
435        #[inline]
436        fn from_wire_ref(wire: &crate::wire::LoaderConfigResponse) -> Self {
437            Self { rv: ::fidl_next::FromWireRef::from_wire_ref(&wire.rv) }
438        }
439    }
440
441    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
442    #[repr(C)]
443    pub struct LoaderCloneResponse {
444        pub rv: ::fidl_next::fuchsia::zx::Status,
445    }
446
447    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
448        for LoaderCloneResponse
449    where
450        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
451    {
452        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
453            Self,
454            crate::wire::LoaderCloneResponse,
455        > = unsafe {
456            ::fidl_next::CopyOptimization::enable_if(
457                true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<
458                    ::fidl_next::wire::fuchsia::Status,
459                    ___E,
460                >>::COPY_OPTIMIZATION
461                    .is_enabled(),
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 && <::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<
579                    ::fidl_next::wire::fuchsia::Status,
580                >>::COPY_OPTIMIZATION
581                    .is_enabled(),
582            )
583        };
584
585        #[inline]
586        fn from_wire(wire: crate::wire::LoaderCloneResponse) -> Self {
587            Self { rv: ::fidl_next::FromWire::from_wire(wire.rv) }
588        }
589    }
590
591    impl ::fidl_next::FromWireRef<crate::wire::LoaderCloneResponse> for LoaderCloneResponse {
592        #[inline]
593        fn from_wire_ref(wire: &crate::wire::LoaderCloneResponse) -> Self {
594            Self { rv: ::fidl_next::FromWireRef::from_wire_ref(&wire.rv) }
595        }
596    }
597}
598
599pub mod wire {
600
601    /// The wire type corresponding to [`LoaderLoadObjectRequest`].
602    #[derive(Debug)]
603    #[repr(C)]
604    pub struct LoaderLoadObjectRequest<'de> {
605        pub object_name: ::fidl_next::wire::String<'de>,
606    }
607
608    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderLoadObjectRequest<'_>>(), 16);
609    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderLoadObjectRequest<'_>>(), 8);
610
611    static_assertions::const_assert_eq!(
612        std::mem::offset_of!(LoaderLoadObjectRequest<'_>, object_name),
613        0
614    );
615
616    impl ::fidl_next::Constrained for LoaderLoadObjectRequest<'_> {
617        type Constraint = ();
618
619        fn validate(
620            _: ::fidl_next::Slot<'_, Self>,
621            _: Self::Constraint,
622        ) -> Result<(), ::fidl_next::ValidationError> {
623            Ok(())
624        }
625    }
626
627    unsafe impl ::fidl_next::Wire for LoaderLoadObjectRequest<'static> {
628        type Narrowed<'de> = LoaderLoadObjectRequest<'de>;
629
630        #[inline]
631        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
632            ::fidl_next::munge! {
633                let Self {
634                    object_name,
635
636                } = &mut *out_;
637            }
638
639            ::fidl_next::Wire::zero_padding(object_name);
640        }
641    }
642
643    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LoaderLoadObjectRequest<'de>
644    where
645        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
646        ___D: ::fidl_next::Decoder<'de>,
647    {
648        fn decode(
649            slot_: ::fidl_next::Slot<'_, Self>,
650            decoder_: &mut ___D,
651            _: (),
652        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
653            ::fidl_next::munge! {
654                let Self {
655                    mut object_name,
656
657                } = slot_;
658            }
659
660            let _field = object_name.as_mut();
661            ::fidl_next::Constrained::validate(_field, 1024)?;
662            ::fidl_next::Decode::decode(object_name.as_mut(), decoder_, 1024)?;
663
664            let object_name = unsafe { object_name.deref_unchecked() };
665
666            if object_name.len() > 1024 {
667                return Err(::fidl_next::DecodeError::VectorTooLong {
668                    size: object_name.len() as u64,
669                    limit: 1024,
670                });
671            }
672
673            Ok(())
674        }
675    }
676
677    impl<'de> ::fidl_next::IntoNatural for LoaderLoadObjectRequest<'de> {
678        type Natural = crate::natural::LoaderLoadObjectRequest;
679    }
680
681    /// The wire type corresponding to [`LoaderConfigRequest`].
682    #[derive(Debug)]
683    #[repr(C)]
684    pub struct LoaderConfigRequest<'de> {
685        pub config: ::fidl_next::wire::String<'de>,
686    }
687
688    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderConfigRequest<'_>>(), 16);
689    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderConfigRequest<'_>>(), 8);
690
691    static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderConfigRequest<'_>, config), 0);
692
693    impl ::fidl_next::Constrained for LoaderConfigRequest<'_> {
694        type Constraint = ();
695
696        fn validate(
697            _: ::fidl_next::Slot<'_, Self>,
698            _: Self::Constraint,
699        ) -> Result<(), ::fidl_next::ValidationError> {
700            Ok(())
701        }
702    }
703
704    unsafe impl ::fidl_next::Wire for LoaderConfigRequest<'static> {
705        type Narrowed<'de> = LoaderConfigRequest<'de>;
706
707        #[inline]
708        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
709            ::fidl_next::munge! {
710                let Self {
711                    config,
712
713                } = &mut *out_;
714            }
715
716            ::fidl_next::Wire::zero_padding(config);
717        }
718    }
719
720    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LoaderConfigRequest<'de>
721    where
722        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
723        ___D: ::fidl_next::Decoder<'de>,
724    {
725        fn decode(
726            slot_: ::fidl_next::Slot<'_, Self>,
727            decoder_: &mut ___D,
728            _: (),
729        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
730            ::fidl_next::munge! {
731                let Self {
732                    mut config,
733
734                } = slot_;
735            }
736
737            let _field = config.as_mut();
738            ::fidl_next::Constrained::validate(_field, 1024)?;
739            ::fidl_next::Decode::decode(config.as_mut(), decoder_, 1024)?;
740
741            let config = unsafe { config.deref_unchecked() };
742
743            if config.len() > 1024 {
744                return Err(::fidl_next::DecodeError::VectorTooLong {
745                    size: config.len() as u64,
746                    limit: 1024,
747                });
748            }
749
750            Ok(())
751        }
752    }
753
754    impl<'de> ::fidl_next::IntoNatural for LoaderConfigRequest<'de> {
755        type Natural = crate::natural::LoaderConfigRequest;
756    }
757
758    /// The wire type corresponding to [`LoaderConfigResponse`].
759    #[derive(Clone, Debug)]
760    #[repr(C)]
761    pub struct LoaderConfigResponse {
762        pub rv: ::fidl_next::wire::fuchsia::Status,
763    }
764
765    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderConfigResponse>(), 4);
766    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderConfigResponse>(), 4);
767
768    static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderConfigResponse, rv), 0);
769
770    impl ::fidl_next::Constrained for LoaderConfigResponse {
771        type Constraint = ();
772
773        fn validate(
774            _: ::fidl_next::Slot<'_, Self>,
775            _: Self::Constraint,
776        ) -> Result<(), ::fidl_next::ValidationError> {
777            Ok(())
778        }
779    }
780
781    unsafe impl ::fidl_next::Wire for LoaderConfigResponse {
782        type Narrowed<'de> = LoaderConfigResponse;
783
784        #[inline]
785        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
786            ::fidl_next::munge! {
787                let Self {
788                    rv,
789
790                } = &mut *out_;
791            }
792
793            ::fidl_next::Wire::zero_padding(rv);
794        }
795    }
796
797    unsafe impl<___D> ::fidl_next::Decode<___D> for LoaderConfigResponse
798    where
799        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
800    {
801        fn decode(
802            slot_: ::fidl_next::Slot<'_, Self>,
803            decoder_: &mut ___D,
804            _: (),
805        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
806            ::fidl_next::munge! {
807                let Self {
808                    mut rv,
809
810                } = slot_;
811            }
812
813            let _field = rv.as_mut();
814
815            ::fidl_next::Decode::decode(rv.as_mut(), decoder_, ())?;
816
817            Ok(())
818        }
819    }
820
821    impl ::fidl_next::IntoNatural for LoaderConfigResponse {
822        type Natural = crate::natural::LoaderConfigResponse;
823    }
824
825    /// The wire type corresponding to [`LoaderCloneResponse`].
826    #[derive(Clone, Debug)]
827    #[repr(C)]
828    pub struct LoaderCloneResponse {
829        pub rv: ::fidl_next::wire::fuchsia::Status,
830    }
831
832    static_assertions::const_assert_eq!(std::mem::size_of::<LoaderCloneResponse>(), 4);
833    static_assertions::const_assert_eq!(std::mem::align_of::<LoaderCloneResponse>(), 4);
834
835    static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderCloneResponse, rv), 0);
836
837    impl ::fidl_next::Constrained for LoaderCloneResponse {
838        type Constraint = ();
839
840        fn validate(
841            _: ::fidl_next::Slot<'_, Self>,
842            _: Self::Constraint,
843        ) -> Result<(), ::fidl_next::ValidationError> {
844            Ok(())
845        }
846    }
847
848    unsafe impl ::fidl_next::Wire for LoaderCloneResponse {
849        type Narrowed<'de> = LoaderCloneResponse;
850
851        #[inline]
852        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
853            ::fidl_next::munge! {
854                let Self {
855                    rv,
856
857                } = &mut *out_;
858            }
859
860            ::fidl_next::Wire::zero_padding(rv);
861        }
862    }
863
864    unsafe impl<___D> ::fidl_next::Decode<___D> for LoaderCloneResponse
865    where
866        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
867    {
868        fn decode(
869            slot_: ::fidl_next::Slot<'_, Self>,
870            decoder_: &mut ___D,
871            _: (),
872        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
873            ::fidl_next::munge! {
874                let Self {
875                    mut rv,
876
877                } = slot_;
878            }
879
880            let _field = rv.as_mut();
881
882            ::fidl_next::Decode::decode(rv.as_mut(), decoder_, ())?;
883
884            Ok(())
885        }
886    }
887
888    impl ::fidl_next::IntoNatural for LoaderCloneResponse {
889        type Natural = crate::natural::LoaderCloneResponse;
890    }
891}
892
893pub mod wire_optional {}
894
895pub mod generic {
896
897    /// The generic type corresponding to [`LoaderLoadObjectRequest`].
898    pub struct LoaderLoadObjectRequest<T0> {
899        pub object_name: T0,
900    }
901
902    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>
903        for LoaderLoadObjectRequest<T0>
904    where
905        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
906        ___E: ::fidl_next::Encoder,
907        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
908    {
909        #[inline]
910        fn encode(
911            self,
912            encoder_: &mut ___E,
913            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderLoadObjectRequest<'static>>,
914            _: (),
915        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
916            ::fidl_next::munge! {
917                let crate::wire::LoaderLoadObjectRequest {
918                    object_name,
919
920                } = out_;
921            }
922
923            ::fidl_next::Encode::encode(self.object_name, encoder_, object_name, 1024)?;
924
925            Ok(())
926        }
927    }
928
929    /// The generic type corresponding to [`LoaderConfigRequest`].
930    pub struct LoaderConfigRequest<T0> {
931        pub config: T0,
932    }
933
934    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>
935        for LoaderConfigRequest<T0>
936    where
937        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
938        ___E: ::fidl_next::Encoder,
939        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
940    {
941        #[inline]
942        fn encode(
943            self,
944            encoder_: &mut ___E,
945            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigRequest<'static>>,
946            _: (),
947        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
948            ::fidl_next::munge! {
949                let crate::wire::LoaderConfigRequest {
950                    config,
951
952                } = out_;
953            }
954
955            ::fidl_next::Encode::encode(self.config, encoder_, config, 1024)?;
956
957            Ok(())
958        }
959    }
960
961    /// The generic type corresponding to [`LoaderConfigResponse`].
962    pub struct LoaderConfigResponse<T0> {
963        pub rv: T0,
964    }
965
966    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>
967        for LoaderConfigResponse<T0>
968    where
969        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
970        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
971    {
972        #[inline]
973        fn encode(
974            self,
975            encoder_: &mut ___E,
976            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
977            _: (),
978        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
979            ::fidl_next::munge! {
980                let crate::wire::LoaderConfigResponse {
981                    rv,
982
983                } = out_;
984            }
985
986            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
987
988            Ok(())
989        }
990    }
991
992    /// The generic type corresponding to [`LoaderCloneResponse`].
993    pub struct LoaderCloneResponse<T0> {
994        pub rv: T0,
995    }
996
997    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
998        for LoaderCloneResponse<T0>
999    where
1000        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1001        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
1002    {
1003        #[inline]
1004        fn encode(
1005            self,
1006            encoder_: &mut ___E,
1007            out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderCloneResponse>,
1008            _: (),
1009        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1010            ::fidl_next::munge! {
1011                let crate::wire::LoaderCloneResponse {
1012                    rv,
1013
1014                } = out_;
1015            }
1016
1017            ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
1018
1019            Ok(())
1020        }
1021    }
1022}
1023
1024pub use self::natural::*;