Skip to main content

fidl_next_fuchsia_hardware_display_engine/
fidl_next_fuchsia_hardware_display_engine.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_hardware_display_engine::natural::*;
8
9    #[derive(Debug, PartialEq)]
10    #[repr(C)]
11    pub struct EngineCompleteCoordinatorConnectionRequest {
12        pub engine_listener:
13            ::fidl_next::ClientEnd<crate::EngineListener, ::fdf_fidl::DriverChannel>,
14    }
15
16    unsafe impl<___E>
17        ::fidl_next::Encode<crate::wire::EngineCompleteCoordinatorConnectionRequest, ___E>
18        for EngineCompleteCoordinatorConnectionRequest
19    where
20        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21        ___E: ::fidl_next::fuchsia::HandleEncoder,
22    {
23        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
24            Self,
25            crate::wire::EngineCompleteCoordinatorConnectionRequest,
26        > = unsafe {
27            ::fidl_next::CopyOptimization::enable_if(
28            true
29
30                && <
31                    ::fidl_next::ClientEnd<crate::EngineListener, ::fdf_fidl::DriverChannel> as ::fidl_next::Encode<::fidl_next::ClientEnd<crate::EngineListener, ::fdf_fidl::wire::DriverChannel>, ___E>
32                >::COPY_OPTIMIZATION.is_enabled()
33
34        )
35        };
36
37        #[inline]
38        fn encode(
39            self,
40            encoder_: &mut ___E,
41            out_: &mut ::core::mem::MaybeUninit<
42                crate::wire::EngineCompleteCoordinatorConnectionRequest,
43            >,
44            _: (),
45        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
46            ::fidl_next::munge! {
47                let crate::wire::EngineCompleteCoordinatorConnectionRequest {
48                    engine_listener,
49
50                } = out_;
51            }
52
53            ::fidl_next::Encode::encode(self.engine_listener, encoder_, engine_listener, ())?;
54
55            let mut _field =
56                unsafe { ::fidl_next::Slot::new_unchecked(engine_listener.as_mut_ptr()) };
57
58            Ok(())
59        }
60    }
61
62    unsafe impl<___E>
63        ::fidl_next::EncodeOption<
64            ::fidl_next::wire::Box<
65                'static,
66                crate::wire::EngineCompleteCoordinatorConnectionRequest,
67            >,
68            ___E,
69        > for EngineCompleteCoordinatorConnectionRequest
70    where
71        ___E: ::fidl_next::Encoder + ?Sized,
72        EngineCompleteCoordinatorConnectionRequest:
73            ::fidl_next::Encode<crate::wire::EngineCompleteCoordinatorConnectionRequest, ___E>,
74    {
75        #[inline]
76        fn encode_option(
77            this: ::core::option::Option<Self>,
78            encoder: &mut ___E,
79            out: &mut ::core::mem::MaybeUninit<
80                ::fidl_next::wire::Box<
81                    'static,
82                    crate::wire::EngineCompleteCoordinatorConnectionRequest,
83                >,
84            >,
85            _: (),
86        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
87            if let Some(inner) = this {
88                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
89                ::fidl_next::wire::Box::encode_present(out);
90            } else {
91                ::fidl_next::wire::Box::encode_absent(out);
92            }
93
94            Ok(())
95        }
96    }
97
98    impl ::fidl_next::FromWire<crate::wire::EngineCompleteCoordinatorConnectionRequest>
99        for EngineCompleteCoordinatorConnectionRequest
100    {
101        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
102            crate::wire::EngineCompleteCoordinatorConnectionRequest,
103            Self,
104        > = unsafe {
105            ::fidl_next::CopyOptimization::enable_if(
106            true
107
108                && <
109                    ::fidl_next::ClientEnd<crate::EngineListener, ::fdf_fidl::DriverChannel> as ::fidl_next::FromWire<::fidl_next::ClientEnd<crate::EngineListener, ::fdf_fidl::wire::DriverChannel>>
110                >::COPY_OPTIMIZATION.is_enabled()
111
112        )
113        };
114
115        #[inline]
116        fn from_wire(wire: crate::wire::EngineCompleteCoordinatorConnectionRequest) -> Self {
117            Self { engine_listener: ::fidl_next::FromWire::from_wire(wire.engine_listener) }
118        }
119    }
120
121    #[derive(Debug, PartialEq)]
122    pub struct EngineImportBufferCollectionRequest {
123        pub buffer_collection_id: crate::natural::BufferCollectionId,
124
125        pub collection_token: ::fidl_next::ClientEnd<
126            ::fidl_next_fuchsia_sysmem2::BufferCollectionToken,
127            ::fidl_next::fuchsia::zx::Channel,
128        >,
129    }
130
131    unsafe impl<___E> ::fidl_next::Encode<crate::wire::EngineImportBufferCollectionRequest, ___E>
132        for EngineImportBufferCollectionRequest
133    where
134        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
135        ___E: ::fidl_next::fuchsia::HandleEncoder,
136    {
137        #[inline]
138        fn encode(
139            self,
140            encoder_: &mut ___E,
141            out_: &mut ::core::mem::MaybeUninit<crate::wire::EngineImportBufferCollectionRequest>,
142            _: (),
143        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
144            ::fidl_next::munge! {
145                let crate::wire::EngineImportBufferCollectionRequest {
146                    buffer_collection_id,
147                    collection_token,
148
149                } = out_;
150            }
151
152            ::fidl_next::Encode::encode(
153                self.buffer_collection_id,
154                encoder_,
155                buffer_collection_id,
156                (),
157            )?;
158
159            let mut _field =
160                unsafe { ::fidl_next::Slot::new_unchecked(buffer_collection_id.as_mut_ptr()) };
161
162            ::fidl_next::Encode::encode(self.collection_token, encoder_, collection_token, ())?;
163
164            let mut _field =
165                unsafe { ::fidl_next::Slot::new_unchecked(collection_token.as_mut_ptr()) };
166
167            Ok(())
168        }
169    }
170
171    unsafe impl<___E>
172        ::fidl_next::EncodeOption<
173            ::fidl_next::wire::Box<'static, crate::wire::EngineImportBufferCollectionRequest>,
174            ___E,
175        > for EngineImportBufferCollectionRequest
176    where
177        ___E: ::fidl_next::Encoder + ?Sized,
178        EngineImportBufferCollectionRequest:
179            ::fidl_next::Encode<crate::wire::EngineImportBufferCollectionRequest, ___E>,
180    {
181        #[inline]
182        fn encode_option(
183            this: ::core::option::Option<Self>,
184            encoder: &mut ___E,
185            out: &mut ::core::mem::MaybeUninit<
186                ::fidl_next::wire::Box<'static, crate::wire::EngineImportBufferCollectionRequest>,
187            >,
188            _: (),
189        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
190            if let Some(inner) = this {
191                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
192                ::fidl_next::wire::Box::encode_present(out);
193            } else {
194                ::fidl_next::wire::Box::encode_absent(out);
195            }
196
197            Ok(())
198        }
199    }
200
201    impl ::fidl_next::FromWire<crate::wire::EngineImportBufferCollectionRequest>
202        for EngineImportBufferCollectionRequest
203    {
204        #[inline]
205        fn from_wire(wire: crate::wire::EngineImportBufferCollectionRequest) -> Self {
206            Self {
207                buffer_collection_id: ::fidl_next::FromWire::from_wire(wire.buffer_collection_id),
208
209                collection_token: ::fidl_next::FromWire::from_wire(wire.collection_token),
210            }
211        }
212    }
213
214    #[doc = " Collects the information reported by the engine hardware about a display.\n\n The data representation closely matches the formats used by display engine\n hardware. The display coordinator is responsible for parsing these formats\n and converting the information into forms that are more suitable for\n higher-level software.\n"]
215    #[derive(Debug, Clone, PartialEq)]
216    pub struct RawDisplayInfo {
217        pub display_id: ::fidl_next_fuchsia_hardware_display_types::natural::DisplayId,
218
219        pub preferred_modes:
220            ::std::vec::Vec<::fidl_next_fuchsia_hardware_display_types::natural::Mode>,
221
222        pub edid_bytes: ::std::vec::Vec<u8>,
223
224        pub pixel_formats: ::std::vec::Vec<::fidl_next_fuchsia_images2::natural::PixelFormat>,
225    }
226
227    unsafe impl<___E> ::fidl_next::Encode<crate::wire::RawDisplayInfo<'static>, ___E> for RawDisplayInfo
228    where
229        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
230        ___E: ::fidl_next::Encoder,
231        ___E: ::fidl_next::fuchsia::HandleEncoder,
232    {
233        #[inline]
234        fn encode(
235            self,
236            encoder_: &mut ___E,
237            out_: &mut ::core::mem::MaybeUninit<crate::wire::RawDisplayInfo<'static>>,
238            _: (),
239        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
240            ::fidl_next::munge! {
241                let crate::wire::RawDisplayInfo {
242                    display_id,
243                    preferred_modes,
244                    edid_bytes,
245                    pixel_formats,
246
247                } = out_;
248            }
249
250            ::fidl_next::Encode::encode(self.display_id, encoder_, display_id, ())?;
251
252            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(display_id.as_mut_ptr()) };
253
254            ::fidl_next::Encode::encode(self.preferred_modes, encoder_, preferred_modes, (32, ()))?;
255
256            let mut _field =
257                unsafe { ::fidl_next::Slot::new_unchecked(preferred_modes.as_mut_ptr()) };
258            ::fidl_next::Constrained::validate(_field, (32, ()))?;
259
260            ::fidl_next::Encode::encode(self.edid_bytes, encoder_, edid_bytes, (32768, ()))?;
261
262            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(edid_bytes.as_mut_ptr()) };
263            ::fidl_next::Constrained::validate(_field, (32768, ()))?;
264
265            ::fidl_next::Encode::encode(self.pixel_formats, encoder_, pixel_formats, (64, ()))?;
266
267            let mut _field =
268                unsafe { ::fidl_next::Slot::new_unchecked(pixel_formats.as_mut_ptr()) };
269            ::fidl_next::Constrained::validate(_field, (64, ()))?;
270
271            Ok(())
272        }
273    }
274
275    unsafe impl<___E>
276        ::fidl_next::EncodeOption<
277            ::fidl_next::wire::Box<'static, crate::wire::RawDisplayInfo<'static>>,
278            ___E,
279        > for RawDisplayInfo
280    where
281        ___E: ::fidl_next::Encoder + ?Sized,
282        RawDisplayInfo: ::fidl_next::Encode<crate::wire::RawDisplayInfo<'static>, ___E>,
283    {
284        #[inline]
285        fn encode_option(
286            this: ::core::option::Option<Self>,
287            encoder: &mut ___E,
288            out: &mut ::core::mem::MaybeUninit<
289                ::fidl_next::wire::Box<'static, crate::wire::RawDisplayInfo<'static>>,
290            >,
291            _: (),
292        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
293            if let Some(inner) = this {
294                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
295                ::fidl_next::wire::Box::encode_present(out);
296            } else {
297                ::fidl_next::wire::Box::encode_absent(out);
298            }
299
300            Ok(())
301        }
302    }
303
304    impl<'de> ::fidl_next::FromWire<crate::wire::RawDisplayInfo<'de>> for RawDisplayInfo {
305        #[inline]
306        fn from_wire(wire: crate::wire::RawDisplayInfo<'de>) -> Self {
307            Self {
308                display_id: ::fidl_next::FromWire::from_wire(wire.display_id),
309
310                preferred_modes: ::fidl_next::FromWire::from_wire(wire.preferred_modes),
311
312                edid_bytes: ::fidl_next::FromWire::from_wire(wire.edid_bytes),
313
314                pixel_formats: ::fidl_next::FromWire::from_wire(wire.pixel_formats),
315            }
316        }
317    }
318
319    #[derive(Debug, Clone, PartialEq)]
320    pub struct EngineListenerOnDisplayAddedRequest {
321        pub display_info: crate::natural::RawDisplayInfo,
322    }
323
324    unsafe impl<___E>
325        ::fidl_next::Encode<crate::wire::EngineListenerOnDisplayAddedRequest<'static>, ___E>
326        for EngineListenerOnDisplayAddedRequest
327    where
328        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
329        ___E: ::fidl_next::Encoder,
330        ___E: ::fidl_next::fuchsia::HandleEncoder,
331    {
332        #[inline]
333        fn encode(
334            self,
335            encoder_: &mut ___E,
336            out_: &mut ::core::mem::MaybeUninit<
337                crate::wire::EngineListenerOnDisplayAddedRequest<'static>,
338            >,
339            _: (),
340        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
341            ::fidl_next::munge! {
342                let crate::wire::EngineListenerOnDisplayAddedRequest {
343                    display_info,
344
345                } = out_;
346            }
347
348            ::fidl_next::Encode::encode(self.display_info, encoder_, display_info, ())?;
349
350            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(display_info.as_mut_ptr()) };
351
352            Ok(())
353        }
354    }
355
356    unsafe impl<___E>
357        ::fidl_next::EncodeOption<
358            ::fidl_next::wire::Box<
359                'static,
360                crate::wire::EngineListenerOnDisplayAddedRequest<'static>,
361            >,
362            ___E,
363        > for EngineListenerOnDisplayAddedRequest
364    where
365        ___E: ::fidl_next::Encoder + ?Sized,
366        EngineListenerOnDisplayAddedRequest:
367            ::fidl_next::Encode<crate::wire::EngineListenerOnDisplayAddedRequest<'static>, ___E>,
368    {
369        #[inline]
370        fn encode_option(
371            this: ::core::option::Option<Self>,
372            encoder: &mut ___E,
373            out: &mut ::core::mem::MaybeUninit<
374                ::fidl_next::wire::Box<
375                    'static,
376                    crate::wire::EngineListenerOnDisplayAddedRequest<'static>,
377                >,
378            >,
379            _: (),
380        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
381            if let Some(inner) = this {
382                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
383                ::fidl_next::wire::Box::encode_present(out);
384            } else {
385                ::fidl_next::wire::Box::encode_absent(out);
386            }
387
388            Ok(())
389        }
390    }
391
392    impl<'de> ::fidl_next::FromWire<crate::wire::EngineListenerOnDisplayAddedRequest<'de>>
393        for EngineListenerOnDisplayAddedRequest
394    {
395        #[inline]
396        fn from_wire(wire: crate::wire::EngineListenerOnDisplayAddedRequest<'de>) -> Self {
397            Self { display_info: ::fidl_next::FromWire::from_wire(wire.display_info) }
398        }
399    }
400}
401
402pub mod wire {
403
404    pub use fidl_next_common_fuchsia_hardware_display_engine::wire::*;
405
406    /// The wire type corresponding to [`EngineCompleteCoordinatorConnectionRequest`].
407    #[derive(Debug)]
408    #[repr(C)]
409    pub struct EngineCompleteCoordinatorConnectionRequest {
410        pub engine_listener:
411            ::fidl_next::ClientEnd<crate::EngineListener, ::fdf_fidl::wire::DriverChannel>,
412    }
413
414    static_assertions::const_assert_eq!(
415        std::mem::size_of::<EngineCompleteCoordinatorConnectionRequest>(),
416        4
417    );
418    static_assertions::const_assert_eq!(
419        std::mem::align_of::<EngineCompleteCoordinatorConnectionRequest>(),
420        4
421    );
422
423    static_assertions::const_assert_eq!(
424        std::mem::offset_of!(EngineCompleteCoordinatorConnectionRequest, engine_listener),
425        0
426    );
427
428    impl ::fidl_next::Constrained for EngineCompleteCoordinatorConnectionRequest {
429        type Constraint = ();
430
431        fn validate(
432            _: ::fidl_next::Slot<'_, Self>,
433            _: Self::Constraint,
434        ) -> Result<(), ::fidl_next::ValidationError> {
435            Ok(())
436        }
437    }
438
439    unsafe impl ::fidl_next::Wire for EngineCompleteCoordinatorConnectionRequest {
440        type Narrowed<'de> = EngineCompleteCoordinatorConnectionRequest;
441
442        #[inline]
443        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
444            ::fidl_next::munge! {
445                let Self {
446                    engine_listener,
447
448                } = &mut *out_;
449            }
450
451            ::fidl_next::Wire::zero_padding(engine_listener);
452        }
453    }
454
455    unsafe impl<___D> ::fidl_next::Decode<___D> for EngineCompleteCoordinatorConnectionRequest
456    where
457        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
458        ___D: ::fidl_next::fuchsia::HandleDecoder,
459    {
460        fn decode(
461            slot_: ::fidl_next::Slot<'_, Self>,
462            decoder_: &mut ___D,
463            _: (),
464        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
465            ::fidl_next::munge! {
466                let Self {
467                    mut engine_listener,
468
469                } = slot_;
470            }
471
472            let _field = engine_listener.as_mut();
473
474            ::fidl_next::Decode::decode(engine_listener.as_mut(), decoder_, ())?;
475
476            Ok(())
477        }
478    }
479
480    impl ::fidl_next::IntoNatural for EngineCompleteCoordinatorConnectionRequest {
481        type Natural = crate::natural::EngineCompleteCoordinatorConnectionRequest;
482    }
483
484    /// The wire type corresponding to [`EngineImportBufferCollectionRequest`].
485    #[derive(Debug)]
486    #[repr(C)]
487    pub struct EngineImportBufferCollectionRequest {
488        pub buffer_collection_id: crate::wire::BufferCollectionId,
489
490        pub collection_token: ::fidl_next::ClientEnd<
491            ::fidl_next_fuchsia_sysmem2::BufferCollectionToken,
492            ::fidl_next::wire::fuchsia::Channel,
493        >,
494    }
495
496    static_assertions::const_assert_eq!(
497        std::mem::size_of::<EngineImportBufferCollectionRequest>(),
498        16
499    );
500    static_assertions::const_assert_eq!(
501        std::mem::align_of::<EngineImportBufferCollectionRequest>(),
502        8
503    );
504
505    static_assertions::const_assert_eq!(
506        std::mem::offset_of!(EngineImportBufferCollectionRequest, buffer_collection_id),
507        0
508    );
509
510    static_assertions::const_assert_eq!(
511        std::mem::offset_of!(EngineImportBufferCollectionRequest, collection_token),
512        8
513    );
514
515    impl ::fidl_next::Constrained for EngineImportBufferCollectionRequest {
516        type Constraint = ();
517
518        fn validate(
519            _: ::fidl_next::Slot<'_, Self>,
520            _: Self::Constraint,
521        ) -> Result<(), ::fidl_next::ValidationError> {
522            Ok(())
523        }
524    }
525
526    unsafe impl ::fidl_next::Wire for EngineImportBufferCollectionRequest {
527        type Narrowed<'de> = EngineImportBufferCollectionRequest;
528
529        #[inline]
530        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
531            ::fidl_next::munge! {
532                let Self {
533                    buffer_collection_id,
534                    collection_token,
535
536                } = &mut *out_;
537            }
538
539            ::fidl_next::Wire::zero_padding(buffer_collection_id);
540
541            ::fidl_next::Wire::zero_padding(collection_token);
542
543            unsafe {
544                out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
545            }
546        }
547    }
548
549    unsafe impl<___D> ::fidl_next::Decode<___D> for EngineImportBufferCollectionRequest
550    where
551        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
552        ___D: ::fidl_next::fuchsia::HandleDecoder,
553    {
554        fn decode(
555            slot_: ::fidl_next::Slot<'_, Self>,
556            decoder_: &mut ___D,
557            _: (),
558        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
559            if slot_.as_bytes()[12..16] != [0u8; 4] {
560                return Err(::fidl_next::DecodeError::InvalidPadding);
561            }
562
563            ::fidl_next::munge! {
564                let Self {
565                    mut buffer_collection_id,
566                    mut collection_token,
567
568                } = slot_;
569            }
570
571            let _field = buffer_collection_id.as_mut();
572
573            ::fidl_next::Decode::decode(buffer_collection_id.as_mut(), decoder_, ())?;
574
575            let _field = collection_token.as_mut();
576
577            ::fidl_next::Decode::decode(collection_token.as_mut(), decoder_, ())?;
578
579            Ok(())
580        }
581    }
582
583    impl ::fidl_next::IntoNatural for EngineImportBufferCollectionRequest {
584        type Natural = crate::natural::EngineImportBufferCollectionRequest;
585    }
586
587    /// The wire type corresponding to [`RawDisplayInfo`].
588    #[derive(Debug)]
589    #[repr(C)]
590    pub struct RawDisplayInfo<'de> {
591        pub display_id: ::fidl_next_fuchsia_hardware_display_types::wire::DisplayId,
592
593        pub preferred_modes:
594            ::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_hardware_display_types::wire::Mode>,
595
596        pub edid_bytes: ::fidl_next::wire::Vector<'de, u8>,
597
598        pub pixel_formats:
599            ::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_images2::wire::PixelFormat>,
600    }
601
602    static_assertions::const_assert_eq!(std::mem::size_of::<RawDisplayInfo<'_>>(), 56);
603    static_assertions::const_assert_eq!(std::mem::align_of::<RawDisplayInfo<'_>>(), 8);
604
605    static_assertions::const_assert_eq!(std::mem::offset_of!(RawDisplayInfo<'_>, display_id), 0);
606
607    static_assertions::const_assert_eq!(
608        std::mem::offset_of!(RawDisplayInfo<'_>, preferred_modes),
609        8
610    );
611
612    static_assertions::const_assert_eq!(std::mem::offset_of!(RawDisplayInfo<'_>, edid_bytes), 24);
613
614    static_assertions::const_assert_eq!(
615        std::mem::offset_of!(RawDisplayInfo<'_>, pixel_formats),
616        40
617    );
618
619    impl ::fidl_next::Constrained for RawDisplayInfo<'_> {
620        type Constraint = ();
621
622        fn validate(
623            _: ::fidl_next::Slot<'_, Self>,
624            _: Self::Constraint,
625        ) -> Result<(), ::fidl_next::ValidationError> {
626            Ok(())
627        }
628    }
629
630    unsafe impl ::fidl_next::Wire for RawDisplayInfo<'static> {
631        type Narrowed<'de> = RawDisplayInfo<'de>;
632
633        #[inline]
634        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
635            ::fidl_next::munge! {
636                let Self {
637                    display_id,
638                    preferred_modes,
639                    edid_bytes,
640                    pixel_formats,
641
642                } = &mut *out_;
643            }
644
645            ::fidl_next::Wire::zero_padding(display_id);
646
647            ::fidl_next::Wire::zero_padding(preferred_modes);
648
649            ::fidl_next::Wire::zero_padding(edid_bytes);
650
651            ::fidl_next::Wire::zero_padding(pixel_formats);
652        }
653    }
654
655    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RawDisplayInfo<'de>
656    where
657        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
658        ___D: ::fidl_next::Decoder<'de>,
659        ___D: ::fidl_next::fuchsia::HandleDecoder,
660    {
661        fn decode(
662            slot_: ::fidl_next::Slot<'_, Self>,
663            decoder_: &mut ___D,
664            _: (),
665        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
666            ::fidl_next::munge! {
667                let Self {
668                    mut display_id,
669                    mut preferred_modes,
670                    mut edid_bytes,
671                    mut pixel_formats,
672
673                } = slot_;
674            }
675
676            let _field = display_id.as_mut();
677
678            ::fidl_next::Decode::decode(display_id.as_mut(), decoder_, ())?;
679
680            let _field = preferred_modes.as_mut();
681            ::fidl_next::Constrained::validate(_field, (32, ()))?;
682            ::fidl_next::Decode::decode(preferred_modes.as_mut(), decoder_, (32, ()))?;
683
684            let preferred_modes = unsafe { preferred_modes.deref_unchecked() };
685
686            if preferred_modes.len() > 32 {
687                return Err(::fidl_next::DecodeError::VectorTooLong {
688                    size: preferred_modes.len() as u64,
689                    limit: 32,
690                });
691            }
692
693            let _field = edid_bytes.as_mut();
694            ::fidl_next::Constrained::validate(_field, (32768, ()))?;
695            ::fidl_next::Decode::decode(edid_bytes.as_mut(), decoder_, (32768, ()))?;
696
697            let edid_bytes = unsafe { edid_bytes.deref_unchecked() };
698
699            if edid_bytes.len() > 32768 {
700                return Err(::fidl_next::DecodeError::VectorTooLong {
701                    size: edid_bytes.len() as u64,
702                    limit: 32768,
703                });
704            }
705
706            let _field = pixel_formats.as_mut();
707            ::fidl_next::Constrained::validate(_field, (64, ()))?;
708            ::fidl_next::Decode::decode(pixel_formats.as_mut(), decoder_, (64, ()))?;
709
710            let pixel_formats = unsafe { pixel_formats.deref_unchecked() };
711
712            if pixel_formats.len() > 64 {
713                return Err(::fidl_next::DecodeError::VectorTooLong {
714                    size: pixel_formats.len() as u64,
715                    limit: 64,
716                });
717            }
718
719            Ok(())
720        }
721    }
722
723    impl<'de> ::fidl_next::IntoNatural for RawDisplayInfo<'de> {
724        type Natural = crate::natural::RawDisplayInfo;
725    }
726
727    /// The wire type corresponding to [`EngineListenerOnDisplayAddedRequest`].
728    #[derive(Debug)]
729    #[repr(C)]
730    pub struct EngineListenerOnDisplayAddedRequest<'de> {
731        pub display_info: crate::wire::RawDisplayInfo<'de>,
732    }
733
734    static_assertions::const_assert_eq!(
735        std::mem::size_of::<EngineListenerOnDisplayAddedRequest<'_>>(),
736        56
737    );
738    static_assertions::const_assert_eq!(
739        std::mem::align_of::<EngineListenerOnDisplayAddedRequest<'_>>(),
740        8
741    );
742
743    static_assertions::const_assert_eq!(
744        std::mem::offset_of!(EngineListenerOnDisplayAddedRequest<'_>, display_info),
745        0
746    );
747
748    impl ::fidl_next::Constrained for EngineListenerOnDisplayAddedRequest<'_> {
749        type Constraint = ();
750
751        fn validate(
752            _: ::fidl_next::Slot<'_, Self>,
753            _: Self::Constraint,
754        ) -> Result<(), ::fidl_next::ValidationError> {
755            Ok(())
756        }
757    }
758
759    unsafe impl ::fidl_next::Wire for EngineListenerOnDisplayAddedRequest<'static> {
760        type Narrowed<'de> = EngineListenerOnDisplayAddedRequest<'de>;
761
762        #[inline]
763        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
764            ::fidl_next::munge! {
765                let Self {
766                    display_info,
767
768                } = &mut *out_;
769            }
770
771            ::fidl_next::Wire::zero_padding(display_info);
772        }
773    }
774
775    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for EngineListenerOnDisplayAddedRequest<'de>
776    where
777        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
778        ___D: ::fidl_next::Decoder<'de>,
779        ___D: ::fidl_next::fuchsia::HandleDecoder,
780    {
781        fn decode(
782            slot_: ::fidl_next::Slot<'_, Self>,
783            decoder_: &mut ___D,
784            _: (),
785        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
786            ::fidl_next::munge! {
787                let Self {
788                    mut display_info,
789
790                } = slot_;
791            }
792
793            let _field = display_info.as_mut();
794
795            ::fidl_next::Decode::decode(display_info.as_mut(), decoder_, ())?;
796
797            Ok(())
798        }
799    }
800
801    impl<'de> ::fidl_next::IntoNatural for EngineListenerOnDisplayAddedRequest<'de> {
802        type Natural = crate::natural::EngineListenerOnDisplayAddedRequest;
803    }
804}
805
806pub mod wire_optional {
807
808    pub use fidl_next_common_fuchsia_hardware_display_engine::wire_optional::*;
809}
810
811pub mod generic {
812
813    pub use fidl_next_common_fuchsia_hardware_display_engine::generic::*;
814
815    /// The generic type corresponding to [`EngineCompleteCoordinatorConnectionRequest`].
816    pub struct EngineCompleteCoordinatorConnectionRequest<T0> {
817        pub engine_listener: T0,
818    }
819
820    unsafe impl<___E, T0>
821        ::fidl_next::Encode<crate::wire::EngineCompleteCoordinatorConnectionRequest, ___E>
822        for EngineCompleteCoordinatorConnectionRequest<T0>
823    where
824        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
825        ___E: ::fidl_next::fuchsia::HandleEncoder,
826        T0: ::fidl_next::Encode<
827                ::fidl_next::ClientEnd<crate::EngineListener, ::fdf_fidl::wire::DriverChannel>,
828                ___E,
829            >,
830    {
831        #[inline]
832        fn encode(
833            self,
834            encoder_: &mut ___E,
835            out_: &mut ::core::mem::MaybeUninit<
836                crate::wire::EngineCompleteCoordinatorConnectionRequest,
837            >,
838            _: (),
839        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
840            ::fidl_next::munge! {
841                let crate::wire::EngineCompleteCoordinatorConnectionRequest {
842                    engine_listener,
843
844                } = out_;
845            }
846
847            ::fidl_next::Encode::encode(self.engine_listener, encoder_, engine_listener, ())?;
848
849            Ok(())
850        }
851    }
852
853    /// The generic type corresponding to [`EngineImportBufferCollectionRequest`].
854    pub struct EngineImportBufferCollectionRequest<T0, T1> {
855        pub buffer_collection_id: T0,
856
857        pub collection_token: T1,
858    }
859
860    unsafe impl<___E, T0, T1>
861        ::fidl_next::Encode<crate::wire::EngineImportBufferCollectionRequest, ___E>
862        for EngineImportBufferCollectionRequest<T0, T1>
863    where
864        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
865        ___E: ::fidl_next::fuchsia::HandleEncoder,
866        T0: ::fidl_next::Encode<crate::wire::BufferCollectionId, ___E>,
867        T1: ::fidl_next::Encode<
868                ::fidl_next::ClientEnd<
869                    ::fidl_next_fuchsia_sysmem2::BufferCollectionToken,
870                    ::fidl_next::wire::fuchsia::Channel,
871                >,
872                ___E,
873            >,
874    {
875        #[inline]
876        fn encode(
877            self,
878            encoder_: &mut ___E,
879            out_: &mut ::core::mem::MaybeUninit<crate::wire::EngineImportBufferCollectionRequest>,
880            _: (),
881        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
882            ::fidl_next::munge! {
883                let crate::wire::EngineImportBufferCollectionRequest {
884                    buffer_collection_id,
885                    collection_token,
886
887                } = out_;
888            }
889
890            ::fidl_next::Encode::encode(
891                self.buffer_collection_id,
892                encoder_,
893                buffer_collection_id,
894                (),
895            )?;
896
897            ::fidl_next::Encode::encode(self.collection_token, encoder_, collection_token, ())?;
898
899            Ok(())
900        }
901    }
902
903    /// The generic type corresponding to [`RawDisplayInfo`].
904    pub struct RawDisplayInfo<T0, T1, T2, T3> {
905        pub display_id: T0,
906
907        pub preferred_modes: T1,
908
909        pub edid_bytes: T2,
910
911        pub pixel_formats: T3,
912    }
913
914    unsafe impl<___E, T0, T1, T2, T3>
915        ::fidl_next::Encode<crate::wire::RawDisplayInfo<'static>, ___E>
916        for RawDisplayInfo<T0, T1, T2, T3>
917    where
918        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
919        ___E: ::fidl_next::Encoder,
920        ___E: ::fidl_next::fuchsia::HandleEncoder,
921        T0: ::fidl_next::Encode<::fidl_next_fuchsia_hardware_display_types::wire::DisplayId, ___E>,
922        T1: ::fidl_next::Encode<
923                ::fidl_next::wire::Vector<
924                    'static,
925                    ::fidl_next_fuchsia_hardware_display_types::wire::Mode,
926                >,
927                ___E,
928            >,
929        T2: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
930        T3: ::fidl_next::Encode<
931                ::fidl_next::wire::Vector<'static, ::fidl_next_fuchsia_images2::wire::PixelFormat>,
932                ___E,
933            >,
934    {
935        #[inline]
936        fn encode(
937            self,
938            encoder_: &mut ___E,
939            out_: &mut ::core::mem::MaybeUninit<crate::wire::RawDisplayInfo<'static>>,
940            _: (),
941        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
942            ::fidl_next::munge! {
943                let crate::wire::RawDisplayInfo {
944                    display_id,
945                    preferred_modes,
946                    edid_bytes,
947                    pixel_formats,
948
949                } = out_;
950            }
951
952            ::fidl_next::Encode::encode(self.display_id, encoder_, display_id, ())?;
953
954            ::fidl_next::Encode::encode(self.preferred_modes, encoder_, preferred_modes, (32, ()))?;
955
956            ::fidl_next::Encode::encode(self.edid_bytes, encoder_, edid_bytes, (32768, ()))?;
957
958            ::fidl_next::Encode::encode(self.pixel_formats, encoder_, pixel_formats, (64, ()))?;
959
960            Ok(())
961        }
962    }
963
964    /// The generic type corresponding to [`EngineListenerOnDisplayAddedRequest`].
965    pub struct EngineListenerOnDisplayAddedRequest<T0> {
966        pub display_info: T0,
967    }
968
969    unsafe impl<___E, T0>
970        ::fidl_next::Encode<crate::wire::EngineListenerOnDisplayAddedRequest<'static>, ___E>
971        for EngineListenerOnDisplayAddedRequest<T0>
972    where
973        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
974        ___E: ::fidl_next::Encoder,
975        ___E: ::fidl_next::fuchsia::HandleEncoder,
976        T0: ::fidl_next::Encode<crate::wire::RawDisplayInfo<'static>, ___E>,
977    {
978        #[inline]
979        fn encode(
980            self,
981            encoder_: &mut ___E,
982            out_: &mut ::core::mem::MaybeUninit<
983                crate::wire::EngineListenerOnDisplayAddedRequest<'static>,
984            >,
985            _: (),
986        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
987            ::fidl_next::munge! {
988                let crate::wire::EngineListenerOnDisplayAddedRequest {
989                    display_info,
990
991                } = out_;
992            }
993
994            ::fidl_next::Encode::encode(self.display_info, encoder_, display_info, ())?;
995
996            Ok(())
997        }
998    }
999}
1000
1001pub use self::natural::*;
1002
1003/// The type corresponding to the Engine protocol.
1004#[doc = " This protocol is `open` while under development.\n TODO(b/316631158): We should make it `closed` once the API is stabilized.\n"]
1005#[derive(PartialEq, Debug)]
1006pub struct Engine;
1007
1008impl ::fidl_next::Discoverable for Engine {
1009    const PROTOCOL_NAME: &'static str = "fuchsia.hardware.display.engine.Engine";
1010}
1011
1012#[cfg(feature = "driver")]
1013impl ::fidl_next::HasTransport for Engine {
1014    type Transport = ::fdf_fidl::DriverChannel;
1015}
1016
1017pub mod engine {
1018    pub mod prelude {
1019        pub use crate::{
1020            Engine, EngineClientHandler, EngineLocalClientHandler, EngineLocalServerHandler,
1021            EngineServerHandler, engine,
1022        };
1023
1024        pub use crate::natural::EngineCheckConfigurationRequest;
1025
1026        pub use crate::natural::EngineCompleteCoordinatorConnectionRequest;
1027
1028        pub use crate::natural::EngineImportBufferCollectionRequest;
1029
1030        pub use crate::natural::EngineImportImageForCaptureRequest;
1031
1032        pub use crate::natural::EngineImportImageRequest;
1033
1034        pub use crate::natural::EngineReleaseBufferCollectionRequest;
1035
1036        pub use crate::natural::EngineReleaseCaptureRequest;
1037
1038        pub use crate::natural::EngineReleaseImageRequest;
1039
1040        pub use crate::natural::EngineSetBufferCollectionConstraintsRequest;
1041
1042        pub use crate::natural::EngineSetDisplayPowerModeRequest;
1043
1044        pub use crate::natural::EngineSetMinimumRgbRequest;
1045
1046        pub use crate::natural::EngineStartCaptureRequest;
1047
1048        pub use crate::natural::EngineSubmitConfigurationRequest;
1049
1050        pub use crate::natural::EngineCheckConfigurationResponse;
1051
1052        pub use crate::natural::EngineCompleteCoordinatorConnectionResponse;
1053
1054        pub use crate::natural::EngineImportBufferCollectionResponse;
1055
1056        pub use crate::natural::EngineImportImageForCaptureResponse;
1057
1058        pub use crate::natural::EngineImportImageResponse;
1059
1060        pub use crate::natural::EngineReleaseBufferCollectionResponse;
1061
1062        pub use crate::natural::EngineReleaseCaptureResponse;
1063
1064        pub use crate::natural::EngineSetBufferCollectionConstraintsResponse;
1065
1066        pub use crate::natural::EngineSetDisplayPowerModeResponse;
1067
1068        pub use crate::natural::EngineSetMinimumRgbResponse;
1069
1070        pub use crate::natural::EngineStartCaptureResponse;
1071
1072        pub use crate::natural::EngineSubmitConfigurationResponse;
1073
1074        pub use ::fidl_next_fuchsia_hardware_display_types::natural::ConfigResult;
1075    }
1076
1077    pub struct CompleteCoordinatorConnection;
1078
1079    impl ::fidl_next::Method for CompleteCoordinatorConnection {
1080        const ORDINAL: u64 = 4719180934271355554;
1081        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1082            ::fidl_next::protocol::Flexibility::Flexible;
1083
1084        type Protocol = crate::Engine;
1085
1086        type Request = crate::wire::EngineCompleteCoordinatorConnectionRequest;
1087    }
1088
1089    impl ::fidl_next::TwoWayMethod for CompleteCoordinatorConnection {
1090        type Response = ::fidl_next::wire::Flexible<
1091            'static,
1092            crate::wire::EngineCompleteCoordinatorConnectionResponse,
1093        >;
1094    }
1095
1096    impl<___R> ::fidl_next::Respond<___R> for CompleteCoordinatorConnection {
1097        type Output = ::fidl_next::Flexible<
1098            crate::generic::EngineCompleteCoordinatorConnectionResponse<___R>,
1099        >;
1100
1101        fn respond(response: ___R) -> Self::Output {
1102            ::fidl_next::Flexible(crate::generic::EngineCompleteCoordinatorConnectionResponse {
1103                engine_info: response,
1104            })
1105        }
1106    }
1107
1108    pub struct UnsetListener;
1109
1110    impl ::fidl_next::Method for UnsetListener {
1111        const ORDINAL: u64 = 4508514133213543013;
1112        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1113            ::fidl_next::protocol::Flexibility::Flexible;
1114
1115        type Protocol = crate::Engine;
1116
1117        type Request = ::fidl_next::wire::EmptyMessageBody;
1118    }
1119
1120    pub struct ImportBufferCollection;
1121
1122    impl ::fidl_next::Method for ImportBufferCollection {
1123        const ORDINAL: u64 = 8961031870138211399;
1124        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1125            ::fidl_next::protocol::Flexibility::Flexible;
1126
1127        type Protocol = crate::Engine;
1128
1129        type Request = crate::wire::EngineImportBufferCollectionRequest;
1130    }
1131
1132    impl ::fidl_next::TwoWayMethod for ImportBufferCollection {
1133        type Response = ::fidl_next::wire::Result<
1134            'static,
1135            crate::wire::EngineImportBufferCollectionResponse,
1136            ::fidl_next::wire::fuchsia::Status,
1137        >;
1138    }
1139
1140    impl<___R> ::fidl_next::Respond<___R> for ImportBufferCollection {
1141        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1142
1143        fn respond(response: ___R) -> Self::Output {
1144            ::core::result::Result::Ok(response)
1145        }
1146    }
1147
1148    impl<___R> ::fidl_next::RespondErr<___R> for ImportBufferCollection {
1149        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1150
1151        fn respond_err(response: ___R) -> Self::Output {
1152            ::core::result::Result::Err(response)
1153        }
1154    }
1155
1156    pub struct ReleaseBufferCollection;
1157
1158    impl ::fidl_next::Method for ReleaseBufferCollection {
1159        const ORDINAL: u64 = 2508731447035556384;
1160        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1161            ::fidl_next::protocol::Flexibility::Flexible;
1162
1163        type Protocol = crate::Engine;
1164
1165        type Request = crate::wire::EngineReleaseBufferCollectionRequest;
1166    }
1167
1168    impl ::fidl_next::TwoWayMethod for ReleaseBufferCollection {
1169        type Response = ::fidl_next::wire::Result<
1170            'static,
1171            crate::wire::EngineReleaseBufferCollectionResponse,
1172            ::fidl_next::wire::fuchsia::Status,
1173        >;
1174    }
1175
1176    impl<___R> ::fidl_next::Respond<___R> for ReleaseBufferCollection {
1177        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1178
1179        fn respond(response: ___R) -> Self::Output {
1180            ::core::result::Result::Ok(response)
1181        }
1182    }
1183
1184    impl<___R> ::fidl_next::RespondErr<___R> for ReleaseBufferCollection {
1185        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1186
1187        fn respond_err(response: ___R) -> Self::Output {
1188            ::core::result::Result::Err(response)
1189        }
1190    }
1191
1192    pub struct ImportImage;
1193
1194    impl ::fidl_next::Method for ImportImage {
1195        const ORDINAL: u64 = 1516259966324606179;
1196        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1197            ::fidl_next::protocol::Flexibility::Flexible;
1198
1199        type Protocol = crate::Engine;
1200
1201        type Request = crate::wire::EngineImportImageRequest;
1202    }
1203
1204    impl ::fidl_next::TwoWayMethod for ImportImage {
1205        type Response = ::fidl_next::wire::Result<
1206            'static,
1207            crate::wire::EngineImportImageResponse,
1208            ::fidl_next::wire::fuchsia::Status,
1209        >;
1210    }
1211
1212    impl<___R> ::fidl_next::Respond<___R> for ImportImage {
1213        type Output = ::core::result::Result<
1214            crate::generic::EngineImportImageResponse<___R>,
1215            ::fidl_next::never::Never,
1216        >;
1217
1218        fn respond(response: ___R) -> Self::Output {
1219            ::core::result::Result::Ok(crate::generic::EngineImportImageResponse {
1220                image_id: response,
1221            })
1222        }
1223    }
1224
1225    impl<___R> ::fidl_next::RespondErr<___R> for ImportImage {
1226        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1227
1228        fn respond_err(response: ___R) -> Self::Output {
1229            ::core::result::Result::Err(response)
1230        }
1231    }
1232
1233    pub struct ImportImageForCapture;
1234
1235    impl ::fidl_next::Method for ImportImageForCapture {
1236        const ORDINAL: u64 = 3283558293035659501;
1237        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1238            ::fidl_next::protocol::Flexibility::Flexible;
1239
1240        type Protocol = crate::Engine;
1241
1242        type Request = crate::wire::EngineImportImageForCaptureRequest;
1243    }
1244
1245    impl ::fidl_next::TwoWayMethod for ImportImageForCapture {
1246        type Response = ::fidl_next::wire::Result<
1247            'static,
1248            crate::wire::EngineImportImageForCaptureResponse,
1249            ::fidl_next::wire::fuchsia::Status,
1250        >;
1251    }
1252
1253    impl<___R> ::fidl_next::Respond<___R> for ImportImageForCapture {
1254        type Output = ::core::result::Result<
1255            crate::generic::EngineImportImageForCaptureResponse<___R>,
1256            ::fidl_next::never::Never,
1257        >;
1258
1259        fn respond(response: ___R) -> Self::Output {
1260            ::core::result::Result::Ok(crate::generic::EngineImportImageForCaptureResponse {
1261                capture_image_id: response,
1262            })
1263        }
1264    }
1265
1266    impl<___R> ::fidl_next::RespondErr<___R> for ImportImageForCapture {
1267        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1268
1269        fn respond_err(response: ___R) -> Self::Output {
1270            ::core::result::Result::Err(response)
1271        }
1272    }
1273
1274    pub struct ReleaseImage;
1275
1276    impl ::fidl_next::Method for ReleaseImage {
1277        const ORDINAL: u64 = 6459043979932149875;
1278        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1279            ::fidl_next::protocol::Flexibility::Flexible;
1280
1281        type Protocol = crate::Engine;
1282
1283        type Request = crate::wire::EngineReleaseImageRequest;
1284    }
1285
1286    pub struct CheckConfiguration;
1287
1288    impl ::fidl_next::Method for CheckConfiguration {
1289        const ORDINAL: u64 = 4576283536204609126;
1290        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1291            ::fidl_next::protocol::Flexibility::Flexible;
1292
1293        type Protocol = crate::Engine;
1294
1295        type Request = crate::wire::EngineCheckConfigurationRequest<'static>;
1296    }
1297
1298    impl ::fidl_next::TwoWayMethod for CheckConfiguration {
1299        type Response = ::fidl_next::wire::Result<
1300            'static,
1301            crate::wire::EngineCheckConfigurationResponse,
1302            ::fidl_next_fuchsia_hardware_display_types::wire::ConfigResult,
1303        >;
1304    }
1305
1306    impl<___R> ::fidl_next::Respond<___R> for CheckConfiguration {
1307        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1308
1309        fn respond(response: ___R) -> Self::Output {
1310            ::core::result::Result::Ok(response)
1311        }
1312    }
1313
1314    impl<___R> ::fidl_next::RespondErr<___R> for CheckConfiguration {
1315        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1316
1317        fn respond_err(response: ___R) -> Self::Output {
1318            ::core::result::Result::Err(response)
1319        }
1320    }
1321
1322    pub struct SubmitConfiguration;
1323
1324    impl ::fidl_next::Method for SubmitConfiguration {
1325        const ORDINAL: u64 = 9026752285186828733;
1326        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1327            ::fidl_next::protocol::Flexibility::Flexible;
1328
1329        type Protocol = crate::Engine;
1330
1331        type Request = crate::wire::EngineSubmitConfigurationRequest<'static>;
1332    }
1333
1334    impl ::fidl_next::TwoWayMethod for SubmitConfiguration {
1335        type Response =
1336            ::fidl_next::wire::Flexible<'static, crate::wire::EngineSubmitConfigurationResponse>;
1337    }
1338
1339    impl<___R> ::fidl_next::Respond<___R> for SubmitConfiguration {
1340        type Output = ::fidl_next::Flexible<___R>;
1341
1342        fn respond(response: ___R) -> Self::Output {
1343            ::fidl_next::Flexible(response)
1344        }
1345    }
1346
1347    pub struct SetBufferCollectionConstraints;
1348
1349    impl ::fidl_next::Method for SetBufferCollectionConstraints {
1350        const ORDINAL: u64 = 7576937804079032425;
1351        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1352            ::fidl_next::protocol::Flexibility::Flexible;
1353
1354        type Protocol = crate::Engine;
1355
1356        type Request = crate::wire::EngineSetBufferCollectionConstraintsRequest;
1357    }
1358
1359    impl ::fidl_next::TwoWayMethod for SetBufferCollectionConstraints {
1360        type Response = ::fidl_next::wire::Result<
1361            'static,
1362            crate::wire::EngineSetBufferCollectionConstraintsResponse,
1363            ::fidl_next::wire::fuchsia::Status,
1364        >;
1365    }
1366
1367    impl<___R> ::fidl_next::Respond<___R> for SetBufferCollectionConstraints {
1368        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1369
1370        fn respond(response: ___R) -> Self::Output {
1371            ::core::result::Result::Ok(response)
1372        }
1373    }
1374
1375    impl<___R> ::fidl_next::RespondErr<___R> for SetBufferCollectionConstraints {
1376        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1377
1378        fn respond_err(response: ___R) -> Self::Output {
1379            ::core::result::Result::Err(response)
1380        }
1381    }
1382
1383    pub struct SetDisplayPowerMode;
1384
1385    impl ::fidl_next::Method for SetDisplayPowerMode {
1386        const ORDINAL: u64 = 5705800673802517194;
1387        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1388            ::fidl_next::protocol::Flexibility::Flexible;
1389
1390        type Protocol = crate::Engine;
1391
1392        type Request = crate::wire::EngineSetDisplayPowerModeRequest;
1393    }
1394
1395    impl ::fidl_next::TwoWayMethod for SetDisplayPowerMode {
1396        type Response = ::fidl_next::wire::Result<
1397            'static,
1398            crate::wire::EngineSetDisplayPowerModeResponse,
1399            ::fidl_next::wire::fuchsia::Status,
1400        >;
1401    }
1402
1403    impl<___R> ::fidl_next::Respond<___R> for SetDisplayPowerMode {
1404        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1405
1406        fn respond(response: ___R) -> Self::Output {
1407            ::core::result::Result::Ok(response)
1408        }
1409    }
1410
1411    impl<___R> ::fidl_next::RespondErr<___R> for SetDisplayPowerMode {
1412        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1413
1414        fn respond_err(response: ___R) -> Self::Output {
1415            ::core::result::Result::Err(response)
1416        }
1417    }
1418
1419    pub struct SetMinimumRgb;
1420
1421    impl ::fidl_next::Method for SetMinimumRgb {
1422        const ORDINAL: u64 = 467617817871655038;
1423        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1424            ::fidl_next::protocol::Flexibility::Flexible;
1425
1426        type Protocol = crate::Engine;
1427
1428        type Request = crate::wire::EngineSetMinimumRgbRequest;
1429    }
1430
1431    impl ::fidl_next::TwoWayMethod for SetMinimumRgb {
1432        type Response = ::fidl_next::wire::Result<
1433            'static,
1434            crate::wire::EngineSetMinimumRgbResponse,
1435            ::fidl_next::wire::fuchsia::Status,
1436        >;
1437    }
1438
1439    impl<___R> ::fidl_next::Respond<___R> for SetMinimumRgb {
1440        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1441
1442        fn respond(response: ___R) -> Self::Output {
1443            ::core::result::Result::Ok(response)
1444        }
1445    }
1446
1447    impl<___R> ::fidl_next::RespondErr<___R> for SetMinimumRgb {
1448        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1449
1450        fn respond_err(response: ___R) -> Self::Output {
1451            ::core::result::Result::Err(response)
1452        }
1453    }
1454
1455    pub struct StartCapture;
1456
1457    impl ::fidl_next::Method for StartCapture {
1458        const ORDINAL: u64 = 5123505813133388436;
1459        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1460            ::fidl_next::protocol::Flexibility::Flexible;
1461
1462        type Protocol = crate::Engine;
1463
1464        type Request = crate::wire::EngineStartCaptureRequest;
1465    }
1466
1467    impl ::fidl_next::TwoWayMethod for StartCapture {
1468        type Response = ::fidl_next::wire::Result<
1469            'static,
1470            crate::wire::EngineStartCaptureResponse,
1471            ::fidl_next::wire::fuchsia::Status,
1472        >;
1473    }
1474
1475    impl<___R> ::fidl_next::Respond<___R> for StartCapture {
1476        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1477
1478        fn respond(response: ___R) -> Self::Output {
1479            ::core::result::Result::Ok(response)
1480        }
1481    }
1482
1483    impl<___R> ::fidl_next::RespondErr<___R> for StartCapture {
1484        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1485
1486        fn respond_err(response: ___R) -> Self::Output {
1487            ::core::result::Result::Err(response)
1488        }
1489    }
1490
1491    pub struct ReleaseCapture;
1492
1493    impl ::fidl_next::Method for ReleaseCapture {
1494        const ORDINAL: u64 = 3688105504043873248;
1495        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1496            ::fidl_next::protocol::Flexibility::Flexible;
1497
1498        type Protocol = crate::Engine;
1499
1500        type Request = crate::wire::EngineReleaseCaptureRequest;
1501    }
1502
1503    impl ::fidl_next::TwoWayMethod for ReleaseCapture {
1504        type Response = ::fidl_next::wire::Result<
1505            'static,
1506            crate::wire::EngineReleaseCaptureResponse,
1507            ::fidl_next::wire::fuchsia::Status,
1508        >;
1509    }
1510
1511    impl<___R> ::fidl_next::Respond<___R> for ReleaseCapture {
1512        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1513
1514        fn respond(response: ___R) -> Self::Output {
1515            ::core::result::Result::Ok(response)
1516        }
1517    }
1518
1519    impl<___R> ::fidl_next::RespondErr<___R> for ReleaseCapture {
1520        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1521
1522        fn respond_err(response: ___R) -> Self::Output {
1523            ::core::result::Result::Err(response)
1524        }
1525    }
1526
1527    mod ___detail {
1528        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Engine
1529        where
1530            ___T: ::fidl_next::Transport,
1531        {
1532            type Client = EngineClient<___T>;
1533            type Server = EngineServer<___T>;
1534        }
1535
1536        /// The client for the `Engine` protocol.
1537        #[repr(transparent)]
1538        pub struct EngineClient<___T: ::fidl_next::Transport> {
1539            #[allow(dead_code)]
1540            client: ::fidl_next::protocol::Client<___T>,
1541        }
1542
1543        impl<___T> EngineClient<___T>
1544        where
1545            ___T: ::fidl_next::Transport,
1546        {
1547            #[doc = " Starts the information flow from the engine driver to the Coordinator.\n\n Must be called exactly once, before all the other calls below.\n"]
1548            pub fn complete_coordinator_connection(
1549                &self,
1550
1551                engine_listener: impl ::fidl_next::Encode<
1552                    ::fidl_next::ClientEnd<crate::EngineListener, ::fdf_fidl::wire::DriverChannel>,
1553                    <___T as ::fidl_next::Transport>::SendBuffer,
1554                >,
1555            ) -> ::fidl_next::TwoWayFuture<'_, super::CompleteCoordinatorConnection, ___T>
1556            where
1557                <___T as ::fidl_next::Transport>::SendBuffer:
1558                    ::fidl_next::encoder::InternalHandleEncoder,
1559                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1560            {
1561                self.complete_coordinator_connection_with(
1562                    crate::generic::EngineCompleteCoordinatorConnectionRequest { engine_listener },
1563                )
1564            }
1565
1566            #[doc = " Starts the information flow from the engine driver to the Coordinator.\n\n Must be called exactly once, before all the other calls below.\n"]
1567            pub fn complete_coordinator_connection_with<___R>(
1568                &self,
1569                request: ___R,
1570            ) -> ::fidl_next::TwoWayFuture<'_, super::CompleteCoordinatorConnection, ___T>
1571            where
1572                ___R: ::fidl_next::Encode<
1573                        crate::wire::EngineCompleteCoordinatorConnectionRequest,
1574                        <___T as ::fidl_next::Transport>::SendBuffer,
1575                    >,
1576            {
1577                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1578                    4719180934271355554,
1579                    <super::CompleteCoordinatorConnection as ::fidl_next::Method>::FLEXIBILITY,
1580                    request,
1581                ))
1582            }
1583
1584            #[doc = " Clears the `DisplayEngineListener` connection established by\n [`Engine.CompleteCoordinatorConnection`].\n"]
1585            pub fn unset_listener(&self) -> ::fidl_next::SendFuture<'_, ___T> {
1586                ::fidl_next::SendFuture::from_untyped(
1587                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
1588                        4508514133213543013,
1589                        <super::UnsetListener as ::fidl_next::Method>::FLEXIBILITY,
1590                        (),
1591                    ),
1592                )
1593            }
1594
1595            #[doc = " Sets up this driver to use a Sysmem BufferCollection.\n\n Fails with ZX_ERR_INTERNAL if any error occurs during the setup process,\n which mainly consists of communicating with the Sysmem service.\n"]
1596            pub fn import_buffer_collection(
1597                &self,
1598
1599                buffer_collection_id: impl ::fidl_next::Encode<
1600                    crate::wire::BufferCollectionId,
1601                    <___T as ::fidl_next::Transport>::SendBuffer,
1602                >,
1603
1604                collection_token: impl ::fidl_next::Encode<
1605                    ::fidl_next::ClientEnd<
1606                        ::fidl_next_fuchsia_sysmem2::BufferCollectionToken,
1607                        ::fidl_next::wire::fuchsia::Channel,
1608                    >,
1609                    <___T as ::fidl_next::Transport>::SendBuffer,
1610                >,
1611            ) -> ::fidl_next::TwoWayFuture<'_, super::ImportBufferCollection, ___T>
1612            where
1613                <___T as ::fidl_next::Transport>::SendBuffer:
1614                    ::fidl_next::encoder::InternalHandleEncoder,
1615                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1616            {
1617                self.import_buffer_collection_with(
1618                    crate::generic::EngineImportBufferCollectionRequest {
1619                        buffer_collection_id,
1620
1621                        collection_token,
1622                    },
1623                )
1624            }
1625
1626            #[doc = " Sets up this driver to use a Sysmem BufferCollection.\n\n Fails with ZX_ERR_INTERNAL if any error occurs during the setup process,\n which mainly consists of communicating with the Sysmem service.\n"]
1627            pub fn import_buffer_collection_with<___R>(
1628                &self,
1629                request: ___R,
1630            ) -> ::fidl_next::TwoWayFuture<'_, super::ImportBufferCollection, ___T>
1631            where
1632                ___R: ::fidl_next::Encode<
1633                        crate::wire::EngineImportBufferCollectionRequest,
1634                        <___T as ::fidl_next::Transport>::SendBuffer,
1635                    >,
1636            {
1637                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1638                    8961031870138211399,
1639                    <super::ImportBufferCollection as ::fidl_next::Method>::FLEXIBILITY,
1640                    request,
1641                ))
1642            }
1643
1644            #[doc = " Releases the resources needed to use a Sysmem BufferCollection.\n\n TODO(https://fxbug.dev/394954078): Make this method infallible.\n"]
1645            pub fn release_buffer_collection(
1646                &self,
1647
1648                buffer_collection_id: impl ::fidl_next::Encode<
1649                    crate::wire::BufferCollectionId,
1650                    <___T as ::fidl_next::Transport>::SendBuffer,
1651                >,
1652            ) -> ::fidl_next::TwoWayFuture<'_, super::ReleaseBufferCollection, ___T>
1653            where
1654                <___T as ::fidl_next::Transport>::SendBuffer:
1655                    ::fidl_next::encoder::InternalHandleEncoder,
1656            {
1657                self.release_buffer_collection_with(
1658                    crate::generic::EngineReleaseBufferCollectionRequest { buffer_collection_id },
1659                )
1660            }
1661
1662            #[doc = " Releases the resources needed to use a Sysmem BufferCollection.\n\n TODO(https://fxbug.dev/394954078): Make this method infallible.\n"]
1663            pub fn release_buffer_collection_with<___R>(
1664                &self,
1665                request: ___R,
1666            ) -> ::fidl_next::TwoWayFuture<'_, super::ReleaseBufferCollection, ___T>
1667            where
1668                ___R: ::fidl_next::Encode<
1669                        crate::wire::EngineReleaseBufferCollectionRequest,
1670                        <___T as ::fidl_next::Transport>::SendBuffer,
1671                    >,
1672            {
1673                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1674                    2508731447035556384,
1675                    <super::ReleaseBufferCollection as ::fidl_next::Method>::FLEXIBILITY,
1676                    request,
1677                ))
1678            }
1679
1680            #[doc = " Sets up the hardware to use a buffer as a display image data source.\n\n Fails with ZX_ERR_SHOULD_WAIT if Sysmem reports that the\n BufferCollection\'s buffers are not yet allocated. Fails with\n ZX_ERR_INTERNAL if any other error occurs while obtaining the buffer\n from the Sysmem service.\n\n The implementation must ignore any Sysmem information around weak VMO\n handles. Display stack consumers are responsible for ensuring that weak\n VMOs are closed in a timely manner, which may involve calling\n [`Engine.ReleaseImage`] and [`Engine.SubmitConfiguration`].\n"]
1681            pub fn import_image(
1682                &self,
1683
1684                image_metadata: impl ::fidl_next::Encode<
1685                    ::fidl_next_fuchsia_hardware_display_types::wire::ImageMetadata,
1686                    <___T as ::fidl_next::Transport>::SendBuffer,
1687                >,
1688
1689                buffer_collection_id: impl ::fidl_next::Encode<
1690                    crate::wire::BufferCollectionId,
1691                    <___T as ::fidl_next::Transport>::SendBuffer,
1692                >,
1693
1694                buffer_collection_index: impl ::fidl_next::Encode<
1695                    ::fidl_next::wire::Uint32,
1696                    <___T as ::fidl_next::Transport>::SendBuffer,
1697                >,
1698            ) -> ::fidl_next::TwoWayFuture<'_, super::ImportImage, ___T>
1699            where
1700                <___T as ::fidl_next::Transport>::SendBuffer:
1701                    ::fidl_next::encoder::InternalHandleEncoder,
1702            {
1703                self.import_image_with(crate::generic::EngineImportImageRequest {
1704                    image_metadata,
1705
1706                    buffer_collection_id,
1707
1708                    buffer_collection_index,
1709                })
1710            }
1711
1712            #[doc = " Sets up the hardware to use a buffer as a display image data source.\n\n Fails with ZX_ERR_SHOULD_WAIT if Sysmem reports that the\n BufferCollection\'s buffers are not yet allocated. Fails with\n ZX_ERR_INTERNAL if any other error occurs while obtaining the buffer\n from the Sysmem service.\n\n The implementation must ignore any Sysmem information around weak VMO\n handles. Display stack consumers are responsible for ensuring that weak\n VMOs are closed in a timely manner, which may involve calling\n [`Engine.ReleaseImage`] and [`Engine.SubmitConfiguration`].\n"]
1713            pub fn import_image_with<___R>(
1714                &self,
1715                request: ___R,
1716            ) -> ::fidl_next::TwoWayFuture<'_, super::ImportImage, ___T>
1717            where
1718                ___R: ::fidl_next::Encode<
1719                        crate::wire::EngineImportImageRequest,
1720                        <___T as ::fidl_next::Transport>::SendBuffer,
1721                    >,
1722            {
1723                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1724                    1516259966324606179,
1725                    <super::ImportImage as ::fidl_next::Method>::FLEXIBILITY,
1726                    request,
1727                ))
1728            }
1729
1730            #[doc = " Sets up the hardware to use a buffer for display capture output.\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n Fails with ZX_ERR_SHOULD_WAIT if Sysmem reports that the\n BufferCollection\'s buffers are not yet allocated. Fails with\n ZX_ERR_INTERNAL if any other error occurs while obtaining the buffer\n from the Sysmem service.\n\n The implementation must ignore any Sysmem information around weak VMO\n handles. Display stack consumers are responsible for ensuring that weak\n VMOs are closed in a timely manner, which may involve calling\n [`Engine.ReleaseImage`] and [`Engine.SubmitConfiguration`].\n"]
1731            pub fn import_image_for_capture(
1732                &self,
1733
1734                buffer_collection_id: impl ::fidl_next::Encode<
1735                    crate::wire::BufferCollectionId,
1736                    <___T as ::fidl_next::Transport>::SendBuffer,
1737                >,
1738
1739                buffer_collection_index: impl ::fidl_next::Encode<
1740                    ::fidl_next::wire::Uint32,
1741                    <___T as ::fidl_next::Transport>::SendBuffer,
1742                >,
1743            ) -> ::fidl_next::TwoWayFuture<'_, super::ImportImageForCapture, ___T>
1744            where
1745                <___T as ::fidl_next::Transport>::SendBuffer:
1746                    ::fidl_next::encoder::InternalHandleEncoder,
1747            {
1748                self.import_image_for_capture_with(
1749                    crate::generic::EngineImportImageForCaptureRequest {
1750                        buffer_collection_id,
1751
1752                        buffer_collection_index,
1753                    },
1754                )
1755            }
1756
1757            #[doc = " Sets up the hardware to use a buffer for display capture output.\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n Fails with ZX_ERR_SHOULD_WAIT if Sysmem reports that the\n BufferCollection\'s buffers are not yet allocated. Fails with\n ZX_ERR_INTERNAL if any other error occurs while obtaining the buffer\n from the Sysmem service.\n\n The implementation must ignore any Sysmem information around weak VMO\n handles. Display stack consumers are responsible for ensuring that weak\n VMOs are closed in a timely manner, which may involve calling\n [`Engine.ReleaseImage`] and [`Engine.SubmitConfiguration`].\n"]
1758            pub fn import_image_for_capture_with<___R>(
1759                &self,
1760                request: ___R,
1761            ) -> ::fidl_next::TwoWayFuture<'_, super::ImportImageForCapture, ___T>
1762            where
1763                ___R: ::fidl_next::Encode<
1764                        crate::wire::EngineImportImageForCaptureRequest,
1765                        <___T as ::fidl_next::Transport>::SendBuffer,
1766                    >,
1767            {
1768                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1769                    3283558293035659501,
1770                    <super::ImportImageForCapture as ::fidl_next::Method>::FLEXIBILITY,
1771                    request,
1772                ))
1773            }
1774
1775            #[doc = " Releases resources for using a buffer as a display image data source.\n"]
1776            pub fn release_image(
1777                &self,
1778
1779                image_id: impl ::fidl_next::Encode<
1780                    crate::wire::ImageId,
1781                    <___T as ::fidl_next::Transport>::SendBuffer,
1782                >,
1783            ) -> ::fidl_next::SendFuture<'_, ___T>
1784            where
1785                <___T as ::fidl_next::Transport>::SendBuffer:
1786                    ::fidl_next::encoder::InternalHandleEncoder,
1787            {
1788                self.release_image_with(crate::generic::EngineReleaseImageRequest { image_id })
1789            }
1790
1791            #[doc = " Releases resources for using a buffer as a display image data source.\n"]
1792            pub fn release_image_with<___R>(
1793                &self,
1794                request: ___R,
1795            ) -> ::fidl_next::SendFuture<'_, ___T>
1796            where
1797                ___R: ::fidl_next::Encode<
1798                        crate::wire::EngineReleaseImageRequest,
1799                        <___T as ::fidl_next::Transport>::SendBuffer,
1800                    >,
1801            {
1802                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
1803                    6459043979932149875,
1804                    <super::ReleaseImage as ::fidl_next::Method>::FLEXIBILITY,
1805                    request,
1806                ))
1807            }
1808
1809            #[doc = " Verifies that a configuration can be presented on a display.\n\n The verification result must be valid for any configuration derived from\n the given configuration.\n\n A derived configuration can be obtained from another configuration by\n applying one or more of the following operations. The list of operations\n is expected to slowly grow over time.\n\n * Replace an image ID with another image ID. The two IDs must identify\n   images that were imported with the same metadata.\n"]
1810            pub fn check_configuration(
1811                &self,
1812
1813                display_config: impl ::fidl_next::Encode<
1814                    crate::wire::DisplayConfig<'static>,
1815                    <___T as ::fidl_next::Transport>::SendBuffer,
1816                >,
1817            ) -> ::fidl_next::TwoWayFuture<'_, super::CheckConfiguration, ___T>
1818            where
1819                <___T as ::fidl_next::Transport>::SendBuffer:
1820                    ::fidl_next::encoder::InternalHandleEncoder,
1821                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
1822            {
1823                self.check_configuration_with(crate::generic::EngineCheckConfigurationRequest {
1824                    display_config,
1825                })
1826            }
1827
1828            #[doc = " Verifies that a configuration can be presented on a display.\n\n The verification result must be valid for any configuration derived from\n the given configuration.\n\n A derived configuration can be obtained from another configuration by\n applying one or more of the following operations. The list of operations\n is expected to slowly grow over time.\n\n * Replace an image ID with another image ID. The two IDs must identify\n   images that were imported with the same metadata.\n"]
1829            pub fn check_configuration_with<___R>(
1830                &self,
1831                request: ___R,
1832            ) -> ::fidl_next::TwoWayFuture<'_, super::CheckConfiguration, ___T>
1833            where
1834                ___R: ::fidl_next::Encode<
1835                        crate::wire::EngineCheckConfigurationRequest<'static>,
1836                        <___T as ::fidl_next::Transport>::SendBuffer,
1837                    >,
1838            {
1839                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1840                    4576283536204609126,
1841                    <super::CheckConfiguration as ::fidl_next::Method>::FLEXIBILITY,
1842                    request,
1843                ))
1844            }
1845
1846            #[doc = " Submits a configuration for future presentation on a display.\n"]
1847            pub fn submit_configuration(
1848                &self,
1849
1850                display_config: impl ::fidl_next::Encode<
1851                    crate::wire::DisplayConfig<'static>,
1852                    <___T as ::fidl_next::Transport>::SendBuffer,
1853                >,
1854
1855                config_stamp: impl ::fidl_next::Encode<
1856                    crate::wire::ConfigStamp,
1857                    <___T as ::fidl_next::Transport>::SendBuffer,
1858                >,
1859            ) -> ::fidl_next::TwoWayFuture<'_, super::SubmitConfiguration, ___T>
1860            where
1861                <___T as ::fidl_next::Transport>::SendBuffer:
1862                    ::fidl_next::encoder::InternalHandleEncoder,
1863                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
1864            {
1865                self.submit_configuration_with(crate::generic::EngineSubmitConfigurationRequest {
1866                    display_config,
1867
1868                    config_stamp,
1869                })
1870            }
1871
1872            #[doc = " Submits a configuration for future presentation on a display.\n"]
1873            pub fn submit_configuration_with<___R>(
1874                &self,
1875                request: ___R,
1876            ) -> ::fidl_next::TwoWayFuture<'_, super::SubmitConfiguration, ___T>
1877            where
1878                ___R: ::fidl_next::Encode<
1879                        crate::wire::EngineSubmitConfigurationRequest<'static>,
1880                        <___T as ::fidl_next::Transport>::SendBuffer,
1881                    >,
1882            {
1883                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1884                    9026752285186828733,
1885                    <super::SubmitConfiguration as ::fidl_next::Method>::FLEXIBILITY,
1886                    request,
1887                ))
1888            }
1889
1890            #[doc = " Conveys the display hardware\'s limitations on image buffers to sysmem.\n\n Fails with ZX_ERR_INTERNAL if any error occurs while communicating with\n the the Sysmem service.\n"]
1891            pub fn set_buffer_collection_constraints(
1892                &self,
1893
1894                usage: impl ::fidl_next::Encode<
1895                    ::fidl_next_fuchsia_hardware_display_types::wire::ImageBufferUsage,
1896                    <___T as ::fidl_next::Transport>::SendBuffer,
1897                >,
1898
1899                buffer_collection_id: impl ::fidl_next::Encode<
1900                    crate::wire::BufferCollectionId,
1901                    <___T as ::fidl_next::Transport>::SendBuffer,
1902                >,
1903            ) -> ::fidl_next::TwoWayFuture<'_, super::SetBufferCollectionConstraints, ___T>
1904            where
1905                <___T as ::fidl_next::Transport>::SendBuffer:
1906                    ::fidl_next::encoder::InternalHandleEncoder,
1907            {
1908                self.set_buffer_collection_constraints_with(
1909                    crate::generic::EngineSetBufferCollectionConstraintsRequest {
1910                        usage,
1911
1912                        buffer_collection_id,
1913                    },
1914                )
1915            }
1916
1917            #[doc = " Conveys the display hardware\'s limitations on image buffers to sysmem.\n\n Fails with ZX_ERR_INTERNAL if any error occurs while communicating with\n the the Sysmem service.\n"]
1918            pub fn set_buffer_collection_constraints_with<___R>(
1919                &self,
1920                request: ___R,
1921            ) -> ::fidl_next::TwoWayFuture<'_, super::SetBufferCollectionConstraints, ___T>
1922            where
1923                ___R: ::fidl_next::Encode<
1924                        crate::wire::EngineSetBufferCollectionConstraintsRequest,
1925                        <___T as ::fidl_next::Transport>::SendBuffer,
1926                    >,
1927            {
1928                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1929                    7576937804079032425,
1930                    <super::SetBufferCollectionConstraints as ::fidl_next::Method>::FLEXIBILITY,
1931                    request,
1932                ))
1933            }
1934
1935            #[doc = " Sets a display\'s power mode.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the display driver or hardware does\n not support the requested power mode.\n"]
1936            pub fn set_display_power_mode(
1937                &self,
1938
1939                display_id: impl ::fidl_next::Encode<
1940                    ::fidl_next_fuchsia_hardware_display_types::wire::DisplayId,
1941                    <___T as ::fidl_next::Transport>::SendBuffer,
1942                >,
1943
1944                power_mode: impl ::fidl_next::Encode<
1945                    ::fidl_next_fuchsia_hardware_display_types::wire::PowerMode,
1946                    <___T as ::fidl_next::Transport>::SendBuffer,
1947                >,
1948            ) -> ::fidl_next::TwoWayFuture<'_, super::SetDisplayPowerMode, ___T>
1949            where
1950                <___T as ::fidl_next::Transport>::SendBuffer:
1951                    ::fidl_next::encoder::InternalHandleEncoder,
1952            {
1953                self.set_display_power_mode_with(crate::generic::EngineSetDisplayPowerModeRequest {
1954                    display_id,
1955
1956                    power_mode,
1957                })
1958            }
1959
1960            #[doc = " Sets a display\'s power mode.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the display driver or hardware does\n not support the requested power mode.\n"]
1961            pub fn set_display_power_mode_with<___R>(
1962                &self,
1963                request: ___R,
1964            ) -> ::fidl_next::TwoWayFuture<'_, super::SetDisplayPowerMode, ___T>
1965            where
1966                ___R: ::fidl_next::Encode<
1967                        crate::wire::EngineSetDisplayPowerModeRequest,
1968                        <___T as ::fidl_next::Transport>::SendBuffer,
1969                    >,
1970            {
1971                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1972                    5705800673802517194,
1973                    <super::SetDisplayPowerMode as ::fidl_next::Method>::FLEXIBILITY,
1974                    request,
1975                ))
1976            }
1977
1978            #[doc = " Set the minimum value of RGB channels.\n\n Fails with ZX_ERR_NOT_SUPPORTED if RGB clamping is not supported. Most\n engine drivers are expected to fail in this manner.\n"]
1979            pub fn set_minimum_rgb(
1980                &self,
1981
1982                minimum_rgb: impl ::fidl_next::Encode<u8, <___T as ::fidl_next::Transport>::SendBuffer>,
1983            ) -> ::fidl_next::TwoWayFuture<'_, super::SetMinimumRgb, ___T>
1984            where
1985                <___T as ::fidl_next::Transport>::SendBuffer:
1986                    ::fidl_next::encoder::InternalHandleEncoder,
1987            {
1988                self.set_minimum_rgb_with(crate::generic::EngineSetMinimumRgbRequest {
1989                    minimum_rgb,
1990                })
1991            }
1992
1993            #[doc = " Set the minimum value of RGB channels.\n\n Fails with ZX_ERR_NOT_SUPPORTED if RGB clamping is not supported. Most\n engine drivers are expected to fail in this manner.\n"]
1994            pub fn set_minimum_rgb_with<___R>(
1995                &self,
1996                request: ___R,
1997            ) -> ::fidl_next::TwoWayFuture<'_, super::SetMinimumRgb, ___T>
1998            where
1999                ___R: ::fidl_next::Encode<
2000                        crate::wire::EngineSetMinimumRgbRequest,
2001                        <___T as ::fidl_next::Transport>::SendBuffer,
2002                    >,
2003            {
2004                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2005                    467617817871655038,
2006                    <super::SetMinimumRgb as ::fidl_next::Method>::FLEXIBILITY,
2007                    request,
2008                ))
2009            }
2010
2011            #[doc = " Starts a display capture operation.\n\n The engine driver must not be performing another capture operation. The\n capture operation is considered to be in-progress from the moment when a\n successful call to [`DisplayEngine.StartCapture`] is issued, until the\n moment when the engine driver issues a call to\n [`DisplayEngineListener.OnCaptureComplete`].\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n This call must only be issued after a configuration has been submitted to\n the display.\n\n Fails with ZX_ERR_IO_REFUSED if the display engine hardware failed to\n start the capture. This error could point to a systemic issue, such as\n the system having insufficient DRAM bandwidth to capture the most recent\n submitted display configuration. This error could also be caused by a\n temporary hardware failure.\n"]
2012            pub fn start_capture(
2013                &self,
2014
2015                capture_image_id: impl ::fidl_next::Encode<
2016                    crate::wire::ImageId,
2017                    <___T as ::fidl_next::Transport>::SendBuffer,
2018                >,
2019            ) -> ::fidl_next::TwoWayFuture<'_, super::StartCapture, ___T>
2020            where
2021                <___T as ::fidl_next::Transport>::SendBuffer:
2022                    ::fidl_next::encoder::InternalHandleEncoder,
2023            {
2024                self.start_capture_with(crate::generic::EngineStartCaptureRequest {
2025                    capture_image_id,
2026                })
2027            }
2028
2029            #[doc = " Starts a display capture operation.\n\n The engine driver must not be performing another capture operation. The\n capture operation is considered to be in-progress from the moment when a\n successful call to [`DisplayEngine.StartCapture`] is issued, until the\n moment when the engine driver issues a call to\n [`DisplayEngineListener.OnCaptureComplete`].\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n This call must only be issued after a configuration has been submitted to\n the display.\n\n Fails with ZX_ERR_IO_REFUSED if the display engine hardware failed to\n start the capture. This error could point to a systemic issue, such as\n the system having insufficient DRAM bandwidth to capture the most recent\n submitted display configuration. This error could also be caused by a\n temporary hardware failure.\n"]
2030            pub fn start_capture_with<___R>(
2031                &self,
2032                request: ___R,
2033            ) -> ::fidl_next::TwoWayFuture<'_, super::StartCapture, ___T>
2034            where
2035                ___R: ::fidl_next::Encode<
2036                        crate::wire::EngineStartCaptureRequest,
2037                        <___T as ::fidl_next::Transport>::SendBuffer,
2038                    >,
2039            {
2040                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2041                    5123505813133388436,
2042                    <super::StartCapture as ::fidl_next::Method>::FLEXIBILITY,
2043                    request,
2044                ))
2045            }
2046
2047            #[doc = " Releases resources for using a buffer for display capture output.\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n TODO(https://fxbug.dev/394954078): Make this method infallible.\n"]
2048            pub fn release_capture(
2049                &self,
2050
2051                capture_image_id: impl ::fidl_next::Encode<
2052                    crate::wire::ImageId,
2053                    <___T as ::fidl_next::Transport>::SendBuffer,
2054                >,
2055            ) -> ::fidl_next::TwoWayFuture<'_, super::ReleaseCapture, ___T>
2056            where
2057                <___T as ::fidl_next::Transport>::SendBuffer:
2058                    ::fidl_next::encoder::InternalHandleEncoder,
2059            {
2060                self.release_capture_with(crate::generic::EngineReleaseCaptureRequest {
2061                    capture_image_id,
2062                })
2063            }
2064
2065            #[doc = " Releases resources for using a buffer for display capture output.\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n TODO(https://fxbug.dev/394954078): Make this method infallible.\n"]
2066            pub fn release_capture_with<___R>(
2067                &self,
2068                request: ___R,
2069            ) -> ::fidl_next::TwoWayFuture<'_, super::ReleaseCapture, ___T>
2070            where
2071                ___R: ::fidl_next::Encode<
2072                        crate::wire::EngineReleaseCaptureRequest,
2073                        <___T as ::fidl_next::Transport>::SendBuffer,
2074                    >,
2075            {
2076                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2077                    3688105504043873248,
2078                    <super::ReleaseCapture as ::fidl_next::Method>::FLEXIBILITY,
2079                    request,
2080                ))
2081            }
2082        }
2083
2084        /// The server for the `Engine` protocol.
2085        #[repr(transparent)]
2086        pub struct EngineServer<___T: ::fidl_next::Transport> {
2087            server: ::fidl_next::protocol::Server<___T>,
2088        }
2089
2090        impl<___T> EngineServer<___T> where ___T: ::fidl_next::Transport {}
2091    }
2092}
2093
2094#[diagnostic::on_unimplemented(
2095    note = "If {Self} implements the non-local EngineClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
2096)]
2097
2098/// A client handler for the Engine protocol.
2099///
2100/// See [`Engine`] for more details.
2101pub trait EngineLocalClientHandler<
2102    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2103    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2104>
2105{
2106    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
2107        ::core::future::ready(())
2108    }
2109}
2110
2111impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Engine
2112where
2113    ___H: EngineLocalClientHandler<___T>,
2114    ___T: ::fidl_next::Transport,
2115{
2116    async fn on_event(
2117        handler: &mut ___H,
2118        mut message: ::fidl_next::Message<___T>,
2119    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2120        match *message.header().ordinal {
2121            ordinal => {
2122                handler.on_unknown_interaction(ordinal).await;
2123                if ::core::matches!(
2124                    message.header().flexibility(),
2125                    ::fidl_next::protocol::Flexibility::Strict
2126                ) {
2127                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2128                } else {
2129                    Ok(())
2130                }
2131            }
2132        }
2133    }
2134}
2135
2136#[diagnostic::on_unimplemented(
2137    note = "If {Self} implements the non-local EngineServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2138)]
2139
2140/// A server handler for the Engine protocol.
2141///
2142/// See [`Engine`] for more details.
2143pub trait EngineLocalServerHandler<
2144    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2145    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2146>
2147{
2148    #[doc = " Starts the information flow from the engine driver to the Coordinator.\n\n Must be called exactly once, before all the other calls below.\n"]
2149    fn complete_coordinator_connection(
2150        &mut self,
2151
2152        request: ::fidl_next::Request<engine::CompleteCoordinatorConnection, ___T>,
2153
2154        responder: ::fidl_next::Responder<engine::CompleteCoordinatorConnection, ___T>,
2155    ) -> impl ::core::future::Future<Output = ()>;
2156
2157    #[doc = " Clears the `DisplayEngineListener` connection established by\n [`Engine.CompleteCoordinatorConnection`].\n"]
2158    fn unset_listener(&mut self) -> impl ::core::future::Future<Output = ()>;
2159
2160    #[doc = " Sets up this driver to use a Sysmem BufferCollection.\n\n Fails with ZX_ERR_INTERNAL if any error occurs during the setup process,\n which mainly consists of communicating with the Sysmem service.\n"]
2161    fn import_buffer_collection(
2162        &mut self,
2163
2164        request: ::fidl_next::Request<engine::ImportBufferCollection, ___T>,
2165
2166        responder: ::fidl_next::Responder<engine::ImportBufferCollection, ___T>,
2167    ) -> impl ::core::future::Future<Output = ()>;
2168
2169    #[doc = " Releases the resources needed to use a Sysmem BufferCollection.\n\n TODO(https://fxbug.dev/394954078): Make this method infallible.\n"]
2170    fn release_buffer_collection(
2171        &mut self,
2172
2173        request: ::fidl_next::Request<engine::ReleaseBufferCollection, ___T>,
2174
2175        responder: ::fidl_next::Responder<engine::ReleaseBufferCollection, ___T>,
2176    ) -> impl ::core::future::Future<Output = ()>;
2177
2178    #[doc = " Sets up the hardware to use a buffer as a display image data source.\n\n Fails with ZX_ERR_SHOULD_WAIT if Sysmem reports that the\n BufferCollection\'s buffers are not yet allocated. Fails with\n ZX_ERR_INTERNAL if any other error occurs while obtaining the buffer\n from the Sysmem service.\n\n The implementation must ignore any Sysmem information around weak VMO\n handles. Display stack consumers are responsible for ensuring that weak\n VMOs are closed in a timely manner, which may involve calling\n [`Engine.ReleaseImage`] and [`Engine.SubmitConfiguration`].\n"]
2179    fn import_image(
2180        &mut self,
2181
2182        request: ::fidl_next::Request<engine::ImportImage, ___T>,
2183
2184        responder: ::fidl_next::Responder<engine::ImportImage, ___T>,
2185    ) -> impl ::core::future::Future<Output = ()>;
2186
2187    #[doc = " Sets up the hardware to use a buffer for display capture output.\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n Fails with ZX_ERR_SHOULD_WAIT if Sysmem reports that the\n BufferCollection\'s buffers are not yet allocated. Fails with\n ZX_ERR_INTERNAL if any other error occurs while obtaining the buffer\n from the Sysmem service.\n\n The implementation must ignore any Sysmem information around weak VMO\n handles. Display stack consumers are responsible for ensuring that weak\n VMOs are closed in a timely manner, which may involve calling\n [`Engine.ReleaseImage`] and [`Engine.SubmitConfiguration`].\n"]
2188    fn import_image_for_capture(
2189        &mut self,
2190
2191        request: ::fidl_next::Request<engine::ImportImageForCapture, ___T>,
2192
2193        responder: ::fidl_next::Responder<engine::ImportImageForCapture, ___T>,
2194    ) -> impl ::core::future::Future<Output = ()>;
2195
2196    #[doc = " Releases resources for using a buffer as a display image data source.\n"]
2197    fn release_image(
2198        &mut self,
2199
2200        request: ::fidl_next::Request<engine::ReleaseImage, ___T>,
2201    ) -> impl ::core::future::Future<Output = ()>;
2202
2203    #[doc = " Verifies that a configuration can be presented on a display.\n\n The verification result must be valid for any configuration derived from\n the given configuration.\n\n A derived configuration can be obtained from another configuration by\n applying one or more of the following operations. The list of operations\n is expected to slowly grow over time.\n\n * Replace an image ID with another image ID. The two IDs must identify\n   images that were imported with the same metadata.\n"]
2204    fn check_configuration(
2205        &mut self,
2206
2207        request: ::fidl_next::Request<engine::CheckConfiguration, ___T>,
2208
2209        responder: ::fidl_next::Responder<engine::CheckConfiguration, ___T>,
2210    ) -> impl ::core::future::Future<Output = ()>;
2211
2212    #[doc = " Submits a configuration for future presentation on a display.\n"]
2213    fn submit_configuration(
2214        &mut self,
2215
2216        request: ::fidl_next::Request<engine::SubmitConfiguration, ___T>,
2217
2218        responder: ::fidl_next::Responder<engine::SubmitConfiguration, ___T>,
2219    ) -> impl ::core::future::Future<Output = ()>;
2220
2221    #[doc = " Conveys the display hardware\'s limitations on image buffers to sysmem.\n\n Fails with ZX_ERR_INTERNAL if any error occurs while communicating with\n the the Sysmem service.\n"]
2222    fn set_buffer_collection_constraints(
2223        &mut self,
2224
2225        request: ::fidl_next::Request<engine::SetBufferCollectionConstraints, ___T>,
2226
2227        responder: ::fidl_next::Responder<engine::SetBufferCollectionConstraints, ___T>,
2228    ) -> impl ::core::future::Future<Output = ()>;
2229
2230    #[doc = " Sets a display\'s power mode.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the display driver or hardware does\n not support the requested power mode.\n"]
2231    fn set_display_power_mode(
2232        &mut self,
2233
2234        request: ::fidl_next::Request<engine::SetDisplayPowerMode, ___T>,
2235
2236        responder: ::fidl_next::Responder<engine::SetDisplayPowerMode, ___T>,
2237    ) -> impl ::core::future::Future<Output = ()>;
2238
2239    #[doc = " Set the minimum value of RGB channels.\n\n Fails with ZX_ERR_NOT_SUPPORTED if RGB clamping is not supported. Most\n engine drivers are expected to fail in this manner.\n"]
2240    fn set_minimum_rgb(
2241        &mut self,
2242
2243        request: ::fidl_next::Request<engine::SetMinimumRgb, ___T>,
2244
2245        responder: ::fidl_next::Responder<engine::SetMinimumRgb, ___T>,
2246    ) -> impl ::core::future::Future<Output = ()>;
2247
2248    #[doc = " Starts a display capture operation.\n\n The engine driver must not be performing another capture operation. The\n capture operation is considered to be in-progress from the moment when a\n successful call to [`DisplayEngine.StartCapture`] is issued, until the\n moment when the engine driver issues a call to\n [`DisplayEngineListener.OnCaptureComplete`].\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n This call must only be issued after a configuration has been submitted to\n the display.\n\n Fails with ZX_ERR_IO_REFUSED if the display engine hardware failed to\n start the capture. This error could point to a systemic issue, such as\n the system having insufficient DRAM bandwidth to capture the most recent\n submitted display configuration. This error could also be caused by a\n temporary hardware failure.\n"]
2249    fn start_capture(
2250        &mut self,
2251
2252        request: ::fidl_next::Request<engine::StartCapture, ___T>,
2253
2254        responder: ::fidl_next::Responder<engine::StartCapture, ___T>,
2255    ) -> impl ::core::future::Future<Output = ()>;
2256
2257    #[doc = " Releases resources for using a buffer for display capture output.\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n TODO(https://fxbug.dev/394954078): Make this method infallible.\n"]
2258    fn release_capture(
2259        &mut self,
2260
2261        request: ::fidl_next::Request<engine::ReleaseCapture, ___T>,
2262
2263        responder: ::fidl_next::Responder<engine::ReleaseCapture, ___T>,
2264    ) -> impl ::core::future::Future<Output = ()>;
2265
2266    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
2267        ::core::future::ready(())
2268    }
2269}
2270
2271impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Engine
2272where
2273    ___H: EngineLocalServerHandler<___T>,
2274    ___T: ::fidl_next::Transport,
2275    for<'de> crate::wire::EngineCompleteCoordinatorConnectionRequest: ::fidl_next::Decode<
2276            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2277            Constraint = (),
2278        >,
2279    for<'de> crate::wire::EngineImportBufferCollectionRequest: ::fidl_next::Decode<
2280            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2281            Constraint = (),
2282        >,
2283    for<'de> crate::wire::EngineReleaseBufferCollectionRequest: ::fidl_next::Decode<
2284            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2285            Constraint = (),
2286        >,
2287    for<'de> crate::wire::EngineImportImageRequest: ::fidl_next::Decode<
2288            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2289            Constraint = (),
2290        >,
2291    for<'de> crate::wire::EngineImportImageForCaptureRequest: ::fidl_next::Decode<
2292            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2293            Constraint = (),
2294        >,
2295    for<'de> crate::wire::EngineReleaseImageRequest: ::fidl_next::Decode<
2296            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2297            Constraint = (),
2298        >,
2299    for<'de> crate::wire::EngineCheckConfigurationRequest<'de>: ::fidl_next::Decode<
2300            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2301            Constraint = (),
2302        >,
2303    for<'de> crate::wire::EngineSubmitConfigurationRequest<'de>: ::fidl_next::Decode<
2304            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2305            Constraint = (),
2306        >,
2307    for<'de> crate::wire::EngineSetBufferCollectionConstraintsRequest: ::fidl_next::Decode<
2308            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2309            Constraint = (),
2310        >,
2311    for<'de> crate::wire::EngineSetDisplayPowerModeRequest: ::fidl_next::Decode<
2312            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2313            Constraint = (),
2314        >,
2315    for<'de> crate::wire::EngineSetMinimumRgbRequest: ::fidl_next::Decode<
2316            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2317            Constraint = (),
2318        >,
2319    for<'de> crate::wire::EngineStartCaptureRequest: ::fidl_next::Decode<
2320            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2321            Constraint = (),
2322        >,
2323    for<'de> crate::wire::EngineReleaseCaptureRequest: ::fidl_next::Decode<
2324            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2325            Constraint = (),
2326        >,
2327{
2328    async fn on_one_way(
2329        handler: &mut ___H,
2330        mut message: ::fidl_next::Message<___T>,
2331    ) -> ::core::result::Result<
2332        (),
2333        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2334    > {
2335        match *message.header().ordinal {
2336            4508514133213543013 => {
2337                handler.unset_listener().await;
2338                Ok(())
2339            }
2340
2341            6459043979932149875 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
2342                Ok(decoded) => {
2343                    handler.release_image(::fidl_next::Request::from_decoded(decoded)).await;
2344                    Ok(())
2345                }
2346                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2347                    ordinal: 6459043979932149875,
2348                    error,
2349                }),
2350            },
2351
2352            ordinal => {
2353                handler.on_unknown_interaction(ordinal).await;
2354                if ::core::matches!(
2355                    message.header().flexibility(),
2356                    ::fidl_next::protocol::Flexibility::Strict
2357                ) {
2358                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2359                } else {
2360                    Ok(())
2361                }
2362            }
2363        }
2364    }
2365
2366    async fn on_two_way(
2367        handler: &mut ___H,
2368        mut message: ::fidl_next::Message<___T>,
2369        responder: ::fidl_next::protocol::Responder<___T>,
2370    ) -> ::core::result::Result<
2371        (),
2372        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2373    > {
2374        match *message.header().ordinal {
2375            4719180934271355554 => {
2376                let responder = ::fidl_next::Responder::from_untyped(responder);
2377
2378                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2379                    Ok(decoded) => {
2380                        handler
2381                            .complete_coordinator_connection(
2382                                ::fidl_next::Request::from_decoded(decoded),
2383                                responder,
2384                            )
2385                            .await;
2386                        Ok(())
2387                    }
2388                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2389                        ordinal: 4719180934271355554,
2390                        error,
2391                    }),
2392                }
2393            }
2394
2395            8961031870138211399 => {
2396                let responder = ::fidl_next::Responder::from_untyped(responder);
2397
2398                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2399                    Ok(decoded) => {
2400                        handler
2401                            .import_buffer_collection(
2402                                ::fidl_next::Request::from_decoded(decoded),
2403                                responder,
2404                            )
2405                            .await;
2406                        Ok(())
2407                    }
2408                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2409                        ordinal: 8961031870138211399,
2410                        error,
2411                    }),
2412                }
2413            }
2414
2415            2508731447035556384 => {
2416                let responder = ::fidl_next::Responder::from_untyped(responder);
2417
2418                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2419                    Ok(decoded) => {
2420                        handler
2421                            .release_buffer_collection(
2422                                ::fidl_next::Request::from_decoded(decoded),
2423                                responder,
2424                            )
2425                            .await;
2426                        Ok(())
2427                    }
2428                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2429                        ordinal: 2508731447035556384,
2430                        error,
2431                    }),
2432                }
2433            }
2434
2435            1516259966324606179 => {
2436                let responder = ::fidl_next::Responder::from_untyped(responder);
2437
2438                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2439                    Ok(decoded) => {
2440                        handler
2441                            .import_image(::fidl_next::Request::from_decoded(decoded), responder)
2442                            .await;
2443                        Ok(())
2444                    }
2445                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2446                        ordinal: 1516259966324606179,
2447                        error,
2448                    }),
2449                }
2450            }
2451
2452            3283558293035659501 => {
2453                let responder = ::fidl_next::Responder::from_untyped(responder);
2454
2455                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2456                    Ok(decoded) => {
2457                        handler
2458                            .import_image_for_capture(
2459                                ::fidl_next::Request::from_decoded(decoded),
2460                                responder,
2461                            )
2462                            .await;
2463                        Ok(())
2464                    }
2465                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2466                        ordinal: 3283558293035659501,
2467                        error,
2468                    }),
2469                }
2470            }
2471
2472            4576283536204609126 => {
2473                let responder = ::fidl_next::Responder::from_untyped(responder);
2474
2475                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2476                    Ok(decoded) => {
2477                        handler
2478                            .check_configuration(
2479                                ::fidl_next::Request::from_decoded(decoded),
2480                                responder,
2481                            )
2482                            .await;
2483                        Ok(())
2484                    }
2485                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2486                        ordinal: 4576283536204609126,
2487                        error,
2488                    }),
2489                }
2490            }
2491
2492            9026752285186828733 => {
2493                let responder = ::fidl_next::Responder::from_untyped(responder);
2494
2495                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2496                    Ok(decoded) => {
2497                        handler
2498                            .submit_configuration(
2499                                ::fidl_next::Request::from_decoded(decoded),
2500                                responder,
2501                            )
2502                            .await;
2503                        Ok(())
2504                    }
2505                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2506                        ordinal: 9026752285186828733,
2507                        error,
2508                    }),
2509                }
2510            }
2511
2512            7576937804079032425 => {
2513                let responder = ::fidl_next::Responder::from_untyped(responder);
2514
2515                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2516                    Ok(decoded) => {
2517                        handler
2518                            .set_buffer_collection_constraints(
2519                                ::fidl_next::Request::from_decoded(decoded),
2520                                responder,
2521                            )
2522                            .await;
2523                        Ok(())
2524                    }
2525                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2526                        ordinal: 7576937804079032425,
2527                        error,
2528                    }),
2529                }
2530            }
2531
2532            5705800673802517194 => {
2533                let responder = ::fidl_next::Responder::from_untyped(responder);
2534
2535                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2536                    Ok(decoded) => {
2537                        handler
2538                            .set_display_power_mode(
2539                                ::fidl_next::Request::from_decoded(decoded),
2540                                responder,
2541                            )
2542                            .await;
2543                        Ok(())
2544                    }
2545                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2546                        ordinal: 5705800673802517194,
2547                        error,
2548                    }),
2549                }
2550            }
2551
2552            467617817871655038 => {
2553                let responder = ::fidl_next::Responder::from_untyped(responder);
2554
2555                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2556                    Ok(decoded) => {
2557                        handler
2558                            .set_minimum_rgb(::fidl_next::Request::from_decoded(decoded), responder)
2559                            .await;
2560                        Ok(())
2561                    }
2562                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2563                        ordinal: 467617817871655038,
2564                        error,
2565                    }),
2566                }
2567            }
2568
2569            5123505813133388436 => {
2570                let responder = ::fidl_next::Responder::from_untyped(responder);
2571
2572                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2573                    Ok(decoded) => {
2574                        handler
2575                            .start_capture(::fidl_next::Request::from_decoded(decoded), responder)
2576                            .await;
2577                        Ok(())
2578                    }
2579                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2580                        ordinal: 5123505813133388436,
2581                        error,
2582                    }),
2583                }
2584            }
2585
2586            3688105504043873248 => {
2587                let responder = ::fidl_next::Responder::from_untyped(responder);
2588
2589                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2590                    Ok(decoded) => {
2591                        handler
2592                            .release_capture(::fidl_next::Request::from_decoded(decoded), responder)
2593                            .await;
2594                        Ok(())
2595                    }
2596                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2597                        ordinal: 3688105504043873248,
2598                        error,
2599                    }),
2600                }
2601            }
2602
2603            ordinal => {
2604                handler.on_unknown_interaction(ordinal).await;
2605                if ::core::matches!(
2606                    message.header().flexibility(),
2607                    ::fidl_next::protocol::Flexibility::Strict
2608                ) {
2609                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2610                } else {
2611                    responder
2612                        .respond_framework_error(
2613                            ordinal,
2614                            ::fidl_next::FrameworkError::UnknownMethod,
2615                        )
2616                        .expect("encoding a framework error should never fail")
2617                        .await?;
2618                    Ok(())
2619                }
2620            }
2621        }
2622    }
2623}
2624
2625/// A client handler for the Engine protocol.
2626///
2627/// See [`Engine`] for more details.
2628pub trait EngineClientHandler<
2629    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2630    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2631>
2632{
2633    fn on_unknown_interaction(
2634        &mut self,
2635        ordinal: u64,
2636    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2637        ::core::future::ready(())
2638    }
2639}
2640
2641impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Engine
2642where
2643    ___H: EngineClientHandler<___T> + ::core::marker::Send,
2644    ___T: ::fidl_next::Transport,
2645{
2646    async fn on_event(
2647        handler: &mut ___H,
2648        mut message: ::fidl_next::Message<___T>,
2649    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2650        match *message.header().ordinal {
2651            ordinal => {
2652                handler.on_unknown_interaction(ordinal).await;
2653                if ::core::matches!(
2654                    message.header().flexibility(),
2655                    ::fidl_next::protocol::Flexibility::Strict
2656                ) {
2657                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2658                } else {
2659                    Ok(())
2660                }
2661            }
2662        }
2663    }
2664}
2665
2666/// A server handler for the Engine protocol.
2667///
2668/// See [`Engine`] for more details.
2669pub trait EngineServerHandler<
2670    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2671    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2672>
2673{
2674    #[doc = " Starts the information flow from the engine driver to the Coordinator.\n\n Must be called exactly once, before all the other calls below.\n"]
2675    fn complete_coordinator_connection(
2676        &mut self,
2677
2678        request: ::fidl_next::Request<engine::CompleteCoordinatorConnection, ___T>,
2679
2680        responder: ::fidl_next::Responder<engine::CompleteCoordinatorConnection, ___T>,
2681    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2682
2683    #[doc = " Clears the `DisplayEngineListener` connection established by\n [`Engine.CompleteCoordinatorConnection`].\n"]
2684    fn unset_listener(&mut self)
2685    -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2686
2687    #[doc = " Sets up this driver to use a Sysmem BufferCollection.\n\n Fails with ZX_ERR_INTERNAL if any error occurs during the setup process,\n which mainly consists of communicating with the Sysmem service.\n"]
2688    fn import_buffer_collection(
2689        &mut self,
2690
2691        request: ::fidl_next::Request<engine::ImportBufferCollection, ___T>,
2692
2693        responder: ::fidl_next::Responder<engine::ImportBufferCollection, ___T>,
2694    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2695
2696    #[doc = " Releases the resources needed to use a Sysmem BufferCollection.\n\n TODO(https://fxbug.dev/394954078): Make this method infallible.\n"]
2697    fn release_buffer_collection(
2698        &mut self,
2699
2700        request: ::fidl_next::Request<engine::ReleaseBufferCollection, ___T>,
2701
2702        responder: ::fidl_next::Responder<engine::ReleaseBufferCollection, ___T>,
2703    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2704
2705    #[doc = " Sets up the hardware to use a buffer as a display image data source.\n\n Fails with ZX_ERR_SHOULD_WAIT if Sysmem reports that the\n BufferCollection\'s buffers are not yet allocated. Fails with\n ZX_ERR_INTERNAL if any other error occurs while obtaining the buffer\n from the Sysmem service.\n\n The implementation must ignore any Sysmem information around weak VMO\n handles. Display stack consumers are responsible for ensuring that weak\n VMOs are closed in a timely manner, which may involve calling\n [`Engine.ReleaseImage`] and [`Engine.SubmitConfiguration`].\n"]
2706    fn import_image(
2707        &mut self,
2708
2709        request: ::fidl_next::Request<engine::ImportImage, ___T>,
2710
2711        responder: ::fidl_next::Responder<engine::ImportImage, ___T>,
2712    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2713
2714    #[doc = " Sets up the hardware to use a buffer for display capture output.\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n Fails with ZX_ERR_SHOULD_WAIT if Sysmem reports that the\n BufferCollection\'s buffers are not yet allocated. Fails with\n ZX_ERR_INTERNAL if any other error occurs while obtaining the buffer\n from the Sysmem service.\n\n The implementation must ignore any Sysmem information around weak VMO\n handles. Display stack consumers are responsible for ensuring that weak\n VMOs are closed in a timely manner, which may involve calling\n [`Engine.ReleaseImage`] and [`Engine.SubmitConfiguration`].\n"]
2715    fn import_image_for_capture(
2716        &mut self,
2717
2718        request: ::fidl_next::Request<engine::ImportImageForCapture, ___T>,
2719
2720        responder: ::fidl_next::Responder<engine::ImportImageForCapture, ___T>,
2721    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2722
2723    #[doc = " Releases resources for using a buffer as a display image data source.\n"]
2724    fn release_image(
2725        &mut self,
2726
2727        request: ::fidl_next::Request<engine::ReleaseImage, ___T>,
2728    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2729
2730    #[doc = " Verifies that a configuration can be presented on a display.\n\n The verification result must be valid for any configuration derived from\n the given configuration.\n\n A derived configuration can be obtained from another configuration by\n applying one or more of the following operations. The list of operations\n is expected to slowly grow over time.\n\n * Replace an image ID with another image ID. The two IDs must identify\n   images that were imported with the same metadata.\n"]
2731    fn check_configuration(
2732        &mut self,
2733
2734        request: ::fidl_next::Request<engine::CheckConfiguration, ___T>,
2735
2736        responder: ::fidl_next::Responder<engine::CheckConfiguration, ___T>,
2737    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2738
2739    #[doc = " Submits a configuration for future presentation on a display.\n"]
2740    fn submit_configuration(
2741        &mut self,
2742
2743        request: ::fidl_next::Request<engine::SubmitConfiguration, ___T>,
2744
2745        responder: ::fidl_next::Responder<engine::SubmitConfiguration, ___T>,
2746    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2747
2748    #[doc = " Conveys the display hardware\'s limitations on image buffers to sysmem.\n\n Fails with ZX_ERR_INTERNAL if any error occurs while communicating with\n the the Sysmem service.\n"]
2749    fn set_buffer_collection_constraints(
2750        &mut self,
2751
2752        request: ::fidl_next::Request<engine::SetBufferCollectionConstraints, ___T>,
2753
2754        responder: ::fidl_next::Responder<engine::SetBufferCollectionConstraints, ___T>,
2755    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2756
2757    #[doc = " Sets a display\'s power mode.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the display driver or hardware does\n not support the requested power mode.\n"]
2758    fn set_display_power_mode(
2759        &mut self,
2760
2761        request: ::fidl_next::Request<engine::SetDisplayPowerMode, ___T>,
2762
2763        responder: ::fidl_next::Responder<engine::SetDisplayPowerMode, ___T>,
2764    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2765
2766    #[doc = " Set the minimum value of RGB channels.\n\n Fails with ZX_ERR_NOT_SUPPORTED if RGB clamping is not supported. Most\n engine drivers are expected to fail in this manner.\n"]
2767    fn set_minimum_rgb(
2768        &mut self,
2769
2770        request: ::fidl_next::Request<engine::SetMinimumRgb, ___T>,
2771
2772        responder: ::fidl_next::Responder<engine::SetMinimumRgb, ___T>,
2773    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2774
2775    #[doc = " Starts a display capture operation.\n\n The engine driver must not be performing another capture operation. The\n capture operation is considered to be in-progress from the moment when a\n successful call to [`DisplayEngine.StartCapture`] is issued, until the\n moment when the engine driver issues a call to\n [`DisplayEngineListener.OnCaptureComplete`].\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n This call must only be issued after a configuration has been submitted to\n the display.\n\n Fails with ZX_ERR_IO_REFUSED if the display engine hardware failed to\n start the capture. This error could point to a systemic issue, such as\n the system having insufficient DRAM bandwidth to capture the most recent\n submitted display configuration. This error could also be caused by a\n temporary hardware failure.\n"]
2776    fn start_capture(
2777        &mut self,
2778
2779        request: ::fidl_next::Request<engine::StartCapture, ___T>,
2780
2781        responder: ::fidl_next::Responder<engine::StartCapture, ___T>,
2782    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2783
2784    #[doc = " Releases resources for using a buffer for display capture output.\n\n This call must only be issued when the engine driver supports capture.\n Capture support is reported in [`EngineInfo.is_capture_supported`]\n returned by [`Engine.CompleteCoordinatorConnection`].\n\n TODO(https://fxbug.dev/394954078): Make this method infallible.\n"]
2785    fn release_capture(
2786        &mut self,
2787
2788        request: ::fidl_next::Request<engine::ReleaseCapture, ___T>,
2789
2790        responder: ::fidl_next::Responder<engine::ReleaseCapture, ___T>,
2791    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2792
2793    fn on_unknown_interaction(
2794        &mut self,
2795        ordinal: u64,
2796    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2797        ::core::future::ready(())
2798    }
2799}
2800
2801impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Engine
2802where
2803    ___H: EngineServerHandler<___T> + ::core::marker::Send,
2804    ___T: ::fidl_next::Transport,
2805    for<'de> crate::wire::EngineCompleteCoordinatorConnectionRequest: ::fidl_next::Decode<
2806            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2807            Constraint = (),
2808        >,
2809    for<'de> crate::wire::EngineImportBufferCollectionRequest: ::fidl_next::Decode<
2810            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2811            Constraint = (),
2812        >,
2813    for<'de> crate::wire::EngineReleaseBufferCollectionRequest: ::fidl_next::Decode<
2814            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2815            Constraint = (),
2816        >,
2817    for<'de> crate::wire::EngineImportImageRequest: ::fidl_next::Decode<
2818            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2819            Constraint = (),
2820        >,
2821    for<'de> crate::wire::EngineImportImageForCaptureRequest: ::fidl_next::Decode<
2822            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2823            Constraint = (),
2824        >,
2825    for<'de> crate::wire::EngineReleaseImageRequest: ::fidl_next::Decode<
2826            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2827            Constraint = (),
2828        >,
2829    for<'de> crate::wire::EngineCheckConfigurationRequest<'de>: ::fidl_next::Decode<
2830            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2831            Constraint = (),
2832        >,
2833    for<'de> crate::wire::EngineSubmitConfigurationRequest<'de>: ::fidl_next::Decode<
2834            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2835            Constraint = (),
2836        >,
2837    for<'de> crate::wire::EngineSetBufferCollectionConstraintsRequest: ::fidl_next::Decode<
2838            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2839            Constraint = (),
2840        >,
2841    for<'de> crate::wire::EngineSetDisplayPowerModeRequest: ::fidl_next::Decode<
2842            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2843            Constraint = (),
2844        >,
2845    for<'de> crate::wire::EngineSetMinimumRgbRequest: ::fidl_next::Decode<
2846            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2847            Constraint = (),
2848        >,
2849    for<'de> crate::wire::EngineStartCaptureRequest: ::fidl_next::Decode<
2850            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2851            Constraint = (),
2852        >,
2853    for<'de> crate::wire::EngineReleaseCaptureRequest: ::fidl_next::Decode<
2854            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2855            Constraint = (),
2856        >,
2857{
2858    async fn on_one_way(
2859        handler: &mut ___H,
2860        mut message: ::fidl_next::Message<___T>,
2861    ) -> ::core::result::Result<
2862        (),
2863        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2864    > {
2865        match *message.header().ordinal {
2866            4508514133213543013 => {
2867                handler.unset_listener().await;
2868                Ok(())
2869            }
2870
2871            6459043979932149875 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
2872                Ok(decoded) => {
2873                    handler.release_image(::fidl_next::Request::from_decoded(decoded)).await;
2874                    Ok(())
2875                }
2876                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2877                    ordinal: 6459043979932149875,
2878                    error,
2879                }),
2880            },
2881
2882            ordinal => {
2883                handler.on_unknown_interaction(ordinal).await;
2884                if ::core::matches!(
2885                    message.header().flexibility(),
2886                    ::fidl_next::protocol::Flexibility::Strict
2887                ) {
2888                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2889                } else {
2890                    Ok(())
2891                }
2892            }
2893        }
2894    }
2895
2896    async fn on_two_way(
2897        handler: &mut ___H,
2898        mut message: ::fidl_next::Message<___T>,
2899        responder: ::fidl_next::protocol::Responder<___T>,
2900    ) -> ::core::result::Result<
2901        (),
2902        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2903    > {
2904        match *message.header().ordinal {
2905            4719180934271355554 => {
2906                let responder = ::fidl_next::Responder::from_untyped(responder);
2907
2908                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2909                    Ok(decoded) => {
2910                        handler
2911                            .complete_coordinator_connection(
2912                                ::fidl_next::Request::from_decoded(decoded),
2913                                responder,
2914                            )
2915                            .await;
2916                        Ok(())
2917                    }
2918                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2919                        ordinal: 4719180934271355554,
2920                        error,
2921                    }),
2922                }
2923            }
2924
2925            8961031870138211399 => {
2926                let responder = ::fidl_next::Responder::from_untyped(responder);
2927
2928                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2929                    Ok(decoded) => {
2930                        handler
2931                            .import_buffer_collection(
2932                                ::fidl_next::Request::from_decoded(decoded),
2933                                responder,
2934                            )
2935                            .await;
2936                        Ok(())
2937                    }
2938                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2939                        ordinal: 8961031870138211399,
2940                        error,
2941                    }),
2942                }
2943            }
2944
2945            2508731447035556384 => {
2946                let responder = ::fidl_next::Responder::from_untyped(responder);
2947
2948                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2949                    Ok(decoded) => {
2950                        handler
2951                            .release_buffer_collection(
2952                                ::fidl_next::Request::from_decoded(decoded),
2953                                responder,
2954                            )
2955                            .await;
2956                        Ok(())
2957                    }
2958                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2959                        ordinal: 2508731447035556384,
2960                        error,
2961                    }),
2962                }
2963            }
2964
2965            1516259966324606179 => {
2966                let responder = ::fidl_next::Responder::from_untyped(responder);
2967
2968                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2969                    Ok(decoded) => {
2970                        handler
2971                            .import_image(::fidl_next::Request::from_decoded(decoded), responder)
2972                            .await;
2973                        Ok(())
2974                    }
2975                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2976                        ordinal: 1516259966324606179,
2977                        error,
2978                    }),
2979                }
2980            }
2981
2982            3283558293035659501 => {
2983                let responder = ::fidl_next::Responder::from_untyped(responder);
2984
2985                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2986                    Ok(decoded) => {
2987                        handler
2988                            .import_image_for_capture(
2989                                ::fidl_next::Request::from_decoded(decoded),
2990                                responder,
2991                            )
2992                            .await;
2993                        Ok(())
2994                    }
2995                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2996                        ordinal: 3283558293035659501,
2997                        error,
2998                    }),
2999                }
3000            }
3001
3002            4576283536204609126 => {
3003                let responder = ::fidl_next::Responder::from_untyped(responder);
3004
3005                match ::fidl_next::AsDecoderExt::into_decoded(message) {
3006                    Ok(decoded) => {
3007                        handler
3008                            .check_configuration(
3009                                ::fidl_next::Request::from_decoded(decoded),
3010                                responder,
3011                            )
3012                            .await;
3013                        Ok(())
3014                    }
3015                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3016                        ordinal: 4576283536204609126,
3017                        error,
3018                    }),
3019                }
3020            }
3021
3022            9026752285186828733 => {
3023                let responder = ::fidl_next::Responder::from_untyped(responder);
3024
3025                match ::fidl_next::AsDecoderExt::into_decoded(message) {
3026                    Ok(decoded) => {
3027                        handler
3028                            .submit_configuration(
3029                                ::fidl_next::Request::from_decoded(decoded),
3030                                responder,
3031                            )
3032                            .await;
3033                        Ok(())
3034                    }
3035                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3036                        ordinal: 9026752285186828733,
3037                        error,
3038                    }),
3039                }
3040            }
3041
3042            7576937804079032425 => {
3043                let responder = ::fidl_next::Responder::from_untyped(responder);
3044
3045                match ::fidl_next::AsDecoderExt::into_decoded(message) {
3046                    Ok(decoded) => {
3047                        handler
3048                            .set_buffer_collection_constraints(
3049                                ::fidl_next::Request::from_decoded(decoded),
3050                                responder,
3051                            )
3052                            .await;
3053                        Ok(())
3054                    }
3055                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3056                        ordinal: 7576937804079032425,
3057                        error,
3058                    }),
3059                }
3060            }
3061
3062            5705800673802517194 => {
3063                let responder = ::fidl_next::Responder::from_untyped(responder);
3064
3065                match ::fidl_next::AsDecoderExt::into_decoded(message) {
3066                    Ok(decoded) => {
3067                        handler
3068                            .set_display_power_mode(
3069                                ::fidl_next::Request::from_decoded(decoded),
3070                                responder,
3071                            )
3072                            .await;
3073                        Ok(())
3074                    }
3075                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3076                        ordinal: 5705800673802517194,
3077                        error,
3078                    }),
3079                }
3080            }
3081
3082            467617817871655038 => {
3083                let responder = ::fidl_next::Responder::from_untyped(responder);
3084
3085                match ::fidl_next::AsDecoderExt::into_decoded(message) {
3086                    Ok(decoded) => {
3087                        handler
3088                            .set_minimum_rgb(::fidl_next::Request::from_decoded(decoded), responder)
3089                            .await;
3090                        Ok(())
3091                    }
3092                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3093                        ordinal: 467617817871655038,
3094                        error,
3095                    }),
3096                }
3097            }
3098
3099            5123505813133388436 => {
3100                let responder = ::fidl_next::Responder::from_untyped(responder);
3101
3102                match ::fidl_next::AsDecoderExt::into_decoded(message) {
3103                    Ok(decoded) => {
3104                        handler
3105                            .start_capture(::fidl_next::Request::from_decoded(decoded), responder)
3106                            .await;
3107                        Ok(())
3108                    }
3109                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3110                        ordinal: 5123505813133388436,
3111                        error,
3112                    }),
3113                }
3114            }
3115
3116            3688105504043873248 => {
3117                let responder = ::fidl_next::Responder::from_untyped(responder);
3118
3119                match ::fidl_next::AsDecoderExt::into_decoded(message) {
3120                    Ok(decoded) => {
3121                        handler
3122                            .release_capture(::fidl_next::Request::from_decoded(decoded), responder)
3123                            .await;
3124                        Ok(())
3125                    }
3126                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3127                        ordinal: 3688105504043873248,
3128                        error,
3129                    }),
3130                }
3131            }
3132
3133            ordinal => {
3134                handler.on_unknown_interaction(ordinal).await;
3135                if ::core::matches!(
3136                    message.header().flexibility(),
3137                    ::fidl_next::protocol::Flexibility::Strict
3138                ) {
3139                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3140                } else {
3141                    responder
3142                        .respond_framework_error(
3143                            ordinal,
3144                            ::fidl_next::FrameworkError::UnknownMethod,
3145                        )
3146                        .expect("encoding a framework error should never fail")
3147                        .await?;
3148                    Ok(())
3149                }
3150            }
3151        }
3152    }
3153}
3154
3155impl<___T> EngineClientHandler<___T> for ::fidl_next::IgnoreEvents
3156where
3157    ___T: ::fidl_next::Transport,
3158{
3159    async fn on_unknown_interaction(&mut self, _: u64) {}
3160}
3161
3162impl<___H, ___T> EngineLocalClientHandler<___T> for ::fidl_next::Local<___H>
3163where
3164    ___H: EngineClientHandler<___T>,
3165    ___T: ::fidl_next::Transport,
3166{
3167    async fn on_unknown_interaction(&mut self, ordinal: u64) {
3168        ___H::on_unknown_interaction(&mut self.0, ordinal).await
3169    }
3170}
3171
3172impl<___H, ___T> EngineLocalServerHandler<___T> for ::fidl_next::Local<___H>
3173where
3174    ___H: EngineServerHandler<___T>,
3175    ___T: ::fidl_next::Transport,
3176{
3177    async fn complete_coordinator_connection(
3178        &mut self,
3179
3180        request: ::fidl_next::Request<engine::CompleteCoordinatorConnection, ___T>,
3181
3182        responder: ::fidl_next::Responder<engine::CompleteCoordinatorConnection, ___T>,
3183    ) {
3184        ___H::complete_coordinator_connection(&mut self.0, request, responder).await
3185    }
3186
3187    async fn unset_listener(&mut self) {
3188        ___H::unset_listener(&mut self.0).await
3189    }
3190
3191    async fn import_buffer_collection(
3192        &mut self,
3193
3194        request: ::fidl_next::Request<engine::ImportBufferCollection, ___T>,
3195
3196        responder: ::fidl_next::Responder<engine::ImportBufferCollection, ___T>,
3197    ) {
3198        ___H::import_buffer_collection(&mut self.0, request, responder).await
3199    }
3200
3201    async fn release_buffer_collection(
3202        &mut self,
3203
3204        request: ::fidl_next::Request<engine::ReleaseBufferCollection, ___T>,
3205
3206        responder: ::fidl_next::Responder<engine::ReleaseBufferCollection, ___T>,
3207    ) {
3208        ___H::release_buffer_collection(&mut self.0, request, responder).await
3209    }
3210
3211    async fn import_image(
3212        &mut self,
3213
3214        request: ::fidl_next::Request<engine::ImportImage, ___T>,
3215
3216        responder: ::fidl_next::Responder<engine::ImportImage, ___T>,
3217    ) {
3218        ___H::import_image(&mut self.0, request, responder).await
3219    }
3220
3221    async fn import_image_for_capture(
3222        &mut self,
3223
3224        request: ::fidl_next::Request<engine::ImportImageForCapture, ___T>,
3225
3226        responder: ::fidl_next::Responder<engine::ImportImageForCapture, ___T>,
3227    ) {
3228        ___H::import_image_for_capture(&mut self.0, request, responder).await
3229    }
3230
3231    async fn release_image(&mut self, request: ::fidl_next::Request<engine::ReleaseImage, ___T>) {
3232        ___H::release_image(&mut self.0, request).await
3233    }
3234
3235    async fn check_configuration(
3236        &mut self,
3237
3238        request: ::fidl_next::Request<engine::CheckConfiguration, ___T>,
3239
3240        responder: ::fidl_next::Responder<engine::CheckConfiguration, ___T>,
3241    ) {
3242        ___H::check_configuration(&mut self.0, request, responder).await
3243    }
3244
3245    async fn submit_configuration(
3246        &mut self,
3247
3248        request: ::fidl_next::Request<engine::SubmitConfiguration, ___T>,
3249
3250        responder: ::fidl_next::Responder<engine::SubmitConfiguration, ___T>,
3251    ) {
3252        ___H::submit_configuration(&mut self.0, request, responder).await
3253    }
3254
3255    async fn set_buffer_collection_constraints(
3256        &mut self,
3257
3258        request: ::fidl_next::Request<engine::SetBufferCollectionConstraints, ___T>,
3259
3260        responder: ::fidl_next::Responder<engine::SetBufferCollectionConstraints, ___T>,
3261    ) {
3262        ___H::set_buffer_collection_constraints(&mut self.0, request, responder).await
3263    }
3264
3265    async fn set_display_power_mode(
3266        &mut self,
3267
3268        request: ::fidl_next::Request<engine::SetDisplayPowerMode, ___T>,
3269
3270        responder: ::fidl_next::Responder<engine::SetDisplayPowerMode, ___T>,
3271    ) {
3272        ___H::set_display_power_mode(&mut self.0, request, responder).await
3273    }
3274
3275    async fn set_minimum_rgb(
3276        &mut self,
3277
3278        request: ::fidl_next::Request<engine::SetMinimumRgb, ___T>,
3279
3280        responder: ::fidl_next::Responder<engine::SetMinimumRgb, ___T>,
3281    ) {
3282        ___H::set_minimum_rgb(&mut self.0, request, responder).await
3283    }
3284
3285    async fn start_capture(
3286        &mut self,
3287
3288        request: ::fidl_next::Request<engine::StartCapture, ___T>,
3289
3290        responder: ::fidl_next::Responder<engine::StartCapture, ___T>,
3291    ) {
3292        ___H::start_capture(&mut self.0, request, responder).await
3293    }
3294
3295    async fn release_capture(
3296        &mut self,
3297
3298        request: ::fidl_next::Request<engine::ReleaseCapture, ___T>,
3299
3300        responder: ::fidl_next::Responder<engine::ReleaseCapture, ___T>,
3301    ) {
3302        ___H::release_capture(&mut self.0, request, responder).await
3303    }
3304
3305    async fn on_unknown_interaction(&mut self, ordinal: u64) {
3306        ___H::on_unknown_interaction(&mut self.0, ordinal).await
3307    }
3308}
3309
3310/// The type corresponding to the EngineListener protocol.
3311#[doc = " Receives events on a display engine.\n\n An [`EngineListener`] may be registered to the engine through the [`Engine`]\n protocol before it receives any events.\n\n This protocol only consists of one-way calls.\n\n This protocol is `open` while under development.\n TODO(https://fxbug.dev/316631158): Make it `closed` once the API is\n stabilized.\n"]
3312#[derive(PartialEq, Debug)]
3313pub struct EngineListener;
3314
3315#[cfg(feature = "driver")]
3316impl ::fidl_next::HasTransport for EngineListener {
3317    type Transport = ::fdf_fidl::DriverChannel;
3318}
3319
3320pub mod engine_listener {
3321    pub mod prelude {
3322        pub use crate::{
3323            EngineListener, EngineListenerClientHandler, EngineListenerLocalClientHandler,
3324            EngineListenerLocalServerHandler, EngineListenerServerHandler, engine_listener,
3325        };
3326
3327        pub use crate::natural::EngineListenerOnDisplayAddedRequest;
3328
3329        pub use crate::natural::EngineListenerOnDisplayRemovedRequest;
3330
3331        pub use crate::natural::EngineListenerOnDisplayVsyncRequest;
3332    }
3333
3334    pub struct OnDisplayAdded;
3335
3336    impl ::fidl_next::Method for OnDisplayAdded {
3337        const ORDINAL: u64 = 3220423251436056426;
3338        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3339            ::fidl_next::protocol::Flexibility::Flexible;
3340
3341        type Protocol = crate::EngineListener;
3342
3343        type Request = crate::wire::EngineListenerOnDisplayAddedRequest<'static>;
3344    }
3345
3346    pub struct OnDisplayRemoved;
3347
3348    impl ::fidl_next::Method for OnDisplayRemoved {
3349        const ORDINAL: u64 = 3153620152826807875;
3350        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3351            ::fidl_next::protocol::Flexibility::Flexible;
3352
3353        type Protocol = crate::EngineListener;
3354
3355        type Request = crate::wire::EngineListenerOnDisplayRemovedRequest;
3356    }
3357
3358    pub struct OnDisplayVsync;
3359
3360    impl ::fidl_next::Method for OnDisplayVsync {
3361        const ORDINAL: u64 = 6471622073769176491;
3362        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3363            ::fidl_next::protocol::Flexibility::Flexible;
3364
3365        type Protocol = crate::EngineListener;
3366
3367        type Request = crate::wire::EngineListenerOnDisplayVsyncRequest;
3368    }
3369
3370    pub struct OnCaptureComplete;
3371
3372    impl ::fidl_next::Method for OnCaptureComplete {
3373        const ORDINAL: u64 = 8243639424116846906;
3374        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3375            ::fidl_next::protocol::Flexibility::Flexible;
3376
3377        type Protocol = crate::EngineListener;
3378
3379        type Request = ::fidl_next::wire::EmptyMessageBody;
3380    }
3381
3382    mod ___detail {
3383        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::EngineListener
3384        where
3385            ___T: ::fidl_next::Transport,
3386        {
3387            type Client = EngineListenerClient<___T>;
3388            type Server = EngineListenerServer<___T>;
3389        }
3390
3391        /// The client for the `EngineListener` protocol.
3392        #[repr(transparent)]
3393        pub struct EngineListenerClient<___T: ::fidl_next::Transport> {
3394            #[allow(dead_code)]
3395            client: ::fidl_next::protocol::Client<___T>,
3396        }
3397
3398        impl<___T> EngineListenerClient<___T>
3399        where
3400            ___T: ::fidl_next::Transport,
3401        {
3402            #[doc = " Called when a display is connected.\n\n Display Engine drivers must emit this event for all displays connected\n prior to initialization.\n"]
3403            pub fn on_display_added(
3404                &self,
3405
3406                display_info: impl ::fidl_next::Encode<
3407                    crate::wire::RawDisplayInfo<'static>,
3408                    <___T as ::fidl_next::Transport>::SendBuffer,
3409                >,
3410            ) -> ::fidl_next::SendFuture<'_, ___T>
3411            where
3412                <___T as ::fidl_next::Transport>::SendBuffer:
3413                    ::fidl_next::encoder::InternalHandleEncoder,
3414                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3415                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3416            {
3417                self.on_display_added_with(crate::generic::EngineListenerOnDisplayAddedRequest {
3418                    display_info,
3419                })
3420            }
3421
3422            #[doc = " Called when a display is connected.\n\n Display Engine drivers must emit this event for all displays connected\n prior to initialization.\n"]
3423            pub fn on_display_added_with<___R>(
3424                &self,
3425                request: ___R,
3426            ) -> ::fidl_next::SendFuture<'_, ___T>
3427            where
3428                ___R: ::fidl_next::Encode<
3429                        crate::wire::EngineListenerOnDisplayAddedRequest<'static>,
3430                        <___T as ::fidl_next::Transport>::SendBuffer,
3431                    >,
3432            {
3433                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3434                    3220423251436056426,
3435                    <super::OnDisplayAdded as ::fidl_next::Method>::FLEXIBILITY,
3436                    request,
3437                ))
3438            }
3439
3440            #[doc = " Called when a display is removed.\n\n Display Engine drivers must have finished accessing all images which\n were on the removed display before calling this method.\n"]
3441            pub fn on_display_removed(
3442                &self,
3443
3444                display_id: impl ::fidl_next::Encode<
3445                    ::fidl_next_fuchsia_hardware_display_types::wire::DisplayId,
3446                    <___T as ::fidl_next::Transport>::SendBuffer,
3447                >,
3448            ) -> ::fidl_next::SendFuture<'_, ___T>
3449            where
3450                <___T as ::fidl_next::Transport>::SendBuffer:
3451                    ::fidl_next::encoder::InternalHandleEncoder,
3452            {
3453                self.on_display_removed_with(
3454                    crate::generic::EngineListenerOnDisplayRemovedRequest { display_id },
3455                )
3456            }
3457
3458            #[doc = " Called when a display is removed.\n\n Display Engine drivers must have finished accessing all images which\n were on the removed display before calling this method.\n"]
3459            pub fn on_display_removed_with<___R>(
3460                &self,
3461                request: ___R,
3462            ) -> ::fidl_next::SendFuture<'_, ___T>
3463            where
3464                ___R: ::fidl_next::Encode<
3465                        crate::wire::EngineListenerOnDisplayRemovedRequest,
3466                        <___T as ::fidl_next::Transport>::SendBuffer,
3467                    >,
3468            {
3469                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3470                    3153620152826807875,
3471                    <super::OnDisplayRemoved as ::fidl_next::Method>::FLEXIBILITY,
3472                    request,
3473                ))
3474            }
3475
3476            #[doc = " Called when a display finished showing a configuration.\n"]
3477            pub fn on_display_vsync(
3478                &self,
3479
3480                display_id: impl ::fidl_next::Encode<
3481                    ::fidl_next_fuchsia_hardware_display_types::wire::DisplayId,
3482                    <___T as ::fidl_next::Transport>::SendBuffer,
3483                >,
3484
3485                timestamp: impl ::fidl_next::Encode<
3486                    ::fidl_next::wire::Int64,
3487                    <___T as ::fidl_next::Transport>::SendBuffer,
3488                >,
3489
3490                config_stamp: impl ::fidl_next::Encode<
3491                    crate::wire::ConfigStamp,
3492                    <___T as ::fidl_next::Transport>::SendBuffer,
3493                >,
3494            ) -> ::fidl_next::SendFuture<'_, ___T>
3495            where
3496                <___T as ::fidl_next::Transport>::SendBuffer:
3497                    ::fidl_next::encoder::InternalHandleEncoder,
3498            {
3499                self.on_display_vsync_with(crate::generic::EngineListenerOnDisplayVsyncRequest {
3500                    display_id,
3501
3502                    timestamp,
3503
3504                    config_stamp,
3505                })
3506            }
3507
3508            #[doc = " Called when a display finished showing a configuration.\n"]
3509            pub fn on_display_vsync_with<___R>(
3510                &self,
3511                request: ___R,
3512            ) -> ::fidl_next::SendFuture<'_, ___T>
3513            where
3514                ___R: ::fidl_next::Encode<
3515                        crate::wire::EngineListenerOnDisplayVsyncRequest,
3516                        <___T as ::fidl_next::Transport>::SendBuffer,
3517                    >,
3518            {
3519                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3520                    6471622073769176491,
3521                    <super::OnDisplayVsync as ::fidl_next::Method>::FLEXIBILITY,
3522                    request,
3523                ))
3524            }
3525
3526            #[doc = " Called when a previous display capture triggered by\n [`Engine.StartCapture`] is completed.\n\n The display engine only emits [`OnCaptureComplete`] events if capture is\n supported. Capture support is reported in\n [`EngineInfo.is_capture_supported`] returned by\n [`Engine.CompleteCoordinatorConnection`].\n"]
3527            pub fn on_capture_complete(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3528                ::fidl_next::SendFuture::from_untyped(
3529                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
3530                        8243639424116846906,
3531                        <super::OnCaptureComplete as ::fidl_next::Method>::FLEXIBILITY,
3532                        (),
3533                    ),
3534                )
3535            }
3536        }
3537
3538        /// The server for the `EngineListener` protocol.
3539        #[repr(transparent)]
3540        pub struct EngineListenerServer<___T: ::fidl_next::Transport> {
3541            server: ::fidl_next::protocol::Server<___T>,
3542        }
3543
3544        impl<___T> EngineListenerServer<___T> where ___T: ::fidl_next::Transport {}
3545    }
3546}
3547
3548#[diagnostic::on_unimplemented(
3549    note = "If {Self} implements the non-local EngineListenerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3550)]
3551
3552/// A client handler for the EngineListener protocol.
3553///
3554/// See [`EngineListener`] for more details.
3555pub trait EngineListenerLocalClientHandler<
3556    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
3557    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
3558>
3559{
3560    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
3561        ::core::future::ready(())
3562    }
3563}
3564
3565impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for EngineListener
3566where
3567    ___H: EngineListenerLocalClientHandler<___T>,
3568    ___T: ::fidl_next::Transport,
3569{
3570    async fn on_event(
3571        handler: &mut ___H,
3572        mut message: ::fidl_next::Message<___T>,
3573    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3574        match *message.header().ordinal {
3575            ordinal => {
3576                handler.on_unknown_interaction(ordinal).await;
3577                if ::core::matches!(
3578                    message.header().flexibility(),
3579                    ::fidl_next::protocol::Flexibility::Strict
3580                ) {
3581                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3582                } else {
3583                    Ok(())
3584                }
3585            }
3586        }
3587    }
3588}
3589
3590#[diagnostic::on_unimplemented(
3591    note = "If {Self} implements the non-local EngineListenerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3592)]
3593
3594/// A server handler for the EngineListener protocol.
3595///
3596/// See [`EngineListener`] for more details.
3597pub trait EngineListenerLocalServerHandler<
3598    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
3599    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
3600>
3601{
3602    #[doc = " Called when a display is connected.\n\n Display Engine drivers must emit this event for all displays connected\n prior to initialization.\n"]
3603    fn on_display_added(
3604        &mut self,
3605
3606        request: ::fidl_next::Request<engine_listener::OnDisplayAdded, ___T>,
3607    ) -> impl ::core::future::Future<Output = ()>;
3608
3609    #[doc = " Called when a display is removed.\n\n Display Engine drivers must have finished accessing all images which\n were on the removed display before calling this method.\n"]
3610    fn on_display_removed(
3611        &mut self,
3612
3613        request: ::fidl_next::Request<engine_listener::OnDisplayRemoved, ___T>,
3614    ) -> impl ::core::future::Future<Output = ()>;
3615
3616    #[doc = " Called when a display finished showing a configuration.\n"]
3617    fn on_display_vsync(
3618        &mut self,
3619
3620        request: ::fidl_next::Request<engine_listener::OnDisplayVsync, ___T>,
3621    ) -> impl ::core::future::Future<Output = ()>;
3622
3623    #[doc = " Called when a previous display capture triggered by\n [`Engine.StartCapture`] is completed.\n\n The display engine only emits [`OnCaptureComplete`] events if capture is\n supported. Capture support is reported in\n [`EngineInfo.is_capture_supported`] returned by\n [`Engine.CompleteCoordinatorConnection`].\n"]
3624    fn on_capture_complete(&mut self) -> impl ::core::future::Future<Output = ()>;
3625
3626    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
3627        ::core::future::ready(())
3628    }
3629}
3630
3631impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for EngineListener
3632where
3633    ___H: EngineListenerLocalServerHandler<___T>,
3634    ___T: ::fidl_next::Transport,
3635    for<'de> crate::wire::EngineListenerOnDisplayAddedRequest<'de>: ::fidl_next::Decode<
3636            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3637            Constraint = (),
3638        >,
3639    for<'de> crate::wire::EngineListenerOnDisplayRemovedRequest: ::fidl_next::Decode<
3640            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3641            Constraint = (),
3642        >,
3643    for<'de> crate::wire::EngineListenerOnDisplayVsyncRequest: ::fidl_next::Decode<
3644            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3645            Constraint = (),
3646        >,
3647{
3648    async fn on_one_way(
3649        handler: &mut ___H,
3650        mut message: ::fidl_next::Message<___T>,
3651    ) -> ::core::result::Result<
3652        (),
3653        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3654    > {
3655        match *message.header().ordinal {
3656            3220423251436056426 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3657                Ok(decoded) => {
3658                    handler.on_display_added(::fidl_next::Request::from_decoded(decoded)).await;
3659                    Ok(())
3660                }
3661                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3662                    ordinal: 3220423251436056426,
3663                    error,
3664                }),
3665            },
3666
3667            3153620152826807875 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3668                Ok(decoded) => {
3669                    handler.on_display_removed(::fidl_next::Request::from_decoded(decoded)).await;
3670                    Ok(())
3671                }
3672                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3673                    ordinal: 3153620152826807875,
3674                    error,
3675                }),
3676            },
3677
3678            6471622073769176491 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3679                Ok(decoded) => {
3680                    handler.on_display_vsync(::fidl_next::Request::from_decoded(decoded)).await;
3681                    Ok(())
3682                }
3683                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3684                    ordinal: 6471622073769176491,
3685                    error,
3686                }),
3687            },
3688
3689            8243639424116846906 => {
3690                handler.on_capture_complete().await;
3691                Ok(())
3692            }
3693
3694            ordinal => {
3695                handler.on_unknown_interaction(ordinal).await;
3696                if ::core::matches!(
3697                    message.header().flexibility(),
3698                    ::fidl_next::protocol::Flexibility::Strict
3699                ) {
3700                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3701                } else {
3702                    Ok(())
3703                }
3704            }
3705        }
3706    }
3707
3708    async fn on_two_way(
3709        handler: &mut ___H,
3710        mut message: ::fidl_next::Message<___T>,
3711        responder: ::fidl_next::protocol::Responder<___T>,
3712    ) -> ::core::result::Result<
3713        (),
3714        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3715    > {
3716        match *message.header().ordinal {
3717            ordinal => {
3718                handler.on_unknown_interaction(ordinal).await;
3719                if ::core::matches!(
3720                    message.header().flexibility(),
3721                    ::fidl_next::protocol::Flexibility::Strict
3722                ) {
3723                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3724                } else {
3725                    responder
3726                        .respond_framework_error(
3727                            ordinal,
3728                            ::fidl_next::FrameworkError::UnknownMethod,
3729                        )
3730                        .expect("encoding a framework error should never fail")
3731                        .await?;
3732                    Ok(())
3733                }
3734            }
3735        }
3736    }
3737}
3738
3739/// A client handler for the EngineListener protocol.
3740///
3741/// See [`EngineListener`] for more details.
3742pub trait EngineListenerClientHandler<
3743    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
3744    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
3745>
3746{
3747    fn on_unknown_interaction(
3748        &mut self,
3749        ordinal: u64,
3750    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3751        ::core::future::ready(())
3752    }
3753}
3754
3755impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for EngineListener
3756where
3757    ___H: EngineListenerClientHandler<___T> + ::core::marker::Send,
3758    ___T: ::fidl_next::Transport,
3759{
3760    async fn on_event(
3761        handler: &mut ___H,
3762        mut message: ::fidl_next::Message<___T>,
3763    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3764        match *message.header().ordinal {
3765            ordinal => {
3766                handler.on_unknown_interaction(ordinal).await;
3767                if ::core::matches!(
3768                    message.header().flexibility(),
3769                    ::fidl_next::protocol::Flexibility::Strict
3770                ) {
3771                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3772                } else {
3773                    Ok(())
3774                }
3775            }
3776        }
3777    }
3778}
3779
3780/// A server handler for the EngineListener protocol.
3781///
3782/// See [`EngineListener`] for more details.
3783pub trait EngineListenerServerHandler<
3784    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
3785    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
3786>
3787{
3788    #[doc = " Called when a display is connected.\n\n Display Engine drivers must emit this event for all displays connected\n prior to initialization.\n"]
3789    fn on_display_added(
3790        &mut self,
3791
3792        request: ::fidl_next::Request<engine_listener::OnDisplayAdded, ___T>,
3793    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3794
3795    #[doc = " Called when a display is removed.\n\n Display Engine drivers must have finished accessing all images which\n were on the removed display before calling this method.\n"]
3796    fn on_display_removed(
3797        &mut self,
3798
3799        request: ::fidl_next::Request<engine_listener::OnDisplayRemoved, ___T>,
3800    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3801
3802    #[doc = " Called when a display finished showing a configuration.\n"]
3803    fn on_display_vsync(
3804        &mut self,
3805
3806        request: ::fidl_next::Request<engine_listener::OnDisplayVsync, ___T>,
3807    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3808
3809    #[doc = " Called when a previous display capture triggered by\n [`Engine.StartCapture`] is completed.\n\n The display engine only emits [`OnCaptureComplete`] events if capture is\n supported. Capture support is reported in\n [`EngineInfo.is_capture_supported`] returned by\n [`Engine.CompleteCoordinatorConnection`].\n"]
3810    fn on_capture_complete(
3811        &mut self,
3812    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3813
3814    fn on_unknown_interaction(
3815        &mut self,
3816        ordinal: u64,
3817    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3818        ::core::future::ready(())
3819    }
3820}
3821
3822impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for EngineListener
3823where
3824    ___H: EngineListenerServerHandler<___T> + ::core::marker::Send,
3825    ___T: ::fidl_next::Transport,
3826    for<'de> crate::wire::EngineListenerOnDisplayAddedRequest<'de>: ::fidl_next::Decode<
3827            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3828            Constraint = (),
3829        >,
3830    for<'de> crate::wire::EngineListenerOnDisplayRemovedRequest: ::fidl_next::Decode<
3831            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3832            Constraint = (),
3833        >,
3834    for<'de> crate::wire::EngineListenerOnDisplayVsyncRequest: ::fidl_next::Decode<
3835            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3836            Constraint = (),
3837        >,
3838{
3839    async fn on_one_way(
3840        handler: &mut ___H,
3841        mut message: ::fidl_next::Message<___T>,
3842    ) -> ::core::result::Result<
3843        (),
3844        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3845    > {
3846        match *message.header().ordinal {
3847            3220423251436056426 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3848                Ok(decoded) => {
3849                    handler.on_display_added(::fidl_next::Request::from_decoded(decoded)).await;
3850                    Ok(())
3851                }
3852                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3853                    ordinal: 3220423251436056426,
3854                    error,
3855                }),
3856            },
3857
3858            3153620152826807875 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3859                Ok(decoded) => {
3860                    handler.on_display_removed(::fidl_next::Request::from_decoded(decoded)).await;
3861                    Ok(())
3862                }
3863                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3864                    ordinal: 3153620152826807875,
3865                    error,
3866                }),
3867            },
3868
3869            6471622073769176491 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3870                Ok(decoded) => {
3871                    handler.on_display_vsync(::fidl_next::Request::from_decoded(decoded)).await;
3872                    Ok(())
3873                }
3874                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3875                    ordinal: 6471622073769176491,
3876                    error,
3877                }),
3878            },
3879
3880            8243639424116846906 => {
3881                handler.on_capture_complete().await;
3882                Ok(())
3883            }
3884
3885            ordinal => {
3886                handler.on_unknown_interaction(ordinal).await;
3887                if ::core::matches!(
3888                    message.header().flexibility(),
3889                    ::fidl_next::protocol::Flexibility::Strict
3890                ) {
3891                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3892                } else {
3893                    Ok(())
3894                }
3895            }
3896        }
3897    }
3898
3899    async fn on_two_way(
3900        handler: &mut ___H,
3901        mut message: ::fidl_next::Message<___T>,
3902        responder: ::fidl_next::protocol::Responder<___T>,
3903    ) -> ::core::result::Result<
3904        (),
3905        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3906    > {
3907        match *message.header().ordinal {
3908            ordinal => {
3909                handler.on_unknown_interaction(ordinal).await;
3910                if ::core::matches!(
3911                    message.header().flexibility(),
3912                    ::fidl_next::protocol::Flexibility::Strict
3913                ) {
3914                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3915                } else {
3916                    responder
3917                        .respond_framework_error(
3918                            ordinal,
3919                            ::fidl_next::FrameworkError::UnknownMethod,
3920                        )
3921                        .expect("encoding a framework error should never fail")
3922                        .await?;
3923                    Ok(())
3924                }
3925            }
3926        }
3927    }
3928}
3929
3930impl<___T> EngineListenerClientHandler<___T> for ::fidl_next::IgnoreEvents
3931where
3932    ___T: ::fidl_next::Transport,
3933{
3934    async fn on_unknown_interaction(&mut self, _: u64) {}
3935}
3936
3937impl<___H, ___T> EngineListenerLocalClientHandler<___T> for ::fidl_next::Local<___H>
3938where
3939    ___H: EngineListenerClientHandler<___T>,
3940    ___T: ::fidl_next::Transport,
3941{
3942    async fn on_unknown_interaction(&mut self, ordinal: u64) {
3943        ___H::on_unknown_interaction(&mut self.0, ordinal).await
3944    }
3945}
3946
3947impl<___H, ___T> EngineListenerLocalServerHandler<___T> for ::fidl_next::Local<___H>
3948where
3949    ___H: EngineListenerServerHandler<___T>,
3950    ___T: ::fidl_next::Transport,
3951{
3952    async fn on_display_added(
3953        &mut self,
3954
3955        request: ::fidl_next::Request<engine_listener::OnDisplayAdded, ___T>,
3956    ) {
3957        ___H::on_display_added(&mut self.0, request).await
3958    }
3959
3960    async fn on_display_removed(
3961        &mut self,
3962
3963        request: ::fidl_next::Request<engine_listener::OnDisplayRemoved, ___T>,
3964    ) {
3965        ___H::on_display_removed(&mut self.0, request).await
3966    }
3967
3968    async fn on_display_vsync(
3969        &mut self,
3970
3971        request: ::fidl_next::Request<engine_listener::OnDisplayVsync, ___T>,
3972    ) {
3973        ___H::on_display_vsync(&mut self.0, request).await
3974    }
3975
3976    async fn on_capture_complete(&mut self) {
3977        ___H::on_capture_complete(&mut self.0).await
3978    }
3979
3980    async fn on_unknown_interaction(&mut self, ordinal: u64) {
3981        ___H::on_unknown_interaction(&mut self.0, ordinal).await
3982    }
3983}
3984
3985/// The type corresponding to the Service service.
3986#[derive(Debug)]
3987pub struct Service;
3988
3989impl ::fidl_next::DiscoverableService for Service {
3990    const SERVICE_NAME: &'static str = "fuchsia.hardware.display.engine.Service";
3991    const MEMBER_NAMES: &'static [&'static str] = &["engine"];
3992}
3993
3994impl ::fidl_next::HasServiceRequest<::fdf_fidl::DriverChannel> for Service {}
3995
3996impl<___C> ::fidl_next::Service<___C> for Service
3997where
3998    ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
3999{
4000    type Connector = ServiceConnector<___C>;
4001}
4002
4003/// A strongly-typed service connector for the `Service` service.
4004#[repr(transparent)]
4005pub struct ServiceConnector<___C> {
4006    #[allow(dead_code)]
4007    connector: ___C,
4008}
4009
4010impl<___C> ServiceConnector<___C>
4011where
4012    ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
4013{
4014    /// Attempts to connect to the `engine` service member.
4015    pub fn engine(
4016        &self,
4017        server_end: ::fidl_next::ServerEnd<crate::Engine, ::fdf_fidl::DriverChannel>,
4018    ) -> ::core::result::Result<
4019        (),
4020        <___C as ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>>::Error,
4021    > {
4022        ::fidl_next::protocol::ServiceConnector::<::fdf_fidl::DriverChannel>::connect_to_member(
4023            &self.connector,
4024            "engine",
4025            server_end.into_untyped(),
4026        )
4027    }
4028}
4029
4030/// A service handler for the `Service` service.
4031pub trait ServiceHandler {
4032    /// Handles an attempt to connect to the `engine` member.
4033    fn engine(&self, server_end: ::fidl_next::ServerEnd<crate::Engine, ::fdf_fidl::DriverChannel>);
4034}
4035
4036impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for Service
4037where
4038    ___H: ServiceHandler,
4039    ::fdf_fidl::DriverChannel: ::fidl_next::InstanceFromServiceTransport<___T>,
4040{
4041    fn on_connection(handler: &___H, member: &str, server_end: ___T) {
4042        use ::fidl_next::InstanceFromServiceTransport;
4043        match member {
4044            "engine" => handler.engine(::fidl_next::ServerEnd::from_untyped(
4045                ::fdf_fidl::DriverChannel::from_service_transport(server_end),
4046            )),
4047
4048            _ => unreachable!(),
4049        }
4050    }
4051}
4052
4053pub use fidl_next_common_fuchsia_hardware_display_engine::*;