1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 #[doc = " A point in 2D space.\n"]
8 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9 #[repr(C)]
10 pub struct Point {
11 pub x: i64,
12
13 pub y: i64,
14 }
15
16 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Point, ___E> for Point
17 where
18 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19 {
20 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Point> = unsafe {
21 ::fidl_next::CopyOptimization::enable_if(
22 true
23
24 && <
25 i64 as ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>
26 >::COPY_OPTIMIZATION.is_enabled()
27
28 && <
29 i64 as ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>
30 >::COPY_OPTIMIZATION.is_enabled()
31
32 )
33 };
34
35 #[inline]
36 fn encode(
37 self,
38 encoder_: &mut ___E,
39 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point>,
40 _: (),
41 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
42 ::fidl_next::munge! {
43 let crate::wire::Point {
44 x,
45 y,
46
47 } = out_;
48 }
49
50 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
51
52 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
53
54 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
55
56 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
57
58 Ok(())
59 }
60 }
61
62 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Point, ___E> for &'a Point
63 where
64 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
65 {
66 #[inline]
67 fn encode(
68 self,
69 encoder_: &mut ___E,
70 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point>,
71 _: (),
72 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
73 ::fidl_next::munge! {
74 let crate::wire::Point {
75 x,
76 y,
77
78 } = out_;
79 }
80
81 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
82
83 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
84
85 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
86
87 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
88
89 Ok(())
90 }
91 }
92
93 unsafe impl<___E>
94 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Point>, ___E>
95 for Point
96 where
97 ___E: ::fidl_next::Encoder + ?Sized,
98 Point: ::fidl_next::Encode<crate::wire::Point, ___E>,
99 {
100 #[inline]
101 fn encode_option(
102 this: ::core::option::Option<Self>,
103 encoder: &mut ___E,
104 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Point>>,
105 _: (),
106 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
107 if let Some(inner) = this {
108 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
109 ::fidl_next::wire::Box::encode_present(out);
110 } else {
111 ::fidl_next::wire::Box::encode_absent(out);
112 }
113
114 Ok(())
115 }
116 }
117
118 unsafe impl<'a, ___E>
119 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Point>, ___E>
120 for &'a Point
121 where
122 ___E: ::fidl_next::Encoder + ?Sized,
123 &'a Point: ::fidl_next::Encode<crate::wire::Point, ___E>,
124 {
125 #[inline]
126 fn encode_option(
127 this: ::core::option::Option<Self>,
128 encoder: &mut ___E,
129 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Point>>,
130 _: (),
131 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
132 if let Some(inner) = this {
133 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
134 ::fidl_next::wire::Box::encode_present(out);
135 } else {
136 ::fidl_next::wire::Box::encode_absent(out);
137 }
138
139 Ok(())
140 }
141 }
142
143 impl ::fidl_next::FromWire<crate::wire::Point> for Point {
144 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Point, Self> = unsafe {
145 ::fidl_next::CopyOptimization::enable_if(
146 true && <i64 as ::fidl_next::FromWire<::fidl_next::wire::Int64>>::COPY_OPTIMIZATION
147 .is_enabled()
148 && <i64 as ::fidl_next::FromWire<::fidl_next::wire::Int64>>::COPY_OPTIMIZATION
149 .is_enabled(),
150 )
151 };
152
153 #[inline]
154 fn from_wire(wire: crate::wire::Point) -> Self {
155 Self {
156 x: ::fidl_next::FromWire::from_wire(wire.x),
157
158 y: ::fidl_next::FromWire::from_wire(wire.y),
159 }
160 }
161 }
162
163 impl ::fidl_next::FromWireRef<crate::wire::Point> for Point {
164 #[inline]
165 fn from_wire_ref(wire: &crate::wire::Point) -> Self {
166 Self {
167 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
168
169 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
170 }
171 }
172 }
173
174 #[doc = " A bounding box in 2D space. This is the result of \"drawing\" operations on our canvas, and what\n the server reports back to the client. These bounds are sufficient to contain all of the\n lines (inclusive) on a canvas at a given time.\n"]
175 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
176 #[repr(C)]
177 pub struct BoundingBox {
178 pub top_left: crate::natural::Point,
179
180 pub bottom_right: crate::natural::Point,
181 }
182
183 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BoundingBox, ___E> for BoundingBox
184 where
185 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
186 {
187 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::BoundingBox> = unsafe {
188 ::fidl_next::CopyOptimization::enable_if(
189 true
190
191 && <
192 crate::natural::Point as ::fidl_next::Encode<crate::wire::Point, ___E>
193 >::COPY_OPTIMIZATION.is_enabled()
194
195 && <
196 crate::natural::Point as ::fidl_next::Encode<crate::wire::Point, ___E>
197 >::COPY_OPTIMIZATION.is_enabled()
198
199 )
200 };
201
202 #[inline]
203 fn encode(
204 self,
205 encoder_: &mut ___E,
206 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoundingBox>,
207 _: (),
208 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
209 ::fidl_next::munge! {
210 let crate::wire::BoundingBox {
211 top_left,
212 bottom_right,
213
214 } = out_;
215 }
216
217 ::fidl_next::Encode::encode(self.top_left, encoder_, top_left, ())?;
218
219 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(top_left.as_mut_ptr()) };
220
221 ::fidl_next::Encode::encode(self.bottom_right, encoder_, bottom_right, ())?;
222
223 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bottom_right.as_mut_ptr()) };
224
225 Ok(())
226 }
227 }
228
229 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::BoundingBox, ___E> for &'a BoundingBox
230 where
231 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
232 {
233 #[inline]
234 fn encode(
235 self,
236 encoder_: &mut ___E,
237 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoundingBox>,
238 _: (),
239 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
240 ::fidl_next::munge! {
241 let crate::wire::BoundingBox {
242 top_left,
243 bottom_right,
244
245 } = out_;
246 }
247
248 ::fidl_next::Encode::encode(&self.top_left, encoder_, top_left, ())?;
249
250 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(top_left.as_mut_ptr()) };
251
252 ::fidl_next::Encode::encode(&self.bottom_right, encoder_, bottom_right, ())?;
253
254 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bottom_right.as_mut_ptr()) };
255
256 Ok(())
257 }
258 }
259
260 unsafe impl<___E>
261 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::BoundingBox>, ___E>
262 for BoundingBox
263 where
264 ___E: ::fidl_next::Encoder + ?Sized,
265 BoundingBox: ::fidl_next::Encode<crate::wire::BoundingBox, ___E>,
266 {
267 #[inline]
268 fn encode_option(
269 this: ::core::option::Option<Self>,
270 encoder: &mut ___E,
271 out: &mut ::core::mem::MaybeUninit<
272 ::fidl_next::wire::Box<'static, crate::wire::BoundingBox>,
273 >,
274 _: (),
275 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
276 if let Some(inner) = this {
277 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
278 ::fidl_next::wire::Box::encode_present(out);
279 } else {
280 ::fidl_next::wire::Box::encode_absent(out);
281 }
282
283 Ok(())
284 }
285 }
286
287 unsafe impl<'a, ___E>
288 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::BoundingBox>, ___E>
289 for &'a BoundingBox
290 where
291 ___E: ::fidl_next::Encoder + ?Sized,
292 &'a BoundingBox: ::fidl_next::Encode<crate::wire::BoundingBox, ___E>,
293 {
294 #[inline]
295 fn encode_option(
296 this: ::core::option::Option<Self>,
297 encoder: &mut ___E,
298 out: &mut ::core::mem::MaybeUninit<
299 ::fidl_next::wire::Box<'static, crate::wire::BoundingBox>,
300 >,
301 _: (),
302 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
303 if let Some(inner) = this {
304 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
305 ::fidl_next::wire::Box::encode_present(out);
306 } else {
307 ::fidl_next::wire::Box::encode_absent(out);
308 }
309
310 Ok(())
311 }
312 }
313
314 impl ::fidl_next::FromWire<crate::wire::BoundingBox> for BoundingBox {
315 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::BoundingBox, Self> = unsafe {
316 ::fidl_next::CopyOptimization::enable_if(
317 true
318
319 && <
320 crate::natural::Point as ::fidl_next::FromWire<crate::wire::Point>
321 >::COPY_OPTIMIZATION.is_enabled()
322
323 && <
324 crate::natural::Point as ::fidl_next::FromWire<crate::wire::Point>
325 >::COPY_OPTIMIZATION.is_enabled()
326
327 )
328 };
329
330 #[inline]
331 fn from_wire(wire: crate::wire::BoundingBox) -> Self {
332 Self {
333 top_left: ::fidl_next::FromWire::from_wire(wire.top_left),
334
335 bottom_right: ::fidl_next::FromWire::from_wire(wire.bottom_right),
336 }
337 }
338 }
339
340 impl ::fidl_next::FromWireRef<crate::wire::BoundingBox> for BoundingBox {
341 #[inline]
342 fn from_wire_ref(wire: &crate::wire::BoundingBox) -> Self {
343 Self {
344 top_left: ::fidl_next::FromWireRef::from_wire_ref(&wire.top_left),
345
346 bottom_right: ::fidl_next::FromWireRef::from_wire_ref(&wire.bottom_right),
347 }
348 }
349 }
350
351 #[doc = " A line in 2D space.\n"]
352 pub type Line = [crate::natural::Point; 2];
353
354 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
355 #[repr(C)]
356 pub struct InstanceAddLineRequest {
357 pub line: [crate::natural::Point; 2],
358 }
359
360 unsafe impl<___E> ::fidl_next::Encode<crate::wire::InstanceAddLineRequest, ___E>
361 for InstanceAddLineRequest
362 where
363 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
364 {
365 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
366 Self,
367 crate::wire::InstanceAddLineRequest,
368 > = unsafe {
369 ::fidl_next::CopyOptimization::enable_if(
370 true && <[crate::natural::Point; 2] as ::fidl_next::Encode<
371 [crate::wire::Point; 2],
372 ___E,
373 >>::COPY_OPTIMIZATION
374 .is_enabled(),
375 )
376 };
377
378 #[inline]
379 fn encode(
380 self,
381 encoder_: &mut ___E,
382 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceAddLineRequest>,
383 _: (),
384 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
385 ::fidl_next::munge! {
386 let crate::wire::InstanceAddLineRequest {
387 line,
388
389 } = out_;
390 }
391
392 ::fidl_next::Encode::encode(self.line, encoder_, line, ())?;
393
394 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(line.as_mut_ptr()) };
395
396 Ok(())
397 }
398 }
399
400 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::InstanceAddLineRequest, ___E>
401 for &'a InstanceAddLineRequest
402 where
403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
404 {
405 #[inline]
406 fn encode(
407 self,
408 encoder_: &mut ___E,
409 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceAddLineRequest>,
410 _: (),
411 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
412 ::fidl_next::munge! {
413 let crate::wire::InstanceAddLineRequest {
414 line,
415
416 } = out_;
417 }
418
419 ::fidl_next::Encode::encode(&self.line, encoder_, line, ())?;
420
421 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(line.as_mut_ptr()) };
422
423 Ok(())
424 }
425 }
426
427 unsafe impl<___E>
428 ::fidl_next::EncodeOption<
429 ::fidl_next::wire::Box<'static, crate::wire::InstanceAddLineRequest>,
430 ___E,
431 > for InstanceAddLineRequest
432 where
433 ___E: ::fidl_next::Encoder + ?Sized,
434 InstanceAddLineRequest: ::fidl_next::Encode<crate::wire::InstanceAddLineRequest, ___E>,
435 {
436 #[inline]
437 fn encode_option(
438 this: ::core::option::Option<Self>,
439 encoder: &mut ___E,
440 out: &mut ::core::mem::MaybeUninit<
441 ::fidl_next::wire::Box<'static, crate::wire::InstanceAddLineRequest>,
442 >,
443 _: (),
444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
445 if let Some(inner) = this {
446 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
447 ::fidl_next::wire::Box::encode_present(out);
448 } else {
449 ::fidl_next::wire::Box::encode_absent(out);
450 }
451
452 Ok(())
453 }
454 }
455
456 unsafe impl<'a, ___E>
457 ::fidl_next::EncodeOption<
458 ::fidl_next::wire::Box<'static, crate::wire::InstanceAddLineRequest>,
459 ___E,
460 > for &'a InstanceAddLineRequest
461 where
462 ___E: ::fidl_next::Encoder + ?Sized,
463 &'a InstanceAddLineRequest: ::fidl_next::Encode<crate::wire::InstanceAddLineRequest, ___E>,
464 {
465 #[inline]
466 fn encode_option(
467 this: ::core::option::Option<Self>,
468 encoder: &mut ___E,
469 out: &mut ::core::mem::MaybeUninit<
470 ::fidl_next::wire::Box<'static, crate::wire::InstanceAddLineRequest>,
471 >,
472 _: (),
473 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
474 if let Some(inner) = this {
475 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
476 ::fidl_next::wire::Box::encode_present(out);
477 } else {
478 ::fidl_next::wire::Box::encode_absent(out);
479 }
480
481 Ok(())
482 }
483 }
484
485 impl ::fidl_next::FromWire<crate::wire::InstanceAddLineRequest> for InstanceAddLineRequest {
486 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
487 crate::wire::InstanceAddLineRequest,
488 Self,
489 > = unsafe {
490 ::fidl_next::CopyOptimization::enable_if(
491 true && <[crate::natural::Point; 2] as ::fidl_next::FromWire<
492 [crate::wire::Point; 2],
493 >>::COPY_OPTIMIZATION
494 .is_enabled(),
495 )
496 };
497
498 #[inline]
499 fn from_wire(wire: crate::wire::InstanceAddLineRequest) -> Self {
500 Self { line: ::fidl_next::FromWire::from_wire(wire.line) }
501 }
502 }
503
504 impl ::fidl_next::FromWireRef<crate::wire::InstanceAddLineRequest> for InstanceAddLineRequest {
505 #[inline]
506 fn from_wire_ref(wire: &crate::wire::InstanceAddLineRequest) -> Self {
507 Self { line: ::fidl_next::FromWireRef::from_wire_ref(&wire.line) }
508 }
509 }
510
511 pub type InstanceAddLineResponse = ();
512}
513
514pub mod wire {
515
516 #[derive(Clone, Debug)]
518 #[repr(C)]
519 pub struct Point {
520 pub x: ::fidl_next::wire::Int64,
521
522 pub y: ::fidl_next::wire::Int64,
523 }
524
525 static_assertions::const_assert_eq!(std::mem::size_of::<Point>(), 16);
526 static_assertions::const_assert_eq!(std::mem::align_of::<Point>(), 8);
527
528 static_assertions::const_assert_eq!(std::mem::offset_of!(Point, x), 0);
529
530 static_assertions::const_assert_eq!(std::mem::offset_of!(Point, y), 8);
531
532 impl ::fidl_next::Constrained for Point {
533 type Constraint = ();
534
535 fn validate(
536 _: ::fidl_next::Slot<'_, Self>,
537 _: Self::Constraint,
538 ) -> Result<(), ::fidl_next::ValidationError> {
539 Ok(())
540 }
541 }
542
543 unsafe impl ::fidl_next::Wire for Point {
544 type Narrowed<'de> = Point;
545
546 #[inline]
547 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
548 ::fidl_next::munge! {
549 let Self {
550 x,
551 y,
552
553 } = &mut *out_;
554 }
555
556 ::fidl_next::Wire::zero_padding(x);
557
558 ::fidl_next::Wire::zero_padding(y);
559 }
560 }
561
562 unsafe impl<___D> ::fidl_next::Decode<___D> for Point
563 where
564 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
565 {
566 fn decode(
567 slot_: ::fidl_next::Slot<'_, Self>,
568 decoder_: &mut ___D,
569 _: (),
570 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
571 ::fidl_next::munge! {
572 let Self {
573 mut x,
574 mut y,
575
576 } = slot_;
577 }
578
579 let _field = x.as_mut();
580
581 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
582
583 let _field = y.as_mut();
584
585 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
586
587 Ok(())
588 }
589 }
590
591 impl ::fidl_next::IntoNatural for Point {
592 type Natural = crate::natural::Point;
593 }
594
595 #[derive(Clone, Debug)]
597 #[repr(C)]
598 pub struct BoundingBox {
599 pub top_left: crate::wire::Point,
600
601 pub bottom_right: crate::wire::Point,
602 }
603
604 static_assertions::const_assert_eq!(std::mem::size_of::<BoundingBox>(), 32);
605 static_assertions::const_assert_eq!(std::mem::align_of::<BoundingBox>(), 8);
606
607 static_assertions::const_assert_eq!(std::mem::offset_of!(BoundingBox, top_left), 0);
608
609 static_assertions::const_assert_eq!(std::mem::offset_of!(BoundingBox, bottom_right), 16);
610
611 impl ::fidl_next::Constrained for BoundingBox {
612 type Constraint = ();
613
614 fn validate(
615 _: ::fidl_next::Slot<'_, Self>,
616 _: Self::Constraint,
617 ) -> Result<(), ::fidl_next::ValidationError> {
618 Ok(())
619 }
620 }
621
622 unsafe impl ::fidl_next::Wire for BoundingBox {
623 type Narrowed<'de> = BoundingBox;
624
625 #[inline]
626 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
627 ::fidl_next::munge! {
628 let Self {
629 top_left,
630 bottom_right,
631
632 } = &mut *out_;
633 }
634
635 ::fidl_next::Wire::zero_padding(top_left);
636
637 ::fidl_next::Wire::zero_padding(bottom_right);
638 }
639 }
640
641 unsafe impl<___D> ::fidl_next::Decode<___D> for BoundingBox
642 where
643 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
644 {
645 fn decode(
646 slot_: ::fidl_next::Slot<'_, Self>,
647 decoder_: &mut ___D,
648 _: (),
649 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
650 ::fidl_next::munge! {
651 let Self {
652 mut top_left,
653 mut bottom_right,
654
655 } = slot_;
656 }
657
658 let _field = top_left.as_mut();
659
660 ::fidl_next::Decode::decode(top_left.as_mut(), decoder_, ())?;
661
662 let _field = bottom_right.as_mut();
663
664 ::fidl_next::Decode::decode(bottom_right.as_mut(), decoder_, ())?;
665
666 Ok(())
667 }
668 }
669
670 impl ::fidl_next::IntoNatural for BoundingBox {
671 type Natural = crate::natural::BoundingBox;
672 }
673
674 pub type Line = [crate::wire::Point; 2];
676
677 #[derive(Clone, Debug)]
679 #[repr(C)]
680 pub struct InstanceAddLineRequest {
681 pub line: [crate::wire::Point; 2],
682 }
683
684 static_assertions::const_assert_eq!(std::mem::size_of::<InstanceAddLineRequest>(), 32);
685 static_assertions::const_assert_eq!(std::mem::align_of::<InstanceAddLineRequest>(), 8);
686
687 static_assertions::const_assert_eq!(std::mem::offset_of!(InstanceAddLineRequest, line), 0);
688
689 impl ::fidl_next::Constrained for InstanceAddLineRequest {
690 type Constraint = ();
691
692 fn validate(
693 _: ::fidl_next::Slot<'_, Self>,
694 _: Self::Constraint,
695 ) -> Result<(), ::fidl_next::ValidationError> {
696 Ok(())
697 }
698 }
699
700 unsafe impl ::fidl_next::Wire for InstanceAddLineRequest {
701 type Narrowed<'de> = InstanceAddLineRequest;
702
703 #[inline]
704 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
705 ::fidl_next::munge! {
706 let Self {
707 line,
708
709 } = &mut *out_;
710 }
711
712 ::fidl_next::Wire::zero_padding(line);
713 }
714 }
715
716 unsafe impl<___D> ::fidl_next::Decode<___D> for InstanceAddLineRequest
717 where
718 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
719 {
720 fn decode(
721 slot_: ::fidl_next::Slot<'_, Self>,
722 decoder_: &mut ___D,
723 _: (),
724 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
725 ::fidl_next::munge! {
726 let Self {
727 mut line,
728
729 } = slot_;
730 }
731
732 let _field = line.as_mut();
733
734 ::fidl_next::Decode::decode(line.as_mut(), decoder_, ())?;
735
736 Ok(())
737 }
738 }
739
740 impl ::fidl_next::IntoNatural for InstanceAddLineRequest {
741 type Natural = crate::natural::InstanceAddLineRequest;
742 }
743
744 pub type InstanceAddLineResponse = ::fidl_next::wire::Unit;
746}
747
748pub mod wire_optional {}
749
750pub mod generic {
751
752 pub struct Point<T0, T1> {
754 pub x: T0,
755
756 pub y: T1,
757 }
758
759 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Point, ___E> for Point<T0, T1>
760 where
761 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
762 T0: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
763 T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
764 {
765 #[inline]
766 fn encode(
767 self,
768 encoder_: &mut ___E,
769 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point>,
770 _: (),
771 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
772 ::fidl_next::munge! {
773 let crate::wire::Point {
774 x,
775 y,
776
777 } = out_;
778 }
779
780 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
781
782 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
783
784 Ok(())
785 }
786 }
787
788 pub struct BoundingBox<T0, T1> {
790 pub top_left: T0,
791
792 pub bottom_right: T1,
793 }
794
795 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::BoundingBox, ___E>
796 for BoundingBox<T0, T1>
797 where
798 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
799 T0: ::fidl_next::Encode<crate::wire::Point, ___E>,
800 T1: ::fidl_next::Encode<crate::wire::Point, ___E>,
801 {
802 #[inline]
803 fn encode(
804 self,
805 encoder_: &mut ___E,
806 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoundingBox>,
807 _: (),
808 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
809 ::fidl_next::munge! {
810 let crate::wire::BoundingBox {
811 top_left,
812 bottom_right,
813
814 } = out_;
815 }
816
817 ::fidl_next::Encode::encode(self.top_left, encoder_, top_left, ())?;
818
819 ::fidl_next::Encode::encode(self.bottom_right, encoder_, bottom_right, ())?;
820
821 Ok(())
822 }
823 }
824
825 pub struct InstanceAddLineRequest<T0> {
827 pub line: T0,
828 }
829
830 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::InstanceAddLineRequest, ___E>
831 for InstanceAddLineRequest<T0>
832 where
833 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
834 T0: ::fidl_next::Encode<[crate::wire::Point; 2], ___E>,
835 {
836 #[inline]
837 fn encode(
838 self,
839 encoder_: &mut ___E,
840 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceAddLineRequest>,
841 _: (),
842 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
843 ::fidl_next::munge! {
844 let crate::wire::InstanceAddLineRequest {
845 line,
846
847 } = out_;
848 }
849
850 ::fidl_next::Encode::encode(self.line, encoder_, line, ())?;
851
852 Ok(())
853 }
854 }
855
856 pub type InstanceAddLineResponse = ();
858}
859
860pub use self::natural::*;
861
862#[doc = " Manages a single instance of a canvas. Each session of this protocol is responsible for a new\n canvas.\n"]
864#[derive(PartialEq, Debug)]
865pub struct Instance;
866
867impl ::fidl_next::Discoverable for Instance {
868 const PROTOCOL_NAME: &'static str = "examples.canvas.addlinemetered.Instance";
869}
870
871#[cfg(target_os = "fuchsia")]
872impl ::fidl_next::HasTransport for Instance {
873 type Transport = ::fidl_next::fuchsia::zx::Channel;
874}
875
876pub mod instance {
877 pub mod prelude {
878 pub use crate::{
879 Instance, InstanceClientHandler, InstanceLocalClientHandler,
880 InstanceLocalServerHandler, InstanceServerHandler, instance,
881 };
882
883 pub use crate::natural::BoundingBox;
884
885 pub use crate::natural::InstanceAddLineRequest;
886
887 pub use crate::natural::InstanceAddLineResponse;
888 }
889
890 pub struct AddLine;
891
892 impl ::fidl_next::Method for AddLine {
893 const ORDINAL: u64 = 5692389758001463633;
894 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
895 ::fidl_next::protocol::Flexibility::Flexible;
896
897 type Protocol = crate::Instance;
898
899 type Request = crate::wire::InstanceAddLineRequest;
900 }
901
902 impl ::fidl_next::TwoWayMethod for AddLine {
903 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::InstanceAddLineResponse>;
904 }
905
906 impl<___R> ::fidl_next::Respond<___R> for AddLine {
907 type Output = ::fidl_next::Flexible<___R>;
908
909 fn respond(response: ___R) -> Self::Output {
910 ::fidl_next::Flexible(response)
911 }
912 }
913
914 pub struct OnDrawn;
915
916 impl ::fidl_next::Method for OnDrawn {
917 const ORDINAL: u64 = 3431237471904686519;
918 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
919 ::fidl_next::protocol::Flexibility::Flexible;
920
921 type Protocol = crate::Instance;
922
923 type Request = crate::wire::BoundingBox;
924 }
925
926 mod ___detail {
927 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Instance
928 where
929 ___T: ::fidl_next::Transport,
930 {
931 type Client = InstanceClient<___T>;
932 type Server = InstanceServer<___T>;
933 }
934
935 #[repr(transparent)]
937 pub struct InstanceClient<___T: ::fidl_next::Transport> {
938 #[allow(dead_code)]
939 client: ::fidl_next::protocol::Client<___T>,
940 }
941
942 impl<___T> InstanceClient<___T>
943 where
944 ___T: ::fidl_next::Transport,
945 {
946 #[doc = " Add a line to the canvas.\n\n This method can be considered an improvement over the one-way case from a flow control\n perspective, as it is now much more difficult for a well-behaved client to \"get ahead\" of\n the server and overwhelm. This is because the client now waits for each request to be acked\n by the server before proceeding. This change represents a trade-off: we get much greater\n synchronization of message flow between the client and the server, at the cost of worse\n performance at the limit due to the extra wait imposed by each ack.\n"]
947 pub fn add_line(
948 &self,
949
950 line: impl ::fidl_next::Encode<
951 [crate::wire::Point; 2],
952 <___T as ::fidl_next::Transport>::SendBuffer,
953 >,
954 ) -> ::fidl_next::TwoWayFuture<'_, super::AddLine, ___T>
955 where
956 <___T as ::fidl_next::Transport>::SendBuffer:
957 ::fidl_next::encoder::InternalHandleEncoder,
958 {
959 self.add_line_with(crate::generic::InstanceAddLineRequest { line })
960 }
961
962 #[doc = " Add a line to the canvas.\n\n This method can be considered an improvement over the one-way case from a flow control\n perspective, as it is now much more difficult for a well-behaved client to \"get ahead\" of\n the server and overwhelm. This is because the client now waits for each request to be acked\n by the server before proceeding. This change represents a trade-off: we get much greater\n synchronization of message flow between the client and the server, at the cost of worse\n performance at the limit due to the extra wait imposed by each ack.\n"]
963 pub fn add_line_with<___R>(
964 &self,
965 request: ___R,
966 ) -> ::fidl_next::TwoWayFuture<'_, super::AddLine, ___T>
967 where
968 ___R: ::fidl_next::Encode<
969 crate::wire::InstanceAddLineRequest,
970 <___T as ::fidl_next::Transport>::SendBuffer,
971 >,
972 {
973 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
974 5692389758001463633,
975 <super::AddLine as ::fidl_next::Method>::FLEXIBILITY,
976 request,
977 ))
978 }
979 }
980
981 #[repr(transparent)]
983 pub struct InstanceServer<___T: ::fidl_next::Transport> {
984 server: ::fidl_next::protocol::Server<___T>,
985 }
986
987 impl<___T> InstanceServer<___T>
988 where
989 ___T: ::fidl_next::Transport,
990 {
991 #[doc = " Update the client with the latest drawing state. The server makes no guarantees about how\n often this event occurs - it could occur multiple times per board state, for example.\n"]
992 pub fn on_drawn(
993 &self,
994
995 top_left: impl ::fidl_next::Encode<
996 crate::wire::Point,
997 <___T as ::fidl_next::Transport>::SendBuffer,
998 >,
999
1000 bottom_right: impl ::fidl_next::Encode<
1001 crate::wire::Point,
1002 <___T as ::fidl_next::Transport>::SendBuffer,
1003 >,
1004 ) -> ::fidl_next::SendFuture<'_, ___T>
1005 where
1006 <___T as ::fidl_next::Transport>::SendBuffer:
1007 ::fidl_next::encoder::InternalHandleEncoder,
1008 {
1009 self.on_drawn_with(crate::generic::BoundingBox { top_left, bottom_right })
1010 }
1011
1012 #[doc = " Update the client with the latest drawing state. The server makes no guarantees about how\n often this event occurs - it could occur multiple times per board state, for example.\n"]
1013
1014 pub fn on_drawn_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
1015 where
1016 ___R: ::fidl_next::Encode<
1017 <super::OnDrawn as ::fidl_next::Method>::Request,
1018 <___T as ::fidl_next::Transport>::SendBuffer,
1019 >,
1020 {
1021 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
1022 3431237471904686519,
1023 <super::OnDrawn as ::fidl_next::Method>::FLEXIBILITY,
1024 request,
1025 ))
1026 }
1027 }
1028 }
1029}
1030
1031#[diagnostic::on_unimplemented(
1032 note = "If {Self} implements the non-local InstanceClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1033)]
1034
1035pub trait InstanceLocalClientHandler<
1039 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1040 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1041>
1042{
1043 #[doc = " Update the client with the latest drawing state. The server makes no guarantees about how\n often this event occurs - it could occur multiple times per board state, for example.\n"]
1044 fn on_drawn(
1045 &mut self,
1046
1047 request: ::fidl_next::Request<instance::OnDrawn, ___T>,
1048 ) -> impl ::core::future::Future<Output = ()>;
1049
1050 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1051 ::core::future::ready(())
1052 }
1053}
1054
1055impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Instance
1056where
1057 ___H: InstanceLocalClientHandler<___T>,
1058 ___T: ::fidl_next::Transport,
1059 for<'de> crate::wire::BoundingBox: ::fidl_next::Decode<
1060 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1061 Constraint = (),
1062 >,
1063{
1064 async fn on_event(
1065 handler: &mut ___H,
1066 mut message: ::fidl_next::Message<___T>,
1067 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1068 match *message.header().ordinal {
1069 3431237471904686519 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
1070 Ok(decoded) => {
1071 handler.on_drawn(::fidl_next::Request::from_decoded(decoded)).await;
1072 Ok(())
1073 }
1074 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1075 ordinal: 3431237471904686519,
1076 error,
1077 }),
1078 },
1079
1080 ordinal => {
1081 handler.on_unknown_interaction(ordinal).await;
1082 if ::core::matches!(
1083 message.header().flexibility(),
1084 ::fidl_next::protocol::Flexibility::Strict
1085 ) {
1086 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1087 } else {
1088 Ok(())
1089 }
1090 }
1091 }
1092 }
1093}
1094
1095#[diagnostic::on_unimplemented(
1096 note = "If {Self} implements the non-local InstanceServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1097)]
1098
1099pub trait InstanceLocalServerHandler<
1103 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1104 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1105>
1106{
1107 #[doc = " Add a line to the canvas.\n\n This method can be considered an improvement over the one-way case from a flow control\n perspective, as it is now much more difficult for a well-behaved client to \"get ahead\" of\n the server and overwhelm. This is because the client now waits for each request to be acked\n by the server before proceeding. This change represents a trade-off: we get much greater\n synchronization of message flow between the client and the server, at the cost of worse\n performance at the limit due to the extra wait imposed by each ack.\n"]
1108 fn add_line(
1109 &mut self,
1110
1111 request: ::fidl_next::Request<instance::AddLine, ___T>,
1112
1113 responder: ::fidl_next::Responder<instance::AddLine, ___T>,
1114 ) -> impl ::core::future::Future<Output = ()>;
1115
1116 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1117 ::core::future::ready(())
1118 }
1119}
1120
1121impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Instance
1122where
1123 ___H: InstanceLocalServerHandler<___T>,
1124 ___T: ::fidl_next::Transport,
1125 for<'de> crate::wire::InstanceAddLineRequest: ::fidl_next::Decode<
1126 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1127 Constraint = (),
1128 >,
1129{
1130 async fn on_one_way(
1131 handler: &mut ___H,
1132 mut message: ::fidl_next::Message<___T>,
1133 ) -> ::core::result::Result<
1134 (),
1135 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1136 > {
1137 match *message.header().ordinal {
1138 ordinal => {
1139 handler.on_unknown_interaction(ordinal).await;
1140 if ::core::matches!(
1141 message.header().flexibility(),
1142 ::fidl_next::protocol::Flexibility::Strict
1143 ) {
1144 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1145 } else {
1146 Ok(())
1147 }
1148 }
1149 }
1150 }
1151
1152 async fn on_two_way(
1153 handler: &mut ___H,
1154 mut message: ::fidl_next::Message<___T>,
1155 responder: ::fidl_next::protocol::Responder<___T>,
1156 ) -> ::core::result::Result<
1157 (),
1158 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1159 > {
1160 match *message.header().ordinal {
1161 5692389758001463633 => {
1162 let responder = ::fidl_next::Responder::from_untyped(responder);
1163
1164 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1165 Ok(decoded) => {
1166 handler
1167 .add_line(::fidl_next::Request::from_decoded(decoded), responder)
1168 .await;
1169 Ok(())
1170 }
1171 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1172 ordinal: 5692389758001463633,
1173 error,
1174 }),
1175 }
1176 }
1177
1178 ordinal => {
1179 handler.on_unknown_interaction(ordinal).await;
1180 if ::core::matches!(
1181 message.header().flexibility(),
1182 ::fidl_next::protocol::Flexibility::Strict
1183 ) {
1184 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1185 } else {
1186 responder
1187 .respond_framework_error(
1188 ordinal,
1189 ::fidl_next::FrameworkError::UnknownMethod,
1190 )
1191 .expect("encoding a framework error should never fail")
1192 .await?;
1193 Ok(())
1194 }
1195 }
1196 }
1197 }
1198}
1199
1200pub trait InstanceClientHandler<
1204 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1205 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1206>
1207{
1208 #[doc = " Update the client with the latest drawing state. The server makes no guarantees about how\n often this event occurs - it could occur multiple times per board state, for example.\n"]
1209 fn on_drawn(
1210 &mut self,
1211
1212 request: ::fidl_next::Request<instance::OnDrawn, ___T>,
1213 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1214
1215 fn on_unknown_interaction(
1216 &mut self,
1217 ordinal: u64,
1218 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1219 ::core::future::ready(())
1220 }
1221}
1222
1223impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Instance
1224where
1225 ___H: InstanceClientHandler<___T> + ::core::marker::Send,
1226 ___T: ::fidl_next::Transport,
1227 for<'de> crate::wire::BoundingBox: ::fidl_next::Decode<
1228 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1229 Constraint = (),
1230 >,
1231{
1232 async fn on_event(
1233 handler: &mut ___H,
1234 mut message: ::fidl_next::Message<___T>,
1235 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1236 match *message.header().ordinal {
1237 3431237471904686519 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
1238 Ok(decoded) => {
1239 handler.on_drawn(::fidl_next::Request::from_decoded(decoded)).await;
1240 Ok(())
1241 }
1242 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1243 ordinal: 3431237471904686519,
1244 error,
1245 }),
1246 },
1247
1248 ordinal => {
1249 handler.on_unknown_interaction(ordinal).await;
1250 if ::core::matches!(
1251 message.header().flexibility(),
1252 ::fidl_next::protocol::Flexibility::Strict
1253 ) {
1254 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1255 } else {
1256 Ok(())
1257 }
1258 }
1259 }
1260 }
1261}
1262
1263pub trait InstanceServerHandler<
1267 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1268 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1269>
1270{
1271 #[doc = " Add a line to the canvas.\n\n This method can be considered an improvement over the one-way case from a flow control\n perspective, as it is now much more difficult for a well-behaved client to \"get ahead\" of\n the server and overwhelm. This is because the client now waits for each request to be acked\n by the server before proceeding. This change represents a trade-off: we get much greater\n synchronization of message flow between the client and the server, at the cost of worse\n performance at the limit due to the extra wait imposed by each ack.\n"]
1272 fn add_line(
1273 &mut self,
1274
1275 request: ::fidl_next::Request<instance::AddLine, ___T>,
1276
1277 responder: ::fidl_next::Responder<instance::AddLine, ___T>,
1278 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1279
1280 fn on_unknown_interaction(
1281 &mut self,
1282 ordinal: u64,
1283 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1284 ::core::future::ready(())
1285 }
1286}
1287
1288impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Instance
1289where
1290 ___H: InstanceServerHandler<___T> + ::core::marker::Send,
1291 ___T: ::fidl_next::Transport,
1292 for<'de> crate::wire::InstanceAddLineRequest: ::fidl_next::Decode<
1293 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1294 Constraint = (),
1295 >,
1296{
1297 async fn on_one_way(
1298 handler: &mut ___H,
1299 mut message: ::fidl_next::Message<___T>,
1300 ) -> ::core::result::Result<
1301 (),
1302 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1303 > {
1304 match *message.header().ordinal {
1305 ordinal => {
1306 handler.on_unknown_interaction(ordinal).await;
1307 if ::core::matches!(
1308 message.header().flexibility(),
1309 ::fidl_next::protocol::Flexibility::Strict
1310 ) {
1311 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1312 } else {
1313 Ok(())
1314 }
1315 }
1316 }
1317 }
1318
1319 async fn on_two_way(
1320 handler: &mut ___H,
1321 mut message: ::fidl_next::Message<___T>,
1322 responder: ::fidl_next::protocol::Responder<___T>,
1323 ) -> ::core::result::Result<
1324 (),
1325 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1326 > {
1327 match *message.header().ordinal {
1328 5692389758001463633 => {
1329 let responder = ::fidl_next::Responder::from_untyped(responder);
1330
1331 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1332 Ok(decoded) => {
1333 handler
1334 .add_line(::fidl_next::Request::from_decoded(decoded), responder)
1335 .await;
1336 Ok(())
1337 }
1338 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1339 ordinal: 5692389758001463633,
1340 error,
1341 }),
1342 }
1343 }
1344
1345 ordinal => {
1346 handler.on_unknown_interaction(ordinal).await;
1347 if ::core::matches!(
1348 message.header().flexibility(),
1349 ::fidl_next::protocol::Flexibility::Strict
1350 ) {
1351 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1352 } else {
1353 responder
1354 .respond_framework_error(
1355 ordinal,
1356 ::fidl_next::FrameworkError::UnknownMethod,
1357 )
1358 .expect("encoding a framework error should never fail")
1359 .await?;
1360 Ok(())
1361 }
1362 }
1363 }
1364 }
1365}
1366
1367impl<___T> InstanceClientHandler<___T> for ::fidl_next::IgnoreEvents
1368where
1369 ___T: ::fidl_next::Transport,
1370{
1371 async fn on_drawn(&mut self, _: ::fidl_next::Request<instance::OnDrawn, ___T>) {}
1372
1373 async fn on_unknown_interaction(&mut self, _: u64) {}
1374}
1375
1376impl<___H, ___T> InstanceLocalClientHandler<___T> for ::fidl_next::Local<___H>
1377where
1378 ___H: InstanceClientHandler<___T>,
1379 ___T: ::fidl_next::Transport,
1380{
1381 async fn on_drawn(&mut self, request: ::fidl_next::Request<instance::OnDrawn, ___T>) {
1382 ___H::on_drawn(&mut self.0, request).await
1383 }
1384
1385 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1386 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1387 }
1388}
1389
1390impl<___H, ___T> InstanceLocalServerHandler<___T> for ::fidl_next::Local<___H>
1391where
1392 ___H: InstanceServerHandler<___T>,
1393 ___T: ::fidl_next::Transport,
1394{
1395 async fn add_line(
1396 &mut self,
1397
1398 request: ::fidl_next::Request<instance::AddLine, ___T>,
1399
1400 responder: ::fidl_next::Responder<instance::AddLine, ___T>,
1401 ) {
1402 ___H::add_line(&mut self.0, request, responder).await
1403 }
1404
1405 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1406 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1407 }
1408}