fidl_next_fuchsia_ldsvc/
fidl_next_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
5#[derive(Clone, Debug)]
6pub struct LoaderLoadObjectRequest {
7    pub object_name: String,
8}
9
10impl ::fidl_next::Encodable for LoaderLoadObjectRequest {
11    type Encoded = WireLoaderLoadObjectRequest<'static>;
12}
13
14unsafe impl<___E> ::fidl_next::Encode<___E> for LoaderLoadObjectRequest
15where
16    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17    ___E: ::fidl_next::Encoder,
18{
19    #[inline]
20    fn encode(
21        self,
22        encoder: &mut ___E,
23        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
24    ) -> Result<(), ::fidl_next::EncodeError> {
25        ::fidl_next::munge! {
26            let Self::Encoded {
27                object_name,
28
29            } = out;
30        }
31
32        ::fidl_next::Encode::encode(self.object_name, encoder, object_name)?;
33
34        Ok(())
35    }
36}
37
38unsafe impl<___E> ::fidl_next::EncodeRef<___E> for LoaderLoadObjectRequest
39where
40    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
41    ___E: ::fidl_next::Encoder,
42{
43    #[inline]
44    fn encode_ref(
45        &self,
46        encoder: &mut ___E,
47        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
48    ) -> Result<(), ::fidl_next::EncodeError> {
49        ::fidl_next::munge! {
50            let Self::Encoded {
51                object_name,
52
53            } = out;
54        }
55
56        ::fidl_next::EncodeRef::encode_ref(&self.object_name, encoder, object_name)?;
57
58        Ok(())
59    }
60}
61
62impl ::fidl_next::EncodableOption for LoaderLoadObjectRequest {
63    type EncodedOption = ::fidl_next::WireBox<'static, WireLoaderLoadObjectRequest<'static>>;
64}
65
66unsafe impl<___E> ::fidl_next::EncodeOption<___E> for LoaderLoadObjectRequest
67where
68    ___E: ::fidl_next::Encoder + ?Sized,
69    LoaderLoadObjectRequest: ::fidl_next::Encode<___E>,
70{
71    #[inline]
72    fn encode_option(
73        this: Option<Self>,
74        encoder: &mut ___E,
75        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
76    ) -> Result<(), ::fidl_next::EncodeError> {
77        if let Some(inner) = this {
78            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
79            ::fidl_next::WireBox::encode_present(out);
80        } else {
81            ::fidl_next::WireBox::encode_absent(out);
82        }
83
84        Ok(())
85    }
86}
87
88unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for LoaderLoadObjectRequest
89where
90    ___E: ::fidl_next::Encoder + ?Sized,
91    LoaderLoadObjectRequest: ::fidl_next::EncodeRef<___E>,
92{
93    #[inline]
94    fn encode_option_ref(
95        this: Option<&Self>,
96        encoder: &mut ___E,
97        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
98    ) -> Result<(), ::fidl_next::EncodeError> {
99        if let Some(inner) = this {
100            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
101            ::fidl_next::WireBox::encode_present(out);
102        } else {
103            ::fidl_next::WireBox::encode_absent(out);
104        }
105
106        Ok(())
107    }
108}
109
110impl<'de> ::fidl_next::FromWire<WireLoaderLoadObjectRequest<'de>> for LoaderLoadObjectRequest {
111    #[inline]
112    fn from_wire(wire: WireLoaderLoadObjectRequest<'de>) -> Self {
113        Self { object_name: ::fidl_next::FromWire::from_wire(wire.object_name) }
114    }
115}
116
117impl<'de> ::fidl_next::IntoNatural for WireLoaderLoadObjectRequest<'de> {
118    type Natural = LoaderLoadObjectRequest;
119}
120
121impl<'de> ::fidl_next::FromWireRef<WireLoaderLoadObjectRequest<'de>> for LoaderLoadObjectRequest {
122    #[inline]
123    fn from_wire_ref(wire: &WireLoaderLoadObjectRequest<'de>) -> Self {
124        Self { object_name: ::fidl_next::FromWireRef::from_wire_ref(&wire.object_name) }
125    }
126}
127
128/// The wire type corresponding to [`LoaderLoadObjectRequest`].
129#[derive(Debug)]
130#[repr(C)]
131pub struct WireLoaderLoadObjectRequest<'de> {
132    pub object_name: ::fidl_next::WireString<'de>,
133}
134
135unsafe impl ::fidl_next::Wire for WireLoaderLoadObjectRequest<'static> {
136    type Decoded<'de> = WireLoaderLoadObjectRequest<'de>;
137
138    #[inline]
139    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
140}
141
142unsafe impl<___D> ::fidl_next::Decode<___D> for WireLoaderLoadObjectRequest<'static>
143where
144    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
145    ___D: ::fidl_next::Decoder,
146{
147    fn decode(
148        slot: ::fidl_next::Slot<'_, Self>,
149        decoder: &mut ___D,
150    ) -> Result<(), ::fidl_next::DecodeError> {
151        ::fidl_next::munge! {
152            let Self {
153                mut object_name,
154
155            } = slot;
156        }
157
158        ::fidl_next::Decode::decode(object_name.as_mut(), decoder)?;
159
160        let object_name = unsafe { object_name.deref_unchecked() };
161
162        if object_name.len() > 1024 {
163            return Err(::fidl_next::DecodeError::VectorTooLong {
164                size: object_name.len() as u64,
165                limit: 1024,
166            });
167        }
168
169        Ok(())
170    }
171}
172
173#[derive(Debug)]
174#[repr(C)]
175pub struct LoaderLoadObjectResponse {
176    pub rv: i32,
177
178    pub object: Option<::fidl_next::fuchsia::zx::Vmo>,
179}
180
181impl ::fidl_next::Encodable for LoaderLoadObjectResponse {
182    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireLoaderLoadObjectResponse> = unsafe {
183        ::fidl_next::CopyOptimization::enable_if(
184            true
185
186                && <
187                    i32 as ::fidl_next::Encodable
188                >::COPY_OPTIMIZATION.is_enabled()
189
190                && <
191                    Option<::fidl_next::fuchsia::zx::Vmo> as ::fidl_next::Encodable
192                >::COPY_OPTIMIZATION.is_enabled()
193
194        )
195    };
196
197    type Encoded = WireLoaderLoadObjectResponse;
198}
199
200unsafe impl<___E> ::fidl_next::Encode<___E> for LoaderLoadObjectResponse
201where
202    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
203    ___E: ::fidl_next::fuchsia::HandleEncoder,
204{
205    #[inline]
206    fn encode(
207        self,
208        encoder: &mut ___E,
209        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
210    ) -> Result<(), ::fidl_next::EncodeError> {
211        ::fidl_next::munge! {
212            let Self::Encoded {
213                rv,
214                object,
215
216            } = out;
217        }
218
219        ::fidl_next::Encode::encode(self.rv, encoder, rv)?;
220
221        ::fidl_next::Encode::encode(self.object, encoder, object)?;
222
223        Ok(())
224    }
225}
226
227impl ::fidl_next::EncodableOption for LoaderLoadObjectResponse {
228    type EncodedOption = ::fidl_next::WireBox<'static, WireLoaderLoadObjectResponse>;
229}
230
231unsafe impl<___E> ::fidl_next::EncodeOption<___E> for LoaderLoadObjectResponse
232where
233    ___E: ::fidl_next::Encoder + ?Sized,
234    LoaderLoadObjectResponse: ::fidl_next::Encode<___E>,
235{
236    #[inline]
237    fn encode_option(
238        this: Option<Self>,
239        encoder: &mut ___E,
240        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
241    ) -> Result<(), ::fidl_next::EncodeError> {
242        if let Some(inner) = this {
243            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
244            ::fidl_next::WireBox::encode_present(out);
245        } else {
246            ::fidl_next::WireBox::encode_absent(out);
247        }
248
249        Ok(())
250    }
251}
252
253impl ::fidl_next::FromWire<WireLoaderLoadObjectResponse> for LoaderLoadObjectResponse {
254    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireLoaderLoadObjectResponse, Self> = unsafe {
255        ::fidl_next::CopyOptimization::enable_if(
256            true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
257                .is_enabled()
258                && <Option<::fidl_next::fuchsia::zx::Vmo> as ::fidl_next::FromWire<
259                    ::fidl_next::fuchsia::WireOptionalVmo,
260                >>::COPY_OPTIMIZATION
261                    .is_enabled(),
262        )
263    };
264
265    #[inline]
266    fn from_wire(wire: WireLoaderLoadObjectResponse) -> Self {
267        Self {
268            rv: ::fidl_next::FromWire::from_wire(wire.rv),
269
270            object: ::fidl_next::FromWire::from_wire(wire.object),
271        }
272    }
273}
274
275impl ::fidl_next::IntoNatural for WireLoaderLoadObjectResponse {
276    type Natural = LoaderLoadObjectResponse;
277}
278
279/// The wire type corresponding to [`LoaderLoadObjectResponse`].
280#[derive(Debug)]
281#[repr(C)]
282pub struct WireLoaderLoadObjectResponse {
283    pub rv: ::fidl_next::WireI32,
284
285    pub object: ::fidl_next::fuchsia::WireOptionalVmo,
286}
287
288unsafe impl ::fidl_next::Wire for WireLoaderLoadObjectResponse {
289    type Decoded<'de> = WireLoaderLoadObjectResponse;
290
291    #[inline]
292    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
293}
294
295unsafe impl<___D> ::fidl_next::Decode<___D> for WireLoaderLoadObjectResponse
296where
297    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
298    ___D: ::fidl_next::fuchsia::HandleDecoder,
299{
300    fn decode(
301        slot: ::fidl_next::Slot<'_, Self>,
302        decoder: &mut ___D,
303    ) -> Result<(), ::fidl_next::DecodeError> {
304        ::fidl_next::munge! {
305            let Self {
306                mut rv,
307                mut object,
308
309            } = slot;
310        }
311
312        ::fidl_next::Decode::decode(rv.as_mut(), decoder)?;
313
314        ::fidl_next::Decode::decode(object.as_mut(), decoder)?;
315
316        Ok(())
317    }
318}
319
320#[derive(Clone, Debug)]
321pub struct LoaderConfigRequest {
322    pub config: String,
323}
324
325impl ::fidl_next::Encodable for LoaderConfigRequest {
326    type Encoded = WireLoaderConfigRequest<'static>;
327}
328
329unsafe impl<___E> ::fidl_next::Encode<___E> for LoaderConfigRequest
330where
331    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
332    ___E: ::fidl_next::Encoder,
333{
334    #[inline]
335    fn encode(
336        self,
337        encoder: &mut ___E,
338        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
339    ) -> Result<(), ::fidl_next::EncodeError> {
340        ::fidl_next::munge! {
341            let Self::Encoded {
342                config,
343
344            } = out;
345        }
346
347        ::fidl_next::Encode::encode(self.config, encoder, config)?;
348
349        Ok(())
350    }
351}
352
353unsafe impl<___E> ::fidl_next::EncodeRef<___E> for LoaderConfigRequest
354where
355    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
356    ___E: ::fidl_next::Encoder,
357{
358    #[inline]
359    fn encode_ref(
360        &self,
361        encoder: &mut ___E,
362        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
363    ) -> Result<(), ::fidl_next::EncodeError> {
364        ::fidl_next::munge! {
365            let Self::Encoded {
366                config,
367
368            } = out;
369        }
370
371        ::fidl_next::EncodeRef::encode_ref(&self.config, encoder, config)?;
372
373        Ok(())
374    }
375}
376
377impl ::fidl_next::EncodableOption for LoaderConfigRequest {
378    type EncodedOption = ::fidl_next::WireBox<'static, WireLoaderConfigRequest<'static>>;
379}
380
381unsafe impl<___E> ::fidl_next::EncodeOption<___E> for LoaderConfigRequest
382where
383    ___E: ::fidl_next::Encoder + ?Sized,
384    LoaderConfigRequest: ::fidl_next::Encode<___E>,
385{
386    #[inline]
387    fn encode_option(
388        this: Option<Self>,
389        encoder: &mut ___E,
390        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
391    ) -> Result<(), ::fidl_next::EncodeError> {
392        if let Some(inner) = this {
393            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
394            ::fidl_next::WireBox::encode_present(out);
395        } else {
396            ::fidl_next::WireBox::encode_absent(out);
397        }
398
399        Ok(())
400    }
401}
402
403unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for LoaderConfigRequest
404where
405    ___E: ::fidl_next::Encoder + ?Sized,
406    LoaderConfigRequest: ::fidl_next::EncodeRef<___E>,
407{
408    #[inline]
409    fn encode_option_ref(
410        this: Option<&Self>,
411        encoder: &mut ___E,
412        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
413    ) -> Result<(), ::fidl_next::EncodeError> {
414        if let Some(inner) = this {
415            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
416            ::fidl_next::WireBox::encode_present(out);
417        } else {
418            ::fidl_next::WireBox::encode_absent(out);
419        }
420
421        Ok(())
422    }
423}
424
425impl<'de> ::fidl_next::FromWire<WireLoaderConfigRequest<'de>> for LoaderConfigRequest {
426    #[inline]
427    fn from_wire(wire: WireLoaderConfigRequest<'de>) -> Self {
428        Self { config: ::fidl_next::FromWire::from_wire(wire.config) }
429    }
430}
431
432impl<'de> ::fidl_next::IntoNatural for WireLoaderConfigRequest<'de> {
433    type Natural = LoaderConfigRequest;
434}
435
436impl<'de> ::fidl_next::FromWireRef<WireLoaderConfigRequest<'de>> for LoaderConfigRequest {
437    #[inline]
438    fn from_wire_ref(wire: &WireLoaderConfigRequest<'de>) -> Self {
439        Self { config: ::fidl_next::FromWireRef::from_wire_ref(&wire.config) }
440    }
441}
442
443/// The wire type corresponding to [`LoaderConfigRequest`].
444#[derive(Debug)]
445#[repr(C)]
446pub struct WireLoaderConfigRequest<'de> {
447    pub config: ::fidl_next::WireString<'de>,
448}
449
450unsafe impl ::fidl_next::Wire for WireLoaderConfigRequest<'static> {
451    type Decoded<'de> = WireLoaderConfigRequest<'de>;
452
453    #[inline]
454    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
455}
456
457unsafe impl<___D> ::fidl_next::Decode<___D> for WireLoaderConfigRequest<'static>
458where
459    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
460    ___D: ::fidl_next::Decoder,
461{
462    fn decode(
463        slot: ::fidl_next::Slot<'_, Self>,
464        decoder: &mut ___D,
465    ) -> Result<(), ::fidl_next::DecodeError> {
466        ::fidl_next::munge! {
467            let Self {
468                mut config,
469
470            } = slot;
471        }
472
473        ::fidl_next::Decode::decode(config.as_mut(), decoder)?;
474
475        let config = unsafe { config.deref_unchecked() };
476
477        if config.len() > 1024 {
478            return Err(::fidl_next::DecodeError::VectorTooLong {
479                size: config.len() as u64,
480                limit: 1024,
481            });
482        }
483
484        Ok(())
485    }
486}
487
488#[derive(Clone, Debug)]
489#[repr(C)]
490pub struct LoaderConfigResponse {
491    pub rv: i32,
492}
493
494impl ::fidl_next::Encodable for LoaderConfigResponse {
495    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireLoaderConfigResponse> = unsafe {
496        ::fidl_next::CopyOptimization::enable_if(
497            true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
498        )
499    };
500
501    type Encoded = WireLoaderConfigResponse;
502}
503
504unsafe impl<___E> ::fidl_next::Encode<___E> for LoaderConfigResponse
505where
506    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
507{
508    #[inline]
509    fn encode(
510        self,
511        encoder: &mut ___E,
512        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
513    ) -> Result<(), ::fidl_next::EncodeError> {
514        ::fidl_next::munge! {
515            let Self::Encoded {
516                rv,
517
518            } = out;
519        }
520
521        ::fidl_next::Encode::encode(self.rv, encoder, rv)?;
522
523        Ok(())
524    }
525}
526
527unsafe impl<___E> ::fidl_next::EncodeRef<___E> for LoaderConfigResponse
528where
529    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
530{
531    #[inline]
532    fn encode_ref(
533        &self,
534        encoder: &mut ___E,
535        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
536    ) -> Result<(), ::fidl_next::EncodeError> {
537        ::fidl_next::munge! {
538            let Self::Encoded {
539                rv,
540
541            } = out;
542        }
543
544        ::fidl_next::EncodeRef::encode_ref(&self.rv, encoder, rv)?;
545
546        Ok(())
547    }
548}
549
550impl ::fidl_next::EncodableOption for LoaderConfigResponse {
551    type EncodedOption = ::fidl_next::WireBox<'static, WireLoaderConfigResponse>;
552}
553
554unsafe impl<___E> ::fidl_next::EncodeOption<___E> for LoaderConfigResponse
555where
556    ___E: ::fidl_next::Encoder + ?Sized,
557    LoaderConfigResponse: ::fidl_next::Encode<___E>,
558{
559    #[inline]
560    fn encode_option(
561        this: Option<Self>,
562        encoder: &mut ___E,
563        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
564    ) -> Result<(), ::fidl_next::EncodeError> {
565        if let Some(inner) = this {
566            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
567            ::fidl_next::WireBox::encode_present(out);
568        } else {
569            ::fidl_next::WireBox::encode_absent(out);
570        }
571
572        Ok(())
573    }
574}
575
576unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for LoaderConfigResponse
577where
578    ___E: ::fidl_next::Encoder + ?Sized,
579    LoaderConfigResponse: ::fidl_next::EncodeRef<___E>,
580{
581    #[inline]
582    fn encode_option_ref(
583        this: Option<&Self>,
584        encoder: &mut ___E,
585        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
586    ) -> Result<(), ::fidl_next::EncodeError> {
587        if let Some(inner) = this {
588            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
589            ::fidl_next::WireBox::encode_present(out);
590        } else {
591            ::fidl_next::WireBox::encode_absent(out);
592        }
593
594        Ok(())
595    }
596}
597
598impl ::fidl_next::FromWire<WireLoaderConfigResponse> for LoaderConfigResponse {
599    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireLoaderConfigResponse, Self> = unsafe {
600        ::fidl_next::CopyOptimization::enable_if(
601            true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
602                .is_enabled(),
603        )
604    };
605
606    #[inline]
607    fn from_wire(wire: WireLoaderConfigResponse) -> Self {
608        Self { rv: ::fidl_next::FromWire::from_wire(wire.rv) }
609    }
610}
611
612impl ::fidl_next::IntoNatural for WireLoaderConfigResponse {
613    type Natural = LoaderConfigResponse;
614}
615
616impl ::fidl_next::FromWireRef<WireLoaderConfigResponse> for LoaderConfigResponse {
617    #[inline]
618    fn from_wire_ref(wire: &WireLoaderConfigResponse) -> Self {
619        Self { rv: ::fidl_next::FromWireRef::from_wire_ref(&wire.rv) }
620    }
621}
622
623/// The wire type corresponding to [`LoaderConfigResponse`].
624#[derive(Clone, Debug)]
625#[repr(C)]
626pub struct WireLoaderConfigResponse {
627    pub rv: ::fidl_next::WireI32,
628}
629
630unsafe impl ::fidl_next::Wire for WireLoaderConfigResponse {
631    type Decoded<'de> = WireLoaderConfigResponse;
632
633    #[inline]
634    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
635}
636
637unsafe impl<___D> ::fidl_next::Decode<___D> for WireLoaderConfigResponse
638where
639    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
640{
641    fn decode(
642        slot: ::fidl_next::Slot<'_, Self>,
643        decoder: &mut ___D,
644    ) -> Result<(), ::fidl_next::DecodeError> {
645        ::fidl_next::munge! {
646            let Self {
647                mut rv,
648
649            } = slot;
650        }
651
652        ::fidl_next::Decode::decode(rv.as_mut(), decoder)?;
653
654        Ok(())
655    }
656}
657
658#[derive(Debug)]
659#[repr(C)]
660pub struct LoaderCloneRequest {
661    pub loader: ::fidl_next::ServerEnd<crate::Loader, ::fidl_next::fuchsia::zx::Channel>,
662}
663
664impl ::fidl_next::Encodable for LoaderCloneRequest {
665    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireLoaderCloneRequest> = unsafe {
666        ::fidl_next::CopyOptimization::enable_if(
667            true
668
669                && <
670                    ::fidl_next::ServerEnd<crate::Loader, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encodable
671                >::COPY_OPTIMIZATION.is_enabled()
672
673        )
674    };
675
676    type Encoded = WireLoaderCloneRequest;
677}
678
679unsafe impl<___E> ::fidl_next::Encode<___E> for LoaderCloneRequest
680where
681    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
682    ___E: ::fidl_next::fuchsia::HandleEncoder,
683{
684    #[inline]
685    fn encode(
686        self,
687        encoder: &mut ___E,
688        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
689    ) -> Result<(), ::fidl_next::EncodeError> {
690        ::fidl_next::munge! {
691            let Self::Encoded {
692                loader,
693
694            } = out;
695        }
696
697        ::fidl_next::Encode::encode(self.loader, encoder, loader)?;
698
699        Ok(())
700    }
701}
702
703impl ::fidl_next::EncodableOption for LoaderCloneRequest {
704    type EncodedOption = ::fidl_next::WireBox<'static, WireLoaderCloneRequest>;
705}
706
707unsafe impl<___E> ::fidl_next::EncodeOption<___E> for LoaderCloneRequest
708where
709    ___E: ::fidl_next::Encoder + ?Sized,
710    LoaderCloneRequest: ::fidl_next::Encode<___E>,
711{
712    #[inline]
713    fn encode_option(
714        this: Option<Self>,
715        encoder: &mut ___E,
716        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
717    ) -> Result<(), ::fidl_next::EncodeError> {
718        if let Some(inner) = this {
719            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
720            ::fidl_next::WireBox::encode_present(out);
721        } else {
722            ::fidl_next::WireBox::encode_absent(out);
723        }
724
725        Ok(())
726    }
727}
728
729impl ::fidl_next::FromWire<WireLoaderCloneRequest> for LoaderCloneRequest {
730    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireLoaderCloneRequest, Self> = unsafe {
731        ::fidl_next::CopyOptimization::enable_if(
732            true
733
734                && <
735                    ::fidl_next::ServerEnd<crate::Loader, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Loader, ::fidl_next::fuchsia::WireChannel>>
736                >::COPY_OPTIMIZATION.is_enabled()
737
738        )
739    };
740
741    #[inline]
742    fn from_wire(wire: WireLoaderCloneRequest) -> Self {
743        Self { loader: ::fidl_next::FromWire::from_wire(wire.loader) }
744    }
745}
746
747impl ::fidl_next::IntoNatural for WireLoaderCloneRequest {
748    type Natural = LoaderCloneRequest;
749}
750
751/// The wire type corresponding to [`LoaderCloneRequest`].
752#[derive(Debug)]
753#[repr(C)]
754pub struct WireLoaderCloneRequest {
755    pub loader: ::fidl_next::ServerEnd<crate::Loader, ::fidl_next::fuchsia::WireChannel>,
756}
757
758unsafe impl ::fidl_next::Wire for WireLoaderCloneRequest {
759    type Decoded<'de> = WireLoaderCloneRequest;
760
761    #[inline]
762    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
763}
764
765unsafe impl<___D> ::fidl_next::Decode<___D> for WireLoaderCloneRequest
766where
767    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
768    ___D: ::fidl_next::fuchsia::HandleDecoder,
769{
770    fn decode(
771        slot: ::fidl_next::Slot<'_, Self>,
772        decoder: &mut ___D,
773    ) -> Result<(), ::fidl_next::DecodeError> {
774        ::fidl_next::munge! {
775            let Self {
776                mut loader,
777
778            } = slot;
779        }
780
781        ::fidl_next::Decode::decode(loader.as_mut(), decoder)?;
782
783        Ok(())
784    }
785}
786
787#[derive(Clone, Debug)]
788#[repr(C)]
789pub struct LoaderCloneResponse {
790    pub rv: i32,
791}
792
793impl ::fidl_next::Encodable for LoaderCloneResponse {
794    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireLoaderCloneResponse> = unsafe {
795        ::fidl_next::CopyOptimization::enable_if(
796            true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
797        )
798    };
799
800    type Encoded = WireLoaderCloneResponse;
801}
802
803unsafe impl<___E> ::fidl_next::Encode<___E> for LoaderCloneResponse
804where
805    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
806{
807    #[inline]
808    fn encode(
809        self,
810        encoder: &mut ___E,
811        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
812    ) -> Result<(), ::fidl_next::EncodeError> {
813        ::fidl_next::munge! {
814            let Self::Encoded {
815                rv,
816
817            } = out;
818        }
819
820        ::fidl_next::Encode::encode(self.rv, encoder, rv)?;
821
822        Ok(())
823    }
824}
825
826unsafe impl<___E> ::fidl_next::EncodeRef<___E> for LoaderCloneResponse
827where
828    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
829{
830    #[inline]
831    fn encode_ref(
832        &self,
833        encoder: &mut ___E,
834        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
835    ) -> Result<(), ::fidl_next::EncodeError> {
836        ::fidl_next::munge! {
837            let Self::Encoded {
838                rv,
839
840            } = out;
841        }
842
843        ::fidl_next::EncodeRef::encode_ref(&self.rv, encoder, rv)?;
844
845        Ok(())
846    }
847}
848
849impl ::fidl_next::EncodableOption for LoaderCloneResponse {
850    type EncodedOption = ::fidl_next::WireBox<'static, WireLoaderCloneResponse>;
851}
852
853unsafe impl<___E> ::fidl_next::EncodeOption<___E> for LoaderCloneResponse
854where
855    ___E: ::fidl_next::Encoder + ?Sized,
856    LoaderCloneResponse: ::fidl_next::Encode<___E>,
857{
858    #[inline]
859    fn encode_option(
860        this: Option<Self>,
861        encoder: &mut ___E,
862        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
863    ) -> Result<(), ::fidl_next::EncodeError> {
864        if let Some(inner) = this {
865            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
866            ::fidl_next::WireBox::encode_present(out);
867        } else {
868            ::fidl_next::WireBox::encode_absent(out);
869        }
870
871        Ok(())
872    }
873}
874
875unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for LoaderCloneResponse
876where
877    ___E: ::fidl_next::Encoder + ?Sized,
878    LoaderCloneResponse: ::fidl_next::EncodeRef<___E>,
879{
880    #[inline]
881    fn encode_option_ref(
882        this: Option<&Self>,
883        encoder: &mut ___E,
884        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
885    ) -> Result<(), ::fidl_next::EncodeError> {
886        if let Some(inner) = this {
887            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
888            ::fidl_next::WireBox::encode_present(out);
889        } else {
890            ::fidl_next::WireBox::encode_absent(out);
891        }
892
893        Ok(())
894    }
895}
896
897impl ::fidl_next::FromWire<WireLoaderCloneResponse> for LoaderCloneResponse {
898    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireLoaderCloneResponse, Self> = unsafe {
899        ::fidl_next::CopyOptimization::enable_if(
900            true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
901                .is_enabled(),
902        )
903    };
904
905    #[inline]
906    fn from_wire(wire: WireLoaderCloneResponse) -> Self {
907        Self { rv: ::fidl_next::FromWire::from_wire(wire.rv) }
908    }
909}
910
911impl ::fidl_next::IntoNatural for WireLoaderCloneResponse {
912    type Natural = LoaderCloneResponse;
913}
914
915impl ::fidl_next::FromWireRef<WireLoaderCloneResponse> for LoaderCloneResponse {
916    #[inline]
917    fn from_wire_ref(wire: &WireLoaderCloneResponse) -> Self {
918        Self { rv: ::fidl_next::FromWireRef::from_wire_ref(&wire.rv) }
919    }
920}
921
922/// The wire type corresponding to [`LoaderCloneResponse`].
923#[derive(Clone, Debug)]
924#[repr(C)]
925pub struct WireLoaderCloneResponse {
926    pub rv: ::fidl_next::WireI32,
927}
928
929unsafe impl ::fidl_next::Wire for WireLoaderCloneResponse {
930    type Decoded<'de> = WireLoaderCloneResponse;
931
932    #[inline]
933    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
934}
935
936unsafe impl<___D> ::fidl_next::Decode<___D> for WireLoaderCloneResponse
937where
938    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
939{
940    fn decode(
941        slot: ::fidl_next::Slot<'_, Self>,
942        decoder: &mut ___D,
943    ) -> Result<(), ::fidl_next::DecodeError> {
944        ::fidl_next::munge! {
945            let Self {
946                mut rv,
947
948            } = slot;
949        }
950
951        ::fidl_next::Decode::decode(rv.as_mut(), decoder)?;
952
953        Ok(())
954    }
955}
956
957/// The type corresponding to the Loader protocol.
958#[doc = " See //docs/concepts/process/program_loading.md for a more complete\n description of this and related process bootstrapping protocols, and\n for specifics about the default global loader service\'s\n interpretation of names, paths, and configurations.\n"]
959#[derive(Debug)]
960pub struct Loader;
961
962pub mod loader {
963    pub mod prelude {
964        pub use crate::{Loader, LoaderClientHandler, LoaderServerHandler, loader};
965
966        pub use crate::LoaderCloneRequest;
967
968        pub use crate::LoaderCloneResponse;
969
970        pub use crate::LoaderConfigRequest;
971
972        pub use crate::LoaderConfigResponse;
973
974        pub use crate::LoaderLoadObjectRequest;
975
976        pub use crate::LoaderLoadObjectResponse;
977    }
978
979    pub struct Done;
980
981    impl ::fidl_next::Method for Done {
982        const ORDINAL: u64 = 7186174313520107521;
983
984        type Protocol = crate::Loader;
985
986        type Request = ();
987
988        type Response = ::fidl_next::Never;
989    }
990
991    pub struct LoadObject;
992
993    impl ::fidl_next::Method for LoadObject {
994        const ORDINAL: u64 = 5243774714012182611;
995
996        type Protocol = crate::Loader;
997
998        type Request = crate::WireLoaderLoadObjectRequest<'static>;
999
1000        type Response = crate::WireLoaderLoadObjectResponse;
1001    }
1002
1003    pub struct Config;
1004
1005    impl ::fidl_next::Method for Config {
1006        const ORDINAL: u64 = 7676977189692319809;
1007
1008        type Protocol = crate::Loader;
1009
1010        type Request = crate::WireLoaderConfigRequest<'static>;
1011
1012        type Response = crate::WireLoaderConfigResponse;
1013    }
1014
1015    pub struct Clone;
1016
1017    impl ::fidl_next::Method for Clone {
1018        const ORDINAL: u64 = 6333824321947847721;
1019
1020        type Protocol = crate::Loader;
1021
1022        type Request = crate::WireLoaderCloneRequest;
1023
1024        type Response = crate::WireLoaderCloneResponse;
1025    }
1026
1027    mod ___detail {
1028
1029        pub struct LoadObject<T0> {
1030            object_name: T0,
1031        }
1032
1033        impl<T0> ::fidl_next::Encodable for LoadObject<T0>
1034        where
1035            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
1036        {
1037            type Encoded = crate::WireLoaderLoadObjectRequest<'static>;
1038        }
1039
1040        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for LoadObject<T0>
1041        where
1042            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1043            ___E: ::fidl_next::Encoder,
1044            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
1045        {
1046            #[inline]
1047            fn encode(
1048                self,
1049                encoder: &mut ___E,
1050                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1051            ) -> Result<(), ::fidl_next::EncodeError> {
1052                ::fidl_next::munge! {
1053                    let Self::Encoded {
1054                        object_name,
1055
1056                    } = out;
1057                }
1058
1059                ::fidl_next::Encode::encode(self.object_name, encoder, object_name)?;
1060
1061                Ok(())
1062            }
1063        }
1064
1065        pub struct Config<T0> {
1066            config: T0,
1067        }
1068
1069        impl<T0> ::fidl_next::Encodable for Config<T0>
1070        where
1071            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
1072        {
1073            type Encoded = crate::WireLoaderConfigRequest<'static>;
1074        }
1075
1076        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Config<T0>
1077        where
1078            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1079            ___E: ::fidl_next::Encoder,
1080            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
1081        {
1082            #[inline]
1083            fn encode(
1084                self,
1085                encoder: &mut ___E,
1086                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1087            ) -> Result<(), ::fidl_next::EncodeError> {
1088                ::fidl_next::munge! {
1089                    let Self::Encoded {
1090                        config,
1091
1092                    } = out;
1093                }
1094
1095                ::fidl_next::Encode::encode(self.config, encoder, config)?;
1096
1097                Ok(())
1098            }
1099        }
1100
1101        pub struct Clone<T0> {
1102            loader: T0,
1103        }
1104
1105        impl<T0> ::fidl_next::Encodable for Clone<T0>
1106        where
1107            T0: ::fidl_next::Encodable<
1108                    Encoded = ::fidl_next::ServerEnd<
1109                        crate::Loader,
1110                        ::fidl_next::fuchsia::WireChannel,
1111                    >,
1112                >,
1113        {
1114            type Encoded = crate::WireLoaderCloneRequest;
1115        }
1116
1117        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Clone<T0>
1118        where
1119            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1120            ___E: ::fidl_next::fuchsia::HandleEncoder,
1121            T0: ::fidl_next::Encode<
1122                    ___E,
1123                    Encoded = ::fidl_next::ServerEnd<
1124                        crate::Loader,
1125                        ::fidl_next::fuchsia::WireChannel,
1126                    >,
1127                >,
1128        {
1129            #[inline]
1130            fn encode(
1131                self,
1132                encoder: &mut ___E,
1133                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1134            ) -> Result<(), ::fidl_next::EncodeError> {
1135                ::fidl_next::munge! {
1136                    let Self::Encoded {
1137                        loader,
1138
1139                    } = out;
1140                }
1141
1142                ::fidl_next::Encode::encode(self.loader, encoder, loader)?;
1143
1144                Ok(())
1145            }
1146        }
1147
1148        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Loader
1149        where
1150            ___T: ::fidl_next::Transport,
1151        {
1152            type ClientSender = LoaderClientSender<___T>;
1153            type ServerSender = LoaderServerSender<___T>;
1154        }
1155
1156        /// The client sender for the `Loader` protocol.
1157        #[repr(transparent)]
1158        pub struct LoaderClientSender<___T: ::fidl_next::Transport> {
1159            #[allow(dead_code)]
1160            sender: ::fidl_next::protocol::ClientSender<___T>,
1161        }
1162
1163        impl<___T> LoaderClientSender<___T>
1164        where
1165            ___T: ::fidl_next::Transport,
1166        {
1167            #[doc = " Cleanly shutdown the connection to the Loader service.\n"]
1168            pub fn done(&self) -> ::fidl_next::SendFuture<'_, ___T> {
1169                ::fidl_next::SendFuture::from_untyped(
1170                    self.sender.send_one_way(7186174313520107521, ()),
1171                )
1172            }
1173
1174            #[doc = " The dynamic linker sends `object_name` and gets back a VMO\n handle containing the file.\n"]
1175            pub fn load_object(
1176                &self,
1177
1178                object_name: impl ::fidl_next::Encode<
1179                    <___T as ::fidl_next::Transport>::SendBuffer,
1180                    Encoded = ::fidl_next::WireString<'static>,
1181                >,
1182            ) -> ::fidl_next::TwoWayFuture<'_, super::LoadObject, ___T>
1183            where
1184                <___T as ::fidl_next::Transport>::SendBuffer:
1185                    ::fidl_next::encoder::InternalHandleEncoder,
1186                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
1187            {
1188                self.load_object_with(LoadObject { object_name })
1189            }
1190
1191            #[doc = " The dynamic linker sends `object_name` and gets back a VMO\n handle containing the file.\n"]
1192            pub fn load_object_with<___R>(
1193                &self,
1194                request: ___R,
1195            ) -> ::fidl_next::TwoWayFuture<'_, super::LoadObject, ___T>
1196            where
1197                ___R: ::fidl_next::Encode<
1198                        <___T as ::fidl_next::Transport>::SendBuffer,
1199                        Encoded = crate::WireLoaderLoadObjectRequest<'static>,
1200                    >,
1201            {
1202                ::fidl_next::TwoWayFuture::from_untyped(
1203                    self.sender.send_two_way(5243774714012182611, request),
1204                )
1205            }
1206
1207            #[doc = " The dynamic linker sends a `config` identifying its load\n configuration.  This is intended to affect how later\n `LoadObject` requests decide what particular implementation\n file to supply for a given name.\n"]
1208            pub fn config(
1209                &self,
1210
1211                config: impl ::fidl_next::Encode<
1212                    <___T as ::fidl_next::Transport>::SendBuffer,
1213                    Encoded = ::fidl_next::WireString<'static>,
1214                >,
1215            ) -> ::fidl_next::TwoWayFuture<'_, super::Config, ___T>
1216            where
1217                <___T as ::fidl_next::Transport>::SendBuffer:
1218                    ::fidl_next::encoder::InternalHandleEncoder,
1219                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
1220            {
1221                self.config_with(Config { config })
1222            }
1223
1224            #[doc = " The dynamic linker sends a `config` identifying its load\n configuration.  This is intended to affect how later\n `LoadObject` requests decide what particular implementation\n file to supply for a given name.\n"]
1225            pub fn config_with<___R>(
1226                &self,
1227                request: ___R,
1228            ) -> ::fidl_next::TwoWayFuture<'_, super::Config, ___T>
1229            where
1230                ___R: ::fidl_next::Encode<
1231                        <___T as ::fidl_next::Transport>::SendBuffer,
1232                        Encoded = crate::WireLoaderConfigRequest<'static>,
1233                    >,
1234            {
1235                ::fidl_next::TwoWayFuture::from_untyped(
1236                    self.sender.send_two_way(7676977189692319809, request),
1237                )
1238            }
1239
1240            #[doc = " Obtain a new loader service connection.\n"]
1241            pub fn clone(
1242                &self,
1243
1244                loader: impl ::fidl_next::Encode<
1245                    <___T as ::fidl_next::Transport>::SendBuffer,
1246                    Encoded = ::fidl_next::ServerEnd<
1247                        crate::Loader,
1248                        ::fidl_next::fuchsia::WireChannel,
1249                    >,
1250                >,
1251            ) -> ::fidl_next::TwoWayFuture<'_, super::Clone, ___T>
1252            where
1253                <___T as ::fidl_next::Transport>::SendBuffer:
1254                    ::fidl_next::encoder::InternalHandleEncoder,
1255                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1256            {
1257                self.clone_with(Clone { loader })
1258            }
1259
1260            #[doc = " Obtain a new loader service connection.\n"]
1261            pub fn clone_with<___R>(
1262                &self,
1263                request: ___R,
1264            ) -> ::fidl_next::TwoWayFuture<'_, super::Clone, ___T>
1265            where
1266                ___R: ::fidl_next::Encode<
1267                        <___T as ::fidl_next::Transport>::SendBuffer,
1268                        Encoded = crate::WireLoaderCloneRequest,
1269                    >,
1270            {
1271                ::fidl_next::TwoWayFuture::from_untyped(
1272                    self.sender.send_two_way(6333824321947847721, request),
1273                )
1274            }
1275        }
1276
1277        /// The server sender for the `Loader` protocol.
1278        #[repr(transparent)]
1279        pub struct LoaderServerSender<___T: ::fidl_next::Transport> {
1280            sender: ::fidl_next::protocol::ServerSender<___T>,
1281        }
1282
1283        impl<___T> LoaderServerSender<___T> where ___T: ::fidl_next::Transport {}
1284    }
1285}
1286
1287/// A client handler for the Loader protocol.
1288///
1289/// See [`Loader`] for more details.
1290pub trait LoaderClientHandler<
1291    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
1292    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1293>
1294{
1295}
1296
1297impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Loader
1298where
1299    ___H: LoaderClientHandler<___T> + ::core::marker::Send,
1300    ___T: ::fidl_next::Transport,
1301    <loader::LoadObject as ::fidl_next::Method>::Response:
1302        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1303    <loader::Config as ::fidl_next::Method>::Response:
1304        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1305    <loader::Clone as ::fidl_next::Method>::Response:
1306        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1307{
1308    async fn on_event(
1309        handler: &mut ___H,
1310        sender: &::fidl_next::ClientSender<Self, ___T>,
1311        ordinal: u64,
1312        buffer: ___T::RecvBuffer,
1313    ) {
1314        match ordinal {
1315            ordinal => sender.close(),
1316        }
1317    }
1318}
1319
1320/// A server handler for the Loader protocol.
1321///
1322/// See [`Loader`] for more details.
1323pub trait LoaderServerHandler<
1324    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
1325    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1326>
1327{
1328    #[doc = " Cleanly shutdown the connection to the Loader service.\n"]
1329    fn done(
1330        &mut self,
1331        sender: &::fidl_next::ServerSender<Loader, ___T>,
1332    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1333
1334    #[doc = " The dynamic linker sends `object_name` and gets back a VMO\n handle containing the file.\n"]
1335    fn load_object(
1336        &mut self,
1337        sender: &::fidl_next::ServerSender<Loader, ___T>,
1338
1339        request: ::fidl_next::Request<loader::LoadObject, ___T>,
1340
1341        responder: ::fidl_next::Responder<loader::LoadObject>,
1342    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1343
1344    #[doc = " The dynamic linker sends a `config` identifying its load\n configuration.  This is intended to affect how later\n `LoadObject` requests decide what particular implementation\n file to supply for a given name.\n"]
1345    fn config(
1346        &mut self,
1347        sender: &::fidl_next::ServerSender<Loader, ___T>,
1348
1349        request: ::fidl_next::Request<loader::Config, ___T>,
1350
1351        responder: ::fidl_next::Responder<loader::Config>,
1352    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1353
1354    #[doc = " Obtain a new loader service connection.\n"]
1355    fn clone(
1356        &mut self,
1357        sender: &::fidl_next::ServerSender<Loader, ___T>,
1358
1359        request: ::fidl_next::Request<loader::Clone, ___T>,
1360
1361        responder: ::fidl_next::Responder<loader::Clone>,
1362    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1363}
1364
1365impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Loader
1366where
1367    ___H: LoaderServerHandler<___T> + ::core::marker::Send,
1368    ___T: ::fidl_next::Transport,
1369    <loader::LoadObject as ::fidl_next::Method>::Request:
1370        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1371    <loader::Config as ::fidl_next::Method>::Request:
1372        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1373    <loader::Clone as ::fidl_next::Method>::Request:
1374        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1375{
1376    async fn on_one_way(
1377        handler: &mut ___H,
1378        sender: &::fidl_next::ServerSender<Self, ___T>,
1379        ordinal: u64,
1380        buffer: ___T::RecvBuffer,
1381    ) {
1382        match ordinal {
1383            7186174313520107521 => {
1384                handler.done(sender).await;
1385            }
1386
1387            ordinal => sender.close(),
1388        }
1389    }
1390
1391    async fn on_two_way(
1392        handler: &mut ___H,
1393        sender: &::fidl_next::ServerSender<Self, ___T>,
1394        ordinal: u64,
1395        buffer: ___T::RecvBuffer,
1396        responder: ::fidl_next::protocol::Responder,
1397    ) {
1398        match ordinal {
1399            5243774714012182611 => {
1400                let responder = ::fidl_next::Responder::from_untyped(responder);
1401
1402                match ::fidl_next::DecoderExt::decode(buffer) {
1403                    Ok(decoded) => handler.load_object(sender, decoded, responder).await,
1404                    Err(e) => sender.close(),
1405                }
1406            }
1407
1408            7676977189692319809 => {
1409                let responder = ::fidl_next::Responder::from_untyped(responder);
1410
1411                match ::fidl_next::DecoderExt::decode(buffer) {
1412                    Ok(decoded) => handler.config(sender, decoded, responder).await,
1413                    Err(e) => sender.close(),
1414                }
1415            }
1416
1417            6333824321947847721 => {
1418                let responder = ::fidl_next::Responder::from_untyped(responder);
1419
1420                match ::fidl_next::DecoderExt::decode(buffer) {
1421                    Ok(decoded) => handler.clone(sender, decoded, responder).await,
1422                    Err(e) => sender.close(),
1423                }
1424            }
1425
1426            ordinal => sender.close(),
1427        }
1428    }
1429}
1430
1431/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
1432pub mod compat {
1433
1434    impl ::fidl_next::CompatFrom<crate::LoaderLoadObjectRequest>
1435        for ::fidl_fuchsia_ldsvc::LoaderLoadObjectRequest
1436    {
1437        #[inline]
1438        fn compat_from(value: crate::LoaderLoadObjectRequest) -> Self {
1439            Self { object_name: ::fidl_next::CompatFrom::compat_from(value.object_name) }
1440        }
1441    }
1442
1443    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderLoadObjectRequest>
1444        for crate::LoaderLoadObjectRequest
1445    {
1446        #[inline]
1447        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderLoadObjectRequest) -> Self {
1448            Self { object_name: ::fidl_next::CompatFrom::compat_from(value.object_name) }
1449        }
1450    }
1451
1452    impl ::fidl_next::CompatFrom<crate::LoaderLoadObjectResponse>
1453        for ::fidl_fuchsia_ldsvc::LoaderLoadObjectResponse
1454    {
1455        #[inline]
1456        fn compat_from(value: crate::LoaderLoadObjectResponse) -> Self {
1457            Self {
1458                rv: ::fidl_next::CompatFrom::compat_from(value.rv),
1459
1460                object: ::fidl_next::CompatFrom::compat_from(value.object),
1461            }
1462        }
1463    }
1464
1465    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderLoadObjectResponse>
1466        for crate::LoaderLoadObjectResponse
1467    {
1468        #[inline]
1469        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderLoadObjectResponse) -> Self {
1470            Self {
1471                rv: ::fidl_next::CompatFrom::compat_from(value.rv),
1472
1473                object: ::fidl_next::CompatFrom::compat_from(value.object),
1474            }
1475        }
1476    }
1477
1478    impl ::fidl_next::CompatFrom<crate::LoaderConfigRequest>
1479        for ::fidl_fuchsia_ldsvc::LoaderConfigRequest
1480    {
1481        #[inline]
1482        fn compat_from(value: crate::LoaderConfigRequest) -> Self {
1483            Self { config: ::fidl_next::CompatFrom::compat_from(value.config) }
1484        }
1485    }
1486
1487    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderConfigRequest>
1488        for crate::LoaderConfigRequest
1489    {
1490        #[inline]
1491        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderConfigRequest) -> Self {
1492            Self { config: ::fidl_next::CompatFrom::compat_from(value.config) }
1493        }
1494    }
1495
1496    impl ::fidl_next::CompatFrom<crate::LoaderConfigResponse>
1497        for ::fidl_fuchsia_ldsvc::LoaderConfigResponse
1498    {
1499        #[inline]
1500        fn compat_from(value: crate::LoaderConfigResponse) -> Self {
1501            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1502        }
1503    }
1504
1505    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderConfigResponse>
1506        for crate::LoaderConfigResponse
1507    {
1508        #[inline]
1509        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderConfigResponse) -> Self {
1510            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1511        }
1512    }
1513
1514    impl ::fidl_next::CompatFrom<crate::LoaderCloneRequest>
1515        for ::fidl_fuchsia_ldsvc::LoaderCloneRequest
1516    {
1517        #[inline]
1518        fn compat_from(value: crate::LoaderCloneRequest) -> Self {
1519            Self { loader: ::fidl_next::CompatFrom::compat_from(value.loader) }
1520        }
1521    }
1522
1523    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderCloneRequest>
1524        for crate::LoaderCloneRequest
1525    {
1526        #[inline]
1527        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderCloneRequest) -> Self {
1528            Self { loader: ::fidl_next::CompatFrom::compat_from(value.loader) }
1529        }
1530    }
1531
1532    impl ::fidl_next::CompatFrom<crate::LoaderCloneResponse>
1533        for ::fidl_fuchsia_ldsvc::LoaderCloneResponse
1534    {
1535        #[inline]
1536        fn compat_from(value: crate::LoaderCloneResponse) -> Self {
1537            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1538        }
1539    }
1540
1541    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderCloneResponse>
1542        for crate::LoaderCloneResponse
1543    {
1544        #[inline]
1545        fn compat_from(value: ::fidl_fuchsia_ldsvc::LoaderCloneResponse) -> Self {
1546            Self { rv: ::fidl_next::CompatFrom::compat_from(value.rv) }
1547        }
1548    }
1549
1550    #[cfg(target_os = "fuchsia")]
1551    /// An alias for a client sender over `zx::Channel` for the `Loader`
1552    /// protocol.
1553    pub type LoaderProxy = ::fidl_next::ClientSender<crate::Loader>;
1554
1555    impl ::fidl_next::CompatFrom<crate::Loader> for ::fidl_fuchsia_ldsvc::LoaderMarker {
1556        fn compat_from(_: crate::Loader) -> Self {
1557            Self
1558        }
1559    }
1560
1561    impl ::fidl_next::CompatFrom<::fidl_fuchsia_ldsvc::LoaderMarker> for crate::Loader {
1562        fn compat_from(_: ::fidl_fuchsia_ldsvc::LoaderMarker) -> Self {
1563            Self
1564        }
1565    }
1566
1567    #[cfg(target_os = "fuchsia")]
1568
1569    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_ldsvc::LoaderProxy> for crate::Loader {
1570        fn client_compat_from(
1571            proxy: ::fidl_fuchsia_ldsvc::LoaderProxy,
1572        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
1573            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
1574            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
1575            ::fidl_next::Client::new(client_end)
1576        }
1577    }
1578}