Skip to main content

fidl_next_fuchsia_component_resolution/
fidl_next_fuchsia_component_resolution.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    pub use fidl_next_common_fuchsia_component_resolution::natural::*;
8
9    #[doc = " A package is a signed collection of immutable files.\n\n This object provides access to a package\'s content and relevant metadata.\n"]
10    #[derive(Debug, Default, PartialEq)]
11    pub struct Package {
12        pub url: ::core::option::Option<::std::string::String>,
13
14        pub directory: ::core::option::Option<
15            ::fidl_next::ClientEnd<
16                ::fidl_next_fuchsia_io::Directory,
17                ::fidl_next::fuchsia::zx::Channel,
18            >,
19        >,
20    }
21
22    impl Package {
23        fn __max_ordinal(&self) -> usize {
24            if self.directory.is_some() {
25                return 2;
26            }
27
28            if self.url.is_some() {
29                return 1;
30            }
31
32            0
33        }
34    }
35
36    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Package<'static>, ___E> for Package
37    where
38        ___E: ::fidl_next::Encoder + ?Sized,
39        ___E: ::fidl_next::fuchsia::HandleEncoder,
40    {
41        #[inline]
42        fn encode(
43            mut self,
44            encoder: &mut ___E,
45            out: &mut ::core::mem::MaybeUninit<crate::wire::Package<'static>>,
46            _: (),
47        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
48            ::fidl_next::munge!(let crate::wire::Package { table } = out);
49
50            let max_ord = self.__max_ordinal();
51
52            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
53            ::fidl_next::Wire::zero_padding(&mut out);
54
55            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
56                ::fidl_next::wire::Envelope,
57            >(encoder, max_ord);
58
59            for i in 1..=max_ord {
60                match i {
61                    2 => {
62                        if let Some(value) = self.directory.take() {
63                            ::fidl_next::wire::Envelope::encode_value::<
64                                ::fidl_next::ClientEnd<
65                                    ::fidl_next_fuchsia_io::Directory,
66                                    ::fidl_next::wire::fuchsia::Channel,
67                                >,
68                                ___E,
69                            >(
70                                value, preallocated.encoder, &mut out, ()
71                            )?;
72                        } else {
73                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
74                        }
75                    }
76
77                    1 => {
78                        if let Some(value) = self.url.take() {
79                            ::fidl_next::wire::Envelope::encode_value::<
80                                ::fidl_next::wire::String<'static>,
81                                ___E,
82                            >(
83                                value, preallocated.encoder, &mut out, 2083
84                            )?;
85                        } else {
86                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
87                        }
88                    }
89
90                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
91                }
92                unsafe {
93                    preallocated.write_next(out.assume_init_ref());
94                }
95            }
96
97            ::fidl_next::wire::Table::encode_len(table, max_ord);
98
99            Ok(())
100        }
101    }
102
103    impl<'de> ::fidl_next::FromWire<crate::wire::Package<'de>> for Package {
104        #[inline]
105        fn from_wire(wire_: crate::wire::Package<'de>) -> Self {
106            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
107
108            let url = wire_.table.get(1);
109
110            let directory = wire_.table.get(2);
111
112            Self {
113                url: url.map(|envelope| {
114                    ::fidl_next::FromWire::from_wire(unsafe {
115                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
116                    })
117                }),
118
119                directory: directory.map(|envelope| {
120                    ::fidl_next::FromWire::from_wire(unsafe {
121                        envelope.read_unchecked::<::fidl_next::ClientEnd<
122                            ::fidl_next_fuchsia_io::Directory,
123                            ::fidl_next::wire::fuchsia::Channel,
124                        >>()
125                    })
126                }),
127            }
128        }
129    }
130
131    #[doc = " A component is a unit of executable software.\n\n This object provides the component\'s declaration, access to its package\'s\n content, and relevant metadata as resolved `fuchsia.component.resolution.Resolver`.\n"]
132    #[derive(Debug, Default, PartialEq)]
133    pub struct Component {
134        pub url: ::core::option::Option<::std::string::String>,
135
136        pub decl: ::core::option::Option<::fidl_next_fuchsia_mem::natural::Data>,
137
138        pub package: ::core::option::Option<crate::natural::Package>,
139
140        pub config_values: ::core::option::Option<::fidl_next_fuchsia_mem::natural::Data>,
141
142        pub resolution_context: ::core::option::Option<crate::natural::Context>,
143
144        pub abi_revision: ::core::option::Option<u64>,
145    }
146
147    impl Component {
148        fn __max_ordinal(&self) -> usize {
149            if self.abi_revision.is_some() {
150                return 6;
151            }
152
153            if self.resolution_context.is_some() {
154                return 5;
155            }
156
157            if self.config_values.is_some() {
158                return 4;
159            }
160
161            if self.package.is_some() {
162                return 3;
163            }
164
165            if self.decl.is_some() {
166                return 2;
167            }
168
169            if self.url.is_some() {
170                return 1;
171            }
172
173            0
174        }
175    }
176
177    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Component<'static>, ___E> for Component
178    where
179        ___E: ::fidl_next::Encoder + ?Sized,
180        ___E: ::fidl_next::fuchsia::HandleEncoder,
181    {
182        #[inline]
183        fn encode(
184            mut self,
185            encoder: &mut ___E,
186            out: &mut ::core::mem::MaybeUninit<crate::wire::Component<'static>>,
187            _: (),
188        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
189            ::fidl_next::munge!(let crate::wire::Component { table } = out);
190
191            let max_ord = self.__max_ordinal();
192
193            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
194            ::fidl_next::Wire::zero_padding(&mut out);
195
196            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
197                ::fidl_next::wire::Envelope,
198            >(encoder, max_ord);
199
200            for i in 1..=max_ord {
201                match i {
202                    6 => {
203                        if let Some(value) = self.abi_revision.take() {
204                            ::fidl_next::wire::Envelope::encode_value::<
205                                ::fidl_next::wire::Uint64,
206                                ___E,
207                            >(
208                                value, preallocated.encoder, &mut out, ()
209                            )?;
210                        } else {
211                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
212                        }
213                    }
214
215                    5 => {
216                        if let Some(value) = self.resolution_context.take() {
217                            ::fidl_next::wire::Envelope::encode_value::<
218                                crate::wire::Context<'static>,
219                                ___E,
220                            >(
221                                value, preallocated.encoder, &mut out, ()
222                            )?;
223                        } else {
224                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
225                        }
226                    }
227
228                    4 => {
229                        if let Some(value) = self.config_values.take() {
230                            ::fidl_next::wire::Envelope::encode_value::<
231                                ::fidl_next_fuchsia_mem::wire::Data<'static>,
232                                ___E,
233                            >(
234                                value, preallocated.encoder, &mut out, ()
235                            )?;
236                        } else {
237                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
238                        }
239                    }
240
241                    3 => {
242                        if let Some(value) = self.package.take() {
243                            ::fidl_next::wire::Envelope::encode_value::<
244                                crate::wire::Package<'static>,
245                                ___E,
246                            >(
247                                value, preallocated.encoder, &mut out, ()
248                            )?;
249                        } else {
250                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
251                        }
252                    }
253
254                    2 => {
255                        if let Some(value) = self.decl.take() {
256                            ::fidl_next::wire::Envelope::encode_value::<
257                                ::fidl_next_fuchsia_mem::wire::Data<'static>,
258                                ___E,
259                            >(
260                                value, preallocated.encoder, &mut out, ()
261                            )?;
262                        } else {
263                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
264                        }
265                    }
266
267                    1 => {
268                        if let Some(value) = self.url.take() {
269                            ::fidl_next::wire::Envelope::encode_value::<
270                                ::fidl_next::wire::String<'static>,
271                                ___E,
272                            >(
273                                value, preallocated.encoder, &mut out, 2083
274                            )?;
275                        } else {
276                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
277                        }
278                    }
279
280                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
281                }
282                unsafe {
283                    preallocated.write_next(out.assume_init_ref());
284                }
285            }
286
287            ::fidl_next::wire::Table::encode_len(table, max_ord);
288
289            Ok(())
290        }
291    }
292
293    impl<'de> ::fidl_next::FromWire<crate::wire::Component<'de>> for Component {
294        #[inline]
295        fn from_wire(wire_: crate::wire::Component<'de>) -> Self {
296            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
297
298            let url = wire_.table.get(1);
299
300            let decl = wire_.table.get(2);
301
302            let package = wire_.table.get(3);
303
304            let config_values = wire_.table.get(4);
305
306            let resolution_context = wire_.table.get(5);
307
308            let abi_revision = wire_.table.get(6);
309
310            Self {
311                url: url.map(|envelope| {
312                    ::fidl_next::FromWire::from_wire(unsafe {
313                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
314                    })
315                }),
316
317                decl: decl.map(|envelope| {
318                    ::fidl_next::FromWire::from_wire(unsafe {
319                        envelope.read_unchecked::<::fidl_next_fuchsia_mem::wire::Data<'de>>()
320                    })
321                }),
322
323                package: package.map(|envelope| {
324                    ::fidl_next::FromWire::from_wire(unsafe {
325                        envelope.read_unchecked::<crate::wire::Package<'de>>()
326                    })
327                }),
328
329                config_values: config_values.map(|envelope| {
330                    ::fidl_next::FromWire::from_wire(unsafe {
331                        envelope.read_unchecked::<::fidl_next_fuchsia_mem::wire::Data<'de>>()
332                    })
333                }),
334
335                resolution_context: resolution_context.map(|envelope| {
336                    ::fidl_next::FromWire::from_wire(unsafe {
337                        envelope.read_unchecked::<crate::wire::Context<'de>>()
338                    })
339                }),
340
341                abi_revision: abi_revision.map(|envelope| {
342                    ::fidl_next::FromWire::from_wire(unsafe {
343                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
344                    })
345                }),
346            }
347        }
348    }
349
350    #[derive(Debug, PartialEq)]
351    pub struct ResolverResolveResponse {
352        pub component: crate::natural::Component,
353    }
354
355    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ResolverResolveResponse<'static>, ___E>
356        for ResolverResolveResponse
357    where
358        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
359        ___E: ::fidl_next::Encoder,
360        ___E: ::fidl_next::fuchsia::HandleEncoder,
361    {
362        #[inline]
363        fn encode(
364            self,
365            encoder_: &mut ___E,
366            out_: &mut ::core::mem::MaybeUninit<crate::wire::ResolverResolveResponse<'static>>,
367            _: (),
368        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
369            ::fidl_next::munge! {
370                let crate::wire::ResolverResolveResponse {
371                    component,
372
373                } = out_;
374            }
375
376            ::fidl_next::Encode::encode(self.component, encoder_, component, ())?;
377
378            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(component.as_mut_ptr()) };
379
380            Ok(())
381        }
382    }
383
384    unsafe impl<___E>
385        ::fidl_next::EncodeOption<
386            ::fidl_next::wire::Box<'static, crate::wire::ResolverResolveResponse<'static>>,
387            ___E,
388        > for ResolverResolveResponse
389    where
390        ___E: ::fidl_next::Encoder + ?Sized,
391        ResolverResolveResponse:
392            ::fidl_next::Encode<crate::wire::ResolverResolveResponse<'static>, ___E>,
393    {
394        #[inline]
395        fn encode_option(
396            this: ::core::option::Option<Self>,
397            encoder: &mut ___E,
398            out: &mut ::core::mem::MaybeUninit<
399                ::fidl_next::wire::Box<'static, crate::wire::ResolverResolveResponse<'static>>,
400            >,
401            _: (),
402        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
403            if let Some(inner) = this {
404                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
405                ::fidl_next::wire::Box::encode_present(out);
406            } else {
407                ::fidl_next::wire::Box::encode_absent(out);
408            }
409
410            Ok(())
411        }
412    }
413
414    impl<'de> ::fidl_next::FromWire<crate::wire::ResolverResolveResponse<'de>>
415        for ResolverResolveResponse
416    {
417        #[inline]
418        fn from_wire(wire: crate::wire::ResolverResolveResponse<'de>) -> Self {
419            Self { component: ::fidl_next::FromWire::from_wire(wire.component) }
420        }
421    }
422
423    #[derive(Debug, PartialEq)]
424    pub struct ResolverResolveWithContextResponse {
425        pub component: crate::natural::Component,
426    }
427
428    unsafe impl<___E>
429        ::fidl_next::Encode<crate::wire::ResolverResolveWithContextResponse<'static>, ___E>
430        for ResolverResolveWithContextResponse
431    where
432        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
433        ___E: ::fidl_next::Encoder,
434        ___E: ::fidl_next::fuchsia::HandleEncoder,
435    {
436        #[inline]
437        fn encode(
438            self,
439            encoder_: &mut ___E,
440            out_: &mut ::core::mem::MaybeUninit<
441                crate::wire::ResolverResolveWithContextResponse<'static>,
442            >,
443            _: (),
444        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
445            ::fidl_next::munge! {
446                let crate::wire::ResolverResolveWithContextResponse {
447                    component,
448
449                } = out_;
450            }
451
452            ::fidl_next::Encode::encode(self.component, encoder_, component, ())?;
453
454            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(component.as_mut_ptr()) };
455
456            Ok(())
457        }
458    }
459
460    unsafe impl<___E>
461        ::fidl_next::EncodeOption<
462            ::fidl_next::wire::Box<
463                'static,
464                crate::wire::ResolverResolveWithContextResponse<'static>,
465            >,
466            ___E,
467        > for ResolverResolveWithContextResponse
468    where
469        ___E: ::fidl_next::Encoder + ?Sized,
470        ResolverResolveWithContextResponse:
471            ::fidl_next::Encode<crate::wire::ResolverResolveWithContextResponse<'static>, ___E>,
472    {
473        #[inline]
474        fn encode_option(
475            this: ::core::option::Option<Self>,
476            encoder: &mut ___E,
477            out: &mut ::core::mem::MaybeUninit<
478                ::fidl_next::wire::Box<
479                    'static,
480                    crate::wire::ResolverResolveWithContextResponse<'static>,
481                >,
482            >,
483            _: (),
484        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
485            if let Some(inner) = this {
486                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
487                ::fidl_next::wire::Box::encode_present(out);
488            } else {
489                ::fidl_next::wire::Box::encode_absent(out);
490            }
491
492            Ok(())
493        }
494    }
495
496    impl<'de> ::fidl_next::FromWire<crate::wire::ResolverResolveWithContextResponse<'de>>
497        for ResolverResolveWithContextResponse
498    {
499        #[inline]
500        fn from_wire(wire: crate::wire::ResolverResolveWithContextResponse<'de>) -> Self {
501            Self { component: ::fidl_next::FromWire::from_wire(wire.component) }
502        }
503    }
504}
505
506pub mod wire {
507
508    pub use fidl_next_common_fuchsia_component_resolution::wire::*;
509
510    /// The wire type corresponding to [`Package`].
511    #[repr(C)]
512    pub struct Package<'de> {
513        pub(crate) table: ::fidl_next::wire::Table<'de>,
514    }
515
516    impl<'de> Drop for Package<'de> {
517        fn drop(&mut self) {
518            let _ = self.table.get(1).map(|envelope| unsafe {
519                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
520            });
521
522            let _ = self.table.get(2).map(|envelope| unsafe {
523                envelope.read_unchecked::<::fidl_next::ClientEnd<
524                    ::fidl_next_fuchsia_io::Directory,
525                    ::fidl_next::wire::fuchsia::Channel,
526                >>()
527            });
528        }
529    }
530
531    impl ::fidl_next::Constrained for Package<'_> {
532        type Constraint = ();
533
534        fn validate(
535            _: ::fidl_next::Slot<'_, Self>,
536            _: Self::Constraint,
537        ) -> Result<(), ::fidl_next::ValidationError> {
538            Ok(())
539        }
540    }
541
542    unsafe impl ::fidl_next::Wire for Package<'static> {
543        type Narrowed<'de> = Package<'de>;
544
545        #[inline]
546        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
547            ::fidl_next::munge!(let Self { table } = out);
548            ::fidl_next::wire::Table::zero_padding(table);
549        }
550    }
551
552    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Package<'de>
553    where
554        ___D: ::fidl_next::Decoder<'de> + ?Sized,
555        ___D: ::fidl_next::fuchsia::HandleDecoder,
556    {
557        fn decode(
558            slot: ::fidl_next::Slot<'_, Self>,
559            decoder: &mut ___D,
560            _: (),
561        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
562            ::fidl_next::munge!(let Self { table } = slot);
563
564            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
565                match ordinal {
566                    0 => unsafe { ::core::hint::unreachable_unchecked() },
567
568                    1 => {
569                        ::fidl_next::wire::Envelope::decode_as::<
570                            ___D,
571                            ::fidl_next::wire::String<'de>,
572                        >(slot.as_mut(), decoder, 2083)?;
573
574                        let value = unsafe {
575                            slot.deref_unchecked()
576                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
577                        };
578
579                        if value.len() > 2083 {
580                            return Err(::fidl_next::DecodeError::VectorTooLong {
581                                size: value.len() as u64,
582                                limit: 2083,
583                            });
584                        }
585
586                        Ok(())
587                    }
588
589                    2 => {
590                        ::fidl_next::wire::Envelope::decode_as::<
591                            ___D,
592                            ::fidl_next::ClientEnd<
593                                ::fidl_next_fuchsia_io::Directory,
594                                ::fidl_next::wire::fuchsia::Channel,
595                            >,
596                        >(slot.as_mut(), decoder, ())?;
597
598                        Ok(())
599                    }
600
601                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
602                }
603            })
604        }
605    }
606
607    impl<'de> Package<'de> {
608        pub fn url(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
609            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
610        }
611
612        pub fn directory(
613            &self,
614        ) -> ::core::option::Option<
615            &::fidl_next::ClientEnd<
616                ::fidl_next_fuchsia_io::Directory,
617                ::fidl_next::wire::fuchsia::Channel,
618            >,
619        > {
620            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
621        }
622    }
623
624    impl<'de> ::core::fmt::Debug for Package<'de> {
625        fn fmt(
626            &self,
627            f: &mut ::core::fmt::Formatter<'_>,
628        ) -> ::core::result::Result<(), ::core::fmt::Error> {
629            f.debug_struct("Package")
630                .field("url", &self.url())
631                .field("directory", &self.directory())
632                .finish()
633        }
634    }
635
636    impl<'de> ::fidl_next::IntoNatural for Package<'de> {
637        type Natural = crate::natural::Package;
638    }
639
640    /// The wire type corresponding to [`Component`].
641    #[repr(C)]
642    pub struct Component<'de> {
643        pub(crate) table: ::fidl_next::wire::Table<'de>,
644    }
645
646    impl<'de> Drop for Component<'de> {
647        fn drop(&mut self) {
648            let _ = self.table.get(1).map(|envelope| unsafe {
649                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
650            });
651
652            let _ = self.table.get(2).map(|envelope| unsafe {
653                envelope.read_unchecked::<::fidl_next_fuchsia_mem::wire::Data<'de>>()
654            });
655
656            let _ = self
657                .table
658                .get(3)
659                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Package<'de>>() });
660
661            let _ = self.table.get(4).map(|envelope| unsafe {
662                envelope.read_unchecked::<::fidl_next_fuchsia_mem::wire::Data<'de>>()
663            });
664
665            let _ = self
666                .table
667                .get(5)
668                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Context<'de>>() });
669
670            let _ = self
671                .table
672                .get(6)
673                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
674        }
675    }
676
677    impl ::fidl_next::Constrained for Component<'_> {
678        type Constraint = ();
679
680        fn validate(
681            _: ::fidl_next::Slot<'_, Self>,
682            _: Self::Constraint,
683        ) -> Result<(), ::fidl_next::ValidationError> {
684            Ok(())
685        }
686    }
687
688    unsafe impl ::fidl_next::Wire for Component<'static> {
689        type Narrowed<'de> = Component<'de>;
690
691        #[inline]
692        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
693            ::fidl_next::munge!(let Self { table } = out);
694            ::fidl_next::wire::Table::zero_padding(table);
695        }
696    }
697
698    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Component<'de>
699    where
700        ___D: ::fidl_next::Decoder<'de> + ?Sized,
701        ___D: ::fidl_next::fuchsia::HandleDecoder,
702    {
703        fn decode(
704            slot: ::fidl_next::Slot<'_, Self>,
705            decoder: &mut ___D,
706            _: (),
707        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
708            ::fidl_next::munge!(let Self { table } = slot);
709
710            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
711                match ordinal {
712                    0 => unsafe { ::core::hint::unreachable_unchecked() },
713
714                    1 => {
715                        ::fidl_next::wire::Envelope::decode_as::<
716                            ___D,
717                            ::fidl_next::wire::String<'de>,
718                        >(slot.as_mut(), decoder, 2083)?;
719
720                        let value = unsafe {
721                            slot.deref_unchecked()
722                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
723                        };
724
725                        if value.len() > 2083 {
726                            return Err(::fidl_next::DecodeError::VectorTooLong {
727                                size: value.len() as u64,
728                                limit: 2083,
729                            });
730                        }
731
732                        Ok(())
733                    }
734
735                    2 => {
736                        ::fidl_next::wire::Envelope::decode_as::<
737                            ___D,
738                            ::fidl_next_fuchsia_mem::wire::Data<'de>,
739                        >(slot.as_mut(), decoder, ())?;
740
741                        Ok(())
742                    }
743
744                    3 => {
745                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Package<'de>>(
746                            slot.as_mut(),
747                            decoder,
748                            (),
749                        )?;
750
751                        Ok(())
752                    }
753
754                    4 => {
755                        ::fidl_next::wire::Envelope::decode_as::<
756                            ___D,
757                            ::fidl_next_fuchsia_mem::wire::Data<'de>,
758                        >(slot.as_mut(), decoder, ())?;
759
760                        Ok(())
761                    }
762
763                    5 => {
764                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Context<'de>>(
765                            slot.as_mut(),
766                            decoder,
767                            (),
768                        )?;
769
770                        Ok(())
771                    }
772
773                    6 => {
774                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
775                            slot.as_mut(),
776                            decoder,
777                            (),
778                        )?;
779
780                        Ok(())
781                    }
782
783                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
784                }
785            })
786        }
787    }
788
789    impl<'de> Component<'de> {
790        pub fn url(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
791            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
792        }
793
794        pub fn decl(&self) -> ::core::option::Option<&::fidl_next_fuchsia_mem::wire::Data<'de>> {
795            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
796        }
797
798        pub fn package(&self) -> ::core::option::Option<&crate::wire::Package<'de>> {
799            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
800        }
801
802        pub fn config_values(
803            &self,
804        ) -> ::core::option::Option<&::fidl_next_fuchsia_mem::wire::Data<'de>> {
805            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
806        }
807
808        pub fn resolution_context(&self) -> ::core::option::Option<&crate::wire::Context<'de>> {
809            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
810        }
811
812        pub fn abi_revision(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
813            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
814        }
815    }
816
817    impl<'de> ::core::fmt::Debug for Component<'de> {
818        fn fmt(
819            &self,
820            f: &mut ::core::fmt::Formatter<'_>,
821        ) -> ::core::result::Result<(), ::core::fmt::Error> {
822            f.debug_struct("Component")
823                .field("url", &self.url())
824                .field("decl", &self.decl())
825                .field("package", &self.package())
826                .field("config_values", &self.config_values())
827                .field("resolution_context", &self.resolution_context())
828                .field("abi_revision", &self.abi_revision())
829                .finish()
830        }
831    }
832
833    impl<'de> ::fidl_next::IntoNatural for Component<'de> {
834        type Natural = crate::natural::Component;
835    }
836
837    /// The wire type corresponding to [`ResolverResolveResponse`].
838    #[derive(Debug)]
839    #[repr(C)]
840    pub struct ResolverResolveResponse<'de> {
841        pub component: crate::wire::Component<'de>,
842    }
843
844    static_assertions::const_assert_eq!(std::mem::size_of::<ResolverResolveResponse<'_>>(), 16);
845    static_assertions::const_assert_eq!(std::mem::align_of::<ResolverResolveResponse<'_>>(), 8);
846
847    static_assertions::const_assert_eq!(
848        std::mem::offset_of!(ResolverResolveResponse<'_>, component),
849        0
850    );
851
852    impl ::fidl_next::Constrained for ResolverResolveResponse<'_> {
853        type Constraint = ();
854
855        fn validate(
856            _: ::fidl_next::Slot<'_, Self>,
857            _: Self::Constraint,
858        ) -> Result<(), ::fidl_next::ValidationError> {
859            Ok(())
860        }
861    }
862
863    unsafe impl ::fidl_next::Wire for ResolverResolveResponse<'static> {
864        type Narrowed<'de> = ResolverResolveResponse<'de>;
865
866        #[inline]
867        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
868            ::fidl_next::munge! {
869                let Self {
870                    component,
871
872                } = &mut *out_;
873            }
874
875            ::fidl_next::Wire::zero_padding(component);
876        }
877    }
878
879    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ResolverResolveResponse<'de>
880    where
881        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
882        ___D: ::fidl_next::Decoder<'de>,
883        ___D: ::fidl_next::fuchsia::HandleDecoder,
884    {
885        fn decode(
886            slot_: ::fidl_next::Slot<'_, Self>,
887            decoder_: &mut ___D,
888            _: (),
889        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
890            ::fidl_next::munge! {
891                let Self {
892                    mut component,
893
894                } = slot_;
895            }
896
897            let _field = component.as_mut();
898
899            ::fidl_next::Decode::decode(component.as_mut(), decoder_, ())?;
900
901            Ok(())
902        }
903    }
904
905    impl<'de> ::fidl_next::IntoNatural for ResolverResolveResponse<'de> {
906        type Natural = crate::natural::ResolverResolveResponse;
907    }
908
909    /// The wire type corresponding to [`ResolverResolveWithContextResponse`].
910    #[derive(Debug)]
911    #[repr(C)]
912    pub struct ResolverResolveWithContextResponse<'de> {
913        pub component: crate::wire::Component<'de>,
914    }
915
916    static_assertions::const_assert_eq!(
917        std::mem::size_of::<ResolverResolveWithContextResponse<'_>>(),
918        16
919    );
920    static_assertions::const_assert_eq!(
921        std::mem::align_of::<ResolverResolveWithContextResponse<'_>>(),
922        8
923    );
924
925    static_assertions::const_assert_eq!(
926        std::mem::offset_of!(ResolverResolveWithContextResponse<'_>, component),
927        0
928    );
929
930    impl ::fidl_next::Constrained for ResolverResolveWithContextResponse<'_> {
931        type Constraint = ();
932
933        fn validate(
934            _: ::fidl_next::Slot<'_, Self>,
935            _: Self::Constraint,
936        ) -> Result<(), ::fidl_next::ValidationError> {
937            Ok(())
938        }
939    }
940
941    unsafe impl ::fidl_next::Wire for ResolverResolveWithContextResponse<'static> {
942        type Narrowed<'de> = ResolverResolveWithContextResponse<'de>;
943
944        #[inline]
945        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
946            ::fidl_next::munge! {
947                let Self {
948                    component,
949
950                } = &mut *out_;
951            }
952
953            ::fidl_next::Wire::zero_padding(component);
954        }
955    }
956
957    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ResolverResolveWithContextResponse<'de>
958    where
959        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
960        ___D: ::fidl_next::Decoder<'de>,
961        ___D: ::fidl_next::fuchsia::HandleDecoder,
962    {
963        fn decode(
964            slot_: ::fidl_next::Slot<'_, Self>,
965            decoder_: &mut ___D,
966            _: (),
967        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
968            ::fidl_next::munge! {
969                let Self {
970                    mut component,
971
972                } = slot_;
973            }
974
975            let _field = component.as_mut();
976
977            ::fidl_next::Decode::decode(component.as_mut(), decoder_, ())?;
978
979            Ok(())
980        }
981    }
982
983    impl<'de> ::fidl_next::IntoNatural for ResolverResolveWithContextResponse<'de> {
984        type Natural = crate::natural::ResolverResolveWithContextResponse;
985    }
986}
987
988pub mod wire_optional {
989
990    pub use fidl_next_common_fuchsia_component_resolution::wire_optional::*;
991}
992
993pub mod generic {
994
995    pub use fidl_next_common_fuchsia_component_resolution::generic::*;
996
997    /// The generic type corresponding to [`ResolverResolveResponse`].
998    pub struct ResolverResolveResponse<T0> {
999        pub component: T0,
1000    }
1001
1002    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ResolverResolveResponse<'static>, ___E>
1003        for ResolverResolveResponse<T0>
1004    where
1005        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1006        ___E: ::fidl_next::Encoder,
1007        ___E: ::fidl_next::fuchsia::HandleEncoder,
1008        T0: ::fidl_next::Encode<crate::wire::Component<'static>, ___E>,
1009    {
1010        #[inline]
1011        fn encode(
1012            self,
1013            encoder_: &mut ___E,
1014            out_: &mut ::core::mem::MaybeUninit<crate::wire::ResolverResolveResponse<'static>>,
1015            _: (),
1016        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1017            ::fidl_next::munge! {
1018                let crate::wire::ResolverResolveResponse {
1019                    component,
1020
1021                } = out_;
1022            }
1023
1024            ::fidl_next::Encode::encode(self.component, encoder_, component, ())?;
1025
1026            Ok(())
1027        }
1028    }
1029
1030    /// The generic type corresponding to [`ResolverResolveWithContextResponse`].
1031    pub struct ResolverResolveWithContextResponse<T0> {
1032        pub component: T0,
1033    }
1034
1035    unsafe impl<___E, T0>
1036        ::fidl_next::Encode<crate::wire::ResolverResolveWithContextResponse<'static>, ___E>
1037        for ResolverResolveWithContextResponse<T0>
1038    where
1039        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1040        ___E: ::fidl_next::Encoder,
1041        ___E: ::fidl_next::fuchsia::HandleEncoder,
1042        T0: ::fidl_next::Encode<crate::wire::Component<'static>, ___E>,
1043    {
1044        #[inline]
1045        fn encode(
1046            self,
1047            encoder_: &mut ___E,
1048            out_: &mut ::core::mem::MaybeUninit<
1049                crate::wire::ResolverResolveWithContextResponse<'static>,
1050            >,
1051            _: (),
1052        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1053            ::fidl_next::munge! {
1054                let crate::wire::ResolverResolveWithContextResponse {
1055                    component,
1056
1057                } = out_;
1058            }
1059
1060            ::fidl_next::Encode::encode(self.component, encoder_, component, ())?;
1061
1062            Ok(())
1063        }
1064    }
1065}
1066
1067pub use self::natural::*;
1068
1069/// The type corresponding to the Resolver protocol.
1070#[doc = " An interface for resolving a URL to a component.\n\n This interface is implemented by components that provide support\n for loading components with a particular URL scheme.   For example,\n the Fuchsia package component resolver exposes a service with this\n interface to resolve component URLs using the \"fuchsia-pkg://\" scheme.\n\n To use a resolver to resolve URLs within your realm, register it\n in your realm\'s manifest.\n\n Note: The component manager is the only intended direct client of this\n interface.\n"]
1071#[derive(PartialEq, Debug)]
1072pub struct Resolver;
1073
1074impl ::fidl_next::Discoverable for Resolver {
1075    const PROTOCOL_NAME: &'static str = "fuchsia.component.resolution.Resolver";
1076}
1077
1078#[cfg(target_os = "fuchsia")]
1079impl ::fidl_next::HasTransport for Resolver {
1080    type Transport = ::fidl_next::fuchsia::zx::Channel;
1081}
1082
1083pub mod resolver {
1084    pub mod prelude {
1085        pub use crate::{Resolver, ResolverClientHandler, ResolverServerHandler, resolver};
1086
1087        pub use crate::natural::ResolverError;
1088
1089        pub use crate::natural::ResolverResolveRequest;
1090
1091        pub use crate::natural::ResolverResolveWithContextRequest;
1092
1093        pub use crate::natural::ResolverResolveWithContextResponse;
1094
1095        pub use crate::natural::ResolverResolveResponse;
1096    }
1097
1098    pub struct Resolve;
1099
1100    impl ::fidl_next::Method for Resolve {
1101        const ORDINAL: u64 = 6339326548187935461;
1102        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1103            ::fidl_next::protocol::Flexibility::Strict;
1104
1105        type Protocol = crate::Resolver;
1106
1107        type Request = crate::wire::ResolverResolveRequest<'static>;
1108    }
1109
1110    impl ::fidl_next::TwoWayMethod for Resolve {
1111        type Response = ::fidl_next::wire::Result<
1112            'static,
1113            crate::wire::ResolverResolveResponse<'static>,
1114            crate::wire::ResolverError,
1115        >;
1116    }
1117
1118    impl<___R> ::fidl_next::Respond<___R> for Resolve {
1119        type Output = ::core::result::Result<
1120            crate::generic::ResolverResolveResponse<___R>,
1121            ::fidl_next::util::Never,
1122        >;
1123
1124        fn respond(response: ___R) -> Self::Output {
1125            ::core::result::Result::Ok(crate::generic::ResolverResolveResponse {
1126                component: response,
1127            })
1128        }
1129    }
1130
1131    impl<___R> ::fidl_next::RespondErr<___R> for Resolve {
1132        type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
1133
1134        fn respond_err(response: ___R) -> Self::Output {
1135            ::core::result::Result::Err(response)
1136        }
1137    }
1138
1139    pub struct ResolveWithContext;
1140
1141    impl ::fidl_next::Method for ResolveWithContext {
1142        const ORDINAL: u64 = 5576776708309151933;
1143        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1144            ::fidl_next::protocol::Flexibility::Strict;
1145
1146        type Protocol = crate::Resolver;
1147
1148        type Request = crate::wire::ResolverResolveWithContextRequest<'static>;
1149    }
1150
1151    impl ::fidl_next::TwoWayMethod for ResolveWithContext {
1152        type Response = ::fidl_next::wire::Result<
1153            'static,
1154            crate::wire::ResolverResolveWithContextResponse<'static>,
1155            crate::wire::ResolverError,
1156        >;
1157    }
1158
1159    impl<___R> ::fidl_next::Respond<___R> for ResolveWithContext {
1160        type Output = ::core::result::Result<
1161            crate::generic::ResolverResolveWithContextResponse<___R>,
1162            ::fidl_next::util::Never,
1163        >;
1164
1165        fn respond(response: ___R) -> Self::Output {
1166            ::core::result::Result::Ok(crate::generic::ResolverResolveWithContextResponse {
1167                component: response,
1168            })
1169        }
1170    }
1171
1172    impl<___R> ::fidl_next::RespondErr<___R> for ResolveWithContext {
1173        type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
1174
1175        fn respond_err(response: ___R) -> Self::Output {
1176            ::core::result::Result::Err(response)
1177        }
1178    }
1179
1180    mod ___detail {
1181        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Resolver
1182        where
1183            ___T: ::fidl_next::Transport,
1184        {
1185            type Client = ResolverClient<___T>;
1186            type Server = ResolverServer<___T>;
1187        }
1188
1189        /// The client for the `Resolver` protocol.
1190        #[repr(transparent)]
1191        pub struct ResolverClient<___T: ::fidl_next::Transport> {
1192            #[allow(dead_code)]
1193            client: ::fidl_next::protocol::Client<___T>,
1194        }
1195
1196        impl<___T> ResolverClient<___T>
1197        where
1198            ___T: ::fidl_next::Transport,
1199        {
1200            #[doc = " Resolves a component with the given absolute URL.\n\n `component_url` is the unescaped URL of the component to resolve.\n\n If successful, returns information about the component\n that was resolved.\n\n On failure, returns a `ResolverError` error.\n"]
1201            pub fn resolve(
1202                &self,
1203
1204                component_url: impl ::fidl_next::Encode<
1205                    ::fidl_next::wire::String<'static>,
1206                    <___T as ::fidl_next::Transport>::SendBuffer,
1207                >,
1208            ) -> ::fidl_next::TwoWayFuture<'_, super::Resolve, ___T>
1209            where
1210                <___T as ::fidl_next::Transport>::SendBuffer:
1211                    ::fidl_next::encoder::InternalHandleEncoder,
1212                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
1213            {
1214                self.resolve_with(crate::generic::ResolverResolveRequest { component_url })
1215            }
1216
1217            #[doc = " Resolves a component with the given absolute URL.\n\n `component_url` is the unescaped URL of the component to resolve.\n\n If successful, returns information about the component\n that was resolved.\n\n On failure, returns a `ResolverError` error.\n"]
1218            pub fn resolve_with<___R>(
1219                &self,
1220                request: ___R,
1221            ) -> ::fidl_next::TwoWayFuture<'_, super::Resolve, ___T>
1222            where
1223                ___R: ::fidl_next::Encode<
1224                        crate::wire::ResolverResolveRequest<'static>,
1225                        <___T as ::fidl_next::Transport>::SendBuffer,
1226                    >,
1227            {
1228                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1229                    6339326548187935461,
1230                    <super::Resolve as ::fidl_next::Method>::FLEXIBILITY,
1231                    request,
1232                ))
1233            }
1234
1235            #[doc = " Resolves a component with the absolute or relative URL. If relative, the\n component will be resolved relative to the supplied `context`.\n\n `component_url` is the unescaped URL of the component to resolve, the\n format of which can be either:\n\n   * a fully-qualified absolute component URL; or\n   * a subpackaged-component reference, prefixed by a URI relative\n     path to its containing subpackage (for example,\n     `child_package#meta/some_component.cm`)\n\n `context` is the `resolution_context` of a previously-resolved\n `Component`, providing the context for resoving a relative URL.\n"]
1236            pub fn resolve_with_context(
1237                &self,
1238
1239                component_url: impl ::fidl_next::Encode<
1240                    ::fidl_next::wire::String<'static>,
1241                    <___T as ::fidl_next::Transport>::SendBuffer,
1242                >,
1243
1244                context: impl ::fidl_next::Encode<
1245                    crate::wire::Context<'static>,
1246                    <___T as ::fidl_next::Transport>::SendBuffer,
1247                >,
1248            ) -> ::fidl_next::TwoWayFuture<'_, super::ResolveWithContext, ___T>
1249            where
1250                <___T as ::fidl_next::Transport>::SendBuffer:
1251                    ::fidl_next::encoder::InternalHandleEncoder,
1252                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
1253            {
1254                self.resolve_with_context_with(crate::generic::ResolverResolveWithContextRequest {
1255                    component_url,
1256
1257                    context,
1258                })
1259            }
1260
1261            #[doc = " Resolves a component with the absolute or relative URL. If relative, the\n component will be resolved relative to the supplied `context`.\n\n `component_url` is the unescaped URL of the component to resolve, the\n format of which can be either:\n\n   * a fully-qualified absolute component URL; or\n   * a subpackaged-component reference, prefixed by a URI relative\n     path to its containing subpackage (for example,\n     `child_package#meta/some_component.cm`)\n\n `context` is the `resolution_context` of a previously-resolved\n `Component`, providing the context for resoving a relative URL.\n"]
1262            pub fn resolve_with_context_with<___R>(
1263                &self,
1264                request: ___R,
1265            ) -> ::fidl_next::TwoWayFuture<'_, super::ResolveWithContext, ___T>
1266            where
1267                ___R: ::fidl_next::Encode<
1268                        crate::wire::ResolverResolveWithContextRequest<'static>,
1269                        <___T as ::fidl_next::Transport>::SendBuffer,
1270                    >,
1271            {
1272                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1273                    5576776708309151933,
1274                    <super::ResolveWithContext as ::fidl_next::Method>::FLEXIBILITY,
1275                    request,
1276                ))
1277            }
1278        }
1279
1280        /// The server for the `Resolver` protocol.
1281        #[repr(transparent)]
1282        pub struct ResolverServer<___T: ::fidl_next::Transport> {
1283            server: ::fidl_next::protocol::Server<___T>,
1284        }
1285
1286        impl<___T> ResolverServer<___T> where ___T: ::fidl_next::Transport {}
1287    }
1288}
1289
1290/// A client handler for the Resolver protocol.
1291///
1292/// See [`Resolver`] for more details.
1293pub trait ResolverClientHandler<
1294    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1295    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1296>
1297{
1298    fn on_unknown_interaction(
1299        &mut self,
1300        ordinal: u64,
1301    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1302        ::core::future::ready(())
1303    }
1304}
1305
1306impl<___T> ResolverClientHandler<___T> for ::fidl_next::IgnoreEvents
1307where
1308    ___T: ::fidl_next::Transport,
1309{
1310    async fn on_unknown_interaction(&mut self, _: u64) {}
1311}
1312
1313impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Resolver
1314where
1315    ___H: ResolverClientHandler<___T> + ::core::marker::Send,
1316    ___T: ::fidl_next::Transport,
1317{
1318    async fn on_event(
1319        handler: &mut ___H,
1320        ordinal: u64,
1321        flexibility: ::fidl_next::protocol::Flexibility,
1322        body: ::fidl_next::Body<___T>,
1323    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1324        match ordinal {
1325            ordinal => {
1326                handler.on_unknown_interaction(ordinal).await;
1327                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1328                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1329                } else {
1330                    Ok(())
1331                }
1332            }
1333        }
1334    }
1335}
1336
1337/// A server handler for the Resolver protocol.
1338///
1339/// See [`Resolver`] for more details.
1340pub trait ResolverServerHandler<
1341    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1342    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1343>
1344{
1345    #[doc = " Resolves a component with the given absolute URL.\n\n `component_url` is the unescaped URL of the component to resolve.\n\n If successful, returns information about the component\n that was resolved.\n\n On failure, returns a `ResolverError` error.\n"]
1346    fn resolve(
1347        &mut self,
1348
1349        request: ::fidl_next::Request<resolver::Resolve, ___T>,
1350
1351        responder: ::fidl_next::Responder<resolver::Resolve, ___T>,
1352    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1353
1354    #[doc = " Resolves a component with the absolute or relative URL. If relative, the\n component will be resolved relative to the supplied `context`.\n\n `component_url` is the unescaped URL of the component to resolve, the\n format of which can be either:\n\n   * a fully-qualified absolute component URL; or\n   * a subpackaged-component reference, prefixed by a URI relative\n     path to its containing subpackage (for example,\n     `child_package#meta/some_component.cm`)\n\n `context` is the `resolution_context` of a previously-resolved\n `Component`, providing the context for resoving a relative URL.\n"]
1355    fn resolve_with_context(
1356        &mut self,
1357
1358        request: ::fidl_next::Request<resolver::ResolveWithContext, ___T>,
1359
1360        responder: ::fidl_next::Responder<resolver::ResolveWithContext, ___T>,
1361    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1362
1363    fn on_unknown_interaction(
1364        &mut self,
1365        ordinal: u64,
1366    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1367        ::core::future::ready(())
1368    }
1369}
1370
1371impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Resolver
1372where
1373    ___H: ResolverServerHandler<___T> + ::core::marker::Send,
1374    ___T: ::fidl_next::Transport,
1375    for<'de> crate::wire::ResolverResolveRequest<'de>: ::fidl_next::Decode<
1376            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1377            Constraint = (),
1378        >,
1379    for<'de> crate::wire::ResolverResolveWithContextRequest<'de>: ::fidl_next::Decode<
1380            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1381            Constraint = (),
1382        >,
1383{
1384    async fn on_one_way(
1385        handler: &mut ___H,
1386        ordinal: u64,
1387        flexibility: ::fidl_next::protocol::Flexibility,
1388        body: ::fidl_next::Body<___T>,
1389    ) -> ::core::result::Result<
1390        (),
1391        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1392    > {
1393        match ordinal {
1394            ordinal => {
1395                handler.on_unknown_interaction(ordinal).await;
1396                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1397                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1398                } else {
1399                    Ok(())
1400                }
1401            }
1402        }
1403    }
1404
1405    async fn on_two_way(
1406        handler: &mut ___H,
1407        ordinal: u64,
1408        flexibility: ::fidl_next::protocol::Flexibility,
1409        body: ::fidl_next::Body<___T>,
1410        responder: ::fidl_next::protocol::Responder<___T>,
1411    ) -> ::core::result::Result<
1412        (),
1413        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1414    > {
1415        match ordinal {
1416            6339326548187935461 => {
1417                let responder = ::fidl_next::Responder::from_untyped(responder);
1418
1419                match ::fidl_next::AsDecoderExt::into_decoded(body) {
1420                    Ok(decoded) => {
1421                        handler
1422                            .resolve(::fidl_next::Request::from_decoded(decoded), responder)
1423                            .await;
1424                        Ok(())
1425                    }
1426                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1427                        ordinal: 6339326548187935461,
1428                        error,
1429                    }),
1430                }
1431            }
1432
1433            5576776708309151933 => {
1434                let responder = ::fidl_next::Responder::from_untyped(responder);
1435
1436                match ::fidl_next::AsDecoderExt::into_decoded(body) {
1437                    Ok(decoded) => {
1438                        handler
1439                            .resolve_with_context(
1440                                ::fidl_next::Request::from_decoded(decoded),
1441                                responder,
1442                            )
1443                            .await;
1444                        Ok(())
1445                    }
1446                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1447                        ordinal: 5576776708309151933,
1448                        error,
1449                    }),
1450                }
1451            }
1452
1453            ordinal => {
1454                handler.on_unknown_interaction(ordinal).await;
1455                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1456                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1457                } else {
1458                    responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
1459                                ordinal,
1460                                flexibility,
1461                                ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
1462                            )
1463                            .expect("encoding a framework error should never fail")
1464                            .await?;
1465                    Ok(())
1466                }
1467            }
1468        }
1469    }
1470}
1471
1472pub use fidl_next_common_fuchsia_component_resolution::*;