Skip to main content

fidl_next_fuchsia_ui_views/
fidl_next_fuchsia_ui_views.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_ui_views::natural::*;
8
9    #[doc = " A ViewRef is a handle to a kernel object which identifies a unique View\n across the system. Two ViewRefs to the same View have the same KOID.\n\n Clients use a ViewRef to identify a View, to validate a View, and to\n receive a View invalidation signal.\n\n As part of View creation, the client creates a linked\n ViewRef/ViewRefControl pair and hands the pair to Scenic (ViewRefControl is\n described below).  The client must remove the ViewRef\'s signal\n capabilities; otherwise the View is not created.\n\n The client may freely clone its ViewRef and share it, even before sending\n it to Scenic.\n\n Example 1. Accessibility accepts a ViewRef from a client to group the\n semantic nodes, and semantic operations, associated with a client\'s View.\n It must validate a client\'s ViewRef with Scenic.\n\n Example 2. We use ViewRefs to create a FocusChain, which identifies Views\n considered as \"in-focus\" down the View hierarchy. When a View is destroyed,\n Scenic signals to all FocusChain holders that the ViewRef is now invalid.\n"]
10    #[derive(Debug, PartialEq)]
11    #[repr(C)]
12    pub struct ViewRef {
13        pub reference: ::fidl_next::fuchsia::zx::EventPair,
14    }
15
16    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ViewRef, ___E> for ViewRef
17    where
18        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19        ___E: ::fidl_next::fuchsia::HandleEncoder,
20    {
21        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::ViewRef> = unsafe {
22            ::fidl_next::CopyOptimization::enable_if(
23                true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
24                    ::fidl_next::wire::fuchsia::EventPair,
25                    ___E,
26                >>::COPY_OPTIMIZATION
27                    .is_enabled(),
28            )
29        };
30
31        #[inline]
32        fn encode(
33            self,
34            encoder_: &mut ___E,
35            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewRef>,
36            _: (),
37        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
38            ::fidl_next::munge! {
39                let crate::wire::ViewRef {
40                    reference,
41
42                } = out_;
43            }
44
45            ::fidl_next::Encode::encode(self.reference, encoder_, reference, ())?;
46
47            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(reference.as_mut_ptr()) };
48
49            Ok(())
50        }
51    }
52
53    unsafe impl<___E>
54        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::ViewRef>, ___E>
55        for ViewRef
56    where
57        ___E: ::fidl_next::Encoder + ?Sized,
58        ViewRef: ::fidl_next::Encode<crate::wire::ViewRef, ___E>,
59    {
60        #[inline]
61        fn encode_option(
62            this: ::core::option::Option<Self>,
63            encoder: &mut ___E,
64            out: &mut ::core::mem::MaybeUninit<
65                ::fidl_next::wire::Box<'static, crate::wire::ViewRef>,
66            >,
67            _: (),
68        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
69            if let Some(inner) = this {
70                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
71                ::fidl_next::wire::Box::encode_present(out);
72            } else {
73                ::fidl_next::wire::Box::encode_absent(out);
74            }
75
76            Ok(())
77        }
78    }
79
80    impl ::fidl_next::FromWire<crate::wire::ViewRef> for ViewRef {
81        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::ViewRef, Self> = unsafe {
82            ::fidl_next::CopyOptimization::enable_if(
83                true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
84                    ::fidl_next::wire::fuchsia::EventPair,
85                >>::COPY_OPTIMIZATION
86                    .is_enabled(),
87            )
88        };
89
90        #[inline]
91        fn from_wire(wire: crate::wire::ViewRef) -> Self {
92            Self { reference: ::fidl_next::FromWire::from_wire(wire.reference) }
93        }
94    }
95
96    #[derive(Debug, PartialEq)]
97    #[repr(C)]
98    pub struct FocuserRequestFocusRequest {
99        pub view_ref: crate::natural::ViewRef,
100    }
101
102    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FocuserRequestFocusRequest, ___E>
103        for FocuserRequestFocusRequest
104    where
105        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
106        ___E: ::fidl_next::fuchsia::HandleEncoder,
107    {
108        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
109            Self,
110            crate::wire::FocuserRequestFocusRequest,
111        > = unsafe {
112            ::fidl_next::CopyOptimization::enable_if(
113                true && <crate::natural::ViewRef as ::fidl_next::Encode<
114                    crate::wire::ViewRef,
115                    ___E,
116                >>::COPY_OPTIMIZATION
117                    .is_enabled(),
118            )
119        };
120
121        #[inline]
122        fn encode(
123            self,
124            encoder_: &mut ___E,
125            out_: &mut ::core::mem::MaybeUninit<crate::wire::FocuserRequestFocusRequest>,
126            _: (),
127        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
128            ::fidl_next::munge! {
129                let crate::wire::FocuserRequestFocusRequest {
130                    view_ref,
131
132                } = out_;
133            }
134
135            ::fidl_next::Encode::encode(self.view_ref, encoder_, view_ref, ())?;
136
137            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(view_ref.as_mut_ptr()) };
138
139            Ok(())
140        }
141    }
142
143    unsafe impl<___E>
144        ::fidl_next::EncodeOption<
145            ::fidl_next::wire::Box<'static, crate::wire::FocuserRequestFocusRequest>,
146            ___E,
147        > for FocuserRequestFocusRequest
148    where
149        ___E: ::fidl_next::Encoder + ?Sized,
150        FocuserRequestFocusRequest:
151            ::fidl_next::Encode<crate::wire::FocuserRequestFocusRequest, ___E>,
152    {
153        #[inline]
154        fn encode_option(
155            this: ::core::option::Option<Self>,
156            encoder: &mut ___E,
157            out: &mut ::core::mem::MaybeUninit<
158                ::fidl_next::wire::Box<'static, crate::wire::FocuserRequestFocusRequest>,
159            >,
160            _: (),
161        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
162            if let Some(inner) = this {
163                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
164                ::fidl_next::wire::Box::encode_present(out);
165            } else {
166                ::fidl_next::wire::Box::encode_absent(out);
167            }
168
169            Ok(())
170        }
171    }
172
173    impl ::fidl_next::FromWire<crate::wire::FocuserRequestFocusRequest> for FocuserRequestFocusRequest {
174        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
175            crate::wire::FocuserRequestFocusRequest,
176            Self,
177        > = unsafe {
178            ::fidl_next::CopyOptimization::enable_if(
179                    true && <crate::natural::ViewRef as ::fidl_next::FromWire<
180                        crate::wire::ViewRef,
181                    >>::COPY_OPTIMIZATION
182                        .is_enabled(),
183                )
184        };
185
186        #[inline]
187        fn from_wire(wire: crate::wire::FocuserRequestFocusRequest) -> Self {
188            Self { view_ref: ::fidl_next::FromWire::from_wire(wire.view_ref) }
189        }
190    }
191
192    #[derive(Debug, Default, PartialEq)]
193    pub struct FocuserSetAutoFocusRequest {
194        pub view_ref: ::core::option::Option<crate::natural::ViewRef>,
195    }
196
197    impl FocuserSetAutoFocusRequest {
198        fn __max_ordinal(&self) -> usize {
199            if self.view_ref.is_some() {
200                return 1;
201            }
202
203            0
204        }
205    }
206
207    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FocuserSetAutoFocusRequest<'static>, ___E>
208        for FocuserSetAutoFocusRequest
209    where
210        ___E: ::fidl_next::Encoder + ?Sized,
211        ___E: ::fidl_next::fuchsia::HandleEncoder,
212    {
213        #[inline]
214        fn encode(
215            mut self,
216            encoder: &mut ___E,
217            out: &mut ::core::mem::MaybeUninit<crate::wire::FocuserSetAutoFocusRequest<'static>>,
218            _: (),
219        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
220            ::fidl_next::munge!(let crate::wire::FocuserSetAutoFocusRequest { table } = out);
221
222            let max_ord = self.__max_ordinal();
223
224            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
225            ::fidl_next::Wire::zero_padding(&mut out);
226
227            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
228                ::fidl_next::wire::Envelope,
229            >(encoder, max_ord);
230
231            for i in 1..=max_ord {
232                match i {
233                    1 => {
234                        if let Some(value) = self.view_ref.take() {
235                            ::fidl_next::wire::Envelope::encode_value::<crate::wire::ViewRef, ___E>(
236                                value,
237                                preallocated.encoder,
238                                &mut out,
239                                (),
240                            )?;
241                        } else {
242                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
243                        }
244                    }
245
246                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
247                }
248                unsafe {
249                    preallocated.write_next(out.assume_init_ref());
250                }
251            }
252
253            ::fidl_next::wire::Table::encode_len(table, max_ord);
254
255            Ok(())
256        }
257    }
258
259    impl<'de> ::fidl_next::FromWire<crate::wire::FocuserSetAutoFocusRequest<'de>>
260        for FocuserSetAutoFocusRequest
261    {
262        #[inline]
263        fn from_wire(wire_: crate::wire::FocuserSetAutoFocusRequest<'de>) -> Self {
264            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
265
266            let view_ref = wire_.table.get(1);
267
268            Self {
269                view_ref: view_ref.map(|envelope| {
270                    ::fidl_next::FromWire::from_wire(unsafe {
271                        envelope.read_unchecked::<crate::wire::ViewRef>()
272                    })
273                }),
274            }
275        }
276    }
277
278    #[doc = " Token that uniquely identifies a `View`, which is the root point for a\n subgraph in the global scene graph. Each `ViewToken` has exactly one\n corresponding `ViewHolderToken`.\n\n A Scenic client can have its contents referenced from another client by\n creating a `View` resource using this token.  The other client must also\n create a `ViewHolder` resource using the corresponding `ViewHolderToken`.\n"]
279    #[derive(Debug, PartialEq)]
280    #[repr(C)]
281    pub struct ViewToken {
282        pub value: ::fidl_next::fuchsia::zx::EventPair,
283    }
284
285    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ViewToken, ___E> for ViewToken
286    where
287        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
288        ___E: ::fidl_next::fuchsia::HandleEncoder,
289    {
290        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::ViewToken> = unsafe {
291            ::fidl_next::CopyOptimization::enable_if(
292                true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
293                    ::fidl_next::wire::fuchsia::EventPair,
294                    ___E,
295                >>::COPY_OPTIMIZATION
296                    .is_enabled(),
297            )
298        };
299
300        #[inline]
301        fn encode(
302            self,
303            encoder_: &mut ___E,
304            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewToken>,
305            _: (),
306        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
307            ::fidl_next::munge! {
308                let crate::wire::ViewToken {
309                    value,
310
311                } = out_;
312            }
313
314            ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
315
316            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
317
318            Ok(())
319        }
320    }
321
322    unsafe impl<___E>
323        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::ViewToken>, ___E>
324        for ViewToken
325    where
326        ___E: ::fidl_next::Encoder + ?Sized,
327        ViewToken: ::fidl_next::Encode<crate::wire::ViewToken, ___E>,
328    {
329        #[inline]
330        fn encode_option(
331            this: ::core::option::Option<Self>,
332            encoder: &mut ___E,
333            out: &mut ::core::mem::MaybeUninit<
334                ::fidl_next::wire::Box<'static, crate::wire::ViewToken>,
335            >,
336            _: (),
337        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
338            if let Some(inner) = this {
339                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
340                ::fidl_next::wire::Box::encode_present(out);
341            } else {
342                ::fidl_next::wire::Box::encode_absent(out);
343            }
344
345            Ok(())
346        }
347    }
348
349    impl ::fidl_next::FromWire<crate::wire::ViewToken> for ViewToken {
350        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::ViewToken, Self> = unsafe {
351            ::fidl_next::CopyOptimization::enable_if(
352                true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
353                    ::fidl_next::wire::fuchsia::EventPair,
354                >>::COPY_OPTIMIZATION
355                    .is_enabled(),
356            )
357        };
358
359        #[inline]
360        fn from_wire(wire: crate::wire::ViewToken) -> Self {
361            Self { value: ::fidl_next::FromWire::from_wire(wire.value) }
362        }
363    }
364
365    #[derive(Debug, PartialEq)]
366    #[repr(C)]
367    pub struct ViewPresentRequest {
368        pub view_token: crate::natural::ViewToken,
369    }
370
371    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ViewPresentRequest, ___E> for ViewPresentRequest
372    where
373        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
374        ___E: ::fidl_next::fuchsia::HandleEncoder,
375    {
376        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
377            Self,
378            crate::wire::ViewPresentRequest,
379        > = unsafe {
380            ::fidl_next::CopyOptimization::enable_if(
381                true && <crate::natural::ViewToken as ::fidl_next::Encode<
382                    crate::wire::ViewToken,
383                    ___E,
384                >>::COPY_OPTIMIZATION
385                    .is_enabled(),
386            )
387        };
388
389        #[inline]
390        fn encode(
391            self,
392            encoder_: &mut ___E,
393            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewPresentRequest>,
394            _: (),
395        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
396            ::fidl_next::munge! {
397                let crate::wire::ViewPresentRequest {
398                    view_token,
399
400                } = out_;
401            }
402
403            ::fidl_next::Encode::encode(self.view_token, encoder_, view_token, ())?;
404
405            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(view_token.as_mut_ptr()) };
406
407            Ok(())
408        }
409    }
410
411    unsafe impl<___E>
412        ::fidl_next::EncodeOption<
413            ::fidl_next::wire::Box<'static, crate::wire::ViewPresentRequest>,
414            ___E,
415        > for ViewPresentRequest
416    where
417        ___E: ::fidl_next::Encoder + ?Sized,
418        ViewPresentRequest: ::fidl_next::Encode<crate::wire::ViewPresentRequest, ___E>,
419    {
420        #[inline]
421        fn encode_option(
422            this: ::core::option::Option<Self>,
423            encoder: &mut ___E,
424            out: &mut ::core::mem::MaybeUninit<
425                ::fidl_next::wire::Box<'static, crate::wire::ViewPresentRequest>,
426            >,
427            _: (),
428        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
429            if let Some(inner) = this {
430                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
431                ::fidl_next::wire::Box::encode_present(out);
432            } else {
433                ::fidl_next::wire::Box::encode_absent(out);
434            }
435
436            Ok(())
437        }
438    }
439
440    impl ::fidl_next::FromWire<crate::wire::ViewPresentRequest> for ViewPresentRequest {
441        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
442            crate::wire::ViewPresentRequest,
443            Self,
444        > = unsafe {
445            ::fidl_next::CopyOptimization::enable_if(
446                true && <crate::natural::ViewToken as ::fidl_next::FromWire<
447                    crate::wire::ViewToken,
448                >>::COPY_OPTIMIZATION
449                    .is_enabled(),
450            )
451        };
452
453        #[inline]
454        fn from_wire(wire: crate::wire::ViewPresentRequest) -> Self {
455            Self { view_token: ::fidl_next::FromWire::from_wire(wire.view_token) }
456        }
457    }
458
459    #[doc = " Two Flatland instances may be connected in a parent-child relationship. The child endpoint is\n held in a View. This view is strongly associated with a ViewRef and other related protocols.\n\n ViewCreationToken is a typed wrapper for a channel, representing the child endpoint of the\n connection between two Flatland instances. No messages will be sent over this channel, because\n it is only used as an unclonable object with peer.\n"]
460    #[derive(Debug, PartialEq)]
461    #[repr(C)]
462    pub struct ViewCreationToken {
463        pub value: ::fidl_next::fuchsia::zx::Channel,
464    }
465
466    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ViewCreationToken, ___E> for ViewCreationToken
467    where
468        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
469        ___E: ::fidl_next::fuchsia::HandleEncoder,
470    {
471        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
472            Self,
473            crate::wire::ViewCreationToken,
474        > = unsafe {
475            ::fidl_next::CopyOptimization::enable_if(
476                true && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encode<
477                    ::fidl_next::wire::fuchsia::Channel,
478                    ___E,
479                >>::COPY_OPTIMIZATION
480                    .is_enabled(),
481            )
482        };
483
484        #[inline]
485        fn encode(
486            self,
487            encoder_: &mut ___E,
488            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewCreationToken>,
489            _: (),
490        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
491            ::fidl_next::munge! {
492                let crate::wire::ViewCreationToken {
493                    value,
494
495                } = out_;
496            }
497
498            ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
499
500            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
501
502            Ok(())
503        }
504    }
505
506    unsafe impl<___E>
507        ::fidl_next::EncodeOption<
508            ::fidl_next::wire::Box<'static, crate::wire::ViewCreationToken>,
509            ___E,
510        > for ViewCreationToken
511    where
512        ___E: ::fidl_next::Encoder + ?Sized,
513        ViewCreationToken: ::fidl_next::Encode<crate::wire::ViewCreationToken, ___E>,
514    {
515        #[inline]
516        fn encode_option(
517            this: ::core::option::Option<Self>,
518            encoder: &mut ___E,
519            out: &mut ::core::mem::MaybeUninit<
520                ::fidl_next::wire::Box<'static, crate::wire::ViewCreationToken>,
521            >,
522            _: (),
523        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
524            if let Some(inner) = this {
525                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
526                ::fidl_next::wire::Box::encode_present(out);
527            } else {
528                ::fidl_next::wire::Box::encode_absent(out);
529            }
530
531            Ok(())
532        }
533    }
534
535    impl ::fidl_next::FromWire<crate::wire::ViewCreationToken> for ViewCreationToken {
536        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
537            crate::wire::ViewCreationToken,
538            Self,
539        > = unsafe {
540            ::fidl_next::CopyOptimization::enable_if(
541                true && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
542                    ::fidl_next::wire::fuchsia::Channel,
543                >>::COPY_OPTIMIZATION
544                    .is_enabled(),
545            )
546        };
547
548        #[inline]
549        fn from_wire(wire: crate::wire::ViewCreationToken) -> Self {
550            Self { value: ::fidl_next::FromWire::from_wire(wire.value) }
551        }
552    }
553
554    #[doc = " Token that uniquely identifies an attachment point for a `View` in the\n global scene graph.  Each `ViewHolderToken` has exactly one corresponding\n `ViewToken`.\n\n A Scenic client can reference contents from another client by creating a\n `ViewHolder` resource using this token.  The other client must also create\n a `View` resource using the corresponding `ViewToken`.\n"]
555    #[derive(Debug, PartialEq)]
556    #[repr(C)]
557    pub struct ViewHolderToken {
558        pub value: ::fidl_next::fuchsia::zx::EventPair,
559    }
560
561    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ViewHolderToken, ___E> for ViewHolderToken
562    where
563        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
564        ___E: ::fidl_next::fuchsia::HandleEncoder,
565    {
566        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::ViewHolderToken> = unsafe {
567            ::fidl_next::CopyOptimization::enable_if(
568                true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
569                    ::fidl_next::wire::fuchsia::EventPair,
570                    ___E,
571                >>::COPY_OPTIMIZATION
572                    .is_enabled(),
573            )
574        };
575
576        #[inline]
577        fn encode(
578            self,
579            encoder_: &mut ___E,
580            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewHolderToken>,
581            _: (),
582        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
583            ::fidl_next::munge! {
584                let crate::wire::ViewHolderToken {
585                    value,
586
587                } = out_;
588            }
589
590            ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
591
592            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
593
594            Ok(())
595        }
596    }
597
598    unsafe impl<___E>
599        ::fidl_next::EncodeOption<
600            ::fidl_next::wire::Box<'static, crate::wire::ViewHolderToken>,
601            ___E,
602        > for ViewHolderToken
603    where
604        ___E: ::fidl_next::Encoder + ?Sized,
605        ViewHolderToken: ::fidl_next::Encode<crate::wire::ViewHolderToken, ___E>,
606    {
607        #[inline]
608        fn encode_option(
609            this: ::core::option::Option<Self>,
610            encoder: &mut ___E,
611            out: &mut ::core::mem::MaybeUninit<
612                ::fidl_next::wire::Box<'static, crate::wire::ViewHolderToken>,
613            >,
614            _: (),
615        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
616            if let Some(inner) = this {
617                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
618                ::fidl_next::wire::Box::encode_present(out);
619            } else {
620                ::fidl_next::wire::Box::encode_absent(out);
621            }
622
623            Ok(())
624        }
625    }
626
627    impl ::fidl_next::FromWire<crate::wire::ViewHolderToken> for ViewHolderToken {
628        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::ViewHolderToken, Self> = unsafe {
629            ::fidl_next::CopyOptimization::enable_if(
630                true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
631                    ::fidl_next::wire::fuchsia::EventPair,
632                >>::COPY_OPTIMIZATION
633                    .is_enabled(),
634            )
635        };
636
637        #[inline]
638        fn from_wire(wire: crate::wire::ViewHolderToken) -> Self {
639            Self { value: ::fidl_next::FromWire::from_wire(wire.value) }
640        }
641    }
642
643    #[doc = " A ViewRefControl is the peer to a ViewRef. Their `reference`s are linked.\n\n Like ViewRef, a ViewRefControl is a typed handle to an eventpair.  Unlike\n ViewRef, a ViewRefControl\'s handle is unique. Scenic uses this property\n when it ties a ViewRefControl to a View, arranged to share fate.  When a\n View is destroyed, the associated destruction of its ViewRefControl\n triggers an automatic `ZX_EVENTPAIR_PEER_CLOSED` signal sent to all ViewRef\n holders; hence ViewRef holders may track View lifetime.\n\n As part of View creation, the client creates a linked\n ViewRef/ViewRefControl pair and hands the pair to Scenic (ViewRef is\n described above).  The client must not clone the ViewRefControl. It must\n not remove or modify the ViewRefControl\'s capabilities; otherwise the View\n is not created.\n"]
644    #[derive(Debug, PartialEq)]
645    #[repr(C)]
646    pub struct ViewRefControl {
647        pub reference: ::fidl_next::fuchsia::zx::EventPair,
648    }
649
650    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ViewRefControl, ___E> for ViewRefControl
651    where
652        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
653        ___E: ::fidl_next::fuchsia::HandleEncoder,
654    {
655        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::ViewRefControl> = unsafe {
656            ::fidl_next::CopyOptimization::enable_if(
657                true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
658                    ::fidl_next::wire::fuchsia::EventPair,
659                    ___E,
660                >>::COPY_OPTIMIZATION
661                    .is_enabled(),
662            )
663        };
664
665        #[inline]
666        fn encode(
667            self,
668            encoder_: &mut ___E,
669            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewRefControl>,
670            _: (),
671        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
672            ::fidl_next::munge! {
673                let crate::wire::ViewRefControl {
674                    reference,
675
676                } = out_;
677            }
678
679            ::fidl_next::Encode::encode(self.reference, encoder_, reference, ())?;
680
681            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(reference.as_mut_ptr()) };
682
683            Ok(())
684        }
685    }
686
687    unsafe impl<___E>
688        ::fidl_next::EncodeOption<
689            ::fidl_next::wire::Box<'static, crate::wire::ViewRefControl>,
690            ___E,
691        > for ViewRefControl
692    where
693        ___E: ::fidl_next::Encoder + ?Sized,
694        ViewRefControl: ::fidl_next::Encode<crate::wire::ViewRefControl, ___E>,
695    {
696        #[inline]
697        fn encode_option(
698            this: ::core::option::Option<Self>,
699            encoder: &mut ___E,
700            out: &mut ::core::mem::MaybeUninit<
701                ::fidl_next::wire::Box<'static, crate::wire::ViewRefControl>,
702            >,
703            _: (),
704        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
705            if let Some(inner) = this {
706                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
707                ::fidl_next::wire::Box::encode_present(out);
708            } else {
709                ::fidl_next::wire::Box::encode_absent(out);
710            }
711
712            Ok(())
713        }
714    }
715
716    impl ::fidl_next::FromWire<crate::wire::ViewRefControl> for ViewRefControl {
717        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::ViewRefControl, Self> = unsafe {
718            ::fidl_next::CopyOptimization::enable_if(
719                true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
720                    ::fidl_next::wire::fuchsia::EventPair,
721                >>::COPY_OPTIMIZATION
722                    .is_enabled(),
723            )
724        };
725
726        #[inline]
727        fn from_wire(wire: crate::wire::ViewRefControl) -> Self {
728            Self { reference: ::fidl_next::FromWire::from_wire(wire.reference) }
729        }
730    }
731
732    #[doc = " Convenience data type to self-identify the view, during view creation.\n\n A ViewRef is used to identify the view, and can be freely cloned and\n distributed to other components.\n\n A ViewRefControl is used to implement lifecycle notification, and must not\n be cloned, and cannot be distributed to other components. Scenic binds the\n ViewRefControl object to the view, so when the view is destroyed, the\n destruction of the ViewRefControl triggers a `ZX_EVENTPAIR_PEER_CLOSED`\n signal to all ViewRef holders, thus notifying view death.\n\n Usage: When creating a view, place a ViewRef and ViewRefControl together in\n this struct, so that they travel as a unit to the destination component.\n This convenience struct allows a protocol author to describe this traveling\n pair as one argument. It improves readability and reduces mishandling.\n"]
733    #[derive(Debug, PartialEq)]
734    #[repr(C)]
735    pub struct ViewIdentityOnCreation {
736        pub view_ref: crate::natural::ViewRef,
737
738        pub view_ref_control: crate::natural::ViewRefControl,
739    }
740
741    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ViewIdentityOnCreation, ___E>
742        for ViewIdentityOnCreation
743    where
744        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
745        ___E: ::fidl_next::fuchsia::HandleEncoder,
746    {
747        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
748            Self,
749            crate::wire::ViewIdentityOnCreation,
750        > = unsafe {
751            ::fidl_next::CopyOptimization::enable_if(
752                true && <crate::natural::ViewRef as ::fidl_next::Encode<
753                    crate::wire::ViewRef,
754                    ___E,
755                >>::COPY_OPTIMIZATION
756                    .is_enabled()
757                    && <crate::natural::ViewRefControl as ::fidl_next::Encode<
758                        crate::wire::ViewRefControl,
759                        ___E,
760                    >>::COPY_OPTIMIZATION
761                        .is_enabled(),
762            )
763        };
764
765        #[inline]
766        fn encode(
767            self,
768            encoder_: &mut ___E,
769            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewIdentityOnCreation>,
770            _: (),
771        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
772            ::fidl_next::munge! {
773                let crate::wire::ViewIdentityOnCreation {
774                    view_ref,
775                    view_ref_control,
776
777                } = out_;
778            }
779
780            ::fidl_next::Encode::encode(self.view_ref, encoder_, view_ref, ())?;
781
782            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(view_ref.as_mut_ptr()) };
783
784            ::fidl_next::Encode::encode(self.view_ref_control, encoder_, view_ref_control, ())?;
785
786            let mut _field =
787                unsafe { ::fidl_next::Slot::new_unchecked(view_ref_control.as_mut_ptr()) };
788
789            Ok(())
790        }
791    }
792
793    unsafe impl<___E>
794        ::fidl_next::EncodeOption<
795            ::fidl_next::wire::Box<'static, crate::wire::ViewIdentityOnCreation>,
796            ___E,
797        > for ViewIdentityOnCreation
798    where
799        ___E: ::fidl_next::Encoder + ?Sized,
800        ViewIdentityOnCreation: ::fidl_next::Encode<crate::wire::ViewIdentityOnCreation, ___E>,
801    {
802        #[inline]
803        fn encode_option(
804            this: ::core::option::Option<Self>,
805            encoder: &mut ___E,
806            out: &mut ::core::mem::MaybeUninit<
807                ::fidl_next::wire::Box<'static, crate::wire::ViewIdentityOnCreation>,
808            >,
809            _: (),
810        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
811            if let Some(inner) = this {
812                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
813                ::fidl_next::wire::Box::encode_present(out);
814            } else {
815                ::fidl_next::wire::Box::encode_absent(out);
816            }
817
818            Ok(())
819        }
820    }
821
822    impl ::fidl_next::FromWire<crate::wire::ViewIdentityOnCreation> for ViewIdentityOnCreation {
823        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
824            crate::wire::ViewIdentityOnCreation,
825            Self,
826        > = unsafe {
827            ::fidl_next::CopyOptimization::enable_if(
828                    true && <crate::natural::ViewRef as ::fidl_next::FromWire<
829                        crate::wire::ViewRef,
830                    >>::COPY_OPTIMIZATION
831                        .is_enabled()
832                        && <crate::natural::ViewRefControl as ::fidl_next::FromWire<
833                            crate::wire::ViewRefControl,
834                        >>::COPY_OPTIMIZATION
835                            .is_enabled(),
836                )
837        };
838
839        #[inline]
840        fn from_wire(wire: crate::wire::ViewIdentityOnCreation) -> Self {
841            Self {
842                view_ref: ::fidl_next::FromWire::from_wire(wire.view_ref),
843
844                view_ref_control: ::fidl_next::FromWire::from_wire(wire.view_ref_control),
845            }
846        }
847    }
848
849    #[derive(Debug, PartialEq)]
850    #[repr(C)]
851    pub struct ViewRefInstalledWatchRequest {
852        pub view_ref: crate::natural::ViewRef,
853    }
854
855    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ViewRefInstalledWatchRequest, ___E>
856        for ViewRefInstalledWatchRequest
857    where
858        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
859        ___E: ::fidl_next::fuchsia::HandleEncoder,
860    {
861        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
862            Self,
863            crate::wire::ViewRefInstalledWatchRequest,
864        > = unsafe {
865            ::fidl_next::CopyOptimization::enable_if(
866                true && <crate::natural::ViewRef as ::fidl_next::Encode<
867                    crate::wire::ViewRef,
868                    ___E,
869                >>::COPY_OPTIMIZATION
870                    .is_enabled(),
871            )
872        };
873
874        #[inline]
875        fn encode(
876            self,
877            encoder_: &mut ___E,
878            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewRefInstalledWatchRequest>,
879            _: (),
880        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
881            ::fidl_next::munge! {
882                let crate::wire::ViewRefInstalledWatchRequest {
883                    view_ref,
884
885                } = out_;
886            }
887
888            ::fidl_next::Encode::encode(self.view_ref, encoder_, view_ref, ())?;
889
890            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(view_ref.as_mut_ptr()) };
891
892            Ok(())
893        }
894    }
895
896    unsafe impl<___E>
897        ::fidl_next::EncodeOption<
898            ::fidl_next::wire::Box<'static, crate::wire::ViewRefInstalledWatchRequest>,
899            ___E,
900        > for ViewRefInstalledWatchRequest
901    where
902        ___E: ::fidl_next::Encoder + ?Sized,
903        ViewRefInstalledWatchRequest:
904            ::fidl_next::Encode<crate::wire::ViewRefInstalledWatchRequest, ___E>,
905    {
906        #[inline]
907        fn encode_option(
908            this: ::core::option::Option<Self>,
909            encoder: &mut ___E,
910            out: &mut ::core::mem::MaybeUninit<
911                ::fidl_next::wire::Box<'static, crate::wire::ViewRefInstalledWatchRequest>,
912            >,
913            _: (),
914        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
915            if let Some(inner) = this {
916                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
917                ::fidl_next::wire::Box::encode_present(out);
918            } else {
919                ::fidl_next::wire::Box::encode_absent(out);
920            }
921
922            Ok(())
923        }
924    }
925
926    impl ::fidl_next::FromWire<crate::wire::ViewRefInstalledWatchRequest>
927        for ViewRefInstalledWatchRequest
928    {
929        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
930            crate::wire::ViewRefInstalledWatchRequest,
931            Self,
932        > = unsafe {
933            ::fidl_next::CopyOptimization::enable_if(
934                    true && <crate::natural::ViewRef as ::fidl_next::FromWire<
935                        crate::wire::ViewRef,
936                    >>::COPY_OPTIMIZATION
937                        .is_enabled(),
938                )
939        };
940
941        #[inline]
942        fn from_wire(wire: crate::wire::ViewRefInstalledWatchRequest) -> Self {
943            Self { view_ref: ::fidl_next::FromWire::from_wire(wire.view_ref) }
944        }
945    }
946
947    #[doc = " Two Flatland instances may be connected in a parent-child relationship. The parent endpoint is\n held in a Viewport.\n\n ViewportCreationToken is a typed wrapper for a channel, representing the parent endpoint of the\n connection between two Flatlands. No messages will be sent over this channel, because it is only\n used as an unclonable object with peer.\n"]
948    #[derive(Debug, PartialEq)]
949    #[repr(C)]
950    pub struct ViewportCreationToken {
951        pub value: ::fidl_next::fuchsia::zx::Channel,
952    }
953
954    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ViewportCreationToken, ___E>
955        for ViewportCreationToken
956    where
957        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
958        ___E: ::fidl_next::fuchsia::HandleEncoder,
959    {
960        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
961            Self,
962            crate::wire::ViewportCreationToken,
963        > = unsafe {
964            ::fidl_next::CopyOptimization::enable_if(
965                true && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encode<
966                    ::fidl_next::wire::fuchsia::Channel,
967                    ___E,
968                >>::COPY_OPTIMIZATION
969                    .is_enabled(),
970            )
971        };
972
973        #[inline]
974        fn encode(
975            self,
976            encoder_: &mut ___E,
977            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewportCreationToken>,
978            _: (),
979        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
980            ::fidl_next::munge! {
981                let crate::wire::ViewportCreationToken {
982                    value,
983
984                } = out_;
985            }
986
987            ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
988
989            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
990
991            Ok(())
992        }
993    }
994
995    unsafe impl<___E>
996        ::fidl_next::EncodeOption<
997            ::fidl_next::wire::Box<'static, crate::wire::ViewportCreationToken>,
998            ___E,
999        > for ViewportCreationToken
1000    where
1001        ___E: ::fidl_next::Encoder + ?Sized,
1002        ViewportCreationToken: ::fidl_next::Encode<crate::wire::ViewportCreationToken, ___E>,
1003    {
1004        #[inline]
1005        fn encode_option(
1006            this: ::core::option::Option<Self>,
1007            encoder: &mut ___E,
1008            out: &mut ::core::mem::MaybeUninit<
1009                ::fidl_next::wire::Box<'static, crate::wire::ViewportCreationToken>,
1010            >,
1011            _: (),
1012        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1013            if let Some(inner) = this {
1014                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1015                ::fidl_next::wire::Box::encode_present(out);
1016            } else {
1017                ::fidl_next::wire::Box::encode_absent(out);
1018            }
1019
1020            Ok(())
1021        }
1022    }
1023
1024    impl ::fidl_next::FromWire<crate::wire::ViewportCreationToken> for ViewportCreationToken {
1025        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1026            crate::wire::ViewportCreationToken,
1027            Self,
1028        > = unsafe {
1029            ::fidl_next::CopyOptimization::enable_if(
1030                true && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
1031                    ::fidl_next::wire::fuchsia::Channel,
1032                >>::COPY_OPTIMIZATION
1033                    .is_enabled(),
1034            )
1035        };
1036
1037        #[inline]
1038        fn from_wire(wire: crate::wire::ViewportCreationToken) -> Self {
1039            Self { value: ::fidl_next::FromWire::from_wire(wire.value) }
1040        }
1041    }
1042}
1043
1044pub mod wire {
1045
1046    pub use fidl_next_common_fuchsia_ui_views::wire::*;
1047
1048    /// The wire type corresponding to [`ViewRef`].
1049    #[derive(Debug)]
1050    #[repr(C)]
1051    pub struct ViewRef {
1052        pub reference: ::fidl_next::wire::fuchsia::EventPair,
1053    }
1054
1055    static_assertions::const_assert_eq!(std::mem::size_of::<ViewRef>(), 4);
1056    static_assertions::const_assert_eq!(std::mem::align_of::<ViewRef>(), 4);
1057
1058    static_assertions::const_assert_eq!(std::mem::offset_of!(ViewRef, reference), 0);
1059
1060    impl ::fidl_next::Constrained for ViewRef {
1061        type Constraint = ();
1062
1063        fn validate(
1064            _: ::fidl_next::Slot<'_, Self>,
1065            _: Self::Constraint,
1066        ) -> Result<(), ::fidl_next::ValidationError> {
1067            Ok(())
1068        }
1069    }
1070
1071    unsafe impl ::fidl_next::Wire for ViewRef {
1072        type Narrowed<'de> = ViewRef;
1073
1074        #[inline]
1075        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1076            ::fidl_next::munge! {
1077                let Self {
1078                    reference,
1079
1080                } = &mut *out_;
1081            }
1082
1083            ::fidl_next::Wire::zero_padding(reference);
1084        }
1085    }
1086
1087    unsafe impl<___D> ::fidl_next::Decode<___D> for ViewRef
1088    where
1089        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1090        ___D: ::fidl_next::fuchsia::HandleDecoder,
1091    {
1092        fn decode(
1093            slot_: ::fidl_next::Slot<'_, Self>,
1094            decoder_: &mut ___D,
1095            _: (),
1096        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1097            ::fidl_next::munge! {
1098                let Self {
1099                    mut reference,
1100
1101                } = slot_;
1102            }
1103
1104            let _field = reference.as_mut();
1105
1106            ::fidl_next::Decode::decode(reference.as_mut(), decoder_, ())?;
1107
1108            Ok(())
1109        }
1110    }
1111
1112    impl ::fidl_next::IntoNatural for ViewRef {
1113        type Natural = crate::natural::ViewRef;
1114    }
1115
1116    /// The wire type corresponding to [`FocuserRequestFocusRequest`].
1117    #[derive(Debug)]
1118    #[repr(C)]
1119    pub struct FocuserRequestFocusRequest {
1120        pub view_ref: crate::wire::ViewRef,
1121    }
1122
1123    static_assertions::const_assert_eq!(std::mem::size_of::<FocuserRequestFocusRequest>(), 4);
1124    static_assertions::const_assert_eq!(std::mem::align_of::<FocuserRequestFocusRequest>(), 4);
1125
1126    static_assertions::const_assert_eq!(
1127        std::mem::offset_of!(FocuserRequestFocusRequest, view_ref),
1128        0
1129    );
1130
1131    impl ::fidl_next::Constrained for FocuserRequestFocusRequest {
1132        type Constraint = ();
1133
1134        fn validate(
1135            _: ::fidl_next::Slot<'_, Self>,
1136            _: Self::Constraint,
1137        ) -> Result<(), ::fidl_next::ValidationError> {
1138            Ok(())
1139        }
1140    }
1141
1142    unsafe impl ::fidl_next::Wire for FocuserRequestFocusRequest {
1143        type Narrowed<'de> = FocuserRequestFocusRequest;
1144
1145        #[inline]
1146        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1147            ::fidl_next::munge! {
1148                let Self {
1149                    view_ref,
1150
1151                } = &mut *out_;
1152            }
1153
1154            ::fidl_next::Wire::zero_padding(view_ref);
1155        }
1156    }
1157
1158    unsafe impl<___D> ::fidl_next::Decode<___D> for FocuserRequestFocusRequest
1159    where
1160        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1161        ___D: ::fidl_next::fuchsia::HandleDecoder,
1162    {
1163        fn decode(
1164            slot_: ::fidl_next::Slot<'_, Self>,
1165            decoder_: &mut ___D,
1166            _: (),
1167        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1168            ::fidl_next::munge! {
1169                let Self {
1170                    mut view_ref,
1171
1172                } = slot_;
1173            }
1174
1175            let _field = view_ref.as_mut();
1176
1177            ::fidl_next::Decode::decode(view_ref.as_mut(), decoder_, ())?;
1178
1179            Ok(())
1180        }
1181    }
1182
1183    impl ::fidl_next::IntoNatural for FocuserRequestFocusRequest {
1184        type Natural = crate::natural::FocuserRequestFocusRequest;
1185    }
1186
1187    /// The wire type corresponding to [`FocuserSetAutoFocusRequest`].
1188    #[repr(C)]
1189    pub struct FocuserSetAutoFocusRequest<'de> {
1190        pub(crate) table: ::fidl_next::wire::Table<'de>,
1191    }
1192
1193    impl<'de> Drop for FocuserSetAutoFocusRequest<'de> {
1194        fn drop(&mut self) {
1195            let _ = self
1196                .table
1197                .get(1)
1198                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::ViewRef>() });
1199        }
1200    }
1201
1202    impl ::fidl_next::Constrained for FocuserSetAutoFocusRequest<'_> {
1203        type Constraint = ();
1204
1205        fn validate(
1206            _: ::fidl_next::Slot<'_, Self>,
1207            _: Self::Constraint,
1208        ) -> Result<(), ::fidl_next::ValidationError> {
1209            Ok(())
1210        }
1211    }
1212
1213    unsafe impl ::fidl_next::Wire for FocuserSetAutoFocusRequest<'static> {
1214        type Narrowed<'de> = FocuserSetAutoFocusRequest<'de>;
1215
1216        #[inline]
1217        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1218            ::fidl_next::munge!(let Self { table } = out);
1219            ::fidl_next::wire::Table::zero_padding(table);
1220        }
1221    }
1222
1223    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FocuserSetAutoFocusRequest<'de>
1224    where
1225        ___D: ::fidl_next::Decoder<'de> + ?Sized,
1226        ___D: ::fidl_next::fuchsia::HandleDecoder,
1227    {
1228        fn decode(
1229            slot: ::fidl_next::Slot<'_, Self>,
1230            decoder: &mut ___D,
1231            _: (),
1232        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1233            ::fidl_next::munge!(let Self { table } = slot);
1234
1235            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1236                match ordinal {
1237                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1238
1239                    1 => {
1240                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::ViewRef>(
1241                            slot.as_mut(),
1242                            decoder,
1243                            (),
1244                        )?;
1245
1246                        Ok(())
1247                    }
1248
1249                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1250                }
1251            })
1252        }
1253    }
1254
1255    impl<'de> FocuserSetAutoFocusRequest<'de> {
1256        pub fn view_ref(&self) -> ::core::option::Option<&crate::wire::ViewRef> {
1257            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1258        }
1259
1260        pub fn take_view_ref(&mut self) -> ::core::option::Option<crate::wire::ViewRef> {
1261            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1262        }
1263    }
1264
1265    impl<'de> ::core::fmt::Debug for FocuserSetAutoFocusRequest<'de> {
1266        fn fmt(
1267            &self,
1268            f: &mut ::core::fmt::Formatter<'_>,
1269        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1270            f.debug_struct("FocuserSetAutoFocusRequest")
1271                .field("view_ref", &self.view_ref())
1272                .finish()
1273        }
1274    }
1275
1276    impl<'de> ::fidl_next::IntoNatural for FocuserSetAutoFocusRequest<'de> {
1277        type Natural = crate::natural::FocuserSetAutoFocusRequest;
1278    }
1279
1280    /// The wire type corresponding to [`ViewToken`].
1281    #[derive(Debug)]
1282    #[repr(C)]
1283    pub struct ViewToken {
1284        pub value: ::fidl_next::wire::fuchsia::EventPair,
1285    }
1286
1287    static_assertions::const_assert_eq!(std::mem::size_of::<ViewToken>(), 4);
1288    static_assertions::const_assert_eq!(std::mem::align_of::<ViewToken>(), 4);
1289
1290    static_assertions::const_assert_eq!(std::mem::offset_of!(ViewToken, value), 0);
1291
1292    impl ::fidl_next::Constrained for ViewToken {
1293        type Constraint = ();
1294
1295        fn validate(
1296            _: ::fidl_next::Slot<'_, Self>,
1297            _: Self::Constraint,
1298        ) -> Result<(), ::fidl_next::ValidationError> {
1299            Ok(())
1300        }
1301    }
1302
1303    unsafe impl ::fidl_next::Wire for ViewToken {
1304        type Narrowed<'de> = ViewToken;
1305
1306        #[inline]
1307        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1308            ::fidl_next::munge! {
1309                let Self {
1310                    value,
1311
1312                } = &mut *out_;
1313            }
1314
1315            ::fidl_next::Wire::zero_padding(value);
1316        }
1317    }
1318
1319    unsafe impl<___D> ::fidl_next::Decode<___D> for ViewToken
1320    where
1321        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1322        ___D: ::fidl_next::fuchsia::HandleDecoder,
1323    {
1324        fn decode(
1325            slot_: ::fidl_next::Slot<'_, Self>,
1326            decoder_: &mut ___D,
1327            _: (),
1328        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1329            ::fidl_next::munge! {
1330                let Self {
1331                    mut value,
1332
1333                } = slot_;
1334            }
1335
1336            let _field = value.as_mut();
1337
1338            ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
1339
1340            Ok(())
1341        }
1342    }
1343
1344    impl ::fidl_next::IntoNatural for ViewToken {
1345        type Natural = crate::natural::ViewToken;
1346    }
1347
1348    /// The wire type corresponding to [`ViewPresentRequest`].
1349    #[derive(Debug)]
1350    #[repr(C)]
1351    pub struct ViewPresentRequest {
1352        pub view_token: crate::wire::ViewToken,
1353    }
1354
1355    static_assertions::const_assert_eq!(std::mem::size_of::<ViewPresentRequest>(), 4);
1356    static_assertions::const_assert_eq!(std::mem::align_of::<ViewPresentRequest>(), 4);
1357
1358    static_assertions::const_assert_eq!(std::mem::offset_of!(ViewPresentRequest, view_token), 0);
1359
1360    impl ::fidl_next::Constrained for ViewPresentRequest {
1361        type Constraint = ();
1362
1363        fn validate(
1364            _: ::fidl_next::Slot<'_, Self>,
1365            _: Self::Constraint,
1366        ) -> Result<(), ::fidl_next::ValidationError> {
1367            Ok(())
1368        }
1369    }
1370
1371    unsafe impl ::fidl_next::Wire for ViewPresentRequest {
1372        type Narrowed<'de> = ViewPresentRequest;
1373
1374        #[inline]
1375        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1376            ::fidl_next::munge! {
1377                let Self {
1378                    view_token,
1379
1380                } = &mut *out_;
1381            }
1382
1383            ::fidl_next::Wire::zero_padding(view_token);
1384        }
1385    }
1386
1387    unsafe impl<___D> ::fidl_next::Decode<___D> for ViewPresentRequest
1388    where
1389        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1390        ___D: ::fidl_next::fuchsia::HandleDecoder,
1391    {
1392        fn decode(
1393            slot_: ::fidl_next::Slot<'_, Self>,
1394            decoder_: &mut ___D,
1395            _: (),
1396        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1397            ::fidl_next::munge! {
1398                let Self {
1399                    mut view_token,
1400
1401                } = slot_;
1402            }
1403
1404            let _field = view_token.as_mut();
1405
1406            ::fidl_next::Decode::decode(view_token.as_mut(), decoder_, ())?;
1407
1408            Ok(())
1409        }
1410    }
1411
1412    impl ::fidl_next::IntoNatural for ViewPresentRequest {
1413        type Natural = crate::natural::ViewPresentRequest;
1414    }
1415
1416    /// The wire type corresponding to [`ViewCreationToken`].
1417    #[derive(Debug)]
1418    #[repr(C)]
1419    pub struct ViewCreationToken {
1420        pub value: ::fidl_next::wire::fuchsia::Channel,
1421    }
1422
1423    static_assertions::const_assert_eq!(std::mem::size_of::<ViewCreationToken>(), 4);
1424    static_assertions::const_assert_eq!(std::mem::align_of::<ViewCreationToken>(), 4);
1425
1426    static_assertions::const_assert_eq!(std::mem::offset_of!(ViewCreationToken, value), 0);
1427
1428    impl ::fidl_next::Constrained for ViewCreationToken {
1429        type Constraint = ();
1430
1431        fn validate(
1432            _: ::fidl_next::Slot<'_, Self>,
1433            _: Self::Constraint,
1434        ) -> Result<(), ::fidl_next::ValidationError> {
1435            Ok(())
1436        }
1437    }
1438
1439    unsafe impl ::fidl_next::Wire for ViewCreationToken {
1440        type Narrowed<'de> = ViewCreationToken;
1441
1442        #[inline]
1443        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1444            ::fidl_next::munge! {
1445                let Self {
1446                    value,
1447
1448                } = &mut *out_;
1449            }
1450
1451            ::fidl_next::Wire::zero_padding(value);
1452        }
1453    }
1454
1455    unsafe impl<___D> ::fidl_next::Decode<___D> for ViewCreationToken
1456    where
1457        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1458        ___D: ::fidl_next::fuchsia::HandleDecoder,
1459    {
1460        fn decode(
1461            slot_: ::fidl_next::Slot<'_, Self>,
1462            decoder_: &mut ___D,
1463            _: (),
1464        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1465            ::fidl_next::munge! {
1466                let Self {
1467                    mut value,
1468
1469                } = slot_;
1470            }
1471
1472            let _field = value.as_mut();
1473
1474            ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
1475
1476            Ok(())
1477        }
1478    }
1479
1480    impl ::fidl_next::IntoNatural for ViewCreationToken {
1481        type Natural = crate::natural::ViewCreationToken;
1482    }
1483
1484    /// The wire type corresponding to [`ViewHolderToken`].
1485    #[derive(Debug)]
1486    #[repr(C)]
1487    pub struct ViewHolderToken {
1488        pub value: ::fidl_next::wire::fuchsia::EventPair,
1489    }
1490
1491    static_assertions::const_assert_eq!(std::mem::size_of::<ViewHolderToken>(), 4);
1492    static_assertions::const_assert_eq!(std::mem::align_of::<ViewHolderToken>(), 4);
1493
1494    static_assertions::const_assert_eq!(std::mem::offset_of!(ViewHolderToken, value), 0);
1495
1496    impl ::fidl_next::Constrained for ViewHolderToken {
1497        type Constraint = ();
1498
1499        fn validate(
1500            _: ::fidl_next::Slot<'_, Self>,
1501            _: Self::Constraint,
1502        ) -> Result<(), ::fidl_next::ValidationError> {
1503            Ok(())
1504        }
1505    }
1506
1507    unsafe impl ::fidl_next::Wire for ViewHolderToken {
1508        type Narrowed<'de> = ViewHolderToken;
1509
1510        #[inline]
1511        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1512            ::fidl_next::munge! {
1513                let Self {
1514                    value,
1515
1516                } = &mut *out_;
1517            }
1518
1519            ::fidl_next::Wire::zero_padding(value);
1520        }
1521    }
1522
1523    unsafe impl<___D> ::fidl_next::Decode<___D> for ViewHolderToken
1524    where
1525        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1526        ___D: ::fidl_next::fuchsia::HandleDecoder,
1527    {
1528        fn decode(
1529            slot_: ::fidl_next::Slot<'_, Self>,
1530            decoder_: &mut ___D,
1531            _: (),
1532        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1533            ::fidl_next::munge! {
1534                let Self {
1535                    mut value,
1536
1537                } = slot_;
1538            }
1539
1540            let _field = value.as_mut();
1541
1542            ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
1543
1544            Ok(())
1545        }
1546    }
1547
1548    impl ::fidl_next::IntoNatural for ViewHolderToken {
1549        type Natural = crate::natural::ViewHolderToken;
1550    }
1551
1552    /// The wire type corresponding to [`ViewRefControl`].
1553    #[derive(Debug)]
1554    #[repr(C)]
1555    pub struct ViewRefControl {
1556        pub reference: ::fidl_next::wire::fuchsia::EventPair,
1557    }
1558
1559    static_assertions::const_assert_eq!(std::mem::size_of::<ViewRefControl>(), 4);
1560    static_assertions::const_assert_eq!(std::mem::align_of::<ViewRefControl>(), 4);
1561
1562    static_assertions::const_assert_eq!(std::mem::offset_of!(ViewRefControl, reference), 0);
1563
1564    impl ::fidl_next::Constrained for ViewRefControl {
1565        type Constraint = ();
1566
1567        fn validate(
1568            _: ::fidl_next::Slot<'_, Self>,
1569            _: Self::Constraint,
1570        ) -> Result<(), ::fidl_next::ValidationError> {
1571            Ok(())
1572        }
1573    }
1574
1575    unsafe impl ::fidl_next::Wire for ViewRefControl {
1576        type Narrowed<'de> = ViewRefControl;
1577
1578        #[inline]
1579        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1580            ::fidl_next::munge! {
1581                let Self {
1582                    reference,
1583
1584                } = &mut *out_;
1585            }
1586
1587            ::fidl_next::Wire::zero_padding(reference);
1588        }
1589    }
1590
1591    unsafe impl<___D> ::fidl_next::Decode<___D> for ViewRefControl
1592    where
1593        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1594        ___D: ::fidl_next::fuchsia::HandleDecoder,
1595    {
1596        fn decode(
1597            slot_: ::fidl_next::Slot<'_, Self>,
1598            decoder_: &mut ___D,
1599            _: (),
1600        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1601            ::fidl_next::munge! {
1602                let Self {
1603                    mut reference,
1604
1605                } = slot_;
1606            }
1607
1608            let _field = reference.as_mut();
1609
1610            ::fidl_next::Decode::decode(reference.as_mut(), decoder_, ())?;
1611
1612            Ok(())
1613        }
1614    }
1615
1616    impl ::fidl_next::IntoNatural for ViewRefControl {
1617        type Natural = crate::natural::ViewRefControl;
1618    }
1619
1620    /// The wire type corresponding to [`ViewIdentityOnCreation`].
1621    #[derive(Debug)]
1622    #[repr(C)]
1623    pub struct ViewIdentityOnCreation {
1624        pub view_ref: crate::wire::ViewRef,
1625
1626        pub view_ref_control: crate::wire::ViewRefControl,
1627    }
1628
1629    static_assertions::const_assert_eq!(std::mem::size_of::<ViewIdentityOnCreation>(), 8);
1630    static_assertions::const_assert_eq!(std::mem::align_of::<ViewIdentityOnCreation>(), 4);
1631
1632    static_assertions::const_assert_eq!(std::mem::offset_of!(ViewIdentityOnCreation, view_ref), 0);
1633
1634    static_assertions::const_assert_eq!(
1635        std::mem::offset_of!(ViewIdentityOnCreation, view_ref_control),
1636        4
1637    );
1638
1639    impl ::fidl_next::Constrained for ViewIdentityOnCreation {
1640        type Constraint = ();
1641
1642        fn validate(
1643            _: ::fidl_next::Slot<'_, Self>,
1644            _: Self::Constraint,
1645        ) -> Result<(), ::fidl_next::ValidationError> {
1646            Ok(())
1647        }
1648    }
1649
1650    unsafe impl ::fidl_next::Wire for ViewIdentityOnCreation {
1651        type Narrowed<'de> = ViewIdentityOnCreation;
1652
1653        #[inline]
1654        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1655            ::fidl_next::munge! {
1656                let Self {
1657                    view_ref,
1658                    view_ref_control,
1659
1660                } = &mut *out_;
1661            }
1662
1663            ::fidl_next::Wire::zero_padding(view_ref);
1664
1665            ::fidl_next::Wire::zero_padding(view_ref_control);
1666        }
1667    }
1668
1669    unsafe impl<___D> ::fidl_next::Decode<___D> for ViewIdentityOnCreation
1670    where
1671        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1672        ___D: ::fidl_next::fuchsia::HandleDecoder,
1673    {
1674        fn decode(
1675            slot_: ::fidl_next::Slot<'_, Self>,
1676            decoder_: &mut ___D,
1677            _: (),
1678        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1679            ::fidl_next::munge! {
1680                let Self {
1681                    mut view_ref,
1682                    mut view_ref_control,
1683
1684                } = slot_;
1685            }
1686
1687            let _field = view_ref.as_mut();
1688
1689            ::fidl_next::Decode::decode(view_ref.as_mut(), decoder_, ())?;
1690
1691            let _field = view_ref_control.as_mut();
1692
1693            ::fidl_next::Decode::decode(view_ref_control.as_mut(), decoder_, ())?;
1694
1695            Ok(())
1696        }
1697    }
1698
1699    impl ::fidl_next::IntoNatural for ViewIdentityOnCreation {
1700        type Natural = crate::natural::ViewIdentityOnCreation;
1701    }
1702
1703    /// The wire type corresponding to [`ViewRefInstalledWatchRequest`].
1704    #[derive(Debug)]
1705    #[repr(C)]
1706    pub struct ViewRefInstalledWatchRequest {
1707        pub view_ref: crate::wire::ViewRef,
1708    }
1709
1710    static_assertions::const_assert_eq!(std::mem::size_of::<ViewRefInstalledWatchRequest>(), 4);
1711    static_assertions::const_assert_eq!(std::mem::align_of::<ViewRefInstalledWatchRequest>(), 4);
1712
1713    static_assertions::const_assert_eq!(
1714        std::mem::offset_of!(ViewRefInstalledWatchRequest, view_ref),
1715        0
1716    );
1717
1718    impl ::fidl_next::Constrained for ViewRefInstalledWatchRequest {
1719        type Constraint = ();
1720
1721        fn validate(
1722            _: ::fidl_next::Slot<'_, Self>,
1723            _: Self::Constraint,
1724        ) -> Result<(), ::fidl_next::ValidationError> {
1725            Ok(())
1726        }
1727    }
1728
1729    unsafe impl ::fidl_next::Wire for ViewRefInstalledWatchRequest {
1730        type Narrowed<'de> = ViewRefInstalledWatchRequest;
1731
1732        #[inline]
1733        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1734            ::fidl_next::munge! {
1735                let Self {
1736                    view_ref,
1737
1738                } = &mut *out_;
1739            }
1740
1741            ::fidl_next::Wire::zero_padding(view_ref);
1742        }
1743    }
1744
1745    unsafe impl<___D> ::fidl_next::Decode<___D> for ViewRefInstalledWatchRequest
1746    where
1747        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1748        ___D: ::fidl_next::fuchsia::HandleDecoder,
1749    {
1750        fn decode(
1751            slot_: ::fidl_next::Slot<'_, Self>,
1752            decoder_: &mut ___D,
1753            _: (),
1754        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1755            ::fidl_next::munge! {
1756                let Self {
1757                    mut view_ref,
1758
1759                } = slot_;
1760            }
1761
1762            let _field = view_ref.as_mut();
1763
1764            ::fidl_next::Decode::decode(view_ref.as_mut(), decoder_, ())?;
1765
1766            Ok(())
1767        }
1768    }
1769
1770    impl ::fidl_next::IntoNatural for ViewRefInstalledWatchRequest {
1771        type Natural = crate::natural::ViewRefInstalledWatchRequest;
1772    }
1773
1774    /// The wire type corresponding to [`ViewportCreationToken`].
1775    #[derive(Debug)]
1776    #[repr(C)]
1777    pub struct ViewportCreationToken {
1778        pub value: ::fidl_next::wire::fuchsia::Channel,
1779    }
1780
1781    static_assertions::const_assert_eq!(std::mem::size_of::<ViewportCreationToken>(), 4);
1782    static_assertions::const_assert_eq!(std::mem::align_of::<ViewportCreationToken>(), 4);
1783
1784    static_assertions::const_assert_eq!(std::mem::offset_of!(ViewportCreationToken, value), 0);
1785
1786    impl ::fidl_next::Constrained for ViewportCreationToken {
1787        type Constraint = ();
1788
1789        fn validate(
1790            _: ::fidl_next::Slot<'_, Self>,
1791            _: Self::Constraint,
1792        ) -> Result<(), ::fidl_next::ValidationError> {
1793            Ok(())
1794        }
1795    }
1796
1797    unsafe impl ::fidl_next::Wire for ViewportCreationToken {
1798        type Narrowed<'de> = ViewportCreationToken;
1799
1800        #[inline]
1801        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1802            ::fidl_next::munge! {
1803                let Self {
1804                    value,
1805
1806                } = &mut *out_;
1807            }
1808
1809            ::fidl_next::Wire::zero_padding(value);
1810        }
1811    }
1812
1813    unsafe impl<___D> ::fidl_next::Decode<___D> for ViewportCreationToken
1814    where
1815        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1816        ___D: ::fidl_next::fuchsia::HandleDecoder,
1817    {
1818        fn decode(
1819            slot_: ::fidl_next::Slot<'_, Self>,
1820            decoder_: &mut ___D,
1821            _: (),
1822        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1823            ::fidl_next::munge! {
1824                let Self {
1825                    mut value,
1826
1827                } = slot_;
1828            }
1829
1830            let _field = value.as_mut();
1831
1832            ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
1833
1834            Ok(())
1835        }
1836    }
1837
1838    impl ::fidl_next::IntoNatural for ViewportCreationToken {
1839        type Natural = crate::natural::ViewportCreationToken;
1840    }
1841}
1842
1843pub mod wire_optional {
1844
1845    pub use fidl_next_common_fuchsia_ui_views::wire_optional::*;
1846}
1847
1848pub mod generic {
1849
1850    pub use fidl_next_common_fuchsia_ui_views::generic::*;
1851
1852    /// The generic type corresponding to [`ViewRef`].
1853    pub struct ViewRef<T0> {
1854        pub reference: T0,
1855    }
1856
1857    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ViewRef, ___E> for ViewRef<T0>
1858    where
1859        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1860        ___E: ::fidl_next::fuchsia::HandleEncoder,
1861        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
1862    {
1863        #[inline]
1864        fn encode(
1865            self,
1866            encoder_: &mut ___E,
1867            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewRef>,
1868            _: (),
1869        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1870            ::fidl_next::munge! {
1871                let crate::wire::ViewRef {
1872                    reference,
1873
1874                } = out_;
1875            }
1876
1877            ::fidl_next::Encode::encode(self.reference, encoder_, reference, ())?;
1878
1879            Ok(())
1880        }
1881    }
1882
1883    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ViewRef, ___E> for &'a ViewRef<T0>
1884    where
1885        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1886        ___E: ::fidl_next::fuchsia::HandleEncoder,
1887        &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
1888    {
1889        #[inline]
1890        fn encode(
1891            self,
1892            encoder_: &mut ___E,
1893            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewRef>,
1894            _: (),
1895        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1896            ::fidl_next::munge! {
1897                let crate::wire::ViewRef {
1898                    reference,
1899
1900                } = out_;
1901            }
1902
1903            ::fidl_next::Encode::encode(&self.reference, encoder_, reference, ())?;
1904
1905            Ok(())
1906        }
1907    }
1908
1909    /// The generic type corresponding to [`FocuserRequestFocusRequest`].
1910    pub struct FocuserRequestFocusRequest<T0> {
1911        pub view_ref: T0,
1912    }
1913
1914    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FocuserRequestFocusRequest, ___E>
1915        for FocuserRequestFocusRequest<T0>
1916    where
1917        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1918        ___E: ::fidl_next::fuchsia::HandleEncoder,
1919        T0: ::fidl_next::Encode<crate::wire::ViewRef, ___E>,
1920    {
1921        #[inline]
1922        fn encode(
1923            self,
1924            encoder_: &mut ___E,
1925            out_: &mut ::core::mem::MaybeUninit<crate::wire::FocuserRequestFocusRequest>,
1926            _: (),
1927        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1928            ::fidl_next::munge! {
1929                let crate::wire::FocuserRequestFocusRequest {
1930                    view_ref,
1931
1932                } = out_;
1933            }
1934
1935            ::fidl_next::Encode::encode(self.view_ref, encoder_, view_ref, ())?;
1936
1937            Ok(())
1938        }
1939    }
1940
1941    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::FocuserRequestFocusRequest, ___E>
1942        for &'a FocuserRequestFocusRequest<T0>
1943    where
1944        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1945        ___E: ::fidl_next::fuchsia::HandleEncoder,
1946        &'a T0: ::fidl_next::Encode<crate::wire::ViewRef, ___E>,
1947    {
1948        #[inline]
1949        fn encode(
1950            self,
1951            encoder_: &mut ___E,
1952            out_: &mut ::core::mem::MaybeUninit<crate::wire::FocuserRequestFocusRequest>,
1953            _: (),
1954        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1955            ::fidl_next::munge! {
1956                let crate::wire::FocuserRequestFocusRequest {
1957                    view_ref,
1958
1959                } = out_;
1960            }
1961
1962            ::fidl_next::Encode::encode(&self.view_ref, encoder_, view_ref, ())?;
1963
1964            Ok(())
1965        }
1966    }
1967
1968    /// The generic type corresponding to [`ViewToken`].
1969    pub struct ViewToken<T0> {
1970        pub value: T0,
1971    }
1972
1973    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ViewToken, ___E> for ViewToken<T0>
1974    where
1975        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1976        ___E: ::fidl_next::fuchsia::HandleEncoder,
1977        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
1978    {
1979        #[inline]
1980        fn encode(
1981            self,
1982            encoder_: &mut ___E,
1983            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewToken>,
1984            _: (),
1985        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1986            ::fidl_next::munge! {
1987                let crate::wire::ViewToken {
1988                    value,
1989
1990                } = out_;
1991            }
1992
1993            ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
1994
1995            Ok(())
1996        }
1997    }
1998
1999    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ViewToken, ___E> for &'a ViewToken<T0>
2000    where
2001        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2002        ___E: ::fidl_next::fuchsia::HandleEncoder,
2003        &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
2004    {
2005        #[inline]
2006        fn encode(
2007            self,
2008            encoder_: &mut ___E,
2009            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewToken>,
2010            _: (),
2011        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2012            ::fidl_next::munge! {
2013                let crate::wire::ViewToken {
2014                    value,
2015
2016                } = out_;
2017            }
2018
2019            ::fidl_next::Encode::encode(&self.value, encoder_, value, ())?;
2020
2021            Ok(())
2022        }
2023    }
2024
2025    /// The generic type corresponding to [`ViewPresentRequest`].
2026    pub struct ViewPresentRequest<T0> {
2027        pub view_token: T0,
2028    }
2029
2030    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ViewPresentRequest, ___E>
2031        for ViewPresentRequest<T0>
2032    where
2033        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2034        ___E: ::fidl_next::fuchsia::HandleEncoder,
2035        T0: ::fidl_next::Encode<crate::wire::ViewToken, ___E>,
2036    {
2037        #[inline]
2038        fn encode(
2039            self,
2040            encoder_: &mut ___E,
2041            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewPresentRequest>,
2042            _: (),
2043        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2044            ::fidl_next::munge! {
2045                let crate::wire::ViewPresentRequest {
2046                    view_token,
2047
2048                } = out_;
2049            }
2050
2051            ::fidl_next::Encode::encode(self.view_token, encoder_, view_token, ())?;
2052
2053            Ok(())
2054        }
2055    }
2056
2057    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ViewPresentRequest, ___E>
2058        for &'a ViewPresentRequest<T0>
2059    where
2060        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2061        ___E: ::fidl_next::fuchsia::HandleEncoder,
2062        &'a T0: ::fidl_next::Encode<crate::wire::ViewToken, ___E>,
2063    {
2064        #[inline]
2065        fn encode(
2066            self,
2067            encoder_: &mut ___E,
2068            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewPresentRequest>,
2069            _: (),
2070        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2071            ::fidl_next::munge! {
2072                let crate::wire::ViewPresentRequest {
2073                    view_token,
2074
2075                } = out_;
2076            }
2077
2078            ::fidl_next::Encode::encode(&self.view_token, encoder_, view_token, ())?;
2079
2080            Ok(())
2081        }
2082    }
2083
2084    /// The generic type corresponding to [`ViewCreationToken`].
2085    pub struct ViewCreationToken<T0> {
2086        pub value: T0,
2087    }
2088
2089    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ViewCreationToken, ___E>
2090        for ViewCreationToken<T0>
2091    where
2092        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2093        ___E: ::fidl_next::fuchsia::HandleEncoder,
2094        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
2095    {
2096        #[inline]
2097        fn encode(
2098            self,
2099            encoder_: &mut ___E,
2100            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewCreationToken>,
2101            _: (),
2102        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2103            ::fidl_next::munge! {
2104                let crate::wire::ViewCreationToken {
2105                    value,
2106
2107                } = out_;
2108            }
2109
2110            ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
2111
2112            Ok(())
2113        }
2114    }
2115
2116    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ViewCreationToken, ___E>
2117        for &'a ViewCreationToken<T0>
2118    where
2119        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2120        ___E: ::fidl_next::fuchsia::HandleEncoder,
2121        &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
2122    {
2123        #[inline]
2124        fn encode(
2125            self,
2126            encoder_: &mut ___E,
2127            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewCreationToken>,
2128            _: (),
2129        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2130            ::fidl_next::munge! {
2131                let crate::wire::ViewCreationToken {
2132                    value,
2133
2134                } = out_;
2135            }
2136
2137            ::fidl_next::Encode::encode(&self.value, encoder_, value, ())?;
2138
2139            Ok(())
2140        }
2141    }
2142
2143    /// The generic type corresponding to [`ViewHolderToken`].
2144    pub struct ViewHolderToken<T0> {
2145        pub value: T0,
2146    }
2147
2148    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ViewHolderToken, ___E>
2149        for ViewHolderToken<T0>
2150    where
2151        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2152        ___E: ::fidl_next::fuchsia::HandleEncoder,
2153        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
2154    {
2155        #[inline]
2156        fn encode(
2157            self,
2158            encoder_: &mut ___E,
2159            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewHolderToken>,
2160            _: (),
2161        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2162            ::fidl_next::munge! {
2163                let crate::wire::ViewHolderToken {
2164                    value,
2165
2166                } = out_;
2167            }
2168
2169            ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
2170
2171            Ok(())
2172        }
2173    }
2174
2175    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ViewHolderToken, ___E>
2176        for &'a ViewHolderToken<T0>
2177    where
2178        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2179        ___E: ::fidl_next::fuchsia::HandleEncoder,
2180        &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
2181    {
2182        #[inline]
2183        fn encode(
2184            self,
2185            encoder_: &mut ___E,
2186            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewHolderToken>,
2187            _: (),
2188        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2189            ::fidl_next::munge! {
2190                let crate::wire::ViewHolderToken {
2191                    value,
2192
2193                } = out_;
2194            }
2195
2196            ::fidl_next::Encode::encode(&self.value, encoder_, value, ())?;
2197
2198            Ok(())
2199        }
2200    }
2201
2202    /// The generic type corresponding to [`ViewRefControl`].
2203    pub struct ViewRefControl<T0> {
2204        pub reference: T0,
2205    }
2206
2207    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ViewRefControl, ___E> for ViewRefControl<T0>
2208    where
2209        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2210        ___E: ::fidl_next::fuchsia::HandleEncoder,
2211        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
2212    {
2213        #[inline]
2214        fn encode(
2215            self,
2216            encoder_: &mut ___E,
2217            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewRefControl>,
2218            _: (),
2219        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2220            ::fidl_next::munge! {
2221                let crate::wire::ViewRefControl {
2222                    reference,
2223
2224                } = out_;
2225            }
2226
2227            ::fidl_next::Encode::encode(self.reference, encoder_, reference, ())?;
2228
2229            Ok(())
2230        }
2231    }
2232
2233    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ViewRefControl, ___E>
2234        for &'a ViewRefControl<T0>
2235    where
2236        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2237        ___E: ::fidl_next::fuchsia::HandleEncoder,
2238        &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
2239    {
2240        #[inline]
2241        fn encode(
2242            self,
2243            encoder_: &mut ___E,
2244            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewRefControl>,
2245            _: (),
2246        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2247            ::fidl_next::munge! {
2248                let crate::wire::ViewRefControl {
2249                    reference,
2250
2251                } = out_;
2252            }
2253
2254            ::fidl_next::Encode::encode(&self.reference, encoder_, reference, ())?;
2255
2256            Ok(())
2257        }
2258    }
2259
2260    /// The generic type corresponding to [`ViewIdentityOnCreation`].
2261    pub struct ViewIdentityOnCreation<T0, T1> {
2262        pub view_ref: T0,
2263
2264        pub view_ref_control: T1,
2265    }
2266
2267    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ViewIdentityOnCreation, ___E>
2268        for ViewIdentityOnCreation<T0, T1>
2269    where
2270        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2271        ___E: ::fidl_next::fuchsia::HandleEncoder,
2272        T0: ::fidl_next::Encode<crate::wire::ViewRef, ___E>,
2273        T1: ::fidl_next::Encode<crate::wire::ViewRefControl, ___E>,
2274    {
2275        #[inline]
2276        fn encode(
2277            self,
2278            encoder_: &mut ___E,
2279            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewIdentityOnCreation>,
2280            _: (),
2281        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2282            ::fidl_next::munge! {
2283                let crate::wire::ViewIdentityOnCreation {
2284                    view_ref,
2285                    view_ref_control,
2286
2287                } = out_;
2288            }
2289
2290            ::fidl_next::Encode::encode(self.view_ref, encoder_, view_ref, ())?;
2291
2292            ::fidl_next::Encode::encode(self.view_ref_control, encoder_, view_ref_control, ())?;
2293
2294            Ok(())
2295        }
2296    }
2297
2298    unsafe impl<'a, ___E, T0, T1> ::fidl_next::Encode<crate::wire::ViewIdentityOnCreation, ___E>
2299        for &'a ViewIdentityOnCreation<T0, T1>
2300    where
2301        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2302        ___E: ::fidl_next::fuchsia::HandleEncoder,
2303        &'a T0: ::fidl_next::Encode<crate::wire::ViewRef, ___E>,
2304        &'a T1: ::fidl_next::Encode<crate::wire::ViewRefControl, ___E>,
2305    {
2306        #[inline]
2307        fn encode(
2308            self,
2309            encoder_: &mut ___E,
2310            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewIdentityOnCreation>,
2311            _: (),
2312        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2313            ::fidl_next::munge! {
2314                let crate::wire::ViewIdentityOnCreation {
2315                    view_ref,
2316                    view_ref_control,
2317
2318                } = out_;
2319            }
2320
2321            ::fidl_next::Encode::encode(&self.view_ref, encoder_, view_ref, ())?;
2322
2323            ::fidl_next::Encode::encode(&self.view_ref_control, encoder_, view_ref_control, ())?;
2324
2325            Ok(())
2326        }
2327    }
2328
2329    /// The generic type corresponding to [`ViewRefInstalledWatchRequest`].
2330    pub struct ViewRefInstalledWatchRequest<T0> {
2331        pub view_ref: T0,
2332    }
2333
2334    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ViewRefInstalledWatchRequest, ___E>
2335        for ViewRefInstalledWatchRequest<T0>
2336    where
2337        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2338        ___E: ::fidl_next::fuchsia::HandleEncoder,
2339        T0: ::fidl_next::Encode<crate::wire::ViewRef, ___E>,
2340    {
2341        #[inline]
2342        fn encode(
2343            self,
2344            encoder_: &mut ___E,
2345            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewRefInstalledWatchRequest>,
2346            _: (),
2347        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2348            ::fidl_next::munge! {
2349                let crate::wire::ViewRefInstalledWatchRequest {
2350                    view_ref,
2351
2352                } = out_;
2353            }
2354
2355            ::fidl_next::Encode::encode(self.view_ref, encoder_, view_ref, ())?;
2356
2357            Ok(())
2358        }
2359    }
2360
2361    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ViewRefInstalledWatchRequest, ___E>
2362        for &'a ViewRefInstalledWatchRequest<T0>
2363    where
2364        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2365        ___E: ::fidl_next::fuchsia::HandleEncoder,
2366        &'a T0: ::fidl_next::Encode<crate::wire::ViewRef, ___E>,
2367    {
2368        #[inline]
2369        fn encode(
2370            self,
2371            encoder_: &mut ___E,
2372            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewRefInstalledWatchRequest>,
2373            _: (),
2374        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2375            ::fidl_next::munge! {
2376                let crate::wire::ViewRefInstalledWatchRequest {
2377                    view_ref,
2378
2379                } = out_;
2380            }
2381
2382            ::fidl_next::Encode::encode(&self.view_ref, encoder_, view_ref, ())?;
2383
2384            Ok(())
2385        }
2386    }
2387
2388    /// The generic type corresponding to [`ViewportCreationToken`].
2389    pub struct ViewportCreationToken<T0> {
2390        pub value: T0,
2391    }
2392
2393    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ViewportCreationToken, ___E>
2394        for ViewportCreationToken<T0>
2395    where
2396        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2397        ___E: ::fidl_next::fuchsia::HandleEncoder,
2398        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
2399    {
2400        #[inline]
2401        fn encode(
2402            self,
2403            encoder_: &mut ___E,
2404            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewportCreationToken>,
2405            _: (),
2406        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2407            ::fidl_next::munge! {
2408                let crate::wire::ViewportCreationToken {
2409                    value,
2410
2411                } = out_;
2412            }
2413
2414            ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
2415
2416            Ok(())
2417        }
2418    }
2419
2420    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ViewportCreationToken, ___E>
2421        for &'a ViewportCreationToken<T0>
2422    where
2423        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2424        ___E: ::fidl_next::fuchsia::HandleEncoder,
2425        &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
2426    {
2427        #[inline]
2428        fn encode(
2429            self,
2430            encoder_: &mut ___E,
2431            out_: &mut ::core::mem::MaybeUninit<crate::wire::ViewportCreationToken>,
2432            _: (),
2433        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2434            ::fidl_next::munge! {
2435                let crate::wire::ViewportCreationToken {
2436                    value,
2437
2438                } = out_;
2439            }
2440
2441            ::fidl_next::Encode::encode(&self.value, encoder_, value, ())?;
2442
2443            Ok(())
2444        }
2445    }
2446}
2447
2448pub use self::natural::*;
2449
2450/// The type corresponding to the Focuser protocol.
2451#[doc = " A method of programmatically transferring View focus.\n\n The protocol client has implicit access to a requester ViewRef, which is\n used as the basis for request authority.\n"]
2452#[derive(PartialEq, Debug)]
2453pub struct Focuser;
2454
2455#[cfg(target_os = "fuchsia")]
2456impl ::fidl_next::HasTransport for Focuser {
2457    type Transport = ::fidl_next::fuchsia::zx::Channel;
2458}
2459
2460pub mod focuser {
2461    pub mod prelude {
2462        pub use crate::{
2463            Focuser, FocuserClientHandler, FocuserLocalClientHandler, FocuserLocalServerHandler,
2464            FocuserServerHandler, focuser,
2465        };
2466
2467        pub use crate::natural::AutoFocusError;
2468
2469        pub use crate::natural::Error;
2470
2471        pub use crate::natural::FocuserRequestFocusRequest;
2472
2473        pub use crate::natural::FocuserSetAutoFocusRequest;
2474
2475        pub use crate::natural::FocuserRequestFocusResponse;
2476
2477        pub use crate::natural::FocuserSetAutoFocusResponse;
2478    }
2479
2480    pub struct RequestFocus;
2481
2482    impl ::fidl_next::Method for RequestFocus {
2483        const ORDINAL: u64 = 385346384312702933;
2484        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2485            ::fidl_next::protocol::Flexibility::Strict;
2486
2487        type Protocol = crate::Focuser;
2488
2489        type Request = crate::wire::FocuserRequestFocusRequest;
2490    }
2491
2492    impl ::fidl_next::TwoWayMethod for RequestFocus {
2493        type Response = ::fidl_next::wire::Result<
2494            'static,
2495            crate::wire::FocuserRequestFocusResponse,
2496            crate::wire::Error,
2497        >;
2498    }
2499
2500    impl<___R> ::fidl_next::Respond<___R> for RequestFocus {
2501        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
2502
2503        fn respond(response: ___R) -> Self::Output {
2504            ::core::result::Result::Ok(response)
2505        }
2506    }
2507
2508    impl<___R> ::fidl_next::RespondErr<___R> for RequestFocus {
2509        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
2510
2511        fn respond_err(response: ___R) -> Self::Output {
2512            ::core::result::Result::Err(response)
2513        }
2514    }
2515
2516    pub struct SetAutoFocus;
2517
2518    impl ::fidl_next::Method for SetAutoFocus {
2519        const ORDINAL: u64 = 5192627660017276169;
2520        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2521            ::fidl_next::protocol::Flexibility::Strict;
2522
2523        type Protocol = crate::Focuser;
2524
2525        type Request = crate::wire::FocuserSetAutoFocusRequest<'static>;
2526    }
2527
2528    impl ::fidl_next::TwoWayMethod for SetAutoFocus {
2529        type Response = ::fidl_next::wire::Result<
2530            'static,
2531            crate::wire::FocuserSetAutoFocusResponse,
2532            crate::wire::AutoFocusError,
2533        >;
2534    }
2535
2536    impl<___R> ::fidl_next::Respond<___R> for SetAutoFocus {
2537        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
2538
2539        fn respond(response: ___R) -> Self::Output {
2540            ::core::result::Result::Ok(response)
2541        }
2542    }
2543
2544    impl<___R> ::fidl_next::RespondErr<___R> for SetAutoFocus {
2545        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
2546
2547        fn respond_err(response: ___R) -> Self::Output {
2548            ::core::result::Result::Err(response)
2549        }
2550    }
2551
2552    mod ___detail {
2553        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Focuser
2554        where
2555            ___T: ::fidl_next::Transport,
2556        {
2557            type Client = FocuserClient<___T>;
2558            type Server = FocuserServer<___T>;
2559        }
2560
2561        /// The client for the `Focuser` protocol.
2562        #[repr(transparent)]
2563        pub struct FocuserClient<___T: ::fidl_next::Transport> {
2564            #[allow(dead_code)]
2565            client: ::fidl_next::protocol::Client<___T>,
2566        }
2567
2568        impl<___T> FocuserClient<___T>
2569        where
2570            ___T: ::fidl_next::Transport,
2571        {
2572            #[doc = " Asks the server to transfer focus to the View specified by `view_ref`,\n with the authority of the requester ViewRef. Such a request may be\n honored or denied.\n\n If the request was honored, and it triggers a focus change, a FocusEvent\n (with focused=true) is issued to the newly-focused View, and a\n FocusEvent (with focused=false) is issued to the previous View.\n\n The result callback indicates that the request was received and honored.\n It does not guarantee that the requested View actually received a\n FocusEvent in time.\n\n The request may be denied for many reasons, for example:\n - if `view_ref` is invalid\n - if there is no View backed by `view_ref`\n - if there is no requester ViewRef accessible to Focuser\n - if the requester ViewRef lacks authority over `view_ref`\'s View\n - if `view_ref`\'s View is not hittable or may not receive focus\n etc. A denied request is indicated with a Error.\n"]
2573            pub fn request_focus(
2574                &self,
2575
2576                view_ref: impl ::fidl_next::Encode<
2577                    crate::wire::ViewRef,
2578                    <___T as ::fidl_next::Transport>::SendBuffer,
2579                >,
2580            ) -> ::fidl_next::TwoWayFuture<'_, super::RequestFocus, ___T>
2581            where
2582                <___T as ::fidl_next::Transport>::SendBuffer:
2583                    ::fidl_next::encoder::InternalHandleEncoder,
2584                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2585            {
2586                self.request_focus_with(crate::generic::FocuserRequestFocusRequest { view_ref })
2587            }
2588
2589            #[doc = " Asks the server to transfer focus to the View specified by `view_ref`,\n with the authority of the requester ViewRef. Such a request may be\n honored or denied.\n\n If the request was honored, and it triggers a focus change, a FocusEvent\n (with focused=true) is issued to the newly-focused View, and a\n FocusEvent (with focused=false) is issued to the previous View.\n\n The result callback indicates that the request was received and honored.\n It does not guarantee that the requested View actually received a\n FocusEvent in time.\n\n The request may be denied for many reasons, for example:\n - if `view_ref` is invalid\n - if there is no View backed by `view_ref`\n - if there is no requester ViewRef accessible to Focuser\n - if the requester ViewRef lacks authority over `view_ref`\'s View\n - if `view_ref`\'s View is not hittable or may not receive focus\n etc. A denied request is indicated with a Error.\n"]
2590            pub fn request_focus_with<___R>(
2591                &self,
2592                request: ___R,
2593            ) -> ::fidl_next::TwoWayFuture<'_, super::RequestFocus, ___T>
2594            where
2595                ___R: ::fidl_next::Encode<
2596                        crate::wire::FocuserRequestFocusRequest,
2597                        <___T as ::fidl_next::Transport>::SendBuffer,
2598                    >,
2599            {
2600                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2601                    385346384312702933,
2602                    <super::RequestFocus as ::fidl_next::Method>::FLEXIBILITY,
2603                    request,
2604                ))
2605            }
2606
2607            #[doc = " Sets the auto focus target to the View specified by `view_ref`.\n To unset the target, pass in an empty table.\n\n If a target has been set, then whenever the caller\'s View would receive\n focus, an attempt is made to transfer focus immediately to the target\n instead. If the target is unfocusable, the new target is the first\n focusable ancestor of the target instead. Setting an auto focus target\n places no limitations on simultaneous use of RequestFocus().\n\n An auto focus target is \"valid\" only while it is a descendant of the\n caller\'s View in the ViewTree. Specifying an invalid auto focus target is\n allowed, since it may become valid later.\n It is the client\'s responsibility to ensure the target is a valid\n receiver of auto focus.\n\n If the target is invalid when the auto focus behavior would trigger, then\n the attempt to move focus will silently fail and focus will remain with\n the caller\'s View.\n A target may become invalid and then become valid again any number of\n times; auto focus will continue to function whenever the target is\n in a valid state, and will continue to ignore the target while it\'s in an\n invalid state.\n\n If the focus would by some further automatic mechanism return to the\n caller\'s View (e.g. if the target is unfocusable), then focus will\n remain with the caller\'s View.\n\n AutoFocusError is currently never returned, and is reserved for possible\n future use.\n"]
2608            pub fn set_auto_focus_with<___R>(
2609                &self,
2610                request: ___R,
2611            ) -> ::fidl_next::TwoWayFuture<'_, super::SetAutoFocus, ___T>
2612            where
2613                ___R: ::fidl_next::Encode<
2614                        crate::wire::FocuserSetAutoFocusRequest<'static>,
2615                        <___T as ::fidl_next::Transport>::SendBuffer,
2616                    >,
2617            {
2618                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2619                    5192627660017276169,
2620                    <super::SetAutoFocus as ::fidl_next::Method>::FLEXIBILITY,
2621                    request,
2622                ))
2623            }
2624        }
2625
2626        /// The server for the `Focuser` protocol.
2627        #[repr(transparent)]
2628        pub struct FocuserServer<___T: ::fidl_next::Transport> {
2629            server: ::fidl_next::protocol::Server<___T>,
2630        }
2631
2632        impl<___T> FocuserServer<___T> where ___T: ::fidl_next::Transport {}
2633    }
2634}
2635
2636#[diagnostic::on_unimplemented(
2637    note = "If {Self} implements the non-local FocuserClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
2638)]
2639
2640/// A client handler for the Focuser protocol.
2641///
2642/// See [`Focuser`] for more details.
2643pub trait FocuserLocalClientHandler<
2644    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2645    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2646>
2647{
2648}
2649
2650impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Focuser
2651where
2652    ___H: FocuserLocalClientHandler<___T>,
2653    ___T: ::fidl_next::Transport,
2654{
2655    async fn on_event(
2656        handler: &mut ___H,
2657        mut message: ::fidl_next::Message<___T>,
2658    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2659        match *message.header().ordinal {
2660            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2661        }
2662    }
2663}
2664
2665#[diagnostic::on_unimplemented(
2666    note = "If {Self} implements the non-local FocuserServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2667)]
2668
2669/// A server handler for the Focuser protocol.
2670///
2671/// See [`Focuser`] for more details.
2672pub trait FocuserLocalServerHandler<
2673    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2674    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2675>
2676{
2677    #[doc = " Asks the server to transfer focus to the View specified by `view_ref`,\n with the authority of the requester ViewRef. Such a request may be\n honored or denied.\n\n If the request was honored, and it triggers a focus change, a FocusEvent\n (with focused=true) is issued to the newly-focused View, and a\n FocusEvent (with focused=false) is issued to the previous View.\n\n The result callback indicates that the request was received and honored.\n It does not guarantee that the requested View actually received a\n FocusEvent in time.\n\n The request may be denied for many reasons, for example:\n - if `view_ref` is invalid\n - if there is no View backed by `view_ref`\n - if there is no requester ViewRef accessible to Focuser\n - if the requester ViewRef lacks authority over `view_ref`\'s View\n - if `view_ref`\'s View is not hittable or may not receive focus\n etc. A denied request is indicated with a Error.\n"]
2678    fn request_focus(
2679        &mut self,
2680
2681        request: ::fidl_next::Request<focuser::RequestFocus, ___T>,
2682
2683        responder: ::fidl_next::Responder<focuser::RequestFocus, ___T>,
2684    ) -> impl ::core::future::Future<Output = ()>;
2685
2686    #[doc = " Sets the auto focus target to the View specified by `view_ref`.\n To unset the target, pass in an empty table.\n\n If a target has been set, then whenever the caller\'s View would receive\n focus, an attempt is made to transfer focus immediately to the target\n instead. If the target is unfocusable, the new target is the first\n focusable ancestor of the target instead. Setting an auto focus target\n places no limitations on simultaneous use of RequestFocus().\n\n An auto focus target is \"valid\" only while it is a descendant of the\n caller\'s View in the ViewTree. Specifying an invalid auto focus target is\n allowed, since it may become valid later.\n It is the client\'s responsibility to ensure the target is a valid\n receiver of auto focus.\n\n If the target is invalid when the auto focus behavior would trigger, then\n the attempt to move focus will silently fail and focus will remain with\n the caller\'s View.\n A target may become invalid and then become valid again any number of\n times; auto focus will continue to function whenever the target is\n in a valid state, and will continue to ignore the target while it\'s in an\n invalid state.\n\n If the focus would by some further automatic mechanism return to the\n caller\'s View (e.g. if the target is unfocusable), then focus will\n remain with the caller\'s View.\n\n AutoFocusError is currently never returned, and is reserved for possible\n future use.\n"]
2687    fn set_auto_focus(
2688        &mut self,
2689
2690        request: ::fidl_next::Request<focuser::SetAutoFocus, ___T>,
2691
2692        responder: ::fidl_next::Responder<focuser::SetAutoFocus, ___T>,
2693    ) -> impl ::core::future::Future<Output = ()>;
2694}
2695
2696impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Focuser
2697where
2698    ___H: FocuserLocalServerHandler<___T>,
2699    ___T: ::fidl_next::Transport,
2700    for<'de> crate::wire::FocuserRequestFocusRequest: ::fidl_next::Decode<
2701            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2702            Constraint = (),
2703        >,
2704    for<'de> crate::wire::FocuserSetAutoFocusRequest<'de>: ::fidl_next::Decode<
2705            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2706            Constraint = (),
2707        >,
2708{
2709    async fn on_one_way(
2710        handler: &mut ___H,
2711        mut message: ::fidl_next::Message<___T>,
2712    ) -> ::core::result::Result<
2713        (),
2714        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2715    > {
2716        match *message.header().ordinal {
2717            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2718        }
2719    }
2720
2721    async fn on_two_way(
2722        handler: &mut ___H,
2723        mut message: ::fidl_next::Message<___T>,
2724        responder: ::fidl_next::protocol::Responder<___T>,
2725    ) -> ::core::result::Result<
2726        (),
2727        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2728    > {
2729        match *message.header().ordinal {
2730            385346384312702933 => {
2731                let responder = ::fidl_next::Responder::from_untyped(responder);
2732
2733                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2734                    Ok(decoded) => {
2735                        handler
2736                            .request_focus(::fidl_next::Request::from_decoded(decoded), responder)
2737                            .await;
2738                        Ok(())
2739                    }
2740                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2741                        ordinal: 385346384312702933,
2742                        error,
2743                    }),
2744                }
2745            }
2746
2747            5192627660017276169 => {
2748                let responder = ::fidl_next::Responder::from_untyped(responder);
2749
2750                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2751                    Ok(decoded) => {
2752                        handler
2753                            .set_auto_focus(::fidl_next::Request::from_decoded(decoded), responder)
2754                            .await;
2755                        Ok(())
2756                    }
2757                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2758                        ordinal: 5192627660017276169,
2759                        error,
2760                    }),
2761                }
2762            }
2763
2764            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2765        }
2766    }
2767}
2768
2769/// A client handler for the Focuser protocol.
2770///
2771/// See [`Focuser`] for more details.
2772pub trait FocuserClientHandler<
2773    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2774    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2775>
2776{
2777}
2778
2779impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Focuser
2780where
2781    ___H: FocuserClientHandler<___T> + ::core::marker::Send,
2782    ___T: ::fidl_next::Transport,
2783{
2784    async fn on_event(
2785        handler: &mut ___H,
2786        mut message: ::fidl_next::Message<___T>,
2787    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2788        match *message.header().ordinal {
2789            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2790        }
2791    }
2792}
2793
2794/// A server handler for the Focuser protocol.
2795///
2796/// See [`Focuser`] for more details.
2797pub trait FocuserServerHandler<
2798    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2799    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2800>
2801{
2802    #[doc = " Asks the server to transfer focus to the View specified by `view_ref`,\n with the authority of the requester ViewRef. Such a request may be\n honored or denied.\n\n If the request was honored, and it triggers a focus change, a FocusEvent\n (with focused=true) is issued to the newly-focused View, and a\n FocusEvent (with focused=false) is issued to the previous View.\n\n The result callback indicates that the request was received and honored.\n It does not guarantee that the requested View actually received a\n FocusEvent in time.\n\n The request may be denied for many reasons, for example:\n - if `view_ref` is invalid\n - if there is no View backed by `view_ref`\n - if there is no requester ViewRef accessible to Focuser\n - if the requester ViewRef lacks authority over `view_ref`\'s View\n - if `view_ref`\'s View is not hittable or may not receive focus\n etc. A denied request is indicated with a Error.\n"]
2803    fn request_focus(
2804        &mut self,
2805
2806        request: ::fidl_next::Request<focuser::RequestFocus, ___T>,
2807
2808        responder: ::fidl_next::Responder<focuser::RequestFocus, ___T>,
2809    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2810
2811    #[doc = " Sets the auto focus target to the View specified by `view_ref`.\n To unset the target, pass in an empty table.\n\n If a target has been set, then whenever the caller\'s View would receive\n focus, an attempt is made to transfer focus immediately to the target\n instead. If the target is unfocusable, the new target is the first\n focusable ancestor of the target instead. Setting an auto focus target\n places no limitations on simultaneous use of RequestFocus().\n\n An auto focus target is \"valid\" only while it is a descendant of the\n caller\'s View in the ViewTree. Specifying an invalid auto focus target is\n allowed, since it may become valid later.\n It is the client\'s responsibility to ensure the target is a valid\n receiver of auto focus.\n\n If the target is invalid when the auto focus behavior would trigger, then\n the attempt to move focus will silently fail and focus will remain with\n the caller\'s View.\n A target may become invalid and then become valid again any number of\n times; auto focus will continue to function whenever the target is\n in a valid state, and will continue to ignore the target while it\'s in an\n invalid state.\n\n If the focus would by some further automatic mechanism return to the\n caller\'s View (e.g. if the target is unfocusable), then focus will\n remain with the caller\'s View.\n\n AutoFocusError is currently never returned, and is reserved for possible\n future use.\n"]
2812    fn set_auto_focus(
2813        &mut self,
2814
2815        request: ::fidl_next::Request<focuser::SetAutoFocus, ___T>,
2816
2817        responder: ::fidl_next::Responder<focuser::SetAutoFocus, ___T>,
2818    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2819}
2820
2821impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Focuser
2822where
2823    ___H: FocuserServerHandler<___T> + ::core::marker::Send,
2824    ___T: ::fidl_next::Transport,
2825    for<'de> crate::wire::FocuserRequestFocusRequest: ::fidl_next::Decode<
2826            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2827            Constraint = (),
2828        >,
2829    for<'de> crate::wire::FocuserSetAutoFocusRequest<'de>: ::fidl_next::Decode<
2830            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2831            Constraint = (),
2832        >,
2833{
2834    async fn on_one_way(
2835        handler: &mut ___H,
2836        mut message: ::fidl_next::Message<___T>,
2837    ) -> ::core::result::Result<
2838        (),
2839        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2840    > {
2841        match *message.header().ordinal {
2842            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2843        }
2844    }
2845
2846    async fn on_two_way(
2847        handler: &mut ___H,
2848        mut message: ::fidl_next::Message<___T>,
2849        responder: ::fidl_next::protocol::Responder<___T>,
2850    ) -> ::core::result::Result<
2851        (),
2852        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2853    > {
2854        match *message.header().ordinal {
2855            385346384312702933 => {
2856                let responder = ::fidl_next::Responder::from_untyped(responder);
2857
2858                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2859                    Ok(decoded) => {
2860                        handler
2861                            .request_focus(::fidl_next::Request::from_decoded(decoded), responder)
2862                            .await;
2863                        Ok(())
2864                    }
2865                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2866                        ordinal: 385346384312702933,
2867                        error,
2868                    }),
2869                }
2870            }
2871
2872            5192627660017276169 => {
2873                let responder = ::fidl_next::Responder::from_untyped(responder);
2874
2875                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2876                    Ok(decoded) => {
2877                        handler
2878                            .set_auto_focus(::fidl_next::Request::from_decoded(decoded), responder)
2879                            .await;
2880                        Ok(())
2881                    }
2882                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2883                        ordinal: 5192627660017276169,
2884                        error,
2885                    }),
2886                }
2887            }
2888
2889            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2890        }
2891    }
2892}
2893
2894impl<___T> FocuserClientHandler<___T> for ::fidl_next::IgnoreEvents where
2895    ___T: ::fidl_next::Transport
2896{
2897}
2898
2899impl<___H, ___T> FocuserLocalClientHandler<___T> for ::fidl_next::Local<___H>
2900where
2901    ___H: FocuserClientHandler<___T>,
2902    ___T: ::fidl_next::Transport,
2903{
2904}
2905
2906impl<___H, ___T> FocuserLocalServerHandler<___T> for ::fidl_next::Local<___H>
2907where
2908    ___H: FocuserServerHandler<___T>,
2909    ___T: ::fidl_next::Transport,
2910{
2911    async fn request_focus(
2912        &mut self,
2913
2914        request: ::fidl_next::Request<focuser::RequestFocus, ___T>,
2915
2916        responder: ::fidl_next::Responder<focuser::RequestFocus, ___T>,
2917    ) {
2918        ___H::request_focus(&mut self.0, request, responder).await
2919    }
2920
2921    async fn set_auto_focus(
2922        &mut self,
2923
2924        request: ::fidl_next::Request<focuser::SetAutoFocus, ___T>,
2925
2926        responder: ::fidl_next::Responder<focuser::SetAutoFocus, ___T>,
2927    ) {
2928        ___H::set_auto_focus(&mut self.0, request, responder).await
2929    }
2930}
2931
2932/// The type corresponding to the View protocol.
2933#[doc = " Deprecated API for view creation. DO NOT USE.\n"]
2934#[derive(PartialEq, Debug)]
2935pub struct View;
2936
2937impl ::fidl_next::Discoverable for View {
2938    const PROTOCOL_NAME: &'static str = "fuchsia.ui.views.View";
2939}
2940
2941#[cfg(target_os = "fuchsia")]
2942impl ::fidl_next::HasTransport for View {
2943    type Transport = ::fidl_next::fuchsia::zx::Channel;
2944}
2945
2946pub mod view {
2947    pub mod prelude {
2948        pub use crate::{
2949            View, ViewClientHandler, ViewLocalClientHandler, ViewLocalServerHandler,
2950            ViewServerHandler, view,
2951        };
2952
2953        pub use crate::natural::ViewPresentRequest;
2954    }
2955
2956    pub struct Present;
2957
2958    impl ::fidl_next::Method for Present {
2959        const ORDINAL: u64 = 7969378779654942110;
2960        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2961            ::fidl_next::protocol::Flexibility::Strict;
2962
2963        type Protocol = crate::View;
2964
2965        type Request = crate::wire::ViewPresentRequest;
2966    }
2967
2968    mod ___detail {
2969        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::View
2970        where
2971            ___T: ::fidl_next::Transport,
2972        {
2973            type Client = ViewClient<___T>;
2974            type Server = ViewServer<___T>;
2975        }
2976
2977        /// The client for the `View` protocol.
2978        #[repr(transparent)]
2979        pub struct ViewClient<___T: ::fidl_next::Transport> {
2980            #[allow(dead_code)]
2981            client: ::fidl_next::protocol::Client<___T>,
2982        }
2983
2984        impl<___T> ViewClient<___T>
2985        where
2986            ___T: ::fidl_next::Transport,
2987        {
2988            #[doc = " Provides the View with an attachment point to Scenic\'s scene graph.\n\n When `Present()` is called the View\'s implementation should create a\n View resource within Scenic by providing it with the `view_token` (using\n a `fuchsia.ui.gfx.CreateResourceCmd` and `fuchsia.ui.gfx.ViewArgs`).\n\n Then the implementation should attach its graphical content to the\n newly-created View resource using a `fuchsia.ui.gfx.AddChildCmd`.\n\n If the implementation already owns a View resource (because `Present()`\n had already been called before), then it should terminate the connection\n with an error.\n\n TODO(https://fxbug.dev/42098670): Allow re-parenting `View`s with a new `Present()` call.\n"]
2989            pub fn present(
2990                &self,
2991
2992                view_token: impl ::fidl_next::Encode<
2993                    crate::wire::ViewToken,
2994                    <___T as ::fidl_next::Transport>::SendBuffer,
2995                >,
2996            ) -> ::fidl_next::SendFuture<'_, ___T>
2997            where
2998                <___T as ::fidl_next::Transport>::SendBuffer:
2999                    ::fidl_next::encoder::InternalHandleEncoder,
3000                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3001            {
3002                self.present_with(crate::generic::ViewPresentRequest { view_token })
3003            }
3004
3005            #[doc = " Provides the View with an attachment point to Scenic\'s scene graph.\n\n When `Present()` is called the View\'s implementation should create a\n View resource within Scenic by providing it with the `view_token` (using\n a `fuchsia.ui.gfx.CreateResourceCmd` and `fuchsia.ui.gfx.ViewArgs`).\n\n Then the implementation should attach its graphical content to the\n newly-created View resource using a `fuchsia.ui.gfx.AddChildCmd`.\n\n If the implementation already owns a View resource (because `Present()`\n had already been called before), then it should terminate the connection\n with an error.\n\n TODO(https://fxbug.dev/42098670): Allow re-parenting `View`s with a new `Present()` call.\n"]
3006            pub fn present_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3007            where
3008                ___R: ::fidl_next::Encode<
3009                        crate::wire::ViewPresentRequest,
3010                        <___T as ::fidl_next::Transport>::SendBuffer,
3011                    >,
3012            {
3013                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3014                    7969378779654942110,
3015                    <super::Present as ::fidl_next::Method>::FLEXIBILITY,
3016                    request,
3017                ))
3018            }
3019        }
3020
3021        /// The server for the `View` protocol.
3022        #[repr(transparent)]
3023        pub struct ViewServer<___T: ::fidl_next::Transport> {
3024            server: ::fidl_next::protocol::Server<___T>,
3025        }
3026
3027        impl<___T> ViewServer<___T> where ___T: ::fidl_next::Transport {}
3028    }
3029}
3030
3031#[diagnostic::on_unimplemented(
3032    note = "If {Self} implements the non-local ViewClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3033)]
3034
3035/// A client handler for the View protocol.
3036///
3037/// See [`View`] for more details.
3038pub trait ViewLocalClientHandler<
3039    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3040    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3041>
3042{
3043}
3044
3045impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for View
3046where
3047    ___H: ViewLocalClientHandler<___T>,
3048    ___T: ::fidl_next::Transport,
3049{
3050    async fn on_event(
3051        handler: &mut ___H,
3052        mut message: ::fidl_next::Message<___T>,
3053    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3054        match *message.header().ordinal {
3055            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3056        }
3057    }
3058}
3059
3060#[diagnostic::on_unimplemented(
3061    note = "If {Self} implements the non-local ViewServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3062)]
3063
3064/// A server handler for the View protocol.
3065///
3066/// See [`View`] for more details.
3067pub trait ViewLocalServerHandler<
3068    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3069    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3070>
3071{
3072    #[doc = " Provides the View with an attachment point to Scenic\'s scene graph.\n\n When `Present()` is called the View\'s implementation should create a\n View resource within Scenic by providing it with the `view_token` (using\n a `fuchsia.ui.gfx.CreateResourceCmd` and `fuchsia.ui.gfx.ViewArgs`).\n\n Then the implementation should attach its graphical content to the\n newly-created View resource using a `fuchsia.ui.gfx.AddChildCmd`.\n\n If the implementation already owns a View resource (because `Present()`\n had already been called before), then it should terminate the connection\n with an error.\n\n TODO(https://fxbug.dev/42098670): Allow re-parenting `View`s with a new `Present()` call.\n"]
3073    fn present(
3074        &mut self,
3075
3076        request: ::fidl_next::Request<view::Present, ___T>,
3077    ) -> impl ::core::future::Future<Output = ()>;
3078}
3079
3080impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for View
3081where
3082    ___H: ViewLocalServerHandler<___T>,
3083    ___T: ::fidl_next::Transport,
3084    for<'de> crate::wire::ViewPresentRequest: ::fidl_next::Decode<
3085            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3086            Constraint = (),
3087        >,
3088{
3089    async fn on_one_way(
3090        handler: &mut ___H,
3091        mut message: ::fidl_next::Message<___T>,
3092    ) -> ::core::result::Result<
3093        (),
3094        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3095    > {
3096        match *message.header().ordinal {
3097            7969378779654942110 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3098                Ok(decoded) => {
3099                    handler.present(::fidl_next::Request::from_decoded(decoded)).await;
3100                    Ok(())
3101                }
3102                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3103                    ordinal: 7969378779654942110,
3104                    error,
3105                }),
3106            },
3107
3108            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3109        }
3110    }
3111
3112    async fn on_two_way(
3113        handler: &mut ___H,
3114        mut message: ::fidl_next::Message<___T>,
3115        responder: ::fidl_next::protocol::Responder<___T>,
3116    ) -> ::core::result::Result<
3117        (),
3118        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3119    > {
3120        match *message.header().ordinal {
3121            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3122        }
3123    }
3124}
3125
3126/// A client handler for the View protocol.
3127///
3128/// See [`View`] for more details.
3129pub trait ViewClientHandler<
3130    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3131    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3132>
3133{
3134}
3135
3136impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for View
3137where
3138    ___H: ViewClientHandler<___T> + ::core::marker::Send,
3139    ___T: ::fidl_next::Transport,
3140{
3141    async fn on_event(
3142        handler: &mut ___H,
3143        mut message: ::fidl_next::Message<___T>,
3144    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3145        match *message.header().ordinal {
3146            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3147        }
3148    }
3149}
3150
3151/// A server handler for the View protocol.
3152///
3153/// See [`View`] for more details.
3154pub trait ViewServerHandler<
3155    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3156    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3157>
3158{
3159    #[doc = " Provides the View with an attachment point to Scenic\'s scene graph.\n\n When `Present()` is called the View\'s implementation should create a\n View resource within Scenic by providing it with the `view_token` (using\n a `fuchsia.ui.gfx.CreateResourceCmd` and `fuchsia.ui.gfx.ViewArgs`).\n\n Then the implementation should attach its graphical content to the\n newly-created View resource using a `fuchsia.ui.gfx.AddChildCmd`.\n\n If the implementation already owns a View resource (because `Present()`\n had already been called before), then it should terminate the connection\n with an error.\n\n TODO(https://fxbug.dev/42098670): Allow re-parenting `View`s with a new `Present()` call.\n"]
3160    fn present(
3161        &mut self,
3162
3163        request: ::fidl_next::Request<view::Present, ___T>,
3164    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3165}
3166
3167impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for View
3168where
3169    ___H: ViewServerHandler<___T> + ::core::marker::Send,
3170    ___T: ::fidl_next::Transport,
3171    for<'de> crate::wire::ViewPresentRequest: ::fidl_next::Decode<
3172            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3173            Constraint = (),
3174        >,
3175{
3176    async fn on_one_way(
3177        handler: &mut ___H,
3178        mut message: ::fidl_next::Message<___T>,
3179    ) -> ::core::result::Result<
3180        (),
3181        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3182    > {
3183        match *message.header().ordinal {
3184            7969378779654942110 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
3185                Ok(decoded) => {
3186                    handler.present(::fidl_next::Request::from_decoded(decoded)).await;
3187                    Ok(())
3188                }
3189                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3190                    ordinal: 7969378779654942110,
3191                    error,
3192                }),
3193            },
3194
3195            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3196        }
3197    }
3198
3199    async fn on_two_way(
3200        handler: &mut ___H,
3201        mut message: ::fidl_next::Message<___T>,
3202        responder: ::fidl_next::protocol::Responder<___T>,
3203    ) -> ::core::result::Result<
3204        (),
3205        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3206    > {
3207        match *message.header().ordinal {
3208            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3209        }
3210    }
3211}
3212
3213impl<___T> ViewClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
3214
3215impl<___H, ___T> ViewLocalClientHandler<___T> for ::fidl_next::Local<___H>
3216where
3217    ___H: ViewClientHandler<___T>,
3218    ___T: ::fidl_next::Transport,
3219{
3220}
3221
3222impl<___H, ___T> ViewLocalServerHandler<___T> for ::fidl_next::Local<___H>
3223where
3224    ___H: ViewServerHandler<___T>,
3225    ___T: ::fidl_next::Transport,
3226{
3227    async fn present(&mut self, request: ::fidl_next::Request<view::Present, ___T>) {
3228        ___H::present(&mut self.0, request).await
3229    }
3230}
3231
3232/// The type corresponding to the ViewRefInstalled protocol.
3233#[doc = " A method of enabling ViewRef holders to determine if a ViewRef has been\n \"installed\" in the view tree: the time it is first connected, transitively,\n to the root view.  Typically, after installation, view focus may be\n transferred to that ViewRef.\n\n Note: It\'s important to distinguish between a ViewRef\'s installed status and\n       current connected-to-view-tree status.  The former undergoes a state\n       change once, from \"no\" to \"yes\".  The latter may change continuously,\n       depending on view tree topology.  As such, \"installed\" cannot imply\n       \"currently connected to view tree\"; even a hypothetical\n       \"ViewRefConnected\" protocol is fundamentally racy.\n"]
3234#[derive(PartialEq, Debug)]
3235pub struct ViewRefInstalled;
3236
3237impl ::fidl_next::Discoverable for ViewRefInstalled {
3238    const PROTOCOL_NAME: &'static str = "fuchsia.ui.views.ViewRefInstalled";
3239}
3240
3241#[cfg(target_os = "fuchsia")]
3242impl ::fidl_next::HasTransport for ViewRefInstalled {
3243    type Transport = ::fidl_next::fuchsia::zx::Channel;
3244}
3245
3246pub mod view_ref_installed {
3247    pub mod prelude {
3248        pub use crate::{
3249            ViewRefInstalled, ViewRefInstalledClientHandler, ViewRefInstalledLocalClientHandler,
3250            ViewRefInstalledLocalServerHandler, ViewRefInstalledServerHandler, view_ref_installed,
3251        };
3252
3253        pub use crate::natural::ViewRefInstalledError;
3254
3255        pub use crate::natural::ViewRefInstalledWatchRequest;
3256
3257        pub use crate::natural::ViewRefInstalledWatchResponse;
3258    }
3259
3260    pub struct Watch;
3261
3262    impl ::fidl_next::Method for Watch {
3263        const ORDINAL: u64 = 9069901056194410865;
3264        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3265            ::fidl_next::protocol::Flexibility::Strict;
3266
3267        type Protocol = crate::ViewRefInstalled;
3268
3269        type Request = crate::wire::ViewRefInstalledWatchRequest;
3270    }
3271
3272    impl ::fidl_next::TwoWayMethod for Watch {
3273        type Response = ::fidl_next::wire::Result<
3274            'static,
3275            crate::wire::ViewRefInstalledWatchResponse,
3276            crate::wire::ViewRefInstalledError,
3277        >;
3278    }
3279
3280    impl<___R> ::fidl_next::Respond<___R> for Watch {
3281        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3282
3283        fn respond(response: ___R) -> Self::Output {
3284            ::core::result::Result::Ok(response)
3285        }
3286    }
3287
3288    impl<___R> ::fidl_next::RespondErr<___R> for Watch {
3289        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3290
3291        fn respond_err(response: ___R) -> Self::Output {
3292            ::core::result::Result::Err(response)
3293        }
3294    }
3295
3296    mod ___detail {
3297        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ViewRefInstalled
3298        where
3299            ___T: ::fidl_next::Transport,
3300        {
3301            type Client = ViewRefInstalledClient<___T>;
3302            type Server = ViewRefInstalledServer<___T>;
3303        }
3304
3305        /// The client for the `ViewRefInstalled` protocol.
3306        #[repr(transparent)]
3307        pub struct ViewRefInstalledClient<___T: ::fidl_next::Transport> {
3308            #[allow(dead_code)]
3309            client: ::fidl_next::protocol::Client<___T>,
3310        }
3311
3312        impl<___T> ViewRefInstalledClient<___T>
3313        where
3314            ___T: ::fidl_next::Transport,
3315        {
3316            #[doc = " Sets up a callback to fire when the requested |view_ref| is installed.\n - If |view_ref| has not already been installed, the |Watch| response\n   will fire when it is.\n - If |view_ref| has already been installed, the |Watch| response will\n   fire immediately.\n - If |view_ref| is invalid, or becomes invalid (perhaps because the view\n   was destroyed), the |Watch| call returns with an error.  The error is\n   not guaranteed to be immediate, but a ViewRef holder can itself\n   determine ViewRef validity by listening for ZX_EVENTPAIR_PEER_CLOSED.\n\n Flow control: The caller is allowed multiple |Watch| calls on multiple\n ViewRefs. There is at most one response per call back to the client.\n\n Note: Prior to installation, this |Watch| call is kept alive as long as\n       the ViewRef is valid.\n"]
3317            pub fn watch(
3318                &self,
3319
3320                view_ref: impl ::fidl_next::Encode<
3321                    crate::wire::ViewRef,
3322                    <___T as ::fidl_next::Transport>::SendBuffer,
3323                >,
3324            ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
3325            where
3326                <___T as ::fidl_next::Transport>::SendBuffer:
3327                    ::fidl_next::encoder::InternalHandleEncoder,
3328                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3329            {
3330                self.watch_with(crate::generic::ViewRefInstalledWatchRequest { view_ref })
3331            }
3332
3333            #[doc = " Sets up a callback to fire when the requested |view_ref| is installed.\n - If |view_ref| has not already been installed, the |Watch| response\n   will fire when it is.\n - If |view_ref| has already been installed, the |Watch| response will\n   fire immediately.\n - If |view_ref| is invalid, or becomes invalid (perhaps because the view\n   was destroyed), the |Watch| call returns with an error.  The error is\n   not guaranteed to be immediate, but a ViewRef holder can itself\n   determine ViewRef validity by listening for ZX_EVENTPAIR_PEER_CLOSED.\n\n Flow control: The caller is allowed multiple |Watch| calls on multiple\n ViewRefs. There is at most one response per call back to the client.\n\n Note: Prior to installation, this |Watch| call is kept alive as long as\n       the ViewRef is valid.\n"]
3334            pub fn watch_with<___R>(
3335                &self,
3336                request: ___R,
3337            ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
3338            where
3339                ___R: ::fidl_next::Encode<
3340                        crate::wire::ViewRefInstalledWatchRequest,
3341                        <___T as ::fidl_next::Transport>::SendBuffer,
3342                    >,
3343            {
3344                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3345                    9069901056194410865,
3346                    <super::Watch as ::fidl_next::Method>::FLEXIBILITY,
3347                    request,
3348                ))
3349            }
3350        }
3351
3352        /// The server for the `ViewRefInstalled` protocol.
3353        #[repr(transparent)]
3354        pub struct ViewRefInstalledServer<___T: ::fidl_next::Transport> {
3355            server: ::fidl_next::protocol::Server<___T>,
3356        }
3357
3358        impl<___T> ViewRefInstalledServer<___T> where ___T: ::fidl_next::Transport {}
3359    }
3360}
3361
3362#[diagnostic::on_unimplemented(
3363    note = "If {Self} implements the non-local ViewRefInstalledClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3364)]
3365
3366/// A client handler for the ViewRefInstalled protocol.
3367///
3368/// See [`ViewRefInstalled`] for more details.
3369pub trait ViewRefInstalledLocalClientHandler<
3370    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3371    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3372>
3373{
3374}
3375
3376impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ViewRefInstalled
3377where
3378    ___H: ViewRefInstalledLocalClientHandler<___T>,
3379    ___T: ::fidl_next::Transport,
3380{
3381    async fn on_event(
3382        handler: &mut ___H,
3383        mut message: ::fidl_next::Message<___T>,
3384    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3385        match *message.header().ordinal {
3386            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3387        }
3388    }
3389}
3390
3391#[diagnostic::on_unimplemented(
3392    note = "If {Self} implements the non-local ViewRefInstalledServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3393)]
3394
3395/// A server handler for the ViewRefInstalled protocol.
3396///
3397/// See [`ViewRefInstalled`] for more details.
3398pub trait ViewRefInstalledLocalServerHandler<
3399    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3400    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3401>
3402{
3403    #[doc = " Sets up a callback to fire when the requested |view_ref| is installed.\n - If |view_ref| has not already been installed, the |Watch| response\n   will fire when it is.\n - If |view_ref| has already been installed, the |Watch| response will\n   fire immediately.\n - If |view_ref| is invalid, or becomes invalid (perhaps because the view\n   was destroyed), the |Watch| call returns with an error.  The error is\n   not guaranteed to be immediate, but a ViewRef holder can itself\n   determine ViewRef validity by listening for ZX_EVENTPAIR_PEER_CLOSED.\n\n Flow control: The caller is allowed multiple |Watch| calls on multiple\n ViewRefs. There is at most one response per call back to the client.\n\n Note: Prior to installation, this |Watch| call is kept alive as long as\n       the ViewRef is valid.\n"]
3404    fn watch(
3405        &mut self,
3406
3407        request: ::fidl_next::Request<view_ref_installed::Watch, ___T>,
3408
3409        responder: ::fidl_next::Responder<view_ref_installed::Watch, ___T>,
3410    ) -> impl ::core::future::Future<Output = ()>;
3411}
3412
3413impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ViewRefInstalled
3414where
3415    ___H: ViewRefInstalledLocalServerHandler<___T>,
3416    ___T: ::fidl_next::Transport,
3417    for<'de> crate::wire::ViewRefInstalledWatchRequest: ::fidl_next::Decode<
3418            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3419            Constraint = (),
3420        >,
3421{
3422    async fn on_one_way(
3423        handler: &mut ___H,
3424        mut message: ::fidl_next::Message<___T>,
3425    ) -> ::core::result::Result<
3426        (),
3427        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3428    > {
3429        match *message.header().ordinal {
3430            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3431        }
3432    }
3433
3434    async fn on_two_way(
3435        handler: &mut ___H,
3436        mut message: ::fidl_next::Message<___T>,
3437        responder: ::fidl_next::protocol::Responder<___T>,
3438    ) -> ::core::result::Result<
3439        (),
3440        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3441    > {
3442        match *message.header().ordinal {
3443            9069901056194410865 => {
3444                let responder = ::fidl_next::Responder::from_untyped(responder);
3445
3446                match ::fidl_next::AsDecoderExt::into_decoded(message) {
3447                    Ok(decoded) => {
3448                        handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
3449                        Ok(())
3450                    }
3451                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3452                        ordinal: 9069901056194410865,
3453                        error,
3454                    }),
3455                }
3456            }
3457
3458            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3459        }
3460    }
3461}
3462
3463/// A client handler for the ViewRefInstalled protocol.
3464///
3465/// See [`ViewRefInstalled`] for more details.
3466pub trait ViewRefInstalledClientHandler<
3467    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3468    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3469>
3470{
3471}
3472
3473impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ViewRefInstalled
3474where
3475    ___H: ViewRefInstalledClientHandler<___T> + ::core::marker::Send,
3476    ___T: ::fidl_next::Transport,
3477{
3478    async fn on_event(
3479        handler: &mut ___H,
3480        mut message: ::fidl_next::Message<___T>,
3481    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3482        match *message.header().ordinal {
3483            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3484        }
3485    }
3486}
3487
3488/// A server handler for the ViewRefInstalled protocol.
3489///
3490/// See [`ViewRefInstalled`] for more details.
3491pub trait ViewRefInstalledServerHandler<
3492    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3493    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3494>
3495{
3496    #[doc = " Sets up a callback to fire when the requested |view_ref| is installed.\n - If |view_ref| has not already been installed, the |Watch| response\n   will fire when it is.\n - If |view_ref| has already been installed, the |Watch| response will\n   fire immediately.\n - If |view_ref| is invalid, or becomes invalid (perhaps because the view\n   was destroyed), the |Watch| call returns with an error.  The error is\n   not guaranteed to be immediate, but a ViewRef holder can itself\n   determine ViewRef validity by listening for ZX_EVENTPAIR_PEER_CLOSED.\n\n Flow control: The caller is allowed multiple |Watch| calls on multiple\n ViewRefs. There is at most one response per call back to the client.\n\n Note: Prior to installation, this |Watch| call is kept alive as long as\n       the ViewRef is valid.\n"]
3497    fn watch(
3498        &mut self,
3499
3500        request: ::fidl_next::Request<view_ref_installed::Watch, ___T>,
3501
3502        responder: ::fidl_next::Responder<view_ref_installed::Watch, ___T>,
3503    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3504}
3505
3506impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ViewRefInstalled
3507where
3508    ___H: ViewRefInstalledServerHandler<___T> + ::core::marker::Send,
3509    ___T: ::fidl_next::Transport,
3510    for<'de> crate::wire::ViewRefInstalledWatchRequest: ::fidl_next::Decode<
3511            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3512            Constraint = (),
3513        >,
3514{
3515    async fn on_one_way(
3516        handler: &mut ___H,
3517        mut message: ::fidl_next::Message<___T>,
3518    ) -> ::core::result::Result<
3519        (),
3520        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3521    > {
3522        match *message.header().ordinal {
3523            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3524        }
3525    }
3526
3527    async fn on_two_way(
3528        handler: &mut ___H,
3529        mut message: ::fidl_next::Message<___T>,
3530        responder: ::fidl_next::protocol::Responder<___T>,
3531    ) -> ::core::result::Result<
3532        (),
3533        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3534    > {
3535        match *message.header().ordinal {
3536            9069901056194410865 => {
3537                let responder = ::fidl_next::Responder::from_untyped(responder);
3538
3539                match ::fidl_next::AsDecoderExt::into_decoded(message) {
3540                    Ok(decoded) => {
3541                        handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
3542                        Ok(())
3543                    }
3544                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3545                        ordinal: 9069901056194410865,
3546                        error,
3547                    }),
3548                }
3549            }
3550
3551            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3552        }
3553    }
3554}
3555
3556impl<___T> ViewRefInstalledClientHandler<___T> for ::fidl_next::IgnoreEvents where
3557    ___T: ::fidl_next::Transport
3558{
3559}
3560
3561impl<___H, ___T> ViewRefInstalledLocalClientHandler<___T> for ::fidl_next::Local<___H>
3562where
3563    ___H: ViewRefInstalledClientHandler<___T>,
3564    ___T: ::fidl_next::Transport,
3565{
3566}
3567
3568impl<___H, ___T> ViewRefInstalledLocalServerHandler<___T> for ::fidl_next::Local<___H>
3569where
3570    ___H: ViewRefInstalledServerHandler<___T>,
3571    ___T: ::fidl_next::Transport,
3572{
3573    async fn watch(
3574        &mut self,
3575
3576        request: ::fidl_next::Request<view_ref_installed::Watch, ___T>,
3577
3578        responder: ::fidl_next::Responder<view_ref_installed::Watch, ___T>,
3579    ) {
3580        ___H::watch(&mut self.0, request, responder).await
3581    }
3582}
3583
3584pub use fidl_next_common_fuchsia_ui_views::*;